/* ================================================================
   SISCAM - Hoja de estilos principal
   Metodología: iterativo e incremental (Iteración 1 - Landing page)
   Convención: BEM (Block__Element--Modifier) para nombrar clases
   ================================================================ */

/* ----------------------------------------------------------------
   1. TOKENS DE DISEÑO (paleta de marca extraída del logo SISCAM)
---------------------------------------------------------------- */
:root {
    --color-navy-900: #0F1444;
    --color-navy-800: #161B52;
    --color-navy-700: #1E2568;
    --color-red-600:  #C21F26;
    --color-red-700:  #A0181E;
    --color-gold-400: #F2C84B;
    --color-bg-light: #F4F5F9;
    --color-bg-card:  #FFFFFF;
    --color-text-dark: #1D2233;
    --color-text-muted: #5B6072;
    --color-white: #FFFFFF;

    --font-heading: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    --font-body: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;

    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(15, 20, 68, 0.08);
    --shadow-md: 0 6px 20px rgba(15, 20, 68, 0.12);

    --transition-base: 0.2s ease-in-out;
}

/* ----------------------------------------------------------------
   2. RESET LIGERO Y BASE
---------------------------------------------------------------- */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--color-white);
    margin: 0;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Accesibilidad: enlace para saltar al contenido */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--color-red-600);
    color: var(--color-white);
    padding: 0.75rem 1.25rem;
    z-index: 2000;
    border-radius: 0 0 var(--radius-md) 0;
}

.skip-link:focus {
    left: 0;
}

/* Foco visible consistente para navegación con teclado */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--color-gold-400);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

/* ----------------------------------------------------------------
   3. HEADER / NAVBAR
---------------------------------------------------------------- */
.site-header {
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* Compensa la altura del header sticky (~142px) al saltar a un ancla,
   para que la sección no quede tapada y el scroll-spy detecte bien
   cuál es la sección activa. */
#inicio,
#nosotros,
#servicios,
#contacto {
    scroll-margin-top: 150px;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 0.5rem;
}

/* ESPACIO RESERVADO: contenedor del logotipo (imagen) */
.logo-img {
    height: 100px;
    width: auto;
}

/* Agrupa el menú y el botón CTA, y los ancla al borde derecho del header */
.navbar-collapse {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.75rem;
}

.main-nav {
    display: flex;
    gap: 1.75rem;
    margin: 0;
}

.main-nav .nav-link {
    display: inline-block;
    background-color: var(--color-navy-900);
    color: var(--color-white);
    font-weight: 600;
    line-height: 1.5;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-base), transform var(--transition-base), color var(--transition-base);
    -webkit-tap-highlight-color: transparent;
}

.main-nav .nav-link:hover,
.main-nav .nav-link:focus-visible {
    background-color: var(--color-navy-700);
    color: var(--color-white);
    transform: translateY(-1px);
}

.main-nav .nav-link:active {
    color: var(--color-red-600);
    font-weight: 700;
}

.main-nav .nav-link.active {
    color: var(--color-red-600);
    font-weight: 700;
}

.btn-cta {
    background-color: var(--color-red-600);
    color: var(--color-white);
    font-weight: 600;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-base), transform var(--transition-base);
    white-space: nowrap;
}

.btn-cta:hover,
.btn-cta:focus-visible {
    background-color: var(--color-red-700);
    color: var(--color-white);
    transform: translateY(-1px);
}

/* ----------------------------------------------------------------
   4. HERO
---------------------------------------------------------------- */
.hero {
    background-color: var(--color-navy-900);
    color: var(--color-white);
    overflow: hidden;
}

.hero-text-col {
    padding: 3.5rem 1rem 3.5rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.35;
    margin-bottom: 1.25rem;
}

.text-brand-red {
    color: var(--color-red-600);
}

.text-brand-gold {
    color: var(--color-gold-400);
}

.hero-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    max-width: 46ch;
}

/* ESPACIO RESERVADO: contenedor de la fotografía del equipo */
.hero-image-col {
    position: relative;
    min-height: 320px;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* ----------------------------------------------------------------
   5. BARRA DE CONTACTO RÁPIDO
---------------------------------------------------------------- */
.contact-card {
    /* Altura reducida ~0.5cm respecto a la versión anterior (1.75rem → 1.15rem) */
    padding: 1.15rem 2rem;
    text-align: center;
}

.contact-card--navy {
    background-color: var(--color-navy-800);
    color: var(--color-white);
}

.contact-card--red {
    background-color: var(--color-red-600);
    color: var(--color-white);
}

.contact-card__icon {
    width: 42px;
    height: 42px;
    margin: 0 auto 0.6rem;
    color: var(--color-white);
}

.contact-card__icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-card__title {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.contact-card__text {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.9rem;
}

.contact-card__phone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-white);
}

.btn-outline-light-cta {
    display: inline-block;
    background-color: var(--color-navy-900);
    color: var(--color-white);
    font-weight: 600;
    padding: 0.55rem 1.3rem;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-base);
}

.btn-outline-light-cta:hover,
.btn-outline-light-cta:focus-visible {
    background-color: var(--color-navy-700);
    color: var(--color-white);
}

/* ----------------------------------------------------------------
   6. SECCIÓN "SOBRE SISCAM" (5 tarjetas)
---------------------------------------------------------------- */
.about-grid {
    background-color: var(--color-bg-light);
    padding: 1.5rem 0;
}

