/* --- Variables Corporativas Locales --- */
:root {
    --color-primary: #0d47a1;
    /* Azul StyleWall */
    --color-dark: #18181b;
    /* Zinc-950 */
    --color-text: #52525b;
    /* Zinc-600 */
    --color-bg-light: #f8fafc;
    /* Zinc-50 */
    --color-border: #e4e4e7;
    /* Zinc-200 */

    /* Marcas */
    --brand-move: #0d47a1;
    --brand-smart: #2e7d32;
    --brand-vision: #e65100;
    --brand-joint: #e97132;

    /* Marcas (colores específicos usados en la línea del tiempo) */
    --brand-styleglass: #4ab3f4;
    --brand-stylespace: #f80424;

    --spacing-section: 6rem;
}

/* --- Estilos Generales --- */
.nosotros-main {
    overflow-x: hidden;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-section) 1.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
    text-align: center;
}

.text-muted {
    color: var(--color-text);
    line-height: 1.7;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
}

.full-width-bg {
    background-color: var(--color-bg-light);
    width: 100%;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 70vh;
    min-height: 500px;
    background-image: url('/img/hero-nosotros-mobile.webp');
    /* Asegúrate de tener esta imagen o cambiar la ruta */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    margin-top: -80px;
    /* Compensa el header fijo */
    padding-top: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(9, 9, 11, 0.7), rgba(9, 9, 11, 0.9));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
    text-align: justify;
    text-align-last: center;
}

/* --- Historia y Estadísticas --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.stats-card {
    text-align: center;
    padding: 2rem;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -15px rgba(13, 71, 161, 0.1);
    border-color: var(--color-primary);
}

.stats-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
}

/* --- Fundadores --- */
.founders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    justify-content: center;
}

.founder-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.founder-card:hover {
    transform: translateY(-5px);
}

.founder-image-container img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: top;
}

.founder-info {
    padding: 2rem;
    text-align: center;
}

.founder-info h3 {
    font-size: 1.5rem;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.founder-role {
    color: var(--color-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

/* --- Valores y Sectores (Grid Cards) --- */
.values-grid,
.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.value-card,
.sector-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.value-card:hover,
.sector-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 10px 30px -10px rgba(13, 71, 161, 0.15);
    transform: translateY(-5px);
}

.value-icon,
.sector-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    background: var(--color-bg-light);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
}

.value-card h3,
.sector-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-dark);
}

/* --- Proceso --- */
.process-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
}

.process-grid::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-border);
    z-index: 0;
    display: none;
    /* Oculto en móvil */
}

@media (min-width: 1024px) {
    .process-grid::before {
        display: block;
    }
}

.process-step {
    flex: 1;
    min-width: 180px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.process-icon {
    background: white;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 0 0 8px var(--color-bg-light);
}

.process-step h4 {
    color: var(--color-dark);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* --- Línea de Tiempo Vertical --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Línea central */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: var(--color-border);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    width: 50%;
    padding: 0 3rem;

    /* Color por defecto (Stylewall) para marcas/indicadores */
    --timeline-accent: var(--color-primary);
}

/* Alternancia Izquierda / Derecha */
.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

/* Punto en la línea */
.timeline-item::after {
    content: '';
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background: var(--timeline-accent);
    border: 4px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
    z-index: 2;
}

.timeline-item:nth-child(odd)::after {
    right: -11.5px;
}

.timeline-item:nth-child(even)::after {
    left: -11.5px;
}

.timeline-year {
    display: inline-block;
    background: var(--timeline-accent);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Línea del tiempo: color de marcas por sistema */
.timeline-item.timeline-styleglass {
    --timeline-accent: var(--brand-styleglass);
}

.timeline-item.timeline-stylespace {
    --timeline-accent: var(--brand-stylespace);
}

.timeline-item.timeline-stylesmart {
    --timeline-accent: var(--brand-smart);
}

.timeline-item.timeline-stylevision {
    --timeline-accent: var(--brand-vision);
}

.timeline-item.timeline-stylemove {
    --timeline-accent: var(--brand-move);
}

.timeline-item.timeline-stylejoint {
    --timeline-accent: var(--brand-joint);
}

.timeline-item h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

/* --- Soluciones Complementarias --- */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.solution-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease;
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.solution-img-wrapper {
    height: 220px;
    overflow: hidden;
}

.solution-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.solution-card:hover .solution-img {
    transform: scale(1.05);
}

.solution-body {
    padding: 1.5rem;
}

.solution-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

/* --- Colores de Marca Específicos --- */
.brand-name {
    font-weight: 700;
    color: var(--color-dark);
}

.brand-styleglass {
    color: var(--brand-styleglass);
}

.brand-stylesmart {
    color: var(--brand-smart);
}

.brand-stylevision {
    color: var(--brand-vision);
}

.brand-stylemove {
    color: var(--brand-move);
}

.brand-stylejoint {
    color: var(--brand-joint);
}

.brand-stylespace {
    color: var(--brand-stylespace);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-container {
        padding: 4rem 1rem;
    }

    /* Timeline en móvil: todo a la izquierda */
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
        text-align: left;
    }

    .timeline-item:nth-child(odd) {
        text-align: left;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item::after {
        left: 10px;
        right: auto;
    }

    .timeline-item:nth-child(odd)::after {
        left: 10px;
    }
}

:root {
    /* Fallback alto para evitar que el contenido se oculte antes de medir el header */
    --header-offset: 220px;
}

header {
    margin-bottom: clamp(1rem, 3vh, 2.5rem);
}