/**
 * ============================================
 * H2O UI SYSTEM — STYLESHEET OFICIAL
 * Archivo: /css/h2o-styles.css
 * Proyecto: H2O Maps / Directorio / Perfil
 * ============================================
 *
 * REGLAS DEL ARCHIVO
 *
 * 1) Aquí vive el CSS oficial del sistema H2O
 * 2) CSS específico de Ultimate Member debe quedarse en Customizer
 * 3) Evitar duplicaciones con CSS inline de functions.php
 * 4) Cada nuevo bloque debe entrar en una sección oficial
 *
 * ESTRUCTURA DEL ARCHIVO
 *
 * 01. Base / Reset H2O (reservado para futura expansión)
 * 02. Maps / Selector de ubicación
 * 03. Directorio
 * 04. Componentes reutilizables (reservado para futura expansión)
 * 05.A Responsive / Selector de ubicación
 * 05.B Responsive / Directorio
 * 06. Overrides mínimos
 * 07. PERFIL — Bloque de modalidades
 * 08. H2O PERFIL — Sistema visual base
   Bloque de modalidades, certificados, etc..
 * 09. H2O / UM — Ocultar campos técnicos GEO
 * 10. Legacy temporal (reservado solo si vuelve a ser necesario)
 *
 */
 
 /* ============================================
   01. BASE / RESET H2O
   Reservado para futura expansión
============================================ */

/* ============================================
   02. MAPS — SELECTOR DE UBICACIÓN
============================================ */

/* --------------------------------------------
   02.A MAPS — Estado de carga del selector
--------------------------------------------- */

.h2o-selector-ubicacion.cargando {
    opacity: 0.7;
    position: relative;
}

.h2o-selector-ubicacion.cargando::after {
    content: "Cargando mapa...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 8px;
    color: #1a2980;
    font-weight: bold;
    z-index: 10;
}

/* --------------------------------------------
   02.B MAPS — Animaciones auxiliares
--------------------------------------------- */

@keyframes h2oPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 180, 219, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 180, 219, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 180, 219, 0); }
}

/* Opcional — microinteracción del botón de ubicación
   Activar si se desea feedback visual al presionar */
 /*
.h2o-boton-ubicacion:active {
    animation: h2oPulse 0.5s;
}
*/

/* --------------------------------------------
   02.C MAPS — UI oficial del selector
--------------------------------------------- */
.h2o-selector-ubicacion{
  margin: 22px 0;
  font-family: Poppins, Roboto, Arial, sans-serif;
  color: #2b2b2b;
}

.h2o-ubicacion-header{ margin-bottom: 10px; }

.h2o-ubicacion-title{
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937; /* gris oscuro */
}

.h2o-ubicacion-subtitle{
  margin: 0;
  font-size: 14px;
  color: #6b7280; /* gris medio */
  line-height: 1.45;
}

.h2o-ubicacion-controls{
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 14px 0 14px;
}

.h2o-input-direccion{
  flex: 1;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  background: #fff;
  color: #111827;
}

.h2o-input-direccion:focus{
  outline: none;
  border-color: rgba(46,163,242,.65);
  box-shadow: 0 0 0 3px rgba(46,163,242,.18);
}

.h2o-btn-ubicacion{
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: none;
  background: #2ea3f2;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.h2o-btn-ubicacion:hover{
  filter: brightness(.95);
}

.h2o-mapa-contenedor{
  width: 100%;
  height: 350px;
  border-radius: 14px;
  overflow: hidden;
  background: #eef;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.h2o-privacy-note{
  margin: 10px 0 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

/* ============================================
   03. DIRECTORIO
============================================ */

.h2o-dir { margin: 30px 0; }

/* Barra superior */
.h2o-dir .h2o-dir-topbar{
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  background: #fff;
}

.h2o-dir .h2o-label{
  display:block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}

.h2o-dir .h2o-input{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
}

.h2o-dir .h2o-dir-actions{
  display:flex;
  gap: 10px;
  justify-content: flex-end;
}

.h2o-dir .h2o-btn{
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.18);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}

.h2o-dir .h2o-btn--primary{
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Cuerpo: lista + mapa */
.h2o-dir .h2o-dir-body{
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 18px;
  margin-top: 16px;
  align-items: start;
}

/* Resultados (IMPORTANTE: el JS usa ID #h2o-dir-results) */
.h2o-dir #h2o-dir-results{
  display: grid;
  gap: 12px;
}

