/*
Theme Name: KingTool Football Hub
Author: King Media Group
Description: Элитный футбольный инфо-портал. Глубокая тактика, скаутинг и аналитика мирового футбола.
Version: 1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Playfair+Display:wght@700;900&display=swap');

:root {
    /* Tactical Hub Palette (Emerald & Gold) */
    --primary: #064e3b;        /* Deep Emerald */
    --secondary: #d4af37;      /* Matte Gold */
    --accent: #f0f9f6;         /* Light Emerald Mist */
    --black: #0a0a0a;
    --white: #FFFFFF;
    --paper: #fcfdfc;
    --text-main: #1a1a1a;
    --text-muted: #4b5563;
    --border: #e5e7eb;
    
    --container-width: 1200px;
    --content-width: 900px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* Adaptive Design Variables (Rule 17) */
    --section-pad: clamp(4rem, 12vw, 12rem);
    --hero-pad: clamp(6rem, 15vw, 20rem);
    --block-border: 1px;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important; /* Rule 15: Sharp edges */
}

html, body {
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--paper);
    color: var(--text-main);
    line-height: 1.8;
    padding-top: 100px;
}

/* Fluid Typography (Rule 14) */
h1, h2, h3, .logo, .footer-logo {
    overflow-wrap: break-word;
    word-wrap: break-word;
    font-family: 'Playfair Display', serif;
    font-weight: 900;
}

h1 { font-size: clamp(2.2rem, 5vw, 5rem); line-height: 1.1; color: var(--primary); margin-bottom: 3rem; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
h2 { font-size: clamp(2rem, 6vw, 4rem); line-height: 1.2; color: var(--primary); }
h3 { font-size: clamp(1.5rem, 4vw, 2.8rem); line-height: 1.3; color: var(--primary); }

img { max-width: 100%; height: auto; display: block; }

a { text-decoration: none; color: inherit; transition: var(--transition); }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header (Rule 1) */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem; /* Rule 1: Desktop gap */
}

.logo {
    font-size: clamp(0.75rem, 4vw, 2.4rem);
    color: var(--primary);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0; /* Rule 14: No shrink */
    white-space: nowrap; /* Rule 1: Always one line */
}

.logo span {
    color: var(--secondary);
}

.main-nav { flex: 1; min-width: 0; overflow: hidden; }
.main-nav ul { display: flex; gap: 3.5rem; list-style: none; justify-content: flex-end; }
.main-nav a { font-weight: 700; font-size: 0.85rem; color: var(--primary); text-transform: uppercase; letter-spacing: 0.1em; }
.main-nav a:hover { color: var(--secondary); }

/* Hamburger (Rule 3) */
.nav-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 6px; width: 30px; height: 30px;
    background: none; border: none; cursor: pointer; flex-shrink: 0; z-index: 1001;
}
.nav-toggle span { width: 100%; height: 2px; background: var(--primary); display: block; transition: var(--transition); }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Hero Section: Image Left, Text Right (Option B - Rule 2) */
.hero-hub {
    padding: var(--hero-pad) 0;
    background: var(--accent);
    margin-bottom: 8rem;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: clamp(2rem, 5vw, 6rem);
    align-items: center;
}

.hero-visual {
    position: relative;
}
.hero-visual img {
    border: 1px solid var(--primary);
    filter: sepia(20%) contrast(110%);
}
.hero-visual::after {
    content: '';
    position: absolute;
    inset: -20px;
    border: 1px solid var(--secondary);
    z-index: -1;
}

.hero-content {
    position: relative;
}
.hero-content h1 span {
    display: block;
    color: var(--secondary);
    font-size: 0.4em;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-family: 'Inter', sans-serif;
    margin-bottom: 1rem;
}

.btn-tactical {
    background: var(--primary);
    color: var(--white);
    padding: 1.5rem 3.5rem;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    border: 1px solid var(--primary);
}
.btn-tactical:hover { background: transparent; color: var(--primary); }

/* Evergreen Blocks (Rule 5) */
.tactical-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: 4rem;
    margin-bottom: 12rem;
}

.feat-card {
    padding: 4rem;
    border: 1px solid var(--border);
    background: var(--white);
    transition: var(--transition);
}
.feat-card:hover { border-color: var(--secondary); transform: translateY(-10px); }
.feat-card h3 { font-size: 1.8rem; margin-bottom: 1.5rem; }
.feat-card p { color: var(--text-muted); font-size: 1.1rem; }

/* Unique Section: Tactical Lab */
.tactical-lab {
    background: var(--primary);
    color: var(--white);
    padding: var(--section-pad) 0;
    margin-bottom: 12rem;
    position: relative;
}
.tactical-lab h2 { color: var(--secondary); margin-bottom: 4rem; }

.lab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10rem;
    align-items: center;
}

.lab-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}
.stat-item strong { display: block; font-size: 4rem; font-family: 'Playfair Display'; color: var(--secondary); line-height: 1; }
.stat-item span { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.2em; }

/* Posts Grid (Rule 20) */
.section-title {
    margin-bottom: 6rem;
    text-align: center;
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 2rem auto 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Rule 20 */
    gap: 4rem;
    margin-bottom: 6rem;
}

.post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card .thumb {
    height: clamp(200px, 25vw, 350px);
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-card h3 { font-size: 1.6rem; margin-bottom: 2rem; flex-grow: 1; }

.btn-more {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.btn-more::after { content: ''; width: 30px; height: 1px; background: var(--secondary); transition: var(--transition); }
.btn-more:hover::after { width: 60px; }

/* Pagination (Rule 8) */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-bottom: 12rem;
}
.pagination { display: flex; gap: 1rem; list-style: none; }
.pagination a, .pagination span {
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    font-weight: 700;
}
.pagination .current, .pagination a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Footer */
.site-footer {
    background: var(--black);
    color: var(--white);
    padding: 10rem 0 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 12rem;
    margin-bottom: 8rem;
}

.footer-logo { font-size: clamp(1.2rem, 7vw, 3rem); color: var(--white); margin-bottom: 2.5rem; }
.footer-logo span { color: var(--secondary); }

.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 1.5rem; }
.footer-nav a { color: #888; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; }
.footer-nav a:hover { color: var(--secondary); }

.footer-bottom {
    padding-top: 4rem;
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #555;
}

/* Single Post (Rule 7) */
.post-container {
    max-width: var(--content-width);
    margin: 8rem auto;
}
.post-header { margin-bottom: 6rem; text-align: center; }
.post-thumbnail { margin-bottom: 6rem; border: 1px solid var(--primary); padding: 10px; }

.post-content {
    font-size: 1.15rem;
    line-height: 1.8;
}
.post-content h2, .post-content h3 { margin: 5rem 0 2rem; }
.post-content p { margin-bottom: 2.5rem; }

/* Responsive */
@media (max-width: 1024px) {
    .header-inner { gap: 2rem; }
    .hero-grid { gap: 4rem; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 3rem; }
    .footer-grid { gap: 6rem; }
}

@media (max-width: 768px) {
    .header-inner { gap: 1rem; }
    .nav-toggle { display: flex; }
    .main-nav { display: none; }
    .main-nav.is-active {
        display: block; position: absolute; top: 100%; left: 0; width: 100%;
        background: var(--white); padding: 4rem 2rem; border-bottom: 1px solid var(--border);
    }
    .main-nav ul { flex-direction: column; align-items: flex-start; gap: 2rem; }
    
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { order: -1; }
    .lab-grid { grid-template-columns: 1fr; gap: 6rem; }
    .posts-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 6rem; }
    .footer-bottom { flex-direction: column; gap: 2rem; text-align: center; }
}
