:root {
    --ocre: #B68D40;
    --ocre-claro: #D6AD60;
    --ocre-oscuro: #8B6914;
    --blanco: #FFFFFF;
    --blanco-hueso: #F8F4E9;
    --dorado: #d4a574;
    --dorado-claro: #e6b885;
    --dorado-oscuro: #c89968;
    --negro: #2c1810;
    --negro2: #3d2a1a;
    --tinta: #5A4A3A;
    --linea: #c45d52;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Montserrat", sans-serif;
    background: 
        var(--blanco-hueso),
        url('./fotos/textura.jpg');
    background-size: cover, 800px 800px;
    background-blend-mode: normal, multiply;
    background-attachment: fixed, fixed;
    color: var(--tinta);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

main {
    display: none;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s;
}

main.visible {
    display: block;
    opacity: 1;
    transform: none;
}

section {
    padding: 72px 24px;
    position: relative;
    isolation: isolate;
    --overlay-gradient: linear-gradient(rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.88));
    --divider-image: url('./fotos/tornpaper.png');
}

section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--section-image, none);
    background-size: cover;
    background-position: center;
    filter: blur(0.8px) saturate(1.3) contrast(1.1);
    transform: scale(1);
    opacity: 1;
}

section::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: 
        var(--overlay-gradient),
        url('./fotos/textura.jpg');
    background-size: cover, 600px 600px;
    background-position: center, 0 0;
    background-blend-mode: normal, multiply;
    opacity: 0.95;
    pointer-events: none;
}

section > * {
    position: relative;
    z-index: 2;
}

section:not(.section-divider-none)::before {
    box-shadow: inset 0 -40px 60px rgba(0, 0, 0, 0.08);
}

/* Divisores con papel rasgado */
section:not(.section-divider-none) {
    margin-bottom: 80px;
}

section:not(.section-divider-none) {
    position: relative;
}

section:not(.section-divider-none):last-of-type::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 80px;
    bottom: -40px;
    background: url('./fotos/tornpaper.png') center / cover no-repeat;
    z-index: 3;
    opacity: 0.7;
    pointer-events: none;
}

.section-light {
    --overlay-gradient: linear-gradient(to bottom, rgba(255, 255, 255, 0.90) 0%, rgba(255, 255, 255, 0.90) 100%);
    --divider-image: url('./fotos/tornpaper.png');
    color: var(--tinta);
}

.section-dark {
    --overlay-gradient: linear-gradient(to bottom, rgba(182, 141, 64, 0.85) 0%, rgba(139, 105, 20, 0.85) 100%);
    --divider-image: url('./fotos/tornpaper.png');
    color: #ffffff;
}

.section-gold {
    --overlay-gradient: linear-gradient(to bottom, rgba(212, 175, 55, 0.85) 0%, rgba(184, 148, 31, 0.85) 100%);
    --divider-image: url('./fotos/tornpaper.png');
    color: #ffffff;
}

.section-divider-none::after {
    display: none;
}

/* Secciones de fotos estilo polaroid */
.photo-section {
    --overlay-gradient: linear-gradient(to bottom, rgba(168, 52, 42, 0.90) 0%, rgba(139, 44, 35, 0.95) 100%);
    color: #ffffff;
    padding: 80px 24px;
}

.photo-section-light {
    padding: 80px 24px;
}

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

.photo-item {
    position: relative;
    background: #ffffff;
    padding: 15px 15px 60px 15px;
    border-radius: 5px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.08);
    transform: rotate(0deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-item:nth-child(odd) {
    transform: rotate(-2deg);
}

.photo-item:nth-child(even) {
    transform: rotate(1.5deg);
}

.photo-item:nth-child(3n) {
    transform: rotate(-1deg);
}

.photo-item:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.photo-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 3px;
}

.photo-item::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(182, 141, 64, 0.3), transparent);
}

