
        /* --- 1. VARIABLES & PALETA PRINCIPAL --- */
        :root {
            /* Colores principales */
            --primary-color: #008080; 
            --secondary-color: #0f172a; 
            --accent-color: #00d2d3; 
            --text-dark: #333333;
            
            /* Tarjetas */
            --card-1: #006073da;
            --card-2: #0a9496da;
            --card-3: #ee9b00da;
            --card-4: #af1f12da;

            /* Modo Claro (Por defecto) */
            --bg-body: #ffffff;
            --text-body: #333333;
            --nav-bg-scrolled: rgba(255, 255, 255, 0.95); 
            --nav-text-scrolled: #333333;
            --nav-text-initial: #ffffff;
            --dropdown-bg: #ffffff;
            --dropdown-text: #333;
            --mobile-menu-bg: #ffffff;
            /* Espaciado y Layout */
            --container-width: 1280px;
            
            /* Nuevos: secciones del home */
            --bg-section-alt: #f4f7f6;
            --card-bg: #ffffff;
            --card-shadow: rgba(0, 0, 0, 0.08);
        }

        /* Modo Oscuro */
        body.dark-mode {
            --bg-body: #162038;
            --text-body: #f0f0f0;
            --nav-bg-scrolled: rgba(22, 32, 56, 0.95);
            --nav-text-scrolled: #f0f0f0;
            --nav-text-initial: #ffffff;
            --dropdown-bg: #1f2b45;
            --dropdown-text: #f0f0f0;
            --mobile-menu-bg: #162038;
            
            --bg-section-alt: #0f172a;
            --card-bg: #1f2b45;
            --card-shadow: rgba(0, 0, 0, 0.3);
        }

        /* --- 2. ESTILOS BASE --- */
        body {
            font-family: 'Roboto', sans-serif;
            background-color: var(--bg-body);
            color: var(--text-body);
            transition: background-color 0.3s ease, color 0.3s ease;
            overflow-x: hidden;
        }

        h1, h2, h3, h4, h5 {
            font-family: 'Montserrat', sans-serif;
            font-weight: 700;
            letter-spacing: -0.5px;
        }
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        li, ul { background: transparent; }

        main { padding-top: 0; }
        .container{
                max-width: var(--container-width);
        margin: 0 auto;
        padding: 0 20px;
            }

        /* --- 3. NAVBAR --- */


        /* ---  body:not(.dark-mode) .navbar {
        background-color: var(--nav-bg-scrolled);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px); 
         } --- */
    .dropdown-item {

    font-size: 0.93rem;
    display: block; 
}
         
        .navbar {
            padding: 15px 0;
            transition: all 0.4s ease;
            background: transparent;
            z-index: 1000;
        }

        .navbar.scrolled, 
        .navbar.mobile-open {
            background-color: var(--nav-bg-scrolled);
            padding: 10px 0;
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        .navbar-brand .logo-img {
            height: 55px;
            width: auto;
            display: block;
            transition: all 0.3s ease;
        }

        .nav-link {
            color: var(--nav-text-initial) !important;
            font-weight: 500;
            font-size: 0.95rem;
            text-transform: uppercase;
            margin-left: 15px;
            position: relative;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: color 0.3s;
        }

        .navbar.scrolled .nav-link,
        .navbar.mobile-open .nav-link {
            color: var(--nav-text-scrolled) !important;
        }

        .nav-link::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -2px;
            left: 0;
            background-color: var(--accent-color);
            transition: width 0.3s;
        }

        .dropdown-toggle::after { display: none; }
        .nav-link:hover::after { width: 100%; }

        .navbar-toggler {
            border: none;
            padding: 0;
            outline: none;
            box-shadow: none !important;
        }

        .navbar-toggler-icon {
            width: 30px;
            height: 30px;
            filter: invert(1);
            transition: filter 0.3s ease;
        }

        .navbar.scrolled .navbar-toggler-icon,
        .navbar.mobile-open .navbar-toggler-icon {
            filter: none;
        }
      
        
        body.dark-mode .navbar.scrolled .navbar-toggler-icon,
        body.dark-mode .navbar.mobile-open .navbar-toggler-icon {
            filter: invert(1);
        }

        /* Menú móvil */
        @media (max-width: 991px) {
            .navbar-collapse {
                background-color: transparent !important;
                box-shadow: none !important;
                margin-top: 15px;
                padding: 0;
            }
            
            .navbar-nav {
                align-items: flex-start !important;
            }

            .nav-item { width: 100%; }
            .nav-link {
                color: var(--text-body) !important;
                margin-left: 0;
                padding: 12px 0;
                font-size: 1rem;
                width: 100%;
                justify-content: flex-start;
            }

            .dropdown-menu {
                border: none;
                background: transparent;
                padding-left: 15px;
                box-shadow: none;
                margin-top: 0;
            }
        }

        /* Dropdowns */
        .fa-chevron-down {
            font-size: 0.7em;
            transition: transform 0.3s ease;
        }

        @media (min-width: 992px) {
            .dropdown-menu {
                background-color: var(--dropdown-bg);
                border: none;
                border-radius: 0;
                border-top: 3px solid var(--accent-color);
                box-shadow: 0 10px 30px rgba(0,0,0,0.15);
                padding: 0;
            }
            .dropdown-item {
                color: var(--dropdown-text);
                padding: 12px 20px;
                border-bottom: 1px solid rgba(0,0,0,0.05);
            }
            .dropdown-item:hover {
                background-color: rgba(0, 210, 211, 0.1);
            }
            .dropdown:hover .dropdown-menu {
                display: block;
                animation: fadeInUp 0.3s;
            }
            .dropdown:hover .nav-link .fa-chevron-down {
                transform: rotate(180deg);
            }
        }

        @media (max-width: 991px) {
            .dropdown-item {
                color: var(--text-body);
                padding: 10px 0;
                opacity: 0.8;
            }
            .dropdown-item:hover {
                color: var(--accent-color);
                background: transparent;
            }
            .dropdown.show .fa-chevron-down {
                transform: rotate(180deg);
            }
        }

        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Botón Tema */
        .theme-toggle {
            background: transparent;
            border: 1px solid var(--nav-text-initial);
            color: var(--nav-text-initial);
            padding: 5px;
            border-radius: 50%;
            cursor: pointer;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: 0.3s;
        }

        .navbar.scrolled .theme-toggle,
        .navbar.mobile-open .theme-toggle {
            border-color: var(--nav-text-scrolled);
            color: var(--nav-text-scrolled);
        }

        @media (max-width: 991px) {
            .theme-toggle {
                border-color: var(--text-body);
                color: var(--text-body);
                margin-top: 15px;
                margin-left: 0;
            }
        }

        /* --- 4. EXTRAS DEL NAV (BUSCADOR Y SOCIALES) --- */
        .nav-extras { margin-top: 0; }

        .search-container {
            display: flex;
            align-items: center;
            position: relative;
        }

        .search-input {
            width: 0;
            opacity: 0;
            border: none;
            outline: none;
            background: transparent;
            border-bottom: 2px solid var(--accent-color);
            color: var(--nav-text-initial);
            font-size: 0.9rem;
            padding: 9px 0;
            transition: all 0.4s ease;
            cursor: pointer;
        }
        .nav-hideable {
    transition: all 0.3s ease;
    width: auto;
    opacity: 1;
    visibility: visible;
}
/* --- LÓGICA DE OCULTADO SUAVE --- */

