:root {
    --olive-primary: #556B2F;
    --olive-dark: #3E4F22;
    --olive-light: #A9BA9D;
    --white: #FFFFFF;
    --off-white: #F8F9F8;
    --gold: #C5A059;
    --text-dark: #2C351E;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Montserrat', sans-serif;
    --shadow: 0 10px 30px rgba(85, 107, 47, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--off-white);
    color: var(--text-dark);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    /* Efeito de pulsação rítmica: 1, 1, 1 - tempo - 1,2,3 */
    -webkit-animation: bgPulse 3.5s infinite linear;
    animation: bgPulse 3.5s infinite linear;
}

@-webkit-keyframes bgPulse {
    0% {
        background-color: #cdd9c4;
    }

    /* BATIDA 1 */
    4% {
        background-color: var(--off-white);
    }

    14% {
        background-color: #cdd9c4;
    }

    /* BATIDA 1 */
    18% {
        background-color: var(--off-white);
    }

    28% {
        background-color: #cdd9c4;
    }

    /* BATIDA 1 */
    32% {
        background-color: var(--off-white);
    }

    /* TEMPO DE PAUSA 32% ~ 50% */
    50% {
        background-color: var(--off-white);
    }

    /* BATIDAS RÁPIDAS 1-2-3 */
    53% {
        background-color: #cdd9c4;
    }

    /* 1 Rápido */
    56% {
        background-color: var(--off-white);
    }

    59% {
        background-color: #cdd9c4;
    }

    /* 2 Rápido */
    62% {
        background-color: var(--off-white);
    }

    65% {
        background-color: #cdd9c4;
    }

    /* 3 Rápido */
    68% {
        background-color: var(--off-white);
    }

    /* TEMPO FINAL ATÉ O REINÍCIO */
    100% {
        background-color: var(--off-white);
    }
}

@keyframes bgPulse {
    0% {
        background-color: #cdd9c4;
    }

    /* BATIDA 1 */
    4% {
        background-color: var(--off-white);
    }

    14% {
        background-color: #cdd9c4;
    }

    /* BATIDA 1 */
    18% {
        background-color: var(--off-white);
    }

    28% {
        background-color: #cdd9c4;
    }

    /* BATIDA 1 */
    32% {
        background-color: var(--off-white);
    }

    /* TEMPO DE PAUSA 32% ~ 50% */
    50% {
        background-color: var(--off-white);
    }

    /* BATIDAS RÁPIDAS 1-2-3 */
    53% {
        background-color: #cdd9c4;
    }

    /* 1 Rápido */
    56% {
        background-color: var(--off-white);
    }

    59% {
        background-color: #cdd9c4;
    }

    /* 2 Rápido */
    62% {
        background-color: var(--off-white);
    }

    65% {
        background-color: #cdd9c4;
    }

    /* 3 Rápido */
    68% {
        background-color: var(--off-white);
    }

    /* TEMPO FINAL ATÉ O REINÍCIO */
    100% {
        background-color: var(--off-white);
    }
}

h1,
h2,
h3 {
    font-family: var(--font-serif);
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* --- Navigation Bar --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    z-index: 900;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    position: relative;
}

/* --- Logo (direita) --- */
.nav-logo {
    margin-left: auto;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    background: var(--olive-primary);
    text-decoration: none;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    letter-spacing: 0.5px;
    transition: background 0.25s ease;
    white-space: nowrap;
    cursor: pointer;
    border: none;
}

.nav-logo:hover {
    background: var(--olive-dark);
}

/* --- Hamburger Button --- */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    z-index: 1001;
    flex-shrink: 0;
    margin-right: auto; /* ainda que o logo fique à direita, o hamburger fica à esquerda */
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--olive-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Animação X ao abrir */
.navbar.open .nav-hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar.open .nav-hamburger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.navbar.open .nav-hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Nav Links (Desktop) --- */
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--olive-dark);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* --- Mobile (<= 600px) --- */
@media (max-width: 600px) {
    .nav-container {
        justify-content: flex-end;
        padding: 0.75rem 1rem;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
        padding: 0.25rem 0 0.75rem;
        border-top: 1px solid #eee;
        margin-top: 0.6rem;
    }

    .navbar.open .nav-links {
        display: flex;
        animation: slideDown 0.22s ease;
    }

    .nav-link {
        padding: 0.8rem 0.25rem;
        font-size: 0.9rem;
        letter-spacing: 0.5px;
        border-bottom: 1px solid #f0f0f0;
        text-align: left;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-6px);
        }

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

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)),
        url('./fotoAniversariante.png') center/cover no-repeat;
    position: relative;
    padding-top: 70px;
}

.hero-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 3rem;
    border: 2px solid var(--olive-primary);
    box-shadow: var(--shadow);
    max-width: 600px;
    animation: fadeIn 1.5s ease-out;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--olive-primary);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--olive-dark);
}

.image-frame {
    width: 250px;
    height: 350px;
    margin: 0 auto 2rem;
    border: 8px solid var(--white);
    outline: 1px solid var(--olive-light);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- RSVP Section --- */
.section-title {
    text-align: center;
    margin: 4rem 0 2rem;
    font-size: 2.5rem;
    color: var(--olive-primary);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gold);
    margin: 10px auto;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 1rem 2rem;
    border: none;
    background: var(--white);
    color: var(--olive-primary);
    font-family: var(--font-sans);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--olive-light);
}

.tab-btn.active {
    background: var(--olive-primary);
    color: var(--white);
}

.guest-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.guest-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--olive-light);
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guest-card:hover {
    transform: translateY(-5px);
    border-left-color: var(--olive-primary);
    box-shadow: var(--shadow);
}

.guest-info h4 {
    color: var(--olive-dark);
    font-size: 1.1rem;
}

.phone-badge {
    background: #e9ecef;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #666;
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: fit-content;
    line-height: 1;
}

.btn-confirm {
    background: var(--olive-primary);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-confirm:hover {
    background: var(--olive-dark);
}

.confirmed {
    background: var(--gold) !important;
    cursor: default !important;
}

/* --- Gifts Section --- */
.gift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.gift-card {
    background: var(--white);
    padding: 2rem;
    text-align: center;
    border: 1px solid #eee;
    transition: var(--transition);
}

.gift-card.taken {
    opacity: 0.6;
    background: #f1f1f1;
}

.gift-card.taken button {
    background: #ccc;
    cursor: not-allowed;
}

/* --- Modal --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    padding: 3rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    border-radius: 2px;
}

.modal-content input {
    width: 100%;
    padding: 0.8rem;
    margin: 1.5rem 0;
    border: 1px solid #ddd;
    font-size: 1rem;
}

.modal-content h3 {
    color: var(--olive-primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Footer & Details */
footer {
    background: var(--olive-primary);
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
    margin-top: 5rem;
}

.event-details {
    margin-top: 2rem;
    font-size: 1.1rem;
    color: var(--olive-light);
}

.event-details p {
    margin: 0.5rem 0;
}