/* Estilo de texto en polaroid */
.photo-item .photo-caption {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    font-size: 16px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .photo-gallery {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .photo-item img {
        height: 250px;
    }

    .photo-item:nth-child(odd),
    .photo-item:nth-child(even),
    .photo-item:nth-child(3n) {
        transform: rotate(0deg);
    }
}

/* Excepción para la sección final: mantener el gradiente pero sin divisor */
.final.section-divider-none::after {
    display: block;
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: 
        var(--overlay-gradient),
        url('./fotos/textura.jpg');
    background-size: cover, 600px 600px;
    background-position: center, 0 0;
    background-blend-mode: normal, multiply;
    opacity: 0.95;
    pointer-events: none;
    /* Sin el divisor de papel rasgado */
    height: 100%;
    bottom: 0;
}

[data-animate] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    transition-delay: var(--delay, 0s);
}

[data-animate="left"] {
    transform: translateX(-42px);
}

[data-animate="right"] {
    transform: translateX(42px);
}

[data-animate].is-visible {
    opacity: 1;
    transform: none;
}

.contenedor {
    width: min(960px, 90vw);
    margin: 0 auto;
}

.hero {
    padding: 128px 24px 112px;
    color: var(--negro);
    text-align: center;
    --section-image: url('./fotos/DSC_0228 copia.jpg');
    --overlay-gradient: linear-gradient(to bottom, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 25%, rgba(255, 255, 255, 0.65) 50%, rgba(255, 255, 255, 0.35) 80%, rgba(255, 255, 255, 0.15) 100%);
}

.hero h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(44px, 10vw, 72px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--negro);
    text-shadow: 0 2px 12px rgba(44, 24, 16, 0.15);
    font-weight: 700;
}

.hero-intro {
    font-size: 16px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--negro2);
    font-weight: 600;
}

.hero-fecha {
    margin-top: 22px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--negro);
}

.hero-invitacion {
    margin-top: 26px;
    font-family: "Great Vibes", cursive;
    font-size: clamp(38px, 8vw, 56px);
    color: var(--ocre-oscuro);
    letter-spacing: 0.04em;
    text-shadow: 0 2px 8px rgba(44, 24, 16, 0.2);
}

.hero-lugar {
    margin-top: 14px;
    font-family: "Cormorant Garamond", serif;
    font-size: 24px;
    letter-spacing: 0.08em;
    color: var(--negro2);
    font-weight: 500;
}

.hero-invitado {
    margin: 24px 0;
    padding: 20px 30px;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.15), rgba(212, 165, 116, 0.25));
    border-radius: 16px;
    border: 2px solid rgba(212, 165, 116, 0.3);
    box-shadow: 0 8px 24px rgba(168, 52, 42, 0.1);
    text-align: center;
}

