/* ============================================================
   ESTÉTICA INDUSTRIAL KYO RENT - VERSIÓN FINAL "LA ARMADURA"
   ============================================================ */

:root {
    --primary: #ffcc00;         /* Amarillo Maquinaria */
    --primary-dark: #e6b800;
    --dark: #000000;            /* Negro Absoluto */
    --dark-soft: #121212;
    --light: #f8f9fa;
    --gray: #6c757d;
    --transition: 0.3s ease-in-out;
}

/* 1. RESET Y BASE */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--light);
    color: var(--dark-soft);
    line-height: 1.6;
}

/* 2. NAVBAR NEGRA TOTAL (OPCIÓN NUCLEAR) 
   Usamos el ID para tener máxima prioridad sobre Bootstrap
*/
#main-navbar, 
nav.navbar.navbar-dark.sticky-top {
    background-color: #000000 !important;
    background: #000000 !important;
    /* Esto mata las variables internas de Bootstrap 5 que causan la transparencia */
    --bs-navbar-bg: #000000 !important;
    --bs-bg-opacity: 1 !important;
    border-bottom: 4px solid var(--primary) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6) !important;
}

/* Asegurar que no hay degradados heredados */
nav.navbar * {
    background-color: transparent !important;
}

/* Logo y Texto */
.navbar-brand {
    color: var(--primary) !important;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.6rem !important;
}

.navbar-dark .nav-link {
    color: #ffffff !important;
    font-weight: 500;
}

.navbar-dark .nav-link:hover {
    color: var(--primary) !important;
}

/* Botón de teléfono */
.navbar .btn-warning {
    background-color: var(--primary) !important;
    border: none !important;
    color: #000 !important;
    font-weight: 700;
    padding: 10px 25px;
}

/* 3. HERO Y SECCIONES BARAJADAS */
.hero-bg {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    color: white;
    padding: 80px 0;
    border-bottom: 5px solid var(--primary);
}

/* 4. TARJETAS Y GRID DE PUEBLOS (INTERLINKING) */
.card-seo {
    border: none;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Estilo para los botones de pueblos cercanos en el Grid */
.btn-light.shadow-sm {
    background-color: #ffffff !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    font-weight: 500;
}

.btn-light.shadow-sm:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #000 !important;
}

/* 5. TABLAS Y RESPONSIVE */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    #main-navbar {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    body { padding-bottom: 70px; }
}

/* Barra Sticky Móvil de contacto */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #000 !important;
    border-top: 3px solid var(--primary);
    padding: 12px;
    z-index: 2000;
    display: flex;
    justify-content: space-around;
}

/* BORRA LO ANTERIOR DE LA NAVBAR Y PEGA ESTO */
html body nav.navbar.navbar-expand-lg.navbar-dark.sticky-top {
    background-color: #000000 !important;
    background: #000000 !important;
    --bs-bg-opacity: 1 !important;
    --bs-navbar-bg: #000000 !important;
    border-bottom: 4px solid #ffcc00 !important;
}

/* Por si acaso hay un contenedor interno con color */
html body .navbar.sticky-top .container,
html body .navbar.sticky-top .container-fluid {
    background-color: #000000 !important;
}

/* Tamaño y color de los iconos del grid */
.card-seo i.bi {
    transition: var(--transition);
    display: inline-block;
}

/* Efecto al pasar el ratón por la tarjeta: el icono gira un poco */
.card-seo:hover i.bi {
    color: var(--dark) !important;
    transform: rotate(45deg);
}

/* Forzamos que el card-body ocupe todo el espacio para el mt-auto */
.card-seo .card-body {
    flex: 1 1 auto;
}
/* Contenedor del icono para centrarlo bien */
.icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

/* Efecto hover sobre el SVG */
.card-seo:hover svg {
    transform: rotate(30deg);
    transition: transform 0.3s ease;
    fill: var(--dark) !important; /* El engranaje se vuelve negro al pasar el ratón */
}

/* Rotación suave para el icono del hero */
.rotating {
    animation: rotate 20s linear infinite;
}
@keyframes rotate { from {transform: rotate(0deg);} to {transform: rotate(360deg);} }

/* Efectos para los links de los pueblos */
.pueblo-link {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.pueblo-link:hover {
    background: rgba(255, 204, 0, 0.1);
    color: #ffcc00 !important;
    border: 1px solid #ffcc00;
    transform: translateX(5px);
}

/* Hero Index */
.hero-index {
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.9)), url('../img/bg-industrial.jpg');
    background-size: cover;
    background-position: center;
}

/* Imagen del Hero con sombra industrial */
.hero-img-box img {
    filter: grayscale(20%);
    transition: filter 0.5s ease;
}
.hero-img-box:hover img {
    filter: grayscale(0%);
}

/* Estilo para las tarjetas de categorías */
.card-categoria {
    transition: all 0.3s ease;
    border-top: 5px solid #ffcc00 !important; /* Borde superior amarillo industrial */
}

.card-categoria:hover {
    transform: translateY(-10px); /* Efecto de elevación */
    shadow: 0 1rem 3rem rgba(0,0,0,.175) !important;
}

/* Contenedor del icono */
.icon-circle {
    width: 70px;
    height: 70px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.card-categoria:hover .icon-circle {
    background: #000;
}

.card-categoria:hover .icon-circle i {
    color: #ffcc00 !important;
}

/* Ajuste fino para móviles */
@media (max-width: 768px) {
    .card-categoria {
        margin-bottom: 10px;
    }
}


/* Forzamos que la barra no tenga saltos */
.sticky-top {
    top: 0 !important;
    position: -webkit-sticky;
    position: sticky;
    z-index: 1020;
}

/* Reducción extra de espacio en móvil para que no 'coma' pantalla */
@media (max-width: 576px) {
    #main-navbar {
        height: 50px; /* Altura fija pequeña para control total */
    }
    .navbar-brand {
        font-size: 0.85rem !important;
    }
}