
    /* Reset */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    html, body {
      width: 100%;
      overflow-x: hidden;
    }

    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdafna, sans-serif;
      scroll-behavior: smooth;
      color: #323232;
    }

    /* Navbar */
    nav {
      position: fixed;
      top: 0;
      width: 100%;
      background: rgba(0, 0, 0, 0.4);
      padding: 1rem 2rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      z-index: 1000;
      backdrop-filter: blur(10px);
    }

    .logo {
      font-weight: bold;
      font-size: 1rem;
      color: white;
    }
    
    #logo-cab {
      max-width:20px;
      vertical-align:bottom;
    }

    .menu {
      display: flex;
      gap: 1.5rem;
    }
    
    .logo a {
      color: white;
      text-decoration: none;
    }

    .menu a {
      color: white;
      text-decoration: none;
      font-weight: bold;
      font-size: 1rem;
      transition: color 0.3s;
    }

    .menu a:hover {
      color: #ffd700;
    }
    
    .active-item {
      border-bottom: 2px solid #ffd700;
      padding-bottom: 10px;
    }
    
    /*Footer*/
    
    .footer {
      background-color: #d9b269;
      color: #323232;
      padding: 1rem 1rem;
      font-family: sans-serif;
      font-size: 0.5rem;
    }
    
    .footer p {
        font-size:1rem;
    }
    
    .footer-container {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    
    .footer-title {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      font-size: 1rem;
      font-weight: 600;
    }
    
    .footer-logo {
      width: 32px;
      height: auto;
    }
    
    .footer-bottom {
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 1rem;
    }
    
    .footer-left,
    .footer-right {
      /*display: flex;*/
      flex-direction: column;
      gap: 0.5rem;
    }
    
    .priva-link {
      color: inherit;
      text-decoration: none;
      cursor:pointer;
    }

    /* Secciones */
    section {
      min-height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
      text-align: center;
      padding: 2rem;
      background-size: cover;
      background-position: center;
      background-attachment: fixed;
    }

    section::before {
      content: "";
      position: absolute;
      inset: 0;
      background-color: rgba(0, 0, 0, 0.1);
      z-index: 0;
    }

    .content {
      position: relative;
      z-index: 1;
      opacity: 0;
      transform: translateY(30px);
      transition: all 0.8s ease-out;
    }

    .visible {
      opacity: 1;
      transform: translateY(0);
    }

    h1 {
      font-size: 3rem;
      margin-bottom: 1rem;
      font-weight: 600;
    }
    
    h2 {    
      font-size: 3rem!important;
      margin-bottom: 1rem!important;
      margin-top:2rem;
      font-weight: 600!important;
    }

    p {
      font-size: 1.2rem;
      max-width: 650px; /*en equipo 600px*/
      margin: 0 auto;
    }
    
    .btn-cita {
          display: inline-block;
          background-color: #323232;
          color: white;
          font-size: 0.875rem; 
          padding: 0.5rem 1rem;
          border-radius: 9999px; /* pill-shaped */
          text-decoration: none;
          border: none;
          transition: background-color 0.3s ease, transform 0.2s ease;
          font-weight: 500;
          margin-top: 20px;
        }
        
        .btn-cita:hover {
          background-color: #1e1e1e;
          transform: scale(1.05);
        } 
    
    
    .btn-cit-raro {
            display: inline-block;
            cursor: pointer;
            background-color: #323232;
            color: #fff;
            font-size: 0.875rem;
            padding: 0.5rem 1rem;
            border-radius: 9999px;
            text-decoration: none;
            border: none;
            transition: transform 0.18s ease, background-color 0.2s ease;
            font-weight: 500;
            will-change: transform;
            margin-top:20px;
          }
    
    .btn-cit-raro:hover {
            transform: scale(1.05);
            background-color: #1e1e1e;
          }
    
    /* Hamburger */
    .hamburger {
      display: none;
      flex-direction: column;
      gap: 5px;
      cursor: pointer;
    }

    .hamburger div {
      width: 25px;
      height: 3px;
      background: white;
      border-radius: 2px;
    }
    

    /* Fondos secciones*/
    #inicio, #iniciocontacto {
    background: url('/assets/img/home/background-home-001.jpg') no-repeat center center scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover!important;
    position: relative;
    }
    
    #logo-color {
      max-width:100px;
      padding-top:40px;
    }

    #nosotros, #adultos, #adultos2, #localizacion  {
     background: url('/assets/img/home/background-home-03-ok.jpg') no-repeat center center scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover!important;
    position: relative;
    }
    
    #politica, #avisolegal, #pagcookies {
      background: url('/assets/img/home/background-home-03-ok.jpg');
      background-repeat: repeat;
      background-size: auto;     
      background-position: top left;
    }
    
    #inicioequipo {
    background: url('/assets/img/equipo/background-equipo-home-res.jpg') no-repeat center center scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover!important;
    position: relative;
    }
    
    
    #iniciofilo {
    background: url('/assets/img/filosofia/background-fisolofia-home-res2.jpg') no-repeat center center scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover!important;
    position: relative;
    }
    
    #iniciotera {
    background: url('/assets/img/terapias/background-terapia-home-res.jpg') no-repeat center center scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover!important;
    position: relative;
    }
    
    #quienesomos, #familias, #pidecita {
    background: url('/assets/img/home/background-home-04.jpg') no-repeat center center scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover!important;
    position: relative;
    }

    #encarna, #infancia, #escolar {
    background: url('/assets/img/home/background-home-05-5.jpg') no-repeat center center scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover!important;
    position: relative;
    }
    
    #evelin {
    background: url('/assets/img/home/background-home-6-ok.jpg') no-repeat center center scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover!important;
    position: relative;
    }
    
    #africa {
    background: url('/assets/img/home/background-home-07-02.jpg') no-repeat center center scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover!important;
    position: relative;
    }
    
      #familia {
    background: url(/assets/img/terapias/background-terapias-familia.jpg) no-repeat center center scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover!important;
    position: relative;
  }

  #juridico {
    background: url(/assets/img/terapias/background-terapia-juridico.jpg) no-repeat center center scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover!important;
    position: relative;
  }
  
    #infanciatera {
    background: url(/assets/img/terapias/background-terapias-infancia3.jpg) no-repeat center center scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover!important;
    position: relative;
  }
  
  #escolar {
    background: url(/assets/img/home/background-home-05-5.jpg) no-repeat center center scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover!important;
    position: relative;
  }
    
    
    /* Iconitos sección nosotros. Desktop: 5 columnas y colocación exacta */
      .nosotros-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 2rem;
        margin: 3rem auto;       /* centrado horizontal */
        max-width: 60%;          /* límite de ancho en desktop */
        position: relative;
        z-index: 1;
        justify-items: center;
      }

      /* Fila 1 */
      .nosotros-item:nth-child(1) { grid-column: 1; } /* 1º */
      .nosotros-item:nth-child(2) { grid-column: 3; } /* 2º */
      .nosotros-item:nth-child(3) { grid-column: 5; } /* 3º */

      /* Fila 2 (en los huecos) */
      .nosotros-item:nth-child(4) { grid-column: 2; } /* entre 1º y 2º */
      .nosotros-item:nth-child(5) { grid-column: 4; } /* entre 2º y 3º */
            
            .nosotros-item {
              text-align: center;
              width: 100%;
              max-width: 200px;
            }
            
            .nosotros-item img {
              width: 60px;
              height: 60px;
              margin-bottom: 0.5rem;
              filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
            }
            
            .nosotros-item p {
              font-size: 1rem;
              color: #323232;
            }
            
    
    
     /* iconitos para seccion quienes somos */
            .quienesomos-grid {
              display: grid;
              grid-template-columns: repeat(3, 1fr); /* 3 columnas en desktop */
              gap: 2rem;
              margin-top: 3rem;
              position: relative;
              z-index: 1;
            }
            
            .quienesomos-item {
              text-align: center;
              width: 100%;
              max-width: 200px;
            }
            
            .quienesomos-item img {
              width: 120px;
              height: 120px;
              margin-bottom: 0.5rem;
            }
            
            .quienesomos-item p {
              font-size: 1rem;
              color: #323232;
            }
            
            a.quienesomos-a {
                text-decoration: none!important;
              }
              
    /* estilos para psicóloga section*/
            
            .psicologa-section {
                display: flex;
                flex-direction: column;  /* apila contenedor + botón */
                align-items: center;     /* centra horizontalmente */
                justify-content: flex-start; /* evita que todo quede centrado vertical en pantalla */
                padding: 6rem 2rem 4rem;
              }

            .psicologa-container {
              display: flex;
              align-items: center;
              justify-content: space-between;
              max-width: 1000px;
              margin: 0 auto;
              gap: 2rem;
              flex-wrap: wrap; /* para responsive */
            }

            .psicologa-img {
              flex: 0 0 25%;
              max-width: 25%;
            }

            .psicologa-img img {
              width: 100%;
              height: auto;
              border-radius: 1rem;
              object-fit: cover;
            }

            .psicologa-texto {
              flex: 0 0 70%;
              max-width: 70%;
            }

            .psicologa-texto h2 {
              font-size: 2rem;
              margin-bottom: 1rem;
              color: #323232;
              margin-top:0!important;
            }

            .psicologa-texto p {
              font-size: 1rem;
              line-height: 1.6;
              color: #323232;
            }

            .psicologa-texto ul {
              list-style: none;
              padding-top:10px;
            }

            .psicologa-texto li {
              text-align: left;
              color: #323232;
              padding-left:10%;
              text-indent: -18px;
            }
            
            .picto-azul {
              padding-right: 5px;    
            }
            
            .psicologa-btn {
              width: 100%;
              display: flex;
              justify-content: center;
              margin-top: 2rem;
              margin-bottom: 40px;
            }
    
        /* iconitos para seccion filosofia */
        .filosofia-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr); /* 2 columnas iguales */
            gap: 2rem;
            max-width: 600px; 
            margin: 3rem auto; 
            position: relative;
            z-index: 1;
            justify-items: center;                
          }
            
            .filosofia-item {
              text-align: center;
              width: 100%;
              max-width: 200px;
            }
            
            .filosofia-item img {
              width: 60px;
              height: 60px;
              margin-bottom: 0.5rem;
              filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
            }
            
            .filosofia-item p {
              font-size: 1rem;
              color: #323232;
            }
            
            a.filosofia-a {
                text-decoration: none!important;
            }
            
    /* Iconitos Sección adultos: iconos y párrafos */
            
            .adultos-item {
              display: flex;
              align-items: center; 
              gap: 1rem;              /* espacio entre icono y texto */
              margin-bottom: 2rem;    /* espacio entre filas */
            }
            
            /* Icono (20%) */
            .adultos-icon {
              flex: 0 0 20%;  /* ocupa aprox 20% */
              max-width: 60px; /* opcional, para limitar tamaño */
            }
            
            .adultos-icon img {
              width: 100%;
              height: auto;
              display: block;
            }
            
            /* Texto (80%) */
            .adultos-texto {
              flex: 1;  /* ocupa el resto (80%) */
            }
            
            .adultos-texto p {
              font-size: 1rem;
              line-height: 1.5;
              color: #323232;
              margin: 0;
              text-align: left;
            }

    /*Reseteo del flexbox para el botón pedir cita*/
            
            .btn-cita-full {
              flex: 0 0 100%;   /* fuerza a ocupar toda la fila */
              text-align: center;
              margin-top: 2rem;
            }
            
    /* Iconitos para sección terapias */
      .terapias-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
        margin: 3rem auto;       /* centrado horizontal */
        max-width: 60%;          /* límite de ancho en desktop */
        position: relative;
        z-index: 1;
        justify-items: center;
      }

      /* Fila 1 */
      .terapias-item:nth-child(1) { grid-column: 1; } /* 1º */
      .terapias-item:nth-child(2) { grid-column: 2; } /* 2º */
      .terapias-item:nth-child(3) { grid-column: 3; } /* 3º */
      .terapias-item:nth-child(4) { grid-column: 4; } /*4º */
            
            .terapias-item {
              text-align: center;
              width: 100%;
              max-width: 200px;
            }
            
            .terapias-item img {
              width: 60px;
              height: 60px;
              margin-bottom: 0.5rem;
              filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
            }
            
            .terapias-item p {
              font-size: 1rem;
              color: #323232;
            }
      
      a.terapias-a {
                text-decoration: none!important;
            }

    /* estilos para terapias section*/
            .terapias-section {
                display: flex;
                flex-direction: column;  /* apila contenedor + botón */
                align-items: center;     /* centra horizontalmente */
                justify-content: flex-start; /* evita que todo quede centrado vertical en pantalla */
                padding: 6rem 2rem 4rem;
              }

            .terapias-container {
              display: flex;
              justify-content: space-between;
              align-items: center;
              flex-wrap: wrap;
              width: 100%;
              max-width: 1200px;
              gap: 2rem;
              padding-top:40px;
            }

            .terapias-img {
              flex: 0 0 25%;
              max-width: 25%;
            }

            .terapias-img img {
              width: 90%;
              height: auto;
              border-radius: 1rem;
              object-fit: cover;
              padding-left:10%;
            }

            .terapias-texto {
              flex: 0 0 70%;
              max-width: 70%;
              text-align:left;
            }

            .terapias-texto h3 {
              font-size: 2rem;
              margin-bottom: 1rem;
              color: #323232;
              text-align: left;
            }

            .terapias-texto h1 {
              text-align: left;
              padding-left:93px;
            }
            
            .terapias-texto h2 {
              font-size: 2.5em!important;
              text-align: left;
              padding-left:91px;
            }

            .terapias-texto p {
              font-size: 1rem;
              line-height: 1.6;
              color: #323232;
              text-align: left;
            }

            .terapias-texto ul {
              list-style: none;
              padding-top:10px;
              padding-left: 34px;
            }

            .terapias-texto li {
              text-align: left;
              color: #323232;
              padding-left:10%;
              text-indent: -19px;
            }
            
         .terapias-btn {
              width: 100%;
              display: flex;
              justify-content: center;
              margin-top: 2rem;
              margin-bottom: 40px;
            }
            
    /* Estilos contacto */
      #iniciocontacto .contacta p {
        color: #323232;
        font-size: 16px;
        line-height: 30px;
    }
    
    .contacta span {
        font-size: 27px;
        font-weight: 700;
    }
    
    .contacta a {
        color: #323232;
        text-decoration:none;
    }
    
    .picto-contacto {
        display: inline-flex;
        width: 28px!important;
        padding-right: 5px;
        margin-bottom: -3px;
    }
    
    .picto-whatsapp {
        display: inline-flex;
        width: 31px;
        padding-right: 5px;
        margin-bottom: -3px;
    }
    
    .telefono {
        background-color: #d9b269;
        padding: 18px 10px 10px 10px;
    }
    
    .whatsapp {
        background-color: #81986e;
        padding: 18px 10px 10px 10px;
        color: white!important;
    }
    
    .whatsapp a {
        color: white!important;
    }
    
    .loc-a {
        color: #323232;
        text-decoration:none;
    }
    
    .mapita {
        max-width:600px;
    }
    
    /*Estilos pide cita con formulario y protección de datos */
      /* PIDE CITA */
    #pidecita .content { 
      color: #323232;
    }

    #pidecita .form-box {
      border: 4px solid #75888b;
      padding: 40px;
      max-width: 800px;
      margin: 0 auto;
      box-sizing: border-box;
      border-radius: 6px;
      z-index: 2;
    }

    #pidecita .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }

    #pidecita .form-group {
      display: flex;
      flex-direction: column;
      text-align: left;
    }

    #pidecita .form-group label {
      margin-bottom: 6px;
      font-weight: 500;
      color: #323232;
    }

    #pidecita .form-group input {
      width: 18em;
      border: 1px solid #f7f7f7;
      background-color: #f7f7f7;
      height: 35px;
      padding-left: 20px;
      max-width: 100%;
      border-radius: 4px;
    }

    #pidecita .form-check {
      margin-top: 20px;
      text-align: left;
      display: flex;
      gap: 10px;
      align-items: flex-start;
    }
    
    #pidecita button[type="submit"] {
      margin-top: 20px;
      padding: 10px 20px;
      border: none;
      background-color: #adc06e; 
      color: white;
      cursor: pointer;
      border-radius: 6px;
      font-weight: 600;
    }

    #pidecita button[type="submit"]:hover {
      background-color: #006f48;
    }

    /* Modal */
    #modal-privacidad {
      position: fixed;  
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.6); 
      display: none;         
      justify-content: center;
      align-items: center;
      z-index: 9999;        
    }
    #modal-privacidad.open {
      display: flex;
    }
    /* Caja interna */
    #modal-privacidad .modal-content {
      background: #fff;
      padding: 2.5rem;
      border-radius: 8px;
      max-width: 600px;
      width: 90%;
      max-height: 80vh;
      overflow-y: auto;
      position: relative;
    }
    /* Botón de cierre (X) */
    #modal-privacidad .cerrar {
      position: absolute;
      top: 10px;
      right: 15px;
      font-size: 1.5rem;
      background: none;
      border: none;
      cursor: pointer;
    }
    #modal-privacidad h3 {
      font-size: 1.5em;           
      margin: 0.67em 0;            
      font-weight: normal;        
      text-align: center;          
    }
    #modal-privacidad p {
      margin: 0 0 9px;   
      font-size: 1em;        
      text-align: left;          
    }
    #modal-privacidad a {
      color:#323232;
      text-decoration:underline;
    }
    #modal-privacidad .modal-actions {
      display: flex !important;
      justify-content: center !important; 
      align-items: center !important;    
      width: 100% !important;             
      gap: 5px;                         
      margin-top: 30px;             
      box-sizing: border-box;
    }
    #modal-privacidad .modal-actions button {
      margin-left: 10px;
      padding: 8px 16px;
      border-radius: 5px;
      border: none;
      cursor: pointer;
    }
    #modal-privacidad .modal-actions .primary {
      background-color: #adc06e;
      color: #fff;
    }
    #modal-privacidad #cancelar {
      background: #e57373;
      color: #ffffff;
    }
    #modal-privacidad #aceptar {
      background: #66bb6a;
    }
    #modal-privacidad .close-btn {
      position: absolute;
      top: 8px;
      right: 12px;
      background: none;
      border: none;
      font-size: 20px;
      cursor: pointer;
      color: #444;
    }
    #modal-privacidad .close-btn:hover {
      color: #000;
    }
    
     /* Estilos política de privacidad */

    #politica p, #avisolegal p,
    #politica h2, #avisolegal h2 {
      text-align: left;                
      max-width: 650px;       
      margin: 0 auto 1rem;     
      box-sizing: border-box;  
    }
    #politica h1, #avisolegal h1 {font-size:2em; text-align:left;}
    #politica p, #avisolegal p {padding:0; font-size: 1em;}   
    #politica h2, #avisolegal h2 {padding: 20px 0 0 0; font-size:1.2em!important;}
    #politica a {color:#323232;}
    #politica a.abrepanel {text-decoration:underline!important; cursor: pointer!important;}
    #avisolegal a {color:#323232;}
    
    /*Estilo pagina cookies */
    #pagcookies p,
    #pagcookies h2 {
      text-align: left;                
      max-width: 900px;       
      margin: 0 auto 1rem;     
      box-sizing: border-box;  
    }
    #pagcookies h1 {font-size:2em; text-align:center;}
    #pagcookies p {padding:0; font-size: 1em;}   
    #pagcookies h2 {padding: 20px 0 0 0; font-size:1.2em!important;} 
    #pagcookies a {color:#323232; }
    .abrepanel {text-decoration:underline; cursor:pointer;}
    
    .caja {padding-left:30px;}
    
    .cookie-table-wrap{
      max-width: 920px;
      margin: 0 auto;
      box-shadow: 0 6px 18px rgba(11,37,64,0.06);
      border-radius: 10px;
      overflow: hidden
    }
    
    table.cookie-table{
      width: 100%;
      border-collapse: collapse;
      background: white;
    }

    caption{
      text-align: left;
      padding: 14px 18px;
      font-weight: 600;
      font-size: 1.05rem;
    }

    thead th{
      text-align: center;
      padding: 14px 18px;
      background: #f6d893;
      font-weight: 700;
      letter-spacing: 0.2px;
      border-bottom: 2px solid #f6d893;
    }

    tbody td{
      padding: 12px 18px;
      vertical-align: top;
      border-bottom: 1px solid #f6d893;
      font-size: 0.98rem;
    }

    tbody tr:nth-child(odd){
      background: #fbfdff;
    }
    
    code {
    background-color: #8080801f;
    border-radius: 2px;
    padding: 1.5px;
    line-height:25px
    }
    
     /* ==== MÓDULO DE COOKIES ==== */
