/*
Theme Name: Fox Volleyball Hub
Author: Fox Media Group
Description: Профессиональный волейбольный аналитический портал. Новости лиг, статистика игроков и тактические разборы.
Version: 1.8.0
*/

:root {
    /* Volleyball Palette (Orange Spike Edition) */
    --primary: #FF7043;        /* Fox Orange */
    --secondary: #1A237E;      /* Deep Indigo */
    --accent: #E8EAF6;         /* Light Indigo Mist */
    --black: #121212;
    --white: #FFFFFF;
    --paper: #F5F5F5;
    --text-main: #212121;
    --text-muted: #757575;
    --border: #BDBDBD;
    
    --container-width: 1200px;
    --content-width: 900px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Adaptive Design Variables (Rule 17) */
    --section-pad: clamp(3rem, 10vw, 10rem);
    --hero-pad: clamp(5rem, 15vw, 18rem);
    --block-border: 2px;
}

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

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

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

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

h1 { font-size: clamp(1.8rem, 10vw, 8rem); font-weight: 700; line-height: 1; color: var(--secondary); margin-bottom: 2rem; word-break: break-word; }
h2 { font-size: clamp(2rem, 6vw, 4.5rem); font-weight: 700; line-height: 1.1; color: var(--secondary); }
h3 { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.2; color: var(--secondary); }
h4 { font-family: 'Work Sans', sans-serif; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 3px; }

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 */
.site-header {
    background: var(--white);
    border-bottom: 4px solid var(--secondary);
    padding: 1.5rem 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;
}

.logo {
    font-size: clamp(0.75rem, 4vw, 2.2rem); /* Агрессивное масштабирование — не перенос */
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 1;
    min-width: 0;           /* Обязательно для flex, иначе не сжимается */
    white-space: nowrap;    /* Всегда одна строка */
    word-break: normal;     /* Запрещаем агрессивный разрыв слов */
}

.logo span {
    color: var(--primary);
    position: relative;
}
.logo span::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0; width: 100%; height: 4px;
    background: var(--primary);
}

.main-nav { flex: 1; min-width: 0; }
.main-nav ul { display: flex; gap: 3.5rem; list-style: none; justify-content: flex-end; }
.main-nav a { font-weight: 700; font-size: 0.9rem; color: var(--secondary); text-transform: uppercase; white-space: nowrap; }
.main-nav a:hover { color: var(--primary); }

/* Hamburger (Rule 3) */
.nav-toggle {
    display: none; flex-direction: column; justify-content: space-between; width: 32px; height: 24px;
    background: none; border: none; cursor: pointer; flex-shrink: 0; z-index: 1001; position: relative;
}
.nav-toggle span { width: 100%; height: 3px; background: var(--secondary); display: block; transition: var(--transition); }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* Hero Section: Text Left, Image Right (Option A) */
.hero-volley {
    padding: var(--hero-pad) 0;
    background: var(--white);
    border-bottom: 10px solid var(--primary);
    margin-bottom: 6rem;
    overflow: hidden;
}

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

.hero-content p { font-size: 1.3rem; color: var(--text-muted); font-weight: 500; margin-bottom: 4rem; text-transform: uppercase; letter-spacing: 4px; }

.hero-visual {
    position: relative;
    border: 10px solid var(--secondary);
}
.hero-visual::before {
    content: '';
    position: absolute;
    top: 20px; left: 20px; width: 100%; height: 100%;
    background: var(--primary);
    z-index: -1;
}

.btn-fox {
    background: var(--secondary);
    color: var(--white);
    padding: 1.5rem 4rem;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    display: inline-block;
    border: none;
    transition: var(--transition);
}
.btn-fox:hover { background: var(--primary); transform: translate(5px, -5px); }

/* Features: Indigo Blocks */
.volley-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 0;
    margin-bottom: 10rem;
    border: 2px solid var(--secondary);
}

.feat-item {
    background: var(--secondary);
    color: var(--white);
    padding: 4rem;
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}
.feat-item:hover { background: var(--primary); }
.feat-item h3 { color: var(--white); margin-bottom: 2rem; }

/* Unique Section 1: Tactical Rotation Lab */
.rotation-lab {
    padding: var(--section-pad) 0;
    background: var(--white);
    border: 4px solid var(--secondary);
    margin-bottom: 10rem;
    overflow: hidden;
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: 6rem;
    align-items: center;
}

.lab-visual {
    background: var(--accent);
    aspect-ratio: 1/1;
    border: 2px dashed var(--secondary);
    position: relative;
    display: flex; align-items: center; justify-content: center;
}
.lab-visual::after {
    content: 'NET';
    position: absolute;
    top: 0; width: 100%; height: 10px;
    background: repeating-linear-gradient(90deg, var(--secondary), var(--secondary) 10px, transparent 10px, transparent 20px);
}

