@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif';
}

:root {
    --bg-color: #1f242d;
    --second-bg-color: #323946;
    --text-color: #fff;
    --main-color: #00e0b3;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%; /* Reduje un poco el padding lateral para ganar espacio */
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: 0.3s;
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 600;
    cursor: default;
}

/* Alineación de los enlaces */
.navbar {
    display: flex;
    align-items: center; /* Centra verticalmente los items */
    gap: 2rem; /* Espacio inteligente entre enlaces en vez de margin-left fijo */
}
.navbar a {
    font-size: 1.6rem; /* Un pelín más pequeño para que quepa todo */
    color: var(--text-color);
    font-weight: 500;
    transition: .3s;
    white-space: nowrap; /* Evita que el texto se rompa en dos líneas */
}


.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
}

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

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 2rem;
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
}

span {
    color: var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--second-bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
}
/* ==================== GRUPO DE BOTONES (CV) ==================== */
.btn-group {
    display: flex;
    gap: 1.5rem; /* Espacio entre los botones */
    margin-top: 2rem; /* Separación de los iconos sociales */
}

/* Ajuste para móviles: Si la pantalla es muy pequeña, uno abajo del otro */
@media (max-width: 450px) {
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%; /* Que ocupen todo el ancho en el celu */
        text-align: center;
        margin: 0; /* Reseteamos márgenes si los hubiera */
    }
}

.btn:hover {
    box-shadow: none;
}

.home-content p {
    font-size: 1.6rem;
}

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    margin: 3rem 1.5rem 3rem 0;
    text-decoration: none;
    color: var(--main-color);
    font-size: 2.2rem;
    transition: .5s ease;
}

.social-media a:hover {
    background: var(--main-color);
    color: var(--second-bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}
/* Media query para pantallas más pequeñas (teléfonos móviles) */
@media (max-width: 768px) {
    
    /* Adaptación de la sección "Acerca de Mí" */
    .about-img img {
        /* Reduce el tamaño de la sombra y la separación */
        box-shadow: 0 0 1.5rem var(--main-color);
        margin: 0; /* Asegura que no haya márgenes no deseados */
    }

    /* Adaptación de los contenedores de servicios */
    .services-container .services-box {
        /* Reduce la sombra en los boxes de servicios */
        box-shadow: 0 0 1rem var(--main-color);
    }
}

/* ==================== SECCIÓN ACERCA DE MÍ (VERSIÓN FINAL & LIMPIA) ==================== */

/* Contenedor principal de la sección */
.about {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: var(--second-bg-color);
    padding: 8rem 5% 4rem; /* Espaciado generoso */
    min-height: 100vh;
}

/* Contenedor interno que agrupa Foto + Texto */
.about-container {
    display: flex;
    justify-content: center;
    align-items: center; /* Centrado vertical */
    gap: 4rem; /* Espacio entre foto y texto */
    flex-wrap: wrap; /* MAGIA: Si no caben, se ponen uno debajo del otro automáticamente */
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* --- ESTILOS DE LA FOTO (NEON PULSE) --- */
.about-img {
    /* Flexibilidad: base de 300px, puede crecer y encogerse */
    flex: 1 1 300px; 
    max-width: 400px; /* Límite máximo para que no sea gigante en PC */
    aspect-ratio: 1 / 1; /* Mantiene el círculo perfecto */
    
    position: relative;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;

    /* Efectos de Borde y Neon */
    box-shadow: 
        0 0 0 4px var(--bg-color), 
        0 0 0 8px var(--main-color), 
        0 0 30px var(--main-color), 
        0 0 60px rgba(0, 224, 179, 0.4); 
    
    background: var(--bg-color);
    animation: floatImage 4s ease-in-out infinite;
}

/* Pseudo-elemento para el pulso trasero */
.about-img::before {
    content: '';
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 60%, var(--main-color) 70%);
    opacity: 0.5;
    z-index: -1;
    animation: pulseBorder 3s infinite ease-in-out;
}

.about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    transition: 0.5s ease;
}

