/*
 * GetIPTV Access — Additional CSS
 * Animations, hover effects, and supplementary styles
 *
 * @package getiptvaccess
 */

/* ============================================================
   FADE-IN SCROLL ANIMATION
   ============================================================ */

.fade-in-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0s;    opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s;  opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.2s;  opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.3s;  opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.4s;  opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.5s;  opacity: 1; transform: translateY(0); }

/* ============================================================
   CHANNEL CARD HOVER EFFECTS
   ============================================================ */

.channel-card {
    cursor: default;
}

.channel-card:hover .channel-card__icon {
    transform: scale(1.15) rotate(-3deg);
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.channel-card__icon {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Shimmer effect on channel card hover */
.channel-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 68, 68, 0.04) 50%,
        transparent 60%
    );
    transition: left 0.6s ease;
    pointer-events: none;
}

.channel-card:hover::after {
    left: 140%;
}

/* ============================================================
   PRICING CARD HOVER LIFT
   ============================================================ */

.pricing-card {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    will-change: transform;
}

.pricing-card:hover:not(.pricing-card--featured) {
    transform: translateY(-10px) scale(1.01);
}

.pricing-card--featured:hover {
    transform: scale(1.04) translateY(-10px);
}

/* Glow on featured card */
.pricing-card--featured {
    box-shadow: 0 0 40px rgba(255, 68, 68, 0.15);
}

.pricing-card--featured:hover {
    box-shadow: 0 12px 60px rgba(255, 68, 68, 0.3);
}

/* ============================================================
   BUTTON HOVER STATES
   ============================================================ */

.btn {
    position: relative;
    overflow: hidden;
}

/* Ripple effect on primary buttons */
.btn--primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
}

.btn--primary:active::after {
    width: 300px;
    height: 300px;
    opacity: 1;
    transition: 0s;
}

/* Shine sweep on primary button hover */
.btn--primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.12) 50%,
        transparent 60%
    );
    transition: left 0.5s ease;
    pointer-events: none;
}

.btn--primary:hover::before {
    left: 140%;
}

/* ============================================================
   MOBILE MENU ANIMATION
   ============================================================ */

.mobile-menu {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    transform-origin: top center;
}

.mobile-menu.open {
    animation: mobile-menu-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes mobile-menu-in {
    from {
        transform: translateY(-8px) scaleY(0.97);
        opacity: 0;
    }
    to {
        transform: translateY(0) scaleY(1);
        opacity: 1;
    }
}

/* Mobile menu link stagger */
.mobile-menu.open li {
    animation: menu-item-in 0.3s ease forwards;
    opacity: 0;
}

.mobile-menu.open li:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu.open li:nth-child(2) { animation-delay: 0.1s; }
.mobile-menu.open li:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu.open li:nth-child(4) { animation-delay: 0.2s; }
.mobile-menu.open li:nth-child(5) { animation-delay: 0.25s; }
.mobile-menu.open li:nth-child(6) { animation-delay: 0.3s; }

@keyframes menu-item-in {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */

.spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 68, 68, 0.2);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner--sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner--lg {
    width: 56px;
    height: 56px;
    border-width: 4px;
}

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

/* Page loading overlay */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: opacity 0.4s ease;
}

.page-loader.loaded {
    opacity: 0;
    pointer-events: none;
}

/* ============================================================
   TRUST BADGE STYLES
   ============================================================ */

.trust-badges-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 0;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.trust-badge:hover {
    border-color: rgba(255, 68, 68, 0.3);
    background: rgba(255, 68, 68, 0.06);
    color: var(--text-secondary);
}

.trust-badge__icon {
    font-size: 0.875rem;
}

/* ============================================================
   NOTIFICATION TOAST
   ============================================================ */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-red);
    border-radius: var(--border-radius-sm);
    padding: 14px 18px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 320px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 9000;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    transform: translateX(0);
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */

.scroll-progress {
    position: fixed;
    top: 70px; /* below header */
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-red), #ff8888);
    z-index: 999;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ============================================================
   IMAGE LAZY LOAD FADE
   ============================================================ */

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.4s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ============================================================
   SEARCH FORM
   ============================================================ */

.search-form {
    display: flex;
    gap: 0;
    max-width: 480px;
    margin: 0 auto;
}

.search-form input[type="search"] {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: var(--font-stack);
    outline: none;
    transition: border-color 0.25s ease;
}

.search-form input[type="search"]:focus {
    border-color: var(--accent-red);
}

.search-form input[type="search"]::placeholder {
    color: var(--text-muted);
}

.search-form button[type="submit"] {
    background: var(--accent-red);
    border: 1px solid var(--accent-red);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    padding: 12px 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-stack);
    font-size: 0.9375rem;
    transition: background 0.25s ease;
}

.search-form button[type="submit"]:hover {
    background: var(--accent-red-hover);
}

/* ============================================================
   WIDGET STYLES
   ============================================================ */

.widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 24px;
    margin-bottom: 24px;
}

.widget__title {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.widget ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.widget ul li a {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.25s ease;
}

.widget ul li a:hover {
    color: var(--text-primary);
}

/* ============================================================
   CODE & PRE BLOCKS (for technical blog posts)
   ============================================================ */

.post-content code {
    background: rgba(255, 68, 68, 0.08);
    border: 1px solid rgba(255, 68, 68, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
    font-size: 0.875em;
    color: #ff9999;
}

.post-content pre {
    background: #0d0d0d;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 20px 24px;
    overflow-x: auto;
    margin: 24px 0;
}

.post-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.875rem;
    color: #e0e0e0;
    line-height: 1.7;
}

/* ============================================================
   SKIP LINK (accessibility)
   ============================================================ */

.skip-link:focus-visible {
    outline: 3px solid var(--accent-red);
    outline-offset: 2px;
}

/* ============================================================
   FOCUS STYLES (global accessibility)
   ============================================================ */

*:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ============================================================
   LIVE BADGE PULSE
   ============================================================ */

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent-red);
    padding: 3px 10px;
    border-radius: 12px;
}

.live-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.7);
    }
}

/* ============================================================
   COUNTER ANIMATION NUMBERS
   ============================================================ */

.stat-number {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--accent-red);
    line-height: 1;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   NOTIFICATION BAR (top of page, optional)
   ============================================================ */

.notification-bar {
    background: var(--accent-red);
    color: #fff;
    text-align: center;
    padding: 10px 24px;
    font-size: 0.875rem;
    font-weight: 600;
    position: relative;
}

.notification-bar a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.notification-bar__close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-bar__close:hover {
    opacity: 1;
}

/* ============================================================
   RESPONSIVE ADDITIONS
   ============================================================ */

@media (max-width: 768px) {
    .toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
}
