/* VARIABLES ======================================== */
:root {
    --primary-color: #556B2F; /* Dark Olive Green */
    --secondary-color: #4a5d23;
    --accent-color: #d1cda8; /* Gold/Beige */
    --bg-color-main: #f9f9f9;
    --text-color: #2F4F4F; /* Dark Slate Gray */
    --text-light: #555555;
    --white: #ffffff;
    
    --font-head: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* RESET & BASE ======================================== */
html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden !important; /* Force no horizontal scroll */
    width: 100vw; /* Exact viewport width */
    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-color: var(--bg-color-main);
    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: 600;
}

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

ul {
    list-style: none;
}

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

.text-center { text-align: center; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 20px; }
.mt-4 { margin-top: 30px; }
.mt-5 { margin-top: 50px; }
.mb-3 { margin-bottom: 20px; }
.mb-4 { margin-bottom: 30px; }
.py-5 { padding: 60px 0; }
.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: 12px 30px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(85, 107, 47, 0.3);
}

.btn-primary:hover {
    background-color: var(--text-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 79, 79, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.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: #000 url('../sobre.png') no-repeat center center;
    background-size: cover;
    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: cover;
    pointer-events: none;
    /* Removed opacity: 0 to show first frame immediately */
}

@media (max-width: 768px) {
    .envelope-video {
        /* On mobile, ensure the video covers the vertical space */
        height: 100%;
        width: 100%;
        object-fit: cover;
    }
}

/* 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; /* Ensure it's above EVERYTHING */
    width: fit-content;
    max-width: 90vw; /* Tighten for small screens */
    border: 1px solid rgba(85, 107, 47, 0.2);
    /* Initial state: Hidden until envelope opens */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 1s ease, visibility 1s ease;
}

.ui-visible .floating-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.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: 100px; /* Increased for Desktop */
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 6px 20px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .audio-btn {
        width: 98px; /* ~50% of 195px */
        height: 63px; /* ~50% of 126px */
        top: 15px;
        right: 15px;
    }
    
    .share-icon-img {
        width: 140px; /* Even larger on mobile for easy touch */
        height: 140px;
    }
}

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

.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;
}

/* Hide cursor when typing is done or not active */
.typing-container.done::after {
    display: none;
}

/* 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: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 700;
    margin: 0;
    font-style: normal;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.85);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
    white-space: nowrap;
    opacity: 0.95;
    pointer-events: none;
    z-index: 5;
}

.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 {
    height: 100vh;           /* Fijo — no se achica ni se alarga */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    background: #000;
}

@media (max-width: 768px) {
    .hero-section {
        height: 100svh;       /* svh = safe viewport height — evita el recorte en móvil */
        min-height: 100svh;
    }
}

.hero-video-container {
    position: absolute;
    inset: 0; /* top/right/bottom/left: 0 — método más robusto */
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.hero-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
    border-radius: 0 !important;
}

.hero-content {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 30px 25px;
    border-radius: 35px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.2);
    z-index: 100;
    width: 90%;
    max-width: 500px;
    margin: -100px auto 30px; /* BRIDGE EFFECT: se monta sobre el video */
    border: 1px solid rgba(255,255,255,0.7);
    text-align: center;
    position: relative;
}

/* Desktop: puente más pronunciado */
@media (min-width: 992px) {
    .hero-content {
        padding: 40px 60px;
        max-width: 550px;
        margin: -120px auto 50px;
    }
}


/* Corner decorative images — positioned on the hero section */
.corner-img {
    position: absolute;
    z-index: 15;
    pointer-events: none;
    width: 250px; /* Larger for better framing */
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
    transition: var(--transition);
}

.corner-top-left {
    top: -40px; /* Tucked more into the corner */
    left: -40px;
    transform: rotate(-10deg);
}

.corner-bottom-right {
    bottom: -40px; /* Tucked more into the corner */
    right: -40px;
    transform: scaleX(-1) rotate(-10deg);
}

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

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

@keyframes slideInTopLeft {
    0% {
        opacity: 0;
        transform: translate(-100px, -100px) scale(0.8) rotate(-15deg);
    }
    100% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(-5deg);
    }
}