.about-img img:hover {
    transform: scale(1.05); /* Zoom sutil al pasar mouse */
}

/* --- ESTILOS DEL TEXTO --- */
.about-content {
    /* Flexibilidad: base de 500px. 
       Esto evita que el texto se aplaste. Si hay menos de 500px, 
       la caja bajará debajo de la imagen gracias al flex-wrap */
    flex: 1 1 500px; 
    text-align: left;
}

.about-content h2 {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.about-content h3 {
    font-size: 2.6rem;
    font-weight: 600;
    margin: 1rem 0;
    color: var(--main-color);
}

.about-content p {
    font-size: 1.6rem;
    line-height: 1.8; /* Más espacio entre líneas para mejor lectura */
    margin-bottom: 2.5rem;
    color: var(--text-color);
}

/* --- ANIMACIONES --- */
@keyframes floatImage {
    0% { transform: translateY(0); }
    50% { transform: translateY(-1.5rem); }
    100% { transform: translateY(0); }
}

@keyframes pulseBorder {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.2; }
}

/* ==================== MEDIA QUERIES UNIFICADAS ==================== */

/* Para Tablets y Laptops pequeñas (menos de 991px) */
@media (max-width: 991px) {
    .about-container {
        flex-direction: column; /* Forzamos columna para asegurar orden */
        text-align: center;
        gap: 3rem;
    }

    .about-img {
        width: 50vw; /* Tamaño relativo a la pantalla */
        max-width: 300px;
        height: auto; /* Mantiene proporción */
    }

    .about-content {
        text-align: center; /* Centramos texto */
        flex-basis: auto; /* Dejamos que ocupe lo que necesite */
    }

    .about-content h2 {
        font-size: 3.5rem;
    }
}

/* Para Móviles (menos de 768px) */
@media (max-width: 768px) {
    .about {
        padding-top: 5rem;
    }

    .about-img {
        width: 65vw; /* Un poco más grande en móviles */
    }

    .about-content h2 {
        font-size: 3rem;
    }
    
    .about-content h3 {
        font-size: 2rem;
    }
}

/* Para Móviles Muy Pequeños (menos de 450px) */
@media (max-width: 450px) {
    .about-img {
        width: 80vw; /* Casi todo el ancho */
    }
    
    .about-content p {
        font-size: 1.5rem;
    }
}
.contenedor-foto {
    width: 35vw; /* Usa vw para que el ancho sea proporcional a la pantalla */
    height: 35vw; /* Usa vw para que la altura sea proporcional a la pantalla */
    border-radius: 50%;
    overflow: hidden;
    margin: 2rem auto; /* Añade un margin para centrarlo y darle espacio */
    border: 1px solid var(--main-color); /* Estilo de borde mejorado */
}

.about-img img,
.contenedor-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-img img {
    width: 35vw;
    border-radius: 50%;
}

.heading {
    text-align: center;
    font-size: 4.5rem;
}

.about-content h2 {
    text-align: left;
    line-height: 1.2;
}

.about-content h3 {
    font-size: 2.6rem;
}

.about-content p {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
}

/* --- SECCION DE SERVICIOS Y CERTIFICACIONES --- */
.services h2.heading {
    text-align: center;
    margin-bottom: 5rem;
    font-size: 4.5rem;
    color: var(--text-color);
}


.services h2.heading span {
    color: var(--main-color);
}

.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    justify-content: center;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.services-box {
    background: var(--second-bg-color);
    padding: 3rem 2rem 4rem; /* Ajusta el padding para que se vea mejor */
    border-radius: 2rem;
    box-shadow: 0 0 1rem var(--bg-color);
    text-align: center;
    border: .2rem solid var(--bg-color);
    transition: all 0.5s ease;
}

/* Estilo para el ícono */
.services-box i {
    font-size: 5rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
    display: block;
}