#cookie-banner, #cookie-config {
  font-family: Arial, sans-serif;
  color: #333;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  z-index: 10000;
  padding: 25px;
  max-width:600px;
  display: none;
  position: fixed!important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.cookie-logo {
  width: 40px;
  display: block;
  margin-bottom: 10px;
}

.cookie-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.cookie-text {
  font-size: 1rem;
  color: #333;
  margin-bottom: 15px;
}

.cookie-link {
  color: #000;
  text-decoration: underline;
}

/* ==== BOTONES DEL BANNER DE COOKIES ==== */
#cookie-banner .cookie-buttons {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 15px;
  margin-top: 30px;
  width: 100%;
}

#cookie-banner .cookie-buttons .cookie-btn {
  flex: 1;
  text-align: center;
  padding: 14px 10px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

/* Colores específicos */
#cookie-banner .cookie-btn.config { background: #e0e0e0; }
#cookie-banner .cookie-btn.reject { background: #eab84a; }
#cookie-banner .cookie-btn.accept { background: #eab84a; }

#cookie-banner .cookie-btn:hover {
  opacity: 0.9;
}

/* ==== BOTONES EN EL MODAL DE CONFIGURACIÓN (sin cambios visuales) ==== */
#cookie-config .cookie-config-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 30px;
}

