/* VARIABLES ======================================== */
:root {
    --primary-color: #D18E94; /* Dusty Pink from Reference */
    --secondary-color: #E5B8BB; /* Soft Blush */
    --accent-color: #C5A059; /* Gold/Bronze */
    --bg-color-main: #FFF0F2; /* Creamy Blush */
    --text-color: #4A3B3C; /* Dark Rose Taupe */
    --text-light: #8E7A7C;
    --white: #ffffff;
    
    --font-head: 'Great Vibes', cursive;
    --font-body: 'Crimson Pro', serif;
    --font-accent: 'Crimson Pro', serif;
    
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RESET & BASE ======================================== */
*, *::before, *::after {
    box-sizing: border-box !important;
}
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden !important; /* Force no horizontal scroll */
    width: 100%; /* Use 100% instead of 100vw to avoid scrollbar width bugs causing overflow */
    position: relative;
    max-width: 100%;
    -webkit-overflow-scrolling: touch; /* Smooth momentum scroll on iOS */
}

/* CRITICAL: Prevent images/videos/elements from blocking scroll */
img, video, .corner-img, .hero-video, .gift-logo, .dresscode-icon-img,
.rsvp-img-btn, .ubica-btn-img, .qr-code-img, .photo-gallery-latest,
.photo-gallery-grid img, .store-btn-logo, .album-visor-container {
    touch-action: pan-y !important; /* Allow vertical scroll through these elements */
    -webkit-user-drag: none; /* Prevent drag on desktop */
    user-select: none;
    pointer-events: auto; /* Allow clicks, but pan-y ensures scroll works too */
}

/* Decorative non-interactive elements should NOT block scroll or clicks below them */
.corner-img, .leaf, .balloons-container, .hero-video {
    pointer-events: none !important;
}

video {
    pointer-events: none; /* Video is decorative, let scroll pass through */
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, #fff5f7 0%, #fbdce2 100%);
    color: var(--text-color);
    line-height: 1.6;
    touch-action: pan-y; /* Ensure scroll always works */
}

h1, h2, h3, h4, .names, .section-title {
    font-family: var(--font-head);
    font-weight: 400;
}

.names {
    color: var(--accent-color); /* Premium Gold for the full name */
    font-size: clamp(3rem, 10vw, 5rem); /* Dynamic sizing */
    letter-spacing: 1px;
}

.names {
    color: var(--accent-color); /* Premium Gold for the full name */
}

.initial-enlarged {
    text-transform: lowercase;
    display: inline-block;
    /* Color inherited from .names */
    font-size: 2.2em; /* Balanced scale */
    line-height: 0.8;
    vertical-align: baseline;
    font-weight: 300 !important;
    margin-right: -0.05em;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* UTILITIES ======================================== */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 45px; /* Keeps text fully inside the lateral.png borders on mobile */
    }
}

.text-center { text-align: center; }
.mt-2 { margin-top: 15px; }
.mt-3 { margin-top: 25px; }
.mt-4 { margin-top: 40px; }
.mt-5 { margin-top: 60px; }
.mb-3 { margin-bottom: 25px; }
.mb-4 { margin-bottom: 40px; }
.py-5 { padding: 100px 0; } /* More generous breathing room for senior feel */
.text-xs { font-size: 0.8rem; }
.text-sm { font-size: 0.9rem; }
.text-muted { color: var(--text-light); }

.bg-light-green { background-color: #f2f5ef; }
.bg-dark { background-color: var(--primary-color); }

/* BUTTONS */
.btn-primary, .btn-secondary, .btn-whatsapp, .store-btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 15px; /* Soft rounded edges as requested */
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(209, 142, 148, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.3);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 15px auto 0;
}

.location-btn-img {
    display: block;
    margin: 30px auto 0;
    text-align: center;
    transition: transform 0.4s ease;
}

.location-btn-img:hover {
    transform: scale(1.05);
}

.location-btn-img img {
    max-width: 160px !important;
    height: auto;
    mix-blend-mode: multiply; /* Helps blend with background if png has slight artifacts */
}

.btn-secondary:hover {
    background-color: var(--bg-color-main);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    width: fit-content;
}

.btn-whatsapp:hover {
    background-color: #1ebe5d;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.75rem;
}

/* ENVELOPE SCREEN ======================================== */
.envelope-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 240, 242, 0.8), rgba(255, 240, 242, 0.8)), url('../fondopapel.jpg');
    background-color: var(--bg-color-main);
    background-size: cover;
    background-position: center;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: opacity 1.5s ease, visibility 1.5s ease;
}

.envelope-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.envelope-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: transparent;
    pointer-events: none;
    /* Removed opacity: 0 to show first frame immediately */
}

.envelope-hint {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-head);
    font-size: 1.2rem;
    color: #fff;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    z-index: 10;
    pointer-events: none;
    animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.8; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.4; transform: translateX(-50%) scale(0.95); }
}