@media (min-width: 992px) {
    /* Clase base para los items que se ocultarán */
    .nav-hideable {
        display: inline-block; /* Importante para poder animar el ancho */
        max-width: 200px;      /* Un ancho máximo estimado para tus botones */
        opacity: 1;
        visibility: visible;
        margin-right: 15px;    /* El margen que tienen tus nav-items */
        transition: 
            max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
            opacity 0.4s ease, 
            margin 0.5s ease, 
            visibility 0.4s;
        overflow: hidden;      /* Evita que el texto se rompa al achicarse */
        white-space: nowrap;
    }

    /* Cuando el buscador está activo (Usando :has para evitar JS) */
    .navbar:has(.search-container.active) .nav-hideable {
        max-width: 0;
        margin-right: 0;
        opacity: 0;
        visibility: hidden;
    }

    /* Suavizamos también la expansión del buscador */
    .search-input {
        transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease !important;
    }

    /* Suavizamos el movimiento de los extras (redes sociales, tema) */
    .nav-extras {
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Aseguramos que el contenedor de resultados no cause saltos */
    .search-results {
        position: absolute;
        top: 100%;
        right: 0;
        width: 400px;
        margin-top: 15px;
        transition: opacity 0.3s ease;
    }
}
        .search-container.active .search-input {
            width: 300px;
            opacity: 1;
            margin-right: 10px;
            padding-left: 5px;
            cursor: text;
        }

        .search-btn {
            background: transparent;
            border: none;
            color: var(--nav-text-initial);
            font-size: 1.1rem;
            cursor: pointer;
            transition: color 0.3s;
            padding: 0;
        }
     
        /* ESTILOS PARA RESULTADOS DE BÚSQUEDA - ADAPTADO A TUS VARIABLES */

        .search-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--dropdown-bg);
            border: 1px solid rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
            max-height: 400px;
            overflow-y: auto;
            display: none;
            z-index: 1000;
            margin-top: 10px;
            /* Hace la barra más delgada */
            scrollbar-width: thin; 
            /* Color del "pulgar" (thumb) y del "riel" (track) */
            scrollbar-color: rgba(0, 0, 0, 0.2) transparent; 
        }
        /* --- ESTILOS PERSONALIZADOS DEL SCROLLBAR --- */

        /* Para Webkit (Chrome, Edge, Safari, Opera) */
        .search-results::-webkit-scrollbar {
            width: 6px; /* Ancho muy discreto */
        }

        .search-results::-webkit-scrollbar-track {
            background: transparent; /* El fondo de la barra es transparente */
        }

        .search-results::-webkit-scrollbar-thumb {
            background-color: rgba(0, 0, 0, 0.2); /* Gris suave semitransparente */
            border-radius: 20px; /* Bordes totalmente redondeados */
            border: 2px solid transparent; /* Truco para dar espacio si se requiere */
            background-clip: content-box;
        }

        .search-results::-webkit-scrollbar-thumb:hover {
            background-color: rgba(0, 0, 0, 0.4); /* Un poco más oscuro al pasar el mouse */
        }

        .search-container.active .search-results {
            display: block;
        }

        .search-results-header {
            padding: 12px 16px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--card-bg);
        }

        .search-results-title {
            font-weight: 600;
            color: var(--text-body);
        }

        .search-results-count {
            background: var(--primary-color);
            color: white;
            font-size: 0.75rem;
            padding: 2px 8px;
            border-radius: 12px;
        }

        .search-results-body {
            padding: 8px 0;
        }

        .search-result-item {
            display: flex;
            align-items: center;
            padding: 10px 16px;
            text-decoration: none;
            color: var(--text-body);
            transition: background-color 0.2s ease;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        }

        .search-result-item:last-child {
            border-bottom: none;
        }

        .search-result-item:hover {
            background-color: var(--bg-section-alt);
        }

        .search-result-img {
            width: 50px;
            height: 50px;
            border-radius: 6px;
            object-fit: cover;
            margin-right: 12px;
            flex-shrink: 0;
        }

        .search-result-content {
            flex: 1;
            min-width: 0;
        }

        .search-result-title {
            font-weight: 600;
            font-size: 0.9rem;
            margin-bottom: 4px;
            color: var(--text-body);

        }

        .search-result-desc {
            font-size: 0.8rem;
            color: var(--text-body);
            margin-bottom: 4px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .search-result-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.75rem;
        }

        .search-result-type {
            background: rgba(0, 128, 128, 0.1); /* --primary-color con opacidad */
            color: var(--primary-color);
            padding: 2px 8px;
            border-radius: 12px;
            font-weight: 500;
        }

        .search-result-date {
            color: var(--text-body);
        }

        .search-results-footer {
            padding: 8px 16px;
            border-top: 1px solid rgba(0, 0, 0, 0.05);
            text-align: center;
            font-size: 0.8rem;
            color: var(--text-body);
        }

        .search-no-results {
            padding: 20px 16px;
            text-align: center;
            color: var(--text-body);
        }

        .search-loading {
            padding: 20px 16px;
            text-align: center;
            color: var(--text-body);
        }

        .search-loading i {
            margin-right: 8px;
        }

        .social-link.placeholder {
            opacity: 0.5;
        }
        /* Clases específicas para tipos de resultados de búsqueda */
        .search-result-type.servicio {
            background: rgba(0, 128, 128, 0.1); /* primary-color teal */
            color: var(--primary-color);
        }

        .search-result-type.proyecto {
            background: rgba(10, 148, 150, 0.1); /* card-2 */
            color: #0a9496;
        }

        .search-result-type.capacitacion {
            background: rgba(238, 155, 0, 0.1); /* card-3 */
            color: #ee9b00;
        }

        .search-result-type.default {
            background: rgba(175, 31, 18, 0.1); /* card-4 */
            color: #af1f12;
        }


        .vertical-divider {
            width: 1px;
            height: 20px;
            background-color: var(--nav-text-initial);
            opacity: 0.5;
            transition: background-color 0.3s;
        }

        .social-link {
            color: var(--nav-text-initial);
            font-size: 1rem;
            transition: color 0.3s, transform 0.2s;
            text-decoration: none;
        }

        .social-link:hover {
            color: var(--accent-color) !important;
            transform: translateY(-2px);
        }

        .search-input::placeholder { color: rgb(191, 191, 191); }

        .navbar.scrolled .search-input,
        .navbar.mobile-open .search-input {
            color: var(--nav-text-scrolled);
        }

        .navbar.scrolled .search-btn,
        .navbar.mobile-open .search-btn {
            color: var(--nav-text-scrolled);
        }

        .navbar.scrolled .vertical-divider,
        .navbar.mobile-open .vertical-divider {
            background-color: var(--nav-text-scrolled);
        }

        .navbar.scrolled .social-link,
        .navbar.mobile-open .social-link {
            color: var(--nav-text-scrolled);
        }

        @media (max-width: 991px) {
            .nav-extras {
                margin-top: 20px;
                flex-direction: column;
                align-items: flex-start !important;
                gap: 15px;
                border-top: 1px solid rgba(0,0,0,0.1);
                padding-top: 20px;
                width: 100%;
            }

            .vertical-divider { display: none; }
            .search-container {
                width: 100%;
                border: 1px solid rgba(0,0,0,0.1);
                padding: 5px 15px;
                border-radius: 20px;
            }
            
            .search-input {
                width: 100% !important;
                opacity: 1;
                border: none;
                color: var(--text-body);
            }

            .search-btn { color: var(--text-body); }
            .social-link {
                color: var(--text-body);
                font-size: 1.2rem;
            }
        }

        /* --- 5. HERO SECTION --- */
        #hero-slider {
            position: relative;
            height: 100vh;
            min-height: 600px;
            background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.2));
        }

        .carousel-item {
            height: 100vh;
            min-height: 600px;
            background-size: cover;
            background-position: center;
        }

        .hero-overlay {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.2));
            display: flex;
            align-items: center;
        }

        .hero-content {
            color: white;
            max-width: 1000px;
            padding-left: 5%;
            padding-right: 5%;
        }

        .hero-title {
            font-size: 2.5rem;
            font-weight: 800;
            line-height: 1.1;
            margin-bottom: 20px;
        }

        .hero-subtitle {
            font-size: 1.25rem;
            font-weight: 300;
            border-left: 4px solid var(--accent-color);
            padding-left: 20px;
            margin-bottom: 35px;
        }

        .btn-hero {
            background-color: var(--primary-color);
            color: white;
            padding: 15px 40px;
            border-radius: 4px;
            font-weight: 600;
            border: none;
            letter-spacing: 1px;
            text-transform: uppercase;
            transition: all 0.3s;
            text-decoration: none;
            display: inline-block;
        }
        
        .btn-hero:hover {
            background-color: var(--accent-color);
            transform: translateY(-3px);
            color: white;
            text-decoration: none;
        }

        /* --- 6. INFO CARDS (HOME) --- */
        .home-info-cards-container {
            position: relative;
            margin-top: -90px;
            z-index: 10;
            padding-bottom: 50px;
        }

        .home-info-card {
            color: white;
            padding: 40px 30px;
            height: 100%;
            transition: all 0.4s ease;
            display: flex;
            flex-direction: column;
            justify-content: center;
            text-align: center;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }
        
        .home-info-card:hover {
            transform: translateY(-2px) !important;
            box-shadow: 0 15px 30px rgba(0,0,0,0.2);
            z-index: 20;
            filter: brightness(1.1) blur(0);
        }
        
        .home-info-card i { font-size: 3rem; margin-bottom: 20px; opacity: 0.9; }
        .home-info-card h4 { font-size: 1.3rem; margin-bottom: 15px; text-transform: uppercase; }
        .home-info-card p { font-size: 0.95rem; opacity: 0.85; }

        .home-bg-card-1 { background-color: var(--card-1); }
        .home-bg-card-2 { background-color: var(--card-2); }
        .home-bg-card-3 { background-color: var(--card-3); }
        .home-bg-card-4 { background-color: var(--card-4); }

        @media (max-width: 991px) {
            .hero-title { 
                margin-top: 10px;
                font-size: 1.5rem; }
            .home-info-cards-container { margin-top: -40px; }
            
            .cards-wrapper-mobile {
                position: relative;
                padding: 0 10px;
            }

            .home-info-cards-container .row {
                display: flex;
                flex-wrap: nowrap;
                overflow-x: auto;
                scroll-behavior: smooth;
                -webkit-overflow-scrolling: touch;
                gap: 15px;
                padding-bottom: 10px;
                scrollbar-width: none;
                -ms-overflow-style: none;
            }
            
            .home-info-cards-container .row::-webkit-scrollbar { display: none; }
            .home-info-cards-container .col-md-6 {
                flex: 0 0 85%;
                max-width: 85%;
                width: 85%;
            }

            .home-info-card {
                border-radius: 10px;
                min-height: 200px;
                padding: 25px 15px;
                box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            }

            .home-info-card i { font-size: 2.2rem; margin-bottom: 15px; }
            .home-info-card h4 { font-size: 1.1rem; margin-bottom: 10px; }
            .home-info-card p { font-size: 0.85rem; line-height: 1.4; }

            .card-arrow {
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                width: 40px;
                height: 40px;
                background-color: var(--accent-color);
                color: white;
                border-radius: 50%;
                border: none;
                z-index: 20;
                display: flex;
                align-items: center;
                justify-content: center;
                box-shadow: 0 4px 10px rgba(0,0,0,0.3);
                opacity: 0.9;
                transition: opacity 0.3s, transform 0.2s;
            }
            
            .card-arrow:active { transform: translateY(-50%) scale(0.95); }
            .card-arrow-left { left: -5px; }
            .card-arrow-right { right: -5px; }
        }

        @media (min-width: 992px) {
            .card-arrow { display: none; }
        }

        /* --- 7. SOBRE NOSOTROS (HOME) --- */
        .home-about-section {
            padding: 100px 0;
            background-color: var(--bg-body);
            overflow: hidden;
        }

        .text-primary-custom { color: var(--primary-color); }
        .text-accent { color: var(--accent-color); }
        .section-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 20px; }

        .service-item i { font-size: 1.2rem; }
        .service-item strong { font-size: 1.05rem; display: block; margin-bottom: 2px; }

        .image-wrapper {
            position: relative;
            z-index: 2;
            display: inline-block;
        }

        .main-engineer-img {
    border-radius: 20px;
    max-width: 500px;
    object-fit: cover;
    position: relative;
    z-index: 2;
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

        .about-blob {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100%;
            height: 100%;
            background: radial-gradient(circle, rgba(0,210,211,0.15) 0%, rgba(255,255,255,0) 70%);
            z-index: 1;
            border-radius: 50%;
        }

        .floating-card {
            position: absolute;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            padding: 15px 20px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            display: flex;
            align-items: center;
            gap: 15px;
            z-index: 3;
            min-width: 180px;
        }

        body.dark-mode .floating-card {
            background: rgba(31, 43, 69, 0.9);
            color: #fff;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        }

        .icon-box {
            width: 45px;
            height: 45px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
        }
        
        .bg-primary-light { background-color: rgba(0, 128, 128, 0.1); color: var(--primary-color); }
        .bg-accent-light { background-color: rgba(0, 210, 211, 0.1); color: var(--accent-color); }

        .card-top-left { top: 1%; left: 45px; }
        .card-bottom-right { bottom: 10%; left: 130px; }
        .card-mid-right { top: 25%; right: 20px; padding: 10px 15px; min-width: auto; border-left: none; }

        @media (max-width: 991px) {
            .section-title { font-size: 2rem; }
            .image-wrapper { margin-top: 40px; transform: scale(0.9); }
            .card-top-left { left: 0; }
            .card-bottom-right { right: 0; }
            .card-mid-right { right: -10px; }
        }

        /* --- 8. SERVICIOS (HOME) --- */
        .home-services-section {
            background-color: var(--bg-section-alt);
            padding: 80px 0;
        }

        .section-subtitle {
            color: var(--accent-color);
            font-weight: 600;
            letter-spacing: 1px;
            text-transform: uppercase;
            font-size: 0.9rem;
            display: block;
            margin-bottom: 10px;
        }

        .section-description {
            max-width: 700px;
            margin: 0 auto 50px auto;
            color: var(--text-body);
            opacity: 0.8;
        }

        .home-service-card {
            background-color: var(--card-bg);
            border-radius: 15px;
            overflow: hidden;
            transition: all 0.4s ease;
            height: 100%;
            box-shadow: 0 10px 30px var(--card-shadow);
            border: 1px solid rgba(0,0,0,0.03);
            position: relative;
            display: flex;
            flex-direction: column;
        }

        .service-img-wrapper {
            position: relative;
            height: 220px;
            overflow: hidden;
        }

        .service-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }

        .service-overlay {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(to top, rgba(0, 128, 128, 0.7), transparent);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .service-content { padding: 30px; flex-grow: 1; position: relative; }

        .service-icon {
            width: 60px;
            height: 60px;
            background-color: var(--card-bg);
            border-radius: 50%;
            position: absolute;
            top: -30px;
            right: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            color: var(--accent-color);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            z-index: 2;
            transition: all 0.3s;
        }

        .service-title {
            font-size: 1.25rem;
            font-weight: 700;
            margin-bottom: 15px;
            transition: color 0.3s;
        }

        .service-text {
            font-size: 0.95rem;
            opacity: 0.8;
            line-height: 1.6;
            margin-bottom: 20px;
        }

        .service-link {
            color: var(--primary-color);
            font-weight: 600;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 0.9rem;
            transition: gap 0.3s;
        }

        .home-service-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.15);
        }

        .home-service-card:hover .service-img { transform: scale(1.1); }
        .home-service-card:hover .service-overlay { opacity: 1; }
        .home-service-card:hover .service-icon {
            background-color: var(--accent-color);
            color: #fff;
        }

        .home-service-card:hover .service-title { color: var(--primary-color); }
        .home-service-card:hover .service-link {
            gap: 10px;
            color: var(--accent-color);
        }

        body.dark-mode .home-service-card { border: 1px solid rgba(255,255,255,0.05); }

        /* --- 9. PROYECTOS (HOME) --- */
        .home-projects-section {
            padding: 80px 0;
            background-color: var(--bg-body);
        }

        .home-project-grid {
            display: grid;
            gap: 20px;
            grid-template-columns: 1fr; 
            grid-auto-rows: 250px;
        }

        .home-project-item {
            position: relative;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            height: 100%; 
            width: 100%;
            display: block;
        }

        @media (min-width: 992px) {
            .home-project-grid {
                grid-template-columns: repeat(3, 1fr); 
                grid-auto-rows: 250px;
            }

            .home-project-item:first-child {
                grid-column: span 2;
                grid-row: span 2;
            }

            .home-project-item:only-child {
                grid-column: span 3;
                grid-row: span 2;
                height: 550px;
            }
            
            .home-project-item:nth-child(2):last-child {
                grid-row: span 2;
            }
        }

        .project-bg {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.6s ease;
        }

        .project-overlay {
            position: absolute;
            bottom: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0.1) 100%);
            opacity: 0.9;
            transition: opacity 0.3s;
        }

        .project-content {
            position: absolute;
            bottom: 0; left: 0;
            padding: 30px;
            width: 100%;
            z-index: 2;
            transform: translateY(20px);
            transition: transform 0.4s ease;
        }

        .home-project-item h3 { font-size: 1.3rem; font-weight: 700; color: white; margin-bottom: 5px; }
        .home-project-item:first-child h3 { font-size: 1.8rem; }

        .project-tag {
            background-color: var(--accent-color);
            color: #fff;
            padding: 5px 12px;
            border-radius: 50px;
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            display: inline-block;
            margin-bottom: 10px;
            box-shadow: 0 2px 10px rgba(0,210,211,0.3);
        }

        .project-location { color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; display: flex; align-items: center; gap: 5px; margin-bottom: 10px; }

        .project-details-hidden {
            height: 0; overflow: hidden; opacity: 0;
            transition: all 0.4s ease;
            border-top: 1px solid rgba(255,255,255,0.2);
            margin-top: 10px; padding-top: 0;
        }
        
        .project-details-hidden p { color: rgba(255,255,255,0.9); font-size: 0.9rem; margin-top: 10px; margin-bottom: 0; }

        .home-project-item:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.2); }
        .home-project-item:hover .project-bg { transform: scale(1.1); }
        .home-project-item:hover .project-content { transform: translateY(0); }
        .home-project-item:hover .project-details-hidden { height: auto; opacity: 1; padding-top: 10px; }

        .btn-outline-custom {
            color: var(--text-body);
            border: 2px solid var(--accent-color);
            padding: 10px 25px;
            font-weight: 600;
            transition: 0.3s;
        }
        
        .btn-outline-custom:hover { background-color: var(--accent-color); color: #fff; }

        /* --- 10. EQUIPO (HOME) --- */
        .home-team-section {
            background-color: var(--bg-section-alt);
            padding: 80px 0;
        }

        .home-team-card {
            background-color: var(--card-bg);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 10px 25px var(--card-shadow);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            height: 100%;
            border: 1px solid rgba(0,0,0,0.05);
            border-top: 5px solid var(--primary-color);
            display: flex;
        }

        .team-sidebar {
            background-color: rgba(0,0,0,0.02);
            padding: 15PX;
            width: 130px;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            border-right: 1px solid rgba(0,0,0,0.05);
            text-align: center;
        }

        .team-img-wrapper {
            width: 90px;
            height: 90px;
            border-radius: 50%;
            overflow: hidden;
            margin-bottom: 20px;
            border: 3px solid var(--accent-color);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }

        .team-img {
            width: 100%;
            height: 100px;
            object-fit: cover;
            transition: transform 0.4s;
        }

        .team-socials {
            display: flex;
            flex-direction: row;
            gap: 10px;
            width: 100%;
            align-items: center;
        }

        .social-btn-team {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background-color: var(--bg-body);
            color: var(--text-body);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
            transition: all 0.3s;
            border: 1px solid rgba(0,0,0,0.1);
            text-decoration: none;
        }

        .social-btn-team:hover {
            background-color: var(--primary-color);
            color: white;
            transform: translateY(-2px);
            border-color: var(--primary-color);
        }

        .team-content {
            padding: 15px;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .team-role {
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            color: var(--accent-color);
            letter-spacing: 1px;
            margin-bottom: 5px;
            display: block;
        }

        .team-name {
            font-size: 1.4rem;
            font-weight: 800;
            margin-bottom: 10px;
            color: var(--text-body);
        }

        .team-desc {
            font-size: 0.9rem;
            opacity: 0.8;
            line-height: 1.6;
            margin-bottom: 15px;
            display: -webkit-box;
            -webkit-line-clamp: 4;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .team-email {
            margin-top: auto;
            font-size: 0.80rem;
            color: var(--primary-color);
            font-weight: 600;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .team-email:hover {
            text-decoration: underline;
            color: var(--accent-color);
        }

        .home-team-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px var(--card-shadow);
        }

        .home-team-card:hover .team-img { transform: scale(1.1); }

        body.dark-mode .team-sidebar {
            background-color: rgba(255,255,255,0.02);
            border-right: 1px solid rgba(255,255,255,0.05);
        }

        @media (max-width: 767px) {
            .home-team-card { flex-direction: column; text-align: center; }
            .team-sidebar {
                width: 100%;
                border-right: none;
                border-bottom: 1px solid rgba(0,0,0,0.05);
                padding: 20px;
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
            }
            .team-img-wrapper {
                margin-bottom: 0;
                width: 70px;
                height: 70px;
            }
            .team-socials { flex-direction: row; width: auto; }
            .team-content { padding: 20px; align-items: center; }
        }

        /* --- 11. FOOTER --- */
        .footer-wave-container {
            line-height: 0;
            width: 100%;
            overflow: hidden;
            background-color: var(--bg-section-alt);
        }

        .footer-wave-svg {
            display: block;
            width: 100%;
            height: 100px !important;
        }

        @media (min-width: 992px) {
            .footer-wave-svg { height: 150px; }
        }

        .main-footer {
            background: linear-gradient(to right,var(--secondary-color), var(--primary-color));
            color: white;
            padding-bottom: 50px;
            position: relative;
            margin-top: -1px;
        }

        .footer-logo { height: 50px; width: auto; }
        .footer-text {
            color: rgba(255, 255, 255, 0.8);
            font-size: 0.95rem;
            line-height: 1.6;
        }

        .footer-title {
            color: white;
            font-weight: 700;
            margin-bottom: 25px;
            position: relative;
            padding-bottom: 10px;
        }

        .footer-title::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 40px;
            height: 3px;
            background-color: var(--accent-color);
        }

        .footer-links {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .footer-links li { margin-bottom: 12px; }
        .footer-links a {
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            transition: all 0.3s;
            display: inline-block;
        }

        .footer-links a:hover {
            color: var(--accent-color);
            padding-left: 5px;
        }

        .footer-contact {
            list-style: none;
            padding: 0;
        }

        .footer-contact li {
            display: flex;
            align-items: flex-start;
            margin-bottom: 15px;
            color: rgba(255, 255, 255, 0.8);
        }

        .footer-contact i {
            color: var(--accent-color);
            margin-right: 12px;
            margin-top: 5px;
        }

        .footer-socials { display: flex; gap: 15px; }
        .social-icon {
            width: 40px;
            height: 40px;
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            text-decoration: none;
            transition: all 0.3s;
            border: 1px solid rgba(255,255,255,0.1);
        }

        .social-icon:hover {
            background-color: var(--accent-color);
            transform: translateY(-3px);
            border-color: var(--accent-color);
            color: var(--text-dark);
        }

        .footer-bottom {
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.6);
        }

        .footer-bottom a {
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            transition: color 0.3s;
        }

        .footer-bottom a:hover { color: var(--accent-color); }


    /* --- 12. PÁGINA DETALLE DE SERVICIO --- */

/* Hero Específico */
.service-hero {
    height: 60vh;
    min-height: 400px;
    position: relative;
    overflow: hidden;
    /* Ajuste importante: Si tu navbar principal es "fixed-top", 
       este margen negativo hace que la foto empiece desde el borde superior de la pantalla */
    margin-top: -30px; 
    padding-top: 80px; /* Compensa el margen para que el texto no quede tapado por el navbar */
}

.service-hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-position: center;
    background-size: cover;
    background-attachment: fixed; /* Efecto Parallax */
    
    filter: blur(30px);
}

.service-hero-overlay {
     position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(0, 128, 128, 0.419));
}

