@import url('/css/styles.css');

/* ===== hero ===== */
.ds-hero {
    padding: 4rem 1.25rem 2rem;
}

.ds-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    margin-bottom: 1rem;
}

.ds-hero-copy {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--texto-suave);
}

/* ===== layout: menú lateral + contenido ===== */
.ds-layout {
    /* width 100% porque es hijo directo de un body en flex:
       sin esto, el margin auto lo encoge a su contenido */
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.25rem 3rem;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

/* ===== menú lateral ===== */
.ds-menu {
    position: sticky;
    top: 4.5rem; /* siempre por debajo del header fijo */
    background-color: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--borde);
    border-top: 3px solid var(--rojo);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    padding: 1.1rem 0.9rem 1.2rem;
    text-align: left;
}

.ds-menu-titulo {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--rojo-claro);
    margin-bottom: 0.75rem;
}

.ds-menu-nav {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.35rem;
}

.ds-menu-nav a {
    display: block;
    padding: 0.55rem 0.85rem;
    border-left: 3px solid transparent;
    border-radius: 10px;
    color: var(--texto-suave);
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.ds-menu-nav a:hover {
    background-color: rgba(0, 71, 171, 0.35);
    border-left-color: var(--azul-claro);
    color: #fff;
    transform: translateX(3px);
}

.ds-menu-nav a.active {
    background-color: var(--azul);
    border-left-color: var(--rojo-claro);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 71, 171, 0.45);
}

/* ===== contenido ===== */
.ds-contenido {
    min-width: 0;
    overflow-wrap: break-word;
    text-align: left;
}

.ds-seccion {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 1.5rem 0;
    text-align: left;
    scroll-margin-top: 100px;
}

.ds-seccion + .ds-seccion {
    border-top: 1px solid var(--borde);
}

.ds-seccion h2 {
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-weight: 700;
    color: var(--texto);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    text-align: left;
    display: inline-block;
    position: relative;
    margin-bottom: 0.5rem;
    padding-bottom: 0.45rem;
}

.ds-seccion h2::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--rojo), var(--azul));
}

.ds-seccion-desc {
    color: var(--texto-suave);
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: 1rem;
}

/* placeholder mientras no hay descubrimientos publicados */
.ds-vacio {
    background-color: rgba(15, 23, 42, 0.75);
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: var(--radio);
    padding: 1.1rem 1.2rem;
    color: var(--texto-suave);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
}

/* ===== celular / tablet: menú arriba, en horizontal ===== */
@media (max-width: 900px) {
    .ds-layout {
        /* minmax(0,1fr): si no, la pista crece hasta el ancho mínimo
           de los enlaces del menú y la página se sale de la pantalla */
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
        padding: 0.5rem 1rem 2.5rem;
    }

    .ds-menu {
        position: static;
        min-width: 0;
        padding: 0.9rem 0.75rem;
    }

    .ds-menu-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.35rem;
        scrollbar-width: thin;
        scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
    }

    /* barra de scroll de los chips, discreta y a tono con el sitio */
    .ds-menu-nav::-webkit-scrollbar {
        height: 6px;
    }

    .ds-menu-nav::-webkit-scrollbar-track {
        background: transparent;
    }

    .ds-menu-nav::-webkit-scrollbar-thumb {
        background-color: rgba(148, 163, 184, 0.45);
        border-radius: 999px;
    }

    .ds-menu-nav a {
        flex: 0 0 auto;
        white-space: nowrap;
        border-left: none;
        border: 1px solid var(--borde);
        border-radius: 999px;
        padding: 0.5rem 1rem;
        text-align: center;
    }

    .ds-menu-nav a:hover {
        transform: none;
        border-color: var(--azul-claro);
    }

    .ds-seccion {
        padding: 1.25rem 0;
    }
}

@media (max-width: 600px) {
    .ds-hero {
        padding: 3rem 1rem 1.75rem;
    }

    .ds-hero-copy {
        font-size: 1rem;
    }

    .ds-menu-titulo {
        margin-bottom: 0.5rem;
    }

    .ds-seccion h2 {
        font-size: 1.35rem;
    }

    .ds-vacio {
        padding: 1rem;
        font-size: 0.9rem;
    }
}
