:root {
    --primary-color: #1961BC;
    --secondary-color: #EEC513;
    --tertiary-color: #202f4d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #f5f5f5;
}

.py-12 {
    padding-block: calc(0.25rem * 12);
}

.logo {
    height: 70px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white !important;
}

a:link,
a:visited {
    text-decoration: none;
}

.bold {
    font-weight: bold;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.navbar a {
    color: #000000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-links {
    display: flex;
    gap: 25px;
    color: #000000;
}

.nav-actions button {
    margin-left: 10px;
    padding: 8px 15px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.login {
    background: transparent;
}

.register {
    background: #1d4ed8;
    color: white;
}

section {
    display: block;
    unicode-bidi: isolate;
}

.container {
    max-width: 75%;
    margin: 0 auto;
    padding: 0px;
}

.link {
    text-decoration: none;
    font-weight: 500;
}

.card-custom {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    color: #212529;
    transition: 0.2s;
}

.card-img {
    height: 150px;
    object-fit: cover;
}

.card-custom:hover {
    transform: translateY(-3px);
}

.cat-card {
    transition: background-color 0.2s, color 0.2s;
}

.cat-card.active {
    background: var(--primary-color);
    color: #ffffff;
}

.scroll-pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 transparent;
}

.scroll-pills::-webkit-scrollbar {
    height: 4px;
}

.scroll-pills::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

.cat-filtro {
    background: #e9ecef;
    color: #495057;
    cursor: pointer;
    user-select: none;
    font-size: .82rem;
    padding: .4em .85em;
    border-radius: 20px;
    transition: background .15s, color .15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.cat-filtro:hover {
    background: #d0d5dd;
}

.cat-filtro.active {
    background: var(--primary-color);
    color: #ffffff;
}

.title {
    font-weight: 700;
}

.subtitle {
    color: #6c757d;
    margin-top: 5px;
}

.badge-open {
    background: #d1fae5;
    color: #065f46;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
}

.badge-closed {
    background: #fad1d1;
    color: #5f1806;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 15px;
}

.icon-box.blue {
    background: #e7f0ff;
    color: #2563eb;
}

.icon-box.orange {
    background: #fff4d6;
    color: #d97706;
}

.icon-box.yellow {
    background: #fff3cd;
    color: #ffc107;
}

.icon-box.green {
    background: #dcfce7;
    color: #16a34a;
}

.footer {
    background: #0f172a;
    border-top: 1px solid #e5e7eb;
    padding: 30px 0;
    margin-top: 60px;
}

.footer-logo {
    font-size: 14px;
    margin-bottom: 5px;
}

.footer-logo img {
    border-radius: 0.5rem;
    background-color: white;
    height: calc(0.25rem*10);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: #6c757d;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-copy {
    font-size: 12px;
    color: #9ca3af;
}

.back-link {
    text-decoration: none;
    font-size: 14px;
    color: #6c757d;
}

.rating {
    font-size: 13px;
    color: #f59e0b;
}

.w-400 {
    max-width: 400px;
}

.hero {
    background: linear-gradient(135deg, #0066CB, #003E7B);
}

.hero h1 {
    color: white;
}

.badge {
    background: #facc15;
    color: #000000;
    padding: 8px;
    border-radius: 8px;
    display: inline-block;
    font-size: 14px;
}

.hero h1 {
    font-size: 48px;
    font-weight: bold;
    max-width: 600px;
}

.hero h1 span {
    color: #facc15;
}

.hero p {
    max-width: 600px;
    line-height: 1.5;
    color: #dbeafe;
}

.search-box {
    display: flex;
}

.search-box input {
    padding: 12px;
    width: 320px;
    border-radius: 8px 0 0 8px;
    border: none;
}

.search-box button {
    padding: 12px 20px;
    border: none;
    background: #facc15;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

.stats-mini {
    margin-top: 24px;
    font-size: 14px;
    color: #dbeafe;
    gap: calc(0.25rem * 4);
    display: flex;
}

.stat {
    padding: calc(0.25rem * 4);
}

.stat p {
    color: black;
}

.stat h2,
.stat i {
    font-size: 2rem;
    font-weight: 900;
}

.stats-container {
    text-align: center;
    display: grid;
    margin-top: -1px;
    grid-template-columns: auto auto auto auto;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.categories {
    background: #f3f4f6;
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 15px;
}

.card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
}

.container h1 {
    font-size: 3.55rem;
    line-height: 1.25;
}

.land {
    padding-block: calc(0.25rem * 28);
}

.view-all {
    background: #1d4ed8;
    color: #fff;
}

.step {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

.step-card p {
    font-size: 14px;
    color: #6c757d;
}

.formulario-calificar {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, margin-top 0.4s ease-out;
}

.formulario-calificar.visible {
    max-height: 350px;
    opacity: 1;
    margin-top: 1rem;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {

    /* El contenedor ocupa todo el ancho disponible en móvil */
    .container {
        max-width: 100%;
        padding: 0 15px;
    }

    /* Encabezado del home: se reorganiza en dos filas */
    .navbar .container {
        flex-wrap: wrap;
        height: auto;
        padding-top: 10px;
        padding-bottom: 10px;
        row-gap: 10px;
    }

    .logo {
        height: 48px;
    }

    /* Logo (fila 1, izquierda) y acciones (fila 1, derecha) */
    .navbar .nav-actions {
        order: 2;
        display: flex;
        align-items: center;
    }

    /* Enlaces: ocupan toda la fila 2, centrados */
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 18px;
        border-top: 1px solid #eee;
        padding-top: 10px;
    }

    .nav-actions button,
    .nav-actions .btn {
        padding: 6px 12px;
        font-size: 14px;
    }

    /* Grids del landing que se salían en pantallas pequeñas */
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-container {
        grid-template-columns: repeat(2, auto);
    }

    .container h1,
    .hero h1 {
        font-size: 2rem;
    }

    .search-box input {
        width: 100%;
    }
}

@media (max-width: 480px) {

    .nav-links {
        gap: 12px;
        font-size: 14px;
    }

    .nav-actions {
        gap: 4px;
    }
}

@media (max-width: 500px) {
    .nav-label {
        display: none;
    }

    .nav-pills .nav-link i {
        margin-right: 0 !important;
    }

    .col-xs-hide {
        display: none;
    }

    .search-bar-desktop {
        display: none !important;
    }
}

@media (min-width: 501px) {
    .search-icon-mobile {
        display: none !important;
    }
}

#modalBuscarMobile .modal-dialog {
    margin-top: 65px;
}