/*subp servicios*/
/*hero de subpg services*/
.services-hero {
  position: relative;
  height: 75vh;
  min-height: 500px;
  background: url('..images/aircraft.jpg') no-repeat center center/cover;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 2rem;
  text-align: center;
  overflow: hidden;
animation: backgroundZoom 20s ease-in-out infinite alternate;
}

.services-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

.services-hero > * {
  position: relative;
  z-index: 1;
}

.services-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeInDown 2s ease forwards;
}

.services-hero p {
  font-size: 1.5rem;
  max-width: 800px;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeInUp 2s ease 0.5s forwards;
}

.cta-btn {
  padding: 1rem 2rem;
  font-size: 1rem;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  opacity: 0;
  animation: fadeInUp 2s ease 1s forwards;
}

.cta-btn:hover {
  background-color: darken(var(--accent-color), 10%);
}

section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-color);
  }



.services ul {
  padding-left: 1.2rem;
}

/* ==== ESTILOS EXCLUSIVOS PARA LA SUBPÁGINA DE SERVICIOS ==== */

.services-page {
  background-color: var(--section-bg);
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.services-page h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  border-left: 6px solid var(--accent-color);
  padding-left: 1rem;
  color: var(--title-color);
  letter-spacing: 0.5px;
}

/* 📌 Grid adaptable */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-top: 1rem;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 📌 Tarjeta de servicio */
.service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* 📌 Icono del servicio */
.service-icon {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.service-icon svg {
  width: 3.5rem;
  height: 3.5rem;
  color: var(--accent-color);
}

.service-icon { transition: transform .25s ease, opacity .25s; }
.service-card:hover .service-icon{ transform: translateY(-2px) scale(1.03); }

/* 📌 Título y texto */
.service-card h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--title-color);
  margin: 0 0 0.6rem;
}

.service-card p {
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.7;
  margin: 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  row-gap: 3rem;  
  align-items: stretch; 
}

/* 1) Evitar que las cards "choquen" entre filas y que la de arriba se superponga con sombra */
.feature-box{
  position: relative;   /* crea stacking context */
  height: 100%;
}

/* Título: misma altura en todas las cards para alinear el párrafo */
/* El item y su interior ocupan el 100% */
.feature-box{ height: 100%; }
.feature-box-inner{
  height: 100%;
  display: grid;                 /* estructura vertical consistente */
  grid-template-rows: auto      /* icono */
                       minmax(2.8em, auto)  /* título con altura fija para 1–2 líneas */
                       1fr;      /* el texto rellena hasta el fondo */
  gap: .6rem;
}

.feature-box-inner h3{
  margin: 0;
  line-height: 1.2;
  min-height: 2.8em;            /* ≈ 2 líneas; ajusta a tu tipografía si hace falta */
  display: flex;
  align-items: flex-end;         /* títulos de 1 línea bajan para alinear baseline */
  overflow-wrap: anywhere;
  hyphens: auto;
}
.feature-box-inner h3 a{
  white-space: normal;
}

/* Párrafo: empieza a la misma altura en todas las cards */
.feature-box-inner p{
  margin: 0;
  align-self: start;
}


