/*
Theme Name: LaserTech MMA Hub
Author: PBN Creative
Description: Professional analytical portal for mixed martial arts. UFC coverage, fighter profiles, and strategic breakdowns.
Version: 1.4.1
*/

:root {
    /* MMA Professional Palette */
    --primary: #00FF9C;        /* Electric Mint */
    --secondary: #0F172A;      /* Midnight Navy */
    --accent: #1E293B;         /* Slate Grey */
    --bg-light: #0F172A;       /* Primary Background */
    --white: #FFFFFF;
    --text-main: #F1F5F9;      /* Ice White */
    --text-muted: #94A3B8;
    --border: #334155;
    
    --container-width: 1200px;
    --content-width: 900px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

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

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

html, body {
    overflow-x: hidden;
    position: relative;
}

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

/* Fluid Typography (Rule 14) */
h1 { font-size: clamp(2.5rem, 8vw, 7rem); font-family: 'Syne', sans-serif; font-weight: 800; line-height: 0.9; color: var(--white); text-transform: uppercase; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.8rem, 5vw, 4rem); font-family: 'Syne', sans-serif; font-weight: 800; line-height: 1; color: var(--white); text-transform: uppercase; letter-spacing: -0.02em; }
h3 { font-size: clamp(1.3rem, 3vw, 2.2rem); font-family: 'Syne', sans-serif; font-weight: 700; line-height: 1.1; color: var(--white); text-transform: uppercase; }
h4 { font-family: 'Syne', sans-serif; font-weight: 700; color: var(--white); text-transform: uppercase; }

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Grayscale filter только на карточках постов — см. .post-card-mma .thumb img */
}

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(--secondary);
    border-bottom: 4px solid var(--white);
    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(1.5rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--white);
    font-family: 'Syne', sans-serif;
    line-height: 1;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0; /* логотип никогда не сжимается */
}

.logo span {
    color: var(--secondary);
    background: var(--primary);
    padding: 0.2rem 0.6rem;
}

/* Nav растягивается, но не ломает layout */
.main-nav {
    flex: 1;
    min-width: 0;
    /* overflow: hidden убран — он обрезает мобильное выпадающее меню */
}

.main-nav ul {
    display: flex;
    gap: 3rem;
    list-style: none;
    justify-content: flex-end;
}

.main-nav a {
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--white);
    text-transform: uppercase;
    position: relative;
    white-space: nowrap;
}

.main-nav a:hover { color: var(--primary); }

/* Hamburger — базовое скрытие на десктопе ОБЯЗАТЕЛЬНО */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0; /* не сжимается рядом с логотипом */
}

.nav-toggle span {
    width: 30px;
    height: 3px;
    background: var(--white);
    display: block;
}

/* Hero Section */
.hero-mma {
    padding: var(--hero-pad) 0;
    margin-bottom: clamp(4rem, 8vw, 8rem);
    text-align: center;
    background: linear-gradient(180deg, rgba(0,255,156,0.05) 0%, transparent 100%);
    position: relative;
}

.hero-mma::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('banner.png') center/cover no-repeat;
    opacity: 0.1;
    z-index: -1;
}

.hero-content p {
    margin-bottom: 4rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-combat {
    background: var(--primary);
    color: var(--secondary);
    padding: 1.2rem 3.5rem;
    font-weight: 800;
    font-family: 'Syne', sans-serif;
    text-transform: uppercase;
    border: 2px solid var(--primary);
    display: inline-block;
    cursor: pointer;
}

.btn-combat:hover {
    background: transparent;
    color: var(--primary);
}

/* Компактная кнопка для заголовков секций */
.btn-combat--sm {
    padding: 1rem 2rem;
    font-size: 0.8rem;
}

/* Features Grid */
.mma-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Rule 14 */
    margin-bottom: clamp(4rem, 10vw, 10rem);
    border: 2px solid var(--border);
}

.m-card {
    background: var(--accent);
    padding: clamp(2rem, 5vw, 4rem);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.m-card:hover {
    background: var(--primary);
    color: var(--secondary);
}

/* Performance Analysis Section (Fluid) */
.analysis-section {
    background: #000000;
    padding: var(--section-pad);
    margin-bottom: clamp(4rem, 10vw, 10rem);
    border: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.analysis-bg-lines {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 255, 156, 0.05) 2px, rgba(0, 255, 156, 0.05) 4px);
    pointer-events: none;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
    position: relative;
    z-index: 2;
}

.metric-item strong {
    display: block;
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--primary);
    font-family: 'Syne';
    margin-bottom: 0.5rem;
}

.analysis-visual { text-align: center; }

.analysis-circle {
    width: clamp(150px, 35vw, 350px);
    height: clamp(150px, 35vw, 350px);
    border: clamp(4px, 1vw, 10px) solid var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(3rem, 10vw, 12rem);
    box-shadow: 0 0 100px rgba(0, 255, 156, 0.15);
}

/* Training Camp Insights (Fixed Responsive) */
.insights-section {
    background: var(--white);
    color: var(--secondary);
    padding: var(--section-pad);
    margin-bottom: clamp(4rem, 10vw, 10rem);
    border: var(--block-border) solid var(--secondary); /* Rule 17 */
    position: relative;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(2rem, 8vw, 8rem);
    align-items: center;
}

.insights-visual { text-align: center; }

.insights-icon {
    display: inline-block;
    padding: 2rem;
    border: clamp(4px, 1vw, 8px) solid var(--secondary);
    font-size: clamp(4rem, 8vw, 8rem);
    font-weight: 800;
    font-family: 'Syne';
}

.insights-metrics {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 4rem;
}

.insight-metric-item {
    flex: 1;
    min-width: 200px;
    border-top: 5px solid var(--secondary);
    padding-top: 2rem;
}