.invitado-nombre {
    font-family: "Playfair Display", serif;
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 600;
    color: var(--negro);
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.invitado-personas {
    font-family: "Cormorant Garamond", serif;
    font-size: 18px;
    color: #a8342a;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-botones {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 36px;
}

.save-date {
    padding: 110px 24px 90px;
    color: #ffffff;
    text-align: center;
    --section-image: url('./fotos/DSC_0233 copia.jpg');
    --overlay-gradient: linear-gradient(to bottom, rgba(44, 24, 16, 0.95) 0%, rgba(61, 42, 26, 0.82) 25%, rgba(182, 141, 64, 0.6) 50%, rgba(182, 141, 64, 0.35) 80%, rgba(182, 141, 64, 0.15) 100%);
}

.save-date .contenedor {
    display: flex;
    justify-content: center;
}

.save-date-card {
    width: min(880px, 100%);
    background: 
        linear-gradient(145deg, rgba(44, 24, 16, 0.94), rgba(61, 42, 26, 0.90)),
        url('./fotos/textura.jpg');
    background-size: cover, 200px 200px;
    background-blend-mode: normal, multiply;
    border-radius: 32px;
    border: 2px solid var(--dorado);
    box-shadow: 
        0 40px 80px rgba(44, 24, 16, 0.6),
        inset 0 2px 4px rgba(255, 255, 255, 0.1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    padding: clamp(34px, 6vw, 48px);
    display: grid;
    gap: clamp(26px, 6vw, 48px);
    align-items: center;
    position: relative;
    overflow: hidden;
}

@media (min-width: 860px) {
    .save-date-card {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        text-align: left;
    }
}

.save-date-photo {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    padding: 26px 26px 38px;
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.28);
    display: grid;
    gap: 18px;
    justify-items: center;
}

.save-date-photo::before {
    content: "";
    position: absolute;
    width: 120px;
    height: 20px;
    top: 18px;
    left: 50%;
    transform: translateX(-50%) rotate(-5deg);
    background: rgba(255, 255, 255, 0.78);
    border-radius: 6px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.photo-frame {
    width: min(260px, 62vw);
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 1;
}

.photo-caption {
    font-family: "Great Vibes", cursive;
    font-size: 24px;
    color: var(--ocre);
    letter-spacing: 0.08em;
    position: relative;
    z-index: 1;
}

.save-date-info {
    display: grid;
    gap: 18px;
}

.save-date-eyebrow {
    font-family: "Cormorant Garamond", serif;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    font-size: 15px;
    color: #d4a574;
    display: inline-block;
}

.save-date-title {
    font-family: "Playfair Display", serif;
    font-size: clamp(34px, 6vw, 46px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--dorado);
}

.save-date-note {
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    letter-spacing: 0.06em;
    color: rgba(244, 238, 228, 0.7);
    line-height: 1.7;
}

.save-date-info .boton {
    justify-self: start;
}

@media (max-width: 859px) {
    .save-date-info .boton {
        justify-self: center;
    }
}

.countdown {
    padding: 136px 24px 120px;
    text-align: center;
    color: var(--negro);
    font-family: "Playfair Display", serif;
    --section-image: url('./fotos/DSC_0261 copia.jpg');
    --overlay-gradient: linear-gradient(to bottom, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.78) 25%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0.25) 80%, rgba(255, 255, 255, 0.1) 100%);
}

.countdown .intro-line {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(20px, 4vw, 28px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--negro2);
    font-weight: 600;
}

.countdown h2 {
    font-size: clamp(48px, 9vw, 68px);
    margin-top: 18px;
    letter-spacing: 0.08em;
    text-transform: none;
    color: var(--negro);
    text-shadow: 0 2px 10px rgba(44, 24, 16, 0.15);
}

.countdown p {
    margin-top: 12px;
    font-size: 18px;
    letter-spacing: 0.04em;
    color: var(--negro2);
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
}

.save-date-calendar {
    margin-top: 12px;
    background: #3a2317;
    border-radius: 28px;
    padding: 28px 34px 34px;
    display: grid;
    gap: 24px;
    justify-items: center;
    width: min(320px, 100%);
}

.save-date-month {
    font-family: "Playfair Display", serif;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: 16px;
    color: var(--dorado-claro);
    font-weight: 600;
}

.save-date-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 16px 14px;
    width: 100%;
}

.save-date-day-name {
    font-family: "Cormorant Garamond", serif;
    font-size: 12px;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: #ffffff;
    text-align: center;
}

.save-date-day {
    position: relative;
    font-family: "Montserrat", sans-serif;
    font-size: 15px;
    letter-spacing: 0.16em;
    text-align: center;
    color: #ffffff;
    font-weight: 500;
}

.save-date-day--muted {
    color: rgba(107, 31, 26, 0.4);
}

.save-date-day--highlight {
    color: #ffffff;
    font-weight: 800;
    background: transparent;
    position: relative;
}

.save-date-day--highlight::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle at 45% 35%, rgba(255, 215, 0, 0.4), rgba(255, 193, 7, 0.2));
    border: 2px solid var(--dorado);
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.3),
        0 8px 16px rgba(255, 215, 0, 0.2);
}

.countdown-grid {
    margin-top: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 42px;
    flex-wrap: wrap;
}

.countdown-item {
    display: grid;
    gap: 10px;
    justify-items: center;
}

