@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* --- Variables del Sistema de Diseño (Tema Claro del Logo) --- */
:root {
    --bg-main: #f5f8fc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f6fa;
    --primary-cyan: #009cb0; /* Ajustado para contraste y legibilidad en fondos claros */
    --primary-cyan-bright: #00f0ff; /* Cian de logo para decoraciones y bordes */
    --primary-blue: #004b80; /* El azul acero del logo de la J */
    --primary-blue-glow: rgba(0, 75, 128, 0.08);
    --text-main: #132a3e; /* Azul oscuro del texto del logo */
    --text-muted: #5e778d; /* Muted del texto del logo */
    --accent-green: #25d366;
    --accent-blue: #0077ff;
    --border-tech: rgba(0, 75, 128, 0.08);
    --border-tech-hover: rgba(0, 156, 176, 0.3);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Fuentes */
    --font-titles: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Reseteos Globales --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-body);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Componentes de Navegación --- */
.main-header {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-tech);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 30px rgba(0, 180, 216, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    transition: var(--transition-smooth);
}

.main-header.scrolled .nav-container {
    padding: 8px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
}

.brand-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary-cyan);
}

.brand-text h1 {
    font-size: 1.3rem;
    font-weight: 800;
    font-family: var(--font-titles);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    line-height: 1;
}

.brand-jc {
    background: linear-gradient(135deg, var(--primary-blue) 40%, var(--primary-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.brand-title-text {
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-cyan);
}

.btn-nav {
    background-color: transparent;
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-nav:hover {
    background-color: var(--accent-green);
    color: #fff;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.3);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Sección Hero --- */
.hero-section {
    position: relative;
    padding: 180px 0 120px;
    background: radial-gradient(circle at top right, rgba(0, 156, 176, 0.1), rgba(0, 75, 128, 0.06)), var(--bg-surface);
    border-bottom: 1px solid var(--border-tech);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-tag {
    color: var(--primary-cyan);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 15px;
    font-family: var(--font-titles);
}

.hero-section h2 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 25px;
    font-weight: 800;
    color: var(--text-main);
}

.hero-section p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-primary-tech, .btn-secondary-tech {
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-primary-tech {
    background-color: var(--primary-blue);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 75, 128, 0.2);
}

.btn-primary-tech:hover {
    background-color: #00365d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 75, 128, 0.3);
}

.btn-secondary-tech {
    background-color: rgba(0, 75, 128, 0.05);
    color: var(--primary-blue);
    border: 1px solid rgba(0, 75, 128, 0.15);
}

.btn-secondary-tech:hover {
    background-color: rgba(0, 75, 128, 0.15);
    transform: translateY(-2px);
}

/* --- Sección de Servicios & Sistema de Pestañas --- */
.services-section {
    padding: 100px 0;
    background-color: var(--bg-surface);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.tabs-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.tab-btn {
    background-color: var(--bg-main);
    border: 1px solid var(--border-tech);
    color: var(--text-muted);
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tab-btn:hover, .tab-btn.active {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background-color: rgba(0, 75, 128, 0.06);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

/* --- Estilos de Carrusel de Servicios (Zoom Central) --- */
.carousel-container {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    overflow: hidden;
    padding: 30px 10px;
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    gap: 30px;
    padding: 20px 0;
}

.carousel-slide {
    flex: 0 0 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease, filter 0.5s ease;
    opacity: 0.5;
    transform: scale(0.9);
    filter: blur(1px);
}

.carousel-slide.center {
    opacity: 1;
    transform: scale(1.1);
    filter: none;
    z-index: 5;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-tech);
    color: var(--primary-blue);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.carousel-btn:hover {
    background-color: var(--primary-blue);
    color: #ffffff;
    border-color: var(--primary-blue);
    box-shadow: 0 4px 15px rgba(0, 75, 128, 0.2);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

.service-card {
    background-color: var(--bg-card);
    padding: 40px 30px;
    border-radius: 12px;
    border: 1px solid var(--border-tech);
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-tech-hover);
    box-shadow: 0 10px 30px rgba(0, 75, 128, 0.06);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary-cyan);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.35rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Sección Especialidades/Métricas --- */
.experience-section {
    padding: 100px 0;
}

.tech-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    flex-wrap: wrap;
}

.tech-text {
    flex: 1;
    min-width: 300px;
}

.tech-text h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.tech-list {
    list-style: none;
    margin-top: 25px;
}

.tech-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tech-list i {
    color: var(--primary-cyan);
}

.tech-stats {
    display: flex;
    gap: 30px;
}

.stat-box {
    background-color: var(--bg-surface);
    padding: 45px;
    border-radius: 12px;
    text-align: center;
    min-width: 200px;
    border: 1px solid var(--border-tech);
    box-shadow: 0 4px 15px rgba(0, 75, 128, 0.03);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-blue);
    display: block;
}

/* --- Footer --- */
.main-footer {
    background-color: #0a1b2d; /* Azul profundo y elegante de la marca */
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-tech);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info h3 {
    font-family: var(--font-titles);
    font-size: 1.25rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
    color: var(--primary-cyan);
}

.footer-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-contact h4 {
    font-family: var(--font-titles);
    margin-bottom: 20px;
    color: var(--text-main);
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 8px;
}

.footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-cyan);
}

.footer-contact ul {
    list-style: none;
}

.footer-contact li {
    margin-bottom: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.footer-contact li i {
    color: var(--primary-cyan);
    width: 16px;
}

.footer-contact li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-contact li a:hover {
    color: var(--primary-cyan);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- Títulos Globales --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-titles);
    font-weight: 700;
}

/* --- Páginas Internas (Comunes) --- */
.page-hero {
    padding: 140px 0 60px;
    background: linear-gradient(180deg, rgba(0, 86, 179, 0.1) 0%, rgba(3, 8, 15, 0) 100%);
    border-bottom: 1px solid var(--border-tech);
    text-align: center;
}

.page-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    background: linear-gradient(120deg, var(--text-main), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Estilos para la sección de Contacto (3 Ubicaciones) --- */
.contact-section {
    padding: 80px 0;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.location-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-tech);
    border-radius: 12px;
    padding: 30px;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.location-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-tech-hover);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.1);
}

.location-icon {
    font-size: 2rem;
    color: var(--primary-cyan);
    margin-bottom: 20px;
}

.location-card h3 {
    font-size: 1.35rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.location-details {
    list-style: none;
    margin-bottom: 25px;
    flex-grow: 1;
}

.location-details li {
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.location-details li i {
    color: var(--primary-cyan);
    margin-top: 4px;
}

.btn-map {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: rgba(0, 240, 255, 0.05);
    color: var(--primary-cyan);
    border: 1px solid var(--border-tech);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    width: 100%;
}

.btn-map:hover {
    background-color: var(--primary-cyan);
    color: #03080f;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

/* --- Estilos para la sección de Proyectos/Portafolio --- */
.projects-section {
    padding: 80px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-tech);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-tech-hover);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.1);
}

.project-img {
    width: 100%;
    height: 200px;
    background-color: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-tech);
}