@media (max-width: 768px) {
    .envelope-hint {
        font-size: 0.9rem;
    }
    .envelope-video {
        height: auto;
        width: 100%;
        max-width: 95%; /* Float it nicely to avoid touching screen edges */
        object-fit: contain;
        background-color: transparent;
        border-radius: 15px; /* Premium floating card look */
        box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    }
}

/* FLOATING NAV ======================================== */
.floating-nav {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 5px 10px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    z-index: 9999; 
    width: fit-content;
    max-width: 95vw; 
    border: 1px solid rgba(85, 107, 47, 0.2);
    display: none; /* Initially hidden */
}

body.ui-visible .floating-nav {
    display: block;
}

@media (max-width: 768px) {
    .floating-nav {
        bottom: 10px;
        padding: 4px 6px;
    }
    .floating-nav ul {
        gap: 2px;
    }
    .floating-nav ul li a {
        font-size: 1rem;
        padding: 5px;
        width: 30px;
        height: 30px;
    }
}

.floating-nav ul {
    display: flex;
    gap: 8px; /* Tighter for mobile by default */
    justify-content: center;
    align-items: center;
}

.floating-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-light);
    font-size: 1.2rem;
    transition: var(--transition);
}

.floating-nav a:hover, .floating-nav a.active {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(85, 107, 47, 0.3);
}

/* AUDIO BUTTON ======================================== */
/* AUDIO PLAYER ======================================== */
/* FLOATING ACTION BUTTONS (Audio & Share) */
.audio-btn, .share-btn-sticky {
    position: fixed;
    right: 20px;
    width: 48px;
    height: 48px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 99999;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 1s ease, visibility 1s ease;
    border: 2px solid var(--primary-color);
    /* Initial state: Hidden */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ui-visible .audio-btn, 
.ui-visible .share-btn-sticky {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.audio-btn { 
    top: 20px; 
    width: 195px; /* Adjust to oval shape - was 65px */
    height: 126px; /* was 42px */
    border-radius: 75px; /* Makes it pill shaped/oval - was 25px */
    padding: 0;
    overflow: hidden; /* Clips the video inside */
    background-color: #000; /* Dark background under video */
}

#audio-btn-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.share-btn-sticky { 
    top: auto; 
    bottom: 90px; /* Elevated slightly more for visibility */
    right: 20px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    z-index: 9995; /* Just below floating-nav but above content */
    /* Initial state hidden via shared selector above */
}

.share-icon-img {
    width: 60px; 
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 6px 20px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
}

/* DESKTOP RESIZE FOR SHARE ICON */
@media (min-width: 992px) {
    .share-btn-sticky {
        width: 100px;
        height: 100px;
        right: 40px;
        bottom: 120px;
    }
    .share-icon-img {
        width: 100% !important;
        height: 100% !important;
    }
}

@media (max-width: 768px) {
    .audio-btn {
        width: 70px; /* Reduced to avoid competing with hero */
        height: 45px; 
        top: 50px; /* Lowered slightly */
        right: 10px;
    }
    
    .share-icon-img {
        width: 125px; /* Stay same (Large) on mobile */
        height: 125px;
    }
}

@media (max-width: 768px) {
    .share-icon-img {
        width: 110px;
        height: 110px;
    }
}

.share-btn-sticky:hover .share-icon-img {
    transform: scale(1.1) rotate(5deg);
}

.share-icon-qr-img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    object-fit: contain;
    vertical-align: middle;
}

.audio-btn.playing {
    background-color: var(--primary-color);
    animation: pulseLoop 4s infinite;
}

/* Share button inside nav */
.share-btn-nav i {
    font-size: 1.3rem;
}

