/* ------------------------------------------------------------
   HERO
   ------------------------------------------------------------ */

.lg-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--lg-teal) 0%, var(--lg-teal-dark) 55%, #07434A 100%);
    color: #fff;
    padding: clamp(3rem, 7vw, 5rem) 0 clamp(5.5rem, 9vw, 7.5rem);
}

.lg-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .14) 1.5px, transparent 1.5px);
    background-size: 18px 18px;
    mask-image: radial-gradient(ellipse at 50% 0%, black, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black, transparent 75%);
    pointer-events: none;
}

/* Rutas decorativas animadas */
.lg-hero-routes {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: .3;
}

.lg-hero-routes path {
    fill: none;
    stroke: #fff;
    stroke-width: 1.5;
    stroke-dasharray: 6 10;
    animation: lgDash 22s linear infinite;
}

.lg-hero-routes path:nth-child(2) { animation-duration: 30s; }
.lg-hero-routes path:nth-child(3) { animation-duration: 26s; animation-direction: reverse; }

@keyframes lgDash {
    to { stroke-dashoffset: -320; }
}

.lg-hero-node {
    fill: var(--lg-magenta);
    stroke: rgba(255, 255, 255, .7);
    stroke-width: 1.5;
}

.lg-hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 780px;
    margin: 0 auto;
}

.lg-hero .lg-eyebrow {
    color: rgba(255, 255, 255, .85);
}

.lg-hero .lg-eyebrow::before {
    background: #fff;
    opacity: .6;
}

.lg-hero-title {
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.08;
    font-size: clamp(2rem, 5.5vw, 3.4rem);
    margin-bottom: .85rem;
    text-wrap: balance;
}

.lg-hero-sub {
    color: rgba(255, 255, 255, .82);
    font-size: clamp(.95rem, 1.6vw, 1.1rem);
    max-width: 52ch;
    margin: 0 auto clamp(1.75rem, 3vw, 2.25rem);
}

/* Tarjeta de rastreo del hero */
.lg-hero-track {
    background: var(--lg-surface);
    border: 1px solid var(--lg-mist);
    border-radius: 20px;
    padding: clamp(1.1rem, 2.5vw, 1.6rem);
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
    box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .45);
}

.lg-hero-track-label {
    font-family: var(--lg-font-mono);
    font-size: .66rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--lg-ink-soft);
    margin-bottom: .75rem;
    display: block;
}

.lg-hero-track .lg-provider-toggle {
    margin-bottom: .75rem;
}

/* Métricas bajo el hero */
.lg-hero-stats {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(1.5rem, 5vw, 3.5rem);
    margin-top: clamp(2rem, 4vw, 2.75rem);
}

.lg-hero-stat {
    text-align: center;
}

.lg-hero-stat b {
    display: block;
    font-family: var(--lg-font-mono);
    font-size: clamp(1.25rem, 2.6vw, 1.7rem);
    font-weight: 600;
    line-height: 1;
}

.lg-hero-stat span {
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .7);
}

/* ------------------------------------------------------------
   Accesos rápidos (montados sobre el hero)
   ------------------------------------------------------------ */

.lg-quick {
    position: relative;
    z-index: 3;
    margin-top: clamp(-4rem, -6vw, -3rem);
}

.lg-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 1.25rem;
    justify-content: center;
}

@media (max-width: 767.98px) {
    .lg-quick-grid {
        grid-template-columns: 1fr;
    }
}

.lg-quick-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--lg-surface);
    border: 1px solid var(--lg-mist);
    border-radius: 18px;
    padding: 1.4rem;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 34px -20px rgba(0, 0, 0, .35);
    transition: transform .22s var(--lg-ease-out), border-color .22s var(--lg-ease-out), box-shadow .22s var(--lg-ease-out);
}

.lg-quick-card::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--lg-magenta);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform .28s var(--lg-ease-out);
}

.lg-quick-card:hover {
    transform: translateY(-4px);
    border-color: var(--lg-teal);
    box-shadow: 0 22px 44px -20px rgba(19, 131, 142, .5);
}

.lg-quick-card:hover::after {
    transform: scaleY(1);
}

.lg-quick-icon {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    background: var(--lg-teal-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--lg-teal);
    font-size: 1.25rem;
}

.lg-quick-body h5 {
    font-weight: 700;
    font-size: 1.02rem;
    margin-bottom: .25rem;
    color: var(--lg-ink);
}

.lg-quick-body p {
    color: var(--lg-ink-soft);
    font-size: .88rem;
    margin: 0;
}

.lg-quick-arrow {
    margin-left: auto;
    align-self: center;
    color: var(--lg-ink-soft);
    transition: transform .22s var(--lg-ease-out), color .22s var(--lg-ease-out);
}