/* Badge Personalizado */
.bg-accent {
    background-color: var(--accent-color) !important;
}

/* Contenido Principal */
.service-detail-section {
    background-color: var(--bg-body);
    color: var(--text-body);
    position: relative; /* Asegura z-index correcto sobre el hero */
}

.custom-list {
    list-style: none;
    padding-left: 0;
}

.custom-list li {
    margin-bottom: 10px;
    font-size: 1rem;
}

/* Alerta personalizada */
.custom-alert {
    background-color: rgba(0, 128, 128, 0.08);
    border-left: 5px solid var(--primary-color);
    color: var(--text-body);
    display: flex;
    align-items: center;
    border-radius: 8px;
}

.custom-alert i {
    color: var(--accent-color);
}

/* SIDEBAR WIDGETS */
.sidebar-wrapper {
    position: sticky;
    top: 100px; /* Se queda fijo al scrollear */
}

.sidebar-widget {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px var(--card-shadow);
    margin-bottom: 30px;
    border: 1px solid rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    display: inline-block;
}

/* Navegación de Servicios */
.service-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-nav-list li {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.service-nav-list li:last-child {
    border-bottom: none;
}

.service-nav-list a {
    display: block;
    padding: 12px 0;
    color: var(--text-body);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.service-nav-list a i {
    margin-right: 10px;
    color: var(--accent-color);
    transition: margin-right 0.3s;
}

.service-nav-list a:hover, 
.service-nav-list a.active {
    color: var(--primary-color);
    padding-left: 10px;
}

.service-nav-list a:hover i {
    margin-right: 15px;
}

/* Widget de Contacto */
.contact-widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-widget-list li {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-widget-list li:last-child { margin-bottom: 0; }

.contact-widget-list .icon {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 128, 128, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.contact-widget-list .info span {
    display: block;
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
}

.contact-widget-list .info a {
    color: var(--text-body);
    text-decoration: none;
    font-weight: 600;
}

.contact-widget-list .info a:hover {
    color: var(--primary-color);
}

/* SECCIÓN RELACIONADOS */
.related-projects-section {
    background-color: var(--bg-section-alt);
}

.related-card {
    display: block;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.related-img-wrapper {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.related-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.related-card:hover .related-img-wrapper img {
    transform: scale(1.1);
}

.related-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: var(--accent-color);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.related-body {
    padding: 20px;
}

.related-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-body);
    margin-bottom: 8px;
}

.related-card:hover .related-title {
    color: var(--primary-color);
}

.related-desc {
    font-size: 0.9rem;
    color: var(--text-body);
    opacity: 0.7;
    margin-bottom: 0;
}

/* Ajustes Dark Mode */
body.dark-mode .custom-alert {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .sidebar-widget {
    border: 1px solid rgba(255,255,255,0.05);
}

    /* --- 13. PÁGINA DETALLE PROYECTO --- */

/* Hero Proyecto */
.project-hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    margin-top: -80px; 
    padding-top: 80px;
    padding: 0;
    isolation: isolate; /* Aisla el contexto de apilamiento */
}
.project-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    filter: blur(30px); /* Reducido o eliminado el blur */
    transform: scale(1.01); /* Sutil escalado para evitar bordes blancos */
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.project-hero-overlay {
    position: absolute;
     top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(0, 128, 128, 0.419));
    z-index: 2;
    pointer-events: none;
}
/* Contenedor del contenido del hero */
.project-hero .container {
    position: relative;
    z-index: 3;
}
/* Eliminar cualquier borde blanco */
.project-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--bg-body);
    z-index: 3;
}


/* --- GALERÍA FACEBOOK --- */
.gallery-section {
    /* Quitamos fondo/padding para que se integre más limpio con el contenido, o lo dejamos sutil */
    background: transparent; 
}

.fb-gallery-grid {
    display: grid;
    grid-gap: 5px;
    height: 450px; /* Altura del collage */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); /* Sombra importante */
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.gallery-item {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
}

.gallery-item img, 
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.05);
}

