:root {
    /* Cores padrão - serão sobrescritas pelo PHP dinâmico */
    --cor-primaria: #4A90E2;
    --cor-secundaria: #50E3C2;
    --cor-fundo: #F4F4F4;
    --cor-texto: #333333;
    --cor-botao: #FF6F61;
    --cor-destaque: #FFD700;
    
    /* Cores dinâmicas do painel */
    --cor-sombra: #2a5298;
    --cor-promo-bg: #50E3C2;
    --cor-promo-text: #333333;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: Arial, sans-serif;
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    line-height: 1.5;
}
img { max-width: 100%; height: auto; }

/* ================= NAVBAR & LOGO ================= */
.navbar { width: 100%; background-color: var(--cor-primaria); padding: 10px 5%; position: relative; z-index: 1000; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }

.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; color: white; text-decoration: none; font-weight: 600; }
.site-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.4); box-shadow: 0 2px 8px rgba(0,0,0,0.2); transition: transform 0.2s; }
.site-logo:hover { transform: scale(1.05); }

/* Menu Desktop */
.nav-menu { list-style: none; display: flex; margin: 0; padding: 0; gap: 20px; }
.nav-link { color: white; text-decoration: none; font-size: 1rem; transition: 0.2s; padding: 5px 10px; border-radius: 5px; }
.nav-link:hover { background: rgba(255,255,255,0.15); color: var(--cor-secundaria); }
.nav-clock { color: white; font-weight: bold; margin-left: 15px; }

/* Ícone Hambúrguer */
.nav-hamburger { display: none; flex-direction: column; cursor: pointer; gap: 5px; }
.nav-hamburger span { background: white; width: 25px; height: 3px; border-radius: 2px; transition: 0.3s; }
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Menu Mobile - CORRIGIDO */
.nav-menu-mobile { 
    display: none; 
    flex-direction: column; 
    background: var(--cor-primaria); 
    width: 100%; 
    padding: 0; 
    overflow: hidden;
    max-height: 0; 
    transition: max-height 0.3s ease;
}

/* Quando o menu está ativo */
.nav-menu-mobile.active { 
    display: flex !important; /* Força a exibição */
    max-height: 500px !important; /* Garante altura suficiente */
    padding: 10px 0;
}

.nav-menu-mobile .nav-item { margin: 0; text-align: center; }
.nav-menu-mobile .nav-link { display: block; padding: 15px; font-size: 1.1rem; }

/* Menu Mobile */
.nav-menu-mobile { 
    display: none; 
    flex-direction: column; 
    background: var(--cor-primaria); 
    transition: max-height 0.3s ease, opacity 0.3s ease; 
    max-height: 0; 
    opacity: 0;
    overflow: hidden; 
    width: 100%; 
    padding: 0 5%; 
}
.nav-menu-mobile.active { 
    display: flex;  /* ✅ CORREÇÃO PRINCIPAL: faz o menu aparecer */
    max-height: 500px; 
    padding: 10px 0; 
    opacity: 1;
}
.nav-menu-mobile .nav-item { margin: 10px 0; text-align: center; }
.nav-menu-mobile .nav-link { padding: 10px; display: block; color: white; text-decoration: none; }

/* ================= HERO / INICIAL ================= */
#inicial { width: 100%; height: 35rem; text-align: center; padding-bottom: 60px; }
.imgInicial {
    background-image: url("./image/Imagem de fundo inicial.png");
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
    height: 100%;
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    color: white; 
    padding: 20px;
}
#inicial h1 { font-size: 2.8rem; font-weight: bolder; text-shadow: 0 0 15px var(--cor-sombra); margin: 0 0 15px; }
#inicial p { font-size: 1.2rem; font-weight: 600; text-shadow: 0 0 8px rgba(0,0,0,0.5); margin: 0; }

/* ================= PROMOÇÕES ================= */
#agendamentos-pendentes {
    border: 2px solid var(--cor-primaria);
    width: 90%; max-width: 650px;
    border-radius: 12px;
    background: var(--cor-secundaria);
    box-shadow: 0 4px 15px var(--cor-sombra);
    padding: 20px; margin: 30px auto;
    text-align: center;
}
#agendamentos-pendentes p { color: #cc0000; font-size: 20px; font-weight: bolder; margin: 8px 0; }

/* ================= SEÇÕES & AGENDAMENTOS ================= */
.content-container { width: 100%; max-width: 1200px; margin: 30px auto; padding: 0 20px; }
.container-agendamentos { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; margin-top: 30px; margin-bottom: 40px; }
#agendamento_form { width: 100%; text-align: center; }
#form-agendamento { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
#agendamentos-dia { width: 100%; text-align: center; margin-top: 20px; }
#agendamentos-dia h2 { margin-bottom: 20px; }

#lista-agendamentos { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; width: 100%; margin-top: 15px; }
#lista-agendamentos div {
    width: 260px; text-align: center; padding: 15px;
    border: 1px solid var(--cor-primaria); border-radius: 12px;
    background: var(--cor-fundo); cursor: pointer; transition: 0.3s;
}
#lista-agendamentos div:hover { background: var(--cor-primaria); color: #fff; transform: translateY(-3px); }
.statusAgenda { font-weight: bold; margin-top: 8px; }

