/* =========================
   CONTENEDORES GENERALES
========================= */

.services-section ul{
    display: flex;
    list-style: none;
    padding: 0 5em;
    margin: 0;
}

.services-side{
    display: flex;
    flex: 1;
    padding: 0;
    margin: 0;
}

.services-section li{
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0 .3em;
    padding: 0;
    color: var(--text-100);
}

/* =========================
   BASE GLASS PARA TODAS LAS CARDS
========================= */

.small-service,
.medium-service,
.large-service {
    position: relative;           /* CLAVE para el overlay de la descripción */
    overflow: hidden;             /* CLAVE para que no crezca y no se salga */

    background: linear-gradient(
        135deg,
        rgba(74,83,70,0.35),
        rgba(22,24,21,0.6)
    );
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.22);
    
    border-radius: .6em;
    cursor: pointer;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    transition:
        transform .50s ease,
        box-shadow .50s ease,
        border-color .50s ease;
}

/* =========================
   HOVER GENERAL
========================= */

.small-service:hover,
.medium-service:hover,
.large-service:hover {
    border-color: rgba(0,186,150,0.6);
    box-shadow:
        0 14px 50px rgba(0,186,150,0.25),
        inset 0 1px 1px rgba(255,255,255,0.35);
    transform: translateY(-4px) scale(1.01);
}

/* =========================
   TAMAÑOS (ALTURA FIJA)
   -> La descripción NO cuenta para la altura.
========================= */

.small-service { height: 7em; margin: .3em 0; }
.medium-service { height: 11em; margin: .3em 0; }
.large-service { height: 15em; margin: .3em 0; }

/* =========================
   LOGO (COLAPSA EN HOVER)
========================= */

.service-logo{
    flex: 0 0 auto;
    max-height: 5em;              /* altura "normal" del área del ícono */
    overflow: hidden;

    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 1em;
    padding-left: 1em;
    font-size: 2em;
    opacity: 0.7;

    z-index: 2;
    transition:
        opacity .25s ease,
        max-height .50s ease,
        padding .50s ease;
}

.service-logo i{
    margin: 0;
    padding: 0;
}

.small-service:hover .service-logo,
.medium-service:hover .service-logo,
.large-service:hover .service-logo{
    opacity: 0;
    max-height: 0;                /* CLAVE: deja de ocupar espacio */
    padding-top: 0;
    padding-left: 0;
}

/* =========================
   TITULO (SE MANTIENE VISIBLE)
========================= */

.service-title{
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding-right: 1em;
    z-index: 3;

    transition: .50s ease;
}

.services-menu h5{
    margin: 0;
    padding-bottom: 1em;
}

.small-service:hover .service-title,
.medium-service:hover .service-title,
.large-service:hover .service-title{
    margin: 0 !important;
    color: var(--primary-100);
}

/* =========================
   DESCRIPCIÓN (OVERLAY)
   -> NO afecta la altura del recuadro.
   -> Aparece ocupando el espacio "liberado".
========================= */

.service-desc{
    position: absolute;
    inset: 0;                     /* ocupa toda la card */
    padding: 1em;
    padding-bottom: 3.2em;        /* deja espacio para el título abajo */

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    font-size: .8em;

    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    pointer-events: none;

    z-index: 1;

    transition:
        opacity .50s ease,
        transform .50s ease;
}

.small-service:hover .service-desc,
.medium-service:hover .service-desc,
.large-service:hover .service-desc{
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.service-desc p{
    color: var(--text-100);
    opacity: .85;
    text-align: justify;
    margin: 0;
    line-height: 1.4;
}

/* =========================
   IMÁGENES EN SERVICIOS
========================= */

.services-menu img{
    width: 30%;
}

.serv-more-button{
    display: flex;
    justify-content: center;
    border: 2px solid var(--text-100);
    width: 100%;
    font-size: 1em;
    margin-top: 1em;
    background-color: transparent;
    padding: .3em;
    border-radius: .4em;
    color: var(--text-100);
    text-decoration: none;
    transition: .5s;
    font-weight: 600;
}
.serv-more-button:hover{
    background-color: var(--text-100);
    color: var(--bg-100);
}


@media (max-width: 950px){

  .services-section ul{
    padding: 0 2%;
    gap: .6em;
  }

  .services-side{
    flex-direction: column;
    gap: .6em;
  }

  .services-section li{
    margin: 0;
  }


  .service-logo{
    font-size: 1.4em; /* mejor que tocar el <i> */
  }

  .service-title{
    padding-right: 1em;
  }

  .service-desc{
    padding: 1em;
    padding-bottom: 3.4em;
  }

  .service-desc p{
    font-size: .85em;
    line-height: 1.35;
  }


  .main-systems{
    margin: 2em 0;
  }
   /* 1) Empuja el logo hacia arriba */
  .service-logo{
    margin-bottom: auto;          /* CLAVE: separa logo del título */
    max-height: 3.2em;            /* logo más compacto en mobile */
    padding-top: .9em;
    padding-left: 1em;
    font-size: 2em;             
  }

  /* 2) Dale “aire” al título abajo */
  .service-title{
    flex: 0 0 auto;
    padding-right: 1em;
    padding-bottom: .9em;         /* CLAVE: separación */
  }

  /* 3) Reduce el padding-bottom del h5 (si se veía muy largo) */
  .services-menu h5{
    padding-bottom: .6em;
  }
}