@keyframes pulseLoop {
    0% { box-shadow: 0 0 0 0 rgba(85, 107, 47, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(85, 107, 47, 0); }
    100% { box-shadow: 0 0 0 0 rgba(85, 107, 47, 0); }
}

/* Typing Effect styles */
.typing-container.active {
    visibility: visible; /* Show when reveal observer triggers */
}

.typing-cursor-blink {
    animation: cursorBlink 0.8s infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typing-container::after {
    content: '|';
    margin-left: 2px;
    color: var(--primary-color);
    animation: cursorBlink 0.8s infinite;
}

.names-cursive .typing-container::after {
    display: none;
}

/* SAKURA PETAL ANIMATION ======================================== */
.sakura-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.petal {
    position: absolute;
    background: #fbdce2;
    border-radius: 150% 0 150% 0;
    opacity: 0.7;
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        top: -10%;
        transform: translateX(0) rotate(0deg);
    }
    100% {
        top: 110%;
        transform: translateX(100px) rotate(360deg);
    }
}

/* Slide-In Animations */
.slide-in-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.active.slide-in-left, .active.slide-in-right {
    opacity: 1;
    transform: translateX(0);
}

/* Zoom-Pulse Animation */
.btn-zoom-pulse {
    opacity: 0;
    transform: scale(0);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.active.btn-zoom-pulse {
    opacity: 1;
    transform: scale(1);
    animation: pulseVibrate 2.5s infinite 1s;
}

@keyframes pulseVibrate {
    0%, 100% { transform: scale(1); }
    10% { transform: scale(1.05); }
    20% { transform: scale(1); }
    30% { transform: scale(1.03); }
    40% { transform: scale(1); }
}

/* Button & Legend styles */
.btn-legend {
    position: relative; /* Changed from absolute to flow better with image button */
    display: block;
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 700;
    margin: 10px auto 0;
    font-style: italic;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.7);
    padding: 4px 15px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid var(--secondary-color);
    white-space: nowrap;
    opacity: 0.9;
    pointer-events: none;
    z-index: 5;
    width: fit-content;
}

.rsvp-custom-btn .btn-legend {
    bottom: 20px;
    background: rgba(0,0,0,0.6);
    color: white;
    border-color: rgba(255,255,255,0.2);
}

/* HERO SECTION ======================================== */
.hero-section {
    width: 100%;
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible; /* CRITICAL: Prevent title clipping on desktop */
    background-image: linear-gradient(rgba(255, 240, 242, 0.85), rgba(255, 240, 242, 0.85)), url('../fondopapel.jpg');
    background-color: var(--bg-color-main);
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: transparent;
}

@media (max-width: 768px) {
    .hero-video-container {
        aspect-ratio: 16 / 9; /* Perfectly matches video without leaving artificial background gaps, while preventing 0-height collapse */
        width: 100vw;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
    .hero-video {
        height: auto !important; /* overrides previous height: 100% */
    }
}

.hero-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain; /* Full display, no cropping */
    object-position: center;
    transition: opacity 1.5s ease;
}

.hero-content {
    background: rgba(255, 255, 255, 0.4); /* Esmerilado Translucido */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 20px 30px;
    border-radius: 8px; /* Sharper edges as per standard luxury card styling */
    box-shadow: 0 15px 45px rgba(0,0,0,0.1);
    z-index: 10;
    width: 80%;
    max-width: 480px;
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    text-align: center;
    transition: var(--transition);
    /* Choreographed slide-down anchor */
    animation: slideDownAnchor 2.5s cubic-bezier(0.22, 1, 0.36, 1) 1s both;
}

.names {
    color: var(--accent-color) !important;
    font-weight: 700;
}


.names-cursive {
    font-family: 'Pinyon Script', cursive;
    color: #B8913E;
    font-size: clamp(1.55rem, 4.8vw, 3rem);
    font-weight: 400;
    margin: 0 auto;
    line-height: 1.15;
    min-height: 1.2em;
    text-align: center;
    -webkit-text-stroke: 0.3px #A07830;
    text-shadow: 0 1px 3px rgba(140, 100, 30, 0.25);
}

@keyframes slideDownAnchor {
    0% { top: 30%; opacity: 0; transform: translate(-50%, -50%); }
    /* Anchors exactly at the borderline between hero and countdown */
    100% { top: 100%; opacity: 1; transform: translate(-50%, -50%); }
}

@media (max-width: 768px) {
    .hero-content {
        animation: slideDownAnchorMobile 2.5s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
        width: 85%;
        padding: 5px 10px;
        position: absolute;
        left: 50%;
        margin-top: 0;
        transform: translate(-50%, -50%) scale(0.85);
        transform-origin: center center;
    }
    .names-cursive {
        font-size: 2.2rem;
    }
    @keyframes slideDownAnchorMobile {
        0% { top: 30%; opacity: 0; transform: translate(-50%, -50%) scale(0.65); }
        /* Anchors exactly at the borderline between hero and countdown with reduced size */
        100% { top: 100%; opacity: 1; transform: translate(-50%, -50%) scale(0.65); }
    }
}

/* Desktop refinements */
@media (min-width: 992px) {
    .hero-content {
        padding: 40px 50px;
    }
}

/* HERO BOTTOM CORNERS - REMOVED PER USER REQUEST */
.hero-bottom-corners {
    display: none;
}

/* DECORATIVE CORNERS (Standard 4-Corner System) ======================================== */
.section-corner-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.section-corner {
    position: absolute;
    width: 15vw;
    max-width: 160px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.08));
    opacity: 0; 
    transition: opacity 1.2s ease, transform 1.2s ease;
}

/* Intersection Observer Class */
.section-corner.reveal-corner {
    opacity: 0.9;
}

/* Orientation: Roses pointing according to user-provided images (NO TRANSFORM needed) */
.corner-tl { top: 0; left: 0; transform: none; }
.corner-tr { top: 0; right: 0; transform: none; }
.corner-bl { bottom: 0; left: 0; transform: none; }
.corner-br { bottom: 0; right: 0; transform: none; }

