/* ==========================================================================
   Inicio — Servicios, Tecnologías y Equipo (index.html)
   --------------------------------------------------------------------------
   Las tres secciones dejan las cajas flotantes con sombra y el título
   centrado, y pasan al lenguaje editorial del resto del sitio: eyebrow,
   título a la izquierda, texto de apoyo, tarjetas blancas ligeras sobre el
   fondo global de nodos. Tecnologías es una banda azul de borde a borde.
   Prefijos: hs- (servicios), ht- (tecnologías), he- (equipo).
   Los scripts (index.html, equipo-home.js) siguen pintando en los mismos
   contenedores; aquí solo hay presentación.
   ========================================================================== */

:root {
    --hm-line: #E4EAF0;
    --hm-muted: #506680;
    --hm-shadow: 0 1px 2px rgba(10, 25, 47, 0.04), 0 10px 28px -18px rgba(10, 25, 47, 0.18);
    --hm-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Piezas comunes ------------------------------------------------------ */

.hm-wrap {
    position: relative;
    z-index: 1;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* En escritorio el menú flotante de redes (56 px) va fijo a la derecha: se reservan 80 px por lado. */
@media (min-width: 1200px) {
    .hm-wrap { max-width: min(var(--container-max-width), calc(100vw - 160px)); }
}

/* Encabezado de sección: texto a la izquierda, acción a la derecha. */
.hm-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px 40px;
    flex-wrap: wrap;
    margin-bottom: 34px;
}

.hm-head__text { max-width: 720px; }

.hm-title {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 2.5vw, 2.3rem);
    line-height: 1.15;
    letter-spacing: -0.022em;
    color: var(--primary-blue);
    text-wrap: balance;
}

.hm-lead {
    margin: 12px 0 0;
    max-width: 640px;
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    line-height: 1.6;
    color: var(--hm-muted);
}

.hm-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #3F7A1E;
    text-decoration: none;
    white-space: nowrap;
}

.hm-link i { font-size: 0.85em; transition: transform 0.3s var(--hm-ease); }
.hm-link:hover i, .hm-link:focus-visible i { transform: translateX(4px); }

/* Los .reveal genéricos suben 40 px; aquí basta con menos. */
#servicios .reveal, #herramientas .reveal, #equipo .reveal { transform: translateY(16px) scale(1); }
#servicios .reveal.active, #herramientas .reveal.active, #equipo .reveal.active { transform: none; }

/* Sin la caja flotante de styles.css (#servicios > .container, etc.). */
#servicios.hs-section, #herramientas.ht-section, #equipo.he-section {
    background-image: none !important;
}
#servicios.hs-section::before, #herramientas.ht-section::before, #equipo.he-section::before { display: none; }

/* ==========================================================================
   Servicios
   ========================================================================== */

#servicios.hs-section {
    padding: clamp(56px, 6vw, 84px) 0;
    background-color: transparent !important;
}

.hs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.hs-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--hm-line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--hm-shadow);
    transition: transform 0.3s var(--hm-ease), box-shadow 0.3s ease;
}

.hs-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(10, 25, 47, 0.05), 0 18px 36px -20px rgba(10, 25, 47, 0.28);
}

.hs-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
}

.hs-card__icon {
    position: absolute;
    left: 18px;
    bottom: -20px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    color: var(--accent-blue);
    border: 1px solid var(--hm-line);
    box-shadow: 0 6px 16px -8px rgba(10, 25, 47, 0.25);
    font-size: 1rem;
}

.hs-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 32px 22px 22px;
}

.hs-card__title {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--primary-blue);
}

.hs-card__text {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--hm-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

a.hs-card { text-decoration: none; color: inherit; }
a.hs-card:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 3px; }
.hs-card__more {
    margin-top: auto;
    padding-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: #5A9E1E;
}
.hs-card__more i { font-size: 0.8rem; transition: transform 0.3s var(--hm-ease); }
.hs-card:hover .hs-card__more i { transform: translateX(4px); }