.project-img i {
    font-size: 4rem;
    color: rgba(0, 240, 255, 0.25);
    transition: var(--transition-smooth);
}

.project-card:hover .project-img i {
    transform: scale(1.1);
    color: rgba(0, 240, 255, 0.5);
}

.project-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(3, 8, 15, 0.85);
    border: 1px solid var(--primary-cyan);
    color: var(--primary-cyan);
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.project-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-tech-tag {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 2px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
}

/* --- Formulario de Contacto --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.contact-form-container {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-tech);
    border-radius: 12px;
    padding: 40px;
}

.contact-form-container h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.contact-form-container p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-tech);
    border-radius: 6px;
    padding: 12px 16px;
    color: var(--text-main);
    font-family: var(--font-body);
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    background-color: var(--primary-cyan);
    color: #03080f;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
}

.btn-submit:hover {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
    transform: translateY(-2px);
}

/* --- Animaciones & Responsive --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media(max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 768px) {
    .nav-container {
        padding: 12px 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(3, 8, 15, 0.98);
        border-bottom: 1px solid var(--border-tech-hover);
        padding: 25px 0;
        box-shadow: 0 15px 30px rgba(0,0,0,0.8);
        backdrop-filter: blur(10px);
    }
    
    .nav-menu.active {
        display: block;
        animation: fadeIn 0.3s ease-in-out;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .menu-toggle {
        display: block;
        color: var(--primary-cyan);
    }
    
    .hero-section h2 {
        font-size: 2.2rem;
    }
    
    .tech-stats {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .page-hero h1 {
        font-size: 2.2rem;
    }

    /* Carrusel móvil */
    .carousel-track {
        gap: 10px;
    }
    
    .carousel-slide {
        flex: 0 0 75%;
        max-width: 75%;
        opacity: 0.4;
        transform: scale(0.85);
    }
    
    .carousel-slide.center {
        opacity: 1;
        transform: scale(1.05);
    }
    
    .carousel-container {
        padding: 20px 5px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* --- Modal de Servicios --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 27, 45, 0.45);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-tech);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 75, 128, 0.2);
    overflow: hidden;
    opacity: 0;
    transform: scale(0.85) translateY(30px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    position: relative;
}

