/* ============================================================ */
/*  AUTOMETRICA — HOJA DE ESTILOS CONSOLIDADA (SIN CONFLICTOS) */
/* ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Numans&display=swap');


/* ============================= */
/* GLOBAL / RESET                */
/* ============================= */

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    height: 100%;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f6f8, #eef1f4, #e8ebef);
    color: #1f2937;
    transition: background .3s ease;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================= */
/* MICRO UX GLOBAL               */
/* ============================= */

a,
button {
    transition: all .25s ease;
}

a:hover {
    text-decoration: none;
}

img {
    transition: transform .4s ease, box-shadow .4s ease;
}

img:hover {
    transform: scale(1.02);
}

.small,
small {
    font-size: 110% !important;
}


/* ============================= */
/* NAVBAR  (gana sobre MDB)      */
/* ============================= */

/*
 * Tu navbar usa: .navbar.fixed-top.navbar-expand-lg.navbar-dark.navbar-custom
 * MDB tiene reglas sobre .navbar-dark y .navbar-expand-lg que se aplican DESPUÉS
 * de que JS inicializa. Usamos el selector más específico posible para ganarle.
 */

nav.navbar.navbar-custom {
    background: linear-gradient(180deg, #363636, #222) !important;
    padding: 12px 0;
    transition: all .35s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

nav.navbar.navbar-custom.scrolled {
    background: rgba(34, 34, 34, 0.95) !important;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
}

/* Logo */
nav.navbar.navbar-custom .navbar-brand img {
    transition: transform .3s ease;
}

nav.navbar.navbar-custom .navbar-brand:hover img {
    transform: scale(1.05);
}

/* Items a la derecha */
nav.navbar.navbar-custom .navbar-nav {
    margin-left: auto !important;
}

/* ─── nav-link base ─── */
/*
 * MDB sobreescribe color y overflow en .navbar-dark .nav-link tras init JS.
 * Necesitamos: position:relative para el ::after, y overflow:visible para que
 * el pseudo-elemento no quede recortado.
 */
nav.navbar.navbar-custom .navbar-nav .nav-link {
    color: #d1d5db !important;
    font-weight: 500;
    margin-left: 15px;
    padding: 10px 4px !important;   /* padding lateral mínimo para que el ::after quepa */
    position: relative !important;
    overflow: visible !important;   /* clave: MDB pone overflow:hidden en algunos temas */
    transition: color .25s ease;
}

/* Hover color */
nav.navbar.navbar-custom .navbar-nav .nav-link:hover {
    color: #EC1C24 !important;
}

/* ─── Subrayado animado ─── */
/*
 * NO usamos ::after del <a> porque MDB puede resetear overflow:hidden en el link.
 * En su lugar añadimos un <span class="nav-underline"> dentro de cada <a> via JS
 * (ver bloque <script> al final del CSS — instrucciones).
 *
 * Si prefieres no tocar el HTML, la alternativa pura CSS más robusta es
 * usar box-shadow inferior animado, que no depende de overflow ni position.
 */
nav.navbar.navbar-custom .navbar-nav .nav-link {
    background-image: linear-gradient(#EC1C24, #EC1C24);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size .3s ease, color .25s ease;
}

nav.navbar.navbar-custom .navbar-nav .nav-link:hover {
    background-size: 100% 2px;
}

/* ─── Item activo ─── */
nav.navbar.navbar-custom .navbar-nav .nav-item.active .nav-link {
    color: #ffffff !important;
    background-size: 100% 2px;
}

/* ─── Botón pill "Iniciar sesión Autos" ─── */
nav.navbar.navbar-custom .navbar-nav .nav-link[href*="autos"] {
    padding: 6px 14px !important;
    border-radius: 30px !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    margin-left: 20px;
    /* sin subrayado en el pill */
    background-image: none !important;
}

nav.navbar.navbar-custom .navbar-nav .nav-link[href*="autos"]:hover {
    background-color: #EC1C24 !important;
    border-color: #EC1C24 !important;
    color: #fff !important;
    background-image: none !important;
}

/* ─── Responsive ─── */
@media (max-width: 991px) {
    nav.navbar.navbar-custom .navbar-nav {
        margin-left: 0 !important;
    }

    nav.navbar.navbar-custom .navbar-nav .nav-link {
        margin-left: 0;
        padding: 10px 0 !important;
        /* sin subrayado en mobile: no hay espacio lateral */
        background-image: none !important;
    }

    nav.navbar.navbar-custom .navbar-nav .nav-link[href*="autos"] {
        border: none !important;
        border-radius: 0 !important;
        margin-left: 0;
        padding: 10px 0 !important;
    }
}

@media (min-width: 800px) and (max-width: 850px) {
    nav.navbar.navbar-custom:not(.top-nav-collapse) {
        background: #1C2331 !important;
    }
}


/* ============================= */
/* HERO (CAROUSEL / VIDEO)       */
/* ============================= */

header,
.carousel {
    height: 100%;
}

.view video {
    object-fit: cover;
    width: 100%;
    height: 100%;
    filter: brightness(0.65);
}

.mask {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.55),
        rgba(0, 0, 0, 0.75)
    ) !important;
}

.carousel .white-text {
    animation: fadeUpHero 1s ease;
}

@keyframes fadeUpHero {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel .white-text h1 {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: .5px;
}

.carousel .white-text p {
    font-size: 18px;
    opacity: .9;
}


/* ============================= */
/* SECCIONES                     */
/* ============================= */

section {
    margin-top: 80px;
}

h3.h3 {
    font-weight: 700;
    font-size: 28px;
    position: relative;
}

h3.h3::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #EC1C24, #d8191f);
    margin: 12px auto 0;
    border-radius: 2px;
}


/* ============================= */
/* ACCESO RÁPIDO                 */
/* ============================= */

.quick-access {
    margin-top: 100px;
}

.section-title {
    font-weight: 700;
    font-size: 30px;
}

.access-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    transition: .3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.access-card i {
    font-size: 40px;
    margin-bottom: 15px;
    color: #515151;
}

.access-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}


