/**
Theme Name: Habitad
Theme URI: https://www.grupohabitad.com
Author: Kreamedia
Author URI: https://kreamedia.com
Description: Tema fill d'Astra per a Grupo Habitad Inmobiliaria. Branding corporatiu groc/gris, tipografia neta i CTAs destacats. Construit sota el Programa Kit Digital — Categoria I (Sitio Web y Presencia Basica).
Version: 1.1.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: habitad
Template: astra
*/

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors corporatius Grupo Habitad */
  --hbt-yellow:        #FFCC00;
  --hbt-yellow-hover:  #E6B800;
  --hbt-dark:          #2B2B2B;
  --hbt-dark-soft:     #3F3F3F;
  --hbt-gray:          #6B6B6B;
  --hbt-gray-light:    #E8E8E8;
  --hbt-white:         #FFFFFF;
  --hbt-bg-light:      #F8F8F8;

  /* Estat Fase 2 (items grisos al menu) */
  --hbt-disabled:      #999999;

  /* Tipografia (defaults; ajustar quan el client passi logo + brand guide) */
  --hbt-font-body:     "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hbt-font-heading:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Spacing + formes */
  --hbt-radius-btn:    9999px;   /* capsula */
  --hbt-radius-card:   12px;
  --hbt-shadow-card:   0 4px 16px rgba(0,0,0,0.08);
}

/* ============================================================
   2. BOTONS CTA
   ============================================================ */
.hbt-btn,
.wp-block-button.is-style-hbt-primary > .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--hbt-font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  color: var(--hbt-dark);
  background-color: var(--hbt-yellow);
  border: 2px solid var(--hbt-yellow);
  border-radius: var(--hbt-radius-btn);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}

.hbt-btn:hover,
.wp-block-button.is-style-hbt-primary > .wp-block-button__link:hover {
  background-color: var(--hbt-yellow-hover);
  border-color: var(--hbt-yellow-hover);
  transform: translateY(-1px);
}

.hbt-btn--ghost {
  background-color: transparent;
  color: var(--hbt-yellow);
}

.hbt-btn--ghost:hover {
  background-color: var(--hbt-yellow);
  color: var(--hbt-dark);
}

/* Estat desactivat (ex: CTA Alquilar, reservat a Fase 2) */
.hbt-btn.is-disabled,
.hbt-btn--ghost.is-disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   3. UTILS
   ============================================================ */
.hbt-section {
  padding: 5rem 1rem;
}

@media (max-width: 768px) {
  .hbt-section { padding: 3rem 1rem; }
}

.hbt-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Ressalt de text en groc dins de titulars (ex: <span class="hbt-yellow">) */
.hbt-yellow {
  color: var(--hbt-yellow);
}

/* ============================================================
   4. MENU
   ============================================================ */
/* NOTA: majuscules i color de hover del menu es controlen des de l'Astra
   Customizer (Header Builder -> Primary Menu -> Typography / Colors), NO aqui,
   per no pisar-lo amb !important. */

/* Items Fase 2 (Alquilar, Servicios): ocults de moment (feedback Yolanda 06/06).
   Reversible: treure aquesta regla quan entrin a Fase 2. */
.main-header-menu li.is-disabled,
.ast-builder-menu li.is-disabled,
.menu li.is-disabled {
  display: none;
}

/* ============================================================
   5. FLOATING ACTION BUTTONS (trucada + WhatsApp)
   ============================================================ */
.hbt-floating-call {
  position: fixed;
  right: 1.25rem;
  bottom: 5.5rem;            /* sobre el boto WhatsApp del plugin Click to Chat */
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--hbt-dark);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  z-index: 9998;             /* per sota del WhatsApp del plugin (z-index 9999) */
  transition: transform .15s ease, background .15s ease;
}

.hbt-floating-call:hover {
  background: var(--hbt-yellow);
  transform: translateY(-2px);
}

.hbt-floating-call:hover svg {
  fill: var(--hbt-dark);
}

/* ============================================================
   6. PAGINES LEGALS
   ============================================================ */