/* Estilo para las imágenes de certificaciones */
.services-box img.certification-img {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    background-color: var(--bg-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 0 0.8rem var(--main-color);
    transition: transform 0.5s ease;
}

/* Estilo para el título */
.services-box h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    animation: color-change 5s infinite;
}
/* Estilo para la descripción */
.services-box p {
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--text-color);
    margin-top: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Muestra la descripción al pasar el mouse por encima de la tarjeta */
.services-box:hover p {
    opacity: 1;
    visibility: visible;
}

.services-box .btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--main-color);
    color: var(--bg-color);
    border-radius: .8rem;
    font-weight: 600;
    transition: background 0.3s ease, color 0.3s ease;
    text-decoration: none;
}

.services-box .btn:hover {
    background: var(--text-color);
    color: var(--main-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.services-box:hover {
    border-color: var(--main-color);
    transform: translateY(-1rem);
    box-shadow: 0 0 2rem var(--main-color);
}

.services-box:hover .certification-img {
    transform: scale(1.2);
    z-index: 1;
}

/* Estilos de la etiqueta p (párrafo) - Ahora siempre visible */
.services-box p {
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--text-color);
    margin-top: 1rem; /* Espacio entre el título y el párrafo */
}
/* --- Sección del portafolio --- */

.recognition-box{

    background: var(--bg-color);
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: 0 0 1rem var(--main-color);
    text-align:center;
    border: .2rem solid var(--bg-color);
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items:center;


}

.recognition-box:hover{
    border-color: var(--main-colore);
    transform: translateY(-1rem);
    box-shadow: 0 0 2rem var(--main-color);

}
.recognition-box .recognition-content{

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;


}
.recognition-box .recognition-content h3{
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    animation: color-change 5s infinite;
}

.recognition-box .recognition-content p{
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    animation: color-change 5s infinite;


}


/* --- NUEVA SECCIÓN CERTIFICACIONES CARRUSEL --- */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.slider-track {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 2rem 1rem;
    scrollbar-width: none; /* Oculta scroll en Firefox */
}

.slider-track::-webkit-scrollbar {
    display: none; /* Oculta scroll en Chrome/Safari */
}

.cert-card {
    flex: 0 0 calc(33.33% - 1.4rem); /* 3 cards en PC */
    min-width: 280px;
    background: var(--second-bg-color);
    border-radius: 2rem;
    padding: 2rem;
    scroll-snap-align: center;
    transition: 0.4s ease;
    text-align: center;
}

/* Efectos Neón según data-color */
.cert-card[data-color="blue"] { border: 2px solid #00eeff; box-shadow: 0 0 1.5rem rgba(0, 238, 255, 0.3); }
.cert-card[data-color="green"] { border: 2px solid #0ef09b; box-shadow: 0 0 1.5rem rgba(14, 240, 155, 0.3); }
.cert-card[data-color="orange"] { border: 2px solid #ff4d00; box-shadow: 0 0 1.5rem rgba(255, 77, 0, 0.3); }

.cert-card:hover {
    transform: translateY(-1rem);
    box-shadow: 0 0 2.5rem var(--main-color);
}

.cert-img-box img {
    width: 100%;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.cert-card h3 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Botones Navegación */
/* --- FLECHAS DE NAVEGACIÓN (MÁS GRANDES) --- */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--main-color);
    color: var(--second-bg-color);
    border: none;
    
    /* Aumentamos el círculo de 5rem a 6.5rem */
    width: 6.5rem; 
    height: 6.5rem; 
    
    border-radius: 50%;
    
    /* Aumentamos el icono de 3rem a 4rem */
    font-size: 4rem; 
    
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 2rem var(--main-color); /* Sombra un poco más intensa */
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Ajuste de posición lateral para que no tapen la imagen al ser más grandes */
.nav-btn.prev {
    left: -3.2rem; /* Mitad del nuevo tamaño (6.5 / 2) */
}

.nav-btn.next {
    right: -3.2rem;
}

.nav-btn:hover {
    background: var(--text-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 3rem var(--main-color);
}

/* --- CARRUSEL TECNOLOGÍAS --- */
/* --- ESTILOS CARRUSEL TECNOLOGÍAS --- */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

#techSlider {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 3rem 1rem;
    scrollbar-width: none;
}

#techSlider::-webkit-scrollbar {
    display: none;
}

.tech-card {
    flex: 0 0 calc(25% - 1.5rem); /* 4 tecnologías por fila en PC */
    min-width: 250px;
    background: var(--second-bg-color);
    border-radius: 2.5rem;
    padding: 3rem 2rem;
    text-align: center;
    scroll-snap-align: center;
    border: 2px solid transparent;
    transition: 0.4s ease;
}

.tech-card i {
    font-size: 6rem;
    margin-bottom: 1.5rem;
    display: block;
}

.tech-card h3 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.tech-card p {
    font-size: 1.4rem;
    color: #ccc;
    line-height: 1.5;
}

/* Efectos Neón */
.tech-card[data-color="orange"] { border-color: #ff4d00; box-shadow: 0 0 1rem rgba(255, 77, 0, 0.2); }
.tech-card[data-color="blue"] { border-color: #00eeff; box-shadow: 0 0 1rem rgba(0, 238, 255, 0.2); }
.tech-card[data-color="green"] { border-color: #0ef09b; box-shadow: 0 0 1rem rgba(14, 240, 155, 0.2); }

.tech-card:hover {
    transform: translateY(-1rem);
    border-color: var(--main-color);
    box-shadow: 0 0 2rem var(--main-color);
}

/* --- FLECHAS GRANDES EN LOS BORDES --- */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--main-color);
    color: var(--second-bg-color);
    border: none;
    width: 6.5rem;   /* Tamaño grande solicitado */
    height: 6.5rem;
    border-radius: 50%;
    font-size: 4rem; /* Icono grande solicitado */
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 2rem var(--main-color);
    transition: 0.3s;
}

.nav-btn.prev {
    left: -3.2rem; /* Posicionada al borde izquierdo */
}

.nav-btn.next {
    right: -3.2rem; /* Posicionada al borde derecho */
}

.nav-btn:hover {
    background: var(--text-color);
    transform: translateY(-50%) scale(1.1);
}

/* Responsive */
@media (max-width: 1250px) {
    .nav-btn.prev { left: 0.5rem; }
    .nav-btn.next { right: 0.5rem; }
}

@media (max-width: 991px) {
    .tech-card { flex: 0 0 calc(50% - 1rem); }
}

@media (max-width: 617px) {
    .tech-card { flex: 0 0 100%; }
    .nav-btn { width: 5rem; height: 5rem; font-size: 3rem; }
}
/* Responsive para Tecnologías */
@media (max-width: 1100px) {
    .tech-card { flex: 0 0 calc(50% - 1.5rem); } /* 2 elementos */
}

@media (max-width: 768px) {
    .tech-card { flex: 0 0 100%; } /* 1 elemento */
}

/* --- AJUSTE RESPONSIVE PARA MÓVILES --- */
@media (max-width: 768px) {
    .nav-btn {
        /* En celulares las bajamos un poco de tamaño para que no estorben */
        width: 5rem;
        height: 5rem;
        font-size: 3rem;
    }
    
    .nav-btn.prev { left: 0.5rem; }
    .nav-btn.next { right: 0.5rem; }
}

#recognitions .certification-img {
    width: 100%;
    height: 200px; /* Altura fija para mantener simetría */
    object-fit: cover; /* Recorta la imagen para llenar el espacio sin estirarse */
    border-radius: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ==================== LIGHTBOX STYLES (MODERNO & RESPONSIVE) ==================== */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Fondo oscuro pero con efecto de desenfoque (Glassmorphism) */
    background-color: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px); /* Soporte Safari */
    
    z-index: 10000; /* Prioridad absoluta */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Estado Activo */
.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Contenedor del contenido */
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Imagen con Efecto Neon Sutil */
.lightbox-image {
    max-width: 98vw;
    max-height: 98vh; /* Deja espacio para el texto y márgenes */
    object-fit: contain;
    
    /* Borde sutil y sombra elegante */
    border: 1px solid var(--main-color);
    border-radius: 1rem;
    box-shadow: 0 0 4rem rgba(0, 0, 0, 0.5);
    background-color: #fff; /* Fondo blanco ayuda a la lectura si es PNG transparente */
    
    /* Animación de entrada */
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox-modal.active .lightbox-image {
    transform: scale(1);
}

/* Texto descriptivo (Caption) */
.lightbox-caption {
    margin-top: 1.5rem;
    color: #fff;
    font-size: 1.8rem;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.5px;
    
    /* Fondo pastilla para mejor lectura */
    background: rgba(0, 0, 0, 0.6);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    border: 1px solid var(--main-color);
}

/* === BOTONES DE CONTROL (CERRAR Y NAVEGACIÓN) === */

/* Botón Cerrar (X) */
.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 5rem;
    height: 5rem;
    background: rgba(0, 0, 0, 0.5); /* Fondo circular para contraste */
    border-radius: 50%;
    color: #fff;
    border: 2px solid transparent;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    line-height: 0;
}

.lightbox-close:hover {
    color: var(--main-color);
    border-color: var(--main-color);
    transform: rotate(90deg) scale(1.1);
    background: rgba(0,0,0,0.8);
}

/* Flechas de Navegación (Prev / Next) */
.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid transparent;
    font-size: 3rem;
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    user-select: none;
}

.lightbox-btn:hover {
    background: var(--main-color);
    color: var(--second-bg-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px var(--main-color);
}

.lightbox-btn.prev { left: 3rem; }
.lightbox-btn.next { right: 3rem; }


/* === MEDIA QUERIES (RESPONSIVE) === */
@media (max-width: 768px) {
    .lightbox-image {
        max-width: 100%;
        max-height: 75vh; /* Más pequeño en móvil para ver los botones */
        border-radius: 0.5rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 4rem;
        height: 4rem;
        font-size: 2.5rem;
    }

    /* En móvil las flechas se pegan a los bordes y son más pequeñas */
    .lightbox-btn {
        width: 4.5rem;
        height: 4.5rem;
        font-size: 2rem;
        background: rgba(0, 0, 0, 0.5); /* Más contraste en móvil */
    }
    
    .lightbox-btn.prev { left: 1rem; }
    .lightbox-btn.next { right: 1rem; }
    
    .lightbox-caption {
        font-size: 1.4rem;
        margin-top: 1rem;
    }
}

/* Clase para bloquear el scroll del fondo */
body.no-scroll {
    overflow: hidden;
}

/* --- Sección del portafolio --- */
.portfolio {
    background: var(--second-bg-color);
    padding: 7rem 0;
}

.portfolio .heading {
    text-align: center;
    font-size: 4.5rem;
    margin-bottom: 5rem;
    color: var(--text-color);
}

.portfolio .heading span {
    color: var(--main-color);
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.portfolio-container .portfolio-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem var(--bg-color);
    overflow: hidden;
    display: flex;
    aspect-ratio: 16 / 9;
}

.portfolio-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
}

.portfolio-box .portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.7), var(--main-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 1rem;
    transform: translateY(100%);
    transition: 0.5s ease;
}

.portfolio-layer h4 {
    font-size: 3rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.portfolio-layer p {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background: var(--text-color);
    border-radius: 50%;
    color: var(--main-color);
    font-size: 2rem;
    text-decoration: none;
}

.portfolio-box:hover img {
    transform: scale(1.1);
}

.portfolio-box:hover .portfolio-layer {
    transform: translateY(0);
}

/* --- CONTACTO --- */
.contact {
    min-height: auto;
    padding: 7rem 9% 2rem;
}

.contact h2 {
    margin-bottom: 3rem;
}

.contact form {
    max-width: 70rem;
    margin: 0 auto;
    text-align: center;
}

.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--second-bg-color);
    border-radius: .8rem;
    margin: 0.7rem 0;
}