/* Wrapper animado: evita conflicto AOS vs :hover */
.feature-box { background: transparent; box-shadow: none; padding: 0; }
.feature-box-inner{
  background:#fff;
  border-radius:12px;
  padding:2rem;
  box-shadow:0 4px 12px rgba(0,0,0,.08);
  transition:transform .3s ease, box-shadow .3s ease;
}
.feature-box:hover .feature-box-inner{
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
/* Microanimación del icono */
.feature-box i{ transition: transform .25s ease, opacity .25s; display:inline-block; }
.feature-box:hover i{ transform: translateY(-2px) scale(1.03); }


/* 📌 Botón expandible */
.expand-btn {
  background-color: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.2rem;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.expand-btn:hover {
  background-color: var(--accent-color);
  color: #fff;
}

.expand-btn .icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

/* 📌 Detalles expandibles */
.service-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  opacity: 0;
  margin-top: 1rem;
}

.service-card.expanded .service-details {
  max-height: 500px; /* más espacio para contenido */
  opacity: 1;
}

.service-card.expanded .expand-btn .icon {
  transform: rotate(45deg);
}










 /*animaciones hero services*/
@keyframes backgroundZoom {
  0% {
    background-size: 110% 110%;
  }
  100% {
    background-size: 100% 100%;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Responsive tarjetas servicos subpag*/
@media (max-width: 600px) {
  .service-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .service-icon {
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 640px){
  .feature-box-inner h3{ min-height: 2.4em; }
}














/* ====== SERVICES PAGE (scopeado) ====== */
.services { 
  background-color: var(--section-bg);
  padding: 3rem 0 5rem;                 /* aire extra abajo de la sección */
  --service-icon-size: 2.6rem;        /* base (móvil) */
}

/* Grid de cards solo para esta sección */
.services .features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);    
  column-gap: 2rem;
  row-gap: 6rem;                    /* separa filas para que no "choquen" */
  align-items: stretch;
}

/* Cada item y su interior ocupan todo el alto */
.services .feature-box {
position: relative;
  isolation: isolate;                         /* su propio stacking context */
  z-index: 0;                                 /* base */
  height: 100%;
  padding: 0;
   margin: 0 !important;    /* quita márgenes residuales */
   background: transparent;
  box-shadow: none;
}
.services .feature-box:hover { 
  z-index: 2;                           /* eleva la card en hover */
}

/* Contenido visible de la card + hover sin pelear con AOS */
.services .feature-box-inner {
  height: 100%;
  display: grid;                        /* estructura vertical consistente */
  grid-template-rows:
    auto                                 /* icono */
    minmax(3em, auto)                    /* título (1–2 líneas) */
    1fr;                                 /* texto rellena hasta el fondo */
  gap: .6rem;

  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  transition: transform .3s ease, box-shadow .3s ease;
}
.services .feature-box:hover .feature-box-inner {
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}

/* Iconos (recupera color aunque estén dentro de <a>) */
.services .feature-box a i,
.services .feature-box i {
  color: var(--accent-color) !important;
  transition: transform .25s ease, opacity .25s;
  display: inline-block;
}
.services .feature-box:hover i { 
  transform: translateY(-2px) scale(1.03);

}
/* no heredar color de link morado en el icono */
.services .feature-box > .feature-box-inner > a:first-child { color: inherit; }

/* Título: misma altura para alinear párrafos entre columnas */
.services .feature-box-inner h3 {
  margin: 0;
  line-height: 1.2;
  min-height: 3em;                       /* ajusta a 2.6–3.2em según tu fuente */
  display: flex;
  align-items: flex-end;                  /* 1 línea baja a la base */
  overflow-wrap: anywhere;
  hyphens: auto;
}
.services .feature-box-inner h3 a { white-space: normal; }

/* Párrafo alineado */
.services .feature-box-inner p {
  margin: 0;
  align-self: start;
}

/* Responsive */
@media (max-width: 640px){
  .services .feature-box-inner h3 { min-height: 2.6em; }
}

/* 4 columnas >=1200px  -> 8 cards = 2 filas */
@media (min-width: 1200px){
  .services .features{ grid-template-columns: repeat(4, 1fr); row-gap: 7rem !important;}
  .services .features > .feature-box:nth-child(-n+4){ margin-bottom: 0.75rem; }
  .services .features > .feature-box:nth-child(n+5){  margin-top: 0.75rem; }
}

/* Tablet: 2 columnas, aumenta hueco y separa pares de filas */
@media (min-width: 768px) and (max-width: 1199.98px){
   .services .features{ grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
  .services .features > .feature-box:nth-child(odd){  margin-bottom: 0.6rem; } /* fila de arriba en cada par */
  .services .features > .feature-box:nth-child(even){ margin-top: 0.6rem; }    /* fila de abajo en cada par */
}

/* Móvil: 1 columna, aún más aire entre cards */
@media (max-width: 767.98px){
  .services .features{ grid-template-columns: 1fr; row-gap: 2rem; }
  .services .feature-box + .feature-box{ margin-top: 1.25rem; }
}




/* —— 1) Desactivar transformaciones de AOS en pantallas táctiles ——— */
@media (hover: none), (pointer: coarse), (max-width: 1024px){
  [data-aos]{
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  /* y nuestro hover tampoco desplaza en touch */
  .services .feature-box:hover{ z-index: 0; }
  .services .feature-box:hover .feature-box-inner{
    transform: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
  }
}
@media (hover:hover) and (pointer:fine){
  .services .feature-box:hover .feature-box-inner { transform: translateY(-2px); }
}


/* —— 2) Más aire vertical en tablet/móvil y nivelado por filas ——— */
@media (min-width: 768px) and (max-width: 1199.98px){  /* tablet: 2 columnas */
  .services .features{
    grid-template-columns: repeat(2, 1fr);
    row-gap: 4.5rem;                 /* más separación entre filas */
  }
  /* extra separación entre las 2 cards de cada fila */
  .services .features > .feature-box:nth-child(odd){  margin-bottom: 1.25rem; }
  .services .features > .feature-box:nth-child(even){ margin-top: 1.25rem; }
}

@media (max-width: 767.98px){                          /* móvil: 1 columna */
  .services .features{
    grid-template-columns: 1fr;
    row-gap: 3.25rem;                /* aire adicional entre cards */
  }
  .services .feature-box + .feature-box{ margin-top: 1rem; }
}

/* —— 3) Asegurar “mismo alto por fila” y evitar pisado de sombras ——— */
.services .features{
  grid-auto-rows: 1fr;               /* cada celda base misma altura */
 row-gap: 6rem;     
}
.services .feature-box{
  isolation: isolate;                /* su propio stacking context */
  z-index: 0;
}
.services .feature-box:hover{ z-index: 2; }            /* solo desktop */








/* === RESET: quita márgenes por tarjeta que provocaban desniveles === */
.services .features > .feature-box {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* === GRID limpio: 4 col (desktop), 2 col (tablet), 1 col (móvil) === */
.services .features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 2rem;
  row-gap: 4rem;                   /* aire entre filas: suficiente para sombras */
  align-items: stretch;
}

@media (min-width: 768px) and (max-width: 1199.98px) {   /* tablet */
  .services .features {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 4.5rem;               /* +aire para evitar “choques” */
  }
}

@media (max-width: 767.98px) {                           /* móvil */
  .services .features {
    grid-template-columns: 1fr;
    row-gap: 3.75rem;              /* +aire entre cards en 1 columna */
  }
}

.services{
  --service-icon-size: 2.6rem !important ;       /* base (móvil) */
}

@media (min-width: 768px){            /* tablet */
  .services{ --service-icon-size: 3rem; }
}

@media (min-width: 1200px){           /* desktop grande */
  .services{ --service-icon-size: 3.4rem; }
}


/* === Hover/stacking: no invadir la fila inferior === */
.services .feature-box { isolation: isolate; z-index: 0; }
.services .feature-box:hover { z-index: 2; }
.services .feature-box-inner {
  transition: transform .25s ease, box-shadow .25s ease;
}
.services .feature-box:hover .feature-box-inner {
  transform: translateY(-2px);     /* sutil para no “acercarse” demasiado */
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}

/* === En pantallas táctiles: sin hover desplazando ni AOS empujando === */
@media (hover: none), (pointer: coarse) {
  .services .feature-box:hover .feature-box-inner {
    transform: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
  }
}

/* Seguridad extra: sombras nunca se recortan */
.services .feature-box-inner { overflow: visible; }



/* Desactiva elevación/transform en dispositivos touch (evita solapes) */
.is-touch .services .feature-box:hover .feature-box-inner {
  transform: none !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.08) !important;
}

/* Además, neutraliza cualquier transform inline de AOS en touch */
.is-touch [data-aos] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Un poco más de aire en móvil para rematar */
@media (max-width: 767.98px){
  .services .features { row-gap: 4.25rem; }
}