@media (max-width: 768px) {
    .section-corner { width: 22vw; }
}

/* DECORATIVE LATERALS (Bound to Section Corners explicitly) ======================================== */
.section-corner-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 10;
}

/* Lateral Vines (lateral.png) - REMOVED PER USER REQUEST to eliminate desktop margins */
.section-corner-container::before,
.section-corner-container::after {
    display: none; /* Hide on all devices to match the "perfect" mobile version */
    content: '';
    position: absolute;
    top: 80px; /* offset clear from top floral frame */
    bottom: 80px; /* offset clear from bottom floral frame */
    width: 60px;
    background-image: url('../lateral.png');
    background-repeat: repeat-y;
    background-size: 100% auto;
    opacity: 0.6;
    animation: breezeEffect 12s ease-in-out infinite;
    pointer-events: none;
}




/* BODY-LEVEL FRAMING CORNERS (Escuadras) */
.body-frame {
    position: absolute;
    z-index: 5;
    pointer-events: none;
    width: 22vw;
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
    opacity: 0.9;
    animation: breezeEffect 8s ease-in-out infinite;
}

.frame-tl { top: -10px; left: -10px; }
.frame-tr { top: -10px; right: -10px; transform: scaleX(-1); }
.frame-bl { bottom: -10px; left: -10px; transform: scaleY(-1); }
.frame-br { bottom: -10px; right: -10px; transform: rotate(180deg); }

@media (max-width: 768px) {
    .body-frame { width: 35vw; max-width: 130px; }
    .corner-img { display: none !important; }
}

/* BUTTERFLY ANIMATION ======================================== */
.butterfly {
    position: fixed;
    width: 40px;
    height: auto;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
}

@keyframes flyNatural {
    0% { transform: translate(0, 100vh) rotate(0deg) scale(0.5); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translate(var(--translateX), -120vh) rotate(var(--rotate)) scale(1.2); opacity: 0; }
}

@keyframes wingFlap {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(0.2); }
}

/* BREEZE EFFECT for corners/laterals */
@keyframes breezeEffect {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(1.5deg) scale(1.01); }
}

.animate-breeze {
    animation: breezeEffect 8s ease-in-out infinite;
}


/* Corner entrance animations */
.animate-corner-tl {
    animation: slideInTopLeft 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) 0.5s both,
               floatCorner 4s ease-in-out 1.7s infinite;
}

.animate-corner-br {
    animation: slideInBottomRight 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) 0.8s both,
               floatCornerReverse 4s ease-in-out 2s infinite;
}

@keyframes slideInTopLeft {
    0% {
        opacity: 0;
        transform: translate(-60px, -60px) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
}

@keyframes slideInBottomRight {
    0% {
        opacity: 0;
        transform: translate(60px, 60px) scale(0.5) scaleX(-1);
    }
    100% {
        opacity: 1;
        transform: translate(0, 0) scale(1) scaleX(-1);
    }
}

@keyframes floatCorner {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(3px, 3px) scale(1.02); }
}

@keyframes floatCornerReverse {
    0%, 100% { transform: translate(0, 0) scale(1) scaleX(-1); }
    50% { transform: translate(-3px, -3px) scale(1.02) scaleX(-1); }
}

/* Torn paper effect placeholders (using SVG backgrounds generally, but using borders for simplicity first) */
.paper-texture-top, .paper-texture-bottom, .paper-rip-top, .paper-rip-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 30px;
    z-index: 10;
    pointer-events: none;
}
/* We simulate a torn edge using a repeating radial gradient */
.paper-rip-top {
    top: -15px;
    background: radial-gradient(circle at 10px 0, transparent 10px, var(--bg-color-main) 11px);
    background-size: 20px 20px;
    background-position: 0 15px;
    background-repeat: repeat-x;
}
.paper-rip-bottom {
    bottom: -15px;
    background: radial-gradient(circle at 10px 20px, transparent 10px, var(--bg-color-main) 11px);
    background-size: 20px 20px;
    background-position: 0 -5px;
    background-repeat: repeat-x;
}

.countdown-section {
    background: linear-gradient(var(--bg-color-main), var(--white)); /* Remove 404 image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* RSVP IMPROVED */
.rsvp-custom-btn {
    position: relative;
    display: inline-block !important;
    margin: 30px auto !important;
    text-align: center !important;
    cursor: pointer;
    animation: imgPulse 2.5s ease-in-out infinite;
}

.rsvp-img-btn {
    width: 100%;
    max-width: 450px;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.rsvp-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: white;
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    pointer-events: none;
    z-index: 10;
}

@keyframes imgPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); filter: drop-shadow(0 8px 25px rgba(197, 160, 89, 0.5)); }
}

/* Desktop reduction for rsvp */
@media (min-width: 992px) {
    .rsvp-img-btn {
        max-width: 180px !important;
    }
}

