/* ===============  Variables y Reset  =============== */
:root {
    --bg: #0b1322; /* noche */
    --bg-2: #0e2036;
    --card: #101b2d;
    --text: #e8ecf2;
    --muted: #9fb2cc;
    --brand: #16233b; /* luna */
    --brand3:#f0d992 ;
    --brand-2: #ffe7a7;
    --accent: #9ad1ff; /* estrellas frías (azul) */
    --alert: #e74c3c; /* rojo solo para badges/notificaciones */
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*, *::before, *::after {
    box-sizing: border-box
}

html, body {
    height: 100%
}

body {
    margin: 0;
    font: 16px/1.6 system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,"Helvetica Neue","Noto Sans",Arial;
    color: var(--text);
    background: radial-gradient(1200px 800px at 70% -10%, #1b2b47 0%, var(--bg) 45%) fixed;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block
}

a {
    color: inherit;
    text-decoration: none
}

.container {
    width: min(1120px,92vw);
    margin: 0 auto
}

/* ===============  Header (ESCRITORIO) =============== */
header.desktop-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(130%) blur(6px);
    background: linear-gradient(180deg, rgba(5,10,20,.85), rgba(5,10,20,.55));
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.container.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    padding: 10px 0;
}

    .container.nav .brand {
        display: flex;
        align-items: center;
        gap: .6rem;
        font-weight: 700;
        letter-spacing: .3px;
    }

    .container.nav .brand-logo {
        height: 38px;
        width: auto
    }

    .container.nav .brand .mark {
        width: 36px;
        aspect-ratio: 1;
        background: radial-gradient(35% 35% at 65% 40%, var(--brand-2), var(--brand));
        clip-path: path("M.50 0 C 30 25, 30 75, .50 100 C 55 98, 80 85, 98 60 C 82 72, 63 77, 50 78 C 73 55, 73 33, 50 10 Z");
        border-radius: 50%;
        box-shadow: 0 0 24px rgba(255,238,177,.35) inset;
    }

    .container.nav .menu {
        display: flex;
        gap: .5rem
    }

        .container.nav .menu .btn {
            width:100px;
            padding: 10px 14px;
            border: 1px solid rgba(255,255,255,.18);
            border-radius: 15px;
            background-color: #252f41 !important
        }

            .container.nav .menu .btn:hover {
                background: rgba(255,255,255,.06)
            }

/* ===============  Header (MÓVIL Bootstrap) =============== */
.btn-hamb {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 16px;
    background: var(--brand);
    color: #2b2108;
    box-shadow: 0 4px 12px rgba(0,0,0,.28);
}

/* Oculta appbar/drawer viejos en escritorio */
@media (min-width:992px) {
    .appbar, .drawer {
        display: none !important;
    }
}

/* ===============  Hero =============== */
.hero {
    position: relative;
    isolation: isolate;
    padding: 24px 0 60px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: clamp(16px,3vw,40px);
}

@media (max-width:900px) {
    .hero-grid {
        grid-template-columns: 1fr
    }
}

.tag {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    color: var(--muted);
}

h1 {
    font-size: clamp(36px,5vw,56px);
    line-height: 1.1;
    margin: 14px 0 10px
}

.lead {
    color: var(--muted);
    font-size: clamp(16px,2.2vw,18px);
    max-width: 60ch
}

.cta {
    display: flex;
    gap: 12px;
    margin-top: 22px;
    flex-wrap: wrap
}


.btn-primary {
    background: linear-gradient(180deg, var(--brand), #f0d992);
    color: #2b2108;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow);
}


.btn-primary2 {
    background: linear-gradient(180deg, #f4e3b0, #f0d992);
    color: #2b2108;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow);
}


.btn-ghost {
    background: transparent;
    color: var(--text);
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.18);
}

.hero-card {
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.logo-wrap {
    display: grid;
    place-items: center;
    padding: 10px;
    background: radial-gradient(180px 120px at 50% 35%, rgba(255,243,205,.12), transparent 60%);
    border-radius: var(--radius);
}

.logo {
    filter: drop-shadow(0 6px 18px rgba(255,236,182,.18))
}

.madeof {
    color: var(--muted);
    font-size: 14px;
    margin-top: 8px;
    text-align: center
}

/* ===============  Estrellas animadas =============== */
.stars, .stars::before, .stars::after {
    content: "";
    position: absolute;
    inset: 0;
    background-repeat: repeat;
    pointer-events: none;
    z-index: -1;
    background-image: radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,.8) 50%, transparent 51%), radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,.6) 50%, transparent 51%), radial-gradient(1.5px 1.5px at 80% 30%, rgba(255,255,255,.9) 50%, transparent 51%), radial-gradient(1px 1px at 60% 60%, rgba(255,255,255,.7) 50%, transparent 51%);
    opacity: .65;
}

    .stars::before {
        transform: translateY(-4%);
        filter: blur(.6px);
        opacity: .45
    }

    .stars::after {
        transform: translateY(4%);
        filter: blur(1px);
        opacity: .35
    }