.modal-overlay.active .modal-container {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 10;
    background: rgba(255, 255, 255, 0.85);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-tech);
}

.modal-close:hover {
    color: var(--primary-blue);
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 75, 128, 0.1);
}

.modal-header-img {
    width: 100%;
    height: 280px;
    background-color: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-tech);
    position: relative;
    overflow: hidden;
    padding: 0;
}

.modal-header-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-header-img i {
    font-size: 5rem;
    color: rgba(0, 75, 128, 0.15);
}

.modal-content-body {
    padding: 30px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-content-body h3 {
    font-size: 1.6rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.modal-content-body p {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.6;
}

.modal-footer-actions {
    display: flex;
    gap: 15px;
}

/* --- Transición Profesional de Páginas --- */
body {
    animation: pageFadeIn 0.35s ease-out forwards;
    opacity: 0;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* --- Botón Flotante de WhatsApp --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: var(--accent-green);
    color: #ffffff !important;
    border-radius: 50%;
    text-align: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.whatsapp-float:hover {
    background-color: #20ba5a;
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* --- Variables y Reglas Especiales del Modo Oscuro --- */
body.dark-theme {
    --bg-main: #060e17; /* Gris-azul extremadamente oscuro */
    --bg-surface: #0a1420; /* Superficie/Cartas en tono oscuro */
    --bg-card: #0d1b2a;
    --bg-card-hover: #12253a;
    --border-tech: rgba(0, 240, 255, 0.08);
    --border-tech-hover: rgba(0, 240, 255, 0.35);
    --text-main: #e2f0fd; /* Texto principal claro */
    --text-muted: #8fa0b5; /* Texto secundario apagado */
    --primary-blue: #0087db; /* Azul acero más brillante para contraste */
    --primary-blue-glow: rgba(0, 240, 255, 0.05);
}

body.dark-theme .main-header {
    background-color: rgba(10, 20, 32, 0.95);
}

body.dark-theme .brand-logo-img {
    filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.35));
}

body.dark-theme .main-header.scrolled {
    background-color: rgba(6, 14, 23, 0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

body.dark-theme .brand-title-text {
    color: #ffffff;
}

body.dark-theme .project-tech-tag {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .tab-btn {
    background-color: #0d1b2a;
}

body.dark-theme .tab-btn:hover, body.dark-theme .tab-btn.active {
    background-color: rgba(0, 240, 255, 0.06);
    color: var(--primary-cyan);
}

body.dark-theme .btn-secondary-tech {
    background-color: rgba(255, 255, 255, 0.03);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .btn-secondary-tech:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* --- Botón del Interruptor de Modo Oscuro (Header) --- */
.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.theme-toggle-btn:hover {
    color: var(--primary-cyan);
    background-color: rgba(0, 156, 176, 0.08);
}

/* --- FAQ Accordion (Preguntas Frecuentes) --- */
.faq-section {
    padding: 100px 0;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-tech);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-tech);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-item:hover {
    border-color: var(--border-tech-hover);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.02);
}

.faq-question {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.faq-question h3 {
    font-size: 1.05rem;
    margin: 0;
    font-weight: 600;
    color: var(--text-main);
}

.faq-icon {
    font-size: 0.9rem;
    color: var(--primary-cyan);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.25, 1, 0.5, 1), padding 0.35s ease;
    padding: 0 25px;
}

.faq-item.active .faq-answer {
    padding: 0 25px 20px 25px;
}

.faq-answer p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Testimonial Slider --- */
.testimonials-section {
    padding: 100px 0;
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-tech);
}

.testimonial-slider-container {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
    overflow: hidden;
    padding: 20px 10px;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.testimonial-slide {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 10px 20px;
    opacity: 0.2;
    transition: opacity 0.5s ease;
}

.testimonial-slide.active {
    opacity: 1;
}

.testimonial-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-tech);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 75, 128, 0.02);
    position: relative;
    transition: var(--transition-smooth);
}

.testimonial-card:hover {
    border-color: var(--border-tech-hover);
}

.testimonial-quote-icon {
    font-size: 2.5rem;
    color: var(--primary-cyan);
    opacity: 0.15;
    margin-bottom: 15px;
    display: block;
}

.testimonial-text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 25px;
}