.countdown-number {
    font-size: clamp(36px, 7vw, 54px);
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--negro2);
    text-shadow: 0 10px 24px rgba(15, 15, 15, 0.18);
}

.countdown-number--seconds {
    color: var(--dorado);
}

.countdown-label {
    font-family: "Cormorant Garamond", serif;
    font-size: 15px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--negro2);
    font-weight: 600;
}

.dress-code {
    text-align: center;
    --section-image: url('./fotos/DSC_0271 copia2.jpg');
    --overlay-gradient: linear-gradient(to bottom, rgba(168, 52, 42, 0.95) 0%, rgba(139, 44, 35, 0.90) 100%);
}

.dress-code h2 {
    font-family: "Playfair Display", serif;
    font-size: clamp(30px, 5vw, 40px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffffff;
    font-weight: 700;
}

.dress-code .palette {
    margin: 28px auto 0;
    display: flex;
    justify-content: center;
    gap: 18px;
}

.dress-code .palette span {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 12px 24px rgba(15, 15, 15, 0.18);
}

.dress-code p {
    margin: 28px auto 0;
    max-width: 640px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    font-weight: 500;
}

.mapa {
    --section-image: url('./fotos/DSC_0295 copia3.jpg');
    --overlay-gradient: linear-gradient(to bottom, rgba(168, 52, 42, 0.95) 0%, rgba(139, 44, 35, 0.90) 100%);
}

.mapa-card {
    background: 
        linear-gradient(135deg, rgba(168, 52, 42, 0.97), rgba(139, 44, 35, 0.93)),
        url('./fotos/textura.jpg');
    background-size: cover, 250px 250px;
    background-blend-mode: normal, multiply;
    border-radius: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 30px 60px rgba(44, 24, 16, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.6),
        inset 0 -1px 2px rgba(44, 24, 16, 0.1);
    padding: 36px 32px;
    display: grid;
    gap: 32px;
    position: relative;
    overflow: hidden;
}

.mapa-info {
    text-align: left;
}

.mapa-info h2 {
    font-family: "Playfair Display", serif;
    font-size: clamp(30px, 5vw, 40px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffffff;
}

.mapa-info p {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.mapa-links {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.mapa-frame iframe {
    width: 100%;
    min-height: 320px;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 22px 36px rgba(15, 15, 15, 0.12);
}

.boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 26px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--dorado);
}

.boton:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 15, 15, 0.18);
}

.boton:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.75);
    outline-offset: 4px;
}

.boton.primario {
    background: var(--dorado);
    color: #ffffff;
    border: 1px solid transparent;
    font-weight: 600;
}

.boton.secundario {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.7);
}

.programa-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr);
    grid-template-areas: "time icon info";
    align-items: center;
    margin: 44px 0;
    position: relative;
    gap: 18px;
    column-gap: 20px;
}

.item-time {
    grid-area: time;
    justify-self: end;
    font-family: "Playfair Display", serif;
    font-size: 18px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(244, 238, 228, 0.75);
    text-align: right;
    margin-right: 28px;
}

