/* =========================================
    SIDEBAR BIO-TECH - SCROLL & RESPONSIVE
   ========================================= */
@import url('colores.css'); 

:root {
    --nav-height: 90px;
    --nav-height-scrolled: 65px;
    --side-width: 320px;
    --speed: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --accent: var(--color-primario);
    --side-bg: #fdfaf5;
}

/* --- NAVBAR BASE --- */
.navbar-tech {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: var(--nav-height);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all var(--speed);
    z-index: 1050;
    padding: 0 1rem;
    display: flex;
    align-items: center;
}

/* --- ESTADO SCROLLED --- */
.navbar-tech.scrolled {
    height: var(--nav-height-scrolled);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* --- LOGOTIPO Y MARCA --- */
.navbar-brand {
    z-index: 1060;
    display: flex !important;
    align-items: center;
    gap: clamp(8px, 2vw, 15px);
    max-width: 70%; 
    text-decoration: none;
    transition: all var(--speed);
}

.logo-img {
    height: clamp(40px, 8vh, 55px) !important;
    width: auto !important;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all var(--speed);
}

.navbar-tech.scrolled .logo-img {
    height: 42px !important;
    border-radius: 10px;
}

.brand-info {
    display: flex; flex-direction: column; line-height: 1.1;
}

.brand-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1rem, 4vw, 1.4rem);
    color: var(--color-brand-black);
    white-space: nowrap;
    transition: font-size var(--speed);
}

.navbar-tech.scrolled .brand-title {
    font-size: clamp(0.95rem, 3.5vw, 1.2rem);
}

.brand-title .highlight-brand {
    color: var(--accent); font-style: italic; font-weight: 700;
}

.brand-subtitle {
    font-size: clamp(0.5rem, 1.5vw, 0.65rem);
    color: #888; letter-spacing: 1.5px;
    text-transform: uppercase; font-weight: 600;
    transition: opacity var(--speed);
}

/* --- BOTÓN HAMBURGUESA --- */
.custom-toggler {
    border: none !important;
    background: #f1f3f5 !important;
    width: 45px; height: 45px;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center; justify-content: center;
    transition: all var(--speed);
    z-index: 1100 !important; 
    position: relative;
    cursor: pointer;
    margin-left: auto;
}

.navbar-tech.scrolled .custom-toggler {
    width: 40px; height: 40px;
}

.navbar-tech:has(.show) .custom-toggler {
    transform: translateX(calc((var(--side-width) * -1) + 55px));
    background: var(--accent) !important;
}

.navbar-tech:has(.show) .custom-toggler svg {
    color: white !important;
    transform: none;
}

/* --- ICON TOGGLE (HAMBURGUESA A X) --- */
.custom-toggler .icon-close {
    display: none;
}

.custom-toggler[aria-expanded="true"] .icon-menu {
    display: none;
}

.custom-toggler[aria-expanded="true"] .icon-close {
    display: block;
}