.location-btn-img {
    display: inline-block;
    max-width: 220px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.zoom-hover:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.3));
}

/* GIFTS SECTION ======================================== */
.gifts-section {
    position: relative;
    z-index: 10; /* Ensure logos are above the decorative background */
}

.gifts-section .container {
    position: relative;
    z-index: 12;
}

.liverpool-logo, .palacio-logo {
    z-index: 15;
    position: relative;
}

.footer-names h3 {
    color: var(--accent-color);
    font-size: 3rem;
    letter-spacing: 4px;
    font-weight: 700;
    margin-bottom: 0;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8), 0 0 30px rgba(0,0,0,0.5); /* Extreme shadow */
}

.text-muted-light {
    color: var(--white);
    opacity: 1;
    font-weight: 600;
    text-shadow: 1px 1px 10px rgba(0,0,0,0.9);
}

.footer-coordination {
    color: var(--white);
    opacity: 1 !important;
}

.footer-coordination p {
    font-weight: 600;
}

@media (max-width: 768px) {
    .names { font-size: 2.2rem; } /* Aggressively smaller */
    
    .footer-names h3 { font-size: 2.22rem; }
    
    .rsvp-custom-btn {
        max-width: 90% !important;
        margin: 0 auto;
    }



    .corner-img {
        width: 50px;
        opacity: 0.7;
    }

    .dresscode-icon-img {
        width: 90px;
    }

    .floating-nav a {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .floating-nav ul {
        gap: 1px;
        padding: 0;
        margin: 0;
    }

    /* SPECIFIC MOBILE FIXES FOR QR AND VISOR */
    .qr-container-wrapper {
        max-width: 180px !important; /* Forces mobile-only small size */
        padding: 15px !important;
        margin: 0 auto;
    }

    .photo-gallery-latest {
        max-width: 100% !important; /* Full width on mobile */
        width: calc(100% - 30px) !important;
        margin: 0 auto;
    }
}

/* For ultra-narrow screens like iPhone SE/5 */
@media (max-width: 360px) {
    .names { font-size: 1.8rem; }
    .floating-nav a {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    .floating-nav ul {
        gap: 2px;
    }
    .footer-names h3 { font-size: 1.8rem; }
}

.date-txt {
    font-style: italic;
    font-family: var(--font-head);
    color: var(--text-light);
    font-size: 1.5rem;
    margin-top: 35px !important;
    margin-bottom: 5px !important;
}

.date-highlight {
    margin-top: 5px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: var(--primary-color);
}

.date-highlight .day {
    font-size: 3.5rem;
    font-family: var(--font-head);
    line-height: 1;
}

.date-highlight .month-year {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: left;
    line-height: 1.2;
    border-left: 2px solid var(--primary-color);
    padding-left: 15px;
}

/* SECTION TITLES */
.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: var(--accent-color);
}

.title-light {
    color: var(--white);
}

.title-light::after {
    background-color: var(--white);
}

/* COUNTDOWN SECTION ======================================== */
.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--white);
    padding: 15px 20px;
    border-radius: 10px;
    min-width: 80px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(85, 107, 47, 0.1);
}

.time-box .number {
    font-size: 2rem;
    font-family: var(--font-head);
    color: var(--primary-color);
    line-height: 1;
}

.time-box .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-top: 5px;
}

.colon {
    font-size: 2rem;
    font-family: var(--font-head);
    color: var(--primary-color);
    margin-bottom: 20px; /* alignment visual tweak */
}

@media (max-width: 500px) {
    .countdown-container { gap: 5px; }
    .time-box { min-width: 60px; padding: 10px; }
    .time-box .number { font-size: 1.5rem; }
    .time-box .label { font-size: 0.6rem; }
}

/* CALENDAR DROPDOWN */
.calendar-dropdown-container {
    position: relative;
    display: inline-block;
}

.calendar-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 10px 0;
    z-index: 100;
    margin-top: 10px;
    animation: fadeInDown 0.3s ease;
}

.calendar-options.active {
    display: block;
}

.cal-opt {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.3s;
    font-size: 0.9rem;
    gap: 10px;
}

.cal-opt i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.cal-opt:hover {
    background: #f7f9f4;
    color: var(--primary-color);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* LOCATION SECTION ======================================== */
.location-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 1000px;
    margin: 40px auto 0;
}

.card.event-card {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
}

