/* RESET E VARIÁVEIS */
:root {
    --bg-color: #fcfbfa; /* Fundo principal: off-white cremoso */
    --surface-color: #ffffff; /* Fundo dos cards */
    --text-primary: #5c534f; /* Textos escuros: tom marrom acinzentado */
    --text-secondary: #8c817d; /* Textos mais claros */
    --accent-color: #d8c3bc; /* Destaques: rosa antigo / nude / areia */
    --accent-color-hover: #c4aca3;
    
    --font-heading: 'Playfair Display', serif;
    --font-text: 'Lato', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ROLAGEM SUAVE NATIVA NO HTML */
html {
    scroll-behavior: smooth;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
}

/* CABEÇALHO (HERO) */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* IMAGEM DE CAPA: Será carregada dinamicamente via JS por segurança */
    background: #e9e3df no-repeat center center/cover;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.4); /* Deixa a foto mais suave/clara */
}

.hero-content {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.85);
    padding: 40px 60px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.baby-name {
    font-size: 4rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* NAVEGAÇÃO HORIZONTAL (SCROLL) */
.navbar {
    background-color: var(--surface-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow-x: auto; /* Permite rolagem no celular */
    white-space: nowrap;
}

.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 15px 20px;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 700;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover, .nav-links a:focus {
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-color);
}

/* LAYOUT PRINCIPAL */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* SEÇÃO MENSAL */
.month-section {
    margin-bottom: 80px;
    /* Ajuste para o menu fixo não cobrir o título ao clicar nas âncoras */
    padding-top: 80px; 
    margin-top: -80px;
}

.month-title {
    font-size: 3rem;
    text-align: center;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.month-caption {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 40px;
}

.month-card {
    background-color: var(--surface-color);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.04);
}

.month-info {
    margin-bottom: 30px;
    text-align: center;
}

.month-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.month-info ul {
    list-style: none;
    display: inline-block;
    text-align: left;
}

.month-info li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.month-info li::before {
    content: "♥";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 1.1rem;
}

/* GALERIA DE FOTOS GRID */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* MODAL / LIGHTBOX */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(252, 251, 250, 0.95);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Classe dinâmica usada pelo JS para mostrar o modal */
.modal.show {
    opacity: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.close-modal {
    position: absolute;
    top: 25px;
    right: 40px;
    color: var(--text-primary);
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--accent-color);
}

/* ANIMAÇÕES SUTIS (Classes aplicadas via JS) */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* RODAPÉ */
.footer {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--surface-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid rgba(0,0,0,0.03);
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .baby-name {
        font-size: 2.8rem;
    }
    
    .nav-links {
        justify-content: flex-start; /* Permite rolar menu no mobile a partir do inicio */
        padding-left: 10px;
    }
    
    .month-card {
        padding: 25px;
    }

    .gallery-img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 30px 20px;
    }

    .baby-name {
        font-size: 2.2rem;
    }
    
    .month-title {
        font-size: 2.2rem;
    }
}

/* ========================================= */
/* LOGIN PAGE & FIREBASE STYLES */
/* ========================================= */
.login-bg {
    /* Subtle gradient to protect child privacy on the public URL login page */
    background: linear-gradient(135deg, #fdfbf7 0%, #d8c3bc 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Removed default display: flex here to allow auth.js to handle it via JS inline style */
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    position: relative;
}

.login-bg::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.5); /* Soften the background image */
    z-index: 0;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(252, 251, 250, 0.95);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    text-align: center;
}

.login-title {
    font-size: 2.2rem;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.login-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.login-form .input-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-primary);
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-text);
    transition: border-color 0.3s;
}

.login-form input:focus {
    border-color: var(--accent-color);
    outline: none;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: var(--font-text);
    margin-top: 10px;
}

.login-btn:hover {
    background-color: var(--accent-color-hover);
}

.error-message {
    color: #d9534f;
    background: #fdf7f7;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    border: 1px solid #f2dede;
}

/* LOGOUT BUTTON */
.logout-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-text);
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.logout-btn:hover {
    color: #d9534f;
    border-bottom: 2px solid #d9534f;
}
