@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Quicksand:wght@400;600&display=swap');

:root {
    --honey-primary: #FCEEB5;
    /* Soft Winnie Pooh Yellow */
    --honey-secondary: #E9A139;
    /* Golden Honey */
    --honey-accent: #D32F2F;
    /* Classic Red Balloon */
    --honey-text: #5D4037;
    /* Dark Wood/Honey Brown */
    --honey-bg: #FFF9E1;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--honey-bg);
    color: var(--honey-text);
    overflow-x: hidden;
    line-height: 1.6;
    height: 100vh;
    /* Para scroll snap */
}

h1,
h2,
h3 {
    font-family: 'Pacifico', cursive;
    color: var(--honey-secondary);
}

.invitation-container {
    width: 100%;
    height: 100vh;
    position: relative;
    z-index: 1;
    perspective: 1500px;
    /* Espacio 3D para el libro */
    overflow: hidden;
}

.page {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0;
    transform-origin: left center;
    transition: transform 1.2s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.8s;
    transform-style: preserve-3d;
}

.page.active {
    pointer-events: all;
    opacity: 1;
    z-index: 2;
    transform: rotateY(0deg);
}

.page.flipped {
    transform: rotateY(-180deg);
    opacity: 0;
    z-index: 1;
}

/* Esquina de pasar página (Oreja) - GRANDE */
.page-corner {
    position: absolute;
    bottom: 0;
    width: 120px;
    height: 120px;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-end;
}

.corner-next {
    right: 0;
    background: linear-gradient(135deg, transparent 50%, rgba(233, 161, 57, 0.35) 50%);
    justify-content: flex-end;
}

.corner-prev {
    left: 0;
    background: linear-gradient(225deg, transparent 50%, rgba(233, 161, 57, 0.35) 50%);
    justify-content: flex-start;
}

.page-corner:hover {
    filter: brightness(1.15);
}

/* Label hint */
.corner-next::before {
    content: '▶';
    position: absolute;
    bottom: 18px;
    right: 12px;
    font-size: 18px;
    color: rgba(0,0,0,0.55);
    animation: nudgeRight 1.5s infinite ease-in-out;
    pointer-events: none;
}
.corner-prev::before {
    content: '◀';
    position: absolute;
    bottom: 18px;
    left: 12px;
    font-size: 18px;
    color: rgba(0,0,0,0.55);
    animation: nudgeLeft 1.5s infinite ease-in-out;
    pointer-events: none;
}

.page-corner::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
    transition: all 0.3s ease;
}

.corner-next::after {
    right: 0;
    border-width: 0 0 80px 80px;
    border-color: transparent transparent transparent var(--honey-secondary);
    animation: flapNext 1.5s infinite ease-in-out;
}

.corner-prev::after {
    left: 0;
    border-width: 0 80px 80px 0;
    border-color: transparent var(--honey-secondary) transparent transparent;
    animation: flapPrev 1.5s infinite ease-in-out;
}

@keyframes flapNext {

    0%,
    100% {
        border-width: 0 0 80px 80px;
    }

    50% {
        border-width: 0 0 100px 100px;
        filter: brightness(1.1);
    }
}

@keyframes flapPrev {

    0%,
    100% {
        border-width: 0 80px 80px 0;
    }

    50% {
        border-width: 0 100px 100px 0;
        filter: brightness(1.1);
    }
}

@keyframes nudgeRight {
    0%, 100% { transform: translateX(0); opacity: 0.55; }
    50% { transform: translateX(5px); opacity: 1; }
}
@keyframes nudgeLeft {
    0%, 100% { transform: translateX(0); opacity: 0.55; }
    50% { transform: translateX(-5px); opacity: 1; }
}

/* Background Bee Animation */
.bee-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    /* Above everything */
}

.flying-bee {
    position: absolute;
    width: 40px;
    height: 40px;
    background: url('/assets/images/abeja.gif') no-repeat center/contain;
    /* Better Bee Icon */
    animation: flightPath 20s infinite linear;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
}

