/* ==========================================================================
   SISTEMA DE DISEÑO & VARIABLES DE ISCA CLIMA
   ========================================================================== */
:root {
    /* Colores Principales (Basados en Blanco y Celeste) */
    --primary-color: #0284c7;        /* Celeste / Azul Cielo corporativo */
    --primary-hover: #0ea5e9;        /* Celeste vibrante para hover */
    --primary-light: #f0f9ff;        /* Fondo celeste muy suave */
    --primary-glow: rgba(2, 132, 199, 0.15);
    --secondary-color: #0c4a6e;      /* Azul oscuro para contraste y legibilidad */
    
    /* Colores Neutros */
    --bg-white: #ffffff;
    --bg-light: #f8fafc;             /* Gris azulado ultra claro */
    --text-dark: #0f172a;            /* Slate 900 para títulos */
    --text-muted: #475569;          /* Slate 600 para cuerpo de texto */
    --text-light: #94a3b8;           /* Slate 400 */
    
    /* Estados y Utilidades */
    --border-color: #e2e8f0;
    --border-focus: #38bdf8;
    --error-color: #ef4444;
    --success-color: #10b981;
    
    /* Fuentes */
    --font-headings: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Transiciones y Sombras */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(2, 132, 199, 0.08), 0 4px 6px -4px rgba(2, 132, 199, 0.08);
    --shadow-premium: 0 20px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    
    /* Bordes y Radios */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    
    /* Altura Header */
    --header-height: 80px;
}

/* Reseteo y Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-padding-top: var(--header-height);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
    background-color: var(--bg-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.25;
}

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

ul {
    list-style: none;
}

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

/* Layout y Contenedores */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Componentes de Encabezado de Sección */
.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 60px auto;
}

.section-subtitle {
    display: inline-block;
    font-family: var(--font-headings);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    background-color: var(--primary-light);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 16px;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* ==========================================================================
   BOTONES Y ELEMENTOS DE UI
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-headings);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--bg-white);
    border-color: var(--border-color);
    color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ==========================================================================
   HEADER / NAVEGACIÓN
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: transparent;
    z-index: 1000;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
}

.main-header .logo-text {
    color: var(--bg-white);
    transition: var(--transition-smooth);
}

.main-header .logo-text .accent-text {
    color: var(--primary-hover);
    transition: var(--transition-smooth);
}

.main-header .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.main-header .nav-link:hover, .main-header .nav-link.active {
    color: var(--bg-white);
}

.main-header .nav-link::after {
    background-color: var(--bg-white);
}

.main-header .mobile-toggle .bar {
    background-color: var(--bg-white);
}

.main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    height: 70px;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
}

.main-header.scrolled .logo-text {
    color: var(--secondary-color);
}

.main-header.scrolled .logo-text .accent-text {
    color: var(--primary-color);
}

.main-header.scrolled .nav-link {
    color: var(--text-muted);
}

.main-header.scrolled .nav-link:hover, .main-header.scrolled .nav-link.active {
    color: var(--primary-color);
}

.main-header.scrolled .nav-link::after {
    background-color: var(--primary-color);
}

.main-header.scrolled .mobile-toggle .bar {
    background-color: var(--text-dark);
}

.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.main-header.scrolled .logo-img {
    height: 44px;
}

.logo-link:hover .logo-img {
    transform: scale(1.05);
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
    transition: var(--transition-smooth);
}

.logo-link:hover .logo-icon {
    transform: rotate(20deg);
}

.logo-text {
    font-family: var(--font-headings);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Nav Menu */
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-family: var(--font-headings);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 6px 0;
    transition: var(--transition-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link.btn-header {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.nav-link.btn-header::after {
    display: none;
}

.nav-link.btn-header:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    color: var(--bg-white);
}

/* Hamburger Menu Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-toggle .bar {
    width: 100%;
    height: 2px;
    border-radius: var(--radius-full);
    transition: var(--transition-smooth);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    padding: 200px 0 140px 0;
    background-color: var(--secondary-color);
    overflow: hidden;
    color: var(--bg-white);
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(12, 74, 110, 0.88) 0%, rgba(3, 105, 161, 0.75) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 720px;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-headings);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: var(--primary-light);
    border: 1px solid rgba(2, 132, 199, 0.15);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.25rem;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    color: var(--bg-white);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 32px;
    color: rgba(255, 255, 255, 0.85);
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* Hero Visual stack */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-card-stack {
    position: relative;
    width: 320px;
    height: 320px;
}

.visual-card {
    position: absolute;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.card-primary {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #0369a1 100%);
    color: var(--bg-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    z-index: 3;
    top: 0;
    left: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-primary .card-icon {
    width: 64px;
    height: 64px;
    color: var(--primary-hover);
}

.card-primary h3 {
    color: var(--bg-white);
    font-size: 1.5rem;
}

.card-primary p {
    font-size: 0.875rem;
    opacity: 0.8;
}

.card-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.4) 0%, transparent 70%);
    top: -20px;
    right: -20px;
    pointer-events: none;
}

.card-glass-1 {
    width: 160px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    bottom: -10px;
    right: -10px;
    z-index: 4;
}

.card-glass-2 {
    width: 150px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    top: -20px;
    right: -40px;
    z-index: 2;
}

.stat-num {
    font-family: var(--font-headings);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Hover effects on hero visual */
.hero-visual:hover .card-glass-1 {
    transform: translate(5px, 5px);
}

.hero-visual:hover .card-glass-2 {
    transform: translate(-5px, -5px);
}

/* ==========================================================================
   SERVICES SECTION (3 CUADRADOS PRINCIPALES)
   ========================================================================== */
.services-section {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 32px;
    align-items: stretch;
}

.services-grid > * {
    grid-column: span 2;
}

/* Centrar la séptima tarjeta si hay exactamente 7 tarjetas en escritorio */
.services-grid > *:last-child:nth-child(7) {
    grid-column: 3 / span 2;
}

/* Centrar las últimas dos tarjetas si hay exactamente 8 tarjetas en escritorio */
.services-grid > *:nth-last-child(2):nth-child(7) {
    grid-column: 2 / span 2;
}

.services-grid > *:last-child:nth-child(8) {
    grid-column: 4 / span 2;
}

.service-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: transparent;
    transition: var(--transition-smooth);
}

.service-icon-wrapper {
    width: 64px;
    height: 64px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: var(--transition-smooth);
}

.service-icon {
    width: 32px;
    height: 32px;
}

.service-card-title {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--secondary-color);
}

.service-card-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    flex-grow: 1;
    list-style-type: none;
    padding-left: 0;
    margin-top: 0;
}