@keyframes twinkle {
    0%,100% {
        opacity: .55
    }

    50% {
        opacity: .85
    }
}

.stars {
    animation: twinkle 6s ease-in-out infinite
}

/* ===============  Secciones =============== */
section {
    padding: 72px 0
}

h2 {
    font-size: clamp(26px,3.5vw,34px);
    margin: 0 0 8px
}

.sub {
    color: var(--muted);
    margin: 0 0 24px
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 22px
}

@media (max-width:960px) {
    .grid-3 {
        grid-template-columns: 1fr 1fr
    }
}

@media (max-width:640px) {
    .grid-3 {
        grid-template-columns: 1fr
    }
}

.card {
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
    border: 1px solid rgba(255,255,255,.10);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

    .card h3 {
        margin: 0 0 6px;
        color: var(--text);
    }

    .card p {
        color: var(--muted);
    }

.card h3 {
    margin: 0 0 6px
}

.chip {
    display: inline-block; /* ya no block */
    width: auto; /* que se ajuste al texto */
    max-width: max-content; /* asegura que solo ocupe lo que necesita */
    padding: 4px 12px; /* espacio interno */
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    color: #1b2436;
    background: var(--brand3);
    border-radius: 999px; /* píldora */
    white-space: nowrap; /* evita salto de línea */
    margin-bottom: 10px; /* separación con el título */
}



/* ===============  Footer  =============== */
footer {
    border-top: 1px solid rgba(255,255,255,.06);
    background: linear-gradient(180deg, rgba(7,13,22,.9), rgba(7,13,22,.6));
    padding: 28px 0;
    color: var(--muted);
}

.foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap
}

    .foot small {
        opacity: .85
    }

.brand-logo {
    width: 40px;
    height: auto;
    display: block
}

/* ===============  Utilidades =============== */
.thumb {
    width: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    background: #d8c397
}

/* Ajustes desktop: elimina hueco superior */
@media (min-width:992px) {
    html, body, header {
        margin-top: 0 !important;
    }

    body {
        padding-top: 0 !important;
    }
}



/* Libros*/

/* ====== Tarjetas de LIBROS con el mismo look que Servicios ====== */
/* Contenedor en grid (si no lo tienes ya) */
.libros .grid, .books .grid, .book-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

@media (max-width: 960px) {
    .libros .grid, .books .grid, .book-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .libros .grid, .books .grid, .book-list {
        grid-template-columns: 1fr;
    }
}