/* Honey Drip Effect */
.honey-drip {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: url('/assets/images/miel.gif') repeat-x;
    /* High quality honey drip */
    background-size: contain;
    z-index: 9998;
    /* Just below the bee (9999) but above everything else */
}

@keyframes flightPath {
    0% {
        transform: translate(5vw, 10vh) rotate(0deg);
    }

    25% {
        transform: translate(80vw, 30vh) rotate(20deg);
    }

    50% {
        transform: translate(10vw, 60vh) rotate(-10deg);
    }

    75% {
        transform: translate(70vw, 80vh) rotate(15deg);
    }

    100% {
        transform: translate(5vw, 10vh) rotate(0deg);
    }
}

/* Hero Section */
.hero,
.section {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: none;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    /* Sombra de libro */
}

/* El lomo del libro (Shadow in the middle) */
.page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.15), transparent);
    z-index: 5;
    pointer-events: none;
}

/* Hero Section Content */
.hero h1 {
    font-size: 2.2rem;
    margin-top: 15px;
}

.hero h2 {
    font-size: 1.8rem;
}

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

.countdown-item {
    background: var(--honey-secondary);
    color: white;
    padding: 10px;
    border-radius: 15px;
    min-width: 70px;
    box-shadow: 0 4px 10px rgba(233, 161, 57, 0.3);
}

.countdown-number {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.countdown-label {
    font-size: 0.7rem;
    text-transform: uppercase;
}

.section h2 {
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.8rem;
}

/* Maps */
.map-container {
    border-radius: 15px;
    overflow: hidden;
    margin-top: 15px;
    height: 200px;
    border: 3px solid var(--honey-primary);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Gift List */
.gift-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.gift-card:active {
    transform: scale(0.98);
}

.gift-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    background: #f0f0f0;
}

.gift-info {
    flex: 1;
}

.gift-info h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.1rem;
    color: var(--honey-text);
}

.btn-select {
    background: var(--honey-secondary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 25px;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #EEE;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
}

.btn-primary {
    width: 100%;
    background: var(--honey-secondary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(233, 161, 57, 0.4);
}

.attendance-btn-main {
    position: fixed;
    bottom: 20px;
    right: 80px;
    width: 55px;
    height: 55px;
    background: var(--honey-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    border: none;
    box-shadow: 0 10px 25px rgba(211, 47, 47, 0.4);
    z-index: 10001;
}

.music-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 145px;
    /* Al lado izquierdo del de asistencia */
    width: 55px;
    height: 55px;
    background: white;
    color: var(--honey-secondary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    border: 2px solid var(--honey-secondary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 10001;
    cursor: pointer;
}

.photo-frame {
    width: 100%;
    max-width: 280px;
    border: 8px solid white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: rotate(-2deg);
    margin-bottom: 20px;
}

.romantic-text {
    font-size: 1.1rem;
    font-style: italic;
    text-align: center;
    color: var(--honey-text);
    padding: 0 10px;
    line-height: normal;
}

/* Animations for selected items */
.selected-gifts-list {
    list-style: none;
}

.selected-item {
    background: #FFECB3;
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.selected-item::before {
    content: '🍯';
    margin-right: 10px;
}

/* Media Queries for small devices */
@media (max-width: 380px) {
    .countdown-container {
        gap: 8px;
    }

    .countdown-item {
        min-width: 60px;
        padding: 8px 5px;
    }

    .countdown-number {
        font-size: 1.2rem;
    }

    .countdown-label {
        font-size: 0.6rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }
}

/* Gift Collage Styles */
.gift-gallery {
    width: 60px;
    height: 60px;
    display: grid;
    gap: 2px;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f0f0;
    cursor: zoom-in;
    position: relative;
}

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

.gallery-2 {
    grid-template-columns: 1fr 1fr;
}

.gallery-3 {
    display: grid;
    grid-template-areas: 'a b' 'a c';
}

.gallery-3 img:nth-child(1) {
    grid-area: a;
}

.gallery-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.gift-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 20000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--honey-secondary);
    color: black;
    border: none;
    font-size: 30px;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 8px;
    z-index: 20001;
    transition: transform 0.2s, filter 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.lightbox-nav-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-50%) scale(1.1);
}