.video-indicator {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 50px; height: 50px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.5rem;
    border: 2px solid white;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.more-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    transition: background-color 0.3s;
}

.gallery-item:hover .more-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

    /* Estilos opcionales para el indicador de portada en la galería */
.portada-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 193, 7, 0.9);
    color: #000;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    z-index: 2;
}

.portada-indicator i {
    margin-right: 3px;
}

/* Para la etiqueta en el lightbox */
.portada-lightbox-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 193, 7, 0.9);
    color: #000;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    z-index: 1000;
}


/* LAYOUTS DINÁMICOS GRID */
.fb-gallery-grid.layout-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.fb-gallery-grid.layout-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.fb-gallery-grid.layout-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.fb-gallery-grid.layout-3 .gallery-item:first-child { grid-row: span 2; }
.fb-gallery-grid.layout-4 { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 2fr 1fr; }
.fb-gallery-grid.layout-4 .gallery-item:first-child { grid-column: span 3; }
.fb-gallery-grid.layout-5plus { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 2fr 1fr; }
.fb-gallery-grid.layout-5plus .gallery-item:first-child { grid-column: span 3; }

/* --- CONTENIDO HTML --- */
.project-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-body);
}

.project-body h3, .project-body h4, .project-body h5 {
    color: var(--text-body);
    margin-top: 1.5rem;
}

