/* Custom Wedding Fonts */
@font-face {
    font-family: 'QuaverSans';
    src: url('../assets/fonos/QuaverSans.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'QuaverSerif';
    src: url('../assets/fonos/QuaverSerif.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --font-base-size: clamp(1rem, 0.95rem + 0.35vw, 1.125rem);
    --font-small-size: clamp(0.92rem, 0.88rem + 0.25vw, 1rem);
    --font-tiny-size: clamp(0.85rem, 0.82rem + 0.2vw, 0.95rem);
}

body {
    font-family: 'Arial', sans-serif;
    font-size: var(--font-base-size);
    line-height: 1.6;
    background-color: #c1c1b2;
    color: #2f2b1e;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

body.intro-active {
    overflow: hidden;
}

#intro-overlay {
    position: fixed;
    inset: 0;
    background-color: #c1c1b2;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: introOverlayFade 1.6s ease forwards;
}

.intro-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    animation: introLogoZoom 1.6s ease forwards;
}

.site-logo {
    position: absolute;
    top: 45px;
    left: 50%;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translate(-50%, -12px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
    z-index: 2;
    pointer-events: none;
}

.site-logo__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 1));
}

body.intro-finished .site-logo {
    opacity: 1;
    transform: translate(-50%, 0);
}

header {
    background-color: #ffcccb;
    padding: 20px;
    text-align: center;
}

h1 {
    font-size: 2.5em;
    margin: 0;
}

h2 {
    font-size: 1.5em;
    margin: 10px 0;
}

.invite-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    padding: 20px;
    max-width: 600px;
    text-align: center;
}

.rsvp-button {
    background-color: #ff69b4;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 1em;
    padding: 10px 20px;
    transition: background-color 0.3s;
}

.rsvp-button:hover {
    background-color: #ff1493;
}

footer {
    text-align: center;
    font-size: var(--font-small-size);
    color: #4a4438;
    min-height: 20px;
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Full-screen invite hero */
html,
body {
    height: 100%;
}

main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    box-sizing: border-box;
}

.home-landing main {
    padding: 0;
    min-height: calc(100vh - 10px);
}

/* Hero section with vertical image and buttons at the bottom */
#invite-card {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    overflow: hidden;
    background-color: #f5f1ea;
    /* soft neutral for wedding style */
    width: 100%;
    border: 2px solid #ffffff;
    box-sizing: border-box;
}

.home-landing #invite-card {
    min-height: 100vh;
}

.invite-cover {
    position: absolute;
    height: 100%;
    inset: 0;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform-origin: center;
    animation: subtleZoom 18s ease-in-out infinite alternate;
}

.invite-actions {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 20px 24px 5px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
    box-sizing: border-box;
}

.invite-actions-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.invite-actions-row--primary {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 24px;
}

.invite-actions-row--primary .action-button {
    flex: 1 1 50%;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    border-radius: 25px;
    padding: 14px 20px;
    font-size: var(--font-small-size);
    letter-spacing: 0.08em;
    border: 2px solid rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease;
    font-family: 'QuaverSerif', serif;
}

/* Primary button (civil RSVP) with light background */
#btn-rsvp-civil {
    background: rgba(255, 255, 255, 0.95);
    color: #3a2b20;
    border-color: rgba(255, 255, 255, 0.95);
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45);
    background-color: rgba(255, 255, 255, 0.2);
}

#btn-rsvp-civil:hover {
    background-color: #ffffff;
}

.action-button:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

@keyframes introOverlayFade {
    0% {
        opacity: 1;
        background-color: #c1c1b2;
    }

    70% {
        opacity: 1;
        background-color: #c1c1b2;
    }

    100% {
        opacity: 0;
        background-color: rgba(193, 193, 178, 0);
    }
}

@keyframes introLogoZoom {
    0% {
        transform: scale(2);
    }

    100% {
        transform: scale(1);
    }
}