.item-icon {
    grid-area: icon;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(244, 238, 228, 0.92);
    border: 3px solid rgba(182, 141, 64, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 22px 40px rgba(44, 24, 16, 0.28);
    color: var(--negro2);
    position: relative;
    z-index: 2;
    margin: 0 auto;
}

.item-info {
    grid-area: info;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-self: start;
    margin: 0;
    gap: 8px;
}

.programa-item:nth-child(even) {
    grid-template-areas: "info icon time";
}

.programa-item:nth-child(odd) .item-info {
    justify-self: start;
}

.programa-item:nth-child(even) {
    grid-template-areas: "info icon time";
}

.programa-item:nth-child(even) .item-info {
    justify-self: end;
}

.programa-item:nth-child(even) .item-time {
    justify-self: start;
    text-align: left;
    margin-left: 28px;
    margin-right: 0;
}

.programa {
    --section-image: url('./fotos/DSC_0338 copia.jpg');
    --overlay-gradient: linear-gradient(to bottom, rgba(168, 52, 42, 0.95) 0%, rgba(139, 44, 35, 0.90) 100%);
}

.programa .contenedor {
    display: flex;
    justify-content: center;
}

.programa-panel {
    width: min(440px, 100%);
}

.programa-header {
    text-align: center;
}

.programa-header .the {
    display: block;
    font-family: "Cormorant Garamond", serif;
    font-size: 30px;
    color: rgba(244, 238, 228, 0.6);
    font-style: italic;
    transform: translateY(-10px);
}

.programa-header h2 {
    font-family: "Playfair Display", serif;
    font-size: clamp(32px, 6vw, 50px);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #f6f0e2;
}

.programa .intro {
    margin: 16px auto 0;
    text-align: center;
    color: rgba(244, 238, 228, 0.72);
    max-width: 380px;
}

.programa-track {
    position: relative;
    margin-top: 48px;
    padding: 12px 0 32px;
}

.programa-track::before {
    content: "";
    position: absolute;
    top: 36px;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: rgba(244, 238, 228, 0.28);
}

.item-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.item-title {
    font-family: "Playfair Display", serif;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #f6f0e2;
    width: 100%;
    text-align: center;
}

.item-desc {
    margin-top: 6px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-size: 11px;
    color: rgba(244, 238, 228, 0.58);
    width: 100%;
    text-align: center;
}

.item-note {
    margin-top: 12px;
    font-size: 14px;
    color: rgba(244, 238, 228, 0.78);
    line-height: 1.6;
    width: 100%;
    text-align: center;
}

.programa-item:first-child {
    margin-top: 0;
}

.programa-item:last-child {
    margin-bottom: 0;
}

.historia {
    color: var(--negro);
    text-align: center;
    padding: 96px 24px;
    --section-image: url('./fotos/DSC_0341 copia.jpg');
    --overlay-gradient: linear-gradient(to bottom, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 30%, rgba(255, 255, 255, 0.7) 60%, rgba(255, 255, 255, 0.45) 100%);
}

.historia blockquote {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(22px, 4vw, 30px);
    letter-spacing: 0.06em;
    color: var(--negro);
    font-weight: 500;
}

.historia cite {
    display: block;
    margin-top: 24px;
    font-size: 14px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--negro2);
    font-weight: 600;
}

.regalos {
    text-align: center;
    color: #ffffff;
    --section-image: url('./fotos/DSC_0295 copia3.jpg');
    --overlay-gradient: linear-gradient(to bottom, rgba(168, 52, 42, 0.95) 0%, rgba(139, 44, 35, 0.90) 100%);
}

.regalos-card {
    background: 
        linear-gradient(135deg, rgba(168, 52, 42, 0.97), rgba(139, 44, 35, 0.93)),
        url('./fotos/textura.jpg');
    background-size: cover, 250px 250px;
    background-blend-mode: normal, multiply;
    border-radius: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 30px 60px rgba(44, 24, 16, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.6),
        inset 0 -1px 2px rgba(44, 24, 16, 0.1);
    padding: 36px 32px;
    position: relative;
    overflow: hidden;
}

.regalos-info {
    text-align: center;
}

