:root {
    --primary-blue: #05274C;
    --primary-gold: #B09675;
    --text-dark: #1A202C;
    --text-muted: #4A5568;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(176, 150, 117, 0.4);
    --glass-hover: rgba(255, 255, 255, 0.95);
    --bg-ivory: #FDFCF8;
    /* ivory */
}

* {
    box-sizing: border-box;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-ivory);
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-weight: 300;
}

body.modal-open {
    overflow: hidden;
    overscroll-behavior: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 400;
}

/* Dynamic Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: radial-gradient(circle at 20% 40%, rgba(176, 150, 117, 0.15), transparent 50%),
        radial-gradient(circle at 80% 60%, rgba(5, 39, 76, 0.08), transparent 50%);
    background-color: var(--bg-ivory);
    animation: bgPulse 20s ease-in-out infinite alternate;
}

.watermark-bg {
    position: fixed;
    top: -5%;
    right: -10vw;
    width: 80vw;
    max-width: 900px;
    opacity: 0.04;
    z-index: -1;
    pointer-events: none;
    transform: rotate(15deg);
}

@keyframes bgPulse {
    0% {
        background-position: 0% 50%;
        opacity: 0.7;
    }

    100% {
        background-position: 100% 50%;
        opacity: 1;
    }
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
    /* Lighter shadow for light mode */
}

/* Buttons */
.btn-leaf {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-gold);
    color: var(--primary-blue);
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    font-weight: 400;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(176, 150, 117, 0.3);
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    background-color: #cca474;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(176, 150, 117, 0.5);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-blue);
    padding: 12px 24px;
    border: 2px solid var(--primary-blue);
    border-radius: 30px;
    font-weight: 400;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: rgba(5, 39, 76, 0.05);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* Top Frame (Branding Cabecera Institucional) */
.top-frame {
    position: relative;
    display: flex;
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    background-color: #05274C;
    padding: 20px;
    flex-wrap: wrap;
    gap: 20px;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.name-canvas {
    width: auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    color: white;
}

.main-logo {
    width: 60px;
    height: 60px;
    margin-right: 20px;
    background-color: #B09675;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;   
}

.main-logo img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.title {
    font-size: 34px;
    color: white;
    font-family: 'Times New Roman', Times, serif;
    font-weight: 400;
}

.sub-title {
    font-size: 18px;
    color: #B09675;
    font-weight: 300;
}

.slogan {
    font-size: 20px;
    color: #B09675;
    font-weight: 300;
    text-align: center;
}

.slogan p {
    margin: 0;
    padding: 0;
}

.slogan span {
    font-weight: 700;
}

.spacer {
    width: 2px;
    height: 60px;
    background-color: #B09675;
    margin-right: 20px;
}

/* Animations utility preserved */
.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 768px) {
    .slogan {
        display: none;
    }
    .title {
        font-size: 28px;
    }
    .sub-title {
        font-size: 14px;
    }
}

/* Services Section */
.services-section {
    padding: 6rem 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    margin: 0;
    color: var(--primary-blue);
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto 30px;
}

.divider::before, .divider::after {
    content: '';
    display: block;
    height: 1px;
    width: 60px;
    background-color: var(--primary-gold);
    opacity: 0.5;
}

.divider-icon {
    width: 24px;
    height: 24px;
    margin: 0 20px;
    opacity: 0.8;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.4s ease, background 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    background: var(--glass-hover);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(176, 150, 117, 0.3);
    border-radius: 50%;
    background-color: rgba(176, 150, 117, 0.05);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    border-color: var(--primary-gold);
    transform: scale(1.05);
}

.service-icon img {
    width: 40px;
    height: 40px;
    opacity: 0.9;
}

.service-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--primary-gold);
    margin-bottom: 0.8rem;
}

.service-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Portal Teaser */
.portal-teaser {
    padding: 4rem 5%;
    display: flex;
    justify-content: center;
}

.portal-content {
    max-width: 800px;
    padding: 4rem;
    border-radius: 24px;
    text-align: center;
}

.portal-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-top: 0;
    color: var(--primary-blue);
}