.event-card {
    background: transparent !important;
    padding: 30px 20px;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    color: var(--text-color);
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background-color: var(--primary-color);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(85, 107, 47, 0.1);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.event-card h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.event-card .time {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.event-card .place {
    font-family: var(--font-head);
    font-size: 1.2rem;
}

.event-card .address {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* DRESSCODE SECTION ======================================== */
.dresscode-icon {
    margin-top: 30px;
}

.dresscode-icon-img {
    width: 160px;
    height: auto;
    display: inline-block;
    filter: drop-shadow(0 4px 12px rgba(85, 107, 47, 0.2));
}

.animate-dresscode-icon {
    animation: fadeInScale 1s cubic-bezier(0.25, 0.8, 0.25, 1) 0.3s both;
}

.animate-dresscode-icon .dresscode-icon-img {
    animation: gentleBounce 3s ease-in-out 1.3s infinite;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.03); }
}

.dresscode-type {
    font-size: 1.3rem;
    color: var(--text-color);
}

.color-palette {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-color {
    position: relative;
}

.no-color .no-text {
    font-size: 1.5rem;
    font-weight: bold;
}

/* REDUNDANT BLOCK REMOVED */

/* FAMILIA SECTION ======================================== */
.familia-section {
    background: linear-gradient(180deg, var(--bg-color-main) 0%, #f2f5ef 100%);
}

.familia-group {
    margin: 25px auto;
    max-width: 400px;
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid rgba(85, 107, 47, 0.12);
    box-shadow: 0 8px 25px rgba(85, 107, 47, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.familia-group:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(85, 107, 47, 0.14);
}

.familia-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.mama-group .familia-icon i {
    color: #d4879c;
}

.familia-role {
    font-family: var(--font-head);
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.familia-name {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--text-color);
    font-weight: 500;
    margin: 0;
    line-height: 1.6;
}

.familia-ampersand {
    display: block;
    font-family: var(--font-head);
    font-size: 1.4rem;
    color: var(--accent-color);
    margin: 2px 0;
    opacity: 0.7;
}

.abuelos-names {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* SECTIONS ======================================== */
/* PADRINOS SECTION ======================================== */
.padrinos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.padrino-item {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.padrino-item h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 5px;
    border-bottom: 1px dotted rgba(85, 107, 47, 0.3);
    padding-bottom: 5px;
    display: inline-block;
}

.padrino-item p {
    font-size: 0.95rem;
    color: var(--text-color);
}

/* GIFTS SECTION ======================================== */
.gift-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.gift-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(85, 107, 47, 0.1);
}

.gift-card h4 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 20px;
}





@keyframes pulseLogo {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); box-shadow: 0 8px 20px rgba(85, 107, 47, 0.12); }
    100% { transform: scale(1); }
}

/* ALBUM DINÁMICO (VISOR DE VIDEO) ======================================== */
.album-section {
    background: linear-gradient(180deg, #f2f5ef 0%, var(--bg-color-main) 100%);
}

.album-visor-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15), 0 5px 15px rgba(85, 107, 47, 0.1);
    border: 3px solid rgba(85, 107, 47, 0.15);
}

.album-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 65vh;
}

.album-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px 15px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    text-align: center;
}

.album-overlay-text {
    font-family: var(--font-head);
    font-size: 1.8rem;
    color: var(--white);
    letter-spacing: 3px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    margin: 0;
    font-weight: 600;
}

@media (max-width: 768px) {
    .album-visor-container {
        max-width: calc(100% - 30px);
        border-radius: 15px;
    }
    .album-overlay-text {
        font-size: 1.4rem;
    }
}

/* PHOTOS SECTION ======================================== */
.photo-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.photo-gallery:empty {
    display: none;
}

.photo-gallery-latest {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    animation: photoFadeIn 0.6s ease both;
    position: relative;
}

.photo-gallery-latest img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 350px;
}

.photo-gallery-latest .photo-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-family: var(--font-body);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.photo-gallery-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 420px;
}

.photo-gallery-grid img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    opacity: 0.85;
    transition: var(--transition);
}

.photo-gallery-grid img:hover {
    opacity: 1;
    transform: scale(1.05);
}

@keyframes photoFadeIn {
    0% { opacity: 0; transform: scale(0.9) translateY(15px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.photo-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.btn-camera {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 40px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(85, 107, 47, 0.35);
    transition: var(--transition);
}

.btn-camera i {
    font-size: 1.5rem;
}

.btn-camera:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(85, 107, 47, 0.45);
}

.btn-camera:active {
    transform: translateY(0) scale(0.98);
}

.upload-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
}

.upload-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(85, 107, 47, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spinUpload 0.8s linear infinite;
}

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

.upload-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    animation: fadeInScale 0.5s ease both;
}

.upload-success i {
    font-size: 3rem;
    color: #25D366;
}

.upload-success p {
    font-weight: 500;
}

/* QR Stylings */
.qr-container-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.qr-code-img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.qr-code-box {
    padding: 15px;
    background: transparent; /* Fix background mismatch */
    border-radius: 12px;
}

@media (min-width: 992px) {
    .qr-container-wrapper {
        max-width: 280px; /* Smaller QR on desktop */
        margin: 0 auto;
    }
    .qr-code-img {
        max-width: 200px;
    }
}