/* Subtle animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer {
    color: #ffffff;
    text-align: center;
    font-size: 12px;
}

@keyframes subtleZoom {
    from {
        transform: scale(1.02);
    }

    to {
        transform: scale(1.08);
    }
}

.invite-actions {
    animation: fadeInUp 0.9s ease-out 0.1s both;
}

/* Responsive layout for larger screens */
@media (min-width: 600px) {
    #invite-card {
        max-width: 480px;
        margin: 0 auto;
        border-radius: 24px;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    }

    .invite-cover,
    .cover-image {
        border-radius: 24px;
    }

    .invite-actions {
        padding: 24px 32px 5px;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.1));
    }

    .action-button {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    #invite-card {
        margin: 0;
        border-radius: 18px;
    }

    .invite-cover,
    .cover-image {
        border-radius: 18px;
    }

    .action-button {
        font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
        padding: 12px 18px;
    }

    .invite-actions-row {
        flex-direction: column;
    }

    .invite-actions-row--primary {
        flex-direction: column;
    }

    .invite-actions-row--primary .action-button {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {

    #intro-overlay,
    .intro-logo {
        animation: none !important;
    }

    .site-logo {
        transition: none;
        opacity: 1;
        transform: translateY(0);
    }
}

/* Civil page layout */
.civil-page {
    background-color: #878a75;
    display: block;
    min-height: 100vh;
    background-image: url('../assets/imgs/fondo.png');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
}

.civil-page.with-bg-overlay::before {
    content: '';
    position: fixed;
    inset: 0;
    background-color: rgba(135, 138, 117, 0.65);
    pointer-events: none;
    z-index: 0;
}

.civil-page.with-bg-overlay > * {
    position: relative;
    z-index: 1;
}

.civil-page main {
    flex: none;
    min-height: auto;
    display: block;
    padding-top: 0;
    box-sizing: border-box;
}

.civil-page footer {
    height: auto;
    padding: 0 0 5px;
    font-size: var(--font-small-size);
    color: #fff;
    display: block;
    width: min(720px, 90%);
    margin: 10px auto 0;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.civil-hero {
    position: relative;
    text-align: center;
    padding: 80px 24px;
    color: #fdfaf0;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(180deg, rgba(6, 6, 2, 0.3), rgba(6, 6, 2, 0.75)), url('../assets/imgs/civil_header.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

@media (min-width: 960px) {
    .civil-hero {
        background-image: linear-gradient(180deg, rgba(6, 6, 2, 0.3), rgba(6, 6, 2, 0.75)), url('../assets/imgs/civil_header_full.jpg');
    }
}

.civil-back-link {
    position: absolute;
    top: 16px;
    margin: 0;
}

.civil-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 45%);
    z-index: 0;
}

.civil-hero > * {
    position: relative;
    z-index: 1;
}

.civil-scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: 24px;
    width: 48px;
    transform: translate(-50%, 0);
    opacity: 0.85;
    color: #fff;
    animation: civilScrollBounce 2.4s ease-in-out infinite;
    pointer-events: none;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}

.civil-scroll-indicator svg {
    display: block;
    width: 100%;
    height: auto;
}

.civil-scroll-indicator path {
    fill: currentColor;
}

@keyframes civilScrollBounce {
    0% {
        transform: translate(-50%, 0);
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    50% {
        transform: translate(-50%, 10px);
    }

    100% {
        transform: translate(-50%, 0);
        opacity: 0.45;
    }
}

.civil-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    color: #fdfaf0;
    text-decoration: none;
    font-size: var(--font-small-size);
    letter-spacing: 0.05em;
    border: 1px solid rgba(253, 250, 240, 0.4);
    padding: 6px 14px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.civil-back-link:hover {
    background-color: rgba(253, 250, 240, 0.12);
}

.civil-logo {
    width: 140px;
    height: 140px;
    margin: 0 auto 12px;
    display: block;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.25));
}

.civil-date {
    font-size: var(--font-small-size);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7b7150;
    margin: 8px 0 12px;
}

