/* ==========================================================================
   CSS Variables & Typography
   ========================================================================== */
:root {
    /* Color Palette - Premium Version */
    --color-pink: #fce4ec;
    --color-pink-deep: #f06292;
    --color-gold: #b8860b; /* Dark Goldenrod for more contrast */
    --color-gold-light: #ffd700;
    --color-white: #FFFFFF;
    --color-lavender: #f3e5f5;
    --color-gray: #424242;
    --color-dark: #212121;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(184, 134, 11, 0.1);

    /* Fonts */
    --font-decorative: 'Great Vibes', cursive;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lora', serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Shadows & Transitions */
    --shadow-elegant: 0 10px 40px rgba(0, 0, 0, 0.08);
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-gray);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
    /* Evitar scroll si intro está visible */
}

body.no-scroll {
    overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-gold);
    font-weight: 400;
}

a {
    text-decoration: none;
    color: var(--color-gold);
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--color-pink);
}

/* ==========================================================================
   Typography Classes
   ========================================================================== */
.font-decorative {
    font-family: var(--font-decorative);
}

.text-gold {
    color: var(--color-gold);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-elegant {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-gold), #e8c991);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(198, 169, 122, 0.4);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-elegant::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #e8c991, var(--color-gold));
    opacity: 0;
    z-index: -1;
    transition: var(--transition-smooth);
}

.btn-elegant:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(198, 169, 122, 0.6);
}

.btn-elegant:hover::before {
    opacity: 1;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGold {
    0% {
        box-shadow: 0 0 0 0 rgba(198, 169, 122, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(198, 169, 122, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(198, 169, 122, 0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
        transform: translateY(5px);
    }
}

.fade-in-up {
    animation: fadeInUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

.delay-1 {
    animation-delay: 0.5s;
}

.delay-2 {
    animation-delay: 1s;
}

.delay-3 {
    animation-delay: 1.5s;
}

/* Reveal Animation (triggered by JS) */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Intro Screen
   ========================================================================== */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-white);
    background-image: radial-gradient(circle at center, var(--color-white) 0%, var(--color-pink) 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    transition: opacity 1.5s ease;
}

.intro-screen.hide {
    opacity: 0;
    pointer-events: none;
}

.intro-content {
    max-width: 600px;
    padding: var(--spacing-md);
    position: relative;
    z-index: 2;
}

.intro-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-gray);
    margin-bottom: var(--spacing-sm);
    font-style: italic;
}

.intro-name {
    font-family: var(--font-decorative);
    font-size: clamp(3rem, 10vw, 5rem);
    color: var(--color-gold);
    margin-bottom: var(--spacing-lg);
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.intro-decorations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

/* ==========================================================================
   Visibility utility
   ========================================================================== */
.hidden-content {
    display: none;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hidden-content.show {
    display: block;
    opacity: 1;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: url('../img/2M5A4814_websize.JPG.jpeg');
    /* Beautiful wedding/celebration placeholder */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

@media (max-width: 1024px) {
    .hero-section, .final-section {
        background-attachment: scroll !important;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(246, 214, 230, 0.4), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--color-white);
    padding: var(--spacing-md);
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    background: rgba(0, 0, 0, 0.2);
    display: inline-block;
    padding: 5px 20px;
    border-radius: 5px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-gold-light); /* Changed to gold-light for better pop */
}

.hero-title {
    font-family: var(--font-decorative);
    font-size: clamp(3.5rem, 15vw, 7rem);
    color: var(--color-white);
    margin-bottom: var(--spacing-sm);
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4);
    line-height: 1.1;
}

.hero-date {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 2px;
    font-weight: 300;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--color-white);
    font-size: 2rem;
    animation: fadeInOut 2s infinite ease-in-out;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .intro-screen {
        padding: var(--spacing-sm);
    }
    
    .intro-text {
        font-size: 1.2rem;
    }

    /* Titles are now handled by clamp() */
}

/* ==========================================================================
   Layout & Sections
   ========================================================================== */
.padding-section {
    padding: var(--spacing-xl) 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.bg-lavender {
    background-color: var(--color-lavender);
}

.section-title {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
    margin-bottom: var(--spacing-xs);
}

.section-subtitle {
    color: var(--color-gray);
}

@media (max-width: 480px) {
    .padding-section {
        padding: var(--spacing-lg) 0;
    }
    
    .container {
        width: 92%;
    }
}

/* ==========================================================================
   Countdown Timer
   ========================================================================== */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
    padding: 0 10px;
}

.countdown-box {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--color-pink);
    border-radius: 15px;
    padding: var(--spacing-sm) var(--spacing-xs);
    min-width: 80px;
    box-shadow: 0 4px 15px rgba(246, 214, 230, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition-smooth);
}

@media (max-width: 480px) {
    .countdown-box {
        min-width: 70px;
        padding: var(--spacing-xs);
    }
    
    .countdown-number {
        font-size: 1.8rem;
    }
    
    .countdown-label {
        font-size: 0.7rem;
    }
}

.countdown-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(246, 214, 230, 0.8);
    border-color: var(--color-gold);
}