/* Unique Section 2: Spike Speed Analytics */
.spike-analytics {
    background: var(--primary);
    color: var(--white);
    padding: 6rem;
    margin-bottom: 10rem;
    text-align: center;
    overflow: hidden;
}

.spike-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: clamp(2rem, 4vw, 4rem);
}

.spike-box strong { display: block; font-size: clamp(3rem, 15vw, 6rem); font-family: 'Libre Baskerville'; line-height: 1; margin-bottom: 1rem; }
.spike-box span { font-weight: 700; text-transform: uppercase; letter-spacing: 2px; }

/* Posts Grid: Rule 20 */
.grid-header {
    margin-bottom: 5rem;
    display: flex; justify-content: space-between; align-items: flex-end;
    border-bottom: 6px solid var(--secondary);
    padding-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.volley-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--border);
    border: 2px solid var(--border);
    margin-bottom: 6rem;
}

.post-card-fox {
    background: var(--white);
    display: flex; flex-direction: column;
    height: 100%;
    padding: 2.5rem;
    transition: var(--transition);
}
.post-card-fox:hover { background: var(--accent); }

.post-card-fox .thumb {
    height: clamp(180px, 25vw, 300px);
    overflow: hidden; position: relative;
    margin-bottom: 2.5rem;
}
.post-card-fox .thumb img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.post-card-fox:hover .thumb img { transform: scale(1.05); }

.post-card-fox .content { flex-grow: 1; display: flex; flex-direction: column; }
.post-card-fox h3 { margin-bottom: 2.5rem; flex-grow: 1; font-size: 1.8rem; }
.post-card-fox .btn-read {
    font-weight: 700; text-transform: uppercase; color: var(--primary); border-bottom: 3px solid var(--primary); align-self: flex-start;
}

/* Pagination */
.pagi-wrap { margin-bottom: 12rem; }
.pagi-list { display: flex; gap: 1rem; justify-content: center; list-style: none; }
.pagi-list a, .pagi-list span {
    padding: 1rem 2rem; background: var(--white); border: 2px solid var(--secondary);
    font-family: 'Libre Baskerville'; font-weight: 700; font-size: 1.2rem;
}
.pagi-list span.current, .pagi-list a:hover {
    background: var(--secondary); color: var(--white);
}

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

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

.footer-logo { font-size: clamp(1.2rem, 7vw, 3.5rem); font-weight: 700; margin-bottom: 3rem; color: var(--white); overflow-wrap: anywhere; }
.footer-logo span { color: var(--primary); }
.footer-desc { color: var(--accent); font-size: 1.2rem; line-height: 1.8; max-width: 600px; }

.footer-nav-heading { font-size: 1.5rem; color: var(--primary); margin-bottom: 3rem; text-transform: uppercase; }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 1.5rem; }
.footer-nav a { font-weight: 500; color: #9FA8DA; }
.footer-nav a:hover { color: var(--primary); }

.footer-bottom {
    padding-top: 4rem; border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between;
    font-size: 0.9rem; color: #9FA8DA; text-transform: uppercase; font-weight: 700;
}

/* Single Post */
.post-main-fox {
    max-width: var(--content-width);
    margin: 8rem auto;
    background: var(--white);
    padding: clamp(2rem, 6vw, 8rem);
    border: 4px solid var(--secondary);
}

.post-meta-fox {
    color: var(--primary);
    font-weight: 700;
    font-family: 'Libre Baskerville';
    text-transform: uppercase;
    display: block;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.post-body-fox { font-size: 1.15rem; line-height: 2; color: var(--text-main); }
.post-body-fox p { margin-bottom: 2.5rem; }

.post-thumbnail-wrap {
    margin: 4rem 0;
    border: 4px solid var(--secondary);
}

/* Responsive: Rule 20 */
@media (max-width: 1024px) {
    .volley-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-grid { grid-template-columns: 1.2fr 0.8fr; gap: 3rem; }
}

@media (max-width: 768px) {
    .header-inner { gap: 1rem; } /* Уменьшаем gap, чтобы логотип и гамбургер влезли */
    .nav-toggle { display: flex; }
    .main-nav { display: none; }
    .main-nav.is-active {
        display: block !important; position: absolute; top: 100%; left: 0; width: 100%;
        background: var(--white); padding: 3rem; border-bottom: 8px solid var(--secondary);
        z-index: 1000;
    }
    .main-nav ul { flex-direction: column; align-items: flex-start; gap: 2.5rem; }
    .main-nav a { color: var(--secondary); }

    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { order: -1; }
    .volley-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 5rem; }
}