.contact form .input-box input {
    width: 49%;
}

.contact form textarea {
    resize: none;
}

.contact form .btn {
    margin-top: 2rem;
    cursor: pointer;
}



/* --- BOTÓN DE IDIOMA (INTEGRADO AL MENÚ) --- */
.language-toggle-btn {
    /* Reseteamos la posición fija para que entre en el flujo */
    position: static !important; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    padding: 0.6rem 1.8rem;
    font-size: 1.4rem;
    font-weight: 600;
    
    color: var(--bg-color); /* Texto oscuro para contraste */
    background: var(--main-color);
    border: 2px solid var(--main-color);
    border-radius: 2rem;
    
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 1rem rgba(0, 224, 179, 0.4);
    
    margin-left: 1rem; /* Separación extra del último link */
}

.language-toggle-btn:hover {
    background: transparent;
    color: var(--main-color);
    box-shadow: 0 0 1.5rem var(--main-color);
    transform: scale(1.05); /* Efecto sutil, no rotación completa */
}

/* ==================== MEDIA QUERIES (Ajustes para que no se rompa) ==================== */

/* Tablet Grande / Laptop Pequeña (Menos de 1280px) */
@media (max-width: 1350px) {
    /* Cuando hay poco espacio, reducimos letra y espacios */
    .header {
        padding: 1.5rem 2%; 
    }
    .navbar {
        gap: 1.5rem;
    }
    .navbar a {
        font-size: 1.4rem;
    }
}