.hs-card--skeleton {
    min-height: 300px;
    background: linear-gradient(90deg, #fff 0%, #F1F5F9 50%, #fff 100%);
    background-size: 200% 100%;
    animation: hsShimmer 1.4s ease-in-out infinite;
}

@keyframes hsShimmer { to { background-position: -200% 0; } }

.hm-empty {
    grid-column: 1 / -1;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 24px 26px;
    background: #fff;
    border: 1px dashed #CBD6E2;
    border-radius: 16px;
}

.hm-empty i { font-size: 1.3rem; color: var(--accent-blue); opacity: 0.8; margin-top: 2px; }
.hm-empty strong { display: block; margin-bottom: 4px; font-family: 'Montserrat', sans-serif; font-weight: 800; color: var(--primary-blue); }
.hm-empty p { margin: 0; font-family: 'Inter', sans-serif; font-size: 0.95rem; line-height: 1.6; color: var(--hm-muted); }

/* ==========================================================================
   Tecnologías — banda azul de borde a borde
   ========================================================================== */

#herramientas.ht-section {
    padding: clamp(56px, 6vw, 84px) 0;
    background-color: var(--primary-blue) !important;
    background-image: radial-gradient(ellipse at 80% 10%, rgba(0, 75, 135, 0.7), transparent 55%) !important;
    color: #fff;
}

#herramientas .hm-title { color: #fff; }
#herramientas .hm-lead { color: rgba(255, 255, 255, 0.78); }

.ht-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 12px;
}

#herramientas .tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 22px 12px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    cursor: default;
    opacity: 1;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--hm-ease);
}

#herramientas .tool-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(141, 198, 63, 0.45);
}

#herramientas .tool-icon { display: grid; place-items: center; }

#herramientas .tool-item img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    /* Cada logo conserva su color; styles.css los volvía blancos. */
    filter: none;
    opacity: 0.95;
}

#herramientas .tool-item span {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   Equipo — tarjetas blancas ligeras (las pinta equipo-home.js)
   ========================================================================== */

#equipo.he-section {
    padding: clamp(56px, 6vw, 84px) 0;
    background-color: transparent !important;
}

#equipo .team-grid,
#equipo .team-grid-six {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
}

#equipo .team-grid .team-card,
#equipo .team-grid-six .team-card {
    width: auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 22px 22px;
    border: 1px solid var(--hm-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--hm-shadow);
    transition: transform 0.3s var(--hm-ease), box-shadow 0.3s ease, border-color 0.3s ease;
}

#equipo .team-card:hover {
    transform: translateY(-2px);
    border-color: #D6E0EA;
    box-shadow: 0 2px 4px rgba(10, 25, 47, 0.05), 0 18px 36px -20px rgba(10, 25, 47, 0.28);
}

#equipo .team-photo-frame {
    width: 128px;
    height: 128px;
    margin: 0 auto 18px;
}

#equipo .team-grid-six .team-card h3 {
    min-height: 0;
    margin: 0 0 6px;
    font-size: 1.08rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

#equipo .team-card span {
    margin-bottom: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: #3F7A1E;
}

#equipo .team-card p {
    margin: 0;
    max-width: 32ch;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--hm-muted);
}

#equipo .team-card__cta { padding-top: 16px; color: #3F7A1E; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1023px) {
    .hs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #equipo .team-grid, #equipo .team-grid-six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .hm-head { margin-bottom: 24px; }
    .hs-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .ht-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    #herramientas .tool-item { padding: 16px 8px 14px; }
    #herramientas .tool-item img { width: 36px; height: 36px; }
    #equipo .team-grid, #equipo .team-grid-six { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .hs-card, #herramientas .tool-item, #equipo .team-card, .hm-link i { transition: none; }
    .hs-card--skeleton { animation: none; }
}

/* Equipo del inicio: tres perfiles y el botón que lleva al directorio */
#equipo .team-grid--tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.he-actions { display: flex; justify-content: center; margin-top: 30px; }
.he-actions .btn-ld--outline { color: var(--primary-blue); border-color: rgba(0, 45, 90, 0.25); }
.he-actions .btn-ld--outline:hover { background: rgba(0, 45, 90, 0.05); }
@media (max-width: 900px) { #equipo .team-grid--tres { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { #equipo .team-grid--tres { grid-template-columns: minmax(0, 1fr); } .he-actions .btn-ld { width: 100%; justify-content: center; } }
