/* ═══════════════════════════════════════════════
   Evergreen IPTV — Main Theme Stylesheet
   Palette: SunsetFire | Fonts: Outfit + Plus Jakarta Sans
   ═══════════════════════════════════════════════ */

/* === CSS CUSTOM PROPERTIES === */
:root {
    --iptv-bg: #18120B;
    --iptv-surface: #27200F;
    --iptv-card: #352D14;
    --iptv-primary: #F59E0B;
    --iptv-cta-start: #D97706;
    --iptv-cta-end: #DC2626;
    --iptv-text: #FEF3C7;
    --iptv-font-heading: 'Outfit', sans-serif;
    --iptv-font-body: 'Plus Jakarta Sans', sans-serif;
    --iptv-radius: 16px;
    --iptv-transition: 0.3s ease;
}

/* === FULL-WIDTH RESETS === */
.iptv-theme .site-content,
.iptv-theme .entry-content,
.iptv-theme .page-content,
.iptv-theme main {
    width: 100%;
    max-width: 100vw;
    padding: 0;
    margin: 0;
}

.iptv-theme .alignfull {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* === RESPONSIVE IMAGES === */
img {
    max-width: 100%;
    height: auto;
}

/* === STICKY HEADER === */
#iptv-header {
    transition: background var(--iptv-transition), box-shadow var(--iptv-transition);
}

#iptv-header.header-scrolled {
    background: rgba(24, 18, 11, 0.97) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* === NAV LINKS HOVER === */
.iptv-nav-link:hover {
    opacity: 1 !important;
    color: var(--iptv-primary) !important;
}

.iptv-footer-link:hover {
    opacity: 1 !important;
    color: var(--iptv-primary) !important;
}

/* === CTA BUTTON HOVER === */
.iptv-cta-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px rgba(217, 119, 6, 0.5) !important;
}

.iptv-cta-btn:active {
    transform: translateY(0) scale(1);
}

/* === CARD HOVER === */
.iptv-card:hover {
    transform: translateY(-6px);
    box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.45), -6px -6px 14px rgba(255, 255, 255, 0.06) !important;
}

/* === FADE-IN ANIMATION === */
@keyframes iptvFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].iptv-visible {
    opacity: 1;
    transform: translateY(0);
}

/* === FAQ ACCORDION === */
.iptv-faq-item {
    transition: box-shadow var(--iptv-transition);
}

.iptv-faq-item:hover {
    box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.45), -6px -6px 14px rgba(255, 255, 255, 0.06);
}

.iptv-faq-question:hover span:first-child {
    color: var(--iptv-primary);
}

.iptv-faq-item.active .iptv-faq-question span:last-child {
    transform: rotate(45deg);
}

.iptv-faq-answer {
    transition: max-height 0.4s ease;
}

/* === WHATSAPP FLOAT BUTTON === */
#iptv-wa-float:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

@keyframes iptvWaPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7); }
}

#iptv-wa-float {
    animation: iptvWaPulse 2s ease-in-out infinite;
}

/* === COUNTDOWN TIMER === */
.iptv-countdown {
    letter-spacing: 2px;
}

/* === POPUP OVERLAY === */
.iptv-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: iptvFadeIn 0.3s ease;
}

.iptv-popup-box {
    background: var(--iptv-card);
    border-radius: 20px;
    padding: 40px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.iptv-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--iptv-text);
    font-size: 24px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--iptv-transition);
}

.iptv-popup-close:hover {
    opacity: 1;
}

/* === SOCIAL PROOF === */
.iptv-social-proof {
    animation: iptvFadeIn 0.5s ease;
}

/* === SAVINGS CALCULATOR === */
.iptv-calc-checkbox:checked + span {
    color: var(--iptv-primary);
}

/* === BLOG GRID — 3 Column === */
.iptv-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* === PAGINATION === */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nav-links a,
.nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 50px;
    font-family: var(--iptv-font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--iptv-text);
    background: var(--iptv-card);
    text-decoration: none;
    transition: all var(--iptv-transition);
}

.nav-links a:hover {
    background: var(--iptv-primary);
    color: #18120B;
}

.nav-links .current {
    background: var(--iptv-primary);
    color: #18120B;
    font-weight: 700;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--iptv-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--iptv-card);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--iptv-primary);
}

/* === SELECTION === */
::selection {
    background: var(--iptv-primary);
    color: #18120B;
}

/* === TABLES IN CONTENT === */
table {
    border-collapse: collapse;
    width: 100%;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════ */

/* TABLET */
@media (max-width: 1024px) {
    .iptv-blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Header mobile nav */
    #iptv-nav-desktop {
        display: none !important;
    }

    #iptv-hamburger {
        display: flex !important;
    }

    #iptv-nav-mobile.active {
        display: block !important;
    }

    /* Blog grid */
    .iptv-blog-grid {
        grid-template-columns: 1fr;
    }

    /* Generic grid overrides */
    [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    [style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns:repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    [style*="grid-template-columns:repeat(3"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns: 1fr 1fr;"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns:1fr 1fr;"] {
        grid-template-columns: 1fr !important;
    }

    /* Footer */
    footer [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Reduce padding */
    section {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Table scroll */
    table {
        display: block;
        overflow-x: auto;
    }
}

/* MOBILE */
@media (max-width: 480px) {
    [style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns:repeat(2"] {
        grid-template-columns: 1fr !important;
    }

    footer [style*="grid-template-columns: repeat("] {
        grid-template-columns: 1fr !important;
    }

    /* CTA buttons full width */
    .iptv-cta-btn {
        width: 100%;
        text-align: center;
    }

    /* Smaller section padding */
    section {
        padding-top: 50px !important;
        padding-bottom: 50px !important;
    }

    /* FAQ spacing */
    .iptv-faq-question {
        padding: 16px !important;
    }

    /* Popup */
    .iptv-popup-box {
        padding: 28px 20px;
        margin: 16px;
    }
}

/* === PRINT === */
@media print {
    #iptv-header,
    #iptv-wa-float,
    .iptv-popup-overlay,
    footer {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }
}
