:root {
    --color-primary: #7d8c4c;
    --color-primary-dark: #5c6938;
    --color-bg: #f9f8f2;
    --color-text: #3c3a2e;
    --font-heading: 'Playfair Display', serif;
    --font-script: 'Great Vibes', cursive;
    --font-body: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title span {
    display: block;
    font-family: var(--font-script);
    color: var(--color-primary);
    font-size: 28px;
    margin-bottom: 4px;
}

.section-title h2 {
    font-family: var(--font-heading);
    font-size: 42px;
    margin: 0;
}

.section-subtitle {
    font-size: 14px;
    color: #8a8a7a;
    font-style: italic;
    margin: 10px 0 0;
}

.dresscode-venue-note {
    font-size: 13px;
    color: #8a8a7a;
    max-width: 420px;
    margin: 10px auto 0;
}

section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.bg-deco {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    width: 220px;
    max-width: none;
}

.bg-deco-hero-1 {
    top: -40px;
    left: -30px;
    width: 140px;
}

.bg-deco-hero-2 {
    bottom: -120px;
    right: -100px;
    width: 360px;
    opacity: 0.25;
}

.bg-deco-couple {
    top: -40px;
    right: 40px;
    width: 160px;
}

.bg-deco-story-1 {
    bottom: -60px;
    left: -50px;
    width: 200px;
}

.bg-deco-story-2 {
    top: 20px;
    right: 5%;
    width: 90px;
    opacity: 0.4;
}

.bg-deco-gallery {
    top: -30px;
    right: -40px;
    width: 260px;
}

.bg-deco-events {
    top: 0;
    left: 0;
    width: 240px;
}

.bg-deco-dresscode {
    top: -60px;
    left: -60px;
    width: 240px;
    opacity: 0.22;
}

.bg-deco-honor {
    top: -20px;
    right: -60px;
    width: 220px;
    opacity: 0.3;
}

.bg-deco-gifts {
    bottom: 0;
    right: 0;
    width: 200px;
    opacity: 0.5;
}

.bg-deco-rsvp {
    top: -80px;
    right: -80px;
    width: 280px;
    opacity: 0.18;
}

.bg-deco-footer {
    bottom: -40px;
    left: 40%;
    width: 130px;
    opacity: 0.3;
}

/* Hero */
.hero {
    padding: 70px 0;
    background: var(--color-bg);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-photos {
    position: relative;
}

.hero-photo-main {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.hero-photo-main img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    object-position: top center;
}

.hero-content {
    text-align: left;
}

.hero-content h3 {
    font-family: var(--font-script);
    font-size: 80px;
    color: var(--color-primary);
    margin: 0 0 6px;
    line-height: 1.1;
}

.hero-content h2 {
    font-family: var(--font-heading);
    font-size: 64px;
    margin: 0 0 20px;
}

.hero-content p {
    font-size: 18px;
}

/* Countdown (FlipDown) */
.countdown {
    background: var(--color-bg);
    text-align: center;
    padding: 50px 0 70px;
}

.countdown-label {
    font-family: var(--font-script);
    font-size: 30px;
    color: var(--color-primary);
    margin: 0 0 24px;
}

.flipdown {
    /* Tamaño y proporciones internas se dejan tal cual las define la librería;
       agrandamos todo el bloque con scale() para no desalinear las mitades de cada ficha. */
    width: fit-content !important;
    transform: scale(1.6);
    transform-origin: top center;
    margin: 0 auto 30px;
}

/* Solo mostramos Días y Horas */
.flipdown-olive .rotor-group:nth-child(3),
.flipdown-olive .rotor-group:nth-child(4) {
    display: none !important;
}

.flipdown-olive .rotor-group:nth-child(2) {
    padding-right: 0 !important;
}

.flipdown-olive .rotor-group:before,
.flipdown-olive .rotor-group:after {
    display: none !important;
}

.flipdown-olive .rotor-group-heading::before {
    color: var(--color-text) !important;
}

.flipdown-olive .rotor,
.flipdown-olive .rotor-top,
.flipdown-olive .rotor-leaf-front {
    background-color: var(--color-primary-dark) !important;
    color: #fdf8f3 !important;
}

.flipdown-olive .rotor-bottom,
.flipdown-olive .rotor-leaf-rear {
    background-color: var(--color-primary) !important;
    color: #fdf8f3 !important;
}

.flipdown-olive .rotor:after {
    border-top: solid 1px var(--color-primary-dark) !important;
}

@media (max-width: 560px) {
    .flipdown {
        transform: scale(1.1);
    }
}

/* Couple */
.couple {
    background: #fff;
}

.couple-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.couple-card {
    text-align: center;
}

.couple-card img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 4px solid var(--color-bg);
}

.couple-card h3 {
    font-family: var(--font-heading);
    font-size: 28px;
    margin: 0 0 10px;
}

/* Story (tweet-style cards) */
.tweets {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tweet-card {
    background: #fff;
    border: 1px solid #e7e4da;
    border-radius: 16px;
    padding: 18px 20px;
}

.tweet-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.tweet-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.tweet-author {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.tweet-author strong {
    font-family: var(--font-body);
    font-size: 15px;
}

.tweet-handle {
    font-size: 13px;
    color: #8a8a7a;
}

.tweet-brand {
    width: 22px;
    height: 22px;
    margin-left: auto;
    color: var(--color-primary);
    flex-shrink: 0;
}

.tweet-text {
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 12px;
}

.tweet-image {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    margin-bottom: 12px;
}

.tweet-image-top {
    object-position: top;
}

.tweet-actions {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: #8a8a7a;
}

/* Story (legacy grid, kept for reuse) */
.story-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
}

.story-item:nth-child(even) .story-img {
    order: 2;
}

.story-img img {
    border-radius: 8px;
}

.story-date {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.story-content h3 {
    font-family: var(--font-heading);
    font-size: 30px;
    margin: 0 0 12px;
}

/* Gallery */
.gallery {
    background: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.gallery-grid a {
    display: block;
    overflow: hidden;
    border-radius: 6px;
}

.gallery-grid a img {
    transition: transform 0.3s ease;
}

.gallery-grid a:hover img {
    transform: scale(1.06);
}

.gallery-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 6px;
}

/* Events (FullCalendar itinerary) */
.wedding-calendar {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    --fc-border-color: #e7e4da;
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: #fff;
    --fc-list-event-hover-bg-color: #f3f1e6;
    font-family: var(--font-body);
}

.wedding-calendar .fc-list-table {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.wedding-calendar .fc-list-day {
    display: none;
}

.wedding-calendar .fc-list-event-time {
    color: var(--color-primary);
    font-weight: 600;
    white-space: nowrap;
}

.wc-event {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px 0;
    max-width: 100%;
}

.wc-event-img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.wc-event-text {
    flex: 1 1 auto;
    min-width: 0;
}

.wc-event-text h3 {
    font-family: var(--font-heading);
    font-size: 19px;
    margin: 0 0 4px;
    overflow-wrap: break-word;
}

.wc-event-text p {
    font-size: 13px;
    margin: 0 0 4px;
    color: var(--color-text);
    overflow-wrap: break-word;
}

.wc-event-text a {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
}

@media (max-width: 600px) {
    .wedding-calendar {
        overflow-x: hidden;
    }

    .wedding-calendar .fc-list-table,
    .wedding-calendar .fc-list-table tbody,
    .wedding-calendar .fc-list-table tr,
    .wedding-calendar .fc-list-table td {
        display: block;
        width: 100%;
        border: none !important;
    }

    .wedding-calendar .fc-list-event-graphic {
        display: none !important;
    }

    .wedding-calendar .fc-list-event-time {
        padding: 14px 14px 0;
        font-size: 13px;
    }

    .wedding-calendar td.fc-list-event-title {
        padding: 6px 14px 16px;
        border-bottom: 1px solid var(--fc-border-color) !important;
    }

    .wc-event-img {
        width: 48px;
        height: 48px;
    }

    .wc-event-text h3 {
        font-size: 16px;
    }
}

/* Dress Code */
.dresscode {
    background: #fff;
    text-align: center;
}

.dresscode-content {
    max-width: 600px;
    margin: 0 auto;
}

.dresscode-outfits {
    position: relative;
    margin: 10px 0 30px;
}

.dresscode-outfits-img {
    max-width: 100%;
    max-height: 260px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.dresscode-outfits-labels {
    display: flex;
    justify-content: space-around;
    max-width: 380px;
    margin: 10px auto 0;
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--color-primary);
}

.dresscode-colors {
    position: relative;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e7e4da;
}

.dresscode-colors-label {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 18px;
}

.dresscode-swatches {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin: 0 0 12px;
}

.dresscode-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #8a8a7a;
}

.dresscode-swatch span {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e2d8cd;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.dresscode-colors-note {
    font-size: 13px;
    font-style: italic;
    color: #8a8a7a;
    margin: 0;
}

.dresscode-groom {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dresscode-groom p {
    margin: 0;
    font-size: 14px;
}

.dresscode-groom-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1e4d2e;
    border: 1px solid rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

@media (max-width: 560px) {
    .dresscode-frame {
        padding: 45px 20px;
    }

    .dresscode-outfits {
        gap: 30px;
    }

    .dresscode-corner {
        width: 44px;
    }
}

/* Honor party */
.honor {
    background: var(--color-bg);
    text-align: center;
}

.honor-intro {
    text-align: center;
    max-width: 500px;
    margin: 0 auto 30px;
}

.honor-showcase {
    margin: 0 auto 30px;
    text-align: center;
}

.honor-showcase img {
    max-height: 340px;
    width: auto;
    max-width: 100%;
    display: inline-block;
    margin: 0 auto;
}

.honor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.honor-card {
    background: var(--color-bg);
    border-radius: 8px;
    padding: 26px;
}

.honor-swatch {
    display: inline-flex;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-bottom: 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.honor-swatch-group {
    width: auto;
    height: auto;
    border: none;
    border-radius: 0;
    gap: 4px;
}

.honor-swatch-group span {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.honor-card h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    margin: 0 0 8px;
    color: var(--color-primary);
}

.honor-card p {
    font-size: 14px;
    margin: 0;
}

@media (max-width: 900px) {
    .honor-grid {
        grid-template-columns: 1fr;
    }
}

/* Gifts */
.gifts {
    background: #fff;
}

.gifts-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px;
}

.gifts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.gift-card {
    background: var(--color-bg);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.gift-card h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    margin: 0 0 10px;
}

.gift-card p {
    font-size: 14px;
    margin: 0 0 14px;
}

.gift-card a {
    display: inline-block;
    color: #fff;
    background: var(--color-primary);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

.gift-card a:hover {
    background: var(--color-primary-dark);
}

.gift-card-note {
    font-size: 12px;
    opacity: 0.7;
    margin: 10px 0 0;
}

/* RSVP */
.rsvp {
    background: var(--color-primary);
    color: #fff;
}

.rsvp .section-title h2,
.rsvp .section-title span {
    color: #fff;
}

.rsvp-form {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    color: var(--color-text);
}

.rsvp-form .form-control {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid #e2d8cd;
    border-radius: 6px;
    font-family: var(--font-body);
}

.rsvp-textarea {
    resize: vertical;
    min-height: 130px;
    line-height: 1.5;
}

.rsvp-form .radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.rsvp-form button {
    width: 100%;
    padding: 14px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.rsvp-form button:hover {
    background: var(--color-primary-dark);
}

.rsvp-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.rsvp-message {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    padding: 24px 30px;
    text-align: center;
    color: var(--color-text);
}

.rsvp-family-info {
    text-align: center;
    font-weight: 600;
    margin: 0 0 16px;
}

.rsvp-status {
    text-align: center;
    margin: 14px 0 0;
    min-height: 20px;
    font-size: 14px;
}

.rsvp-status-ok {
    color: var(--color-primary-dark);
    font-weight: 600;
}

.rsvp-status-error {
    color: #b3413a;
    font-weight: 600;
}

/* Footer */
.site-footer {
    background: #2f331f;
    color: #cdd2b8;
    padding: 50px 0 20px;
    text-align: center;
}

.site-footer p {
    margin: 6px 0;
}

.site-footer a {
    color: #fff;
}
.footer-script {
    font-size: 3rem;
    color: #e8ecda;
    margin-bottom: 12px;
}
.footer-date {
    margin-top: 16px;
    letter-spacing: 0.3em;
    font-size: 0.85rem;
    color: #9aa07a;
}

@media (max-width: 900px) {
    .couple-grid,
    .gifts-grid {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        text-align: center;
        order: 2;
    }

    .hero-photos {
        order: 1;
        margin-bottom: 40px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .story-item,
    .story-item:nth-child(even) .story-img {
        grid-template-columns: 1fr;
        order: 0;
    }

    .hero-content h3 {
        font-size: 56px;
    }

    .hero-content h2 {
        font-size: 48px;
    }
}

/* Music toggle */
.music-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--color-primary);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-toggle:hover {
    background: var(--color-primary-dark);
}

.music-toggle .music-icon {
    display: inline-block;
}

.music-toggle.playing .music-icon {
    animation: music-spin 3s linear infinite;
}

@keyframes music-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Fireworks overlay */
.fireworks-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fireworks-overlay.active {
    opacity: 1;
}

/* tsParticles background (hearts & leaves) */
#tsparticles {
    position: fixed;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}
