/* ==========================================================================
   Custom Fonts
   ========================================================================== */

@font-face {
    font-family: 'Petrov Sans';
    src: url('../assets/petrov_sans/PetrovSans-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow';
    src: url('../assets/Barlow/Barlow-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow';
    src: url('../assets/Barlow/Barlow-LightItalic.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow';
    src: url('../assets/Barlow/Barlow-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow';
    src: url('../assets/Barlow/Barlow-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow';
    src: url('../assets/Barlow/Barlow-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow';
    src: url('../assets/Barlow/Barlow-SemiBoldItalic.ttf') format('truetype');
    font-weight: 600;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow';
    src: url('../assets/Barlow/Barlow-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow';
    src: url('../assets/Barlow/Barlow-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

:root {
    /* Theme Variables - Dark Mode (Default) */
    --bg-main: #0B132B;          
    --text-main: #E5EDFA;        
    --text-muted: #8FA4C5;       
    --card-bg: #111D3E;          
    --card-border: rgba(43, 56, 203, 0.25);
    --accent: #FC6E5E;           
    --accent-hover: #ff8a7d;
    --primary-blue: #2B38CB;     
    --nav-bg: rgba(11, 19, 43, 0.4);
    --nav-scrolled: rgba(11, 19, 43, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --font-heading: 'Petrov Sans', sans-serif;
    --font-text: 'Barlow', sans-serif;
}

body.light-mode {
    --bg-main: #ffffff;          /* Blanco puro solicitado */
    --text-main: #000000;        /* Texto negro puro solicitado */
    --text-muted: #536281;       /* Texto gris azulado */
    --card-bg: #ffffff;          /* Tarjetas blancas puras */
    --card-border: rgba(43, 56, 203, 0.1);
    --nav-bg: rgba(255, 255, 255, 0.4);
    --nav-scrolled: rgba(255, 255, 255, 0.98);
    --glass-bg: rgba(43, 56, 203, 0.05);
    --glass-border: rgba(43, 56, 203, 0.1);
    --primary-blue: #3244F5;
}

/* Visibility toggles for logos - Global */
.logo-dark-theme { display: block; }
.logo-light-theme { display: none; }

body.light-mode .logo-dark-theme { display: none; }
body.light-mode .logo-light-theme { 
    display: block; 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-text);
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 1s ease, color 1s ease; /* Unificación 1s */
}

/* =========================================
   Typography
   ========================================= */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: var(--font-heading);
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.05;
    margin-bottom: 1rem;
    font-weight: 800;
    color: var(--text-main);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    color: var(--text-main);
}

p {
    color: var(--text-muted);
    font-size: clamp(1rem, 3.5vw, 1.125rem);
    line-height: 1.6;
}

/* =========================================
   Navbar (Glassmorphism)
   ========================================= */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%; 
    max-width: 1600px; /* Más ancha para aprovechar el espacio */
    height: 60px;
    border-radius: 12px;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex; /* Eliminado justify-content: center */
    transition: all 1s ease;
}

.navbar .container {
    width: 100%; /* Forzar ocupación total */
    max-width: 100%;
    padding: 0 1rem; /* Padding reducido para acercar el logo a la orilla */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-wrapper {
    margin-right: auto; /* EMPUJA TODO LO DEMÁS A LA DERECHA */
    display: flex;
    align-items: center;
    z-index: 1001;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.2rem; /* Espaciado ampliado según pedido */
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    margin: 0 0.5rem;
}

#themeToggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 1s ease;
}

#themeToggle:hover {
    background: var(--glass-border);
    transform: rotate(15deg);
}

#themeToggle svg {
    width: 20px;
    height: 20px;
    position: absolute;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.sun-icon { opacity: 0; transform: scale(0) rotate(-90deg); }
.moon-icon { opacity: 1; transform: scale(1) rotate(0); }

body.light-mode .sun-icon { opacity: 1; transform: scale(1) rotate(0); }
body.light-mode .moon-icon { opacity: 0; transform: scale(0) rotate(90deg); }

/* Menu Toggle Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
    padding: 0;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 10px;
    transition: all 1s ease;
}

/* Hamburger to X Animation */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.navbar.scrolled {
    background: var(--nav-scrolled) !important;
    border: 1px solid var(--card-border) !important;
    backdrop-filter: saturate(180%) blur(20px);
    top: 0; /* Subirlo pegado arriba del todo al scrollear */
    width: 100%; /* Opcional: que se expanda enteramente a lo ancho al adosarse arriba */
    border-radius: 0; /* Pierde bordes para pegarse por completo al teclado como banda solida */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Custom Angled Logo Container */
.logo-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    z-index: 1001;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
}

.logo-island {
    position: relative;
    padding: 4px 25px; /* Ajuste para logo más grande */
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    z-index: 101;
    text-decoration: none;
    cursor: pointer;
}

body.light-mode .logo-island {
    box-shadow: 0 10px 30px rgba(43, 56, 203, 0.2); 
    background: #ffffff;
    border: 1px solid rgba(43, 56, 203, 0.1);
}

body.light-mode .logo-island img {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05)); /* Sombras suaves para consistencia */
}

.logo-island img {
    height: 30px; /* Aumentado de 24px a 30px */
    object-fit: contain;
    transition: transform 1s ease;
}

.logo-island:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.logo-island:hover img {
    transform: scale(1.1);
}

.logo-subtitle {
    margin-top: 2px;
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
    text-align: center;
    opacity: 0.7;
    transition: all 1s ease;
}

/* Animaciones sobre el Hover de todo el wrapper */
.logo-wrapper:hover .logo-island {
    transform: translateY(5px) scale(1.02);
}

.logo-wrapper:hover .logo-polygon img {
    transform: scale(1.15) rotate(-3deg);
}

.logo-wrapper:hover .logo-subtitle {
    transform: translateY(0);
    opacity: 1;
    color: var(--accent);
}

/* Cuando se scrollea achicamos el logo */
.navbar.scrolled .logo-polygon {
    transform: scale(0.7) translateY(-15px);
}
.navbar.scrolled .logo-wrapper:hover .logo-polygon {
    transform: scale(0.75) translateY(-10px);
}

.nav-links {
    display: flex;
    gap: 1.4rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    opacity: 0.7;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: var(--accent);
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 0.2rem 0.5rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    padding: 0.2rem 0.4rem;
    border-radius: 12px;
    transition: all 0.2s;
}

.lang-btn.active {
    color: var(--text-main);
    background: var(--glass-border);
}

.lang-selector .divider {
    width: 1px;
    height: 12px;
    background: rgba(255,255,255,0.2);
}

/* =========================================
   Hero Section
   ========================================= */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 2rem 4rem;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-main); /* Fallback */
}

/* Background image handling with parallax feel and crossfade slider */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%; /* Extra height for smooth parallax scrolling */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    opacity: 0; /* Let data and dark theme stand out, default to 0 for fade */
    transition: opacity 2s ease-in-out, transform 0.1s linear;
}

.hero-bg.active {
    opacity: 0.5;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 3;
    margin-top: 70px; /* Despegado 50px más (70px total) de la parte superior (navbar/logo) a pedido */
}

/* Light Mode Overlays */
body.light-mode .hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.88); /* Overlay blanco premium traslúcido */
    z-index: 2;
}

