/* ==========================================================================
   TTRANSPORTO - INTRANET CORPORATIVA
   Diseño moderno, división angular y layout alternado
   ========================================================================== */

:root {
    --primary: #ed1c24;
    --primary-dark: #c9141b;
    --primary-light: #fde8e9;
    --dark: #102d36;
    --dark-surface: #0a1e24;
    --bg-light: #faf9f5;
    --bg-cream: #f3f1ec;
    --white: #ffffff;
    --text-main: #102d36;
    --text-muted: #657073;
    --text-light: #b9c2c0;
    --border: rgba(16, 45, 54, 0.1);
    --border-dark: rgba(255, 255, 255, 0.12);
    --radius-sm: 6px;
    --radius-md: 12px;
    --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    background-color: var(--bg-cream);
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #0e242b;
}

/* Barra de scroll personalizada (Colores del logo Ttransporto) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0e242b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff2a31 0%, #ed1c24 60%, #c9141b 100%);
    border-radius: 999px;
    border: 2px solid #0e242b;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff454b 0%, #ff232a 50%, #ed1c24 100%);
    box-shadow: 0 0 10px rgba(237, 28, 36, 0.6);
}

::-webkit-scrollbar-thumb:active {
    background: #c9141b;
}

::-webkit-scrollbar-corner {
    background: #0e242b;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-cream);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* ==========================================================================
   TOPBAR
   ========================================================================== */

.topbar {
    height: 80px;
    padding: 0 clamp(24px, 7vw, 100px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(250, 249, 245, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 10;
}

.brand {
    display: inline-flex;
    align-items: center;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--dark);
    text-decoration: none;
    line-height: 1;
}

.brand-logo {
    height: 48px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
    display: block;
    transition: transform 0.22s ease;
    image-rendering: -webkit-optimize-contrast;
}

.brand:hover .brand-logo {
    transform: scale(1.04);
}

.mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-right: 9px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-weight: 800;
    font-style: italic;
    font-size: 1.05rem;
}

