/********** Template CSS **********/

/* ELIMINAR DESPLAZAMIENTO LATERAL */
#programas .row.justify-content-center {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Forzar que las columnas se repartan el espacio de forma simétrica */
#programas .row.justify-content-center > [class*='col-'] {
    /* Esto compensa el "gutter" de Bootstrap que descuadra el centro */
    padding-left: 12px !important;
    padding-right: 12px !important;
}

/* Mantenemos el estilo de tus tarjetas */
#programas .service-item {
    background: rgba(255, 0, 0, 0.05) !important;
    border: 1px solid rgba(255, 0, 0, 0.2) !important;
    /* Forzamos que el párrafo no tenga margen inferior como pediste */
}

#programas .service-item p {
    margin-bottom: 0 !important;
}

/* Ajuste para tarjetas de programas más grandes y espaciosas */
#programas .service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%; 
    /* Aumentamos el padding para que la caja sea más grande */
    padding: 50px 30px !important; 
    background: rgba(255, 0, 0, 0.05) !important;
    border: 1px solid rgba(255, 0, 0, 0.2) !important;
    border-radius: 20px; /* Bordes más redondeados para acompañar el tamaño */
    transition: all 0.4s ease;
}

#programas .service-item img {
    /* Iconos más grandes: pasamos de 80px a 120px */
    width: 120px !important; 
    height: 120px !important;
    object-fit: contain;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.6));
    transition: transform 0.3s ease;
}

/* Aumentamos un poco el tamaño de los textos internos */
#programas .service-item h3 {
    font-size: 1.5rem; /* Título más destacado */
    margin-bottom: 15px;
    letter-spacing: 1px;
}

#programas .service-item p {
    font-size: 1.1rem; /* Párrafo más legible */
    line-height: 1.6;
    opacity: 0.9;
}

/* Efecto Hover potenciado para cajas grandes */
#programas .service-item:hover {
    background: rgba(255, 0, 0, 0.08) !important;
    border-color: rgba(255, 0, 0, 1) !important;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2);
    transform: translateY(-10px);
}

#programas .service-item:hover img {
    transform: scale(1.1); /* El icono crece al pasar el ratón */
}

/* Eliminamos los márgenes raros que venían de la plantilla original */
.service-item-left, .service-item-right {
    margin: 0 !important;
}

/* Estado inicial: Obligatoriamente transparente al cargar */
nav.navbar {
    position: fixed !important;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent; /* Aquí forzamos transparencia inicial */
    transition: background-color 0.4s ease !important;
}

.logo-container-glass {
    background: #000000; /* Negro puro para que coincida con tu GIF */
    backdrop-filter: blur(15px);
    webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 0, 0, 0.4);
    border-radius: 10px; 
    padding: 4px !important; /* Forzamos cero espacio */
    margin: 4px !important;
    display: inline-flex; /* Se ajusta al tamaño del contenido */
    overflow: hidden; 
    line-height: 0; /* Elimina espacio inferior de tipografía */
}

/* La imagen del logo */
.logo-gif {
    height: 60px; /* Un poco más pequeño para que respire dentro del contenedor */
    width: 100px;
    display: block;
    vertical-align: middle; /* Elimina el pequeño margen inferior de las imágenes */
    padding: 0 !important;
    margin: 0 !important;
}


/* Ajuste de la Navbar para que el vidrio se vea detrás */
.navbar {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(20px) !important;
    webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 0, 0, 0.2);
}

/* Estado al bajar: SOBREESCRIBIMOS el transparente */
nav.navbar.scrolled {
    background-color: #000000 !important; /* Ahora el negro tiene el control */
    box-shadow: 0 2px 20px rgba(255, 0, 0, 0.4);
    border-bottom: 1px solid #ff0000;
}

/* 3. Ajuste para que el contenido no se meta debajo del menú fijo */
#vandal-container {
    margin-top: 0; 
}

.navbar-nav .nav-link {
    position: relative;
    padding: 10px 20px !important;
}

.navbar-nav .nav-link::before,
.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border: 5px solid transparent;
    transition: all 0.3s ease;
}

/* Esquina superior izquierda */
.navbar-nav .nav-link::before {
    top: 0;
    left: 0;
}

/* Esquina inferior derecha */
.navbar-nav .nav-link::after {
    bottom: 0;
    right: 0;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
}

.navbar-nav .nav-link:hover::before {
    width: 20px;
    height: 20px;
    border-top-color: #fff;
    border-left-color: #fff;
}