.service-card-description li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 8px;
    line-height: 1.35;
    text-align: left;
}

.service-card-description li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
    top: -2px;
}

.service-card-link {
    font-family: var(--font-headings);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

/* Hover effects */
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.service-card:hover::before {
    background-color: var(--primary-color);
}

.service-card:hover .service-icon-wrapper {
    background-color: var(--primary-color);
    color: var(--bg-white);
    transform: scale(1.1);
}

.service-card:hover .service-card-link {
    color: var(--primary-hover);
    transform: translateX(4px);
}

/* ==========================================================================
   ABOUT US SECTION
   ========================================================================== */
.about-section {
    padding: 100px 0;
    background-color: var(--bg-white);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-visual {
    display: flex;
    justify-content: center;
}

.about-visual-box {
    width: 100%;
    max-width: 440px;
    height: 360px;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(2, 132, 199, 0.03) 100%);
    border-radius: var(--radius-lg);
    position: relative;
    border: 1px dashed var(--primary-color);
    overflow: visible;
}

.about-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    z-index: 1;
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background-color: var(--secondary-color);
    color: var(--bg-white);
    padding: 18px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.exp-years {
    font-family: var(--font-headings);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary-hover);
    line-height: 1;
}

.exp-text {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    text-align: center;
    margin-top: 4px;
}

