/* Reset básico ------------------------------------------------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
  }
  
  /* Contenedor ------------------------------------------------------------------------*/
  .container {
    justify-content: space-between;
    display: flex;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
  }
  
  /* Header ------------------------------------------------------------------------*/
  header {
    background: #ffffff57;
    color: rgb(253, 122, 0);
    padding: 20px 0;
  }
  
  header h1 {
    display: inline-block;
    margin-right: 40px;
    font-size: 2rem;
  }
  
  header nav a {
    color: rgb(0, 0, 0);
    margin: 0 0px;
    margin-top: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
  }
  
  header nav a:hover {
    color: #ff7c01;
  }

  .logo-title {
    display: flex;           /* pone logo e h1 en línea */
    align-items: center;     /* centra verticalmente */
    gap: 10px;               /* espacio entre logo y texto */
  }

  .logo-title .text {
    display: flex;
    flex-direction: column; /* apila Fisioterapia encima de Atlas */
    line-height: 1.2;
  }
  
  .logo-title .line1 {
    font-size: 1.6rem;
    font-weight: 500;
    color: #333;
  }
  
  .logo-title .line2 {
    font-size: 1.6rem;
    font-weight: 500;
    color: #ff7c01; /* resalta Atlas */
    letter-spacing: 15px;   /* añade espacio entre letras */
    text-transform: uppercase; /* opcional, todo mayúsculas */
  }
  
  .logo {
    height: 80px;            /* ajusta el tamaño */
    width: auto;
  }
  
  .main-nav a {
    margin-left: 20px;
    /*margin-top: 20px;*/
    text-decoration: none;
    color: #333;
    font-weight: bold;
  }
  
  /* Hero ------------------------------------------------------------------------*/
  .hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(270deg, #ff7c01, #0ea800);
    background-size: 600% 600%;  /* importante para la animación */
    color: white;
    animation: moverDegradado 12s ease infinite;
  }
  
  @keyframes moverDegradado {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }
  
  .hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
  }
  
  
  /* Secciones ------------------------------------------------------------------------*/
  .section {
    padding: 60px 20px;
    text-align: center;
  }
  
  .section.bg-light {
    background: #f1f1f1;
  }

  .section.bg-light h3 {
    font-size: 1.5rem;
    margin: 0 0 20px;
  }
  
  /* Grid de servicios ------------------------------------------------------------------------*/
  .grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  /* Fuerza todas las tarjetas a medir igual */
  .swiper-wrapper {
    display: flex;
    align-items: stretch; /* todas las tarjetas tendrán la misma altura */
  }

  .swiper .card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* mantiene orden */
    height: auto; /* se adapta al más alto */
  }


  /* Para pantallas grandes: máximo 5 columnas */
  @media (min-width: 1400px) {
    .grid {
      grid-template-columns: repeat(5, 1fr);
      padding: 0 100px;
    }
  }
  
  .card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
  }
  
  .card:hover {
    transform: translateY(-5px);
  }

  .card-img {
    width: 100%;
    height: 250px;        /* Todas las imágenes tendrán la misma altura */
    object-fit: cover;    /* Recorta sin deformar */
    border-radius: 8px;   /* Bordes redondeados como las cards */
    margin-bottom: 15px;  /* Separación con el título */
  }
  
  /* Botones ------------------------------------------------------------------------*/
  .btn {
    display: inline-block;
    background: #ff7c01;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
  }
  
  .btn:hover {
    background: #05ddc7;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  }

  /* Enlaces sociales como botones redondos */
  .contacto a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;   /* ancho fijo */
  height: 60px;  /* alto fijo */
  border-radius: 50%;
  background: #f8f9fa;
  box-shadow: 0 8px 10px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  text-decoration: none;
}


/* Hover */
  .contacto a:hover {
  background: #ff7c01;
  transform: translateY(-3px) scale(1.05);
}