.regalos-info h2 {
    font-family: "Playfair Display", serif;
    font-size: clamp(30px, 5vw, 40px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffffff;
}

.regalos-info p {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

.regalos-note {
    margin-top: 32px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-align: left;
}

.note-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(145deg, var(--dorado), var(--dorado-oscuro));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.note-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.regalos-note p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
}

@media (max-width: 720px) {
    .regalos-card {
        padding: 28px 22px;
    }
    
    .regalos-note {
        padding: 20px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.final {
    text-align: center;
    color: var(--negro);
    --section-image: url('./fotos/DSC_0343 copia.jpg');
    --overlay-gradient: linear-gradient(to bottom, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 30%, rgba(255, 255, 255, 0.7) 60%, rgba(255, 255, 255, 0.45) 100%);
}

.final-card {
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(250, 246, 236, 0.93)),
        url('./fotos/textura.jpg');
    background-size: cover, 250px 250px;
    background-blend-mode: normal, multiply;
    border-radius: 24px;
    border: 2px solid rgba(182, 141, 64, 0.3);
    box-shadow: 
        0 30px 60px rgba(44, 24, 16, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.6),
        inset 0 -1px 2px rgba(44, 24, 16, 0.1);
    padding: 36px 32px;
    display: grid;
    gap: 32px;
    position: relative;
    overflow: hidden;
}

.final-info {
    text-align: center;
}

.final-info h2 {
    font-family: "Playfair Display", serif;
    font-size: clamp(30px, 5vw, 40px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--negro);
}

.final-info p {
    margin-top: 16px;
    color: var(--negro);
    line-height: 1.7;
}

.final-botones {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.final h2 {
    font-family: "Playfair Display", serif;
    font-size: clamp(34px, 6vw, 48px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dorado);
    font-weight: 700;
}

.final p {
    margin-top: 18px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
}

footer {
    text-align: center;
    padding: 48px 24px 64px;
    color: rgba(61, 61, 61, 0.65);
    font-size: 14px;
    position: relative;
    isolation: isolate;
    --overlay-gradient: linear-gradient(to bottom, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 30%, rgba(255, 255, 255, 0.7) 60%, rgba(255, 255, 255, 0.5) 100%);
    --section-image: url('./fotos/DSC_0259 copia.jpg');
}

footer::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: var(--overlay-gradient), var(--section-image, none);
    background-size: cover;
    background-position: center;
    filter: blur(2px);
    opacity: 0.95;
}

/* Envelope overlay */
#pantalla-sobre {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 32px 16px;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.65), rgba(230, 201, 118, 0.45)),
        url('./fotos/DSC_0236 copia.jpg') center / cover no-repeat;
    z-index: 9999;
    transition: opacity 0.6s ease;
    overflow: auto;
}

#pantalla-sobre.oculta {
    opacity: 0;
    pointer-events: none;
}

.overlay-card {
    width: min(420px, 92vw);
    background: 
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(250, 246, 236, 0.96)),
        url('./fotos/textura.jpg');
    background-size: cover, 300px 300px;
    background-blend-mode: normal, multiply;
    border-radius: 32px;
    box-shadow: 
        0 40px 80px rgba(44, 28, 16, 0.25),
        inset 0 2px 6px rgba(255, 255, 255, 0.8),
        inset 0 -2px 4px rgba(44, 24, 16, 0.08);
    padding: 42px 34px 48px;
    position: relative;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}

.overlay-card::before {
    content: "";
    position: absolute;
    inset: -140px -60px auto;
    height: 260px;
    background:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.65) 40%, rgba(255, 255, 255, 0.35) 100%),
        url('./fotos/DSC_0262 copia.jpg');
    background-size: cover;
    background-position: center top;
    filter: saturate(1.2) contrast(1.1);
    border-bottom-right-radius: 80% 60%;
    border-bottom-left-radius: 80% 60%;
    z-index: -1;
    opacity: 0.95;
}

.overlay-card::after {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 28px;
    border: 1px solid rgba(44, 24, 16, 0.18);
    pointer-events: none;
}

.overlay-header {
    display: grid;
    gap: 10px;
    justify-items: center;
    color: var(--negro);
    margin-top: 80px;
}

.overlay-emblema {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--dorado), var(--dorado-oscuro));
    color: #ffffff;
    display: grid;
    place-items: center;
    font-family: "Playfair Display", serif;
    font-size: 26px;
    letter-spacing: 0.08em;
    box-shadow: 0 10px 24px rgba(182, 141, 64, 0.4);
}

.overlay-subtitulo {
    font-family: "Cormorant Garamond", serif;
    font-size: 16px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ocre);
}

.overlay-header h2 {
    font-family: "Great Vibes", cursive;
    font-size: clamp(40px, 9vw, 58px);
    color: var(--negro);
    letter-spacing: 0.06em;
}