.testimonial-stars {
    color: #ffb703;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.testimonial-author-name {
    font-family: var(--font-titles);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.testimonial-author-role {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(0, 156, 176, 0.2);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.testimonial-dot.active {
    background-color: var(--primary-cyan);
    width: 25px;
    border-radius: 10px;
}

/* --- Widget del Asistente Virtual de IA (Chatbot) --- */
.ai-chat-bubble {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background: #ffffff;
    border: 2px solid var(--primary-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 156, 176, 0.25);
    z-index: 1500;
    transition: var(--transition-smooth);
    outline: none;
    padding: 0;
}

body.dark-theme .ai-chat-bubble {
    background: var(--bg-surface);
    border-color: var(--primary-cyan-bright);
    box-shadow: 0 8px 24px rgba(0, 240, 255, 0.3);
}

.ai-chat-bubble-logo-container {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px;
}

.ai-chat-bubble-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.ai-chat-bubble:hover .ai-chat-bubble-logo {
    transform: scale(1.1);
}

.ai-chat-bubble-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background-color: var(--accent-green);
    border: 2px solid #ffffff;
    border-radius: 50%;
    animation: pulseGlow 1.8s infinite;
}

body.dark-theme .ai-chat-bubble-badge {
    border-color: var(--bg-surface);
}

.ai-chat-bubble:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 28px rgba(0, 156, 176, 0.4);
}

.ai-chat-window {
    position: fixed;
    bottom: 105px;
    right: 30px;
    left: auto;
    width: 350px;
    height: 480px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-tech);
    border-radius: 16px;
    box-shadow: 0 15px 45px rgba(0, 75, 128, 0.15);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.85) translateY(30px);
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.ai-chat-window.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* Cabecera del Chat */
.ai-chat-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-cyan) 100%);
    color: #ffffff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-chat-avatar {
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #ffffff;
}

.ai-chat-title h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.ai-chat-status {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 5px;
}

.ai-chat-status-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-green);
    border-radius: 50%;
    display: inline-block;
    animation: pulseGlow 1.8s infinite;
}

.ai-chat-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.ai-chat-close:hover {
    color: #ffffff;
    transform: scale(1.1);
}

/* Área de Mensajes */
.ai-chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: var(--bg-main);
}

.ai-chat-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.ai-chat-msg.bot {
    background-color: var(--bg-surface);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid var(--border-tech);
}

.ai-chat-msg.user {
    background-color: var(--primary-blue);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.ai-chat-msg a.chat-btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--accent-green);
    color: #ffffff !important;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 10px;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
}

.ai-chat-msg a.chat-btn-wa:hover {
    background-color: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.35);
}

/* Indicador de Escritura */
.typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 4px 8px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-muted);
    border-radius: 50%;
    opacity: 0.4;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Entrada de Chat */
.ai-chat-input-area {
    padding: 15px;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-tech);
    display: flex;
    gap: 10px;
    align-items: center;
}

.ai-chat-input {
    flex-grow: 1;
    background-color: var(--bg-main);
    border: 1px solid var(--border-tech);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-smooth);
}

.ai-chat-input:focus {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 10px rgba(0, 156, 176, 0.1);
}

.ai-chat-send-btn {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-cyan) 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

.ai-chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 156, 176, 0.2);
}

/* Reglas Especiales de Modo Oscuro para Chatbot */
body.dark-theme .ai-chat-msg.bot {
    background-color: var(--bg-card);
}

body.dark-theme .ai-chat-window {
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
}

/* Animaciones */
@keyframes pulseGlow {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 5px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Adaptabilidad móvil */
@media(max-width: 480px) {
    .ai-chat-window {
        width: calc(100% - 40px);
        height: 420px;
        right: 20px;
        left: auto;
        bottom: 90px;
    }
    
    .ai-chat-bubble {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        left: auto;
    }
}

/* Botones de opción rápida en el Chatbot */
.chat-options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.chat-option-btn {
    background-color: var(--bg-main);
    color: var(--primary-blue);
    border: 1px solid var(--border-tech);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.chat-option-btn:hover {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-cyan) 100%);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 156, 176, 0.15);
}

body.dark-theme .chat-option-btn {
    background-color: var(--bg-card);
    color: var(--primary-cyan);
    border-color: var(--border-tech);
}

body.dark-theme .chat-option-btn:hover {
    color: #ffffff;
}