.portal-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 5%;
    background: rgba(255, 255, 255, 0.4);
    border-top: 1px solid var(--glass-border);
}

.footer a {
    color: var(--primary-gold);
    text-decoration: none;
}

.footer p {
    color: var(--text-muted);
}

/* Login Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 1.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
}

.modal-content {
    width: 100%;
    max-width: 450px;
    padding: 3rem 2.5rem;
    border-radius: 24px;
    position: relative;
    max-height: calc(100vh - 2.5rem);
    max-height: calc(100dvh - 2.5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    background: rgba(255, 255, 255, 0.85);
    /* Slightly less transparent for modal focus */
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--primary-blue);
}

.modal-logo {
    width: 75px;
    height: 75px;
    background-color: transparent;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 2px solid var(--primary-gold);
}

.modal-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-content h2 {
    font-family: 'Playfair Display', serif;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--primary-blue);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 300;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-gold);
    background: rgba(255, 255, 255, 0.9);
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.form-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: var(--primary-gold);
}

/* Responsiveness */
@media screen and (max-width: 900px) {
    .navbar.menu-open {
        background: var(--primary-blue);
        height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 2rem;
        border-radius: 0;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 2rem;
        margin-top: 3rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
        position: absolute;
        top: 2rem;
        right: 5%;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-actions {
        flex-direction: column;
    }
}

@media screen and (max-width: 480px) {
    .hero-content {
        padding: 3rem 1.5rem;
        margin-top: 40px;
    }

    .afiche-hero {
        width: 120px;
        height: 120px;
        top: -60px;
    }

    .portal-content {
        padding: 2.5rem 1.5rem;
    }

    .modal-content {
        padding: 2.5rem 1.5rem;
        margin: 0 1rem;
    }
}

/* ==========================================================================
   Sección de Eventos Especiales (Experiencias de Bienestar)
   ========================================================================== */
.events-section {
    padding: 6rem 5%;
}

.event-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 3rem 3rem;
    border-radius: 28px;
    position: relative;
    background:
        linear-gradient(160deg,
            rgba(0, 20, 60, 0.50) 0%,
            rgba(0, 80, 160, 0.25) 40%,
            rgba(0, 160, 220, 0.15) 70%,
            rgba(0, 10, 40, 0.55) 100%),
        url('../imgs/IceBathBg.png') center center / cover no-repeat;
    border: 1px solid rgba(176, 150, 117, 0.4);
    box-shadow: 0 12px 48px 0 rgba(0, 0, 0, 0.35);
}

.event-badge {
    position: absolute;
    top: -15px;
    left: 40px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, #cca474 100%);
    color: var(--primary-blue);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(176, 150, 117, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.event-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: start;
}

/* Frosted dark glass behind main text to boost readability */
.event-main-info {
    background: rgba(0, 8, 28, 0.60);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 2rem 2.25rem;
    border: 1px solid rgba(100, 180, 255, 0.15);
}

.event-main-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #ffffff;
    margin: 0 0 1rem 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9), 0 4px 24px rgba(0,20,80,0.8);
}

.event-tagline {
    font-size: 1.15rem;
    color: #a8dfff;
    font-weight: 500;
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
    text-shadow: 0 1px 6px rgba(0,0,0,0.8), 0 2px 16px rgba(0,40,120,0.7);
}

.event-description {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.event-benefits-block {
    margin-bottom: 2.5rem;
}

.event-benefits-block h4,
.event-agenda-block h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: #ffffff;
    margin: 0 0 1.2rem 0;
}

.event-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
}

.event-benefits-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.benefit-icon {
    color: var(--primary-gold);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.event-details-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.event-detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 10, 40, 0.65);
    border: 1px solid rgba(100, 180, 255, 0.2);
    border-radius: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.event-detail-item:hover {
    transform: translateY(-2px);
    background: rgba(0, 20, 60, 0.75);
    border-color: rgba(168, 223, 255, 0.4);
}

.event-detail-item span.material-symbols-outlined {
    font-size: 2rem;
    color: #f0c97a;
    opacity: 1;
}

