/* RESET GENERAL */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
/* Asegurar que nada, absolutamente nada, se desborde del viewport */
html,
body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

:root {
    --bg-absolute: #000000;
    --card-base: #09090b;
    --border-inline: rgba(255, 255, 255, 0.06);
    --text-muted: #8e8e93;
    /* PALETA DE ACENTO (Granates/Rojos del Logo) */
    --primary-accent: #d1415d;
    --text-accent: #a3001f;
    --glow-color: rgba(163, 0, 31, 0.15);
}

body {
    font-family: "Inter", sans-serif;
    background-color: var(--bg-absolute);
    color: #ffffff;
    letter-spacing: -0.02em;
    overflow-x: hidden;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    background-size: 40px 40px;
}

a {
    text-decoration: none !important;
    color: inherit !important;
}

.glow-effect {
    position: absolute;
    width: min(
        500px,
        100vw
    ); /* 🔥 Si la pantalla mide menos de 500px, adopta el 100% del ancho del teléfono */
    height: 400px;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* NAVBAR */
.custom-navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid var(--border-inline);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-links-group {
    display: flex;
    align-items: center;
    gap: 32px;
}
.custom-nav-link {
    font-size: 0.9rem;
    color: var(--text-muted) !important;
    font-weight: 500;
    transition: color 0.2s ease;
}
.custom-nav-link:hover {
    color: #ffffff !important;
}

/* TYPOGRAPHY */
.main-hero-title {
    font-weight: 900;
    font-size: clamp(2.5rem, 6.5vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    background: linear-gradient(180deg, #ffffff 50%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* BOTONES */
.btn-action-white {
    background: #ffffff;
    color: #000000 !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    transition: opacity 0.2s;
}
.btn-action-white:hover {
    opacity: 0.9;
}

.btn-action-outline {
    background: rgba(255, 255, 255, 0.02);
    color: #ffffff !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 12px 24px;
    border-radius: 6px;
    border: 1px solid var(--border-inline);
    transition: all 0.2s;
}
.btn-action-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-accent);
}

.btn-action-accent {
    background: var(--text-accent);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    transition: opacity 0.2s;
}
.btn-action-accent:hover {
    opacity: 0.9;
}

/* UI BOX MOCKUP */
.ui-box {
    background: #040405;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.9);
}
.ui-box-top {
    background: #0d0d11;
    border-bottom: 1px solid var(--border-inline);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dot-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.ui-grid-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 32px;
}
@media (max-width: 768px) {
    .ui-grid-display {
        grid-template-columns: 1fr;
    }
}

/* BENTO GRID (Ecosistema principal) */
.bento-master-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-top: 40px;
}
.bento-block {
    background: var(--card-base);
    border: 1px solid var(--border-inline);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.3s ease;
}
.bento-block:hover {
    border-color: rgba(255, 255, 255, 0.15);
}
.w-col-8 {
    grid-column: span 8;
}
.w-col-4 {
    grid-column: span 4;
}
@media (max-width: 991px) {
    .w-col-8,
    .w-col-4 {
        grid-column: span 12;
    }
}

/* NUEVO: GRID PARA SERVICIOS DETALLADOS Y NOTICIAS */
.standard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}
@media (max-width: 991px) {
    .standard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .standard-grid {
        grid-template-columns: 1fr;
    }
}

.service-card,
.news-card {
    background: var(--card-base);
    border: 1px solid var(--border-inline);
    border-radius: 12px;
    padding: 32px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.service-card:hover,
.news-card:hover {
    border-color: var(--text-accent);
    transform: translateY(-3px);
}

.news-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: block;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-inline);
    color: #a1a1aa;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: 4px;
    display: inline-block;
}
.divider-hr {
    width: 100%;
    height: 1px;
    background: var(--border-inline);
    margin: 5rem 0;
}

dropdown-item:hover {
    background-color: transparent !important;
    color: var(--text-accent) !important;
}
/* Contenedor del paginador */
.pagination {
    --cms-red: #a3001f;
    --cms-dark-bg: #1e1e1e; /* Ajusta este color al fondo de tus tarjetas si es necesario */
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}

