/* ==========================================================================
   STYLE.CSS - VERSÃO FINAL (FOTOS GRANDES MOBILE + SEÇÃO DIVIDIDA)
   ========================================================================== */

:root {
    --earth: #95714F;
    --sand: #C7AF94;
    --almond: #FDFBF7;
    --text: #4A4A4A;
    --white: #FFFFFF;
    --admin-sidebar: #2C2622;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
body { background-color: var(--almond); color: var(--text); line-height: 1.6; overflow-x: hidden; }

/* TIPOGRAFIA */
h1, h2, h3, h4, .section-header h2, .footer-col h4 { 
    font-family: 'Georgia', serif !important; 
    color: var(--earth) !important; 
    font-weight: 400 !important; 
    margin-bottom: 15px; 
    line-height: 1.3;
}
h1 { font-size: 2.8rem; letter-spacing: 1px; }
h2 { font-size: 2.4rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.3rem; }

a { text-decoration: none; transition: 0.3s; }
img, video { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 25px; }

/* HEADER */
.main-header { background: #FFFFFF; box-shadow: 0 2px 10px rgba(0,0,0,0.03); position: sticky; top: 0; z-index: 1000; height: auto; min-height: 80px; display: flex; align-items: center; }
.header-content { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 10px 0; }
.logo-wrapper { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-wrapper img { height: 45px !important; width: auto; transition: 0.3s; }
.main-header nav { display: flex; align-items: center; gap: 35px; flex-wrap: wrap; }
.nav-link { color: #555; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; transition: all 0.3s ease; }
.nav-link:hover { color: var(--earth); }

/* HERO */
.hero-container { width: 100%; height: 60vh; min-height: 400px; max-height: 700px; overflow: hidden; background: #000; position: relative; }
.hero-picture { width: 100%; height: 100%; display: block; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center center; }

/* BUSCA */
.booking-section { text-align: center; position: relative; z-index: 10; margin-top: -50px; padding-bottom: 20px; }
.booking-wrapper { padding: 0 20px; }
.search-bar { background: #FFFFFF; padding: 30px 40px; border-radius: 50px; display: inline-flex; gap: 30px; justify-content: center; align-items: flex-end; box-shadow: 0 15px 40px rgba(0,0,0,0.15); max-width: 900px; width: 100%; border: 1px solid rgba(0,0,0,0.05); }
.input-group { text-align: center; display: flex; flex-direction: column; align-items: center; }
.input-group label { font-size: 0.75rem; text-transform: uppercase; color: var(--earth); font-weight: bold; margin-bottom: 8px; }
.input-group input { width: 180px; padding: 12px; border: 1px solid #E0E0E0; border-radius: 8px; text-align: center; background: #FAFAFA; }
.btn-search { background: var(--sand); color: #fff; border: none; padding: 13px 40px; border-radius: 30px; cursor: pointer; font-weight: bold; text-transform: uppercase; transition:0.3s; }
.btn-search:hover { background: var(--earth); }

#feedback-busca { margin-top: 25px; min-height: 40px; display: flex; justify-content: center; align-items: center; gap: 15px; flex-wrap: wrap; }
.msg-texto { font-size: 1.1rem; font-weight: bold; color: var(--text); }
.btn-reservar-final { background: #25D366; color: white; padding: 10px 25px; border-radius: 30px; text-decoration: none; font-weight: bold; box-shadow: 0 4px 10px rgba(0,0,0,0.1); display: inline-flex; align-items: center; gap: 8px; }
.btn-reservar-final:hover { background: #1ebc57; transform: translateY(-2px); }
.msg-erro { color: #c0392b; background: #fceceb; padding: 10px 20px; border-radius: 20px; font-weight: bold; }

.divider-gold { width: 80px; height: 3px; background: var(--earth); margin: 30px auto; border-radius: 2px; }

/* GERAL */
.section { padding: 80px 20px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header p { color: #888; font-size: 1.1rem; }
.logo-section-large { height: 160px; width: auto; margin: 0 auto 25px; display: block; }

.bg-white { background: var(--white); }
.bg-history { background: linear-gradient(180deg, var(--white) 0%, var(--almond) 100%); }

/* --- SEÇÃO SOBRE CASA (DIVISÃO RESTAURADA) --- */
#sobre-casa {
    background-color: var(--white);
    border-top: 8px solid var(--sand);
    border-bottom: 8px solid var(--sand);
    padding: 80px 20px;
    margin: 40px 0;
}

/* GALERIA (ABAS) */
.tabs-container { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; }
.tab-btn { background: transparent; border: 2px solid var(--earth); color: var(--earth); padding: 12px 30px; border-radius: 30px; cursor: pointer; font-weight: bold; transition: 0.3s; }
.tab-btn:hover, .tab-btn.active { background: var(--earth); color: #fff; }

/* GRID DESKTOP */
.galeria-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 30px; }
.foto-card { height: 250px; border-radius: 8px; overflow: hidden; position: relative; cursor: pointer; background-color: #eee; }
.foto-card img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; } 
.foto-card:hover img { transform: scale(1.03); }

/* AMENITIES */
.text-center-box { max-width: 900px; margin: 0 auto; text-align: center; }
.subtitle-gold { display: block; color: var(--sand); font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; font-weight: 600; }
.amenities-row { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-top: 40px; }
.item-icon { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #555; }
.item-icon i { color: var(--earth); font-size: 1.2rem; }

/* VÍDEO */
.video-cinema-bg { background-image: url('assets/img/bg-video.jpg'); background-size: cover; position: relative; padding: 80px 20px; }
.overlay-cinema { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.90); backdrop-filter: blur(10px); z-index: 1; }
.content-relative { position: relative; z-index: 2; }
.video-container-full { max-width: 900px; margin: 0 auto; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 60px rgba(149, 113, 79, 0.25); border: 8px solid white; }

/* GUIA & LOCAIS */
.guia-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.guia-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.guia-content { padding: 25px; }
.tag-guia { background: var(--almond); color: var(--earth); padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; text-transform: uppercase; font-weight: bold; display: inline-block; margin-bottom: 15px; }

/* ✅ AJUSTE FINAL GUIA: remove “quadro” e padroniza sem barras brancas
   - Usamos aspect-ratio + object-fit: cover (não fica com fundo)
   - Obs: cover pode cortar um pouco as fotos (trade-off para não ter quadro). */
#guia-arraial .guia-card img{
  width: 100% !important;
  aspect-ratio: 16/9;
  height: auto !important;
  object-fit: cover !important;
  object-position: center center !important;
  background: transparent !important;
  display: block !important;
}
@media (max-width: 768px){
  #guia-arraial .guia-card img{ aspect-ratio: 4/3; }
}

.map-frame { border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border: 1px solid #ddd; }
.places-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; } 
.place-card-link { text-decoration: none; color: inherit; display: block; }
.place-card { background: white; padding: 15px; border-radius: 12px; text-align: center; border: 1px solid #eee; transition: 0.3s; height: 100%; }
.place-card:hover { transform: translateY(-3px); border-color: var(--earth); }
.icon-place { font-size: 1.4rem; color: var(--earth); margin-bottom: 8px; }
.place-card h4 { font-size: 1rem; margin-bottom: 5px; color: var(--earth); }
.place-card span { font-size: 0.8rem; color: #888; }

/* ANFITRIÃ */
.host-container { display: grid; grid-template-columns: 300px 1fr; gap: 50px; align-items: center; max-width: 900px; margin: 0 auto; }
.host-photo img { width: 100%; height: 300px; object-fit: cover; border-radius: 15px; box-shadow: 10px 10px 0 rgba(149, 113, 79, 0.2); }
.badge-superhost { display: inline-block; background: var(--earth); color: #fff; padding: 5px 15px; border-radius: 20px; font-size: 0.8rem; margin-top: 15px; font-weight: bold; }

/* FOOTER */
.main-footer { background: var(--earth); color: var(--sand); padding: 60px 20px 30px; border-top: 5px solid var(--sand); }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; max-width: 1200px; margin: 0 auto; }
.footer-col h4 { font-size: 1.2rem; margin-bottom: 25px; text-transform: uppercase; letter-spacing: 2px; color: var(--sand) !important; border-bottom: 1px solid rgba(199, 175, 148, 0.3); padding-bottom: 10px; display: inline-block; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--almond); text-decoration: none; font-size: 0.95rem; transition: 0.3s; }
.footer-links a:hover { color: #fff; padding-left: 5px; }
.contact-item { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; color: var(--almond); font-size: 0.95rem; }
.contact-item i { color: var(--sand); font-size: 1.1rem; }
.footer-bottom { border-top: 1px solid rgba(199, 175, 148, 0.2); margin-top: 50px; padding-top: 30px; display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--sand); }

/* KODA */
.koda-link { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.2); padding: 6px 14px; border-radius: 30px; transition: all 0.4s ease; text-decoration: none; border: 1px solid rgba(199, 175, 148, 0.3); }
.koda-link:hover { background: var(--sand); box-shadow: 0 0 15px rgba(199, 175, 148, 0.6); }
.koda-text { font-size: 0.7rem; color: var(--almond); text-transform: uppercase; }
.koda-brand { font-size: 0.85rem; font-weight: 800; color: #fff; }
.koda-link:hover .koda-text, .koda-link:hover .koda-brand { color: var(--earth); }

.whatsapp-float { position: fixed; bottom: 30px; right: 30px; background-color: #25d366; color: #FFF; width: 60px; height: 60px; border-radius: 50%; text-align: center; font-size: 35px; z-index: 1000; display: flex; align-items: center; justify-content: center; box-shadow: 2px 2px 10px rgba(0,0,0,0.3); animation: pulse-green 2s infinite; }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); } 100% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); } }

/* ADMIN CSS (BACKEND) */
body.admin-body { background: #f0f2f5; display: flex; flex-direction: row; min-height: 100vh; padding: 0; margin: 0; }
.sidebar { width: 280px; background: var(--admin-sidebar); color: var(--admin-text); height: 100vh; position: fixed; top: 0; left: 0; overflow-y: auto; z-index: 2000; }
.sidebar h3 { text-align: center; color: var(--sand); padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.05); margin-top: 0; }
.sidebar a { display: flex; align-items: center; gap: 15px; padding: 16px 30px; color: #a0a0a0; transition: 0.3s; border-left: 4px solid transparent; text-decoration: none; font-size: 1rem; }
.sidebar a:hover, .sidebar a.active { background: rgba(193, 154, 107, 0.1); color: #fff; border-left: 4px solid var(--earth); }
.admin-content { margin-left: 280px; padding: 40px; width: calc(100% - 280px); box-sizing: border-box; }
.card { background: white; padding: 30px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); margin-bottom: 25px; }
.form-control { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; margin-bottom: 15px; display: block; }
.btn-primary { background: var(--earth); color: white; padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; width: 100%; font-weight: bold; }
.btn-primary:hover { background: #7A5C40; }
.alert { padding: 15px; margin-bottom: 20px; border-radius: 5px; }
.alert.success { background: #d4edda; color: #155724; }
.alert.error { background: #f8d7da; color: #721c24; }

/* ==========================================================================
   RESPONSIVIDADE MOBILE (FOTOS ESTILO INSTAGRAM/CACIMBAH)
   ========================================================================== */
@media (max-width: 768px) {
    /* Menu */
    .main-header { height: auto; padding: 15px 0; }
    .header-content { flex-direction: column; gap: 15px; }
    .main-header nav { flex-wrap: wrap; justify-content: center; gap: 15px; width: 100%; padding: 0 10px; }
    .logo-wrapper { flex-direction: row; gap: 10px; }
    .logo-wrapper img { height: 60px !important; }

    .hero-container { height: 60vh; }
    .booking-section { margin-top: -30px; }
    .search-bar { flex-direction: column; width: 100%; padding: 25px 20px; }
    .input-group, .input-group input, .btn-search { width: 100%; }

    /* --- FOTOS CASA MOBILE --- */
    .galeria-grid { 
        display: flex !important; 
        flex-direction: column !important; 
        gap: 20px; 
        padding-bottom: 20px; 
    }

    .foto-card { 
        width: 100%; 
        height: auto; 
        margin: 0;
        background: transparent !important; 
        border: none !important; 
        box-shadow: none !important; 
        border-radius: 15px;
    }

    .foto-card img { 
        width: 100%; 
        height: auto; 
        object-fit: cover; 
        border-radius: 15px; 
        display: block;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
    }

    /* Slider Gastronomia */
    .places-grid { display: flex !important; overflow-x: auto; gap: 15px; padding-bottom: 15px; justify-content: flex-start; }
    .place-card { min-width: 140px; padding: 15px; flex-shrink: 0; }

    .tabs-container { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; justify-content: flex-start; }
    .tab-btn { flex: 0 0 auto; padding: 8px 20px; }

    .amenities-row { flex-direction: column !important; gap: 20px; align-items: center; }

    .host-container { grid-template-columns: 1fr; }
    .host-photo img { display: block !important; width: 100%; height: 300px; object-fit: cover; }

    .footer-content { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }

    body.admin-body { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; padding: 10px 0; }
    .admin-content { margin-left: 0; width: 100%; padding: 20px; }
}

/* ===== Lightbox (ampliar foto ao clicar) ===== */
#kodaLightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}
#kodaLightbox.open { display: block; }
#kodaLightbox .koda-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
}
#kodaLightbox .koda-lightbox-content {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}
#kodaLightbox img {
  max-width: 96vw;
  max-height: 90vh;
  border-radius: 14px;
  display: block;
}
#kodaLightbox .koda-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  font-size: 28px;
  line-height: 44px;
  cursor: pointer;
}
.foto-card img { cursor: zoom-in; }
/* =========================
   TOUR PELA CASA (AUTO)
========================= */
#tour-casa .tour-slider {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,0.08);
  background: #fff;
}

#tour-casa .tour-track {
  display: flex;
  transition: transform 0.6s ease;
  will-change: transform;
}

#tour-casa .tour-track img {
  width: 100%;
  flex: 0 0 100%;
  height: 520px;
  object-fit: cover;
  object-position: center;
  display: block;
}

#tour-casa .tour-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  cursor: pointer;
  font-size: 28px;
  line-height: 44px;
  color: #333;
  z-index: 3;
}

#tour-casa .tour-btn.prev { left: 12px; }
#tour-casa .tour-btn.next { right: 12px; }

#tour-casa .tour-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 3;
}

#tour-casa .tour-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(255,255,255,0.65);
}

#tour-casa .tour-dot.active {
  background: rgba(255,255,255,0.95);
}

@media (max-width: 768px){
  #tour-casa .tour-track img {
    height: 280px;
  }
}
/* DESABILITAR TOUR TEMPORARIAMENTE */
#tour-casa,
#tour-pela-casa,
#tourCasa,
section.tour-casa {
  display: none !important;
}
/* ==========================================================================
   ADMIN LUXURY SIDEBAR (PADRÃO PARA TODAS AS PÁGINAS)
   ========================================================================== */
body.admin-body { background: #F5F7FA; display: flex; font-family: 'Segoe UI', sans-serif; }

.sidebar { 
    width: 280px; 
    background: #1e1e1e; /* Preto Suave Luxo */
    height: 100vh; 
    position: fixed; 
    top: 0; 
    left: 0; 
    display: flex; 
    flex-direction: column; 
    padding: 30px 0; 
    box-shadow: 4px 0 20px rgba(0,0,0,0.1); 
    z-index: 1000;
}

.brand-area {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.brand-area h3 {
    font-family: 'Georgia', serif;
    font-size: 1.6rem;
    color: #C7AF94; /* Dourado Areia */
    letter-spacing: 2px;
    margin: 0;
    text-transform: uppercase;
}

.brand-area p {
    font-size: 0.75rem;
    color: #666;
    letter-spacing: 1px;
    margin-top: 5px;
    text-transform: uppercase;
}

.menu-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 15px;
}

.sidebar a { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    padding: 16px 25px; 
    color: #a0a0a0; 
    text-decoration: none; 
    font-size: 0.9rem; 
    font-weight: 500; 
    letter-spacing: 0.5px;
    border-radius: 8px;
    transition: all 0.4s ease;
    border-left: 3px solid transparent; /* Indicador sutil */
}

.sidebar a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: #555; /* Ícone discreto */
    transition: 0.3s;
}

/* HOVER & ACTIVE (Efeito Luxo) */
.sidebar a:hover, .sidebar a.active { 
    background: rgba(199, 175, 148, 0.08); 
    color: #C7AF94; 
    padding-left: 30px; /* Movimento suave */
}

.sidebar a:hover i, .sidebar a.active i {
    color: #C7AF94; /* Ícone fica dourado */
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.btn-logout {
    color: #ff6b6b !important;
}
.btn-logout:hover {
    background: rgba(255, 107, 107, 0.1) !important;
    color: #ff8787 !important;
}

/* Ajuste do conteúdo para não ficar embaixo do menu */
.admin-content {
    margin-left: 280px;
    width: calc(100% - 280px);
    padding: 40px;
}

@media (max-width: 768px) {
    .sidebar { width: 100%; height: auto; position: relative; padding: 20px 0; }
    .admin-content { margin-left: 0; width: 100%; }
}