.project-body blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
    font-style: italic;
    color: var(--primary-color);
    margin: 30px 0;
    background: rgba(0, 128, 128, 0.05);
    padding: 20px;
    border-radius: 0 10px 10px 0;
}

/* --- SIDEBAR WIDGETS (DISEÑO MEJORADO) --- */
.sidebar-widget {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px var(--card-shadow); /* Sombra restaurada */
    margin-bottom: 30px;
    border: 1px solid rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    display: inline-block;
    color: var(--text-body);
}

/* Lista Proyectos Relacionados */
.related-projects-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-projects-list li {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 15px;
}

.related-projects-list li:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.related-item-link {
    display: flex;
    text-decoration: none;
    align-items: center;
    transition: transform 0.3s;
}

.related-item-link:hover {
    transform: translateX(5px);
}

.related-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 15px;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-info h6 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-body);
    line-height: 1.3;
}

.related-item-link:hover .related-info h6 {
    color: var(--primary-color);
}
/* --- 14. SECCIÓN SERVICIOS RELACIONADOS --- */

.related-services-section {
    background-color: var(--bg-section-alt); /* Fondo gris suave/oscuro alternativo */
    border-top: 1px solid rgba(0,0,0,0.05);
}

.ls-1 { letter-spacing: 1px; }