.cookie-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  min-width: 120px;
  color: #323232;
}
.cookie-btn.config {
  background: #e0e0e0;
}
.cookie-btn.accept, .cookie-btn.reject {
  background: #eab84a;
}

/* ==== SWITCH ESTILO IPHONE ==== */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #eab84a;
}
input:checked + .slider:before {
  transform: translateX(18px);
}

/* ==== ASPA DE CIERRE ==== */
.cerrar-cookie {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
  transition: color 0.2s ease;
}
.cerrar-cookie:hover {
  color: #000;
}

/* ==== CUERPO DEL MODAL ==== */
.cookie-box {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  background-color: #fafafa;
}
.cookie-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: bold;
}
.cookie-header .header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.cookie-header .header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cookie-toggle {
  font-size: 20px;
  width: 20px;
  text-align: center;
  line-height: 1;
}
.cookie-content {
  display: none;
  margin-top: 10px;
  color: #444;
}
.cookie-content .sub-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.cookie-content .sub-item .prin-text {
  max-width: 80%;
}
.cookie-content .sub-item .sub-text {
  max-width: 85%;
  padding-left:5%;
}
 .cajagoogle {
  padding:5px!important;
  border: 1px solid #eab84a;
  font-size:0.9rem;
}
.cookie-content .sub-item .sub-switch {
  flex: 0 0 auto;
}