@keyframes slideInBottomRight {
    0% {
        opacity: 0;
        transform: translate(100px, 100px) scale(0.8) scaleX(-1) rotate(-15deg);
    }
    100% {
        opacity: 1;
        transform: translate(0, 0) scale(1) scaleX(-1) rotate(-5deg);
    }
}

@keyframes floatCorner {
    0%, 100% { transform: translate(0, 0) rotate(-5deg); }
    50% { transform: translate(8px, 8px) rotate(-2deg); }
}

@keyframes floatCornerReverse {
    0%, 100% { transform: translate(0, 0) scaleX(-1) rotate(-5deg); }
    50% { transform: translate(-8px, -8px) scaleX(-1) rotate(-2deg); }
}

/* Unified Location Card */
.unified-location-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 50px 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    max-width: 950px;
    margin: 40px auto 0;
    border: 1px solid rgba(255,255,255,0.8);
}

.pin-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.main-location-pin {
    width: 140px;
    height: auto;
    margin-bottom: 10px;
}

.location-grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 40px;
}

.location-col {
    flex: 1;
    padding: 0 25px;
}

.location-divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(85, 107, 47, 0.2), transparent);
    align-self: stretch;
}

.btn-location-link {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 15px;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(85, 107, 47, 0.2);
}

.btn-location-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(85, 107, 47, 0.3);
    background: var(--secondary-color);
}

@media (max-width: 768px) {
    .location-grid {
        flex-direction: column;
        gap: 30px;
    }
    .location-divider {
        width: 60%;
        height: 1px;
        margin: 10px auto;
        background: linear-gradient(to right, transparent, rgba(85, 107, 47, 0.2), transparent);
    }
    .unified-location-card {
        padding: 40px 20px;
        border-radius: 40px;
    }
    .main-location-pin {
        width: 100px;
    }
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.time-box {
    background: var(--white);
    padding: 15px;
    border-radius: 15px;
    min-width: 80px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border: 1px solid var(--accent-color);
}

.time-box .number {
    display: block;
    font-size: 2.2rem;
    font-family: var(--font-head);
    color: var(--primary-color);
    font-weight: 700;
}

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

.colon {
    font-size: 2rem;
    color: var(--accent-color);
    align-self: center;
}

.countdown-section {
    background: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.9)), url('../Invitaci\xf3n\20 Virtual\20 Boda\20 Fotogr\xe1fico\20 Verde\20 y\20 Blanco.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* RSVP IMPROVED */
.rsvp-custom-btn, .location-btn-img {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 20px auto !important;
    text-align: center !important;
    width: fit-content !important;
}

.rsvp-img-btn, .ubica-btn-img {
    width: 100%;
    max-width: 450px; /* Great size for mobile */
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.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));
}

/* FOOTER ======================================== */
.footer-credits {
    font-size: 0.8rem;
    color: var(--white);
    opacity: 0.7;
    margin-top: 50px;
}

.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: 2rem; }
    
    .footer-names h3 { font-size: 2.1rem; }
    
    .rsvp-custom-btn {
        max-width: 90% !important;
        margin: 0 auto;
    }

    /* hero-section height manejada por su propio @media (max-width:768px) block arriba */

    /* Placa puente — compacta en móvil */
    .hero-content {
        width: auto;
        max-width: 85vw;
        margin: -70px auto 20px;
        padding: 18px 20px;
        border-radius: 22px;
        position: relative;
        z-index: 10;
    }

    /* Título más pequeño en placa */
    .hero-content .subtitle {
        font-size: 0.75rem;
        margin-top: 0;
        letter-spacing: 2px;
    }

    .hero-content .date-txt {
        font-size: 0.9rem;
        margin-top: 4px;
    }

    .corner-img {
        width: 100px; /* Adjusted for mobile */
        opacity: 0.9;
    }
    
    .corner-top-left {
        top: -20px;
        left: -20px;
    }
    
    .corner-bottom-right {
        bottom: -20px;
        right: -20px;
    }

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

    .floating-nav a {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

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

    .photo-gallery-latest {
        max-width: 100% !important;
        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.1rem;
}

.empty-gallery {
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px dashed rgba(85, 107, 47, 0.3);
    border-radius: 20px;
    color: var(--text-light);
    margin: 20px auto;
    max-width: 400px;
}

.empty-gallery i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    opacity: 0.5;
}

