/* VARIABLES */
:root {
    --main-bg: #f8f6f3;
    --main-bg-glass: rgba(255, 255, 255, 0.7);
    --accent: #b48a78;
    --accent-dark: #7c5e3c;
    --glass-blur: 16px;
    --radius: 1.5em;
    --shadow: 0 4px 32px rgba(180, 138, 120, 0.12);
    --white: #fff;
    --black: #23211f;
    --success: #7cb48a;
    --danger: #e57373;
}

/* RESET Y BASE */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--main-bg);
    color: var(--accent-dark);
    font-family: 'Muli', Arial, sans-serif;
    transition: background 0.4s, color 0.4s;
    min-height: 100vh;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Alice', serif;
    color: var(--accent-dark);
    margin-bottom: 0.5em;
}

h2 {
    font-size: 2.2em;
}

h3 {
    font-size: 1.5em;
}

p {
    margin-bottom: 1em;
}

/* NAVBAR */
.navbar {
    width: 100%;
    background: var(--main-bg-glass);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    transition: background 0.4s;
}

.navbar-container {
    max-width: 1100px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 1em;
}

.navbar-logo {
    font-family: 'Alice', serif;
    font-size: 2rem;
    color: var(--accent);
    font-weight: bold;
    letter-spacing: 2px;
    transition: color 0.3s;
}

.menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    position: relative;
}

.menu-icon span,
.menu-icon span:before,
.menu-icon span:after {
    display: block;
    background: var(--accent);
    height: 4px;
    width: 100%;
    border-radius: 2px;
    position: absolute;
    transition: all 0.3s;
}

.menu-icon span {
    top: 14px;
}

.menu-icon span:before {
    content: '';
    top: -10px;
}

.menu-icon span:after {
    content: '';
    top: 10px;
}

.navbar-menu {
    display: flex;
    gap: 1.5em;
    list-style: none;
}

.navbar-menu li a {
    color: var(--accent-dark);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s;
    border-radius: 0.5em;
    padding: 0.3em 0.7em;
}

.navbar-menu li a:hover,
.navbar-menu li a:focus {
    color: #fff;
    background: var(--accent);
    outline: none;
}

@media (max-width: 900px) {
    .navbar-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.5em 1em;
        position: relative;
    }

    .navbar-logo {
        order: 1;
    }

    .menu-icon {
        order: 2;
        display: block;
        margin-left: auto;
        margin-right: 0;
        align-self: center;
        z-index: 201;
    }

    .navbar-menu {
        order: 3;
        flex-direction: column;
        width: 100%;
        display: none;
        background: var(--main-bg-glass);
        margin-top: 0.5em;
        border-radius: 0 0 1em 1em;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 200;
    }

    .menu-toggle:checked+.menu-icon+.navbar-menu {
        display: flex;
    }
}

/* HERO */
.main-header.hero-bg {
    position: relative;
    background: url('../img/rec3.jpeg') center/cover no-repeat;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.main-header .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, var(--main-bg-glass) 30%, rgba(255, 255, 255, 0.2) 100%);
    /* backdrop-filter: blur(var(--glass-blur)); */
    z-index: 1;
    transition: background 0.4s;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem 1rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    animation: fadeInDown 1.5s;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    font-family: 'Alice', serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.main-title {
    font-family: 'Alice', serif;
    font-size: 3rem;
    color: var(--accent-dark);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.hero-phrase {
    font-size: 1.2em;
    color: var(--accent-dark);
    margin-bottom: 1.5em;
}

.save-date {
    background: #fff8f0;
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

.calendar-btn {
    display: inline-block;
    margin-top: 0.5rem;
    background: var(--accent);
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 1rem;
    font-weight: bold;
    transition: background 0.2s;
}

.calendar-btn:hover {
    background: var(--accent-dark);
}

.countdown {
    margin-top: 1.5rem;
    font-size: 1.5rem;
    color: var(--accent-dark);
    font-weight: bold;
    letter-spacing: 2px;
}

.scroll-down {
    margin-top: 2em;
    color: var(--accent);
    font-size: 2em;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(12px);
    }
}

/* SECCIONES GLASS */
section,
.esperamos,
.regalos,
.playlist,
.testimonios,
.agradecimientos {
    background: var(--main-bg-glass);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 2.5em auto;
    padding: 2em 1em;
    max-width: 900px;
    backdrop-filter: blur(var(--glass-blur));
    transition: background 0.4s;
}

@media (max-width: 600px) {

    section,
    .esperamos,
    .regalos,
    .playlist,
    .testimonios,
    .agradecimientos {
        padding: 1.2em 0.5em;
    }
}

/* HISTORIA */
.personas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2.5rem;
}