.event-detail-item div {
    display: flex;
    flex-direction: column;
}

.event-detail-item strong {
    font-size: 0.75rem;
    color: rgba(168, 223, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-detail-item span {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 600;
}

.event-location-block {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
    border-radius: 14px;
    background: rgba(0, 10, 40, 0.55);
    border: 1px solid rgba(100, 180, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.location-icon {
    font-size: 1.8rem;
    color: var(--primary-gold);
    flex-shrink: 0;
    margin-top: 2px;
}

.location-details strong {
    display: block;
    font-size: 1.05rem;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.location-details p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Timeline & Agenda */
.event-agenda-block {
    background: rgba(0, 8, 30, 0.65);
    border: 1px solid rgba(100, 180, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.event-timeline {
    position: relative;
    padding-left: 0;
}

.event-timeline::before {
    content: none;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    display: grid;
    grid-template-columns: 69px 23px 151px;
    gap: 0.7rem;
    align-items: center;
}

@media screen and (max-width: 520px) {
    .timeline-item {
        grid-template-columns: minmax(62px, 70px) 23px minmax(120px, 1fr);
        gap: 0.55rem;
    }

    .timeline-time {
        font-size: 0.8rem;
    }

    .timeline-label {
        font-size: 0.9rem;
    }
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-time {
    font-size: 0.85rem;
    color: rgba(168, 223, 255, 0.9);
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.timeline-dot-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    z-index: 1;
}

.timeline-icon {
    font-size: 0.9rem;
    line-height: 1;
    background: #fff;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1.5px solid var(--primary-gold);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding-top: 0;
}

.timeline-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 1);
    font-weight: 500;
}

.event-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-gallery-section,
.testimonials-section {
    max-width: 1200px;
    margin: 1.25rem auto 0;
    border-radius: 24px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.78);
}

.event-subsection-title {
    text-align: center;
    margin-bottom: 1.4rem;
}

.event-subsection-title h3 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    color: var(--primary-blue);
    font-size: 2rem;
}

.event-subsection-title p {
    margin: 0.45rem 0 0;
    color: var(--text-muted);
}

.event-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.gallery-item {
    border: 1px solid rgba(176, 150, 117, 0.28);
    background: rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(5, 39, 76, 0.18);
    border-color: rgba(176, 150, 117, 0.55);
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.gallery-pagination {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.gallery-page-btn {
    border: 1px solid rgba(176, 150, 117, 0.45);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-blue);
    border-radius: 999px;
    padding: 0.38rem 0.9rem;
    cursor: pointer;
    font-weight: 600;
}

.gallery-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(176, 150, 117, 0.28);
    border-radius: 16px;
    padding: 1.2rem 1.1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.testimonial-card:hover {
    transform: translateY(-2px);
    border-color: rgba(176, 150, 117, 0.5);
}

.testimonial-text {
    margin: 0;
    color: #2f3d4d;
    line-height: 1.65;
    font-size: 0.95rem;
}

.testimonial-name {
    margin: 0.9rem 0 0;
    color: var(--primary-blue);
    font-weight: 700;
    letter-spacing: 0.3px;
}

.testimonials-empty {
    margin: 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(6, 15, 27, 0.86);
    z-index: 3000;
    padding: 1rem;
}

.gallery-lightbox.active {
    display: flex;
}

.gallery-lightbox img {
    max-width: min(92vw, 900px);
    max-height: 78vh;
    border-radius: 12px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.4);
}

.gallery-lightbox p {
    margin: 0.8rem 0 0;
    color: #f8f8f8;
    font-size: 0.95rem;
}

.gallery-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
}

/* WhatsApp Button Override */
#btn-whatsapp-evento {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    border: 1px solid rgba(37, 211, 102, 0.4) !important;
    color: #ffffff !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
    transition: all 0.3s ease;
}

#btn-whatsapp-evento:hover {
    background: linear-gradient(135deg, #20ba5a 0%, #0e7268 100%) !important;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    transform: translateY(-2px);
}

#btn-whatsapp-evento span {
    color: #ffffff !important;
}

/* Modals & Iframe */
.event-modal-content {
    max-width: 750px !important;
    width: 90% !important;
    padding: 2.5rem 2rem;
    max-height: calc(100vh - 2.5rem);
    max-height: calc(100dvh - 2.5rem);
    overflow-y: auto;
}

/* ─── Custom Pre-Registration Wizard Styles ────────────────────────────── */
.modal-title-event {
    text-align: center;
    margin-bottom: 1.5rem !important;
    font-family: 'Playfair Display', serif;
    color: var(--primary-blue);
    font-size: 1.8rem;
    position: relative;
}

/* Wizard Progress Indicator */
.wizard-progress-container {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wizard-progress-bar-wrapper {
    width: 100%;
    height: 6px;
    background: rgba(176, 150, 117, 0.15);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(176, 150, 117, 0.1);
}

.wizard-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-gold) 0%, var(--primary-blue) 100%);
    width: 20%;
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-steps-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Form Steps Layout & Animation */
.wizard-form {
    position: relative;
    width: 100%;
}