.navbar-nav .nav-link:hover::after {
    width: 20px;
    height: 20px;
    border-bottom-color: #fff;
    border-right-color: #fff;
}

/* Contenedor relativo para que la luz no se salga */
#header-carousel {
    position: relative;
    background-color: #000 !important;
    overflow: hidden;
}

/* La capa de la luz */
.header-overlay-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Por encima de la foto, por debajo del texto */
    pointer-events: none; /* Para que puedas hacer clic en el botón "Conóceme" */
    /* El degradado usa variables --mouse-x y --mouse-y */
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(255, 0, 0, 0.3) 0%, 
        transparent 80%
    );
}

/* Ajuste de la foto para que no brille sola */
.carousel-item img {
    opacity: 0.1 !important;
    filter: grayscale(100%);
}

/* Aseguramos que el texto esté siempre por encima de la luz */
.carousel-caption {
    z-index: 3 !important;
}

/* 1. EL FONDO (Capa fija detrás de todo) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* Degradado rojo y negro sutil pero visible */
    background: 
        radial-gradient(circle at 15% 25%, rgba(180, 0, 0, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 85% 75%, rgba(150, 0, 0, 0.2) 0%, transparent 45%),
        #000000;
    z-index: -10;
}

/* 2. TRANSPARENCIAS (Sin romper el layout) */
/* Quitamos los fondos sólidos de Bootstrap pero mantenemos su estructura */
body, 
.container-fluid, 
.bg-dark, 
.bg-secondary, 
section, 
#sobremi, 
#programas {
    background-color: transparent !important;
}

/* 3. ARREGLO DEL HEADER (La foto principal) */
/* En lugar de borrar la imagen, la hacemos casi invisible para que se vea el rojo */
.carousel-item img {
    opacity: 0.1 !important; /* Deja ver el fondo rojo pero mantiene el tamaño */
    filter: grayscale(100%) brightness(50%);
}

/* 4. SECCIÓN PROGRAMAS (El efecto que te gustó) */
.service-item {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 0, 0, 0.2) !important;
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.service-item:hover {
    border-color: rgba(255, 0, 0, 0.7) !important;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
    transform: translateY(-5px);
}

/* 5. TEXTOS Y COLORES */
h1, h2, h3, h4, h5, p, span, li, .nav-link {
    color: #ffffff !important;
}

/* Cambiamos el color azul de los iconos y botones por Rojo */
.text-primary {
    color: #ff0000 !important;
}

.service-item:hover {
    border-color: #ff0000 !important;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
    transform: scale(1.02);
}

/* 5. FIX DE TEXTOS */
/* Para que no se pierdan con el fondo oscuro */
h1, h2, h3, h4, h5, p, span, li, a.nav-link {
    color: #ffffff !important;
}

.text-primary {
    color: #ff0000 !important; /* Cambiamos el azul de Bootstrap por rojo */
}

/* 6. QUITAR EL SPINNER SI MOLESTA */
#spinner {
    background-color: #000 !important;
}

.service-item:hover {
    border-color: rgba(255, 0, 0, 0.6) !important;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.25);
    transform: translateY(-5px);
}

/* 5. AJUSTE DE TEXTOS PARA QUE SE LEAN BIEN */
h1, h2, h3, h4, h5, p, li {
    color: #ffffff !important;
}

/* Extra: Las líneas decorativas de tu plantilla suelen ser azules o grises, 
   las pasamos a rojo para que peguen con el fondo */
.text-primary {
    color: #ff0000 !important;
}
.btn-outline-primary {
    color: #ff0000;
    border-color: #ff0000;
}
.btn-outline-primary:hover {
    background-color: #ff0000;
    border-color: #ff0000;
    color: white;
}
.service-item:hover {
    border-color: rgba(255, 0, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
}

.neon-text {
  /* Color base del texto (a menudo blanco o el color del neón) */
  color: #fff; 
  
  /* Color de fondo oscuro para que el neón destaque */
  background-color: #111; 
  
  /* Múltiples sombras para el efecto de resplandor */
  text-shadow: 
    0 0 7px #fff,     /* Sombra interior pequeña y blanca */
    0 0 10px #00f,    /* Primer nivel de brillo (azul en este ejemplo) */
    0 0 21px #00f,    /* Segundo nivel de brillo */
    0 0 42px #00f,    /* Sombra más amplia y difusa */
    0 0 82px #00f;    /* Sombra exterior muy difusa */
}

.back-to-top {
    position: fixed;
    display: none; /* JS lo muestra */
    right: 45px;
    bottom: 45px;
    z-index: 99;
    background: #ff0000;
    color: #fff;
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 50px;
    border-radius: 50px;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, background 0.3s ease;
    text-decoration: none;
}

.back-to-top:hover {
    background: #ff000;
    color: #fff;
    transform: translateY(-10px);
}

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    font-weight: 600;
    transition: .5s;
    border-radius: 50px;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: inherit;
}