.dot {
    color: var(--primary);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 8px 16px;
    background: rgba(16, 45, 54, 0.05);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.back-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* ==========================================================================
   HERO INTRANET
   ========================================================================== */

.hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 100px clamp(24px, 10vw, 160px);
    background: linear-gradient(135deg, #0d252d 0%, #102d36 60%, #173d49 100%);
    color: var(--white);
    z-index: 1;
}

.hero-image {
    position: absolute;
    inset: 0 0 0 32%;
    background: linear-gradient(90deg, #0d252d 0%, rgba(13, 37, 45, 0.92) 16%, rgba(13, 37, 45, 0.22) 52%, rgba(13, 37, 45, 0.05) 100%),
                linear-gradient(0deg, #0d252d 0%, rgba(13, 37, 45, 0.4) 10%, transparent 30%),
                url('../images/unidades-ttransporto.png') right bottom / cover no-repeat;
    opacity: 0.95;
    pointer-events: none;
    image-rendering: -webkit-optimize-contrast;
    will-change: transform, opacity;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

.eyebrow {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-size: clamp(2.4rem, 4.8vw, 3.8rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
    font-weight: 800;
    margin: 0.5rem 0 1.2rem;
}

.hero h1 em {
    color: var(--primary);
    font-style: normal;
}

.hero-lead {
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 520px;
}

/* ==========================================================================
   PLATAFORMAS (DIVISIONES ANGULARES SEGÚN BOCETO)
   ========================================================================== */

.platforms-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    background-color: var(--dark);
    overflow: hidden;
}

.platform {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 540px;
    min-height: 540px;
    padding: 0 clamp(28px, 10vw, 160px);
    overflow: hidden;
    cursor: default;
    transition: background-color 0.45s ease, box-shadow 0.45s ease;
}

/* 1. TRACKING (Texto Izquierda / Foto Derecha, corte diagonal inferior) */
.platform.tracking {
    background-color: #faf9f5;
    color: var(--dark);
    z-index: 1;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 48px), 0 100%);
}

.tracking .photo {
    position: absolute;
    inset: 0 0 0 44%;
    background-image: linear-gradient(90deg, #faf9f5 0%, rgba(250, 249, 245, 0.8) 25%, rgba(250, 249, 245, 0.05) 100%),
                      url('../images/tracking-banner.png');
    background-position: center right;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.95;
    pointer-events: none;
    transition: transform 0.4s ease;
}

.platform.assistance {
    background-color: #f3f1ec;
    color: var(--dark);
    z-index: 2;
    margin-top: -48px;
    margin-bottom: -48px;
    clip-path: polygon(0 48px, 100% 0, 100% 100%, 0 calc(100% - 48px));
}

.assistance .photo {
    position: absolute;
    inset: 0 44% 0 0;
    background-image: linear-gradient(-90deg, #f3f1ec 0%, rgba(243, 241, 236, 0.8) 25%, rgba(243, 241, 236, 0.05) 100%),
                      url('../images/asistencia-banner.png');
    background-position: center left;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.95;
    pointer-events: none;
    transition: transform 0.4s ease;
}

/* 3. GUÍAS (Texto Izquierda / Foto Derecha, corte angular superior) */
.platform.guides {
    background-color: #102d36;
    color: #ffffff;
    z-index: 3;
    clip-path: polygon(0 0, 100% 48px, 100% 100%, 0 100%);
}

.guides .photo {
    position: absolute;
    inset: 0 0 0 44%;
    background-image: linear-gradient(90deg, #102d36 0%, rgba(16, 45, 54, 0.85) 25%, rgba(16, 45, 54, 0.1) 100%),
                      url('../images/guias-banner.png');
    background-position: center right;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.95;
    pointer-events: none;
    transition: transform 0.4s ease;
}

/* Hover de Plataforma */
.platform:hover .photo {
    transform: scale(1.03);
}

.platform.tracking:hover {
    background-color: #ffffff;
}

.platform.assistance:hover {
    background-color: #fbf9f4;
}

.platform.guides:hover {
    background-color: #0c232a;
}

/* Contenido */
.content {
    position: relative;
    z-index: 3;
    max-width: 580px;
}

.content-right {
    margin-left: auto;
    text-align: left;
}

.platform-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.content h2 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 3.4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
}

.content p {
    max-width: 480px;
    margin: 0 0 20px;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

.guides .content p {
    color: var(--text-light);
}

.enter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary);
    transition: var(--transition);
}

.platform:hover .enter-btn {
    gap: 12px;
}

/* ==========================================================================
   PUNTERO DINÁMICO FLOTANTE & VIAJERO (HIGH-IMPACT UI)
   ========================================================================== */

.dynamic-pointer {
    position: absolute;
    top: 0;
    left: 0;
    width: 86px;
    height: 86px;
    z-index: 20;
    cursor: pointer;
    user-select: none;
    pointer-events: auto;
    will-change: transform, opacity;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.3s ease;
}

/* Anillos de Radar/Pulso Lumínico Continuo */
.pointer-radar-pulse {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(237, 28, 36, 0.6);
    pointer-events: none;
    opacity: 0;
    animation: pointerRadarPulse 2.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.pointer-radar-pulse.pulse-delay {
    animation-delay: 1.4s;
}

@keyframes pointerRadarPulse {
    0% {
        transform: scale(0.85);
        opacity: 0.85;
    }
    50% {
        opacity: 0.35;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Núcleo Central del Puntero */
.pointer-core {
    position: relative;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff232a 0%, #d81219 55%, #b50b11 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    box-shadow: 0 14px 36px rgba(237, 28, 36, 0.46),
                0 0 0 5px rgba(255, 255, 255, 0.95),
                inset 0 2px 4px rgba(255, 255, 255, 0.4);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.35s ease;
}

.pointer-arrow {
    display: block;
    color: #ffffff;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pointer-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    color: #ffffff;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: transform 0.35s ease, letter-spacing 0.35s ease;
}

/* Micro-interacción de Hover */
.dynamic-pointer:hover .pointer-core {
    transform: scale(1.09);
    box-shadow: 0 18px 48px rgba(237, 28, 36, 0.62),
                0 0 0 6px rgba(255, 255, 255, 1),
                inset 0 2px 5px rgba(255, 255, 255, 0.5);
}

.dynamic-pointer:hover .pointer-arrow {
    transform: translate(3px, -3px) scale(1.08);
}

.dynamic-pointer:hover .pointer-label {
    letter-spacing: 0.12em;
}

/* Micro-interacción de Click/Press */
.dynamic-pointer:active .pointer-core {
    transform: scale(0.96);
    box-shadow: 0 8px 24px rgba(237, 28, 36, 0.4),
                0 0 0 4px rgba(255, 255, 255, 0.9);
}

/* Anclajes de posición invisible por tarjeta */
.pointer-anchor {
    position: absolute;
    width: 86px;
    height: 86px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.pointer-anchor-right {
    right: clamp(40px, 11vw, 170px);
}

.pointer-anchor-left {
    left: clamp(40px, 11vw, 170px);
}

/* ==========================================================================
   FOOTER INTRANET
   ========================================================================== */

.intranet-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 56px clamp(24px, 7vw, 100px);
    background-color: #0c1e24;
    color: var(--text-light);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 10;
}

.intranet-footer strong {
    color: #ffffff;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #a4b4b8;
    font-size: 0.8rem;
}

/* ==========================================================================
   RESPONSIVIDAD
   ========================================================================== */

@media (max-width: 768px) {
    .topbar {
        padding: 0 20px;
    }

    .hero {
        min-height: auto;
        padding: 70px 24px 60px;
    }

    .hero-image {
        inset: 0 !important;
        width: 100%;
        height: 100%;
        background: linear-gradient(180deg, 
            rgba(13, 37, 45, 0.90) 0%, 
            rgba(13, 37, 45, 0.82) 45%, 
            rgba(13, 37, 45, 0.92) 100%),
            url('../images/unidades-ttransporto.png') center / cover no-repeat;
        opacity: 1 !important;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero h1 {
        font-size: 2.15rem;
        line-height: 1.15;
        margin-bottom: 1rem;
    }

    .hero-lead {
        font-size: 0.98rem;
        line-height: 1.6;
        color: #d2dbd9;
    }

    .platform {
        height: auto;
        min-height: 420px;
        padding: 48px 24px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 0;
        clip-path: none !important;
        margin: 0 !important;
        position: relative;
        border-bottom: 1px solid rgba(16, 45, 54, 0.08);
    }

    .platform.tracking {
        padding-bottom: 48px;
    }

    .platform.assistance {
        min-height: 440px;
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .platform.guides {
        padding-top: 48px;
        padding-bottom: 48px;
        border-bottom: none;
    }

    .photo {
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        opacity: 1 !important;
    }

    .tracking .photo {
        background-image: linear-gradient(180deg, 
            rgba(250, 249, 245, 0.92) 0%, 
            rgba(250, 249, 245, 0.85) 50%, 
            rgba(250, 249, 245, 0.76) 100%),
            url('../images/tracking-banner.png');
        background-position: center right !important;
        background-size: cover !important;
    }

    .assistance .photo {
        background-image: linear-gradient(180deg, 
            rgba(243, 241, 236, 0.93) 0%, 
            rgba(243, 241, 236, 0.86) 50%, 
            rgba(243, 241, 236, 0.78) 100%),
            url('../images/asistencia-banner.png');
        background-position: 85% 35% !important;
        background-size: cover !important;
    }

    .guides .photo {
        background-image: linear-gradient(180deg, 
            rgba(16, 45, 54, 0.92) 0%, 
            rgba(16, 45, 54, 0.85) 50%, 
            rgba(16, 45, 54, 0.90) 100%),
            url('../images/guias-banner.png');
        background-position: center 20% !important;
        background-size: cover !important;
    }

    .content {
        max-width: 100%;
        position: relative;
        z-index: 3;
    }

    .content h2 {
        font-size: 1.85rem;
        line-height: 1.2;
        margin-bottom: 12px;
        color: var(--dark);
    }

    .guides .content h2 {
        color: #ffffff;
    }

    .content p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 24px;
        color: #2c3e44;
        font-weight: 500;
    }

    .guides .content p {
        color: #d1dedc;
    }

    .enter-btn {
        display: inline-flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative;
        z-index: 5;
        align-items: center;
        gap: 10px;
        font-size: 0.82rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--primary);
        background: #ffffff;
        border: 1.5px solid rgba(237, 28, 36, 0.35);
        padding: 10px 20px;
        border-radius: 999px;
        box-shadow: 0 4px 14px rgba(16, 45, 54, 0.06);
        pointer-events: auto;
    }

    .guides .enter-btn {
        color: #ffffff;
        background: var(--primary);
        border-color: var(--primary);
        box-shadow: 0 4px 16px rgba(237, 28, 36, 0.35);
    }

    .assistance .content-right {
        margin-left: 0;
    }

    .dynamic-pointer {
        display: none !important;
    }

    .intranet-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 24px 20px;
    }
}