/* Tarjeta Contenedora */
.related-service-card {
    display: block;
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.03);
}

.related-service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Imagen y Icono Flotante */
.rs-img-wrapper {
    height: 180px;
    position: relative;
    overflow: hidden;
}

.rs-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-service-card:hover .rs-img-wrapper img {
    transform: scale(1.1);
}

.rs-icon {
    position: absolute;
    bottom: -20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 2;
    transition: background-color 0.3s;
}

.related-service-card:hover .rs-icon {
    background-color: var(--primary-color);
}

/* Cuerpo de la tarjeta */
.rs-body {
    padding: 30px 25px 25px 25px; /* Padding top extra por el icono */
}

.rs-title {
    color: var(--text-body);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.related-service-card:hover .rs-title {
    color: var(--primary-color);
}

.rs-desc {
    color: var(--text-body);
    opacity: 0.7;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Máximo 3 líneas */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rs-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.related-service-card:hover .rs-link {
    gap: 10px;
    color: var(--primary-color);
}

/* Dark Mode Adjustments */
body.dark-mode .related-service-card {
    border: 1px solid rgba(255,255,255,0.05);
}

body.dark-mode .related-services-section {
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-badge {
    background-color: rgba(0,0,0,0.05);
    color: var(--text-body);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
}

.tag-badge:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.hover-scale {
    transition: transform 0.3s;
}
.hover-scale:hover {
    transform: translateY(-3px);
}

/* LIGHTBOX */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(5px);
}

.lightbox-overlay.active { opacity: 1; pointer-events: all; }

.lightbox-content { max-width: 90%; max-height: 90%; position: relative; display: flex; flex-direction: column; align-items: center; }
.lightbox-content img, .lightbox-content video { max-width: 100%; max-height: 80vh; border-radius: 4px; box-shadow: 0 0 30px rgba(0,0,0,0.5); }

.lightbox-close { position: absolute; top: 20px; right: 30px; background: none; border: none; color: white; font-size: 2.5rem; cursor: pointer; z-index: 10001; transition: color 0.3s; }
.lightbox-close:hover { color: var(--accent-color); }

.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: none; color: white; font-size: 1.5rem; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; transition: background 0.3s; z-index: 10000; }
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

.lightbox-counter { margin-top: 15px; color: rgba(255,255,255,0.7); font-size: 1rem; letter-spacing: 1px; }

/* Dark Mode Adjustments */
body.dark-mode .sidebar-widget { border: 1px solid rgba(255,255,255,0.05); }
body.dark-mode .tag-badge { background-color: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.1); }
body.dark-mode .project-body blockquote { background: rgba(255,255,255,0.05); }

    /* --- 15. SECCIÓN CAPACITACIONES --- */