.text-error {
    color: #ff4d4d;
    font-weight: 600;
}

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

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

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

/* Fecha más compacta en móvil */
@media (max-width: 768px) {
    .date-highlight .day { font-size: 2.4rem; }
    .date-highlight .month-year { font-size: 0.8rem; letter-spacing: 1.5px; padding-left: 10px; }
    .date-highlight { gap: 10px; margin-top: 6px; }
}

/* 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 */

/* 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;
}

.account-details p {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.store-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.store-btn-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(85, 107, 47, 0.1);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    animation: pulseLogo 3s infinite ease-in-out;
    min-width: 280px;
    height: 120px;
}

.store-btn-logo:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    background: #fff;
    border-color: var(--primary-color);
}

.gift-logo {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    background: white;
    padding: 10px;
    transition: var(--transition);
    object-fit: contain;
    filter: brightness(0.95);
}

.gift-logo:hover {
    filter: brightness(1.05);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

@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;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* 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;
}

.timeline {
    position: relative;
    max-width: 1000px; /* Optimized for web */
    margin: 0 auto;
    padding: 0 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--primary-color), transparent);
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(85, 107, 47, 0.2);
    transition: all 0.5s ease;
}

.timeline-content {
    width: 45%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
    transform: translateX(-100px);
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    transform: translateX(100px);
    text-align: left;
}

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

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

/* MOBILE NAV REFINEMENTS */
@media (max-width: 768px) {
    .floating-nav {
        width: 98% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: 10px;
        padding: 4px 8px;
    }
    .floating-nav ul {
        gap: 2px !important;
        justify-content: center !important;
    }
    .floating-nav a {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.95rem !important;
    }
    
    .timeline::before {
        left: 30px;
    }
    .timeline-dot {
        left: 30px;
    }
    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        transform: translateX(50px) !important;
        text-align: left !important;
    }
    .timeline-item.active .timeline-content {
        transform: translateX(0) !important;
    }
}

    box-shadow: 0 0 20px var(--accent-color);
    transform: translateX(-50%) scale(1.5);
}

.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;
}



/* MENUS SECTION ======================================== */
.menus-section {
    overflow: hidden; /* Evita desbordamiento lateral */
}

.menu-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;       /* Se rompe en 2 líneas si no caben */
    gap: 15px;
    margin-top: 30px;
    padding: 0 10px;       /* Margen lateral de seguridad */
}

.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);
}

/* =====================================================
   UBICACIÓN — BOTÓN ICONO + ETIQUETA
   ===================================================== */
.main-location-link {
    text-decoration: none !important;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
}

.location-icon-wrapper {
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
}