.btn-primary {
    color: var(--bs-white);
}


/*** Navbar ***/
.navbar {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 9;
    transition: .5s;
}

.navbar .navbar-nav .nav-link {
    margin-right: 25px;
    padding: 40px 0;
    color: var(--bs-white);
    font-size: 17px;
    text-transform: uppercase;
    outline: none;
    transition: .5s;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav {
	color:#ff0000;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link,
    .navbar.bg-dark .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        margin-top: 8px;
        border-top: 1px solid var(--bs-light);
    }
}

@media (min-width: 992px) {
    .navbar.bg-dark .navbar-nav .nav-link {
        padding: 20px 0;
    }

    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}


/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding-top: 100px;
    background: rgba(0, 0, 0, .7);
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 550px;
    }
    
    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.page-header {
    padding-top: 200px;
    background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(../img/carousel-1.jpg) top center no-repeat;
    background-size: cover;
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
    color: var(--bs-white);
}


/*** Title ***/
.title {
    margin-bottom: 2rem;
}

.title .title-left,
.title .title-center,
.title .title-right {
    display: inline-block;
    text-transform: uppercase;
    overflow: hidden;
}

.title .title-center {
    text-align: center;
}

.title .title-right {
    text-align: right;
}

.title .title-left h5,
.title .title-center h5,
.title .title-right h5 {
    position: relative;
    display: inline-block;
    font-size: 18px;
    font-weight: 300;
}

.title .title-left h5::after,
.title .title-center h5::before,
.title .title-center h5::after,
.title .title-right h5::before {
    position: absolute;
    content: "";
    width: 500%;
    height: 0;
    top: 9px;
    border-bottom: 1px solid var(--bs-white);
}

.title .title-left h5::after,
.title .title-center h5::after {
    left: calc(100% + 15px);
}

.title .title-right h5::before,
.title .title-center h5::before {
    right: calc(100% + 15px);
}

.title .title-left h1,
.title .title-center h1,
.title .title-right h1 {
    border-bottom: 1px solid var(--bs-white);
}

.neon-separator {
    width: 40%;
    height: 2px;
    background-color: #ff0000; /* Color base rojo */
    box-shadow: 
        0 0 5px #ff0000,
        0 0 10px #ff0000,
        0 0 20px #ff0000,
        0 0 40px #ff0000; /* Efecto de resplandor neón */
    margin-left: 30%;
    border: none;
    position: block;
    z-index: 10;
}
/*** Team ***/

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
	align-items: center
}

.gallery-item {
    background-color: transparent;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
	width: 388px;
    height: 500px;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 388px;
    height: 500px; 
    object-fit: contain; 
    display: block;
}

/* --- LIGHTBOX --- */
.lightbox {
    display: none; 
    position: fixed; 
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Permite scroll si la imagen es muy grande */
    background-color: rgba(0, 0, 0, 0.9); /* Fondo oscuro semitransparente */
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%; /* Ajusta al 90% del ancho de la pantalla */
    max-height: 90%; /* Ajusta al 90% de la altura de la pantalla */
    width: 1050px; /* Ancho deseado */
    height: 1350px; /* Altura deseada */
    object-fit: contain; /* Ajusta la imagen sin recortar, mostrando el contenido completo */
    animation: zoomIn 0.3s ease-out;
}

.lightbox-caption {
    text-align: center;
    color: #ccc;
    font-size: 18px;
    padding: 10px 0;
    position: absolute;
    bottom: 5%;
    width: 100%;
}

/* Animación de entrada de la imagen */
@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0.5; }
    to { transform: scale(1); opacity: 1; }
}

/* Botón de Cerrar (X) */
.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Botones de Navegación (Flechas) */
.prev-btn, .next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    outline: none;
}

