/* ================================================================
   Home page — ENCO Analytics
   Layout: hero banner (full-width, flush to navbar) →
           accesos rápidos (3-column grid) →
           aviso banner (full-width, bottom)
   ================================================================ */

/* ----------------------------------------------------------------
   Break out of Bootstrap's .container on the home page only.
   base.html wraps content in <main class="container my-4">.
   Scoped to body.page-home so other pages are unaffected.
   ---------------------------------------------------------------- */
body.page-home { overflow-x: hidden; }

body.page-home main.container {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ----------------------------------------------------------------
   Full-width breakout helper
   Lets .home-hero and .home-aviso escape the centered container
   and reach both edges of the viewport.
   ---------------------------------------------------------------- */
.home-hero,
.home-aviso {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
}

/* ----------------------------------------------------------------
   Hero banner
   Recommended image: 1920 × 500 px — static/images/home_hero.jpg
   ---------------------------------------------------------------- */
.home-hero {
    max-height: 500px;
    overflow: hidden;
    border-radius: 0;
    background: linear-gradient(135deg, #001489 0%, #000f6b 100%);
    margin-bottom: 2rem;
}

.home-hero__img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.home-hero__placeholder {
    width: 100%;
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.home-hero__placeholder i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Logo overlay — top-left of hero */
.home-hero__logo {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    height: 80px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45));
}

/* "BIENVENIDO" headline — centred on hero */
.home-hero__title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.home-hero__title .accent { color: #fedd00; }

@media (max-width: 576px) {
    .home-hero,
    .home-hero__img,
    .home-hero__placeholder { height: 240px; max-height: 240px; }
    .home-hero__logo { height: 48px; top: 0.75rem; left: 0.75rem; }
    .home-hero__title { font-size: 1.6rem; }
}

/* ----------------------------------------------------------------
   Accesos Rápidos — contained inside normal page width
   ---------------------------------------------------------------- */
.home-content {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.home-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #001489;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Three-column shortcut grid */
.home-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 2rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 767px) {
    .home-shortcuts { grid-template-columns: 1fr; gap: 1.25rem; }
}

.home-shortcut-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.home-shortcut-col__title {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #001489;
    margin-bottom: 0.25rem;
    text-align: center;
}

.home-shortcut-col__title.mt { margin-top: 1rem; }

/* Pill button */
.home-shortcut-btn {
    display: block;
    width: 100%;
    max-width: 220px;
    padding: 0.55rem 1rem;
    background-color: #001489;
    color: #ffffff !important;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    text-decoration: none !important;
    border-radius: 50px;
    border: 2px solid #001489;
    transition: background-color 0.2s ease, color 0.2s ease,
                transform 0.15s ease, box-shadow 0.2s ease;
}

.home-shortcut-btn:hover,
.home-shortcut-btn:focus {
    background-color: #fedd00;
    border-color: #fedd00;
    color: #001489 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 20, 137, 0.25);
}

/* ----------------------------------------------------------------
   Aviso banner — full-width, bottom
   Recommended image: 1920 × 360 px — static/images/home_aviso.jpg
   ---------------------------------------------------------------- */
.home-aviso {
    max-height: 360px;
    overflow: hidden;
    border-radius: 0;
    background: #f0f0f0;
    margin-top: 0;
    margin-bottom: 0;
}

.home-aviso__label {
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.45);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    pointer-events: none;
}

.home-aviso__img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.home-aviso__placeholder {
    width: 100%;
    height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: #999;
    font-size: 0.9rem;
}

.home-aviso__placeholder i { font-size: 3rem; color: #ccc; }

@media (max-width: 576px) {
    .home-aviso,
    .home-aviso__img,
    .home-aviso__placeholder { height: 180px; max-height: 180px; }
}