/* Hero Training (Evento Destacado) */
.training-hero {
    position: relative;
    padding: 150px 0 80px 0; /* Padding superior alto para compensar navbar fixed */
    margin-top: -30px;
    overflow: hidden;
}

.training-hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Gradiente oscuro corporativo */
    background: radial-gradient(circle at 70% 50%, #1a2a44 0%, #0f172a 100%);
    z-index: -1;
}
.cta-training{
    background: var(--bg-section-alt);
}

.event-meta .meta-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.event-meta i {
    font-size: 1.5rem;
    background: rgba(255,255,255,0.1);
    width: 45px; height: 45px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}

/* Cuenta Regresiva */
.countdown-box {
    display: flex;
    gap: 20px;
}

.time-block {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px 15px;
    border-radius: 8px;
    text-align: center;
    min-width: 80px;
}

.time-block span {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.time-block small {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* Flyer Wrapper (Efecto flotante) */
.hero-flyer-wrapper {
    position: relative;
    padding: 20px;
}

.flyer-img {
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
    transform: rotate(2deg);
    transition: transform 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}

.hero-flyer-wrapper:hover .flyer-img {
    transform: rotate(0deg) scale(1.02);
}

.flyer-backdrop {
    position: absolute;
    top: 0; right: 0;
    width: 100%; height: 100%;
    background: var(--primary-color);
    opacity: 0.2;
    border-radius: 15px;
    transform: rotate(-3deg) scale(0.95);
    z-index: 1;
}

.play-btn-hero {
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid white;
    transition: all 0.3s;
}
.play-btn-hero:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.1);
}

/* --- TARJETAS DE PRÓXIMOS EVENTOS --- */
.upcoming-trainings {
    background-color: var(--bg-body);
}

.event-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px var(--card-shadow);
    transition: transform 0.3s;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.05);
}

.event-card:hover {
    transform: translateY(-8px);
}

.event-thumb {
    height: 200px;
    position: relative;
}

.event-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* Badge de Fecha Flotante */
.event-date-badge {
    position: absolute;
    top: 15px; left: 15px;
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    min-width: 60px;
    line-height: 1;
}

.event-date-badge .day {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
}

.event-date-badge .month {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-color);
}

.platform-badge {
    position: absolute;
    bottom: 15px; right: 15px;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.event-body {
    padding: 25px;
}

.event-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-body);
}

.event-desc {
    font-size: 0.9rem;
    color: var(--text-body);
    opacity: 0.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 15px;
}

.event-footer .organizer {
    font-size: 0.85rem;
    color: var(--text-body);
    font-weight: 500;
    opacity: 0.8;
}

.btn-event-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.btn-event-link:hover { color: var(--accent-color); }



/* CTA CARD */
.cta-card-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.circle-decoration {
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    border: 30px solid rgba(255,255,255,0.05);
    border-radius: 50%;
}

/* Dark Mode Tweaks */
body.dark-mode .event-date-badge {
    background: #2d3748;
}
body.dark-mode .event-date-badge .day { color: white; }
body.dark-mode .past-event-item:hover { background-color: rgba(255,255,255,0.05); }

    /* --- 16. DETALLE CAPACITACIÓN ESTILOS --- */