.prev-btn {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.next-btn {
    right: 0;
    border-radius: 0 3px 3px 0;
}

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Media Queries para responsividad */
@media only screen and (max-width: 768px) {
    .gallery-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .lightbox-content {
        width: auto; /* Permite que se ajuste automáticamente en móviles */
        height: auto;
        max-width: 95%;
        max-height: 80%;
    }
    .close-btn {
        top: 15px;
        right: 20px;
        font-size: 30px;
    }
    .prev-btn, .next-btn {
        padding: 10px;
        font-size: 16px;
        margin-top: -30px;
    }
}


#programas {
    background-color: #000000 !important;
}

/* ELIMINAR EL RECTÁNGULO MOLESTO */
/* Forzamos la desaparición del pseudo-elemento que crea el marco negro */
#programas .service-item .service-img::before,
#programas .service-item .service-img::after,
.service-item .service-img::before {
    display: none !important;
    content: none !important;
    border: none !important;
}

/* Asegurar que el texto de los programas sea blanco para que se lea bien */
#programas h1, 
#programas h3, 
#programas p {
    color: #ffffff !important;
}

/* Quitar el relleno (padding) excesivo si el círculo queda muy pequeño */
#programas .service-img {
    padding: 2rem !important;
}


/*** Footer ***/
.contact-footer {
    background-color: transparent;
    color: #fff;
    padding-top: 50px;
    padding-bottom: 20px;
	margin-top: 70px;
    position: relative; 
    overflow: hidden; 
    z-index: 1; 
}

.footer-content {
    display: flex;
    flex-wrap: wrap; 
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2; 
}

.footer-section {
    flex: 1;
    min-width: 300px; 
    margin: 20px;
}

.footer-section h3 {
    border-bottom: 2px solid #ff0000; 
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #fff; 
}


/* Eliminamos el espacio y añadimos !important para vencer a las reglas globales */
.contact-info a:hover {
    color: #ff0000 !important;
}

/* Si quieres que el icono también cambie de color al pasar por encima del texto */
.contact-info p:hover  {
    color: #ff0000 !important;
    transition: 0.3s;
}

.icon {
    margin-right: 10px;
    color: #C90003; 
}


.location-map iframe {
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5); 
    transition: filter 0.5s;
}

.footer-bottom {
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;
    border-top: 1px solid #333;
    font-size: 0.9em;
    position: relative;
    z-index: 2;
}

/* Adaptación para dispositivos móviles */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }

    .footer-section {
        margin: 10px 0;
        min-width: 100%;
    }
}

#header-carousel {
    overflow: hidden; /* Esto corta cualquier borde que se salga de su sitio */
}

.carousel-caption {
    z-index: 2; /* Asegura que el texto siempre esté por encima de fondos */
}

/**************************************************************
 * BLOQUE RESPONSIVE PARA MÓVILES 
 **************************************************************/

@media (max-width: 768px) {
    
	#sobremi .list-group {
        text-align: left !important;
        margin-left: 0 !important;
        padding-left: 5px !important;
        display: inline-block !important; /* Mantiene el bloque compacto */
        width: 100%;
    }
	
	/* 1. Ajustes Generales de Espaciado */
    .container, .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* 2. Header / Vandal Container */
    #vandal-container {
        height: 80vh !important; /* Un poco más corto en móvil */
    }

    .header-content h1 {
        font-size: 2.5rem !important; /* Título más pequeño para que no rompa */
    }

    .header-content p {
        font-size: 1rem !important;
        padding: 0 10px;
    }

    .navbar-collapse {
        background: rgba(0, 0, 0, 0.95);
        padding: 20px;
        border-bottom: 2px solid #ff0000;
        margin-top: 10px;
    }

    .nav-item.nav-link {
        padding: 15px 0 !important;
        border-bottom: 1px solid rgba(255,0,0,0.1);
    }

    /* 4. Sección Sobre Mí */
    #sobremi {
        text-align: center;
        padding-top: 50px !important;
    }

    #sobremi .col-lg-5 img {
        max-width: 80%;
        margin: 30px auto 0;
    }

    /* Ajuste del Video de YouTube para que no se salga */
    iframe {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
    }

    /* 5. Sección Programas (Tarjetas) */
    #programas .service-item {
        padding: 30px 20px !important;
        margin-bottom: 15px;
    }

    #programas .service-item img {
        width: 80px !important;
        height: 80px !important;
    }

    /* 6. Galería de Proyectos (Fix Crítico) */
    .gallery-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px;
    }

    .gallery-item {
        width: 100% !important; /* Ocupa el ancho disponible */
        height: auto !important; /* Altura automática según la imagen */
        max-width: 350px; /* Evita que crezca demasiado */
    }

    .gallery-item img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }

    /* 7. Lightbox en móvil */
    .lightbox-content {
        width: 95% !important;
        height: auto !important;
        margin-top: 20%;
    }

    .prev-btn, .next-btn {
        padding: 8px;
        font-size: 14px;
    }

    /* 8. Footer */
    .footer-content {
        flex-direction: column !important;
        text-align: center;
    }

    .footer-section {
        margin: 20px 0 !important;
        min-width: 100% !important;
    }

    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    /* Ajuste de los bordes blancos decorativos */
    .border-line {
        height: 6px !important;
        width: 6px !important;
    }
}

