html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}


/* ============================
   BOTTOM SHEET – SLIDE UP
   ============================ */

/* El modal SIEMPRE arranca abajo */
.modal-bottom-sheet {
    margin: 0;
    display: flex;
    align-items: flex-end;
    min-height: 100vh;
}

    /* Contenedor */
    .modal-bottom-sheet .modal-content {
        width: 100%;
        border-radius: 16px 16px 0 0;
        overflow: hidden;
    }

    /* Scroll interno */
    .modal-bottom-sheet .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

/*  OVERRIDE animación Bootstrap */
.modal.fade .modal-bottom-sheet {
    transform: translateY(100%);
}

.modal.show .modal-bottom-sheet {
    transform: translateY(0);
}

.modal.fade .modal-bottom-sheet,
.modal.show .modal-bottom-sheet {
    transition: transform 0.3s ease-out;
}

/* ===== MENU PRINCIPAL HOME ===== */

.menu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 110px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    text-decoration: none;
    color: #212529;
    transition: transform .15s ease, box-shadow .15s ease;
}

    .menu-card i {
        font-size: 1.6rem;
        margin-bottom: 8px;
        color: #0d6efd; /* primary */
    }

    .menu-card span {
        font-size: 0.9rem;
        font-weight: 500;
        text-align: center;
    }

    /* feedback táctil */
    .menu-card:active {
        transform: scale(0.97);
        box-shadow: 0 2px 6px rgba(0,0,0,.12);
    }

/* ===== BOTTOM NAV ===== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #ffffff;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1030;
}

/* ITEMS */
.bottom-nav-item {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .bottom-nav-item i {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }

/* ===== ESPACIO PARA QUE EL FOOTER NO QUEDE TAPADO ===== */
.footer-spacer {
    padding-bottom: 80px;
}

/* ===== BOTÓN CENTRAL RUTA ===== */

.bottom-nav-item.route-btn {
    position: relative;
    top: -26px;
    width: 96px;
    height: 95px;
    min-width: 68px;
    min-height: 68px;
    border-radius: 50%;
    background-color: #dc3545; /* rojo Bootstrap */

    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #fff; /* lo hace visualmente más circular */
    box-shadow: 0 10px 28px rgba(220,53,69,.45), 0 4px 8px rgba(0,0,0,.12);
    text-decoration: none;
}

    /* ICONO */
    .bottom-nav-item.route-btn i {
        font-size: 1.8rem;
        color: #fff;
        line-height: 1;
    }

    .bottom-nav-item.route-btn.active i {
        font-size: 3.1rem;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
    }

.bottom-nav-item {
    transition: transform .2s ease;
}

.bottom-nav-item.active:not(.route-btn) {
    transform: scale(1.45);
}

.botton-header-custom-nav.i {
    font-size: 3.1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
}

/* ===== MODAL TOP AUTO HEIGHT ===== */
.modal.modal-top .modal-dialog {
    position: fixed;
    top: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
}

.modal.modal-top .modal-content {
    border-radius: 0 0 18px 18px;
    animation: slideFromTop .28s ease-out;
}

/* NO limitar altura */
.modal.modal-top .modal-body {
    overflow: hidden;
}

@keyframes slideFromTop {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}


/* ARTICLES PAGE*/

#articles-search,
#articles-sort {
    min-height: 44px;
}

.sticky-top.bg-body {
    background-color: #fff !important;
}

.article-image-trigger img {
    transition: transform 0.2s ease;
}

.article-image-trigger:active img,
.article-image-trigger:hover img {
    transform: scale(1.03);
}