/* Post Grid */
.grid-header {
    margin-bottom: 5rem;
    border-left: 15px solid var(--primary);
    padding-left: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

/* Posts grid: ALWAYS 3 columns desktop, 2 tablet, 1 mobile */
.mma-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* фиксированные 3 колонки */
    gap: 2px;
    background: var(--border);
    border: 2px solid var(--border);
    margin-bottom: 6rem;
}

/* Карточка — равная высота через flex column + растяжение */
.post-card-mma {
    background: var(--accent);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    /* equal-height: карточки всегда занимают всю высоту строки */
    height: 100%;
}

.post-card-mma:hover { background: var(--white); color: var(--secondary); }
.post-card-mma:hover * { color: var(--secondary) !important; }

.post-card-mma .thumb {
    height: clamp(200px, 30vw, 300px);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.post-card-mma .thumb img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(100%);
}

.post-card-mma:hover .thumb img { filter: grayscale(0%); }

.post-card-mma .cat {
    position: absolute; bottom: 0; left: 0;
    background: var(--primary);
    color: var(--secondary);
    padding: 0.6rem 1.2rem;
    font-weight: 800;
    font-size: 0.75rem;
}

.post-card-mma h3 { line-height: 1.1; flex-grow: 1; margin-bottom: 2rem; }

.post-card-mma .btn {
    font-weight: 800; color: var(--primary);
    text-transform: uppercase;
    border-bottom: 4px solid var(--primary);
    display: inline-block;
}

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

.post-thumbnail-wrap {
    margin-bottom: clamp(3rem, 8vw, 8rem);
    border: clamp(4px, 1.5vw, 10px) solid var(--primary);
}

/* Archives */
.archive-hero { background: var(--accent); border-bottom: var(--block-border) solid var(--white); }
.archive-label { color: var(--primary); font-weight: 800; text-transform: uppercase; letter-spacing: 5px; margin-bottom: 2rem; display: block; }
.no-posts-msg { padding: 10rem 0; text-align: center; font-size: 2rem; color: var(--primary); font-family: 'Syne'; grid-column: 1 / -1; }

/* 404 */
.error-404-wrap { text-align: center; padding: clamp(5rem, 15vw, 15rem) 0; }
.error-404-title { font-size: clamp(6rem, 25vw, 25rem); color: var(--primary); font-family: 'Syne'; font-weight: 800; line-height: 0.8; }
.error-404-headline { font-size: clamp(1.8rem, 5vw, 4rem); margin: 3rem 0; font-family: 'Syne'; font-weight: 800; }
.error-404-text { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 5rem; max-width: 600px; margin-left: auto; margin-right: auto; text-transform: uppercase; }

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

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(3rem, 8vw, 8rem);
    margin-bottom: 6rem;
}

.footer-logo { font-size: clamp(2rem, 5vw, 4rem); font-weight: 800; margin-bottom: 3rem; font-family: 'Syne'; }
.footer-logo span { background: var(--secondary); color: var(--primary); padding: 0.2rem 1rem; }
.footer-desc { color: #475569; font-size: 1.1rem; font-weight: 600; text-transform: uppercase; margin-bottom: 4rem; }

.footer-nav-heading {
    margin-bottom: 3.5rem;
    letter-spacing: 5px;
    font-size: 1.5rem;
    color: var(--secondary);
    text-transform: uppercase;
    font-family: 'Syne', sans-serif;
}

.footer-contacts {
    font-size: 1.1rem;
    color: var(--secondary);
    font-weight: 800;
    line-height: 2;
}

.footer-contact-address {
    text-decoration: underline;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    color: var(--secondary);
    font-weight: 800;
}

.footer-nav a { color: var(--secondary); font-weight: 800; text-transform: uppercase; }
.footer-nav a:hover { color: var(--primary); background: var(--secondary); padding: 0.3rem 0.8rem; }

.footer-bottom {
    border-top: 4px solid var(--secondary);
    padding-top: 4rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* Pagination */
.pagi-wrap { margin: 4rem 0 6rem; }
.pagi-list { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; list-style: none; }

/* Стиль ссылок и текущей страницы (span.current) */
.pagi-list a,
.pagi-list span {
    padding: 1rem 2rem;
    background: var(--accent);
    border: 2px solid var(--white);
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    display: inline-block;
}

/* Активная страница — через span.current от paginate_links() И через li.is-active */
.pagi-list .is-active a,
.pagi-list .is-active span,
.pagi-list span.current,
.pagi-list a:hover {
    background: var(--primary);
    color: var(--secondary);
    border-color: var(--primary);
}

/* Intermediate breakpoint — tablet (промежуточный брейкпоинт обязателен) */
@media (max-width: 1024px) {
    .main-nav ul { gap: 1.5rem; }
    .main-nav a { font-size: 0.8rem; }
    .header-inner { gap: 2rem; }

    /* Посты: 2 колонки на планшете (2×4 = 8 видимых из 9) */
    .mma-grid { grid-template-columns: repeat(2, 1fr); }
    /* Фиксированная высота картинки на планшете */
    .post-card-mma .thumb { height: clamp(180px, 25vw, 260px); }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .main-nav { display: none; }
    .main-nav.is-active {
        display: block; position: absolute; top: 100%; left: 0; width: 100%;
        background: var(--secondary); padding: 2rem; border-bottom: 8px solid var(--white);
    }
    .main-nav ul { flex-direction: column; gap: 2rem; }
    
    /* Посты: 1 колонка на мобилке */
    .mma-grid { grid-template-columns: 1fr; }

    .analysis-visual { order: -1; }
    .insights-visual { order: -1; }
    
    .container { padding: 0 1.5rem; }
    .grid-header { border-left-width: 10px; padding-left: 1.5rem; }
}