/* Tarjeta base (igual que .card de Servicios) */
.card--book, .libros .card, .books .card, .book-list .card {
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
    border: 1px solid rgba(255,255,255,.10);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 22px 20px; /* un poco más compacta que servicios */
    position: relative;
    overflow: hidden;
}

    /* Imagen superior dentro de la tarjeta */
    .card--book .thumb, .libros .card .thumb, .books .card .thumb, .book-list .card .thumb {
        border-radius: calc(var(--radius) - 6px);
        margin-bottom: 12px;
        width: 100%;
        height: auto; /* si necesitas alto fijo, usa aspect-ratio */
        object-fit: cover;
    }

    /* CHIP corto (no ocupar ancho completo) */
    .card--book .chip, .libros .card .chip, .books .card .chip, .book-list .card .chip {
        display: inline-block;
        width: auto;
        max-width: max-content;
        padding: 4px 12px;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.2;
        color: #1b2436;
        background: var(--brand);
        border-radius: 999px;
        white-space: nowrap;
        margin-bottom: 10px;
    }

    /* Título y texto con el mismo contraste de Servicios */
    .card--book h3, .libros .card h3, .books .card h3, .book-list .card h3 {
        margin: 6px 0 8px;
        color: var(--text);
        font-weight: 800;
        letter-spacing: .2px;
    }

    .card--book p, .libros .card p, .books .card p, .book-list .card p {
        color: var(--muted);
    }

    /* Enlace “Ver detalles” sutil */
    .card--book .link, .libros .card a.link, .books .card a.link, .book-list .card a.link {
        display: inline-block;
        margin-top: 8px;
        color: var(--muted);
        border-bottom: 1px dashed rgba(255,255,255,.25);
    }

        .card--book .link:hover, .libros .card a.link:hover, .books .card a.link:hover, .book-list .card a.link:hover {
            color: var(--text);
            border-bottom-color: rgba(255,255,255,.5);
        }

    /* Hover/Focus igual que Servicios (levantar un poco) */
    .card--book:hover, .libros .card:hover, .books .card:hover, .book-list .card:hover {
        transform: translateY(-2px);
        transition: transform .18s ease, box-shadow .18s ease;
        box-shadow: 0 12px 30px rgba(0,0,0,.35);
    }

    /* Si algún estilo anterior hacía el chip “franja” completa, forzamos aquí: */
    .card--book .chip, .libros .card .chip, .books .card .chip, .book-list .card .chip {
        display: inline-block !important;
    }


    /* Menu lateral */

/* ====== Estilo oscuro para el menú lateral (offcanvas) ====== */
.offcanvas {
    background: var(--bg-2) !important;
    color: var(--text) !important;
    border-right: 1px solid rgba(255,255,255,.08);
}

/* Encabezado del menú */
.offcanvas-header {
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.offcanvas-title {
    font-weight: 700;
    color: var(--text) !important;
}

.offcanvas .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%); /* botón cerrar blanco */
    opacity: .85;
}

/* Links del menú */
.offcanvas-body .list-group-item {
    background: transparent !important;
    color: var(--text) !important;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 14px 16px;
}

    .offcanvas-body .list-group-item:hover {
        background: rgba(255,255,255,.05) !important;
        color: var(--brand) !important; /* un poquito de dorado lunar al hover */
        cursor: pointer;
    }




./* Menu Completo*/

    /* Pastilla igual que tus botones del menú */
    .btn-link-nav.dropdown-toggle {
        border: 1px solid rgba(255,255,255,.18);
        border-radius: 999px;
    }

    /* Dropdown oscuro a juego con el sitio */
    .menu-drop.dropdown-menu {
        background: var(--bg-2);
        color: var(--text);
        border: 1px solid rgba(255,255,255,.10);
        border-radius: 14px;
        box-shadow: var(--shadow);
        margin-top: .5rem; /* separación bajo el botón */
        min-width: 220px;
        backdrop-filter: saturate(130%) blur(6px);
    }

    .menu-drop .dropdown-item {
        color: var(--text);
    }

        .menu-drop .dropdown-item:hover,
        .menu-drop .dropdown-item:focus {
            background: rgba(255,255,255,.06);
            color: var(--brand);
        }

    .menu-drop .dropdown-divider {
        border-top: 1px solid rgba(255,255,255,.10);
    }


    /* Botones de menú (versión base) */
    .btn-link-nav {
        background: rgba(255,255,255,0.06); /* color de fondo inicial */
        color: #757c89; /* texto oscuro */
        border: 1px solid rgba(255,255,255,.18);
        padding: .5rem 1rem;
        border-radius: 999px;
        font-weight: 500;
        transition: all .2s ease;
    }

/* Hover y foco */
        .btn-link-nav:hover,
        .btn-link-nav:focus {
            background: var(--brand); /* dorado lunar */
            color: var(--text); /* texto claro */
            border-color: var(--brand-2); /* borde más brillante */
        }

/* Estado activo (página actual) */
.btn-link-nav.active{
  background: var(--brand-2);           /* más brillante */
  color: #1b2436;
  border-color: var(--brand-2);
  font-weight: 700;
}
