/* ============================
   FUENTES Y VARIABLES
   ============================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Lora:wght@400;500;600;700&display=swap');

:root {
  /* Colores */
  --color-principal: #6766DB;
  --color-principal-10: rgba(103, 102, 219, 0.10);

  --color-dorado: #D09D3E;
  --color-amarillo: #FCC433;

  --color-grisoscuro: #6A7282;
  --color-grisclaro: #dce3ecff;
  --color-negro: #000;

  --fondos: linear-gradient(180deg, #FFF 0%, #F9F9FF 50%, #F0F0FF 100%);

  /* Tipografías */
  --font-titulo: 'Lora', serif;
  --font-texto: 'Inter', sans-serif;

  --transition: 0.35s ease;

  /* Tamaños */
  --h1-size: 64px;
  --h2-size: 40px;
  --p-size: 18px;
}


/* ============================
   RESET
   ============================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  font-family: var(--font-texto);
  background: var(--fondos);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}






/* ============================
   HEADER / NAV
   ============================ */
.header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: white;
  box-shadow: 0px 1.5px 6px rgba(103, 102, 219, 0.50);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
}

.nav {
  width: 100%;
}

.nav ul {
  display: flex;
  align-items: center;
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav li {
  margin-right: 32px;
}

/* LOGO A LA DERECHA */
.nav li.logo-item {
  margin-left: auto;
  margin-right: 32;
}

.nav a{
  color: var(--color-negro);
  text-decoration: none;
  font-size:16px;
  font-weight:300;
  position: relative;
  padding-bottom:4px;
  transition: color var(--transition);
}

/* Subrayado animado */
.nav a::after{
  content: "";
  position: absolute;
  left:0;
  bottom:0;
  height:2px;
  width:0%;
  background: var(--color-principal);
  transition: width var(--transition);
}

.nav a:hover::after,
.nav a.active::after{ 
  width:100%; 
}

.nav a:hover, .nav a.active{ 
  color: var(--color-principal); 
}

.logo-link {
  display: inline-block;
  position: relative;
}

.logo.default {
  width: 36px;
  height: auto;
  display: block;
}

.logo.hover {
  width: 36px;
  height: auto;
  display: none;
}

.logo-link:hover .default {
  display: none;
}

.logo-link:hover .hover {
  display: block;
}


.nav-toggle{
  display:none;
}

.nav-burger{
  display:none;
  flex-direction:column;
  gap:6px;
  cursor:pointer;
}

.nav-burger span{
  width:26px;
  height:2px;
  background:#000;
  transition:0.3s ease;
}


/* ESTADO INICIAL */
.nav-burger span{
  width:26px;
  height:2px;
  background:#000;
  transition:transform 0.35s ease, opacity 0.25s ease;
  transform-origin:center;
}

/* ANIMACIÓN A X */
.nav-toggle:checked + .nav-burger span:nth-child(1){
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle:checked + .nav-burger span:nth-child(2){
  opacity:0;
}

.nav-toggle:checked + .nav-burger span:nth-child(3){
  transform: translateY(-8px) rotate(-45deg);
}
/* ============================
   FIN HEADER / NAV
   ============================ */




/* CONTENEDOR PRINCIPAL */
.servicios-container {
  padding-top: 135px;
  padding-bottom:200px; 
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  opacity:0;
  transform: translateY(12px);
  animation: fadeUp 0.7s ease forwards;
}

@keyframes fadeUp {
  to { opacity:1; transform: none; }
}

/* TÍTULO */
.titulo-servicios {
  font-family: var(--font-titulo);
  font-size: 70px;
  font-weight: 600;
  color: var(--color-principal);
  text-align: center;
  margin-bottom: 60px;
}

/* GRID DE TARJETAS */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  justify-items: center;
  margin-bottom: 80px;
}

.servicio-card {
  width: 100%;
  max-width: 360px;
  background: white;
  padding: 32px;
  border-radius: 30px;
  box-shadow: 0px 4px 6px -4px rgba(0,0,0,0.1);
  outline: 0.8px solid rgba(103,102,219,0.10);
  outline-offset: -0.8px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.servicio-card img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
}

/* TEXTO */
.servicio-texto h3 {
  font-family: var(--font-titulo);
  font-size: 24px;
  font-weight:500;
  color: var(--color-negro);
  margin: 0;
}

.servicio-texto p {
  font-size: 16px;
  color: var(--color-grisoscuro);
  margin-top: 24px;
  line-height: 1.4;
}



.modalidad {
  color: var(--color-principal);
  font-family: var(--font-titulo);
  font-size: 20px;
  font-weight: 400;
  line-height: 32px;
  text-align: center;
  width: 100%;
}
.estrella{
  width:48px;
  margin: 18px auto 28px;
  filter: drop-shadow(0 0 6px rgba(208,157,62,0.45));
  display:block;
  transition: transform 0.9s ease;
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0% { transform: scale(1) rotate(0deg); opacity:0.95; }
  50% { transform: scale(1.04) rotate(180deg); opacity:1; }
  100% { transform: scale(1) rotate(0deg); opacity:0.95; }
}



/* ============================
   DESPLEGABLE ESTILO LÍNEAS
   ============================ */

/* El bloque deja de parecer una tarjeta */
.accordion {
    border: none;
    box-shadow: none;
    outline: none;
    border-bottom: 2px solid var(--color-principal);
}

/* Línea superior entre bloques */
.accordion:first-of-type {
    border-top: 1.5px solid var(--color-principal);
    padding-top: 24px;
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 12px 0;
    font-family: var(--font-texto);
    font-size: 22px;
    color: var(--color-principal);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.accordion .icon {
    font-size: 42px;
    font-weight: 100;
    transition: transform 0.3s ease;
}

/* Contenido */
.accordion-content {
    height: 0;
    overflow: hidden;
    transition: height 0.4s ease;
    padding-top: 0;
}

/* Cuando se despliega */
.accordion.open .accordion-content {
    padding-top: 10px;
    padding-bottom: 20px;
}

.accordion.open .icon {
    transform: rotate(45deg);
}

/* Layout interno sigue igual */
.desplegable-layout {
  display: flex;
  align-items: center;
  gap: 90px;
}

/* Imagen */
.foto-desplegable {
  display: block;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 12px;
}

/* Texto */
.desplegable-texto {
    font-size: 18px;
    line-height: 1.6;
    margin-right:40px;
}
.desplegable-texto p {
  margin-bottom: 20px;
}


/* RESPONSIVE */
@media (max-width: 1240px) {
  /* CONTENEDOR */
  .servicios-container{
    padding-left: 40px;
    padding-right: 40px;
  }

  /* TÍTULO */
  .titulo-servicios{
    font-size: 52px;
    margin-bottom: 48px;
  }

  /* GRID */
  
  .servicios-grid{
    gap: 36px;
    margin-bottom: 64px;
  }

  .servicio-card{
    padding: 28px;
  }

  .servicio-texto h3{
    font-size: 22px;
  }

  .servicio-texto p{
    font-size: 15px;
    line-height: 1.45;
  }

  /* DESPLEGABLE */
  .accordion-header{
    font-size: 20px;
  }

  .accordion .icon{
    font-size: 34px;
  }

  .desplegable-layout{
    gap: 56px;
  }

  .desplegable-texto{
    font-size: 16px;
    margin-right: 0;
  }

  .foto-desplegable{
    max-width: 350px;
  }
}

@media (max-width:900px){
   .servicios-grid {
    grid-template-columns: repeat(2, 1fr);
  }
        /* DESPLEGABLE */
  .accordion-header{
    font-size: 18px;
  }

  .accordion .icon{
    font-size: 30px;
  }

  .desplegable-layout{
    flex-direction: column;
    gap: 12px;
  }

  .desplegable-texto{
    order: 1;
    font-size: 16px;
    line-height: 1.6;
  }

  .foto-desplegable{
    order: 2;
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width:600px){

  /* CONTENEDOR */
  .servicios-container{
    padding-left: 24px;
    padding-right: 24px;
  }

  /* TÍTULO */
  .titulo-servicios{
    font-size: 36px;
    margin-bottom: 36px;
  }

  /* GRID */
  .servicios-grid{
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 56px;
  }

  .servicio-card{
    padding: 24px;
    border-radius: 24px;
  }

  .servicio-texto h3{
    font-size: 20px;
  }

  .servicio-texto p{
    font-size: 16px;
    margin-top: 16px;
    line-height: 1.45;
  }

  /* MODALIDAD */
  .modalidad{
    font-size: 18px;
  }

  .estrella{
    width: 40px;
    margin-bottom: 40px;
  }
}

/* ============================
   RESPONSIVE - MENU
   ============================ */

   @media (max-width: 780px) {
/* RESET TOTAL DEL NAV DESKTOP EN MÓVIL */
.nav ul {
  width: auto;
}

.nav-menu {
  margin: 0;
  padding: 0;
}
.nav-menu li {
  margin: 0;
}
.nav-menu .logo-item {
  margin-left: 0;
}
  /* =====================
     HEADER
  ====================== */
  .header {
    height: 72px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  /* =====================
     BOTÓN HAMBURGUESA
  ====================== */
  .nav-burger {
    display: flex;
    position: relative;
    z-index: 50;
  }
  /* =====================
     MENÚ OCULTO
  ====================== */
 .nav-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  transform: translateY(-100%);
  transition: transform 0.5s ease;
  z-index: 40;
}
  /* =====================
     MOSTRAR MENÚ
  ====================== */
.nav-toggle:checked + .nav-burger + .nav-menu {
  transform: translateY(0);
}
  /* =====================
     ITEMS DEL MENÚ
  ====================== */
  .nav-menu li {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .nav-menu a {
    font-size: 24px;
    font-weight: 400;
    text-align: center;
  }
  /* =====================
     LOGO DENTRO DEL MENÚ
  ====================== */
  .nav-menu .logo-item {
    order: -1;
    display: flex;
    justify-content: center;
  }
  .nav-menu .logo.default,
  .nav-menu .logo.hover {
    width: 50px;
    height: auto;
  }
  .logo-link {
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