.lg-quick-card:hover .lg-quick-arrow {
    transform: translateX(4px);
    color: var(--lg-teal);
}

/* ------------------------------------------------------------
   SERVICIOS
   ------------------------------------------------------------ */

.lg-svc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 991.98px) {
    .lg-svc-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575.98px) {
    .lg-svc-grid { grid-template-columns: 1fr; }
}

.lg-svc-card {
    background: var(--lg-surface);
    border: 1px solid var(--lg-mist);
    border-radius: 18px;
    padding: 1.4rem;
    position: relative;
    overflow: hidden;
    height: 100%;
    transition: transform .22s var(--lg-ease-out), border-color .22s var(--lg-ease-out), box-shadow .22s var(--lg-ease-out);
}

.lg-svc-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, var(--lg-teal-light), transparent 55%);
    opacity: 0;
    transition: opacity .28s var(--lg-ease-out);
    pointer-events: none;
}

.lg-svc-card:hover {
    transform: translateY(-4px);
    border-color: var(--lg-teal);
    box-shadow: 0 20px 40px -22px rgba(19, 131, 142, .55);
}

.lg-svc-card:hover::before {
    opacity: 1;
}

.lg-svc-media {
    position: relative;
    width: 74px;
    height: 74px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--lg-mist);
    flex-shrink: 0;
}

.lg-svc-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s var(--lg-ease-out);
}

.lg-svc-card:hover .lg-svc-media img {
    transform: scale(1.08);
}

.lg-svc-num {
    position: absolute;
    top: 1.4rem;
    right: 1.4rem;
    font-family: var(--lg-font-mono);
    font-size: .7rem;
    color: var(--lg-ink-soft);
    opacity: .5;
}

.lg-svc-card h5 {
    position: relative;
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--lg-ink);
    margin-bottom: .4rem;
}

.lg-svc-card p {
    position: relative;
    color: var(--lg-ink-soft);
    font-size: .88rem;
    margin: 0;
    line-height: 1.55;
}

/* ------------------------------------------------------------
   CAPACIDADES (squares)
   ------------------------------------------------------------ */

.lg-cap-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

@media (max-width: 991.98px) {
    .lg-cap-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 575.98px) {
    .lg-cap-grid { grid-template-columns: repeat(2, 1fr); }
}

.lg-cap {
    text-align: center;
    padding: 1.25rem .75rem;
    border-radius: 16px;
    border: 1px solid transparent;
    transition: border-color .22s var(--lg-ease-out), background-color .22s var(--lg-ease-out), transform .22s var(--lg-ease-out);
}

.lg-cap:hover {
    border-color: var(--lg-mist);
    background: var(--lg-paper);
    transform: translateY(-3px);
}

.lg-cap-box {
    width: 62px;
    height: 62px;
    margin: 0 auto .85rem;
    border-radius: 16px;
    background: var(--lg-teal-light);
    border: 1px solid var(--lg-mist);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform .28s var(--lg-ease-out);
}

.lg-cap:hover .lg-cap-box {
    transform: rotate(-4deg) scale(1.05);
}

.lg-cap-box::after {
    content: "";
    position: absolute;
    top: -3px;
    right: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lg-magenta);
    opacity: 0;
    transition: opacity .22s var(--lg-ease-out);
}

.lg-cap:hover .lg-cap-box::after {
    opacity: 1;
}

.lg-cap h5 {
    font-family: var(--lg-font-mono);
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--lg-teal);
    font-weight: 600;
    margin-bottom: .4rem;
}

.lg-cap p {
    font-size: .8rem;
    color: var(--lg-ink-soft);
    margin: 0;
    line-height: 1.5;
}

/* ------------------------------------------------------------
   CONTACTO (layout propio de home)
   ------------------------------------------------------------ */

.lg-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 991.98px) {
    .lg-contact-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   Accesibilidad
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {

    .lg-hero-routes path,
    .lg-circle-media::after {
        animation: none;
    }

    .lg-quick-card:hover,
    .lg-svc-card:hover,
    .lg-cap:hover,
    .lg-circle-item:hover .lg-circle-media,
    .lg-cap:hover .lg-cap-box,
    .lg-svc-card:hover .lg-svc-media img,
    .lg-quick-card:hover .lg-quick-arrow {
        transform: none;
    }

    .lg-kam-panel {
        animation: none;
    }
}

@media (hover: none) {

    .lg-quick-card:hover,
    .lg-svc-card:hover,
    .lg-cap:hover,
    .lg-circle-item:hover .lg-circle-media {
        transform: none;
    }
}