.about-card {
    padding: 1rem 0.85rem;
    border-right: 1px solid #E3E5EE;
}

.about-card:last-child {
    border-right: none;
}

.about-card__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.65rem;
    color: var(--color-navy-900);
}

.about-card__icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.about-card__title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.6rem;
}

.about-card__text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.about-checklist{
    list-style: none;
    padding-left: 20px;
}

.about-checklist__item{
    font-size: 0.8rem;
    color: #4a4a4a;
    margin-bottom: 3px;
    line-height: 1.5;
}

.about-card__link {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-red-600);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.about-card__link:hover,
.about-card__link:focus-visible {
    text-decoration: underline;
}

/* ----------------------------------------------------------------
   7. FLUJO DE SERVICIOS / FLUJO DE PERSONAL
---------------------------------------------------------------- */
.flow-section {
    padding: 1.5rem 0 2rem;
}

.flow-title {
    text-align: center;
    font-size: 1.4rem;
    color: var(--color-navy-900);
    margin-bottom: 1.5rem;
}

.flow-col--servicios {
    border-right: 4px solid var(--color-red-600);
}

.flow-col--personal {
    border-left: 4px solid var(--color-navy-900);
}

/* Separación mínima (~1mm) entre ambas líneas centrales para que no se toquen */
@media (min-width: 992px) {
    .col-lg-6.flow-col--personal {
        width: calc(50% - 4px);
        margin-left: 4px;
    }
}

.flow-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    /* Espacio suficiente para que la nueva flecha respire entre pasos */
    gap: 2.25rem;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 130px;
    position: relative;
    padding-inline: 0.5rem;
}

/* Flecha conectora entre pasos: una sola pieza sólida con forma de flecha
   (en vez de línea + triángulo separados), centrada verticalmente con el
   ícono (52px de alto → centro a 26px). */
.flow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -30px;
    width: 26px;
    height: 12px;
    background-color: var(--color-navy-900);
    clip-path: polygon(0% 32%, 58% 32%, 58% 8%, 100% 50%, 58% 92%, 58% 68%, 0% 68%);
}

.flow-steps--accent .flow-step:not(:last-child)::after {
    background-color: var(--color-red-600);
}

.flow-step__icon {
    width: 52px;
    height: 52px;
    background-color: var(--color-navy-900);
    color: var(--color-white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
}

.flow-step__icon--accent {
    background-color: var(--color-red-600);
}

.flow-step__icon svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.flow-step__text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-dark);
}

/* ----------------------------------------------------------------
   8. FOOTER
---------------------------------------------------------------- */
.site-footer {
    background-color: var(--color-navy-900);
    color: rgba(255, 255, 255, 0.85);
    padding: 3rem 0 1.5rem;
}

.footer-heading {
    font-size: 1.1rem;
    color: var(--color-white);
    margin-bottom: 1rem;
}

.footer-col {
    border-right: 4px solid var(--color-red-600);
}

.footer-col:last-child {
    border-right: none;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.footer-item a:hover,
.footer-item a:focus-visible {
    text-decoration: underline;
}

.social-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.social-list li {
    margin-bottom: 0.6rem;
}

.social-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.icon-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: var(--color-white);
}

.icon-social svg {
    width: 16px;
    height: 16px;
}

.icon-social--facebook {
    background-color: #1877F2;
}

.icon-social--instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.icon-social--whatsapp {
    background-color: #25D366;
}

.icon-phone::before { content: "\260E"; margin-right: 0.15rem; }
.icon-mail::before { content: "\2709"; margin-right: 0.15rem; }
.icon-pin::before { content: "\1F4CD"; margin-right: 0.15rem; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 2rem;
    padding-top: 1.25rem;
    text-align: center;
    font-size: 0.8rem;
}

/* ----------------------------------------------------------------
   9. RESPONSIVE: breakpoints adicionales
---------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .about-card {
        border-right: none;
        border-bottom: 1px solid #E3E5EE;
    }

    /* El menú se abre como un panel flotante (dropdown) anclado bajo
       el botón de hamburguesa, en vez de empujar el contenido hacia
       abajo como una expansión en línea. */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        right: 1rem;
        margin-top: 0.5rem;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.25rem;
        background-color: var(--color-white);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-md);
        min-width: 240px;
        z-index: 1040;
    }

    .main-nav {
        flex-direction: column;
        gap: 0.5rem;
        margin: 0;
        width: 100%;
    }

    .navbar-collapse .btn-cta {
        width: 100%;
        text-align: center;
        white-space: normal;
    }

    .flow-steps {
        flex-wrap: wrap;
        row-gap: 1.5rem;
    }

    .flow-step:not(:last-child)::after {
        display: none;
    }

    .flow-col--servicios {
        border-right: none;
        border-bottom: 4px solid var(--color-red-600);
        padding-bottom: 1.5rem;
    }

    .flow-col--personal {
        border-left: none;
        border-top: 4px solid var(--color-navy-900);
        padding-top: 1.5rem;
        margin-top: 4px;
    }
}

@media (max-width: 767.98px) {
    .hero-text-col {
        padding: 2.5rem 0.25rem;
        text-align: center;
        align-items: center;
    }

    .contact-card {
        padding: 1.5rem 1rem;
    }

    .footer-col {
        border-right: none;
        border-bottom: 4px solid var(--color-red-600);
        padding-bottom: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .footer-col:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }
}