/* Ajuste extra para pantallas muy pequeñas (iPhone SE, etc) */
@media (max-width: 380px) {
    .header-content h1 {
        font-size: 2rem !important;
    }
    
    .logo-gif {
        width: 80px;
        height: auto;
    }
}

@media (max-width: 576px) {
    .gallery-container {
        display: flex !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
        gap: 5px !important;
        padding: 5px !important;
        width: 100% !important;
    }

    .gallery-item {
        /* Dos columnas exactas */
        width: 49% !important; 
        max-width: 49% !important;
        height: auto!important; /* Altura readucida para que encaje en pantallas de móvil */
        padding: 4px !important; 
        box-sizing: border-box !important;
    }

    .gallery-item img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
		border-radius: 10px
    }
}

@media (max-width: 991px) {
    /* Estado inicial: escondido */
    .navbar-collapse {
        display: none !important;
        height: 0 !important;
        overflow: hidden !important;
        transition: all 0.3s ease;
    }

    /* Estado cuando clicamos: se muestra */
    .navbar-collapse.menu-abierto {
        display: block !important;
        height: auto !important;
        background-color: #000000 !important; /* El fondo negro de tu captura */
    }
}

@media (max-width: 991px) {
    /* 1. Eliminamos cualquier borde del header/navbar que pueda dejar esa línea */
    .navbar, 
    .navbar-header,
    .container-fluid {
        border: none !important;
        box-shadow: none !important;
        outline: none !important;
    }

    /* 2. El botón de las 3 rayas a veces trae un borde o sombra por defecto */
    .navbar-toggler {
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }
    
    /* Quitamos el recuadro que sale al hacer clic en el botón */
    .navbar-toggler:focus,
    .navbar-toggler:active,
    .navbar-toggler-icon:focus {
        outline: none !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* 3. Ajuste del menú para que empiece 100% invisible */
    .navbar-collapse {
        display: block !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
        background: transparent !important;
        /* Forzamos que no haya ni 1px de nada */
        border: 0 !important; 
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 4. Solo cuando se abre, mostramos el diseño */
    .navbar-collapse.menu-abierto {
        max-height: 500px;
        background: rgba(0, 0, 0, 0.7) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        border-bottom: 1px solid rgba(255, 0, 0, 0.5) !important;
        padding-top: 10px !important; /* Espacio interno para que no pegue arriba */
    }
}

@media (max-width: 576px) {
    /* 1. Alineamos solo el contenido de texto (Email, Usuario, Servicios) */
    #contacto .contacto-info, 
    #contacto .info-item,
    #contacto .servicios-lista,
    #contacto p, 
    #contacto h4 {
        text-align: left !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        padding-left: 15px !important;
    }

    /* 2. PROTEGEMOS LA FLECHA: Forzamos que se quede a la derecha */
    /* Ajusta '.back-to-top' por la clase real de tu flecha */
    .back-to-top, 
    .scroll-to-top,
    #contacto .fa-chevron-up, 
    #contacto .fa-arrow-up {
        position: fixed !important; /* O absolute, según tu diseño */
        right: 20px !important;
        bottom: 20px !important;
        left: auto !important; /* Evita que el 'flex-start' la empuje a la izquierda */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

@media (max-width: 576px) {
    /* 1. Quitamos el margen/relleno al contenedor que envuelve la portada */
    #inicio.container, 
    #inicio .container,
    .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }

    /* 2. Forzamos la sección a ocupar todo el ancho real */
    #inicio {
        width: 100% !important;
        max-width: 100vw !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    /* 3. Ajustamos la imagen o el fondo para que no deje aire */
    #inicio div, #inicio img {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        left: 0 !important;
    }
}