.wizard-step {
    display: none;
    animation: fadeInUp 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.wizard-step.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grid & Layout Utilities */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media screen and (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Custom Styled Controls with Winter Glassmorphism */
.wizard-form input[type="text"],
.wizard-form input[type="number"],
.wizard-form input[type="tel"],
.wizard-form select,
.wizard-form textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.wizard-form input:focus,
.wizard-form select:focus,
.wizard-form textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--glass-hover);
    box-shadow: 0 0 0 4px rgba(5, 39, 76, 0.1);
}

.wizard-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* Error states */
.wizard-form input.invalid,
.wizard-form select.invalid,
.wizard-form textarea.invalid {
    border-color: #e53e3e;
    background: rgba(254, 242, 242, 0.6);
}

.error-message {
    font-size: 0.75rem;
    color: #e53e3e;
    font-weight: 500;
    margin-top: 0.2rem;
    min-height: 16px;
}

/* Radio Button Toggle Pills */
.radio-toggle-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.25rem;
}

.radio-toggle-label {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.radio-toggle-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-toggle-label span {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.radio-toggle-label input[type="radio"]:checked + span {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(5, 39, 76, 0.25);
}

/* Promo Code Input & Status */
.promo-code-input-wrapper {
    display: flex;
    gap: 0.75rem;
}

.btn-apply-code {
    white-space: nowrap;
    padding: 0 1.5rem !important;
    border-radius: 12px !important;
}

.promo-status {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.2rem;
}

.promo-status.success {
    color: #38a169;
}

.promo-status.error {
    color: #e53e3e;
}

/* Elegant Payment Information Card */
.payment-card {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(176, 150, 117, 0.4);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.payment-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--primary-blue);
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.payment-price-tag {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-gold);
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}

.payment-instructions {
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.5;
}

.payment-instructions p {
    margin: 0 0 0.5rem 0;
}

.payment-instructions strong {
    color: var(--primary-blue);
}

.payment-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    border-top: 1px dashed rgba(176, 150, 117, 0.3);
    padding-top: 0.75rem;
    margin-top: 0.75rem !important;
}

/* Upload Proof Drag-and-Drop Area */
.upload-zone {
    border: 2px dashed rgba(176, 150, 117, 0.5);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary-blue);
    background: rgba(5, 39, 76, 0.02);
    box-shadow: inset 0 0 10px rgba(5, 39, 76, 0.02);
}

.upload-icon {
    font-size: 3rem !important;
    color: var(--primary-gold);
    transition: transform 0.3s ease;
}

.upload-zone:hover .upload-icon {
    transform: translateY(-4px);
    color: var(--primary-blue);
}

.upload-text {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin: 0;
}

.upload-text strong {
    color: var(--primary-blue);
}

.upload-limit {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

/* File Upload Preview Card */
.file-preview-container {
    margin-top: 1rem;
    animation: fadeInUp 0.3s ease;
}

.file-preview-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--primary-gold);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 12px rgba(176, 150, 117, 0.1);
}

.file-icon {
    font-size: 2rem !important;
    color: var(--primary-blue);
}