/* Estilo base para cada botón/enlace del paginador */
.pagination .page-link {
    color: #ffffff !important;
    background-color: var(--cms-dark-bg) !important;
    border: 1px solid #333333 !important;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease-in-out;
}

/* Efecto Hover (Cuando pasas el cursor por encima) */
.pagination .page-link:hover {
    background-color: #2a2a2a !important;
    border-color: var(--cms-red) !important;
    color: var(--cms-red) !important;
}

/* Botón Activo (La página en la que se encuentra el usuario) */
.pagination .page-item.active .page-link {
    background-color: var(--cms-red) !important;
    border-color: var(--cms-red) !important;
    color: #ffffff !important;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(163, 0, 31, 0.4); /* Sutil brillo rojo */
}

/* Botones Deshabilitados (Anterior/Siguiente cuando no hay más páginas) */
.pagination .page-item.disabled .page-link {
    color: #666666 !important;
    background-color: #151515 !important;
    border-color: #222222 !important;
}

/* Redondear las esquinas externas del paginador */
.pagination .page-item:first-child .page-link {
    border-top-left-radius: 6px !important;
    border-bottom-left-radius: 6px !important;
}

.pagination .page-item:last-child .page-link {
    border-top-right-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
}
/* Estado Base de las cajas de texto */
.contact-form .form-control {
    background-color: #0d0d11 !important; /* Tu color original oscuro */
    border: 1px solid var(--border-inline) !important;
    color: #ffffff !important; /* Forzamos letras totalmente blancas */
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}

/* Forzar que el Placeholder (texto de guía) brille y no se opaque */
.contact-form .form-control::placeholder {
    color: #cccccc !important; /* Gris claro de alto contraste, 100% legible en móvil */
    opacity: 1 !important; /* Desactiva la opacidad nativa del navegador */
}

/* Cuando el usuario hace clic o escribe en el campo */
.contact-form .form-control:focus {
    background-color: #121217 !important; /* Un toque ligeramente más claro al escribir */
    border-color: #a3001f !important; /* Borde rojo corporativo */
    color: #ffffff !important;
    box-shadow: 0 0 0 0.25rem rgba(163, 0, 31, 0.25) !important; /* Halo rojo de enfoque */
}
/* Forzar que el botón hamburguesa brille y sea visible */
button[data-bs-target="#mobileMenu"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px; /* Tamaño recomendado por Google para usabilidad táctil */
    color: #ffffff !important;
    z-index: 1010;
}

/* Respaldo visual en CSS por si FontAwesome no carga correctamente en móvil */
button[data-bs-target="#mobileMenu"] i::before {
    content: "\f0c9"; /* Código Unicode de fa-bars */
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", sans-serif;
    font-weight: 900;
}

/* Estilo para el Offcanvas de Bootstrap para que combine con el tema Bittech */
.offcanvas {
    border-left: 1px solid var(--border-inline) !important;
}

/* Ajustes de hover dentro del menú desplegable del Navbar */
.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--primary-accent) !important;
}

/* ==========================================================================
   OPTIMIZACIONES PARA EL NAVBAR MÓVIL (CORREGIDO)
   ========================================================================== */

/* 💡 Usamos Media Query para que estas reglas SOLO apliquen en móviles y tablets (< 992px) */
@media (max-width: 991.98px) {
    button[data-bs-target="#mobileMenu"] {
        display: inline-flex !important; /* Aparece solo en mobile */
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        color: #ffffff !important;
        z-index: 1010;
    }

    /* Respaldo visual en CSS por si FontAwesome no carga correctamente en el celular */
    button[data-bs-target="#mobileMenu"] i::before {
        content: "\f0c9";
        font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", sans-serif;
        font-weight: 900;
    }
}

/* Opcional: Nos aseguramos de que en pantallas grandes (escritorio >= 992px) se oculte al 100% */
@media (min-width: 992px) {
    button[data-bs-target="#mobileMenu"] {
        display: none !important;
    }
}