.persona {
    background: #fff;
    border-radius: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    padding: 2.5rem 2rem 2rem 2rem;
    width: 340px;
    max-width: 95vw;
    min-width: 260px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 0 1rem;
}

.persona:hover {
    transform: translateY(-10px) scale(1.04);
    box-shadow: 0 8px 32px rgba(180, 138, 120, 0.18);
}

.persona-img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    margin-bottom: 1.2rem;
    border: 5px solid #f8e1d4;
    background: #fff;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.persona h3 {
    margin-top: 0.5rem;
    margin-bottom: 0.7rem;
    font-size: 1.35em;
}

.persona p {
    font-size: 1.08em;
    margin-bottom: 1.2rem;
}

.social {
    margin: 1rem 0 0 0;
}

/* Responsive mejoras para tarjetas */
@media (max-width: 900px) {
    .personas {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .persona {
        width: 98vw;
        max-width: 400px;
        padding: 2rem 1rem 1.5rem 1rem;
    }

    .persona-img {
        width: 120px;
        height: 120px;
    }
}

/* TIMELINE */
.timeline {
    margin: 3em auto 1em auto;
    max-width: 700px;
    position: relative;
    padding-left: 1em;
    border-left: 3px solid #f8e1d4;
}

.timeline-item {
    margin-bottom: 2em;
    position: relative;
}

.timeline-date {
    position: absolute;
    left: -3.5em;
    top: 0;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    width: 2.5em;
    height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.timeline-content {
    background: #fff;
    border-radius: 1em;
    padding: 1em 1.5em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-left: 1em;
    text-align: left;
}

@media (max-width: 600px) {
    .timeline {
        padding-left: 0.5em;
    }

    .timeline-date {
        left: -2.5em;
        width: 2em;
        height: 2em;
        font-size: 0.9em;
    }

    .timeline-content {
        padding: 0.7em 1em;
    }
}

/* FRASE */
.quote {
    background: #f8e1d4;
    margin: 3rem auto;
    padding: 2rem 1rem;
    text-align: center;
    border-radius: 1.5rem;
    font-family: 'Alice', serif;
    position: relative;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.quote>div {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.quote h3 {
    margin-bottom: 0.5em;
    font-size: 1.3em;
    color: var(--accent-dark);
}

.quote p {
    margin-bottom: 0;
    font-size: 1em;
    color: var(--accent);
    font-family: 'Muli', Arial, sans-serif;
}

.quote-icon {
    font-size: 2rem;
    color: var(--accent);
    position: absolute;
    top: 1rem;
}

.quote-icon.left {
    left: 1.5rem;
}

.quote-icon.right {
    right: 1.5rem;
}

/* EVENTOS */
.eventos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.evento {
    background: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    padding: 2rem 1rem;
    transition: transform 0.2s;
    text-align: center;
}

.evento:hover {
    transform: translateY(-8px) scale(1.03);
}

.evento-icon {
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 0.7rem;
    display: block;
}

/* FORMULARIO ASISTENCIA */
.esperamos-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0 1rem 0;
}

.esperamos-form input,
.esperamos-form textarea,
.esperamos-form select {
    padding: 0.8rem;
    border-radius: 1rem;
    border: 1px solid #e0cfc1;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    resize: none;
}

.esperamos-form button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.esperamos-form button:hover {
    background: var(--accent-dark);
}

.form-success {
    display: none;
    color: var(--success);
    font-weight: bold;
    margin-top: 1rem;
    text-align: center;
    font-size: 1.1em;
}

.form-success.show {
    display: block;
    animation: fadeInDown 0.7s;
}

/* GALERÍA */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.gallery-grid img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s;
    cursor: pointer;
}

.gallery-grid img:hover {
    transform: scale(1.04);
}

@media (min-width: 1100px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
  }
}

/* REGALOS */
.regalos-lista {
    list-style: none;
    margin: 1.5em 0 0 0;
    padding: 0;
}

.regalos-lista li {
    margin: 0.7em 0;
    font-size: 1.1em;
    color: var(--accent-dark);
}

.regalos-lista i {
    color: var(--accent);
    margin-right: 0.5em;
}

/* CUANDO Y DONDE */
.cd-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.cd-item {
    background: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    padding: 2rem 1.5rem;
    width: 260px;
    text-align: center;
}

.cd-icon {
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 0.7rem;
    display: block;
}

.mapa {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.mapa iframe {
    border-radius: 1em;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    border: 2px solid #f8e1d4;
    background: #fff;
    transition: box-shadow 0.3s;
    min-width: 260px;
    max-width: 100%;
    margin-bottom: 0.5em;
}

.mapa iframe:hover {
    box-shadow: 0 8px 32px rgba(180, 138, 120, 0.18);
}

/* PLAYLIST */
.playlist-form {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin: 1.5em 0 0 0;
}

.playlist-form input {
    padding: 0.8em;
    border-radius: 1em;
    border: 1px solid #e0cfc1;
    font-size: 1em;
    font-family: inherit;
    background: #fff;
}

.playlist-form button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.8em 2em;
    border-radius: 1em;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.playlist-form button:hover {
    background: var(--accent-dark);
}

/* TESTIMONIOS */
.testimonios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2em;
    margin-top: 2em;
}

.testimonio {
    background: #fff;
    border-radius: 1.2em;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    padding: 1.5em 1em;
    text-align: center;
    position: relative;
}

.testimonio-texto {
    font-style: italic;
    color: var(--accent-dark);
    margin-bottom: 1em;
}

.testimonio-nombre {
    color: var(--accent);
    font-weight: bold;
    font-size: 1em;
}

/* AGRADECIMIENTOS */
.agradecimientos .firma {
    margin-top: 2em;
    font-family: 'Alice', serif;
    font-size: 1.2em;
    color: var(--accent-dark);
}

.agradecimientos .firma span {
    font-size: 1.3em;
    color: var(--accent);
}

/* FOOTER */
footer {
    background: #fff8f0;
    color: var(--accent-dark);
    padding: 2.5em 1em 1.2em 1em;
    font-family: 'Muli', Arial, sans-serif;
    border-top: 2px solid #f3d2b8;
    box-shadow: 0 -2px 16px rgba(180, 138, 120, 0.07);
}

.footer-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto 1em auto;
    gap: 2em;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-initials {
    font-family: 'Alice', serif;
    font-size: 2.2em;
    color: var(--accent);
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 0.1em;
}

.footer-names {
    font-size: 1.1em;
    color: var(--accent-dark);
    font-weight: 600;
    letter-spacing: 1px;
}

.footer-nav {
    display: flex;
    gap: 1.5em;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.footer-nav a {
    color: var(--accent-dark);
    font-weight: 600;
    font-size: 1em;
    text-decoration: none;
    transition: color 0.2s;
    padding: 0.2em 0.5em;
    border-radius: 0.5em;
}

.footer-nav a:hover {
    color: #fff;
    background: var(--accent);
}

.footer-social {
    display: flex;
    gap: 1em;
    align-items: center;
}

.footer-social a {
    color: var(--accent);
    font-size: 1.5em;
    transition: color 0.2s, transform 0.2s;
}

.footer-social a:hover {
    color: var(--accent-dark);
    transform: scale(1.15);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    font-size: 0.98em;
    border-top: 1px solid #f3d2b8;
    padding-top: 1em;
    color: var(--accent);
    gap: 1em;
    background: transparent;
}

.footer-love {
    display: flex;
    align-items: center;
    gap: 0.3em;
    font-size: 1em;
}

.footer-love i {
    color: var(--danger);
    font-size: 1.1em;
    vertical-align: middle;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: scale(1.15);
    }

    20%,
    40%,
    60%,
    80% {
        transform: scale(1);
    }
}

.footer-credit {
    font-size: 0.95em;
    color: var(--accent-dark);
}

.footer-credit a {
    color: var(--accent-dark);
    text-decoration: underline;
}

@media (max-width: 900px) {
    .footer-main {
        flex-direction: column;
        align-items: center;
        gap: 1.2em;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.7em;
        text-align: center;
    }

    .footer-logo {
        align-items: center;
    }
}

/* --- MEJORAS PROFESIONALES PARA VISTA MÓVIL --- */
@media (max-width: 600px) {
    html {
        font-size: 16px;
    }

    body {
        padding: 0;
        margin: 0;
        font-size: 1em;
        line-height: 1.6;
    }

    /* Secciones y contenedores */
    section,
    .esperamos,
    .regalos,
    .playlist,
    .testimonios,
    .agradecimientos {
        padding: 1.2em 0.5em;
        margin: 1.2em 0;
        border-radius: 0.7em;
        max-width: 100vw;
        box-sizing: border-box;
    }

    /* Hero */
    .main-header.hero-bg {
        min-height: 45vh;
        padding: 0;
    }

    .hero-content {
        padding: 1.2em 0.5em;
        border-radius: 1em;
        margin: 0 0.2em;
    }

    .main-title {
        font-size: 1.3em;
        margin-bottom: 0.7em;
    }

    .subtitle {
        font-size: 1em;
        margin-bottom: 0.4em;
    }

    .hero-phrase {
        font-size: 1em;
        margin-bottom: 1em;
    }

    .save-date {
        padding: 0.7em 1em;
        font-size: 0.97em;
        margin-bottom: 0.7em;
    }

    .calendar-btn {
        padding: 0.4em 0.8em;
        font-size: 0.97em;
        margin-top: 0.3em;
    }

    .countdown {
        font-size: 1em;
        margin-top: 1em;
    }

    .scroll-down {
        font-size: 1.1em;
        margin-top: 1em;
    }

    /* Navbar */
    .navbar-container {
        padding: 0.5em 0.3em;
    }

    .navbar-logo {
        font-size: 1.3em;
    }

    .navbar-menu li a {
        font-size: 1em;
        padding: 0.5em 0.7em;
        text-align: center;
    }

    /* Personas */
    .personas {
        flex-direction: column;
        align-items: center;
        gap: 1.2em;
        margin-top: 1.2em;
        padding: 0;
    }

    .persona {
        width: 98vw;
        max-width: 400px;
        min-width: 0;
        padding: 1.5em 0.7em 1.2em 0.7em;
        margin: 0 auto 1em auto;
        border-radius: 1.2em;
        box-sizing: border-box;
    }

    .persona-img {
        width: 110px;
        height: 110px;
        margin-bottom: 1em;
    }

    .persona h3 {
        font-size: 1.1em;
        margin-top: 0.3em;
        margin-bottom: 0.5em;
    }

    .persona p {
        font-size: 1em;
        margin-bottom: 1em;
    }

    .social {
        margin: 0.7em 0 0 0;
        justify-content: center;
    }

    /* Timeline */
    .timeline {
        padding-left: 0.5em;
        border-left: 2px solid #f8e1d4;
        max-width: 99vw;
    }

    .timeline-date {
        left: -2em;
        width: 1.5em;
        height: 1.5em;
        font-size: 0.8em;
    }

    .timeline-content {
        padding: 0.6em 0.7em;
        font-size: 0.97em;
        margin-left: 1em;
    }

    /* Quote */
    .quote {
        padding: 1em 0.4em;
        max-width: 98vw;
        font-size: 0.97em;
        border-radius: 0.7em;
    }

    .quote-icon.left {
        left: 0.5em;
    }

    .quote-icon.right {
        right: 0.5em;
    }

    /* Eventos */
    .eventos-grid {
        grid-template-columns: 1fr;
        gap: 1em;
        margin-top: 1em;
    }

    .evento {
        padding: 1em 0.7em;
        border-radius: 1em;
    }

    /* Formularios */
    .esperamos-form,
    .playlist-form {
        gap: 0.7em;
        padding: 0;
    }

    .esperamos-form input,
    .esperamos-form textarea,
    .esperamos-form select,
    .playlist-form input {
        font-size: 1em;
        padding: 0.6em;
        border-radius: 0.7em;
    }

    .esperamos-form button,
    .playlist-form button {
        font-size: 1em;
        padding: 0.6em 1.2em;
        border-radius: 0.7em;
    }

    .form-success {
        font-size: 1em;
        margin-top: 0.7em;
    }

    /* Galería */
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5em;
        max-width: 99vw;
    }

    .gallery-grid img {
        border-radius: 0.7em;
    }

    /* Cuando y donde */
    .cd-grid {
        flex-direction: column;
        align-items: center;
        gap: 1em;
        width: 100%;
        padding: 0;
    }

    .cd-item {
        width: 98vw;
        max-width: 340px;
        margin: 0 auto 1em auto;
        padding: 1.2em 0.7em;
        border-radius: 1em;
        box-sizing: border-box;
    }

    .cd-icon {
        font-size: 1.7em;
        margin-bottom: 0.5em;
    }

    .mapa {
        flex-direction: column;
        gap: 0.7em;
        width: 100%;
        margin-top: 1em;
    }

    .mapa-item {
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        margin-bottom: 1em;
        overflow-x: hidden;
    }

    .mapa iframe {
        width: 100vw !important;
        min-width: 0 !important;
        max-width: 100vw !important;
        height: 180px !important;
        display: block;
        margin: 0 auto 0.5em auto;
        border-radius: 0.7em;
        box-sizing: border-box;
    }

    /* Testimonios */
    .testimonios-grid {
        grid-template-columns: 1fr;
        gap: 1em;
        margin-top: 1em;
    }

    .testimonio {
        padding: 1em 0.7em;
        border-radius: 1em;
    }

    /* Footer */
    footer {
        padding: 1.2em 0.3em 0.7em 0.3em;
        border-radius: 0.7em 0.7em 0 0;
    }

    .footer-main,
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 0.7em;
        text-align: center;
        padding: 0 0.2em;
        font-size: 0.97em;
    }

    .footer-logo {
        align-items: center;
    }

    .footer-initials {
        font-size: 1.5em;
    }

    .footer-names {
        font-size: 1em;
    }

    .footer-nav {
        gap: 0.5em;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }

    .footer-nav a {
        font-size: 1em;
        padding: 0.2em 0.5em;
        border-radius: 0.5em;
    }

    .footer-social {
        gap: 0.7em;
        font-size: 1.2em;
    }

    .footer-bottom {
        gap: 0.7em;
        padding-top: 0.7em;
    }

    .footer-credit {
        font-size: 0.95em;
    }

    .footer-love {
        font-size: 1em;
    }

    /* Evita desbordes horizontales */
    * {
        box-sizing: border-box;
        max-width: 100vw;
    }
}