.legal h2 {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 2px solid var(--hbt-yellow);
  color: var(--hbt-dark);
}

.legal p,
.legal li {
  max-width: 800px;
  line-height: 1.7;
}

/* ============================================================
   7. FORMULARIS (Contact Form 7) — sobre targeta fosca
   La targeta fosca la posa el contenidor (Spectra) que els embolcalla.
   ============================================================ */

/* Etiqueta nomes per a lectors de pantalla (accessibilitat) */
.hbt-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wpcf7-form p {
  margin: 0 0 1rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="email"],
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%;
  padding: .9rem 1rem;
  box-sizing: border-box;
  font-family: var(--hbt-font-body);
  font-size: 1rem;
  color: var(--hbt-dark);
  background: var(--hbt-white);
  border: 2px solid transparent;
  border-radius: 4px;
  transition: border-color .15s ease;
}

.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
  color: var(--hbt-gray);
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--hbt-yellow);
}

.wpcf7-form textarea {
  height: 6rem;
  resize: vertical;
}

/* El paragraf que nomes conte el camp ocult no ha d'ocupar espai ni cel·la */
.wpcf7-form p:has(> input[type="hidden"]:only-child) {
  display: none;
}

/* Disposicio en 2 columnes — activar amb html_class="hbt-form-2col" al shortcode.
   Missatge, acceptacio i boto ocupen tota l'amplada. */
.wpcf7-form.hbt-form-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.wpcf7-form.hbt-form-2col p {
  margin: 0;
}

.wpcf7-form.hbt-form-2col p:has(textarea),
.wpcf7-form.hbt-form-2col p:has(.wpcf7-acceptance),
.wpcf7-form.hbt-form-2col p:has(input[type="submit"]) {
  grid-column: 1 / -1;
}

@media (max-width: 600px) {
  .wpcf7-form.hbt-form-2col {
    grid-template-columns: 1fr;
  }
}

/* Acceptacio de privacitat — text blanc sobre la targeta fosca */
.wpcf7-form .wpcf7-acceptance .wpcf7-list-item {
  margin: 0;
}

.wpcf7-form .wpcf7-acceptance label {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-weight: 400;
  font-size: .9rem;
  color: var(--hbt-white);
}

.wpcf7-form .wpcf7-acceptance a {
  color: var(--hbt-white);
  text-decoration: underline;
}

.wpcf7-form .wpcf7-acceptance input {
  margin-top: .15rem;
}

/* Text alternatiu al costat del boto ("O si lo prefieres...").
   El boto i el text comparteixen paragraf. Amb flex-wrap + gap van a la mateixa
   linia mentre hi caben (desktop) i, quan el text ja no hi cap (~740px cap avall,
   o sigui tauleta i mobil), baixa SEPARAT en comptes de quedar enganxat al boto
   (abans: 0px entre ells perque `margin-left` nomes separa en horitzontal). */
.wpcf7-form p:has(input[type="submit"]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1rem;   /* fila | columna */
}

.hbt-form-alt {
  color: var(--hbt-white);
  font-size: .95rem;
}

.hbt-form-alt a {
  color: var(--hbt-yellow);
  font-weight: 700;
  text-decoration: none;
}

/* Panell "Gracias por escribirnos" (substitueix el form en enviar) */
.hbt-thankyou {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .75rem;
  padding: 2.5rem 1.5rem;
}

.hbt-thankyou__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--hbt-yellow);
  color: var(--hbt-dark);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.hbt-thankyou__msg {
  margin: 0;
  color: var(--hbt-white);
  font-size: 1.1rem;
  font-weight: 600;
  max-width: 28rem;
}

/* Validacio i resposta sobre fons fosc */
.wpcf7-form .wpcf7-not-valid-tip {
  color: #FF8A8A;
  font-size: .8rem;
  font-weight: 600;
}

.wpcf7 .wpcf7-response-output {
  margin-top: 1rem;
  padding: .7rem .9rem;
  border-radius: 4px;
  color: var(--hbt-white);
  font-size: .9rem;
}