.sobre {
    position: relative;
    width: min(320px, 78vw);
    margin: 34px auto 30px;
    perspective: 1400px;
}

.sobre-cuerpo {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 26px;
    background-image:
        linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.32)),
        url('https://www.transparenttextures.com/patterns/french-stucco.png'),
        linear-gradient(135deg, #8b2c23, #a8342a);
    background-size: cover, 260px, cover;
    background-blend-mode: overlay, multiply, normal;
    box-shadow: 0 26px 42px rgba(44, 24, 16, 0.38);
    overflow: hidden;
}

.sobre-cuerpo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.4), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.25), transparent 55%);
    mix-blend-mode: soft-light;
    opacity: 0.7;
}

.sobre-cuerpo::after {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 20px;
    border: 1px solid rgba(44, 24, 16, 0.28);
    opacity: 0.55;
}

.sobre-frente {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-image:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0.35)),
        url('https://www.transparenttextures.com/patterns/french-stucco.png'),
        linear-gradient(145deg, #a8342a, #8b2c23);
    background-size: cover, 260px, cover;
    background-blend-mode: soft-light, multiply, normal;
}

.sobre-frente::before {
    content: "";
    position: absolute;
    inset: 18px 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    mix-blend-mode: overlay;
    clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
    opacity: 0.55;
}

.sobre-frente::after {
    content: "";
    position: absolute;
    width: 140%;
    height: 140%;
    left: 50%;
    bottom: -72%;
    transform: translateX(-50%);
    background-image:
        linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.34)),
        url('https://www.transparenttextures.com/patterns/french-stucco.png'),
        linear-gradient(140deg, #8b2c23, #a8342a);
    background-size: cover, 280px, cover;
    background-blend-mode: soft-light, multiply, normal;
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
    filter: brightness(1.02);
}

.sobre-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 110%;
    background-image:
        linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0.32)),
        url('https://www.transparenttextures.com/patterns/french-stucco.png'),
        linear-gradient(140deg, #a8342a, #8b2c23);
    background-size: cover, 240px, cover;
    background-blend-mode: soft-light, multiply, normal;
    clip-path: polygon(0 0, 100% 0, 50% 90%);
    transform-origin: top center;
    box-shadow: inset 0 -14px 24px rgba(0, 0, 0, 0.25);
    transition: transform 1.1s cubic-bezier(0.75, 0, 0.24, 1);
}

.sobre.abierto .sobre-flap {
    transform: rotateX(-180deg);
}

.sobre-flap::before {
    content: "";
    position: absolute;
    inset: 18px 18px 60px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    opacity: 0.6;
}

.sobre-flap::after {
    content: "";
    position: absolute;
    inset: auto 24px 28px;
    height: 12px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
    opacity: 0.7;
}