.quality-stamp {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.stamp-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.quality-stamp h4 {
    font-size: 0.95rem;
    font-weight: 700;
}

.about-content {
    max-width: 500px;
}

.about-text {
    font-size: 1.05rem;
    margin-bottom: 28px;
    text-align: justify;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feature-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.about-features span {
    font-weight: 500;
    color: var(--text-dark);
}

/* ==========================================================================
   COVERAGE SECTION (ANGOL - COQUIMBO)
   ========================================================================== */
.coverage-section {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.coverage-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: center;
}

.coverage-info {
    max-width: 480px;
}

.coverage-alert {
    display: flex;
    gap: 16px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: var(--radius-md);
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.alert-icon {
    width: 36px;
    height: 36px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.coverage-alert h4 {
    margin-bottom: 4px;
    color: var(--secondary-color);
}

.coverage-alert p {
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: justify;
}

.coverage-cities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.city-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.city-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-light);
    transition: var(--transition-smooth);
}

.city-item:hover, .city-item.active {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    transform: translateX(6px);
}

.city-item:hover .city-dot, .city-item.active .city-dot {
    background-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.2);
}

.city-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* Nuevos estilos para Cobertura Activa vs Histórica */
.coverage-group-title {
    font-family: var(--font-headings);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

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

.city-dot.dot-historical {
    background-color: #cbd5e1;
}

.city-item.historical-city:hover, .city-item.historical-city.active {
    border-color: var(--text-light);
    background-color: #f1f5f9;
}

.city-item.historical-city:hover .city-dot.dot-historical, .city-item.historical-city.active .city-dot.dot-historical {
    background-color: var(--text-muted);
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.15);
}

/* Silueta de Chile - Estilo Minimalista Sólido (Opción 5) */
.chile-silhouette-path {
    fill: #f1f5f9;
    stroke: #cbd5e1;
    stroke-width: 1px;
    stroke-linejoin: round;
    transition: all 0.3s ease;
}

.chile-svg:hover .chile-silhouette-path {
    fill: #f8fafc;
    stroke: #94a3b8;
}

/* Conexiones de rutas */
.active-route-bg {
    stroke-opacity: 0.08;
    transition: stroke-opacity 0.3s ease;
}

.active-route {
    stroke-opacity: 0.7;
    transition: stroke-opacity 0.3s ease;
}

.historical-route {
    stroke-opacity: 0.6;
    transition: stroke-opacity 0.3s ease;
}

/* Marcadores del mapa */
.map-marker {
    fill: var(--bg-white);
    stroke: var(--text-light);
    stroke-width: 1.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Animaciones de pulso para marcadores activos */
@keyframes activePulse {
    0% {
        r: 6px;
        stroke-width: 2.5px;
        stroke-opacity: 1;
    }
    50% {
        r: 8px;
        stroke-width: 4px;
        stroke-opacity: 0.5;
    }
    100% {
        r: 6px;
        stroke-width: 2.5px;
        stroke-opacity: 1;
    }
}

@keyframes principalPulse {
    0% {
        r: 7.5px;
        stroke-width: 3px;
        stroke-opacity: 1;
    }
    50% {
        r: 9.5px;
        stroke-width: 5px;
        stroke-opacity: 0.5;
    }
    100% {
        r: 7.5px;
        stroke-width: 3px;
        stroke-opacity: 1;
    }
}

/* Marcadores activos */
.map-marker.active {
    fill: var(--primary-color);
    stroke: var(--primary-light);
    stroke-width: 3px;
    r: 6px;
    filter: drop-shadow(0 0 4px rgba(2, 132, 199, 0.6));
    animation: activePulse 2s infinite ease-in-out;
}

.map-marker.principal-marker.active {
    fill: var(--secondary-color);
    stroke: var(--primary-light);
    stroke-width: 3.5px;
    r: 7.5px;
    filter: drop-shadow(0 0 6px rgba(14, 165, 233, 0.8));
    animation: principalPulse 2s infinite ease-in-out;
}

/* Marcadores históricos */
.map-marker.historical-marker {
    fill: var(--bg-white);
    stroke: var(--text-light);
    stroke-dasharray: none;
    r: 4.5px;
}

.map-marker.historical-marker.active {
    fill: var(--text-dark);
    stroke: var(--text-muted);
    stroke-width: 2.5px;
    r: 6px;
    filter: drop-shadow(0 0 3px rgba(100, 116, 139, 0.5));
    animation: none;
}

.map-marker.principal-marker {
    fill: var(--secondary-color);
    stroke: var(--text-light);
    stroke-width: 1.5px;
    r: 6px;
}

/* Título de la propuesta de mapa */
.map-title-text {
    font-family: var(--font-headings);
    font-size: 9px;
    font-weight: 700;
    fill: var(--text-muted);
    letter-spacing: 0.5px;
    opacity: 0.6;
}

/* Líneas de guía para las etiquetas (leader lines) */
.map-leader-line {
    stroke: var(--border-color);
    stroke-width: 1px;
    stroke-opacity: 0.3;
    stroke-dasharray: 2,2;
    transition: all 0.3s ease;
}

/* Activar línea de guía al activarse su marcador */
.map-marker.active + .map-leader-line {
    stroke: var(--primary-color);
    stroke-opacity: 0.8;
    stroke-width: 1.2px;
    stroke-dasharray: none;
}

.map-marker.principal-marker.active + .map-leader-line {
    stroke: var(--secondary-color);
}

.map-marker.historical-marker.active + .map-leader-line {
    stroke: var(--text-muted);
}

/* Etiquetas del mapa con alta visibilidad y contraste */
.map-label {
    font-family: var(--font-headings);
    font-size: 12px;
    font-weight: 600;
    fill: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 
        2px 2px 0 var(--bg-white), 
        -2px -2px 0 var(--bg-white), 
        2px -2px 0 var(--bg-white), 
        -2px 2px 0 var(--bg-white),
        0px 2px 0 var(--bg-white),
        0px -2px 0 var(--bg-white),
        2px 0px 0 var(--bg-white),
        -2px 0px 0 var(--bg-white);
    pointer-events: none;
}

.map-label.label-historical {
    font-style: italic;
    fill: var(--text-light);
}

/* Resaltar y agrandar etiquetas al activarse el marcador */
.map-marker.active + .map-leader-line + .map-label {
    fill: var(--primary-color);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.map-marker.principal-marker.active + .map-leader-line + .map-label {
    fill: var(--secondary-color);
    font-size: 16px;
    font-weight: 800;
}

.map-marker.historical-marker.active + .map-leader-line + .map-label.label-historical {
    fill: var(--text-dark);
    font-size: 14px;
    font-weight: 700;
}

.font-bold {
    font-weight: 700;
}

.font-italic {
    font-style: italic;
}

/* Map SVG container styling */
.coverage-map-container {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
    height: 520px;
    overflow: hidden;
}

.chile-svg-wrapper {
    height: 100%;
    width: auto;
}

.chile-svg {
    height: 100%;
    width: auto;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-section {
    padding: 100px 0;
    background-color: var(--bg-white);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
    align-items: flex-start;
}

.contact-info {
    max-width: 450px;
}

.contact-text {
    font-size: 1.05rem;
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-detail-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.detail-icon {
    width: 48px;
    height: 48px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-icon svg {
    width: 24px;
    height: 24px;
}

.contact-detail-item span {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

.contact-detail-item strong {
    font-family: var(--font-headings);
    font-size: 1.15rem;
    color: var(--secondary-color);
}

/* Form Styling */
.contact-form-wrapper {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    position: relative;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: var(--transition-smooth);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-family: var(--font-headings);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input, .form-group select, .form-group textarea {
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-white);
    color: var(--text-dark);
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

.error-msg {
    font-size: 0.8rem;
    color: var(--error-color);
    margin-top: -4px;
    display: none;
}

/* Button loader state */
.btn-loader {
    display: none;
    align-items: center;
    justify-content: center;
}

.btn-loader svg {
    width: 20px;
    height: 20px;
}

.btn-block {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Form success container */
.form-success-container {
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: fadeIn 0.5s ease;
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.success-icon {
    width: 40px;
    height: 40px;
}

.form-success-container h3 {
    font-size: 1.75rem;
    color: var(--secondary-color);
}

.form-success-container p {
    font-size: 1rem;
    max-width: 320px;
    margin: 0 auto;
}

/* Animation utilities */
.hidden {
    display: none !important;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .9; transform: scale(1.03); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background-color: var(--secondary-color);
    color: rgba(255, 255, 255, 0.75);
    padding: 80px 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 64px;
    margin-bottom: 60px;
}

.footer-brand {
    max-width: 350px;
}

.footer-brand .logo-text {
    color: var(--bg-white);
}

.footer-desc {
    margin-top: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-icon-link {
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-smooth);
}

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

.social-icon-link:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.2);
}

.social-icon-link.social-wa:hover {
    background-color: var(--success-color);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-nav h4 {
    color: var(--bg-white);
    font-size: 1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a {
    font-size: 0.9rem;
}

.footer-nav a:hover {
    color: var(--primary-hover);
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 0;
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

/* ==========================================================================
   RESPONSIVIDAD (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 64px;
    }
    
    .hero-content {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid > * {
        grid-column: auto;
    }
    
    /* Centrar la séptima tarjeta en tablets (grilla de 2 columnas) */
    .services-grid > *:last-child:nth-child(7) {
        grid-column: 1 / span 2;
        justify-self: center;
        width: 100%;
        max-width: calc(50% - 16px);
    }
    
    /* Resetear las tarjetas de la grilla de 8 en tablets */
    .services-grid > *:nth-last-child(2):nth-child(7),
    .services-grid > *:last-child:nth-child(8) {
        grid-column: auto;
        justify-self: stretch;
        width: auto;
        max-width: 100%;
    }
    
    .about-container {
        grid-template-columns: 1fr;
        gap: 64px;
    }
    
    .about-visual {
        order: 2;
    }
    
    .coverage-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .coverage-info {
        max-width: 100%;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .contact-info {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .section-title {
        font-size: 1.85rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    /* Mobile Navigation */
    .mobile-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-white);
        border-top: 1px solid var(--border-color);
        padding: 40px 24px;
        transition: var(--transition-smooth);
        align-items: flex-start;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.open {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 24px;
    }
    
    .nav-link {
        font-size: 1.15rem;
        display: block;
        padding: 8px 0;
    }
    
    .nav-link.btn-header {
        text-align: center;
        margin-top: 16px;
    }
    
    /* Toggle animation */
    .mobile-toggle.open .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .mobile-toggle.open .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.open .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Grid details */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid > * {
        grid-column: auto;
    }
    
    /* Resetear el centrado de la séptima tarjeta en móviles */
    .services-grid > *:last-child:nth-child(7) {
        grid-column: auto;
        justify-self: stretch;
        width: auto;
        max-width: 100%;
    }
    
    /* Resetear las últimas dos tarjetas si hay 8 en móviles */
    .services-grid > *:nth-last-child(2):nth-child(7),
    .services-grid > *:last-child:nth-child(8) {
        grid-column: auto;
        justify-self: stretch;
        width: auto;
        max-width: 100%;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .footer-links-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-bottom-container {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* ==========================================================================
   ESTILOS DE WHATSAPP DIRECTO Y BOTÓN FLOTANTE
   ========================================================================== */
.link-hover-primary {
    color: var(--secondary-color);
    transition: var(--transition-smooth);
}

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

.detail-icon.icon-whatsapp-detail {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    transition: var(--transition-smooth);
}

.contact-detail-link:hover .detail-icon.icon-whatsapp-detail {
    background-color: var(--success-color);
    color: var(--bg-white);
    transform: translateY(-2px);
}

/* Botón Flotante */
.whatsapp-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--success-color);
    color: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    z-index: 999;
    transition: var(--transition-smooth);
}

.whatsapp-floating svg {
    width: 30px;
    height: 30px;
}

.whatsapp-floating:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    color: var(--bg-white);
}

.whatsapp-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--success-color);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.4;
    animation: wa-pulse-wave 2s infinite;
}

@keyframes wa-pulse-wave {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Redes Sociales en Sección de Contacto */
.contact-socials-wrapper {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.contact-socials-wrapper h4 {
    font-family: var(--font-headings);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.contact-socials {
    display: flex;
    gap: 12px;
}

.contact-social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-smooth);
    background-color: var(--bg-white);
}

.contact-social-link svg {
    width: 18px;
    height: 18px;
}

.contact-social-link.link-instagram:hover {
    color: #e1306c;
    border-color: #e1306c;
    background-color: rgba(225, 48, 108, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.contact-social-link.link-facebook:hover {
    color: #1877f2;
    border-color: #1877f2;
    background-color: rgba(24, 119, 242, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   ESTILOS DE MODAL DE DETALLE DE SERVICIOS
   ========================================================================== */
.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 24px;
}

.service-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.service-modal-container {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 900px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    box-shadow: var(--shadow-premium), 0 25px 50px -12px rgba(15, 23, 42, 0.15);
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.service-modal.open .service-modal-container {
    transform: scale(1) translateY(0);
}

.service-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 10;
}

.service-modal-close:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-light);
    transform: rotate(90deg);
}

.service-modal-header {
    padding: 40px 40px 24px 40px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 20px;
}

.service-modal-icon-wrapper {
    width: 64px;
    height: 64px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-modal-icon-wrapper svg {
    width: 32px;
    height: 32px;
}

.service-modal-title-group {
    display: flex;
    flex-direction: column;
}

.service-modal-subtitle {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.service-modal-title {
    font-size: 1.85rem;
    color: var(--secondary-color);
}

.service-modal-body {
    padding: 32px 40px;
    flex-grow: 1;
}

.service-modal-description {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.service-modal-section-title {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.equipment-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.equipment-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.equipment-image-wrapper {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background-color: #cbd5e1;
    border-bottom: 1px solid var(--border-color);
}

.equipment-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.equipment-card:hover .equipment-img {
    transform: scale(1.08);
}

.equipment-icon-placeholder {
    width: 100%;
    height: 140px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.equipment-icon-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.55;
    transition: var(--transition-smooth);
}

.equipment-card:hover .equipment-icon-placeholder svg {
    transform: scale(1.1);
    opacity: 0.85;
}

.equipment-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.equipment-info h4 {
    font-size: 1.05rem;
    color: var(--secondary-color);
}

.equipment-info p {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.service-modal-footer {
    padding: 24px 40px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-light);
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

/* Responsividad para Modal */
@media (max-width: 1024px) and (min-width: 769px) {
    .equipment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .service-modal {
        padding: 12px;
    }
    
    .service-modal-container {
        max-height: calc(100vh - 24px);
    }
    
    .service-modal-header {
        padding: 24px 24px 16px 24px;
        gap: 12px;
    }
    
    .service-modal-icon-wrapper {
        width: 48px;
        height: 48px;
    }
    
    .service-modal-icon-wrapper svg {
        width: 24px;
        height: 24px;
    }
    
    .service-modal-title {
        font-size: 1.4rem;
    }
    
    .service-modal-body {
        padding: 20px 24px;
    }
    
    .equipment-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .service-modal-footer {
        padding: 16px 24px;
        flex-direction: column;
    }
    
    .service-modal-footer .btn {
        width: 100%;
    }
}

/* Modal de Visualización Ampliada del Logo */
.logo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.logo-modal-content {
    max-width: 90%;
    max-height: 80%;
    transform: scale(0.8);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-modal.open .logo-modal-content {
    transform: scale(1);
}

.logo-modal-img {
    max-width: 500px;
    width: 90vw;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium), 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 40px;
    cursor: default;
    transition: var(--transition-smooth);
}

/* Clase útil para desactivar scroll en body al abrir modal */
.no-scroll {
    overflow: hidden !important;
}

/* ==========================================================================
   SUBSECCIÓN TRAYECTORIA Y CLIENTES
   ========================================================================== */
.about-trajectory {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--border-color);
}

.trajectory-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px auto;
}

.trajectory-title {
    font-size: 1.75rem;
    color: var(--secondary-color);
    margin-bottom: 12px;
}

.trajectory-description {
    font-size: 0.975rem;
    color: var(--text-muted);
}

.trajectory-subtitle {
    font-family: var(--font-headings);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
    text-align: center;
}

/* Clientes Activos Grid */
.active-clients-section {
    margin-bottom: 60px;
}

.active-clients-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.active-client-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.active-client-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.active-client-image-wrapper {
    width: 100%;
    height: 180px;
    position: relative;
    overflow: hidden;
    background-color: #cbd5e1;
    border-bottom: 1px solid var(--border-color);
}

.active-client-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

/* Pulso Verde de Activo */
.active-pulse {
    width: 12px;
    height: 12px;
    background-color: var(--success-color);
    border-radius: 50%;
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

.active-pulse::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--success-color);
    animation: active-pulse-wave 1.5s infinite;
    top: 0;
    left: 0;
}

@keyframes active-pulse-wave {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.active-client-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 24px;
    flex-grow: 1;
}

.active-client-info strong {
    font-family: var(--font-headings);
    font-size: 1.05rem;
    color: var(--secondary-color);
}

.active-client-info span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Ruleta de Clientes Históricos (Horizontal Scrolling to the Right) */
.past-clients-section {
    overflow: hidden;
    margin-top: 40px;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 24px 0;
    /* Efecto fade-out en los extremos */
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-track {
    display: flex;
    gap: 24px;
    width: max-content;
    /* Animación hacia la derecha, más lenta */
    animation: marquee-right 65s linear infinite;
}

/* Detener carrusel al hacer hover */
.marquee-container:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes marquee-right {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

.marquee-item {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 180px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    flex-shrink: 0;
    overflow: hidden;
}

.marquee-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.marquee-img-wrapper {
    width: 100%;
    height: 180px; /* Square height matching width */
    position: relative;
    overflow: hidden;
    background-color: #cbd5e1;
    border-bottom: 1px solid var(--border-color);
}

.marquee-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.marquee-item:hover .marquee-img {
    transform: scale(1.05);
}

.marquee-info {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.marquee-name {
    font-family: var(--font-headings);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.6em; /* fixed height for 2 lines text balance */
}

.marquee-location {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: auto; /* Push location to bottom */
}

/* Responsividad para Trayectoria */
@media (max-width: 1024px) {
    .active-clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .about-trajectory {
        margin-top: 60px;
        padding-top: 40px;
    }
    
    .active-clients-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .active-client-card {
        padding: 0;
    }
    
    .active-client-info {
        padding: 16px 20px;
    }
    
    .marquee-container {
        mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    }
}

/* ==========================================================================
   SECTORES DE ENFOQUE (HOSPITALARIO & INDUSTRIAL)
   ========================================================================== */
.sectors-section {
    padding: 100px 0;
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.sectors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 860px;
    margin: 0 auto;
}

.service-card > *:not(.card-bg-wrapper) {
    position: relative;
    z-index: 2;
}

.card-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.card-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.04;
    filter: grayscale(100%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

.service-card:hover .card-bg-img {
    opacity: 0.10;
    transform: scale(1.06);
}

@media (max-width: 768px) {
    .sectors-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
}

/* ==========================================================================
   TICKER DE MEMBRETES / LOGOS DE SOCIOS
   ========================================================================== */
.brand-ticker-section {
    padding: 60px 0;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.brand-ticker-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 30px auto;
    padding: 0 20px;
}

.brand-ticker-title {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.brand-ticker-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.brand-ticker-outer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    padding: 10px 0;
    /* Efecto fade en los laterales */
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.brand-ticker-container {
    width: 100%;
    overflow: hidden;
}

.brand-ticker-track {
    display: flex;
    gap: 40px;
    width: max-content;
    align-items: center;
}

/* Ticker Izquierda */
.ticker-left .brand-ticker-track {
    animation: ticker-left-scroll 60s linear infinite;
}

/* Ticker Derecha */
.ticker-right .brand-ticker-track {
    animation: ticker-right-scroll 60s linear infinite;
}

/* Detener al hacer hover */
.brand-ticker-container:hover .brand-ticker-track {
    animation-play-state: paused;
}

@keyframes ticker-left-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes ticker-right-scroll {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

.brand-logo-item {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 10px;
}

.brand-logo-item img {
    height: 100%;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: grayscale(100%) opacity(55%);
    transition: var(--transition-smooth);
}

.brand-logo-item:hover img {
    filter: grayscale(0%) opacity(100%);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .brand-ticker-section {
        padding: 40px 0;
    }
    
    .brand-ticker-outer {
        mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    }
    
    .brand-logo-item {
        height: 38px;
    }
}

/* ==========================================================================
   ACORDEÓN DE SERVICIOS Y GALERÍA DESPLEGABLE
   ========================================================================== */
.service-card {
    cursor: pointer;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

/* Ocultar la galería inline en la tarjeta */
.service-gallery {
    display: none;
}

/* Lightbox de Galería de Servicios */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gallery-lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
    padding: 0 80px;
}

.lightbox-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 80vh;
}

.lightbox-slider-wrapper {
    width: 100%;
    height: 60vh;
    overflow: hidden;
    position: relative;
    background-color: transparent;
}

.lightbox-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.lightbox-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-slide-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
    display: none;
    font-family: var(--font-headings);
    color: var(--bg-white);
    font-size: 1.15rem;
    font-weight: 500;
    margin-top: 20px;
    text-align: center;
    min-height: 1.5em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.lightbox-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.lightbox-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.lightbox-dot:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

.lightbox-dot.active {
    background-color: var(--primary-color);
    transform: scale(1.3);
}

/* Flechas Instintivas en Extremos */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    line-height: 1;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    user-select: none;
    z-index: 2010;
}

.lightbox-arrow:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-arrow.arrow-left {
    left: 0px;
}

.lightbox-arrow.arrow-right {
    right: 0px;
}

/* Botón Cerrar */
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 2020;
}

.lightbox-close:hover {
    color: var(--bg-white);
    transform: scale(1.1);
}

/* Responsividad para móviles */
@media (max-width: 768px) {
    .lightbox-content {
        padding: 0 45px;
    }
    
    .lightbox-arrow {
        width: 44px;
        height: 44px;
        font-size: 1.75rem;
    }
    
    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 2.5rem;
    }
    
    .lightbox-caption {
        font-size: 0.95rem;
    }
    
    .lightbox-slider-wrapper {
        height: 50vh;
    }
}

/* Custom Transparent Colors and highlights for each Service Card */
#service-refrigeracion {
    background-color: rgba(0, 188, 212, 0.03);
    border-color: rgba(0, 188, 212, 0.15);
}
#service-refrigeracion .service-icon-wrapper {
    background-color: rgba(0, 188, 212, 0.08);
    color: rgb(0, 151, 167);
}
#service-refrigeracion .service-card-link,
#service-refrigeracion .service-card-description li::before {
    color: rgb(0, 151, 167);
}
#service-refrigeracion:hover {
    border-color: rgb(0, 188, 212);
}
#service-refrigeracion:hover::before {
    background-color: rgb(0, 188, 212);
}

#service-climatizacion {
    background-color: rgba(0, 150, 136, 0.03);
    border-color: rgba(0, 150, 136, 0.15);
}
#service-climatizacion .service-icon-wrapper {
    background-color: rgba(0, 150, 136, 0.08);
    color: rgb(0, 121, 107);
}
#service-climatizacion .service-card-link,
#service-climatizacion .service-card-description li::before {
    color: rgb(0, 121, 107);
}
#service-climatizacion:hover {
    border-color: rgb(0, 150, 136);
}
#service-climatizacion:hover::before {
    background-color: rgb(0, 150, 136);
}

#service-calefaccion {
    background-color: rgba(255, 112, 67, 0.03);
    border-color: rgba(255, 112, 67, 0.15);
}
#service-calefaccion .service-icon-wrapper {
    background-color: rgba(255, 112, 67, 0.08);
    color: rgb(230, 81, 0);
}
#service-calefaccion .service-card-link,
#service-calefaccion .service-card-description li::before {
    color: rgb(230, 81, 0);
}
#service-calefaccion:hover {
    border-color: rgb(255, 112, 67);
}
#service-calefaccion:hover::before {
    background-color: rgb(255, 112, 67);
}

#service-mecanica {
    background-color: rgba(96, 125, 139, 0.03);
    border-color: rgba(96, 125, 139, 0.15);
}
#service-mecanica .service-icon-wrapper {
    background-color: rgba(96, 125, 139, 0.08);
    color: rgb(69, 90, 100);
}
#service-mecanica .service-card-link,
#service-mecanica .service-card-description li::before {
    color: rgb(69, 90, 100);
}
#service-mecanica:hover {
    border-color: rgb(96, 125, 139);
}
#service-mecanica:hover::before {
    background-color: rgb(96, 125, 139);
}

