/* ==========================================================================
   RMUTL Admission Landing Popup Modal Styles
   ========================================================================== */

.landing-popup[hidden],
.landing-popup [hidden] {
    display: none !important;
}

/* Modal Backdrop with Modern Glass Blur */
.landing-popup {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(11, 18, 38, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overscroll-behavior: contain;
    animation: popupFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Dialog Box */
.landing-popup-dialog {
    display: flex;
    flex-direction: column;
    width: min(920px, 100%);
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow: hidden;
    background: var(--white, #ffffff);
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12);
    animation: popupScaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popupScaleIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(14px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Modal Header: Primary Color Gradient + Royal Gold Accent */
.landing-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 16px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-navy, #1E2B58) 0%, #15224a 100%);
    border-bottom: 3px solid var(--royal-gold, #D4AF37);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(11, 18, 38, 0.15);
    position: relative;
    z-index: 2;
}

.landing-popup-header-title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.landing-popup-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.18);
    color: var(--royal-gold, #D4AF37);
    font-size: 1.15rem;
    flex-shrink: 0;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.landing-popup-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    font-family: var(--font-heading, 'Kanit', sans-serif);
    letter-spacing: -0.2px;
    line-height: 1.3;
}

/* Modal Close Button */
.landing-popup-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.landing-popup-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
    transform: rotate(90deg) scale(1.06);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.landing-popup-close:focus-visible {
    outline: 3px solid var(--royal-gold, #D4AF37);
    outline-offset: 2px;
}

/* Images Slideshow Canvas */
.landing-popup-images {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
    align-items: center;
    justify-content: center;
    min-height: 0;
    height: 70vh;
    height: 70dvh;
    max-height: 680px;
    padding: 14px;
    background: #f8fafc;
    position: relative;
}

.landing-popup-item {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-area: 1 / 1;
    min-width: 0;
    width: 100%;
    height: 100%;
}

.landing-popup-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
}

.landing-popup-link:hover .landing-popup-image {
    transform: scale(1.008);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.12));
}

.landing-popup-image {
    display: block;
    min-width: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}

/* Modal Bottom Navigation Controls */
.landing-popup-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 16px;
    padding: 14px 24px;
    background: var(--white, #ffffff);
    border-top: 1px solid var(--slate-border, #e2e8f0);
}

.landing-popup-controls button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 22px;
    border: 1.5px solid #cbd5e1;
    border-radius: 9999px;
    background: #ffffff;
    color: var(--primary-navy, #1E2B58);
    font-family: var(--font-heading, 'Kanit', sans-serif);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.landing-popup-controls button i {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.landing-popup-controls button:hover {
    background: var(--primary-navy, #1E2B58);
    color: #ffffff;
    border-color: var(--primary-navy, #1E2B58);
    box-shadow: 0 4px 14px rgba(30, 43, 88, 0.22);
    transform: translateY(-1px);
}

.landing-popup-controls .landing-popup-prev:hover i {
    transform: translateX(-2px);
}

.landing-popup-controls .landing-popup-next:hover i {
    transform: translateX(2px);
}

.landing-popup-controls button:focus-visible {
    outline: 3px solid var(--royal-gold, #D4AF37);
    outline-offset: 2px;
}

/* Modern Counter Badge */
.landing-popup-counter {
    display: inline-flex;
    align-items: center;
    padding: 6px 18px;
    border-radius: 9999px;
    background: #f1f5f9;
    color: var(--primary-navy, #1E2B58);
    font-family: var(--font-heading, 'Kanit', sans-serif);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
}

/* Mobile & Tablet Optimizations */
@media (max-width: 576px) {
    .landing-popup {
        padding: 10px;
    }
    
    .landing-popup-dialog {
        border-radius: 16px;
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }
    
    .landing-popup-header {
        padding: 12px 16px;
        gap: 10px;
    }
    
    .landing-popup-header-title {
        gap: 10px;
    }
    
    .landing-popup-header h2 {
        font-size: 1.05rem;
    }
    
    .landing-popup-header-icon {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
        border-radius: 8px;
    }
    
    .landing-popup-close {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .landing-popup-images {
        padding: 8px;
        height: 62vh;
        height: 62dvh;
    }
    
    .landing-popup-controls {
        padding: 10px 14px;
        gap: 8px;
    }
    
    .landing-popup-controls button {
        padding: 6px 14px;
        font-size: 0.85rem;
        min-height: 36px;
        gap: 6px;
    }
    
    .landing-popup-counter {
        padding: 4px 12px;
        font-size: 0.82rem;
    }
}
