/*
Theme Name: Free Ahmad Mammadli
Theme URI: https://freeahmadmammadli.info
Author: Ahmad Mammadli Campaign
Description: Advocacy theme for the Free Ahmad Mammadli campaign. Single-page layout with bilingual (EN/AZ) support, live imprisonment counter, timeline, statements, and press coverage sections.
Version: 1.1.3
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ahmad-mammadli
*/

/* ── FONTS ── */
/* Bebas Neue AZ — custom build with Azerbaijani character support (Ə, ə, İ, etc.) */
@font-face {
    font-family: 'Bebas Neue AZ';
    src: url('./fonts/BebasNeue-Thin.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Bebas Neue AZ';
    src: url('./fonts/BebasNeue-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Bebas Neue AZ';
    src: url('./fonts/BebasNeue-Book.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Bebas Neue AZ';
    src: url('./fonts/BebasNeue-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ── RESET ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


:root {
    --font-bebas: 'Bebas Neue', sans-serif;
    --bg: #080808;
    --bg2: #111111;
    --bg3: #181818;
    --red: #e63946;
    --red-dim: #a82830;
    --white: #f5f4f2;
    --muted: #888;
    --border: rgba(255, 255, 255, 0.08);
}

html[lang^="az"] {
    --font-bebas: 'Bebas Neue AZ', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── NAV ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 60px;
    background: rgba(8, 8, 8, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: var(--font-bebas);
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--white);
    text-decoration: none;
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.lang-toggle {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.lang-btn {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    background: transparent;
    color: var(--muted);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn.active {
    background: var(--red);
    color: #fff;
}

.nav-socials {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-social {
    color: var(--muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.nav-social:hover {
    color: var(--red);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 4px;
}

/* ── HERO ── */
#hero {
    min-height: 100vh;
    padding-top: 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    overflow: hidden;
}

.hero-photo-side {
    position: relative;
    overflow: hidden;
}

.hero-photo-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(60%) contrast(1.1);
    display: block;
}

.hero-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 50%, var(--bg) 100%),
        linear-gradient(to top, var(--bg) 0%, transparent 30%);
}

.hero-photo-bars {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 48px,
            rgba(230, 57, 70, 0.07) 48px,
            rgba(230, 57, 70, 0.07) 50px);
    pointer-events: none;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 60px 60px 40px;
    position: relative;
}

.hero-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--red);
    text-transform: uppercase;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-tag::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--red);
}

.hero-name {
    font-family: var(--font-bebas);
    font-size: clamp(52px, 6vw, 88px);
    line-height: 1;
    letter-spacing: 2px;
    color: var(--white);
    margin-bottom: 8px;
}

.hero-name-az {
    font-size: clamp(18px, 2vw, 26px);
    font-weight: 300;
    color: var(--muted);
    margin-bottom: 32px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
}

.hero-desc {
    font-size: 15px;
    font-weight: 400;
    color: #bbb;
    max-width: 420px;
    line-height: 1.7;
    margin-bottom: 40px;
    border-left: 3px solid var(--red);
    padding-left: 18px;
}

/* Counter */
.counter-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.counter {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.counter-unit {
    text-align: center;
    min-width: 72px;
}

.counter-num {
    font-family: var(--font-bebas);
    font-size: 52px;
    line-height: 1;
    color: var(--red);
    display: block;
}

.counter-unit-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--muted);
    text-transform: uppercase;
    margin-top: 4px;
}

.counter-sep {
    font-family: var(--font-bebas);
    font-size: 48px;
    color: var(--border);
    align-self: flex-start;
    margin-top: 2px;
}

/* CTA Buttons */
.hero-ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--red);
    color: #fff;
}

.btn-primary:hover {
    background: #c62d39;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--red);
    color: var(--red);
}

/* Hashtag floater */
.hashtag {
    position: absolute;
    bottom: 32px;
    right: 40px;
    font-family: var(--font-bebas);
    font-size: 18px;
    letter-spacing: 3px;
    color: rgba(230, 57, 70, 0.3);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    pointer-events: none;
    user-select: none;
}