#service-ventilacion {
    background-color: rgba(3, 169, 244, 0.03);
    border-color: rgba(3, 169, 244, 0.15);
}
#service-ventilacion .service-icon-wrapper {
    background-color: rgba(3, 169, 244, 0.08);
    color: rgb(2, 136, 209);
}
#service-ventilacion .service-card-link,
#service-ventilacion .service-card-description li::before {
    color: rgb(2, 136, 209);
}
#service-ventilacion:hover {
    border-color: rgb(3, 169, 244);
}
#service-ventilacion:hover::before {
    background-color: rgb(3, 169, 244);
}

#service-electricidad {
    background-color: rgba(255, 193, 7, 0.02);
    border-color: rgba(255, 193, 7, 0.12);
}
#service-electricidad .service-icon-wrapper {
    background-color: rgba(255, 193, 7, 0.1);
    color: rgb(216, 140, 0);
}
#service-electricidad .service-card-link,
#service-electricidad .service-card-description li::before {
    color: rgb(216, 140, 0);
}
#service-electricidad:hover {
    border-color: rgb(255, 193, 7);
}
#service-electricidad:hover::before {
    background-color: rgb(255, 193, 7);
}

#service-control {
    background-color: rgba(103, 58, 183, 0.03);
    border-color: rgba(103, 58, 183, 0.15);
}
#service-control .service-icon-wrapper {
    background-color: rgba(103, 58, 183, 0.08);
    color: rgb(81, 45, 168);
}
#service-control .service-card-link,
#service-control .service-card-description li::before {
    color: rgb(81, 45, 168);
}
#service-control:hover {
    border-color: rgb(103, 58, 183);
}
#service-control:hover::before {
    background-color: rgb(103, 58, 183);
}