/* ================= GALERIA ================= */
#galeria-fotos { padding: 40px 20px; text-align: center; }
#galeria-fotos h2 { color: var(--cor-primaria); margin-bottom: 25px; font-size: 2rem; }
#galeria-fotos .fotos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 20px 0;
}
#galeria-fotos img {
    width: 280px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
#galeria-fotos img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.4);
}
@media (max-width: 600px) {
    #galeria-fotos img {
        width: 90%;
        height: 200px;
    }
}

/* ================= INPUTS MODERNOS & AGENDAR ================= */
.booking-card { max-width: 750px; margin: 40px auto; background: #fff; padding: 30px; border-radius: 16px; box-shadow: 0 8px 25px rgba(0,0,0,0.1); width: 95%; }
.modern-input, .modern-textarea {
    width: 100%; padding: 14px 16px; border: 2px solid #e0e0e0; border-radius: 10px;
    font-size: 1rem; transition: all 0.3s ease; background: #fafafa; outline: none; font-family: inherit;
}
.modern-input:focus, .modern-textarea:focus { border-color: var(--cor-primaria); background: #fff; box-shadow: 0 0 0 4px rgba(74,144,226,0.15); }
.modern-textarea { resize: vertical; min-height: 90px; margin-top: 10px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px; }
.step-title { color: var(--cor-primaria); font-weight: 700; margin: 15px 0 8px; display: block; text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.9rem; }
.slot-grid, .service-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.slot, .service-card { background: #f8f9fa; padding: 12px 16px; border-radius: 10px; cursor: pointer; text-align: center; border: 2px solid transparent; transition: 0.2s; flex: 0 0 calc(25% - 10px); }
.slot:hover, .service-card:hover { border-color: var(--cor-primaria); transform: translateY(-2px); }
.slot.selected, .service-card.selected { background: var(--cor-primaria); color: #fff; border-color: var(--cor-secundaria); box-shadow: 0 4px 8px rgba(74,144,226,0.3); }

/* ================= BOTÕES GLOBAIS ================= */
button {
    background: var(--cor-botao); color: white; padding: 12px 24px; border: none;
    border-radius: 8px; cursor: pointer; font-size: 1rem; font-weight: 600; transition: 0.2s;
}
button:hover { background: var(--cor-destaque); color: var(--cor-texto); transform: translateY(-1px); }
button.voltar { background: var(--cor-primaria); }
.btn-confirm { width: 100%; padding: 15px; font-size: 1.1rem; margin-top: 20px; border-radius: 12px; box-shadow: 0 4px 12px rgba(255,111,97,0.3); }
.btn-back { display: block; text-align: center; margin-top: 18px; color: var(--cor-primaria); text-decoration: none; font-weight: 600; transition: 0.2s; }
.btn-back:hover { color: var(--cor-secundaria); }

/* ================= FOOTER ================= */
footer {
    width: 100%; background: var(--cor-primaria); color: white; padding: 40px 5% 25px;
    margin-top: auto; display: flex; flex-wrap: wrap; justify-content: center;
    gap: 30px; text-align: center;
}
.footer-contact { text-align: left; }
.footer-social { display: block; text-align: left; }
.footer-map, .footer-contact, .footer-social { flex: 1 1 280px; max-width: 380px; }
.footer-map iframe { width: 100%; height: 200px; border-radius: 10px; border: none; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.footer-contact p, .footer-social p { margin: 8px 0; line-height: 1.5; }
.footer-contact a, .footer-social a { color: white; text-decoration: none; transition: 0.2s; }
.footer-contact a:hover, .footer-social a:hover { color: var(--cor-secundaria); }
.footer-admin { display: inline-block; margin-top: 12px; background: rgba(0,0,0,0.25); padding: 6px 12px; border-radius: 6px; font-size: 0.9rem; transition: 0.2s; }
.footer-admin:hover { background: rgba(0,0,0,0.4); color: var(--cor-secundaria); }
.footer-bottom { width: 100%; margin-top: 35px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.25); text-align: center; font-size: 0.9rem; line-height: 1.6; }
.dev-credit { margin-top: 6px; opacity: 0.85; font-size: 0.85rem; }

/* ================= RESPONSIVIDADE ================= */
@media (max-width: 768px) {
    .nav-menu { display: none; }
    .nav-hamburger { display: flex; }
    .nav-menu-mobile .nav-link { padding: 10px; display: block; }
    #inicial { height: 25rem; }
    #inicial h1 { font-size: 2rem; }
    .form-row { grid-template-columns: 1fr; }
    .booking-card { margin: 20px auto; padding: 20px; }
    .slot, .service-card { flex: 0 0 calc(33.33% - 10px); }
    footer { flex-direction: column; align-items: center; gap: 25px; padding: 30px 20px 20px; }
    .footer-map, .footer-contact, .footer-social { max-width: 100%; }
    .nav-logo { font-size: 1.2rem; gap: 8px; }
    .site-logo { width: 35px; height: 35px; }
}
@media (max-width: 480px) {
    #inicial h1 { font-size: 1.5rem; }
    .container-agendamentos { padding: 0 10px; }
    #agendamentos-pendentes { width: 95%; padding: 15px; }
    #agendamentos-pendentes p { font-size: 18px; }
    .slot, .service-card { flex: 0 0 calc(50% - 10px); font-size: 0.9rem; }
}