/* ============================================================
   GNIA Strategic Pop-ups — Styles
   System: Modal (Desktop) + Sticky Bar (Mobile)
   Design: Hero Image + Glassmorphism + Gold Accents
   ============================================================ */

/* --- Overlay --- */
.gnia-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.gnia-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- Modal Container --- */
.gnia-popup-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    z-index: 10001;
    width: 90%;
    max-width: 480px;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 22px;
    box-shadow:
        0 0 60px rgba(255, 215, 0, 0.08),
        0 25px 80px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    overflow: hidden;
    padding: 0;
}

.gnia-popup-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* ── Hero Image Container ─────────────────────────────────── */
.gnia-popup-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.gnia-popup-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
}

/* Gradient fade from image → modal bg */
.gnia-popup-image-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(15, 23, 42, 0.4) 30%,
        rgba(15, 23, 42, 0.85) 65%,
        rgba(15, 23, 42, 0.97) 100%
    );
    pointer-events: none;
}

/* Subtle gold shimmer on top edge of image */
.gnia-popup-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.5), transparent);
    z-index: 2;
}

/* ── Modal Body (text + actions) ──────────────────────────── */
.gnia-popup-body {
    padding: 20px 36px 36px;
    position: relative;
    z-index: 1;
}

/* --- Close Button --- */
.gnia-popup-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    line-height: 1;
    padding: 0;
}

.gnia-popup-close:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    color: #FFD700;
    transform: rotate(90deg);
}

/* --- Modal Content --- */
.gnia-popup-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #B8860B 0%, #FFD700 20%, #FFF9AA 45%, #FFD700 70%, #B8860B 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 14px;
    line-height: 1.3;
}

.gnia-popup-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.65;
    margin: 0 auto 26px;
    font-weight: 400;
    max-width: 400px;
}

/* --- CTA Button (Gold Gradient) --- */
.gnia-popup-cta {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, #B8860B 0%, #FFD700 20%, #FFF9AA 45%, #FFD700 70%, #B8860B 100%);
    color: #0F172A;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.gnia-popup-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(255, 215, 0, 0.5);
    color: #000;
}

/* Secondary link (dismiss) */
.gnia-popup-dismiss {
    display: block;
    margin-top: 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    background: none;
    border: none;
    text-decoration: none;
    transition: color 0.3s ease;
    width: 100%;
}

.gnia-popup-dismiss:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   STICKY BAR (Mobile)
   Max 60px height — Google Interstitial compliant
   ============================================================ */
.gnia-sticky-bar {
    display: none; /* Hidden by default, JS activates on mobile */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.97);
    border-top: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
    padding: 10px 16px;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 60px;
    box-sizing: border-box;
}

.gnia-sticky-bar.active {
    transform: translateY(0);
}

.gnia-sticky-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.gnia-sticky-bar-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gnia-sticky-bar-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    background: linear-gradient(135deg, #B8860B, #FFD700, #FFF9AA, #FFD700, #B8860B);
    color: #0F172A;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.25);
    flex-shrink: 0;
}

.gnia-sticky-bar-cta:hover {
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.45);
    color: #000;
}

.gnia-sticky-bar-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
}

.gnia-sticky-bar-close:hover {
    border-color: rgba(255, 215, 0, 0.4);
    color: #FFD700;
}

/* ============================================================
   RESPONSIVE: Mobile Adjustments
   ============================================================ */
@media (max-width: 768px) {
    /* Hide modal on mobile — use sticky bar instead */
    .gnia-popup-overlay,
    .gnia-popup-modal {
        display: none !important;
    }

    /* Show sticky bar infrastructure on mobile */
    .gnia-sticky-bar {
        display: block;
    }
}

@media (min-width: 769px) {
    /* Never show sticky bar on desktop */
    .gnia-sticky-bar {
        display: none !important;
    }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes gniaPopupPulse {
    0%, 100% { box-shadow: 0 0 60px rgba(255, 215, 0, 0.08), 0 25px 80px rgba(0, 0, 0, 0.6); }
    50% { box-shadow: 0 0 80px rgba(255, 215, 0, 0.15), 0 25px 80px rgba(0, 0, 0, 0.6); }
}

.gnia-popup-modal.active {
    animation: gniaPopupPulse 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

