/* Funtastic House — estilos personalizados */
:root {
    --bs-themecolor: #c99f5b;
    --bs-themehovercolor: #b5873c;
}

.heading-font-family { font-family: 'Cormorant Garamond', Georgia, serif !important; }

/* Logótipo */
.fh-logo { font-family:'Cormorant Garamond',serif; font-size:26px; font-weight:700; color:#fff; letter-spacing:0.04em; text-decoration:none; line-height:1; }
.fh-logo span { color:var(--bs-themecolor); }

/* Seletor de idioma */
.lang-switcher a { font-size:12px; font-weight:600; letter-spacing:.06em; color:rgba(255,255,255,.6); text-decoration:none; padding:0 6px; transition:color .2s; }
.lang-switcher a.active, .lang-switcher a:hover { color:var(--bs-themecolor); }
.lang-switcher span { color:rgba(255,255,255,.3); }

/* Calendário de disponibilidade */
.fh-cal-tabs { display:flex; gap:0; border:1px solid rgba(201,159,91,.3); border-radius:50px; overflow:hidden; margin-bottom:20px; }
.fh-cal-tab { flex:1; padding:8px 16px; text-align:center; font-size:13px; font-weight:600; cursor:pointer; transition:all .2s; background:transparent; color:rgba(255,255,255,.5); border:none; letter-spacing:.04em; }
.fh-cal-tab.active { background:var(--bs-themecolor); color:#000; }
.fh-cal { background:rgba(255,255,255,.05); border:1px solid rgba(201,159,91,.2); border-radius:16px; padding:24px; }
.fh-cal-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.fh-cal-month { font-family:'Cormorant Garamond',serif; font-size:20px; color:#fff; font-weight:600; }
.fh-cal-nav { background:transparent; border:1px solid rgba(201,159,91,.3); border-radius:50%; width:32px; height:32px; cursor:pointer; color:var(--bs-themecolor); font-size:16px; transition:all .2s; }
.fh-cal-nav:hover { background:var(--bs-themecolor); color:#000; border-color:var(--bs-themecolor); }
.fh-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
.fh-cal-dow { text-align:center; font-size:10px; font-weight:600; color:rgba(255,255,255,.4); padding:6px 2px; letter-spacing:.06em; }
.fh-cal-day { text-align:center; padding:5px 2px; border-radius:6px; font-size:12px; cursor:pointer; transition:background .2s; color:rgba(255,255,255,.8); }
.fh-cal-day:hover:not(.occ):not(.empty) { background:rgba(201,159,91,.2); }
.fh-cal-day.wknd { color:var(--bs-themecolor); font-weight:600; }
.fh-cal-day.occ { color:rgba(255,255,255,.2); text-decoration:line-through; cursor:default; }
.fh-cal-day.empty { cursor:default; }
.fh-cal-day .dp { display:block; font-size:9px; color:var(--bs-themecolor); font-weight:700; margin-top:1px; }
.fh-cal-day.occ .dp { display:none; }
.fh-cal-legend { display:flex; gap:16px; margin-top:14px; padding-top:14px; border-top:1px solid rgba(255,255,255,.08); }
.fh-cal-legend-item { display:flex; align-items:center; gap:6px; font-size:11px; color:rgba(255,255,255,.4); }
.fh-dot { width:8px; height:8px; border-radius:50%; }

/* Pontos de interesse */
.poi-card { background:var(--bs-body-bg); border:1px solid var(--bs-border-color); border-radius:12px; padding:20px; border-left:3px solid var(--bs-themecolor); transition:all .2s; }
.poi-card:hover { box-shadow:0 4px 20px rgba(0,0,0,.08); transform:translateX(4px); }

/* Badges das experiências */
.exp-badge-imersiva { background:var(--bs-themecolor); color:#000; }
.exp-badge-spa { background:#2C5F6E; color:#fff; }

/* Overlay dos quartos temáticos */
.tema-overlay { position:absolute; bottom:0; left:0; right:0; background:linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 100%); padding:20px 16px 14px; border-radius:0 0 16px 16px; }

/* Idades das crianças */
.children-ages { display:none; }
.children-ages.show { display:block; }

/* Formulário de reserva (fundo escuro) */
.form-dark .form-control,
.form-dark .form-select {
    background:rgba(255,255,255,.05) !important;
    border-color:rgba(255,255,255,.15) !important;
    color:#fff !important;
}
.form-dark .form-control::placeholder { color:rgba(255,255,255,.3) !important; }
.form-dark label { color:rgba(255,255,255,.7); font-size:13px; font-weight:500; }
.form-dark select option { background:#0a0a0c; }

/* Barra inferior fixa — mobile */
.fh-mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(10, 10, 12, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(201, 159, 91, 0.18);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
}

.fh-wa-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    font-size: 22px;
    text-decoration: none;
    transition: opacity .2s;
}
.fh-wa-btn:hover { opacity: .85; color: #fff; }

.fh-mobile-bar .btn {
    flex: 1;
    height: 48px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* -------------------------------------------
   Tablet e telemóvel (≤ 991px)
------------------------------------------- */
@media (max-width: 991.98px) {

    /* Espaço para a barra fixa no fundo */
    #main-wrapper { padding-bottom: 76px; }

    /* O botão da navbar já está na barra inferior */
    .fh-nav-cta { display: none !important; }

    /* Botão "voltar ao topo" fica por cima da barra */
    #back-to-top { bottom: 88px !important; }

    /* Menu mobile com fundo escuro fosco */
    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        background: rgba(10, 10, 12, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-radius: 0 0 20px 20px;
        padding: 12px 8px 16px;
        margin-top: 8px;
        border: 1px solid rgba(201, 159, 91, 0.12);
    }

    /* Área de toque adequada nos links do menu */
    .navbar-collapse .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 10px 16px !important;
        border-radius: 10px;
    }
    .navbar-collapse .nav-link:hover,
    .navbar-collapse .nav-link.active {
        background: rgba(201, 159, 91, 0.1);
    }
    .navbar-collapse .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
        border-radius: 8px;
    }
    .navbar-collapse .dropdown-menu {
        background: rgba(20, 20, 24, 0.95);
        border: 1px solid rgba(201, 159, 91, 0.12);
        border-radius: 12px;
        margin-top: 4px;
    }

    /* Botão hamburger */
    .navbar-toggler {
        width: 44px;
        height: 44px;
        padding: 8px;
    }

    /* Espaçamento vertical das secções */
    section, .section { padding-top: 56px !important; padding-bottom: 56px !important; }

    /* Cabeçalho de página */
    .page-header { min-height: 240px !important; }

    /* Barra de reserva */
    .intro-booking-form { border-radius: 16px; margin: 0 12px; }
}

/* -------------------------------------------
   Telemóvel (≤ 767px)
------------------------------------------- */
@media (max-width: 767.98px) {

    section, .section { padding-top: 44px !important; padding-bottom: 44px !important; }

    /* Títulos fluidos */
    h1, .h1 { font-size: clamp(2rem, 8vw, 3rem) !important; }
    h2, .h2 { font-size: clamp(1.6rem, 6vw, 2.4rem) !important; }

    .page-header { min-height: 200px !important; }
    .page-header h1 { font-size: clamp(1.8rem, 7vw, 2.8rem) !important; }

    /* Formulário de reserva em coluna */
    .intro-booking-form .row > [class*="col-"] { margin-bottom: 12px; }
    .intro-booking-form { padding: 20px 16px; }
    .intro-booking-form .btn { width: 100%; margin-top: 4px; }

    /* Stepper de reserva */
    .fh-steps { gap: 8px; }
    .fh-step-label { font-size: 10px; }

    /* Calendário com células maiores para toque */
    .fh-cal { padding: 16px 10px; }
    .fh-cal-day {
        padding: 7px 2px;
        font-size: 13px;
        min-height: 36px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .fh-cal-nav { width: 40px; height: 40px; font-size: 18px; }

    /* Galeria a 2 colunas */
    .gallery-grid, [class*="masonry"] { column-count: 2 !important; gap: 8px !important; }

    /* Testemunhos sem margem lateral */
    .testimonial-card, [class*="testimonial"] { margin-left: 0 !important; margin-right: 0 !important; }

    /* Mapa a largura total */
    #map, .fh-map { border-radius: 12px !important; }

    .exp-card { border-radius: 16px; }

    /* font-size mínimo de 16px para evitar zoom automático no iOS */
    .form-dark .form-control, .form-dark .form-select { font-size: 16px; }

    .counter-item { padding: 20px 12px; }

    /* Footer centrado */
    footer .row > [class*="col-"] { text-align: center; }
    footer .social-icons { justify-content: center; }
    footer .footer-links { justify-content: center; }

    /* Parallax desativado em mobile */
    .jarallax, [data-jarallax] {
        background-attachment: scroll !important;
        transform: none !important;
    }
    .jarallax > .jarallax-img {
        position: relative !important;
        transform: none !important;
        top: 0 !important;
    }
}

/* -------------------------------------------
   Telemóvel pequeno (≤ 575px)
------------------------------------------- */
@media (max-width: 575.98px) {

    /* Tamanhos de título para ecrãs pequenos */
    .text-19 { font-size: clamp(2rem, 10vw, 3.5rem) !important; }
    .text-13 { font-size: clamp(1.6rem, 8vw, 2.8rem) !important; }
    .text-11 { font-size: clamp(1.3rem, 6vw, 2rem) !important; }

    /* Elemento decorativo — desnecessário em ecrãs pequenos */
    .circle-text { display: none !important; }

    section, .section { padding-top: 36px !important; padding-bottom: 36px !important; }

    .intro-booking-form { margin: 0 8px; padding: 18px 14px; border-radius: 14px; }

    /* Calendário compacto */
    .fh-cal { padding: 12px 6px; }
    .fh-cal-dow { font-size: 9px; padding: 4px 1px; }
    .fh-cal-day { font-size: 12px; padding: 6px 1px; min-height: 32px; }
    .fh-cal-day .dp { font-size: 8px; }
    .fh-cal-month { font-size: 17px; }

    /* Barra inferior em ecrãs muito pequenos */
    .fh-mobile-bar { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
    .fh-wa-btn { width: 44px; height: 44px; font-size: 20px; }
    .fh-mobile-bar .btn { height: 44px; font-size: 13px; }

    /* Área de toque mínima de 44px */
    .btn, a.btn, button { min-height: 44px; }
    .nav-link { min-height: 44px !important; }

    .side-img, .floating-badge { display: none !important; }
}