/* --- PATCH: restaurar margen del sub-switch dentro del contenido de cookies --- */
/* Aplica en modal y en banner por si alguna variante usa uno u otro */
#cookie-config .cookie-content .sub-item .sub-switch,
#cookie-banner .cookie-content .sub-item .sub-switch {
  margin-right: 5px;
  flex: 0 0 auto; /* evita que el switch se estire en flexbox */
}

/* ==== SCROLL EN EL MODAL DE CONFIGURACIÓN DE COOKIES (MOBILE Y DESKTOP) ==== */
#cookie-config {
  max-height: 90vh; /* altura máxima del 90% de la ventana */
  overflow-y: auto; /* permite hacer scroll vertical */
  overscroll-behavior: contain; /* evita que el scroll salga del modal */
}

/* Para que el contenido interior no se pegue al borde al hacer scroll */
#cookie-config::-webkit-scrollbar {
  width: 6px;
}
#cookie-config::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}
#cookie-config::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.4);
}


    /* Responsive */
    @media (max-width: 768px) {
      .menu {
        position: absolute;
        top: 54px;
        right: 0;
        background: rgba(0, 0, 0, 0.4);
        flex-direction: column;
        align-items: flex-end;
        width: 200px;
        padding: 1rem;
        display: none;
      }

      .menu.active {
        display: flex;
      }

      .hamburger {
        display: flex;
      }

      nav {
        padding: 1rem;
      }
      
      .footer-bottom {
            flex-direction: column;
            align-items: flex-start;
          }
        
          .footer-right {
            align-items: flex-start;
          }

      h1 {
        font-size: 2rem;
      }
      
      h2 {
        font-size:2rem!important;
      }

      p {
        font-size: 1rem;
        padding: 0 1rem;
      }
      
      .hidden{
        display:none;
      }
      
      section {
      min-height: 100vh;
      height: auto;
      }
      
      .btn-cita {
          margin-bottom:2rem;
      }
      
      .btn-cita-full {
              margin-top:0;
              margin-bottom: 2rem;
            }
      
      
      
    /* Fondos */
        #inicio, #iniciocontacto {
        background: url('/assets/img/home/background-home-01-res-2.jpg');
        }
        
        #pidecita {
        background: url('/assets/img/home/background-home-04-res-3.jpg');
        }
        
        #quienesomos {
        background: url('/assets/img/home/background-home-04-res-3.jpg');
        }
        
        #encarna {
        background: url('/assets/img/home/background-home-05-5-res.jpg');
        }
        
        #evelin, #familia {
        background: url('/assets/img/home/background-home-06-res.jpg');
        }
        
        #africa {
        background: url('/assets/img/home/background-home-07-02-res-2.jpg');
        }
        
        #infancia, #escolar {
        background: url('/assets/img/home/background-home-05-5-res.jpg');
        }
    
        #familias, #infanciatera {
          background: url('/assets/img/home/background-home-04-res-3.jpg');
        }
        
      
    /* Iconitos para nosotros-grid
      Responsive: 2 por fila */
          #nosotros .nosotros-grid {
            grid-template-columns: repeat(2, 1fr) !important;
            gap: 1.5rem !important;
            max-width: 90% !important;
            margin: 3rem auto !important;
            justify-items: center !important; 
          }
        
          /* Reset y limites para cada item (evitar width:100% heredado) */
          #nosotros .nosotros-grid > .nosotros-item {
            grid-column: auto !important;
            width: auto !important;
            max-width: 220px !important;  
            margin: 0 auto !important;
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            text-align: center !important;
          }
        
          #nosotros .nosotros-grid > .nosotros-item img {
            display: block !important;
            margin: 0 auto !important;
            height: auto !important;
          }
        
          /* REGLA CLAVE: si queda 1 solo item en la última fila, que ocupe la fila pero su caja sea centrada */
          #nosotros .nosotros-grid > .nosotros-item:last-child,
          #nosotros .nosotros-grid > .nosotros-item:nth-child(5) {
            grid-column: 1 / -1 !important;   /* ocupa la fila entera */
            justify-self: center !important;  /* centra la caja dentro del área */
            width: auto !important;           /* no rellenar toda la fila */
            max-width: 220px !important;      /* limita su ancho para que pueda centrarse */
            margin-left: auto !important;
            margin-right: auto !important;
          }
            
              .nosotros-item img {
                width: 50px;
                height: 50px;
              }
            
              .nosotros-item p {
                font-size: 0.9rem;
              }
    
     /* Psicologa section */
    
    .encarna {
      min-height: auto;         
      height: auto;            
      padding: 3rem 1rem;    
      overflow: hidden;    
      box-sizing: border-box; 
    }
    
    .psicologa-container {
                flex-direction: column;
                text-align: left;
              }
    
    .psicologa-img img {
    width: 200px;
            }
    
    .psicologa-texto h2 {
                font-size: 1.5rem!important;
                margin-bottom: 1rem;
                text-align: center;
              }
    
    .psicologa-texto p {
                font-size: 0.95rem;
                text-align: center;
              }
    
    .psicologa-texto li {
    padding-left: 2%;
    }
              .psicologa-img,
              .psicologa-texto {
                max-width: 100%;
                flex: 0 0 100%;
              }
    
    /* Iconitos para quienesomos-grid
            Responsive: 2 por fila */
           .quienesomos-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 1.5rem;
              }

              .quienesomos:nth-child(4),
              .quienesomos:nth-child(5) {
                grid-column: auto;
                justify-self: auto;
              }

              .quienesomos-item img {
                width: 100px;
                height: 100px;
              }
            
              .quienesomos-item p {
                font-size: 0.9rem;
              }
              
      /* Iconitos para filosofia-grid
      Responsive: 2 por fila */
           .filosofia-grid {
                grid-template-columns: repeat(2, 1fr); /* 2 columnas */
                gap: 1.5rem;
                max-width: 90%;
              }
            
              /* Si queda un item suelto, se centra */
              .filosofia-grid .filosofia-item:last-child:nth-child(odd) {
                grid-column: 1 / -1;
                justify-self: center;
              }
            
              .filosofia-item img {
                width: 50px;
                height: 50px;
              }
            
              .filosofia-item p {
                font-size: 0.9rem;
              }       
      
      /* Sección adultos con iconos y párrafos */
               .adultos-item {
                flex-direction: column; 
                text-align: center;   
              }
            
              .adultos-icon {
                flex: none;
                max-width: 50px;
                margin: 0 auto 1rem;   
              }
            
              .adultos-texto {
                flex: none;
                text-align:center;
              }
              
              .adultos-texto p {
                text-align:center;
              }
              
              
       /* teparias section */
        .terapias-container {
            flex-direction: column; 
            align-items: center;   
            text-align: center; 
            gap: 0!important;
          }
        
          .terapias-container .terapias-img img {
            width: 100px; 
            max-width: 80px; 
            height: auto;
            margin-bottom: 1rem;
          }
        
          .terapias-texto  {
            max-width:90%;
          }
        
          .terapias-container .terapias-texto h1,
          .terapias-container .terapias-texto h2,
          .terapias-container .terapias-texto p {
            text-align: center;  
          }
        
          .terapias-container .terapias-texto h2 {
            padding-left:0;
            font-size: 2em!important;
            text-align:center;
            margin-top:0;
          }
          
          
        
          .terapias-texto ul {
            padding-left:0;
          }
        
          .terapias-texto li {
            padding-left:0;
          }
      
      
      /* Iconitos para terapias-grid
      Responsive: 2 por fila */
          /* Aseguramos la base del grid en 2 columnas */
      .terapias-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas */
        max-width: 90%;
        gap: 1.5rem;
      }

  

  /* Reset y limites para cada item (evitar width:100% heredado) */
      #iniciotera .terapias-grid > .terapias-item {
        grid-column: auto !important;
        width: auto !important;
        max-width: 220px !important;  
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
      }

      /* Si queda un item suelto, centrado */
      .terapias-grid .terapias-item:last-child:nth-child(odd) {
        grid-column: 1 / -1;       /* ocupa toda la fila */
        justify-self: center; 
      }

      /* Centrar la imagen/texto dentro de cada item */
      #iniciotera .terapias-grid > .terapias-item img {
        display: block !important;
        margin: 0 auto !important;
        height: auto !important;
      }

            
              .terapias-item img {
                width: 50px;
                height: 50px;
              }
            
              .terapias-item p {
                font-size: 0.9rem;
              }
              
    /* Estilos contacto */
    .mapita {
        max-width:340px;
    }
    #modal-privacidad .modal-content {
      padding: 2.5rem 1.5rem;
    }
    
      #pidecita .form-grid {
        grid-template-columns: 1fr;
      }
      #pidecita .form-group input {
        width: 100%;
      }
      #inicio {
        background: url('/assets/img/home/background-home-01-res-2.jpg');
      }
      #pidecita {
        background: url('/assets/img/home/background-home-04-res-3.jpg');
      }
      
      /*Estilo modal cookies */
      
      .cookie-logo { width: 30px; }
      .cookie-text, .cookie-header { font-size: 0.9rem; }
      .cookie-buttons, .cookie-config-buttons {
        flex-direction: column;
      }
      #cookie-banner, #cookie-config {
          width:90%;
          padding: 20px;
      }
      .cookie-content .sub-item .prin-text {
    max-width: 100%;
    }
    .cookie-content .sub-item .sub-text {
    max-width: 100%;
    padding-left: 2%;
    }
      #cookie-banner .cookie-buttons .cookie-btn {
    width: 100%;
  }
      .cookie-btn {
        min-width: auto; width: 100%;
      }
      .cookie-content {font-size:0.9rem;}
      
      .cookie-logo { width: 30px; }
      .cookie-text {font-size:0.9rem;}
      .cookie-header {font-size:0.9rem;}
      .cookie-buttons, .cookie-config-buttons { flex-direction:column; }
      .cookie-btn { min-width: auto; width: 100%; }
      .cookie-content {font-size:0.9rem;}
      #cookie-config .cookie-content .sub-item .sub-switch,
      #cookie-banner .cookie-content .sub-item .sub-switch {
      margin-right: 5px;
      }
      
       thead{
        display: none;
      }
      table.cookie-table, tbody, tr, td{
        display: block;
        width: 100%;
      }
      tr{
        margin-bottom: 10px;
        border-bottom: 1px solid #f6d893;
      }
      td{
        padding: 10px 14px;
      }
      td::before{
        content: attr(data-label);
        display: block;
        font-weight: 700;
        margin-bottom: 6px;
        color: #164060;
      }
      
              
    }