.btn-share-qr {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: none; /* Removed border to use the image as button */
    color: var(--primary-color);
    font-family: var(--font-body);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-share-qr:hover {
    transform: scale(1.05);
    background: transparent;
}

.btn-share-qr i {
    font-size: 1.2rem;
}

/* Smart Landing Overlay */
.qr-overlay-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.qr-overlay-content {
    background: white;
    padding: 40px 30px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 90%;
    border: 1px solid var(--accent-color);
}

.qr-overlay-content .names {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.qr-overlay-content p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.btn-skip {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
    font-family: var(--font-body);
}

/* FOOTER / RSVP ======================================== */
.rsvp-iframe-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.rsvp-iframe {
    width: 100%;
    height: 500px;
    border: none;
    background: var(--white);
    border-radius: 12px;
}

@media (max-width: 768px) {
    .rsvp-iframe {
        height: 450px;
    }
}

.footer-names h3 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin: 0;
}

/* Horizontal Background Drift Animation */
section {
    background-attachment: fixed;
    background-position: 50% 0;
    transition: background-position 0.2s ease-out;
}

/* Specific background movement on scroll handled via JS for horizontal effect */
.bg-drift {
    background-size: 110% auto !important; /* Slightly larger to allow drift */
}


/* WEATHER SECTION ======================================== */
.weather-section {
    position: relative;
    overflow: hidden;
}

/* WEATHER CARD STYLES */
.weather-card {
    background: white;
    padding: 40px 20px;
    border-radius: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    border: 1px solid rgba(85, 107, 47, 0.1);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.weather-info h3 {
    margin-top: 15px;
    color: var(--primary-color);
}

/* ITINERARIO (TIMELINE) */
.itinerario-section {
    position: relative;
    padding: 80px 0;
}

/* ITINERARIO (TIMELINE) - Senior Refinement */
.timeline {
    position: relative;
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: var(--accent-color);
    opacity: 0.2;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.active {
    opacity: 1;
    transform: translateY(0);
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 15px var(--accent-color);
}

.timeline-content {
    background: white;
    padding: 25px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    width: 90%;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(209, 142, 148, 0.15);
    z-index: 5;
}

@media (max-width: 768px) {
    .timeline::before { left: 15px; }
    .timeline-dot { left: 15px; }
    .timeline-content { 
        width: calc(100% - 50px); 
        margin-left: 50px;
        text-align: left;
        padding: 15px 20px;
        font-size: 0.9rem;
    }
    .timeline-content h3 { font-size: 1.1rem; }
}

.timeline-item.active .timeline-dot {
    background: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-color);
    transform: translateX(-50%) scale(1.3);
}

@media (max-width: 768px) {
    .timeline-item.active .timeline-dot {
        transform: scale(1.3);
    }
}

.time-tag {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
    display: block;
    margin-bottom: 5px;
}

.event-title {
    font-family: var(--font-head);
    font-size: 1.4rem;
    color: var(--text-color);
    margin: 0;
}

.event-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 5px;
}

.event-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    display: block;
}

/* Duplicate mobile timeline block removed — unified above */

/* MENUS SECTION ======================================== */
.menu-btn-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.btn-menu-toggle {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-menu-toggle:hover, .btn-menu-toggle.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 10px 20px rgba(85, 107, 47, 0.2);
}

.menu-display {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s ease;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    margin-top: 20px;
}

.menu-display.active {
    max-height: 1200px;
    padding: 30px;
    border: 1px solid rgba(85, 107, 47, 0.1);
}

.menu-category h4 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.menu-item {
    margin-bottom: 15px;
}

.menu-item strong {
    display: block;
    color: var(--text-color);
}