/* ── SECTION BASE ── */
section {
    padding: 96px 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--red);
    text-transform: uppercase;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-eyebrow::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    max-width: 60px;
}

.section-title {
    font-family: var(--font-bebas);
    font-size: clamp(36px, 5vw, 56px);
    letter-spacing: 2px;
    line-height: 1;
    margin-bottom: 48px;
}

/* ── STORY ── */
#story {
    background: var(--bg2);
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.story-text p {
    color: #bbb;
    line-height: 1.8;
    margin-bottom: 18px;
    font-size: 15px;
}

.story-text p:last-child {
    margin-bottom: 0;
}

.story-stats {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.stat-item {
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
}

.stat-item:first-child {
    border-top: 1px solid var(--border);
}

.stat-num {
    font-family: var(--font-bebas);
    font-size: 48px;
    color: var(--red);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-desc {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ── TIMELINE ── */
#timeline {
    background: var(--bg);
}

.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--red) 10%, var(--red) 90%, transparent);
}

.tl-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 40px;
    padding: 0 0 56px 0;
    position: relative;
}

.tl-item:last-child {
    padding-bottom: 0;
}

.tl-dot {
    position: absolute;
    left: -6px;
    top: 6px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--red);
    border: 2px solid var(--bg);
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.2);
}

.tl-date {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--red);
    text-transform: uppercase;
    padding-top: 2px;
    padding-left: 32px;
    line-height: 1.4;
}

.tl-content {
    padding-left: 0;
}

.tl-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
    line-height: 1.3;
}

.tl-body {
    font-size: 14px;
    color: #999;
    line-height: 1.7;
}

.tl-badge {
    display: inline-block;
    margin-top: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 2px;
}

.tl-badge.red {
    background: rgba(230, 57, 70, 0.15);
    color: var(--red);
    border: 1px solid rgba(230, 57, 70, 0.3);
}

.tl-badge.gray {
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    border: 1px solid var(--border);
}

/* ── STATEMENTS ── */
#statements {
    background: var(--bg2);
}

.statements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.statement-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-top: 3px solid var(--red);
    padding: 32px;
    border-radius: 2px;
}

.statement-org {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--red);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.statement-quote {
    font-size: 15px;
    font-style: italic;
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 16px;
}

.statement-source {
    font-size: 12px;
    color: var(--muted);
}

/* ── TEXTS SLIDER ── */
#texts {
    background: var(--bg);
}

.texts-slider-wrap {
    position: relative;
}

.texts-slider {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    min-height: 280px;
}

.text-slide {
    grid-area: 1 / 1;
    opacity: 0;
    pointer-events: none;
    transform: translateX(40px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.text-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.text-slide.slide-out-left {
    opacity: 0;
    transform: translateX(-40px);
}

.text-slide.slide-out-right {
    opacity: 0;
    transform: translateX(40px);
}

.text-slide-card {
    max-width: 720px;
}

.text-excerpt {
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    margin-bottom: 16px;
    padding: 0;
    background: none;
    border: none;
    color: var(--red);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-transform: uppercase;
    transition: opacity 0.2s;
}

.text-read-more-btn:hover {
    opacity: 0.75;
}

/* Slider navigation */
.texts-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 32px;
}

.texts-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.texts-nav-btn:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.texts-nav-btn:disabled {
    opacity: 0.3;
    pointer-events: none;
}

.texts-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    max-width: 320px;
    row-gap: 8px;
}

.texts-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: 1px solid var(--muted);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
    flex-shrink: 0;
}

.texts-dot.active {
    background: var(--red);
    border-color: var(--red);
    transform: scale(1.25);
}

/* ── TEXT FULL MODAL ── */
.text-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.text-modal-overlay.visible {
    display: flex;
}

.text-modal-overlay.open {
    opacity: 1;
}

.text-modal-box {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-top: 3px solid var(--red);
    border-radius: 4px;
    padding: 48px;
    max-width: 680px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.25s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--red-dim) transparent;
}