.main-location-pin {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.location-btn-label {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 2px;
    margin-top: 5px;
}

.main-location-link:hover .main-location-pin {
    transform: scale(1.1) rotate(5deg);
}

@media (max-width: 768px) {
    .location-icon-wrapper {
        width: 90px;
        height: 90px;
    }
    .location-btn-label {
        font-size: 0.9rem;
    }
}

/* =====================================================
   ESQUINAS — 4 VÉRTICES
   ===================================================== */

/* Tamaño base aumentado */
.corner-img {
    width: 280px; /* era 250px */
}

/* TOP-RIGHT: espejo horizontal de esquina1 */
.corner-top-right {
    top: -40px;
    right: -40px;
    transform: scaleX(-1) rotate(-10deg);
}

/* BOTTOM-LEFT: espejo horizontal de esquina2 */
.corner-bottom-left {
    bottom: -40px;
    left: -40px;
    transform: scaleX(-1) rotate(-10deg);
    z-index: 5; /* Detrás de la placa puente */
}

/* Las esquinas inferiores quedan detrás de la placa */
.corner-bottom-right {
    z-index: 5;
}

/* Animaciones de entrada para las nuevas esquinas */
.animate-corner-tr {
    animation: slideInTopRight 1.5s cubic-bezier(0.25, 0.8, 0.25, 1) 0.6s both,
               floatCornerReverse 6s ease-in-out 2.1s infinite;
}

.animate-corner-bl {
    animation: slideInBottomLeft 1.5s cubic-bezier(0.25, 0.8, 0.25, 1) 0.9s both,
               floatCorner 6s ease-in-out 2.4s infinite;
}

@keyframes slideInTopRight {
    0% { opacity: 0; transform: translate(100px, -100px) scale(0.8) scaleX(-1) rotate(-15deg); }
    100% { opacity: 1; transform: translate(0, 0) scale(1) scaleX(-1) rotate(-10deg); }
}

@keyframes slideInBottomLeft {
    0% { opacity: 0; transform: translate(-100px, 100px) scale(0.8) scaleX(-1) rotate(-15deg); }
    100% { opacity: 1; transform: translate(0, 0) scale(1) scaleX(-1) rotate(-10deg); }
}

/* Mobile: esquinas más pequeñas */
@media (max-width: 768px) {
    .corner-img { width: 130px; }
    .corner-top-left  { top: -15px; left: -15px; }
    .corner-top-right { top: -15px; right: -15px; }
    .corner-bottom-left  { bottom: -15px; left: -15px; }
    .corner-bottom-right { bottom: -15px; right: -15px; }
}

/* =====================================================
   MOBILE RESPONSIVE — CORRECCIONES COMPLETAS
   ===================================================== */
@media (max-width: 768px) {

    /* --- SECCIÓN TÍTULOS --- */
    .section-title {
        font-size: 1.9rem;
    }

    /* --- HERO CONTENT (PLACA PUENTE) --- */
    .hero-content {
        max-width: 88vw;
        margin: -70px auto 20px;
        padding: 16px 18px;
        border-radius: 20px;
    }
    .hero-content .names {
        font-size: 1.7rem;
    }

    /* --- CUENTA REGRESIVA --- */
    .countdown-container {
        gap: 6px;
        flex-wrap: nowrap;
        padding: 0 10px;
    }
    .time-box {
        min-width: 0;
        flex: 1;
        padding: 10px 6px;
    }
    .time-box .number {
        font-size: 1.6rem;
    }
    .time-box .label {
        font-size: 0.6rem;
        letter-spacing: 0;
    }
    .colon {
        font-size: 1.4rem;
        margin-bottom: 14px;
        flex-shrink: 0;
    }
    .btn-add-calendar {
        font-size: 0.8rem;
        padding: 12px 20px;
        letter-spacing: 0.5px;
    }

    /* --- GLOBAL MOBILE CENTERING & OVERFLOW FIX --- */
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative;
    }
    .container {
        width: 100% !important;
        padding: 0 20px !important;
        margin: 0 auto !important;
        max-width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    section {
        width: 100% !important;
        overflow: hidden !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .unified-location-card {
        margin: 30px auto !important;
        width: 95% !important;
        max-width: 500px !important;
    }

    /* Fix timeline shift */
    .timeline-content {
        width: calc(100% - 60px) !important;
        margin-left: 50px !important;
        margin-right: 10px !important;
        transform: none !important;
        text-align: left !important;
    }
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        transform: none !important;
        margin-left: 50px !important;
    }

    /* --- MENÚS (botones no se corten) --- */
    .menu-btn-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 15px !important;
        width: 100% !important;
        padding: 0 10px !important;
        margin: 30px auto 0 !important;
    }
    .btn-menu-toggle {
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
        justify-content: center !important;
        padding: 14px 15px !important;
        font-size: 0.9rem !important;
        white-space: normal !important;
    }


    /* --- UBICACIÓN --- */
    .location-col h3 {
        font-size: 1.1rem;
    }
    .btn-location-link {
        font-size: 0.8rem;
        padding: 10px 18px;
    }

    /* --- PADRINOS / HOSPEDAJE (grid) --- */
    .padrinos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .padrino-item {
        padding: 14px 12px;
    }

    /* --- MESA DE REGALOS --- */
    .gift-options {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    /* --- MESA DE REGALOS (RECONSTRUCCIÓN SEGURA) --- */
    .gift-options {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        width: 100% !important;
    }
    .gift-card {
        margin: 0 auto 20px !important;
        width: 100% !important;
        max-width: 330px !important;
        padding: 30px 20px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }
    .gift-card h4 {
        margin-bottom: 35px !important; /* Espacio real para no tapar */
        text-align: center !important;
        color: var(--primary-color) !important;
        font-weight: 700 !important;
        font-size: 1.3rem !important;
        width: 100% !important;
    }
    .store-links {
        display: flex !important;
        flex-direction: column !important;
        gap: 25px !important; /* Mucho espacio entre botones */
        width: 100% !important;
        align-items: center !important;
        margin-top: 0 !important;
    }
    .store-btn-logo {
        width: 100% !important;
        max-width: 250px !important;
        height: auto !important; /* Que crezca según la imagen */
        min-height: 90px !important;
        padding: 15px !important;
        margin: 0 auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        background: white !important;
        border-radius: 15px !important;
        box-shadow: 0 5px 15px rgba(0,0,0,0.08) !important;
        animation: none !important; /* Quitamos animación que pueda mover el logo */
    }
    .gift-logo {
        max-width: 100% !important;
        height: auto !important;
        max-height: 55px !important;
        border-radius: 12px !important;
        object-fit: contain !important;
        padding: 0 !important;
    }

    /* --- FOTOS --- */
    .btn-camera {
        padding: 14px 28px;
        font-size: 0.95rem;
    }
    .qr-container-wrapper {
        max-width: 200px;
    }

    /* --- RSVP / FOOTER --- */
    .rsvp-section .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    .rsvp-section p {
        font-size: 0.95rem;
        line-height: 1.5;
        max-width: 100%;
        margin-bottom: 20px;
        color: white !important;
    }
    .footer-names h3 {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }
    .footer-names p {
        font-size: 0.85rem !important;
        color: white !important;
        opacity: 0.9;
    }
    .footer-coordination {
        margin: 30px auto 0 !important;
        border-radius: 20px;
        padding: 25px 20px !important;
        background: rgba(0,0,0,0.45);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-top: 1px solid rgba(255,255,255,0.2);
        max-width: 100%;
    }
    .coordination-title {
        font-family: var(--font-accent);
        color: var(--accent-color);
        font-weight: 700;
        font-size: 0.9rem !important;
        line-height: 1.4;
        margin-bottom: 15px !important;
        text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    }
    .coordination-link {
        color: white !important;
        text-decoration: none;
        border-bottom: 1px solid var(--accent-color);
        padding-bottom: 2px;
        font-weight: 600;
        display: inline-block;
        font-size: 0.85rem !important;
        line-height: 1.3;
    }

    /* --- ITINERARIO (timeline) --- */
    .timeline-content {
        padding: 14px;
    }
    .time-tag { font-size: 1rem; }
    .event-title { font-size: 1.1rem; }
    .event-desc { font-size: 0.85rem; }

    /* --- CÓDIGO DE VESTIMENTA --- */
    .color-palette {
        gap: 10px;
    }
    .color-swatch {
        width: 34px;
        height: 34px;
    }

    /* --- NAV flotante ajustada para 11 ítems --- */
    .floating-nav {
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: fit-content !important;
        max-width: 95vw !important;
        padding: 6px 10px !important;
        bottom: 20px !important;
    }
    .floating-nav ul {
        gap: 2px !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .floating-nav a {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.85rem !important;
    }
}

/* Extra pequeño (≤ 390px) */
@media (max-width: 390px) {
    .section-title { font-size: 1.6rem; }
    .names         { font-size: 1.5rem; }
    .time-box .number { font-size: 1.3rem; }

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

    .floating-nav {
        padding: 3px 5px;
    }
    .floating-nav a {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.78rem !important;
    }
}