.file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.file-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.remove-file-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25rem;
    transition: color 0.2s ease;
}

.remove-file-btn:hover {
    color: #e53e3e;
}

/* Wizard Buttons Group */
.wizard-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(176, 150, 117, 0.2);
    padding-top: 1.5rem;
}

.wizard-buttons .btn-secondary {
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 12px;
}

.wizard-buttons .btn-primary {
    padding: 10px 24px;
    font-size: 0.9rem;
    border-radius: 12px;
}

.btn-submit {
    background-color: #38a169 !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.3) !important;
}

.btn-submit:hover {
    background-color: #2f855a !important;
    box-shadow: 0 6px 20px rgba(56, 161, 105, 0.5) !important;
}

.btn-submit:disabled, .btn-next:disabled {
    background-color: #cbd5e0 !important;
    color: #718096 !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

/* Wizard Success Screen */
.wizard-success-screen {
    text-align: center;
    padding: 2rem 1rem;
    animation: fadeInUp 0.4s ease forwards;
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(56, 161, 105, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon {
    font-size: 4rem !important;
    color: #38a169;
}

.success-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--primary-blue);
    margin: 0 0 0.75rem 0;
    font-weight: 700;
}

.success-message {
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}


/* Responsiveness Event Section */
@media screen and (max-width: 900px) {
    .event-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .event-container {
        padding: 3.5rem 2rem 2rem;
    }

    .event-badge {
        left: 20px;
        font-size: 0.8rem;
    }

    .event-details-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .event-detail-item {
        padding: 0.75rem 1rem;
    }

    .event-benefits-list {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .event-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .testimonials-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Spinner Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.spin-animation {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@media screen and (max-width: 768px) {
    .services-section,
    .events-section {
        padding: 3.25rem 1rem;
    }

    .section-title {
        margin-bottom: 2.25rem;
    }

    .section-title h2 {
        font-size: 2.05rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-card {
        padding: 1.5rem 1.1rem;
    }

    .portal-teaser {
        padding: 2rem 1rem;
    }

    .portal-content {
        padding: 2rem 1.1rem;
    }

    .event-container {
        padding: 3rem 1rem 1.25rem;
        border-radius: 20px;
    }

    .event-main-info,
    .event-agenda-block {
        padding: 1.25rem 1rem;
    }

    .event-main-info h3 {
        font-size: 1.75rem;
    }

    .event-description,
    .event-tagline {
        font-size: 0.95rem;
    }

    .event-details-row {
        margin: 1.5rem 0;
    }

    .event-modal-content {
        width: 100% !important;
        margin: 0;
        padding: 1.25rem 0.95rem;
        border-radius: 16px;
    }

    .event-gallery-section,
    .testimonials-section {
        padding: 1.3rem 0.9rem;
        border-radius: 18px;
    }

    .event-subsection-title h3 {
        font-size: 1.55rem;
    }

    .event-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-item img {
        height: 140px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .wizard-buttons {
        flex-direction: column;
    }

    .wizard-buttons .btn-secondary,
    .wizard-buttons .btn-primary {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .top-frame {
        padding: 12px;
        gap: 10px;
    }

    .main-logo {
        width: 44px;
        height: 44px;
        margin-right: 12px;
    }

    .title {
        font-size: 22px;
    }

    .sub-title {
        font-size: 12px;
    }

    .services-section,
    .events-section {
        padding: 2.75rem 0.8rem;
    }

    .section-title h2 {
        font-size: 1.75rem;
    }

    .event-badge {
        left: 12px;
    }

    .event-main-info h3 {
        font-size: 1.45rem;
    }

    .event-gallery-section,
    .testimonials-section {
        margin-top: 0.9rem;
    }

    .modal-overlay {
        align-items: flex-start;
        padding: 0.65rem;
    }

    .modal-content {
        margin: 0;
        max-height: calc(100vh - 1.3rem);
        max-height: calc(100dvh - 1.3rem);
        border-radius: 16px;
    }

    .event-modal-content {
        max-height: calc(100vh - 1.3rem);
        max-height: calc(100dvh - 1.3rem);
    }
}