/* --- FIN MEJORAS MOBILE --- */

/* --- AJUSTES MOBILE PARA PADDINGS Y VISIBILIDAD --- */
@media (max-width: 600px) {

    /* Padding izquierdo para secciones principales */
    .history,
    .eventos,
    .esperamos,
    .regalos,
    .cuando-donde,
    .playlist,
    .testimonios,
    .agradecimientos {
        padding-left: 1em !important;
        padding-right: 0.5em !important;
    }

    /* Timeline: que las fechas nunca queden fuera */
    .timeline {
        padding-left: 2.5em !important;
        /* Más espacio para las fechas */
        border-left: 2px solid #f8e1d4;
        max-width: 99vw;
    }

    .timeline-date {
        left: 0 !important;
        /* Alinea el círculo de la fecha dentro del padding */
        width: 1.7em;
        height: 1.7em;
        font-size: 0.85em;
    }

    .timeline-content {
        margin-left: 2.5em !important;
        /* Alinea el contenido tras la fecha */
        padding: 0.6em 0.7em;
        font-size: 0.97em;
    }

    /* Quote: comillas más pequeñas y mejor posición */
    .quote {
        padding: 1em 0.7em 1em 1.2em !important;
        position: relative;
    }

    .quote-icon {
        font-size: 1.2em !important;
        top: 0.5em !important;
    }

    .quote-icon.left {
        left: 0.5em !important;
    }

    .quote-icon.right {
        right: 0.5em !important;
    }

    /* Eventos: padding izquierdo */
    .eventos-grid {
        padding-left: 1em !important;
        padding-right: 0.5em !important;
    }

    .evento {
        padding-left: 1em !important;
        padding-right: 0.7em !important;
    }

    /* Formularios y listas: padding izquierdo */
    .esperamos-form,
    .regalos-lista,
    .cd-grid,
    .playlist-form {
        padding-left: 0.5em !important;
        padding-right: 0.2em !important;
    }

    .cd-item {
        padding-left: 1em !important;
        padding-right: 0.7em !important;
    }

    .mapa {
        padding-left: 0.5em !important;
        padding-right: 0.5em !important;
        box-sizing: border-box;
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .cuando-donde {
        padding: 0 0.7em !important;
        /* o el valor que prefieras */
        margin: 0 !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
}

/* --- MEJORAS TABLET (600px a 1100px) --- */
@media (min-width: 600px) and (max-width: 1100px) {
    html {
        font-size: 17px;
    }

    body {
        font-size: 1em;
        padding: 0;
        margin: 0;
    }

    /* Secciones principales: que ocupen casi todo el ancho */
    section,
    .esperamos,
    .regalos,
    .playlist,
    .testimonios,
    .agradecimientos {
        max-width: 98vw;
        width: 98vw;
        margin: 2em auto;
        padding: 2em 2vw;
        border-radius: 1.2em;
        box-sizing: border-box;
    }

    /* Navbar más ancho y logo más pequeño */
    .navbar-container {
        max-width: 100vw;
        width: 100vw;
        padding: 0.7em 2vw;
    }

    .navbar-logo {
        font-size: 1.5em;
    }

    /* Grids: 2 columnas para eventos, galería, testimonios */
    .eventos-grid,
    .gallery-grid,
    .testimonios-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5em;
        max-width: 98vw;
    }

    /* Personas y cuando/donde: flex wrap y centrado */
    .personas,
    .cd-grid {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5em;
        justify-content: center;
        align-items: stretch;
    }

    .persona,
    .cd-item,
    .evento {
        width: 95%;
        max-width: 380px;
        min-width: 220px;
        margin: 0 auto;
        padding: 1.5em 1em;
        border-radius: 1em;
        box-sizing: border-box;
    }

    /* Hero */
    .main-header.hero-bg {
        min-height: 55vh;
        padding: 0;
    }

    .hero-content {
        padding: 2em 2vw;
        border-radius: 1.2em;
        margin: 0 0.5em;
    }

    .main-title {
        font-size: 2.2em;
    }

    /* Formularios */
    .esperamos-form,
    .playlist-form {
        max-width: 500px;
        margin: 2em auto 1em auto;
        gap: 1em;
    }

    .esperamos-form input,
    .esperamos-form textarea,
    .esperamos-form select,
    .playlist-form input {
        font-size: 1em;
        padding: 0.7em;
        border-radius: 0.9em;
        max-width: 100%;
    }

    /* Footer */
    footer {
        padding: 2em 2vw 1em 2vw;
        border-radius: 1.2em 1.2em 0 0;
    }

    .footer-main,
    .footer-bottom {
        max-width: 98vw;
        width: 98vw;
        padding: 0 1vw;
        font-size: 1em;
        gap: 1em;
    }

    /* Galería imágenes */
    .gallery-grid img {
        border-radius: 1em;
    }

    /* Timeline */
    .timeline {
        max-width: 98vw;
        padding-left: 1.5em;
        border-left: 3px solid #f8e1d4;
    }

    .timeline-date {
        left: -3em;
        width: 2em;
        height: 2em;
        font-size: 1em;
    }

    .timeline-content {
        padding: 0.8em 1.2em;
        margin-left: 1.2em;
        font-size: 1em;
    }

    /* Quote */
    .quote {
        max-width: 90vw;
        padding: 1.5em 1em;
        border-radius: 1em;
        font-size: 1.05em;
    }

    /* Mapa */
    .mapa {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1em;
        width: 98vw;
        max-width: 98vw;
        margin: 1em auto 0 auto;
        box-sizing: border-box;
    }

    .mapa iframe {
        width: 98vw !important;
        max-width: 98vw !important;
        min-width: 220px !important;
        height: 220px !important;
        border-radius: 1em !important;
        margin: 0 auto 0.5em auto !important;
        box-sizing: border-box !important;
    }
}

/* --- AJUSTE VISIBILIDAD ANCLAS UNIVERSAL --- */
section[id] {
    scroll-margin-top: 100px;
}

@media (max-width: 1200px) {
    section[id] {
        scroll-margin-top: 120px;
    }
}

@media (max-width: 600px) {
    .cuando-donde {
        padding: 0 0.7em !important;
        /* margen lateral, ajusta a tu gusto */
        margin: 0 !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    .mapa,
    .mapa-item {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .mapa iframe {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 180px !important;
        display: block;
        margin: 0 auto 0.5em auto !important;
        border-radius: 0.7em !important;
        box-sizing: border-box !important;
    }
}

/* MICROINTERACCIONES Y DETALLES */
input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button,
.calendar-btn {
    transition: background 0.2s, transform 0.1s;
}

button:active,
.calendar-btn:active {
    transform: scale(0.97);
}

/* RESPONSIVE Y MEJORAS PARA MÓVIL */
@media (max-width: 900px) {

    .personas,
    .cd-grid,
    .mapa {
        flex-direction: column;
        align-items: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .eventos-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .main-header.hero-bg {
        min-height: 50vh;
        padding: 0;
    }

    .hero-content {
        padding: 1.2rem 0.5rem;
        border-radius: 1em;
    }

    .main-title {
        font-size: 1.5em;
    }

    .subtitle {
        font-size: 1em;
    }

    .hero-phrase {
        font-size: 1em;
    }

    .save-date {
        padding: 0.7rem 1rem;
        font-size: 0.95em;
    }

    .calendar-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.95em;
    }

    .countdown {
        font-size: 1em;
    }

    .scroll-down {
        font-size: 1.3em;
        margin-top: 1em;
    }

    section,
    .esperamos,
    .regalos,
    .playlist,
    .testimonios,
    .agradecimientos {
        padding: 1em 0.2em;
        max-width: 99vw;
        border-radius: 0.7em;
    }

    .timeline {
        padding-left: 0.5em;
        border-left: 2px solid #f8e1d4;
    }

    .timeline-date {
        left: -2.2em;
        width: 1.7em;
        height: 1.7em;
        font-size: 0.85em;
    }

    .timeline-content {
        padding: 0.6em 0.7em;
        font-size: 0.97em;
    }

    .quote {
        padding: 1.2rem 0.5rem;
        max-width: 98vw;
        font-size: 0.97em;
    }

    .quote-icon.left {
        left: 0.5rem;
    }

    .quote-icon.right {
        right: 0.5rem;
    }

    .esperamos-form input,
    .esperamos-form textarea,
    .esperamos-form select,
    .playlist-form input {
        font-size: 0.97em;
        padding: 0.6em;
    }

    .esperamos-form button,
    .playlist-form button {
        font-size: 1em;
        padding: 0.6em 1.2em;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5em;
    }

    .gallery-grid img {
        border-radius: 0.7em;
    }

    .cd-grid {
        gap: 1.2rem;
    }

    .cd-item {
        width: 95%;
        max-width: 340px;
        margin: 0 auto;
        padding: 1.2rem 0.7rem;
    }

    .mapa {
        flex-direction: column;
        gap: 0.7em;
    }

    .mapa iframe {
        width: 98vw !important;
        min-width: 0 !important;
        max-width: 100vw !important;
        height: 180px !important;
    }

    .testimonios-grid {
        grid-template-columns: 1fr;
        gap: 1.2em;
    }

    .testimonio {
        padding: 1em 0.7em;
    }

    footer {
        padding: 1.5em 0.3em 0.7em 0.3em;
    }

    .footer-main,
    .footer-bottom {
        padding: 0 0.2em;
        font-size: 0.97em;
    }

    .personas,
    .cd-grid,
    .mapa {
        gap: 1rem;
    }

    .evento,
    .cd-item,
    .persona {
        width: 100%;
    }

    .footer-main,
    .footer-bottom {
        padding: 0 0.5em;
    }
}

/* --- AJUSTE VISIBILIDAD ANCLAS UNIVERSAL --- */
section[id] {
    scroll-margin-top: 100px;
}

@media (max-width: 1200px) {
    section[id] {
        scroll-margin-top: 120px;
    }
}

@media (max-width: 600px) {
    .cuando-donde {
        padding: 0 0.7em !important;
        /* margen lateral, ajusta a tu gusto */
        margin: 0 !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    .mapa,
    .mapa-item {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .mapa iframe {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 180px !important;
        display: block;
        margin: 0 auto 0.5em auto !important;
        border-radius: 0.7em !important;
        box-sizing: border-box !important;
    }
}