/* --- SIDEBAR (MEJORADO) --- */
.navbar-collapse.full-screen-menu {
    position: fixed !important;
    top: 0; right: 0;
    width: var(--side-width);
    height: 100vh !important;
    background: linear-gradient(165deg, var(--side-bg) 80%, #ffffff 100%);
    padding: 110px 2rem 2rem 2rem;
    border-left: 5px solid var(--accent);
    box-shadow: -20px 0 60px rgba(0,0,0,0.1);
    z-index: 1080 !important;
    display: block !important;
    transform: translateX(105%); 
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    visibility: hidden;
}

.navbar-collapse.full-screen-menu.show {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

/* --- LINKS (ANIMACIÓN ESCALONADA) --- */
.tech-link {
    font-family: 'Roboto', sans-serif;
    color: var(--color-brand-black) !important;
    text-transform: uppercase;
    font-size: clamp(0.95rem, 2vw, 1.05rem) !important;
    font-weight: 700;
    padding: 1.2rem 0 !important;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    display: block;
    text-align: right;
    text-decoration: none;
    position: relative;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-collapse.show .tech-link {
    opacity: 1;
    transform: translateX(0);
}

/* Delays escalonados para items */
.navbar-collapse.show .nav-item:nth-child(1) .tech-link { transition-delay: 0.1s; }
.navbar-collapse.show .nav-item:nth-child(2) .tech-link { transition-delay: 0.15s; }
.navbar-collapse.show .nav-item:nth-child(3) .tech-link { transition-delay: 0.2s; }
.navbar-collapse.show .nav-item:nth-child(4) .tech-link { transition-delay: 0.25s; }
.navbar-collapse.show .nav-item:nth-child(5) .tech-link { transition-delay: 0.3s; }

.tech-link:hover {
    color: var(--accent) !important;
    padding-right: 20px !important;
    letter-spacing: 1px;
}

.tech-link::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.tech-link:hover::after {
    width: 40%;
}

/* --- BOTÓN CONTACTO PREMIUM --- */
.btn-tech-outline {
    display: inline-block;
    float: right;
    padding: 12px 30px;
    margin-top: 1.5rem;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 1.5px;
    text-decoration: none;
    border: 2px solid var(--accent);
    position: relative;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.navbar-collapse.show .nav-item.mt-4 .btn-tech-outline {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.btn-tech-outline::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 0; height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-tech-outline:hover {
    color: #fff !important;
}

.btn-tech-outline:hover::before {
    width: 100%;
}

/* --- AJUSTES MOBILE S --- */
@media (max-width: 350px) {
    :root { 
        --nav-height: 75px;
        --nav-height-scrolled: 60px;
        --side-width: 85vw; 
    }
    .navbar-tech { padding: 0 0.5rem; }
    .brand-subtitle { display: none; }
    .navbar-tech:has(.show) .custom-toggler {
        transform: translateX(calc(-85vw + 45px));
    }
}





/* =========================================
    SIDEBAR DARK - ESTILO CORPOX
   ========================================= */
@import url('colores.css'); 

:root {
    --nav-height: 90px;
    --nav-height-scrolled: 65px;
    --sidebar-bg: #111111; /* Fondo muy oscuro */
    --sidebar-text: #ffffff;
    --sidebar-text-muted: #acacac;
    --accent: var(--color-primario, #0056b3); /* Fallback si no carga var */
    --sidebar-width: 400px;
}

/* --- NAVBAR BASE --- */
.navbar-tech {
    background: rgba(255, 255, 255, 0.95);
    height: var(--nav-height);
    transition: all 0.3s ease;
    padding: 0 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.navbar-tech.scrolled {
    height: var(--nav-height-scrolled);
    background: rgba(255, 255, 255, 0.99);
}

/* --- BOTÓN HAMBURGUESA --- */
.custom-toggler {
    border: none;
    background: #f1f3f5;
    width: 45px; height: 45px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    margin-left: auto; /* Empuja a la derecha */
}
.custom-toggler:hover {
    background: var(--accent);
    color: white;
}

/* --- OVERLAY DE FONDO --- */
.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1080;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}
.sidebar-overlay.active {
    opacity: 1; visibility: visible;
}

/* --- CONTENEDOR PRINCIPAL DEL SIDEBAR --- */
.side-menu-wrapper {
    position: fixed;
    top: 0; right: 0;
    width: var(--sidebar-width);
    max-width: 100%;
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1090;
    transform: translateX(100%); /* Oculto a la derecha */
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    overflow-y: auto; /* Scroll si el contenido es largo */
    padding: 50px 40px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    color: var(--sidebar-text);
    border-left: 5px solid var(--accent);
    

}

.side-menu-wrapper.active {
    transform: translateX(0); /* Visible */
}

/* --- ELEMENTOS INTERNOS DEL SIDEBAR --- */

/* Botón Cerrar (X) */
.close-icon-menu {
    position: absolute;
    top: 30px; right: 30px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
}
.close-icon-menu:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

/* Logo Sidebar */
.logo-side {
    margin-bottom: 40px;
}
.logo-side img {
    max-width: 150px;
    border-radius: 8px;
}

/* Listas de Contacto */
.side-info .contact-list {
    margin-bottom: 30px;
}

.side-info .contact-list h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif; /* O tu fuente de títulos */
}

.side-info .contact-list p,
.side-info .contact-list a {
    display: block;
    color: var(--sidebar-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    text-decoration: none;
    transition: 0.3s;
    font-family: 'Roboto', sans-serif;
}

.side-info .contact-list a:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* Galería (Lightbox) */
.tmp-gallery {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 15px;
    cursor: pointer;
}
.tmp-gallery img {
    width: 100%;
    height: 80px; /* Altura fija para miniaturas */
    object-fit: cover;
    transition: 0.4s;
    display: block;
}
.tmp-gallery:hover img {
    transform: scale(1.1);
    opacity: 0.7;
}

/* Redes Sociales */
.social-icon {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    display: flex;
    gap: 15px;
}
.social-icon li a {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}
.social-icon li a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

/* Shape decorativo (opcional) */
.shape-right-top {
    position: absolute;
    top: 0; right: 0;
    z-index: -1;
    opacity: 0.1;
    pointer-events: none;
}

/* --- RESPONSIVE --- */
@media (max-width: 576px) {
    :root { --sidebar-width: 300px; }
    .side-menu-wrapper { padding: 30px 20px; }
}



/* =========================================
   NUEVOS ESTILOS DEL MENÚ LATERAL (Navigation)
   ========================================= */

.side-navigation {
    margin-bottom: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.primary-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.primary-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.primary-menu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

/* Tipografía de los enlaces */
.primary-menu a .menu-text {
    font-family: 'Playfair Display', serif; /* O tu fuente principal */
    font-size: 1.2rem; /* Texto grande */
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease;
}

/* Flecha animada */
.primary-menu a .menu-arrow {
    width: 20px;
    height: 20px;
    color: var(--accent); /* Usa tu color dorado/amarillo */
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

/* --- HOVER EFFECTS --- */
.primary-menu a:hover {
    padding-left: 10px; /* Desplazamiento sutil */
    color: var(--accent); /* Cambia texto a color acento */
}

.primary-menu a:hover .menu-text {
    font-weight: 600; /* Un poco más grueso al hacer hover */
}

.primary-menu a:hover .menu-arrow {
    opacity: 1;
    transform: translateX(0); /* La flecha entra desde la izquierda */
}

/* --- AJUSTES ESTÉTICOS GENERALES --- */

/* Mejora de la Galería para que no pelee con el menú */
.side-menu-wrapper .row.g-3 {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tmp-gallery img {
    height: 70px; /* Un poco más pequeñas para dar protagonismo al menú */
    opacity: 0.6;
    border-radius: 4px;
}
.tmp-gallery:hover img {
    opacity: 1;
    border-color: var(--accent);
}

/* Ajuste del Logo en el Sidebar */
.logo-side {
    text-align: center; /* Centrar logo */
    margin-bottom: 30px;
    padding-bottom: 20px;
    /* Sin borde abajo para que fluya mejor */
}

/* Scrollbar personalizado para el sidebar (Chrome/Safari) */
.side-menu-wrapper::-webkit-scrollbar {
    width: 6px;
}
.side-menu-wrapper::-webkit-scrollbar-track {
    background: #111;
}
.side-menu-wrapper::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}