/* Cards */
.h2o-dir #h2o-dir-results .h2o-card{
  display:flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  background:#fff;
}

.h2o-dir #h2o-dir-results .h2o-card-img{
  width: 140px;
  height: 140px; /* formato carnet */
  border-radius: 12px;
  background: #f3f4f6;
  flex: 0 0 auto;
  overflow: hidden;
}

.h2o-dir #h2o-dir-results .h2o-card-img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.h2o-dir #h2o-dir-results .h2o-card-title{
  font-size: 15px;
  font-weight: 600;
  color:#222;
  margin-bottom: 6px;
}

.h2o-dir #h2o-dir-results .h2o-card-title a{
  color:#222;
  text-decoration: none;
}

.h2o-dir #h2o-dir-results .h2o-card-meta{
  font-size: 13px;
  color:#666;
  line-height: 1.25;
}

/* Mapa + nota */
.h2o-dir .h2o-dir-privacy{
  font-size: 12px;
  color: #777;
  margin-top: 10px;
  line-height: 1.3;
}

/* ============================================
   04. COMPONENTES REUTILIZABLES
   Reservado para futura expansión
============================================ */

/* --------------------------------------------
   05.A RESPONSIVE — Selector de ubicación
--------------------------------------------- */

@media (max-width: 768px){
  .h2o-ubicacion-controls{
    flex-direction: column;
    align-items: stretch;
  }
  .h2o-btn-ubicacion{
    width: 100%;
  }
}

/* --------------------------------------------
   05.B RESPONSIVE — Directorio
--------------------------------------------- */

@media (max-width: 980px){
  .h2o-dir .h2o-dir-topbar{
    grid-template-columns: 1fr 1fr;
  }
  .h2o-dir .h2o-dir-actions{
    grid-column: 1 / -1;
    justify-content: stretch;
  }
  .h2o-dir .h2o-dir-actions .h2o-btn{ width: 100%; }
  .h2o-dir .h2o-dir-body{
    grid-template-columns: 1fr;
  }
}

/* ============================================
   06. OVERRIDES MÍNIMOS
============================================ */

.gm-style iframe + div {
    border: none !important;
}

/* Personalizar controles del mapa */
.gmnoprint.gm-bundled-control.gm-bundled-control-on-bottom {
    margin: 10px !important;
}

.h2o-dir .h2o-dir-topbar{ display: grid !important; }
.h2o-dir .h2o-dir-body{ display: grid !important; }
.h2o-dir #h2o-dir-results{ display: grid !important; }

.h2o-dir .select2-container--default .select2-selection--single{
  background: #fff !important;
  border: 1px solid rgba(0,0,0,.15) !important;
  border-radius: 10px !important;
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
}

.h2o-dir .select2-container--default .select2-selection--single .select2-selection__rendered{
  color: #111 !important;
  line-height: 1.2 !important;
}

.h2o-dir .select2-container--default .select2-selection--single .select2-selection__placeholder{
  color: #666 !important;
}

.h2o-dir .select2-container--default .select2-selection--single .select2-selection__arrow b{
  border-color: #111 transparent transparent transparent !important;
}

.h2o-dir .select2-container--default .select2-results__option{
  color: #111 !important;
}

.h2o-dir .select2-container--default .select2-results__option--highlighted[aria-selected]{
  background: #e5e7eb !important;
  color: #111 !important;
}

/* ===============================
   07. PERFIL — Bloque de modalidades
   Shortcode: [h2o_profile_modalidades]
   =============================== */

.h2o-profile-modalidades{
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.h2o-profile-modalidad-card{
  background: #ffffff;
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.05);
}

