.seccion-banner {
  padding: 60px 20px;
  border-radius: 15px;
  margin-bottom: 40px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}
.seccion-banner h1 {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 15px;
  font-weight: bold;
}
.seccion-banner p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto;
}
.banner-azul {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  box-shadow: 0 4px 20px rgba(52, 152, 219, 0.3);
}
.intro-servicios {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #666;
  margin-bottom: 30px;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 15px;
}

/* tengo mucho sueño no he dormido bien ultimamente, que debo hacer ? */
.servicios-tabs-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 15px 40px;
  width: 100%;
  box-sizing: border-box;
}

.tabs-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 15px;
  margin-bottom: 30px;
  border-bottom: 2px solid #eee;
}

.tabs-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.top-row {
  max-width: 900px;
  margin: 0 auto;
}

.bottom-row {
  max-width: 900px;
  margin: 0 auto;
}

.tab-btn {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 25px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tab-btn:hover {
  background: #e9ecef;
  color: #333;
  transform: translateY(-2px);
}

/* Botones por servicio con sus colores */
.tab-btn.fisiatria { background: linear-gradient(135deg, #e04fb9, #c93eb1); color: white; }
.tab-btn.traumatologia { background: linear-gradient(135deg, #d99a2b, #c98a22); color: white; }
.tab-btn.masoterapia { background: linear-gradient(135deg, #0d6efd, #0b5ed7); color: white; }
.tab-btn.traumatologia { background: linear-gradient(135deg, #FEBD3B, #FEB43B); color: white; }
.tab-btn.psicologia { background: linear-gradient(135deg, #E050FF, #D040FF); color: white; }
.tab-btn.nutricion { background: linear-gradient(135deg, #28a745, #208637); color: white; }
.tab-btn.neurologia { background: linear-gradient(135deg, #6f42c1, #5a32a3); color: white; }
.tab-btn.educacion { background: linear-gradient(135deg, #FF6160, #FF7170); color: white; }
.tab-btn.vinculacion { background: linear-gradient(135deg, #6A5ACD, #9370DB); color: white; }
.tab-btn.optometrista { background: linear-gradient(135deg, #d63384, #b02769); color: white; }

.tab-btn.active {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  border-color: transparent;
  filter: brightness(1.1);
}

.tab-btn.fisiatria:hover { filter: brightness(1.2); }
.tab-btn.traumatologia:hover { filter: brightness(1.15); }
.tab-btn.masoterapia:hover { filter: brightness(1.15); }
.tab-btn.traumatologia:hover { filter: brightness(1.15); }
.tab-btn.psicologia:hover { filter: brightness(1.2); }
.tab-btn.nutricion:hover { filter: brightness(1.15); }
.tab-btn.neurologia:hover { filter: brightness(1.15); }
.tab-btn.educacion:hover { filter: brightness(1.15); }
.tab-btn.vinculacion:hover { filter: brightness(1.15); }
.tab-btn.optometrista:hover { filter: brightness(1.15); }

.tabs-content-container {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  min-height: 400px;
  position: relative;
}

.tab-panel {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.tab-panel.active {
  display: block;
  opacity: 1;
  animation: fadeInTab 0.4s ease-in-out;
}

@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


.servicio-seccion {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid #f0f0f0;
}
.servicio-seccion:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.servicio-seccion h4 {
  font-size: 1.2rem;
  color: #3498db;
  margin-bottom: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
}
.servicio-seccion h4::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  background: linear-gradient(to bottom, #3498db, #5dade2);
  margin-right: 12px;
  border-radius: 2px;
}
.servicio-seccion p {
  color: #555;
  line-height: 1.7;
  font-size: 1rem;
}
.servicio-seccion ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.servicio-seccion ul li {
  color: #555;
  line-height: 1.6;
  font-size: 0.95rem;
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}
.servicio-seccion ul li::before {
  content: '•';
  color: #3498db;
  font-weight: bold;
  position: absolute;
  left: 0;
  font-size: 1.2rem;
  line-height: 1.2;
}
.aviso {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  margin-top: 15px;
  border-radius: 5px;
  color: #856404;
}

.aviso-servicio-externo {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  margin: 14px auto 16px auto;
  border-radius: 5px;
  color: #856404;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  max-width: 92%;
  line-height: 1.5;
}

.aviso-servicio-externo strong {
  color: #856404;
}


.header-esp {
  background: linear-gradient(90deg, #ebb6ea, #cb8de8);
  border-radius: 30px;
  padding: 15px;
  text-align: center;
  margin-bottom: 20px;
}

/* Headers específicos por servicio */
.header-esp.fisiatria, .header-fisiatria { background: linear-gradient(90deg, #e04fb9, #c93eb1); }
.header-esp.traumatologia, .header-traumatologia { background: linear-gradient(90deg, #d99a2b, #c98a22); }
.header-esp.masoterapia, .header-masoterapia { background: linear-gradient(90deg, #0d6efd, #0b5ed7); }
.header-esp.traumatologia, .header-traumatologia { background: linear-gradient(90deg, #FEBD3B, #FEB43B); }
.header-esp.psicologia, .header-psicologia { background: linear-gradient(90deg, #E050FF, #D040FF); }
.header-esp.nutricion, .header-nutricion { background: linear-gradient(90deg, #28a745, #208637); }
.header-esp.neurologia, .header-neurologia { background: linear-gradient(90deg, #6f42c1, #5a32a3); }
.header-esp.educacion, .header-educacion { background: linear-gradient(90deg, #FF6160, #FF7170); }
.header-esp.vinculacion, .header-vinculacion { background: linear-gradient(90deg, #6A5ACD, #9370DB); }
.header-esp.optometrista, .header-optometrista { background: linear-gradient(90deg, #d63384, #b02769); }

.header-esp h1 {
  color: white;
  font-size: 2.2rem;
  font-weight: bold;
  margin: 0;
}

.estadisticas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}

.stat {
  background: #fafafa;
  text-align: center;
  padding: 20px 10px;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.numero {
  font-size: 2.5rem;
  color: #d34cff;
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.fisiatria .numero, .header-fisiatria ~ .estadisticas .numero { color: #e04fb9; }
.traumatologia .numero, .header-traumatologia ~ .estadisticas .numero { color: #d99a2b; }
.masoterapia .numero, .header-masoterapia ~ .estadisticas .numero { color: #0d6efd; }
.psicologia .numero, .header-psicologia ~ .estadisticas .numero { color: #E050FF; }
.nutricion .numero, .header-nutricion ~ .estadisticas .numero { color: #28a745; }
.neurologia .numero, .header-neurologia ~ .estadisticas .numero { color: #6f42c1; }
.educacion .numero, .header-educacion ~ .estadisticas .numero { color: #FF6160; }
.vinculacion .numero, .header-vinculacion ~ .estadisticas .numero { color: #6A5ACD; }
.optometrista .numero, .header-optometrista ~ .estadisticas .numero { color: #d63384; }

.stat p {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

.contenido-esp {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 30px;
}

.descripcion {
  background: #fafafa;
  padding: 25px;
  text-align: justify;
  border-radius: 20px;
  border: 1px solid #eee;
  overflow: hidden;
}

.descripcion img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin-bottom: 15px;
}

.descripcion h2 {
  color: #ff55cc;
  text-align: center;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.masoterapia .descripcion h2 { color: #0d6efd; }

.fisiatria .descripcion h2 { color: #e04fb9; }
.traumatologia .descripcion h2 { color: #d99a2b; }
.psicologia .descripcion h2 { color: #E050FF; }
.nutricion .descripcion h2 { color: #28a745; }
.neurologia .descripcion h2 { color: #6f42c1; }
.educacion .descripcion h2 { color: #FF6160; }
.vinculacion .descripcion h2 { color: #6A5ACD; }
.optometrista .descripcion h2 { color: #d63384; }

.fisiatria .titulo-servicios, .header-fisiatria ~ .titulo-servicios { color: #e04fb9; }
.traumatologia .titulo-servicios, .header-traumatologia ~ .titulo-servicios { color: #d99a2b; }
.masoterapia .titulo-servicios, .header-masoterapia ~ .titulo-servicios { color: #0d6efd; }
.psicologia .titulo-servicios, .header-psicologia ~ .titulo-servicios { color: #E050FF; }
.nutricion .titulo-servicios, .header-nutricion ~ .titulo-servicios { color: #28a745; }
.neurologia .titulo-servicios, .header-neurologia ~ .titulo-servicios { color: #6f42c1; }
.educacion .titulo-servicios, .header-educacion ~ .titulo-servicios { color: #FF6160; }
.vinculacion .titulo-servicios, .header-vinculacion ~ .titulo-servicios { color: #6A5ACD; }
.optometrista .titulo-servicios, .header-optometrista ~ .titulo-servicios { color: #d63384; }

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.servicio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  padding: 15px;
  border-radius: 15px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.servicio-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.servicio-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
}

.servicio-card h3 {
  color: #ff4a91;
  font-size: 0.9rem;
  margin: 0 0 4px 0;
  font-weight: bold;
  text-transform: uppercase;
}

.fisiatria .servicio-card h3 { color: #e04fb9; }
.traumatologia .servicio-card h3 { color: #d99a2b; }
.masoterapia .servicio-card h3 { color: #0d6efd; }
.psicologia .servicio-card h3 { color: #E050FF; }
.nutricion .servicio-card h3 { color: #28a745; }
.neurologia .servicio-card h3 { color: #6f42c1; }
.educacion .servicio-card h3 { color: #FF6160; }
.vinculacion .servicio-card h3 { color: #6A5ACD; }
.optometrista .servicio-card h3 { color: #d63384; }

.servicio-card p {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
  line-height: 1.3;
}

@media (min-width: 769px) {
  .descripcion {
    position: relative;
    min-height: 300px;
  }
  
  .descripcion img {
    float: right;
    width: 350px;
    height: 250px;
    margin: 0 0 15px 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
  }
  
  .descripcion h2 {
    clear: none;
    margin-top: 0;
  }
  
  .descripcion p {
    text-align: justify;
    line-height: 1.6;
  }
}


@media (max-width: 768px) {
  .seccion-banner {
    padding: 10px 6px !important;
    margin-bottom: 8px !important;
    border-radius: 8px;
  }
  .seccion-banner h1 {
    font-size: 1.1rem;
    margin-bottom: 5px;
  }
  
  .intro-servicios {
    font-size: 0.75rem;
    margin-bottom: 6px;
    padding: 0 6px;
  }

  .aviso-servicio-externo {
    font-size: 0.78rem;
    padding: 10px 12px;
    max-width: 95%;
  }

  .tabs-header {
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 8px;
  }
  
  .servicios-tabs-container {
    padding-bottom: 12px;
  }
  
  .tabs-content-container {
    padding: 20px 15px;
  }

  .header-esp h1 {
    font-size: 1.6rem;
  }
  
  .estadisticas {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
    margin-bottom: 15px !important;
  }
  
  .stat {
    padding: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 2px !important;
  }
  
  .numero {
    font-size: 1.2rem !important;
    margin: 0 !important;
  }
  
  .stat p {
    font-size: 0.55rem !important;
    margin: 0 !important;
    line-height: 1.1 !important;
    word-break: break-word !important;
  }
  
  .contenido-esp {
    flex-direction: column;
  }
  
  .servicios-grid {
    grid-template-columns: 1fr;
  }

  .servicio-card { padding: 10px !important; }
  .servicio-card h3 { font-size: 0.85rem !important; }
  .servicio-card p { font-size: 0.68rem !important; }
}

@media (max-width: 480px) {
  .tab-btn {
    padding: 8px 15px;
    font-size: 0.85rem;
    flex: 1 1 120px;
  }
  
.top-row, .bottom-row {
    justify-content: center;
  }

  .descripcion {
    padding: 12px 10px;
  }

  .descripcion h2 {
    font-size: 1rem;
  }

  .descripcion p {
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
  }
}