.civil-hero h1 {
    margin: 12px 0 0;
    font-family: 'QuaverSerif', serif;
    letter-spacing: 0.15em;
    font-size: 1.4rem;
    text-transform: uppercase;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.civil-intro {
    margin: 0 auto;
    max-width: 520px;
    line-height: 1.5;
}

.civil-main {
    width: min(720px, 90%);
    margin: 0 auto 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.civil-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.civil-card h2 {
    margin-top: 0;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: clamp(0.95rem, 0.9rem + 0.4vw, 1.2rem);
    color: #7b7150;
}

.civil-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #3a2b20;
}

.civil-calendar {
    background: #f7f2e7;
    border-radius: 18px;
    padding: 18px;
    text-align: center;
    border: 1px solid rgba(58, 43, 32, 0.1);
}

.calendar-month {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: var(--font-tiny-size);
    color: #7b7150;
    margin-bottom: 10px;
}

.calendar-day {
    font-size: 3rem;
    font-family: 'QuaverSerif', serif;
    color: #3a2b20;
    line-height: 1;
}

.calendar-weekday {
    font-size: var(--font-small-size);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7b7150;
    margin-top: 6px;
}

.civil-map {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.civil-map iframe {
    width: 100%;
    height: 260px;
    border: 0;
}

.civil-map-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.civil-map-link {
    font-size: var(--font-small-size);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #3a2b20;
    text-decoration: none;
    border-bottom: 1px solid rgba(58, 43, 32, 0.4);
    padding-bottom: 2px;
}

.civil-map-link:hover {
    color: #7b7150;
    border-color: #7b7150;
}

.dress-colors {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    width: 100%;
    padding-bottom: 8px;
}

.dress-color {
    flex: 1 1 clamp(120px, 28%, 200px);
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #4f3b2f;
}

.dress-color::before {
    content: '';
    width: clamp(70px, 11vw, 100px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: var(--swatch);
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.35),
        0 18px 38px rgba(0, 0, 0, 0.18);
}

.dress-color span {
    text-transform: uppercase;
    font-size: var(--font-small-size);
    letter-spacing: 0.12em;
}

.dress-gallery-label {
    margin: 8px 0 0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: var(--font-small-size);
    color: #7b7150;
}

.dress-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    width: 100%;
}

.dress-gallery img {
    flex: 1 1 clamp(150px, 30%, 260px);
    min-width: 150px;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

@media (max-width: 540px) {
    .dress-color {
        flex: 1 1 120px;
    }

    .dress-gallery img {
        flex: 1 1 120px;
    }

    .confirmation-input-group {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
    }

    .confirmation-input-group input,
    .confirmation-input-group button {
        width: 100%;
        flex: 1 1 auto;
    }

    .confirmation-button {
        text-align: center;
        border-radius: 20px;
        margin-left: 0;
    }
}

.civil-cta {
    margin-top: 12px;
    align-self: flex-start;
    padding: 14px 28px;
}

.civil-note {
    font-size: var(--font-small-size);
    color: #5c5240;
}

.confirmation-widget {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(58, 43, 32, 0.12);
    border-radius: 16px;
    background: rgba(247, 242, 231, 0.6);
}

.confirmation-input-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: stretch;
}

.confirmation-input-group input {
    flex: 1 1 clamp(220px, 65%, 420px);
    min-width: 200px;
    max-width: 100%;
    align-self: stretch;
    border-radius: 999px;
    border: 1px solid rgba(58, 43, 32, 0.2);
    padding: 12px 18px;
    font-size: var(--font-base-size);
    font-family: 'QuaverSans', sans-serif;
    box-sizing: border-box;
}

.confirmation-button {
    flex: 0 0 clamp(140px, 28%, 220px);
    align-self: stretch;
    padding: 12px 22px;
    font-size: var(--font-base-size);
    background-color: #aaa476;
    border-color: #757961;
    color: #fff;
    box-sizing: border-box;
}

.confirmation-button:hover {
    background-color: #757961;
    border-color: #757961;
    color: #fdfaf0;
}

.confirmation-result {
    min-height: 32px;
    font-size: var(--font-base-size);
    font-weight: 600;
}

.confirmation-result.success {
    color: #2c7a48;
}

.confirmation-result.pending {
    color: #7b5b20;
}

.confirmation-result.error {
    color: #a63f3f;
}

.confirmation-button--secondary {
    background-color: #b4b5a3;
    border-color: #757961;
    color: #2f2b1e;
}

.confirmation-button--secondary:hover {
    background-color: #757961;
    color: #fdfaf0;
}

.confirmation-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.confirmation-result-card {
    border: 1px solid rgba(58, 43, 32, 0.12);
    border-radius: 16px;
    padding: 16px;
    background: #fffdf8;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.confirmation-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.confirmation-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: #3a2b20;
}

.confirmation-card-meta {
    font-size: var(--font-small-size);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7b7150;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.confirmation-card-status {
    align-self: flex-start;
    font-size: var(--font-tiny-size);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.confirmation-card-status.confirmed {
    background: rgba(44, 122, 72, 0.1);
    color: #2c7a48;
    border-color: rgba(44, 122, 72, 0.35);
}

.confirmation-card-status.pending {
    background: rgba(123, 91, 32, 0.1);
    color: #7b5b20;
    border-color: rgba(123, 91, 32, 0.35);
}

.confirmation-note {
    margin: 0;
    font-size: var(--font-base-size);
    color: #4f3b2f;
}

.confirmation-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.confirmation-related-note {
    font-size: var(--font-small-size);
    color: #4f3b2f;
    margin: 4px 0;
    letter-spacing: 0.02em;
}

.confirmation-related-card {
    border: 1px dashed rgba(117, 121, 97, 0.6);
    background: #fbf9f0;
}

.civil-card--extra .civil-list li,
.civil-card--event .civil-list li {
    padding-left: 0;
}

@media (min-width: 720px) {
    .civil-main {
        gap: 28px;
    }

    .civil-card--dress {
        display: grid;
    }

    .civil-card--dress>h2,
    .civil-card--dress>p {
        grid-column: 1 / -1;
    }
}

/* Dashboard page */
.dashboard-page {
    background-color: #f5f3e9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
}

.dashboard-page footer {
    margin-top: auto;
    width: 100%;
    padding: 20px 0;
}

.dashboard-header {
    padding: 40px 20px 20px;
    text-align: center;
    color: #3a2b20;
}

.dashboard-header h1 {
    margin: 0 0 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 1.6rem;
}

.dashboard-header p {
    margin: 0;
    color: #6b6147;
}

.dashboard-actions {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-link {
    background: transparent;
    border-color: rgba(58, 43, 32, 0.3);
    color: #3a2b20;
}

.dashboard-main {
    width: min(960px, 94%);
    margin: 0 auto 40px;
    flex: 1;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.dashboard-status {
    font-size: var(--font-small-size);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
    color: #7b7150;
}

.dashboard-status.success {
    color: #2c7a48;
}

.dashboard-status.pending {
    color: #7b5b20;
}

.dashboard-status.error {
    color: #a63f3f;
}

.dashboard-table-wrapper {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-base-size);
}

.dashboard-table th,
.dashboard-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.dashboard-table th:last-child,
.dashboard-table td.actions-cell {
    text-align: center;
    width: 120px;
}

.dashboard-table th {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: var(--font-small-size);
    color: #7b7150;
}

.dashboard-table tbody tr:hover {
    background: rgba(58, 43, 32, 0.04);
}

.status-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-cell small {
    color: #7b7150;
    font-size: var(--font-small-size);
}

.status-cell.confirmed span {
    color: #2c7a48;
}

.status-cell.pending span {
    color: #7b5b20;
}

.dashboard-delete-button {
    border: 1px solid rgba(122, 60, 60, 0.65);
    background: rgba(166, 63, 63, 0.12);
    color: #7a2d2d;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: var(--font-tiny-size);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dashboard-delete-button:hover:not(:disabled) {
    background: rgba(166, 63, 63, 0.25);
    color: #531818;
}

.dashboard-delete-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