.h2o-profile-modalidad-head{
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.h2o-profile-modalidad-slot{
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6b7280;
}

.h2o-profile-modalidad-main{
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.h2o-profile-modalidad-icon{
  flex: 0 0 72px;
  width: 72px;
}

.h2o-profile-modalidad-icon img{
  width: 72px;
  height: 72px;
  display: block;
  object-fit: contain;
}

.h2o-profile-modalidad-content{
  flex: 1 1 auto;
  min-width: 0;
}

.h2o-profile-modalidad-service{
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
}

.h2o-profile-modalidad-exp,
.h2o-profile-modalidad-price,
.h2o-profile-modalidad-rating{
  font-size: 16px;
  line-height: 1.5;
  color: #4b5563;
  margin-top: 4px;
}

.h2o-profile-modalidad-price{
  font-weight: 700;
  color: #111827;
}

.h2o-profile-modalidad-rating{
  color: #6b7280;
  margin-top: 10px;
}

@media (max-width: 767px){
  .h2o-profile-modalidad-card{
    padding: 18px;
  }

  .h2o-profile-modalidad-main{
    gap: 14px;
  }

  .h2o-profile-modalidad-icon{
    flex: 0 0 60px;
    width: 60px;
  }

  .h2o-profile-modalidad-icon img{
    width: 60px;
    height: 60px;
  }

  .h2o-profile-modalidad-service{
    font-size: 20px;
  }

  .h2o-profile-modalidad-exp,
  .h2o-profile-modalidad-price,
  .h2o-profile-modalidad-rating{
    font-size: 15px;
  }
}
/* ===============================
  08. H2O PERFIL — Sistema visual base
   Bloque de modalidades, certificados, etc..
   =============================== */

:root{
  --h2o-surface: #ffffff;
  --h2o-border: rgba(15, 23, 42, .08);
  --h2o-shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --h2o-radius-lg: 18px;
  --h2o-text-strong: #0f172a;
  --h2o-text-main: #334155;
  --h2o-text-soft: #64748b;
  --h2o-accent: #0f172a;
}

.h2o-profile-modalidades{
  display: grid;
  gap: 24px;
  margin-top: 8px;
}

.h2o-profile-modalidad-item + .h2o-profile-modalidad-item{
  padding-top: 24px;
  border-top: 1px solid var(--h2o-border);
}

.h2o-profile-modalidad-head{
  margin-bottom: 16px;
}

.h2o-profile-modalidad-slot{
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--h2o-text-soft);
}

.h2o-profile-modalidad-main{
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.h2o-profile-modalidad-icon{
  flex: 0 0 76px;
  width: 76px;
}

.h2o-profile-modalidad-icon img{
  width: 76px;
  height: 76px;
  display: block;
  object-fit: contain;
}

.h2o-profile-modalidad-content{
  flex: 1 1 auto;
  min-width: 0;
}

.h2o-profile-modalidad-service{
  font-size: 28px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--h2o-text-strong);
  margin-bottom: 12px;
}

.h2o-profile-modalidad-exp,
.h2o-profile-modalidad-price,
.h2o-profile-modalidad-rating{
  font-size: 17px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--h2o-text-main);
}

.h2o-profile-modalidad-exp + .h2o-profile-modalidad-price,
.h2o-profile-modalidad-price + .h2o-profile-modalidad-rating{
  margin-top: 6px;
}

.h2o-profile-modalidad-price{
  font-size: 18px;
  font-weight: 800;
  color: var(--h2o-accent);
}

.h2o-profile-modalidad-rating{
  color: var(--h2o-text-soft);
  margin-top: 12px;
}

@media (max-width: 767px){
  .h2o-profile-modalidad-main{
    gap: 14px;
  }

  .h2o-profile-modalidad-icon{
    flex: 0 0 62px;
    width: 62px;
  }

  .h2o-profile-modalidad-icon img{
    width: 62px;
    height: 62px;
  }

  .h2o-profile-modalidad-service{
    font-size: 23px;
  }

  .h2o-profile-modalidad-exp,
  .h2o-profile-modalidad-price,
  .h2o-profile-modalidad-rating{
    font-size: 15px;
  }
}

/* ===============================
   09. H2O / UM — Ocultar campos técnicos GEO
   =============================== */
.um [data-key="h2o_lat"],
.um [data-key="h2o_lng"],
.um [data-key="h2o_country"],
.um [data-key="h2o_state"],
.um [data-key="h2o_city"],
.um [id$="_h2o_lat"],
.um [id$="_h2o_lng"],
.um [id$="_h2o_country"],
.um [id$="_h2o_state"],
.um [id$="_h2o_city"]{
  display: none !important;
}

/* ============================================
   10. LEGACY TEMPORAL
   Reservado solo si vuelve a ser necesario
============================================ */