/* Tablet (Menos de 991px - Aquí activamos el menú hamburguesa) */
@media (max-width: 1150px) { 
    /* Cambié el breakpoint de 991px a 1150px porque tienes MUCHOS items */
    
    #menu-icon {
        display: block; /* Aparece la hamburguesa antes */
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        display: none; /* Oculto por defecto */
        flex-direction: column; /* Lista vertical */
        align-items: flex-start; /* Alineado a la izquierda */
    }

    .navbar.active {
        display: flex; /* Se muestra al activar */
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 1.5rem 0;
        width: 100%;
    }
    
    /* El botón en móvil se ve diferente */
    .language-toggle-btn {
        margin: 2rem auto; /* Centrado */
        width: auto;
        display: inline-block;
    }
}



/* --- FOOTER --- */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--second-bg-color);
}

.footer-text p {
    font-size: 1.6rem;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--second-bg-color);
}

.header.sticky {
    border-bottom: .1rem solid rgba(0, 0, 0, .2);
}
.lighbox-modal {

    position:fixed;
    top:0;
    left:0;
    width:100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items:center;
    z-index:1000;
    opacity:0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;



}

.lightbox-moda.active{

    opacity: 1;
    visibility: visible;

}
.lighbox-image{

    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transform: scale(0.8);
    transition: transform 0.3s ease;

}
.lightbox-modal.active .lightbox-image{
    transform: scale(1);

}

