/*
 * IPTVPro — Main CSS
 * Supplement to style.css: component enhancements, WooCommerce overrides,
 * pricing page, FAQ accordion, installation tabs, and utility animations.
 *
 * @package IPTVPro
 * @version 1.0.0
 */

/* ============================================================
   WOOCOMMERCE BASE OVERRIDES
   ============================================================ */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    background: var(--bg-card);
    border-left-color: var(--accent-orange);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.woocommerce-error {
    border-left-color: #ff4444;
}

.woocommerce-info {
    border-left-color: #2196f3;
}

/* WooCommerce notices */
.woocommerce-notices-wrapper {
    max-width: 1200px;
    margin: 100px auto 0;
    padding: 0 24px;
}

/* WooCommerce product loop */
.woocommerce ul.products li.product {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.woocommerce ul.products li.product:hover {
    border-color: rgba(255, 94, 0, 0.3);
    transform: translateY(-2px);
}

.woocommerce ul.products li.product .price {
    color: var(--accent-orange);
    font-size: 1.2rem;
    font-weight: 700;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background: var(--accent-gradient) !important;
    color: #fff !important;
    border-radius: var(--radius-md) !important;
    border: none !important;
    font-family: var(--font-primary) !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    transition: var(--transition) !important;
    cursor: pointer !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover {
    background: var(--accent-gradient-hover) !important;
    transform: translateY(-1px) !important;
}

/* ============================================================
   HEADER SCROLL EFFECT
   ============================================================ */
#site-header {
    background: transparent;
}

#site-header.scrolled {
    background: rgba(12, 10, 18, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ============================================================
   HERO SECTION ENHANCEMENTS
   ============================================================ */

/* Floating particles / orbs (decorative) */
.hero-section::before,
.hero-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.hero-section::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 94, 0, 0.06) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.hero-section::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 140, 0, 0.05) 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* ============================================================
   PRICING CARDS — ENHANCED
   ============================================================ */

/* Shine effect on featured card */
.pricing-card.featured::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent-orange), transparent, var(--accent-light));
    z-index: -1;
    opacity: 0.3;
}

/* Animated gradient border on hover */
@keyframes gradient-border {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Subscribe button loading state */
.subscribe-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.subscribe-btn.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */

.faq-item .faq-question {
    -webkit-user-select: none;
    user-select: none;
}

/* ============================================================
   TESTIMONIALS — SCROLLING MARQUEE (optional)
   ============================================================ */
.testimonials-marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.testimonials-track {
    display: flex;
    gap: 24px;
    animation: marquee 40s linear infinite;
    width: max-content;
}

.testimonials-track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ============================================================
   CHANNEL LOGOS — HOVER GLOW
   ============================================================ */
.channel-logo:hover {
    box-shadow: 0 0 20px rgba(255, 94, 0, 0.2);
}

/* ============================================================
   PAGE TRANSITIONS (fade in on load)
   ============================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header,
.feature-card,
.pricing-card,
.testimonial-card {
    animation: fadeInUp 0.6s ease both;
}

/* Stagger children */
.feature-card:nth-child(1)  { animation-delay: 0.05s; }
.feature-card:nth-child(2)  { animation-delay: 0.10s; }
.feature-card:nth-child(3)  { animation-delay: 0.15s; }
.feature-card:nth-child(4)  { animation-delay: 0.20s; }
.feature-card:nth-child(5)  { animation-delay: 0.25s; }
.feature-card:nth-child(6)  { animation-delay: 0.30s; }
.feature-card:nth-child(7)  { animation-delay: 0.35s; }
.feature-card:nth-child(8)  { animation-delay: 0.40s; }

.pricing-card:nth-child(1)  { animation-delay: 0.05s; }
.pricing-card:nth-child(2)  { animation-delay: 0.12s; }
.pricing-card:nth-child(3)  { animation-delay: 0.19s; }
.pricing-card:nth-child(4)  { animation-delay: 0.26s; }

/* ============================================================
   PHONE INPUT WRAPPER
   ============================================================ */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.phone-input-wrapper:focus-within {
    border-color: var(--accent-orange);
    background: rgba(255, 94, 0, 0.04);
    box-shadow: 0 0 0 3px rgba(255, 94, 0, 0.1);
}

.phone-dial-prefix {
    padding: 14px 14px;
    color: var(--accent-orange);
    font-weight: 700;
    font-size: 0.9rem;
    background: rgba(255, 94, 0, 0.08);
    border-right: 1px solid var(--border-subtle);
    white-space: nowrap;
    min-width: 52px;
    text-align: center;
}

.phone-field {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    flex: 1;
}

/* ============================================================
   BLOG CARDS
   ============================================================ */
.blog-card {
    transition: var(--transition);
}

.blog-card:hover {
    border-color: rgba(255, 94, 0, 0.3);
    transform: translateY(-3px);
}

.blog-card__title a:hover {
    color: var(--accent-orange) !important;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.woocommerce-breadcrumb {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 100px 0 0;
}

.woocommerce-breadcrumb a {
    color: var(--text-muted);
}

.woocommerce-breadcrumb a:hover {
    color: var(--accent-orange);
}

/* ============================================================
   LOADING SPINNER UTILITY
   ============================================================ */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================================
   NOTIFICATION TOAST
   ============================================================ */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-left: 4px solid var(--accent-orange);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 9999;
    max-width: 320px;
    font-size: 0.9rem;
    animation: slideInRight 0.3s ease both;
}

.toast-notification.success {
    border-left-color: var(--green);
}

.toast-notification.error {
    border-left-color: #ff4444;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

/* ============================================================
   NAV ACTIVE STATES (set by JS)
   ============================================================ */
.primary-nav a.active {
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

/* ============================================================
   STICKY CTA BAR (mobile)
   ============================================================ */
.sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    padding: 12px 16px;
    background: rgba(12, 10, 18, 0.96);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
}

@media (max-width: 768px) {
    .sticky-cta { display: block; }
}

/* ============================================================
   SECTION DIVIDERS
   ============================================================ */
.section-wave {
    position: relative;
    overflow: hidden;
}

.section-wave::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-primary);
    clip-path: ellipse(55% 100% at 50% 100%);
}

/* ============================================================
   BACK-TO-TOP BUTTON
   ============================================================ */
#back-to-top {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(255, 94, 0, 0.3);
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 94, 0, 0.45);
}

/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */
@media (max-width: 768px) {
    .pricing-grid { grid-template-columns: 1fr !important; }
    .hero-stats   { display: grid; grid-template-columns: 1fr 1fr; }
    .hero-divider { display: none; }
}