.countdown-number {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    line-height: 1;
    margin-bottom: 5px;
}

.countdown-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-gray);
}

/* ==========================================================================
   Timeline / Mi Historia
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-md) 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--color-gold);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    left: 0;
}

.timeline-inverted {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--color-white);
    border: 4px solid var(--color-gold);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px rgba(198, 169, 122, 0.5);
}

.timeline-inverted .timeline-dot {
    left: -10px;
}

.timeline-content {
    padding: 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    position: relative;
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    text-align: left;
    transition: var(--transition-smooth);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(198, 169, 122, 0.3);
}

.timeline-content h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.timeline-content p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.timeline-img {
    width: 100%;
    border-radius: 10px;
    display: block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
}

.timeline-img:hover {
    transform: scale(1.03);
}

/* Timeline Responsive */
@media (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 15px;
        left: 0;
    }

    .timeline-inverted {
        left: 0;
    }

    .timeline-dot {
        left: 21px;
    }

    .timeline-inverted .timeline-dot {
        left: 21px;
    }

    .timeline-content {
        padding: 20px;
    }
}

/* ==========================================================================
   Event Details
   ========================================================================== */
.cards-container {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
}

.detail-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: var(--spacing-md);
    width: 320px;
    max-width: 100%;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
    border: 1px solid var(--glass-border);
    border-top: 5px solid var(--color-gold);
}

.detail-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(198, 169, 122, 0.3);
    border-top-color: var(--color-gold);
}

.detail-icon {
    font-size: 2.5rem;
    color: var(--color-gold);
    margin-bottom: var(--spacing-sm);
}

.detail-card h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.detail-card p {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-elegant);
    max-width: 1000px;
    margin: 0 auto;
}

/* ==========================================================================
   Photo Gallery
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 360px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-elegant);
    cursor: pointer;
    position: relative;
    aspect-ratio: 1 / 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.gallery-item::after {
    content: '\f00e';
    /* FontAwesome Magnifying Glass */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: var(--color-white);
    font-size: 2rem;
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 2;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(198, 169, 122, 0.6);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border: 5px solid var(--color-white);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--color-white);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--color-gold);
    text-decoration: none;
    cursor: pointer;
}

/* ==========================================================================
   Program Timeline
   ========================================================================== */
.schedule-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.schedule-item {
    display: flex;
    align-items: center;
    border-bottom: 1px dashed var(--color-gold);
    padding: var(--spacing-sm) 0;
    transition: var(--transition-smooth);
}

.schedule-item:last-child {
    border-bottom: none;
}

.schedule-item:hover {
    padding-left: 10px;
    background-color: rgba(246, 214, 230, 0.2);
}

.schedule-time {
    font-size: 2rem;
    min-width: 120px;
    margin-right: var(--spacing-md);
}

.schedule-event {
    font-size: 1.2rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .schedule-item {
        flex-direction: column;
        text-align: center;
    }

    .schedule-time {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

/* ==========================================================================
   RSVP Form
   ========================================================================== */
.rsvp-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-white);
    padding: var(--spacing-md);
    border-radius: 15px;
    box-shadow: var(--shadow-elegant);
}

.form-group {
    margin-bottom: var(--spacing-sm);
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(198, 169, 122, 0.4);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: #FAFAFA;
    transition: var(--transition-smooth);
    color: var(--color-gray);
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(198, 169, 122, 0.2);
    background-color: var(--color-white);
}

.rsvp-form .btn-elegant {
    width: 100%;
    margin-top: 10px;
}

/* ==========================================================================
   Gifts Section
   ========================================================================== */
.gift-box {
    max-width: 700px;
    margin: 0 auto;
    padding: var(--spacing-md);
    border: 2px dashed var(--color-gold);
    border-radius: 15px;
    background-color: rgba(246, 214, 230, 0.1);
}

.gift-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-style: italic;
    color: var(--color-gold);
    margin-bottom: 15px;
}

/* ==========================================================================
   Final Section & Footer
   ========================================================================== */
.final-section {
    position: relative;
    padding: var(--spacing-xl) 0;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../img/2M5A4655_websize.JPG.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--color-white);
}

.final-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8));
    z-index: 1;
}

.relative {
    position: relative;
}

.z-2 {
    z-index: 2;
}

.final-title {
    font-size: clamp(3.5rem, 15vw, 6rem);
    margin-bottom: 10px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    color: var(--color-white);
}

.final-text {
    font-size: 1.8rem;
    font-family: var(--font-body);
    font-style: italic;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.footer {
    background-color: #111;
    color: #888;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    /* Final section title and text are handled by clamp() or simple overrides */
    .final-text {
        font-size: 1.4rem;
        padding: 0 20px;
    }
}