/* 1. HERO CON IMAGEN DE FONDO */
.training-detail-hero {
    background-color: var(--secondary-color); /* Fallback */
    padding: 160px 0 80px 0; /* Más espacio arriba para navbar fixed */
    margin-top: -30px;
    position: relative;
    overflow: hidden;
}

.td-hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    filter: blur(30px);
}

.td-hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(0, 128, 128, 0.419));
}

/* 2. CONTENIDO PRINCIPAL */
.training-content-section {
    background-color: var(--bg-body);
}

.training-cover-wrapper { position: relative; }

.floating-date-badge {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    padding: 10px 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: var(--primary-color);
    min-width: 70px;
}

/* Estilos de Texto */
.training-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-body);
}

.check-list { list-style: none; padding: 0; margin: 20px 0; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.check-list li::before {
    content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900;
    position: absolute; left: 0; top: 2px; color: var(--accent-color);
}

/* SIDEBAR WIDGETS */
.sidebar-widget {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px var(--card-shadow);
    margin-bottom: 30px;
    border: 1px solid rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    display: inline-block;
    color: var(--text-body);
}

/* Detalles Evento */
.event-details-list { list-style: none; padding: 0; margin: 0; }
.event-details-list li { display: flex; align-items: center; margin-bottom: 20px; }
.event-details-list li:last-child { margin-bottom: 0; }
.event-details-list .icon-box {
    width: 45px; height: 45px;
    background-color: rgba(0, 128, 128, 0.08);
    color: var(--primary-color);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; margin-right: 15px; flex-shrink: 0;
}

/* Animaciones */
.hover-scale { transition: transform 0.3s; }
.hover-scale:hover { transform: translateY(-3px); }

/* --- 3. SECCIÓN OTRAS CAPACITACIONES (MEJORADA) --- */
.other-trainings-section {
    background-color: var(--bg-section-alt); /* Fondo diferente */
    border-top: 1px solid rgba(0,0,0,0.05);
}

.section-header-title::after {
    content: ''; display: block; width: 60px; height: 4px;
    background: var(--accent-color); margin-top: 10px; border-radius: 2px;
}

.card-custom {
    background-color: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    border-radius: 12px; /* Más redondeado */
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

/* Efecto Zoom Imagen Card */
.transition-transform { transition: transform 0.5s ease; }
.hover-lift:hover .transition-transform { transform: scale(1.08); }

.object-fit-cover { object-fit: cover; }

/* Overlay de Fecha en Card */
.date-overlay {
    position: absolute;
    top: 15px; left: 15px;
    background: rgba(0, 128, 128, 0.9); /* Primary color con opacidad */
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 55px;
    backdrop-filter: blur(2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.small-uppercase { font-size: 0.7rem; letter-spacing: 0.5px; }

/* Texto Card */
.card-title-custom {
    font-size: 1.1rem;
    line-height: 1.4;
    transition: color 0.3s;
}
.hover-lift:hover .card-title-custom { color: var(--primary-color); }

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.see-more-link { transition: transform 0.3s; }
.hover-lift:hover .see-more-link { transform: translateX(5px); }

/* Dark Mode Adjustments */
body.dark-mode .event-details-list .icon-box {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--accent-color);
}
body.dark-mode .floating-date-badge { background: #1f2b45; color: white; }
body.dark-mode .date-overlay { background: rgba(31, 43, 69, 0.9); }

    /* --- 17. PÁGINA DE CONTACTO --- */

/* Hero Contacto */
.contact-hero {
    position: relative;
    padding: 180px 0 100px 0;
    margin-top: -80px;
    background-color: var(--secondary-color);
}

.contact-hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: grayscale(30%); /* Un toque sobrio */
}

.contact-hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9) 0%, rgba(0, 128, 128, 0.8) 100%);
}

/* Sección Principal */
.contact-section {
    background-color: var(--bg-section-alt);
}

/* Tarjetas de Información (Izquierda) */
.contact-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px var(--card-shadow);
    border: 1px solid rgba(0,0,0,0.05);
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.info-item:last-child { margin-bottom: 0; }

.icon-circle {
    width: 45px; height: 45px;
    background-color: rgba(0, 128, 128, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
    transition: background-color 0.3s, color 0.3s;
}

.info-item:hover .icon-circle {
    background-color: var(--primary-color);
    color: white;
}

.hover-primary { transition: color 0.3s; }
.hover-primary:hover { color: var(--primary-color) !important; }

/* Widget Mapa (No relevante, pequeño) */
.map-widget-wrapper {
    filter: grayscale(20%);
    transition: filter 0.3s;
}
.map-widget-wrapper:hover { filter: grayscale(0%); }

/* Grid de Redes Sociales */
.social-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.social-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.2s;
    font-size: 1rem;
}

.social-btn:hover { transform: translateY(-3px); color: white; }

/* Colores marcas */
.facebook { background-color: #3b5998; }
.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.twitter { background-color: #1da1f2; }
.linkedin { background-color: #0077b5; }
.tiktok { background-color: #000000; }
.youtube { background-color: #ff0000; }

/* Formulario Wrapper */
.form-wrapper {
    border: 1px solid rgba(0,0,0,0.05);
    background: var(--bg-body);
}

/* Inputs Personalizados */
.form-floating > .form-control,
.form-floating > .form-select {
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background-color: #f8f9fa;
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 128, 128, 0.1);
    background-color: #fff;
}

.form-floating > label {
    color: #999;
}

/* Animación botón */
.hover-scale { transition: transform 0.2s; }
.hover-scale:hover { transform: translateY(-2px); }

/* Dark Mode */
body.dark-mode .contact-card,
body.dark-mode .form-wrapper {
    border: 1px solid rgba(255,255,255,0.05);
}

body.dark-mode .icon-circle {
    background-color: rgba(255,255,255,0.05);
    color: var(--accent-color);
}

body.dark-mode .form-floating > .form-control,
body.dark-mode .form-floating > .form-select {
    background-color: #1a233a; /* Un poco más claro que el fondo dark */
    border-color: rgba(255,255,255,0.1);
    color: white;
}

body.dark-mode .form-floating > label { color: rgba(255,255,255,0.6); }

body.dark-mode .text-dark { color: #f0f0f0 !important; }