.text-modal-overlay.open .text-modal-box {
    transform: translateY(0);
}

.text-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.text-modal-close:hover {
    color: var(--red);
}

.text-modal-org {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--red);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.text-modal-source {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 28px;
}

.text-modal-body {
    font-size: 15px;
    color: #ccc;
    line-height: 1.8;
}

.text-modal-body p {
    margin-bottom: 18px;
}

.text-modal-body p:last-child {
    margin-bottom: 0;
}

/* ── NEWS ── */
#news {
    background: var(--bg);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 32px;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--white);
    transition: all 0.2s;
}

.news-item:first-child {
    border-top: 1px solid var(--border);
}

.news-item:hover {
    background: rgba(230, 57, 70, 0.04);
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
}

.news-date {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 1px;
}

.news-title {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.news-source {
    font-size: 11px;
    color: var(--red);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.news-arrow {
    color: var(--muted);
    font-size: 18px;
}

/* ── SHARE ── */
#share {
    background: var(--red);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#share::before {
    content: '#FREEAHMADMAMMADLI';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    font-family: var(--font-bebas);
    font-size: 120px;
    color: rgba(0, 0, 0, 0.12);
    letter-spacing: 4px;
    white-space: nowrap;
    pointer-events: none;
}

#share .section-title {
    color: #fff;
    margin-bottom: 16px;
}

#share p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    font-size: 16px;
}

.share-btns {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 3px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.share-btn.fb {
    background: #1877f2;
    color: #fff;
}

.share-btn.fb:hover {
    background: #1460c8;
}

.share-btn.tw {
    background: #000;
    color: #fff;
}

.share-btn.tw:hover {
    background: #222;
}

.share-btn.tk {
    background: #fff;
    color: #000;
}

.share-btn.tk:hover {
    background: #eee;
}

.share-btn.copy {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.share-btn.copy:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ── FOOTER ── */
footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-logo {
    font-family: var(--font-bebas);
    font-size: 20px;
    letter-spacing: 2px;
}

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

footer p {
    font-size: 13px;
    color: var(--muted);
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.footer-social {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-social:hover {
    color: var(--red);
}

/* ── LANG SWITCHER (Polylang <a> links styled as buttons) ── */
.lang-toggle a.lang-btn {
    text-decoration: none;
    display: inline-block;
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
    nav {
        padding: 0 20px;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-right {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(8, 8, 8, 0.98);
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 20px;
        border-bottom: 1px solid var(--border);
    }

    body.menu-open .nav-right {
        display: flex;
    }

    .lang-toggle {
        margin-bottom: 24px;
    }

    #hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-photo-side {
        height: 50vw;
        max-height: 340px;
    }

    .hero-photo-side img {
        object-position: center 25%;
    }

    .hero-content {
        padding: 40px 24px;
    }

    .story-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .tl-item {
        grid-template-columns: 80px 1fr;
        gap: 20px;
    }

    .tl-date {
        font-size: 10px;
    }

    .news-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .news-arrow {
        display: none;
    }

    footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .text-modal-box {
        padding: 32px;
    }
}

@media (max-width: 560px) {
    .container {
        padding: 0 20px;
    }

    section {
        padding: 64px 0;
    }

    .hero-name {
        font-size: 52px;
    }

    .counter-num {
        font-size: 40px;
    }

    .counter-unit {
        min-width: 56px;
    }

    .nav-logo {
        font-size: 18px;
    }

    .text-modal-overlay {
        padding: 12px;
        align-items: flex-end;
    }

    .text-modal-box {
        padding: 48px 20px 24px;
        max-height: calc(100dvh - 24px);
        border-radius: 8px 8px 4px 4px;
        width: 100%;
        max-width: 100%;
    }

    .text-modal-close {
        top: 12px;
        right: 12px;
    }
}

/* WordPress admin bar offset */
.admin-bar nav {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar nav {
        top: 46px;
    }
}