/* ============================= */
/* IMÁGENES                      */
/* ============================= */

img.img-fluid {
    border-radius: 10px;
    transition: .3s;
}

img.img-fluid:hover {
    transform: scale(1.03);
}


/* ============================= */
/* CARDS / ACORDEÓN              */
/* ============================= */

.card {
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 15px;
    transition: all .35s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}

.card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08),
                0 20px 50px rgba(0, 0, 0, 0.06);
}

/* Línea lateral activa en acordeón */
.card-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: transparent;
    transition: .3s;
}

.accordion-btn[aria-expanded="true"] + .card-header::before,
.accordion-btn[aria-expanded="true"]::before {
    background: #EC1C24;
}

.card-body {
    padding: 25px;
    background: #fafafa;
}

.accordion-btn[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}

/* ============================= */
/* BOTÓN ACORDEÓN                */
/* ============================= */

.accordion-btn {
    width: 100%;
    padding: 18px 22px;
    text-align: left !important;
    font-weight: 600;
    transition: all .25s ease;
}

.accordion-btn:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}


/* Contenedor del encabezado */
.accordion-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Ícono rotatorio */
.accordion-icon {
    font-size: 16px;
    transition: transform .3s ease;
}



/* ============================= */
/* BOTONES                       */
/* ============================= */

.btn {
    border-radius: 10px;
    padding: 10px 24px;
    font-weight: 600;
    border: none;
    /* ← quita: position: relative;  */
    /* ← quita: overflow: hidden;    */
}

/* Efecto ripple 
.btn::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: width .4s ease, height .4s ease;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
*/

.btn:hover::after {
    width: 200%;
    height: 500%;
}

.btn-danger {
    background: linear-gradient(90deg, #EC1C24, #d8191f);
}

.btn-danger:hover {
    background: linear-gradient(90deg, #ff3e45, #fd2027);
}

.btn-primary {
    background: linear-gradient(90deg, #224acf, #1241dd);
}

.btn-primary:hover {
    background: linear-gradient(90deg, #2d53d3, #1f4de4);
}


/* ============================= */
/* PRICING PORTAL                */
/* ============================= */

.pricing-section {
    margin-top: 25px;
}

/* Títulos de categoría */
.pricing-title {
    font-weight: 700;
    font-size: 20px !important;
    margin-bottom: 18px;
    letter-spacing: .3px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1f2937;
}

.pricing-title img {
    width: 24px;
    height: 24px;
}

/* Contenedor ícono */
.cont-img {
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cont-img img {
    width: 22px;
    filter: brightness(0) invert(1);
}

/* Colores por categoría */
.recientes span,
.cont-img.recientes {
    background: #515151;
}

.anteriores span,
.cont-img.anteriores {
    background: #EC1C24;
}

.combos span,
.cont-img.combos {
    background: #AF20A1;
}

/* Tarjetas de plan */
.pricing-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e8eaee;
    border-left: 4px solid transparent;
    padding: 24px;
    height: 100%;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .04);
    transition: all .35s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}

/* Borde por categoría */
.pricing-card.recientes  { border: 1px solid #515151; }
.pricing-card.anteriores { border: 1px solid #EC1C24; }
.pricing-card.combos     { border: 1px solid #AF20A1; }

/* Hover */
.pricing-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
}

/* Número / título del plan */
.pricing-number {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

/* Descripción */
.pricing-desc {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
    line-height: 1.4;
}

/* Precio */
.pricing-price {
    margin-top: 12px;
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    letter-spacing: .3px;
}

/* Ícono superior del plan */
.plan-icon {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 46px;
    height: 46px;
    pointer-events: none;
    transition: opacity .25s;
}

.pricing-card:hover .plan-icon {
    opacity: .55;
}

/* Responsive pricing */
@media (max-width: 768px) {
    .pricing-number { font-size: 20px; }
    .pricing-price  { font-size: 22px; }
    .plan-icon      { width: 40px; height: 40px; }
}


/* ============================= */
/* FORMULARIO DE CONTACTO        */
/* ============================= */

.md-form input,
.md-form textarea {
    border-radius: 8px !important;
    padding: 10px !important;
    border: 1px solid #e5e7eb !important;
}

.md-form input:focus,
.md-form textarea:focus {
    border-color: #EC1C24 !important;
    box-shadow: 0 0 0 2px rgba(236, 28, 36, 0.1);
}


/* ============================= */
/* FOOTER                        */
/* ============================= */

.page-footer {
    background: linear-gradient(180deg, #363636, #222);
}

.page-footer .btn-outline-white {
    border-radius: 30px;
    transition: .25s;
}

.page-footer .btn-outline-white:hover {
    background: #EC1C24;
    border-color: #EC1C24;
}

.welcome-logo {
  max-width: 100%;
  height: auto;
  max-height: 150px;
  opacity: .9;
}

/* barra progreso */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: #ec1c24;
  width: 0%;
  z-index: 2000;
}

.md-form label.active {
    transform: translateY(-25px) scale(.8);
    color: #EC1C24 !important;
}