.menu-item span {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* SERVICE TEAM SECTION ======================================== */
.service-team-card {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    border: 1px solid rgba(85, 107, 47, 0.1);
    max-width: 600px;
    margin: 40px auto 0;
    text-align: center;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.team-member h5 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1rem;
}

.team-member p {
    font-size: 0.85rem;
    color: var(--text-light);
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

/* ANIMATIONS ======================================== */
/* Scroll Reveal Objects */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal.sequence-1 { transition-delay: 0.1s; }
.reveal.sequence-2 { transition-delay: 0.3s; }
.reveal.sequence-3 { transition-delay: 0.5s; }
.reveal.sequence-4 { transition-delay: 0.7s; }

/* Floating Leaves */
.leaf {
    position: fixed;
    width: 30px;
    height: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23556B2F"><path d="M12 2C7.589 2 4 5.589 4 9.995 3.971 16.44 11.696 21.784 12 22c0 0 8.029-5.56 8-12.005C20 5.589 16.411 2 12 2zm0 18.06c-1.353-1.116-6.03-5.286-6-10.065C6.014 6.697 8.691 4 12 4s5.986 2.697 6 5.995c.03 4.779-4.647 8.949-6 10.065z"/></svg>');
    background-size: cover;
    opacity: 0.3;
    pointer-events: none;
    z-index: 10;
    animation: drift linear infinite;
}

.leaf-1 { left: 10%; top: -50px; animation-duration: 15s; animation-delay: 2s; }
.leaf-2 { left: 50%; top: -50px; animation-duration: 25s; animation-delay: 5s; width: 40px; height: 40px; }
.leaf-3 { left: 85%; top: -50px; animation-duration: 18s; animation-delay: 0s; }

@keyframes drift {
    0% { transform: translateY(-50px) rotate(0deg); }
    100% { transform: translateY(110vh) rotate(360deg); }
}

/* Celebration Elements - ULTRA CLEAN LOOP */
.balloons-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none !important;
    z-index: 500 !important; /* Extremely low to be behind nav (9999) and buttons */
    overflow: hidden;
    display: none;
}

.balloons-container.active {
    display: block;
}

.balloon-img {
    position: absolute;
    width: 280px;
    height: auto;
    opacity: 0.9;
    right: 5%;
    /* Use a single animation to avoid transform overwriting */
    animation: balloonUltraClean 18s ease-in-out infinite;
    mix-blend-mode: multiply;
    pointer-events: none !important;
}

@keyframes balloonUltraClean {
    0% { transform: translateY(110vh) rotate(-10deg) translateX(0); opacity: 0; }
    10% { opacity: 0.9; }
    25% { transform: translateY(75vh) rotate(5deg) translateX(20px); }
    50% { transform: translateY(45vh) rotate(-8deg) translateX(-15px); }
    75% { transform: translateY(15vh) rotate(6deg) translateX(15px); }
    90% { opacity: 0.9; }
    100% { transform: translateY(-120vh) rotate(10deg) translateX(0); opacity: 0; }
}

.balloon-img:nth-child(2) {
    right: 25%;
    animation-duration: 22s;
    width: 240px;
}

.balloon-img:nth-child(3) {
    right: 45%;
    animation-duration: 26s;
    width: 260px;
}

/* Album Visor Modal */
.album-visor-container {
    display: none;
    position: fixed;
    z-index: 2000000 !important;
    padding: 20px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
}

.visor-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    border-radius: 12px;
    animation: zoomVisor 0.6s;
}

@keyframes zoomVisor {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

.visor-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.visor-close:hover {
    color: var(--accent-color);
}

/* Horizontal Background Drift Animation */
section {
    background-attachment: fixed;
    background-position: 50% 0;
    transition: background-position 0.2s ease-out;
}

.event-card, .qr-container-wrapper {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* DECORATIVE ELEMENTS BLENDING */
.ubica-btn-img, .rsvp-img-btn, .qr-code-img {
    mix-blend-mode: multiply !important;
    max-width: 100%;
    height: auto;
}

/* CUSTOM DRIVER.JS TOUR STYLES */
.custom-driver-popover {
    border-radius: 15px !important;
    padding: 20px !important;
    font-family: var(--font-body) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
    border: 1px solid rgba(85, 107, 47, 0.2) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .custom-driver-popover {
        max-width: 260px !important;
        padding: 12px !important;
    }
    .custom-driver-popover .driver-popover-title {
        font-size: 1.2rem !important;
    }
    .custom-driver-popover .driver-popover-description {
        font-size: 0.85rem !important;
    }
}

.custom-driver-popover .driver-popover-title {
    font-family: var(--font-head) !important;
    color: var(--primary-color) !important;
    font-size: 1.4rem !important;
    margin-bottom: 10px !important;
    font-weight: 600 !important;
}

.custom-driver-popover .driver-popover-description {
    color: var(--text-color) !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}

.custom-driver-popover .driver-popover-footer button {
    font-family: var(--font-body) !important;
    border-radius: 20px !important;
    text-transform: uppercase !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    padding: 8px 15px !important;
    transition: var(--transition) !important;
}

.custom-driver-popover .driver-popover-next-btn, 
.custom-driver-popover .driver-popover-done-btn {
    background-color: var(--primary-color) !important;
    color: white !important;
    text-shadow: none !important;
    border: none !important;
}

.custom-driver-popover .driver-popover-next-btn:hover, 
.custom-driver-popover .driver-popover-done-btn:hover {
    background-color: var(--text-color) !important;
    transform: translateY(-2px);
}

.custom-driver-popover .driver-popover-prev-btn {
    color: var(--primary-color) !important;
    background: transparent !important;
    border: 1px solid var(--primary-color) !important;
    text-shadow: none !important;
}

.custom-driver-popover .driver-popover-prev-btn:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.driver-popover-close-btn {
    color: var(--text-color) !important;
    font-size: 1.2rem !important;
    transition: var(--transition);
}

.driver-popover-close-btn:hover {
    color: var(--primary-color) !important;
    transform: scale(1.1);
}