.close-btn{


    position:absolute;
    top: 2rem;
    right: 3rem;
    color: #fff;
    font-size: 5rem;
    font-weight:bold;
    cursor:pointer;
    transition: color 0.3s ease;
    
}


.close-btn:hover{
    color:var(--main-color);
}


.home-content h3{
font-size: 3.2rem;
font-weight: 700;

}
.home_content h3:nth-of-type(2){

    margin-bottom: 2rem;


}

.home-content h3:nth-of-type(2){
    margin-bottom: 2rem;

}
.home-content h3 span,
.home-content h1 span{
    color: var(--main-color);
}


.home-media a {
    display:inline-flex;
    justify-content: center;
    align-items: center;
    width:4rem;
    height: 4rem;
    background: transparent;
    border: 0.2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.5s ease;

}

.social-emdoia a:hover{
    background: var(--main-color);
    color: var(--second-bg-color);
    box-shadow: 0 0 1rem var(--main-color);

}

/*==================== Estilo de la Sección de Curriculums ====================*/
/* Estilos para las imágenes de currículum (se adaptan al contenedor) */
.curriculum-img-es, .curriculum-img-en {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

/* Efecto al pasar el cursor sobre la caja del currículum */
.services-box:hover .curriculum-img-es, 
.services-box:hover .curriculum-img-en {
    transform: scale(1.05); /* Ligeramente más grande */
}

/* Estilos para el texto dentro de la sección de currículum */
/* (Opcional: Si quieres diferenciar el texto de esta sección) */
#curriculum .services-box h3 {
    color: var(--main-color);
    font-size: 2.2rem;
}