/* Centrar iconos en filas */
  .contacto .up,
  .contacto .down {
  display: flex;
  justify-content: center;
  gap: 20px; /* espacio entre iconos */
  margin: 10px 0;
}

  
  /* CTA ------------------------------------------------------------------------*/
  .cta {
    background: linear-gradient(to right, #015c1cd5, #0ea800);
    color: white;
    text-align: center;
    position: relative;   /* necesario para el ::after */
    overflow: hidden;     /* oculta el desbordamiento */
  }

.cta::before,
.cta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 20px; /* grosor del difuminado */
  z-index: 1; /* que quede encima del fondo */
}

/* Difuminado superior */
.cta::before {
  top: 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0), #f8f9fa);
}

/* Difuminado inferior */
.cta::after {
  bottom: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #f8f9fa);
}
  
  .cta p {
    margin: 10px 0 20px;
  }
  
  /* Footer ------------------------------------------------------------------------ */
  footer {
    background: #222;
    color: #ccc;
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
  }
  
  /* Contacto ------------------------------------------------------------------------*/

.main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
  }
  
  .up {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
  }
  
  .down {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
  }
  
  .card1 {
    width: 120px;
    height: 120px;
    outline: none;
    border: none;
    background: white;
    border-radius: 120px 5px 5px 5px;
    box-shadow: rgb(153, 1, 95) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
    transition: .2s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .instagram {
    margin-top: 1.5em;
    margin-left: 1.2em;
    fill: #cc39a4;
  }
  
  .card2 {
    width: 120px;
    height: 120px;
    outline: none;
    border: none;
    background: white;
    border-radius: 5px 120px 5px 5px;
    box-shadow: rgb(0, 45, 248) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
    transition: .2s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .facebook {
    margin-top: 1.5em;
    margin-left: -.9em;
    fill: #1877F2;
  }
  
  .card3 {
    width: 120px;
    height: 120px;
    outline: none;
    border: none;
    background: white;
    border-radius: 5px 5px 5px 120px;
    box-shadow: rgb(1, 253, 22) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
    transition: .2s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .whatsapp {
    fill: #25D366;
    margin-top: -.6em;
    margin-left: 1.2em;
  }
  
  .card4 {
    width: 120px;
    height: 120px;
    outline: none;
    border: none;
    background: white;
    border-radius: 5px 5px 120px 5px;
    box-shadow: rgb(128, 30, 241) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
    transition: .2s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .email {
    margin-top: -.9em;
    margin-left: -1.2em;
    fill: #996ae6;
  }
  
  .card1:hover {
    cursor: pointer;
    scale: 1.1;
    background-color: #cc39a4;
  }
  
  .card1:hover .instagram {
    fill: white;
  }
  
  .card2:hover {
    cursor: pointer;
    scale: 1.1;
    background-color: #1877F2;
  }
  
  .card2:hover .facebook {
    fill: white;
  }
  
  .card3:hover {
    cursor: pointer;
    scale: 1.1;
    background-color: #25D366;
  }
  
  .card3:hover .whatsapp {
    fill: white;
  }
  
  .card4:hover {
    cursor: pointer;
    scale: 1.1;
    background-color: #996ae6;
  }
  
  .card4:hover .email {
    fill: white;
  }

/* Mapa ------------------------------------------------------------------------*/
  .map-container {
    width: 100%;
    max-width: 1400px;   /* que no se haga infinito en pantallas muy grandes */
    height: 500px;       /* más alto, se ve más panorámico */
    margin: 0 auto;      /* centrado */
    border-radius: 40px; /* opcional, esquinas redondeadas */
    overflow: hidden;    /* para que respete el borde redondeado */
  }
  
  .map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }
  
  /* Colaboradores ------------------------------------------------------------------------*/
  .colaboradores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    align-items: center;
    justify-items: center;
    margin-top: 30px;
  }
  
  .colaboradores-grid img {
    max-width: 280px;
    max-height: 220px;
    object-fit: contain;   /* mantiene proporciones sin deformar */
    opacity: 0.7;
    transition: all 0.3s ease;
  }
  
  .colaboradores-grid img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
  }
  
  .subtitle {
    text-align: center;
    margin-top: 10px;
    font-size: 1.1rem;
    color: #666;
  }
  
 /* FAQs (adaptadas al estilo actual) ------------------------------------------------------------------------*/
.faqs { max-width: 820px; margin: 0 auto; text-align: left; }
.faqs h2 { font-size: 1.6rem; margin: 0 0 20px; text-align: center; }

.faq-item {
  background: #fff;
  border-radius: 10px;              /* como .card */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);  /* como .card */
  border: 1px solid #e5e7eb;
  margin: 12px 0;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 16px 48px 16px 18px;
  font: inherit;                    /* mantiene tu tipografía/tamaño */
  color: inherit;
  line-height: 1.6;                 /* igual que body */
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background .25s ease;
}
.faq-q:hover { background: #f9fafb; }
.faq-q:focus-visible { outline: 2px solid #ff7c01; outline-offset: 2px; border-radius: 6px; }

/* Chevron con tu color de acento */
.faq-q .chev {
  position: absolute; right: 14px; top: 50%;
  width: 12px; height: 12px;
  border-right: 2px solid #ff7c01;
  border-bottom: 2px solid #ff7c01;
  transform: translateY(-50%) rotate(-135deg);
  transform-origin: 50% 50%;
  transition: transform .25s ease;
}
.faq-q[aria-expanded="true"] .chev { transform: translateY(-50%) rotate(45deg); }

.faq-a {
  font: inherit;                    /* mantiene tipografía/tamaño */
  color: #374151;                   /* similar al resto */
  padding: 0 18px 16px 18px;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease, padding-top .25s ease;
}
.faq-a > * { overflow: hidden; }
.faq-a[hidden] { grid-template-rows: 0fr; padding-top: 0; }
.faq-a:not([hidden]) { grid-template-rows: 1fr; padding-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .faq-a, .faq-q .chev { transition: none; }
}


/* Fixes responsive móvil ------------------------------------------------------------------------*/
body { overflow-x: hidden; }  /* evita scroll lateral si algo se sale */

/* Header + navegación */
@media (max-width: 768px) {
  .container {
    flex-wrap: wrap;                 /* permite que el menú baje debajo del logo */
    gap: 8px;
  }
  .logo { height: 56px; }            /* logo más pequeño en móvil */
  .logo-title .line1 { font-size: 1.2rem; }
  .logo-title .line2 {
    font-size: 1.2rem;
    letter-spacing: 4px;             /* antes 15px => empujaba el menú fuera */
  }

  .main-nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;                 /* que el menú haga salto de línea */
    justify-content: center;
    gap: 10px 12px;
    margin: 6px 0 0;
  }
  .main-nav a {
    margin: 0;                       /* anulamos margin-left grande del desktop */
    font-weight: 600;
  }
  .main-nav .btn {
    padding: 10px 16px;
    border-radius: 22px;
    white-space: nowrap;             /* evita que “Pedir cita” se parta en dos */
    font-size: 0.95rem;
  }

  /* Hero más compacto */
  .hero { padding: 28px 16px; }
  .hero h2 { font-size: 2rem; }

  /* Cards/Swiper más bajitas para que no “empujen” */
  .card-img { height: 180px; }

  /* Social cards un poco más pequeñas */
  .card1, .card2, .card3, .card4 { width: 96px; height: 96px; }
}

/* Colaboradores: que no “se coman” a Cronos y entren bien */
@media (max-width: 768px) {
  .colaboradores-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 por fila en móvil */
    gap: 16px;
  }
  .colaboradores-grid img {
    max-width: 140px;    /* estaba en 280px => desbordaba */
    max-height: 100px;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
}

/* Mapa más bajo en móvil */
@media (max-width: 768px) {
  .map-container { height: 320px; }
}

/* Extra: si el menú aún apretado, reduce tipografía del nav en móviles muy pequeños */
@media (max-width: 360px) {
  .main-nav a { font-size: 0.95rem; }
  .logo { height: 48px; }
  .logo-title .line2 { letter-spacing: 2px; }
}

/* Utilidad para ocultar elementos (como Tailwind) */
.hidden { display: none !important; }