body.light-mode .hero-bg.active {
    opacity: 0.7; /* Mayor opacidad para que la imagen sea sutilmente visible bajo el blanco */
}

.hero-content p {
    margin-top: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.25rem;
}

.hero-actions {
    margin-top: 3rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 1s ease;
}


.btn-primary {
    background-color: var(--primary-blue);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(43, 56, 203, 0.4);
}

.btn-primary:hover {
    transform: scale(1.05);
    background-color: var(--accent);
    box-shadow: 0 4px 20px rgba(252, 110, 94, 0.5);
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover,
.btn-secondary:active {
    transform: scale(1.05);
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(252, 110, 94, 0.4);
}

.hero-glow {
    position: absolute;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(43, 56, 203, 0.25) 0%, rgba(11, 19, 43, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

/* =========================================
   Company Section
   ========================================= */
.company-section {
    padding: 4rem 2rem 1rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.company-content {
    background: var(--card-bg); /* Estilo unificado con servicios */
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 4rem 3rem;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.company-content h2 {
    color: var(--accent);
    margin-bottom: 2rem;
    font-size: 2rem;
    transition: color 1s ease;
}

body.light-mode #company h2 {
    color: var(--primary-blue); /* Excepción solicitada: no es negro */
}

.company-text p.lead {
    font-size: 1.5rem;
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.company-text p, .manifesto-text p {
    font-size: 1.15rem;
    color: var(--text-main); /* Más visible a pedido */
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: left;
}

.objective-text {
    font-size: 1.35rem !important;
    font-weight: 700;
    color: var(--accent) !important;
    margin-top: 2.5rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

body.light-mode .objective-text {
    color: var(--primary-blue) !important;
}

/* =========================================
   Services Section (Cards)
   ========================================= */
.services-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-desc {
    max-width: 800px;
    margin: 1.5rem auto 0;
    font-size: 1.15rem;
    color: var(--text-main);
}

.carousel-container {
    position: relative;
    max-width: 100%;
    overflow: hidden; /* Oculta horizontales */
    /* Padding para evitar recortes de sombra o animaciones verticales */
    padding: 40px 10px;
    margin: -40px -10px;
}

.carousel-arrow {
    display: none;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

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

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.service-card.wide-card h3 {
    text-align: left;
}

.service-card.wide-card .card-icon {
    margin-left: 0;
    margin-right: 0;
}

@media (min-width: 769px) {
    .service-card.wide-card {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 100px 1fr 1fr;
        column-gap: 2rem;
        row-gap: 0.5rem;
        align-items: center;
    }
    .service-card.wide-card .card-icon {
        grid-column: 1;
        grid-row: 1 / span 3;
        font-size: 4rem; /* Super destacado */
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .service-card.wide-card h3 {
        grid-column: 2;
        grid-row: 1;
        margin-bottom: 0.5rem;
        align-self: end;
    }
    .service-card.wide-card p {
        grid-column: 2;
        grid-row: 2;
        margin-bottom: 0;
        align-self: start;
        padding-right: 1.5rem;
    }
    .service-card.wide-card .card-extra {
        grid-column: 3;
        grid-row: 1 / span 3;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        padding-left: 2rem;
        border-left: 1px solid rgba(255,255,255,0.1);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    body.light-mode .service-card.wide-card .card-extra {
        border-left: 1px solid rgba(43, 56, 203, 0.1);
    }
    .service-card.wide-card .card-actions {
        grid-column: 2;
        grid-row: 3;
        margin-top: 1.5rem;
        text-align: left;
    }
}

.service-card .card-actions {
    margin-top: 1.5rem;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(43, 56, 203, 0.15);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

body.light-mode .service-card:hover {
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(43, 56, 203, 0.1);
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 1s;
}

.service-card:hover::after {
    left: 100%;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.service-card:hover .card-icon {
    transform: scale(1.2) translateY(-5px);
}


.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--text-main);
    text-align: center;
}

.service-card p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.card-extra {
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
    margin-top: auto;
}

.card-extra strong {
    display: block;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

body.light-mode .card-extra strong {
    color: var(--primary-blue);
}

.card-extra ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
}

.card-extra li {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-left: 1.2rem;
    position: relative;
}

.card-extra li::before {
    content: '▶';
    position: absolute;
    left: 0;
    font-size: 0.7rem;
    color: var(--accent);
    top: 3px;
}

body.light-mode .card-extra li::before {
    color: var(--primary-blue);
}

body.light-mode .card-extra li {
    color: var(--text-main);
}

/* =========================================
   Jedstion CRM Section
   ========================================= */
.jedstion-section {
    padding: 100px 2rem;
    background: linear-gradient(180deg, transparent, rgba(43, 56, 203, 0.05), transparent);
}

.jedstion-container {
    max-width: 1200px;
    margin: 0 auto;
}

.jedstion-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.browser-frame {
    background: #1a233b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.browser-header {
    background: #2a3452;
    padding: 10px 15px;
    display: flex;
    gap: 6px;
}

.browser-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
}
/* =========================================
   Floating WhatsApp Button
   ========================================= */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
    background-color: #20ba5a;
}

.whatsapp-float svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Base fade-in-up class already exists in theme.css, 
   but we can add a pulse for the button specifically if wanted */
@keyframes pulse-whatsapp {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-float.visible {
    animation: fade-in-up 0.8s ease forwards, pulse-whatsapp 2s infinite 1s;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}

.jedstion-image img {
    width: 100%;
    display: block;
    height: auto;
}

.jedstion-info .badge {
    background: var(--accent);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.jedstion-info h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.jedstion-info h3 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

.jedstion-info p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.jedstion-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
}

.jedstion-features li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 12px;
    color: var(--text-main);
    font-weight: 500;
}

.jedstion-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

@media (max-width: 1150px) {
    .jedstion-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    .jedstion-features {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .jedstion-features li {
        text-align: left;
        max-width: 400px;
        width: 100%;
        margin: 0 0 12px 0;
    }
    .jedstion-image {
        order: -1; /* Mover imagen arriba en móvil */
    }
}

/* =========================================
   Contact Section
   ========================================= */
.contact-section {
    padding: 6rem 2rem;
    max-width: 1200px; /* Aumentado para el grid */
    margin: 0 auto;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: stretch;
}

.contact-info, .contact-map {
    display: flex;
    flex-direction: column;
}

.contact-card {
    background: var(--card-bg);
    border: 2px solid var(--accent); /* Recuadro del color rojo corporativo */
    border-radius: 24px;
    padding: 2.5rem; /* Reducido un poco para mayor elegancia */
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
    text-align: left;
    flex: 1; /* Estirar para llenar el contenedor */
}

.map-frame {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    flex: 1; /* Estirar para llenar el contenedor */
    display: flex;
}

.map-frame iframe {
    transition: filter 1s ease;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 250px; /* Altura mínima razonable */
}

/* Solo modo oscuro requiere filtro */
body:not(.light-mode) .map-frame iframe {
    filter: invert(90%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-card {
        padding: 2rem 1.5rem;
    }

    .map-frame {
        height: 350px; /* Altura fija para el mapa en móvil */
    }
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-item p {
    color: var(--text-main);
    font-size: 1.1rem;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
    padding: 0 1rem;
}

.section-footer p {
    font-size: 1.1rem;
    color: var(--text-main);
    opacity: 0.9;
    font-style: italic;
}

/* =========================================
   Industries Section
   ========================================= */
.industries-section {
    padding: 4rem 0;
    background: var(--bg-main);
}

.industries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 220px));
    gap: 1.5rem;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.industry-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.industry-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: var(--accent);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    background: var(--glass-bg);
}

.industry-card:hover .industry-icon {
    transform: scale(1.2) rotate(5deg);
    transition: transform 0.3s ease;
}

.industry-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.industry-card p {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-main);
}

/* =========================================
   Solutions Section
   ========================================= */
.solutions-section {
    padding: 4rem 0;
    background: rgba(11, 19, 43, 0.3); /* Ligero fondo diferencial */
}

body.light-mode .solutions-section {
    background: rgba(0, 0, 0, 0.02);
}

.solutions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.solution-card {
    flex: 0 0 calc(25% - 0.9rem);
    min-width: 220px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.solution-card:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-5px) scale(1.05); /* Elevación más marcada */
    box-shadow: 0 15px 35px rgba(0, 255, 136, 0.4);
}

.solution-card:hover p, 
.solution-card:hover .solution-icon {
    color: #000; /* Contraste sobre el verde accent */
}

.solution-card:hover p {
    color: white;
}

.solution-icon {
    font-size: 1.8rem;
    min-width: 50px;
    height: 50px;
    background: rgba(58, 80, 107, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.solution-card:hover .solution-icon {
    background: rgba(255, 255, 255, 0.2);
}

.solution-card p {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-main);
    transition: color 0.3s ease;
}

/* =========================================
   Why JEDS Section
   ========================================= */
.why-us-section {
    padding: 4rem 0;
}

.why-us-list {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 en la primera fila */
    gap: 1.2rem;
    padding: 0 1.5rem;
}

/* Centrar los 3 items de la segunda fila si hay 7 en total */
.why-us-item:nth-child(n+5) {
    grid-column: span 1;
}

/* Ajuste específico para que la segunda fila de 3 quede "centrada" bajo la de 4 */
@media (min-width: 1151px) {
    .why-us-list {
        grid-template-columns: repeat(12, 1fr);
    }
    .why-us-item:nth-child(-n+4) {
        grid-column: span 3;
    }
    .why-us-item:nth-child(5) {
        grid-column: 3 / span 3;
    }
    .why-us-item:nth-child(6) {
        grid-column: 6 / span 3;
    }
    .why-us-item:nth-child(7) {
        grid-column: 9 / span 3;
    }
}

.why-us-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.why-us-item:hover {
    transform: scale(1.02);
    border-color: var(--accent);
    background: var(--glass-bg);
}

.why-us-item:hover .check-icon {
    transform: scale(1.3);
    transition: transform 0.3s ease;
}

.check-icon {
    color: #00ff88; /* Verde brillante para positivismo */
    font-size: 1.5rem;
    font-weight: bold;
    min-width: 30px;
}

.why-us-item p {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
}

/* =========================================
   Home Jedstion Promo Banner
   ========================================= */
.home-jedstion-promo {
    position: relative;
    padding: 6rem 2rem; /* Balanceado (ni 8rem ni 4rem) para que respire bien */
    background-image: url('../assets/hero_bg2.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
}

.jedstion-promo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 30, 0.85); /* Overlay oscuro profundo */
    z-index: 1;
    transition: background-color 0.3s ease;
}

/* Light Mode Overrides for Banner */
body.light-mode .jedstion-promo-overlay {
    background: rgba(245, 247, 250, 0.9); /* Overlay blanquecino como en one-page */
}

body.light-mode .jedstion-promo-text {
    color: var(--text-main); /* Texto gris oscuro de lectura fluida */
}

.home-jedstion-promo .centered-container {
    position: relative; 
    z-index: 10; 
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.jedstion-promo-logo {
    max-width: 380px; /* Tamaño intermedio equilibrado */
    width: 100%;
    margin: 0 auto 1.5rem auto; 
    display: block;
    filter: none !important; /* Fuerza a ignorar cualquier oscurecimiento del Dark Mode global */
}

.jedstion-promo-text {
    font-size: 1.15rem;
    color: #ffffff; /* Blanco base para modo oscuro */
    line-height: 1.6;
    margin: 0 auto 2.5rem auto;
    font-weight: 300;
    max-width: 650px;
    transition: color 0.3s ease;
}

.jedstion-promo-btn {
    display: inline-flex;
    justify-content: center;
    position: relative;
    z-index: 10; 
}

/* =========================================
   Footer
   ========================================= */
.footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--card-border);
    margin-top: 4rem;
}

body.light-mode .footer {
    color: #000000;
}

.footer .rights {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* =========================================
   Animations classes
   ========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Responsive adjustments */
@media (max-width: 1150px) {
    .navbar {
        width: 100%;
        top: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        padding: 0 1.5rem; /* Dar un poco de aire en móvil */
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: 0;
        background: rgba(11, 19, 43, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        overflow: hidden;
        transition: height 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 999;
        border-bottom: 1px solid var(--card-border);
    }

    .nav-links.active {
        height: calc(100vh - 60px);
    }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: 500;
    }

    .lang-selector {
        margin-top: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 120px;
    }

    .carousel-arrow {
        display: flex;
        position: absolute;
        top: 40%; /* Un poco más arriba del centro para esquivar textos largos si los hay */
        transform: translateY(-50%);
        z-index: 10;
        background: var(--accent);
        color: white;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        font-size: 1.2rem;
        transition: transform 0.2s;
    }
    
    .carousel-arrow:active {
        transform: translateY(-50%) scale(0.9);
    }
    
    .carousel-arrow.prev { left: -5px; }
    .carousel-arrow.next { right: -5px; }

    .services-grid, 
    .industries-grid, 
    .solutions-grid, 
    .why-us-list {
        display: flex;
        flex-wrap: nowrap;
        padding-bottom: 2rem;
        width: 100%;
        /* No usamos overflow-x porque lo maneja JS con translateX */
        gap: 0; /* JS controla el ancho */
    }

    .service-card, 
    .industry-card, 
    .solution-card, 
    .why-us-item {
        flex: 0 0 84%; /* Ocupa casi todo el ancho para que se vea el anterior/siguiente */
        margin: 0 8%; /* Centrado perfecto (8+84+8=100) */
        box-sizing: border-box;
    }

    /* Reset de layouts de grilla/flex anteriores para que el carrusel funcione */
    .why-us-list {
        grid-template-columns: 1fr !important;
    }
    .why-us-item {
        grid-column: span 1 !important;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .company-content {
        padding: 3rem 1.5rem;
    }

    .company-text p.lead {
        font-size: 1.25rem;
    }

    .company-text p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .logo-island {
        padding: 4px 12px;
    }

    .logo-subtitle {
        font-size: 0.4rem;
        letter-spacing: 0.5px;
    }

    .hero-content h1 {
        font-size: 2.1rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 0 2rem;
    }

    .btn {
        width: 100%;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .contact-card, .service-card {
        padding: 2rem 1.25rem;
    }

    .jedstion-info h2 {
        font-size: 2.5rem;
    }
}

/* =========================================
   Jedstion Promo Responsive
   ========================================= */
@media (max-width: 768px) {
    .home-jedstion-promo {
        padding: 5rem 1.5rem;
    }
    .jedstion-promo-logo {
        max-width: 280px;
    }
    .jedstion-promo-text {
        font-size: 1.1rem;
    }
}