#curriculum .services-box p {
    font-size: 1.4rem;
    color: var(--text-color);
}


/* --- Media Queries --- */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 2rem 3%;
    }

    section {
        padding: 10rem 3% 2rem;
    }

    .services,
    .portfolio,
    .contact {
        padding-bottom: 7rem;
    }

    .footer {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    #menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        display: none;
    }

    .navbar.active {
        display: block;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }

    .home {
        flex-direction: column;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    .home-img img {
        width: 70vw;
        margin-top: 4rem;
    }

    .about {
        flex-direction: column-reverse;
    }

    .about img {
        width: 70vw;
        margin-top: 4rem;
    }

    .services h2,
    .portfolio h2 {
        margin-bottom: 3rem;
    }

    .portfolio-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact form .input-box {
        flex-direction: column;
    }

    .contact form .input-box input {
        width: 100%;
    }

    .services-box img.certification-img {
        height: auto;
        max-width: 100%;
    }

    @media(max-width: 617px) {
        .portfolio-container {
            grid-template-columns: 1fr;
        }
    }

    @media(max-width: 450px) {
        html {
            font-size: 50%;
        }
    }

    @media(max-width: 365px) {
        .home-img img {
            width: 90vw;
            animation: floatImage 4s ease-in-out infinite;
        }

        @keyframes floatImage {
            0% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-2.4rem);
            }

            100% {
                transform: translateY(0);
            }
        }

        .about-img img {
            width: 90vw;
        }

        .footer {
            flex-direction: column-reverse;
        }

        .footer p {
            text-align: center;
            margin-top: 2rem;
        }
    }
}
/* Keyframes para la animación de cambio de color */
@keyframes color-change {
   
    100% {
        color: var(--main-color);
    }
}


@media(max-width: 768px){
    .language-toggle-btn{
        top:auto;/* deshabilita la posicion superior*/
        bottom: 2rem;
        right: 2rem;
        padding: 0.8rem 1.5rem;
        font-size: 1.4rem;
        box-shadow: 0 0 0.8rem var(--main-color);


    }
}


/* ==================== CARRUSEL DE CURRICULUMS ==================== */
.cv-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 350px; /* Ancho máximo de la hoja A4 en pantalla */
    margin: 1.5rem auto;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0 1.5rem rgba(0,0,0,0.5);
    border: 2px solid var(--second-bg-color);
}

.cv-slider {
    display: flex;
    overflow-x: hidden; /* Ocultamos el scroll bar, lo movemos con JS */
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}

.cv-slide {
    min-width: 100%; /* Cada página ocupa el 100% del contenedor */
    height: auto;
    object-fit: contain;
    scroll-snap-align: center;
    display: block;
}

/* Botones de navegación del CV (pequeños y discretos) */
.cv-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: var(--main-color);
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
    border-radius: 0.5rem;
}

.cv-nav-btn:hover {
    background: var(--main-color);
    color: var(--second-bg-color);
}

.cv-nav-btn.prev { left: 5px; }
.cv-nav-btn.next { right: 5px; }

/* Indicador de "Click para ampliar" (Opcional, usando tu lightbox existente) */
.cv-slide:hover {
    cursor: zoom-in;
    opacity: 0.9;
}