#service-eficiencia {
    background-color: rgba(76, 175, 80, 0.03);
    border-color: rgba(76, 175, 80, 0.15);
}
#service-eficiencia .service-icon-wrapper {
    background-color: rgba(76, 175, 80, 0.08);
    color: rgb(56, 142, 60);
}
#service-eficiencia .service-card-link,
#service-eficiencia .service-card-description li::before {
    color: rgb(56, 142, 60);
}
#service-eficiencia:hover {
    border-color: rgb(76, 175, 80);
}
#service-eficiencia:hover::before {
    background-color: rgb(76, 175, 80);
}

/* ==========================================================================
   MEJORAS DE RESPONSIVIDAD Y ESTÉTICA MÓVIL
   ========================================================================== */

/* Ajustes globales para tablets y móviles (max-width: 768px) */
@media (max-width: 768px) {
    /* 1. Ajustes del Header cuando el Menú Móvil está Abierto */
    .main-header.menu-open {
        background-color: var(--bg-white) !important;
        backdrop-filter: blur(12px) !important;
        box-shadow: var(--shadow-md) !important;
        border-bottom: 1px solid var(--border-color) !important;
    }
    
    .main-header.menu-open .logo-text {
        color: var(--secondary-color) !important;
    }
    
    .main-header.menu-open .logo-text .accent-text {
        color: var(--primary-color) !important;
    }
    
    .main-header.menu-open .mobile-toggle .bar {
        background-color: var(--text-dark) !important;
    }
    
    .main-header.menu-open .logo-img {
        height: 44px !important;
    }
    
    /* Corregir texto invisible (blanco sobre blanco) en menú abierto sin scroll */
    .main-header .nav-menu .nav-link:not(.btn-header) {
        color: var(--text-muted) !important;
    }
    
    .main-header .nav-menu .nav-link:not(.btn-header):hover,
    .main-header .nav-menu .nav-link:not(.btn-header).active {
        color: var(--primary-color) !important;
    }

    /* Ajustar posición superior del menú móvil para calzar con la altura del header */
    .nav-menu {
        top: 70px !important;
        height: calc(100vh - 70px) !important;
    }

    /* 2. Reducir padding excesivo de secciones en tablets/móviles */
    section {
        padding: 60px 0 !important;
    }
    
    .hero-section {
        padding: 120px 0 80px 0 !important;
    }

    /* 3. Optimización de Tarjetas de Servicios */
    .service-card {
        padding: 24px !important;
    }
    
    .service-card-title {
        font-size: 1.35rem !important;
    }

    /* 4. Optimización de Mapa de Cobertura */
    .coverage-map-container {
        height: auto !important;
        max-height: none !important;
        padding: 16px !important;
    }
    
    .chile-svg-wrapper {
        width: 100% !important;
        height: auto !important;
    }
    
    .chile-svg {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* 5. Optimización de Formulario de Contacto y Otros */
    .contact-form-wrapper {
        padding: 24px !important;
        min-height: auto !important;
    }
    
    .form-title {
        font-size: 1.5rem !important;
    }
}

/* Ajustes específicos para teléfonos móviles pequeños (max-width: 480px) */
@media (max-width: 480px) {
    /* 1. Reducir padding de secciones aún más */
    section {
        padding: 45px 0 !important;
    }
    
    .hero-section {
        padding: 100px 0 60px 0 !important;
    }
    
    /* 2. Tipografía del Hero y Subtítulos */
    .hero-title {
        font-size: 1.95rem !important;
        letter-spacing: -0.8px !important;
        line-height: 1.25 !important;
    }
    
    .hero-description {
        font-size: 0.95rem !important;
        margin-bottom: 24px !important;
    }
    
    .hero-badge {
        font-size: 0.72rem !important;
        padding: 4px 10px !important;
        margin-bottom: 16px !important;
    }
    
    /* Stacking de botones del Hero en pantallas muy pequeñas */
    .hero-actions {
        flex-direction: column;
        gap: 10px !important;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    /* 3. Tarjetas de Servicios */
    .service-card {
        padding: 20px 16px !important;
    }
    
    /* 4. Sobre Nosotros: Ajuste para evitar desbordamiento lateral de insignias */
    .about-visual-box {
        height: 320px !important;
    }
    
    .experience-badge {
        top: -15px !important;
        bottom: auto !important;
        left: 10px !important;
        padding: 8px 14px !important;
    }
    
    .experience-badge .exp-years {
        font-size: 1.6rem !important;
    }
    
    .experience-badge .exp-text {
        font-size: 0.65rem !important;
    }
    
    .quality-stamp {
        bottom: -15px !important;
        right: 10px !important;
        padding: 8px 14px !important;
    }
    
    .quality-stamp h4 {
        font-size: 0.8rem !important;
    }
    
    .quality-stamp svg {
        width: 16px !important;
        height: 16px !important;
    }

    /* 5. Formulario de Contacto */
    .contact-form-wrapper {
        padding: 20px 16px !important;
    }
    
    .contact-social-link {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }
    
    /* 6. Clientes activos */
    .active-client-info {
        padding: 12px 16px !important;
    }
    
    .active-client-info strong {
        font-size: 0.95rem !important;
    }
    
    /* 7. Lightbox de Galería de Servicios */
    .lightbox-content {
        padding: 0 38px !important;
    }
    
    .lightbox-arrow {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.5rem !important;
    }
    
    .lightbox-slider-wrapper {
        height: 45vh !important;
    }
    
    /* 8. Evitar zoom automático en iOS Safari */
    form-group input,
    .form-group input, 
    .form-group select, 
    .form-group textarea {
        font-size: 16px !important;
    }
}
