/* ==========================================================================
   JIZEN Salud Tucumán - CSS Design System & Visual Specialty Branding
   ========================================================================== */

/* Prototipos de Diseño Estéticos (Temas Dinámicos) */
body.theme-dark-neon {
  --bg-dark: #0b1329;
  --bg-card: #152238;
  --bg-card-hover: #1c2d4a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
}

/* Los botones de las tarjetas adoptan dinámicamente el color primario de cada especialidad */

body.theme-clean-white {
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
}

body.theme-clean-white .hero-portal { 
  background: #f8fafc !important; 
  border-bottom: none !important;
}
body.theme-clean-white .hero-portal h1 { color: #0f172a !important; }
body.theme-clean-white .hero-portal .hero-subtitle { color: #000000 !important; }
body.theme-clean-white .doctor-card h3 { color: #0f172a !important; }
body.theme-clean-white .portal-header { background: #ffffff; border-bottom-color: #e2e8f0; }

body.theme-modern-teal {
  --bg-dark: #041f1e;
  --bg-card: #0b2524;
  --bg-card-hover: #113634;
  --text-main: #f0fdf4;
  --text-muted: #99f6e4;
  --border-color: rgba(20, 184, 166, 0.25);
}

body.theme-modern-teal .hero-portal { background: radial-gradient(circle at top, rgba(20, 184, 166, 0.15), transparent 70%); }
body.theme-modern-teal .doctor-card { border-color: rgba(20, 184, 166, 0.3) !important; }
body.theme-modern-teal .doctor-card:hover { border-color: #14b8a6 !important; box-shadow: 0 8px 25px rgba(20, 184, 166, 0.25) !important; }

/* Prototipo 4: Minimal Silver (Base de Página #c7c7c93d & Tarjetas Blancas #ffffff sin Degradados) */
body.theme-minimal-silver {
  --bg-dark: #c7c7c93d;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #C7C7C9;
}

body.theme-minimal-silver .hero-portal { 
  background: #c7c7c93d !important; 
  border-bottom: 2px solid #C7C7C9 !important;
}
body.theme-minimal-silver .hero-portal h1 { color: #0f172a !important; }
body.theme-minimal-silver .doctor-card { background: #ffffff !important; border: 1px solid #C7C7C9 !important; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
body.theme-minimal-silver .doctor-card h3 { color: #0f172a !important; }
body.theme-minimal-silver .portal-header { background: #ffffff; border-bottom: 1px solid #C7C7C9; }
body.theme-minimal-silver .brand-portal { color: #0f172a !important; }
body.theme-minimal-silver .search-filter-box { background: #ffffff; border: 1px solid #C7C7C9; }
body.theme-minimal-silver .search-input-wrapper input { background: #f8fafc; border: 1px solid #C7C7C9; color: #0f172a; }
body.theme-minimal-silver .pill-btn { background: #ffffff; border: 1px solid #C7C7C9; color: #475569; }
body.theme-minimal-silver .pill-btn.active { background: #C7C7C9; color: #0f172a; border-color: #C7C7C9; font-weight: bold; }

/* Corrección de Legibilidad en Obras Sociales para Prototipos Claros (Prototipo 2 Clean White & Prototipo 4 Minimal Silver) */
body.theme-clean-white .tag-obra,
body.theme-minimal-silver .tag-obra {
  background: rgba(100, 116, 139, 0.12) !important;
  color: var(--text-muted) !important; /* Mismo color que la dirección del profesional */
  border: 1px solid rgba(100, 116, 139, 0.2);
  font-weight: 600;
}




/* Prototipo 4: Warm Organic (Colores Cálidos, Humanos & Acogedores) */
body.theme-warm-organic {
  --bg-dark: #fdfbf7;
  --bg-card: #ffffff;
  --bg-card-hover: #f7f1e5;
  --text-main: #4a3b32;
  --text-muted: #8c7a6b;
  --border-color: #e6dbcf;
}

body.theme-warm-organic .hero-portal {
  background: radial-gradient(circle at top, rgba(217, 119, 6, 0.12), transparent 70%);
}

body.theme-warm-organic .hero-portal h1 { color: #3d2c23 !important; }
body.theme-warm-organic .hero-portal h1 span { color: #c25e00 !important; }
body.theme-warm-organic .doctor-card h3 { color: #3d2c23 !important; }
body.theme-warm-organic .portal-header { background: rgba(253, 251, 247, 0.95); border-bottom-color: #e6dbcf; }
body.theme-warm-organic .brand-portal { color: #3d2c23 !important; }
body.theme-warm-organic .search-filter-box { background: #ffffff; border-color: #e6dbcf; }
body.theme-warm-organic .search-input-wrapper input { background: #fdfbf7; border-color: #e6dbcf; color: #3d2c23; }
body.theme-warm-organic .pill-btn { background: #fdfbf7; border-color: #e6dbcf; color: #8c7a6b; }
body.theme-warm-organic .pill-btn.active { background: #c25e00; color: white; border-color: #c25e00; }
body.theme-warm-organic .btn-view-onepage { background: #f7f1e5; color: #3d2c23; border-color: #e6dbcf; }
body.theme-warm-organic .btn-view-onepage:hover { background: #ebdcc9; }



* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Banner Superior Oficial (Idéntico al de las Páginas Web Profesionales) */
.official-top-banner {
  background: linear-gradient(90deg, #0f172a, #1e293b);
  border-bottom: 2px solid var(--color-odontologia, #0284c7);
  padding: 12px 25px;
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.banner-inner-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.banner-brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner-icon {
  font-size: 24px;
  color: #38bdf8;
}

.banner-title {
  font-family: var(--font-heading), 'Michroma', sans-serif;
  font-size: 15px;
  letter-spacing: 1px;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1.2;
}

.banner-subtitle {
  font-size: 11px;
  color: #94a3b8;
}

.banner-actions-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.proto-selector-wrapper {
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(255,255,255,0.06);
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.proto-label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: bold;
}

.btn-jizen-back {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.btn-jizen-back:hover {
  background: #38bdf8;
  color: #0f172a;
}

/* Hero Section Limpia y Directa */
.hero-portal {
  text-align: center;
  padding: 3.5rem 1.5rem 2rem 1.5rem;
  background: radial-gradient(circle at top, rgba(2, 132, 199, 0.1), transparent 70%);
}

.hero-portal h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  color: #ffffff;
}

.hero-portal h1 span {
  color: #38bdf8;
}

.hero-subtitle {
  color: #000000 !important;
  font-size: 1.25rem !important;
  font-weight: 600;
  max-width: 800px;
  margin: 0 auto 2.2rem auto;
  line-height: 1.5;
}

/* Contenedor & Pestañas de Abecedario Multicolor por Especialidad */
.alphabet-filter-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  max-width: 1100px;
  margin: 1.5rem auto 0.5rem auto;
  padding: 10px;
}

.abc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 25px;
  border: 2px solid transparent;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

.abc-btn .letter-badge {
  background: rgba(255, 255, 255, 0.28);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
}

.abc-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.abc-btn.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4), 0 8px 20px rgba(0, 0, 0, 0.25);
  transform: scale(1.05);
}

/* Identidad Cromática por Pestaña de Abecedario */
.abc-btn.abc-all { background: linear-gradient(135deg, #334155, #0f172a); }
.abc-btn.abc-a { background: linear-gradient(135deg, #f43f5e, #be123c); } /* Alergia / Anestesiología (Rosa Coral) */
.abc-btn.abc-c { background: linear-gradient(135deg, #e11d48, #9f1239); } /* Cardiología & Cirugía (Rojo Carmín) */
.abc-btn.abc-d { background: linear-gradient(135deg, #0284c7, #0369a1); } /* Dermatología & Dentistas (Azul Turquesa) */
.abc-btn.abc-e { background: linear-gradient(135deg, #d946ef, #a21caf); } /* Endocrinología / Estética (Fucsia Neón) */
.abc-btn.abc-f { background: linear-gradient(135deg, #8b5cf6, #6d28d9); } /* Flebología / Fonoaudiología (Violeta Suave) */
.abc-btn.abc-g { background: linear-gradient(135deg, #ec4899, #be185d); } /* Gastroenterología / Ginecología (Rosa Orquídea) */
.abc-btn.abc-h { background: linear-gradient(135deg, #10b981, #047857); } /* Homeopatía (Verde Menta) */
.abc-btn.abc-i { background: linear-gradient(135deg, #6366f1, #4338ca); } /* Infectología / Inmunología (Índigo) */
.abc-btn.abc-k { background: linear-gradient(135deg, #7c3aed, #5b21b6); } /* Kinesiología (Violeta Terapéutico) */
.abc-btn.abc-diag { background: linear-gradient(135deg, #d97706, #b45309); } /* Laboratorio & Diagnóstico (Ámbar) */
.abc-btn.abc-m { background: linear-gradient(135deg, #059669, #047857); } /* Medicina General / Familiar (Verde Esmeralda) */
.abc-btn.abc-n { background: linear-gradient(135deg, #2563eb, #1d4ed8); } /* Neumonología / Neurología / Nutrición (Azul Cobalto) */
.abc-btn.abc-o { background: linear-gradient(135deg, #0284c7, #0f766e); } /* Odontología / Oftalmología / Otorrino */
.abc-btn.abc-p { background: linear-gradient(135deg, #06b6d4, #0e7490); } /* Pediatría (Azul Cían) */
.abc-btn.abc-psi { background: linear-gradient(135deg, #a855f7, #7e22ce); } /* Psicología / Psiquiatría (Púrpura Ψ) */
.abc-btn.abc-r { background: linear-gradient(135deg, #e11d48, #b91c1c); } /* Reumatología (Rojo Óseo) */
.abc-btn.abc-t { background: linear-gradient(135deg, #f97316, #c2410c); } /* Traumatología & T. Ocupacional (Naranja) */
.abc-btn.abc-u { background: linear-gradient(135deg, #0ea5e9, #0369a1); } /* Urología & Urooncología (Azul Urológico) */

/* Barra de Búsqueda Intuitiva y Filtros */
.search-filter-box {
  max-width: 1100px;
  margin: 2rem auto 1rem auto;
  background: var(--bg-card);
  padding: 1.4rem;
  border-radius: 16px;
  border: 2px solid #64748b;
  box-shadow: 0 4px 15px rgba(100, 116, 139, 0.12);
}

.search-input-wrapper {
  display: flex;
  gap: 12px;
  margin-bottom: 1rem;
}

.search-input-wrapper input {
  flex: 1;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  color: #0f172a;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.filter-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}

.pill-btn {
  background: var(--bg-card);
  border: 2px solid #64748b;
  color: #334155;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pill-btn:hover {
  background: #334155;
  color: #ffffff;
  border-color: #0f172a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.pill-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.35);
}

/* Directorio Grid & Tarjetas Adaptadas por Especialidad */
.directory-container {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem 1.5rem;
}

.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
}

.doctor-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 14px;
  padding: 1.4rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Bordes y Acentuaciones de Tarjetas según Especialidad */
.doctor-card.spec-odontologia { border-color: rgba(2, 132, 199, 0.4); }
.doctor-card.spec-odontologia:hover { border-color: var(--color-odontologia); box-shadow: 0 8px 25px rgba(2, 132, 199, 0.25); }

.doctor-card.spec-kinesiologia { border-color: rgba(124, 58, 237, 0.4); }
.doctor-card.spec-kinesiologia:hover { border-color: var(--color-kinesiologia); box-shadow: 0 8px 25px rgba(124, 58, 237, 0.25); }

.doctor-card.spec-clinica { border-color: rgba(5, 150, 105, 0.4); }
.doctor-card.spec-clinica:hover { border-color: var(--color-clinica); box-shadow: 0 8px 25px rgba(5, 150, 105, 0.25); }

.doctor-card.spec-diagnostico { border-color: rgba(217, 119, 6, 0.4); }
.doctor-card.spec-diagnostico:hover { border-color: var(--color-diagnostico); box-shadow: 0 8px 25px rgba(217, 119, 6, 0.25); }

.card-header-doc {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 1rem;
}

.doc-avatar {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid currentColor;
}

.doc-info-top h3 {
  font-size: 1.15rem;
  color: white;
  margin-bottom: 3px;
}

.doc-spec {
  font-weight: 700;
  font-size: 0.88rem;
}

.doc-mp {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.card-body-doc {
  margin-bottom: 1.2rem;
}

.doc-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.obras-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag-obra {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
}

.card-actions-doc {
  display: flex;
  gap: 8px;
}

.btn-view-onepage {
  flex: 1;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: white;
  padding: 9px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-view-onepage:hover {
  background: #1e293b;
}

.btn-ws-direct {
  background: var(--accent-ws);
  color: white;
  padding: 9px 14px;
  border-radius: 8px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* Modal One Page Streamlined */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal-overlay.active { display: flex; }

.modal-container {
  background: #ffffff;
  width: 100%;
  max-width: 980px;
  height: 92vh;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #0f172a;
  color: white;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.portal-footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Tablets & Smartphones)
   ========================================================================== */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding: 12px 15px;
  }

  .portal-header {
    padding: 10px 0;
  }

  .hero-portal {
    padding: 2rem 1rem 1.5rem 1rem;
  }

  .hero-portal h1 {
    font-size: 1.4rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .specialty-categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .cat-card {
    padding: 12px 8px;
    font-size: 0.8rem;
  }

  .cat-card i {
    font-size: 1.3rem;
  }

  .search-filter-box {
    padding: 12px;
  }

  .filter-pills {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
  }

  .doctors-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .card-header-doc {
    flex-direction: row;
    gap: 12px;
  }

  .doc-avatar {
    width: 60px;
    height: 60px;
  }

  .doc-info-top h3 {
    font-size: 1rem;
  }

  .modal-container {
    height: 98vh;
    border-radius: 0;
  }
}

@media (max-width: 480px) {
  .specialty-categories-grid {
    grid-template-columns: 1fr;
  }

  .brand-portal {
    font-size: 1rem;
  }

  .card-actions-doc {
    flex-direction: row;
    gap: 6px;
  }
  
  .btn-view-onepage {
    font-size: 0.78rem;
    padding: 8px;
  }
}