.sobre-sombra {
    position: absolute;
    inset: 12px;
    border-radius: 22px;
    background: radial-gradient(circle at 50% 120%, rgba(0, 0, 0, 0.25), transparent 70%);
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.sello {
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92px;
    height: 92px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: radial-gradient(circle at 32% 30%, #ffe8b5, #e0b861, #b27c2f);
    box-shadow: inset 0 8px 12px rgba(255, 255, 255, 0.35), inset 0 -10px 18px rgba(0, 0, 0, 0.35), 0 18px 34px rgba(44, 24, 16, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease, opacity 0.4s ease;
    z-index: 5;
}

.sello-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sello-icon svg {
    width: 50px;
    height: 50px;
    fill: none;
    stroke: rgba(86, 64, 30, 0.85);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sello-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sello:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.85);
    outline-offset: 6px;
}

.overlay-info {
    display: grid;
    gap: 10px;
    justify-items: center;
    color: var(--tinta);
}

.overlay-fecha {
    font-family: "Playfair Display", serif;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 15px;
}

.overlay-lugar {
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(44, 28, 16, 0.78);
}

.overlay-links {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
}

.overlay-link {
    display: grid;
    gap: 8px;
    justify-items: center;
    text-decoration: none;
    color: var(--tinta);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.overlay-link-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f5ecdc, #e6c976);
    border: 1px solid rgba(44, 28, 16, 0.18);
    display: grid;
    place-items: center;
    box-shadow: 0 14px 28px rgba(44, 28, 16, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.overlay-link-icon svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.overlay-link:hover {
    color: var(--negro2);
}

.overlay-link:hover .overlay-link-icon {
    transform: translateY(-3px);
    box-shadow: 0 18px 32px rgba(44, 28, 16, 0.25);
}

section:not(:first-child):not(.section-divider-none) {
    position: relative;
}

section:not(:first-child):not(.section-divider-none)::before {
    box-shadow: 
        inset 0 60px 120px rgba(0, 0, 0, 0.08), 
        inset 0 -60px 100px rgba(0, 0, 0, 0.12),
        0 20px 40px rgba(44, 24, 16, 0.15);
}

/* Efectos específicos para secciones claras */
.section-light {
    position: relative;
}

.section-light::before {
    box-shadow: 
        inset 0 60px 120px rgba(44, 24, 16, 0.06), 
        inset 0 -60px 100px rgba(44, 24, 16, 0.1),
        0 25px 50px rgba(44, 24, 16, 0.18);
}

/* Efectos específicos para secciones oscuras */
.section-dark {
    position: relative;
}

.section-dark::before {
    box-shadow: 
        inset 0 60px 120px rgba(255, 255, 255, 0.04), 
        inset 0 -60px 100px rgba(0, 0, 0, 0.25),
        0 30px 60px rgba(0, 0, 0, 0.3);
}

/* Efecto de papel rasgado en los bordes */
section {
    border-radius: 0;
}

section:not(.section-divider-none) {
    margin-bottom: 0px;
}

@media (max-width: 720px) {
    section {
        padding: 56px 20px;
    }

    .hero {
        padding: 110px 20px 80px;
    }

    .hero-botones {
        gap: 12px;
    }

    .save-date {
        padding: 96px 20px 76px;
    }

    .save-date-card {
        padding: 28px 24px 34px;
        gap: 24px;
    }

    .save-date-photo {
        padding: 22px 22px 32px;
    }

    .photo-caption {
        font-size: 22px;
    }

    .countdown {
        padding: 110px 18px 96px;
    }

    .countdown-grid {
        gap: 28px;
    }

    .countdown-number {
        font-size: clamp(30px, 9vw, 44px);
        letter-spacing: 0.18em;
    }

    .dress-code .palette {
        flex-wrap: wrap;
        gap: 12px;
    }

    .programa-track::before {
        left: 50%;
    }

    .programa-item {
        grid-template-columns: minmax(0, 0.6fr) 64px minmax(0, 0.6fr);
        column-gap: 14px;
        gap: 12px;
        margin: 32px 0;
    }

    .programa-item .item-icon {
        transform: none;
        margin: 0 auto;
    }

    .programa-item .item-time {
        font-size: 16px;
        letter-spacing: 0.12em;
        margin-right: 18px;
    }

    .programa-item:nth-child(even) .item-time {
        margin-left: 18px;
    }

    .item-info {
        max-width: 190px;
        gap: 6px;
    }

    .mapa-card {
        padding: 28px 22px;
    }

    .mapa-info {
        text-align: center;
    }

    .mapa-links {
        justify-content: center;
    }

    .mapa-frame iframe {
        min-height: 260px;
    }
}

@media (min-width: 860px) {
    .mapa-card {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
        align-items: center;
        padding: 42px 46px;
    }

    .mapa-info {
        padding-right: 36px;
    }
}

@media (max-width: 720px) {
    .final-card {
        padding: 28px 22px;
    }
}

@media (max-width: 520px) {
    .photo-frame {
        width: min(220px, 80vw);
    }

    .countdown-grid {
        gap: 20px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .countdown-item {
        min-width: 68px;
    }

    .countdown-label {
        letter-spacing: 0.24em;
        font-size: 13px;
    }
}

@media (min-width: 980px) {
    .hero {
        background-position: center;
    }
}