/* =========================================================
   EFEMÉRIDES · pucela.club

   Identidad tomada de pucela.club: fondo claro, morado de
   marca, Inter y esquinas redondeadas. Los colores y radios
   son variables para poder ajustarlos en un solo sitio.
========================================================= */

:root {
    --morado: #9300D3;
    --morado-oscuro: #680095;
    --morado-claro: #F5E9FA;
    --morado-texto: #7A00B0;
    --verde: #40D300;

    --fondo: #F7F5F8;
    --superficie: #FFFFFF;
    --superficie-alt: #FBF8FC;
    --texto: #211C24;
    --texto-2: #6F6673;
    --borde: #E5DFE8;

    --radio-grande: 22px;
    --radio-medio: 15px;
    --radio-pequeno: 10px;

    --ancho: 1080px;
    --alto-barra: 64px;

    --sombra-suave: 0 4px 20px rgba(33, 28, 36, .08);
    --sombra-media: 0 12px 36px rgba(33, 28, 36, .16);

    color-scheme: light;
}

/* Por defecto, claro (como pucela.club). El oscuro es opcional:
   lo activa el interruptor de la barra y se recuerda. */
:root[data-theme="dark"] {
    --morado-claro: rgba(147, 0, 211, .22);
    --morado-texto: #E3A8FF;

    --fondo: #14101A;
    --superficie: #1E1826;
    --superficie-alt: #231C2C;
    --texto: #F4EFF6;
    --texto-2: #B5AABB;
    --borde: #352B3E;

    --sombra-suave: 0 4px 20px rgba(0, 0, 0, .35);
    --sombra-media: 0 12px 36px rgba(0, 0, 0, .5);

    color-scheme: dark;
}


*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--fondo);
    color: var(--texto);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

h1, h2, h3, p, ul {
    margin: 0;
}

ul {
    padding: 0;
    list-style: none;
}

a {
    color: var(--morado-texto);
}

button,
select {
    font: inherit;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

:focus-visible {
    outline: 3px solid var(--morado);
    outline-offset: 2px;
    border-radius: 6px;
}

[hidden] {
    display: none !important;
}

.container {
    width: min(100% - 32px, var(--ancho));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--morado);
    color: #fff;
    border-radius: var(--radio-pequeno);
    transition: top .15s;
}

.skip-link:focus {
    top: 12px;
}

.eyebrow {
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}



/* =========================================================
   SELECTOR DE FECHA
========================================================= */

.picker {
    position: fixed;
    inset: var(--alto-barra) 0 0 0;
    z-index: 25;
    padding-top: 12px;
    background: rgba(20, 10, 30, .38);
}

.picker__card {
    margin-inline: auto;
    width: min(100%, 380px);
    padding: 18px;
    background: var(--superficie);
    border: 1px solid var(--borde);
    border-radius: var(--radio-grande);
    box-shadow: var(--sombra-media);
}

.picker__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 1.1rem;
    text-transform: capitalize;
}

.picker__arrow {
    width: 38px;
    height: 38px;
    border: 1px solid var(--borde);
    border-radius: 50%;
    background: var(--superficie);
    cursor: pointer;
}

.picker__arrow:hover {
    border-color: var(--morado);
}

.picker__days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid transparent;
    border-radius: var(--radio-pequeno);
    background: var(--superficie-alt);
    font-weight: 600;
    cursor: pointer;
}

.calendar-day:hover {
    border-color: var(--morado);
}

.calendar-day.has-content::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 5px;
    height: 5px;
    margin-left: -2.5px;
    border-radius: 50%;
    background: var(--morado);
}

.calendar-day.is-today {
    border-color: var(--morado);
}

.calendar-day.is-selected {
    background: var(--morado);
    border-color: var(--morado);
    color: #fff;
}

.calendar-day.is-selected::after {
    background: #fff;
}

.picker__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    font-size: .85rem;
    color: var(--texto-2);
}

.picker__legend i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 4px;
    border-radius: 50%;
    background: var(--morado);
}

.link-button {
    border: 0;
    background: none;
    color: var(--morado-texto);
    font-weight: 700;
    cursor: pointer;
}


/* =========================================================
   PORTADA DEL DÍA
========================================================= */

/* Portada con vídeo de fondo, igual que la de pucela.club. */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: clamp(520px, 78vh, 700px);
    padding: calc(var(--alto-barra) + 32px) 0 96px;
    color: #fff;
}

@supports (min-height: 1svh) {
    .hero {
        min-height: clamp(520px, 78svh, 700px);
    }
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: var(--morado-oscuro) url("../../../images/cabecera-pucela.club.webp") center / cover no-repeat;
    pointer-events: none;
}

.hero__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Misma veladura morada que la portada de pucela.club. */
.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(to top, rgba(33, 0, 50, .55) 0%, rgba(33, 0, 50, 0) 46%),
        linear-gradient(100deg, rgba(74, 0, 108, .86) 0%, rgba(104, 0, 149, .70) 44%, rgba(147, 0, 211, .54) 100%);
}

/* Aro decorativo, como en pucela.club. */
.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -110px;
    bottom: -170px;
    width: 360px;
    height: 360px;
    border: 44px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    pointer-events: none;
}

.hero :focus-visible {
    outline-color: #fff;
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 40px;
    align-items: start;
}

.hero__day .eyebrow {
    color: #EBBBFF;
}

.hero__title {
    display: flex;
    flex-direction: column;
    margin-top: 6px;
    line-height: .9;
}

.hero__number {
    font-size: clamp(92px, 16vw, 168px);
    font-weight: 900;
    letter-spacing: -.05em;
}

.hero__month {
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -.02em;
}

.hero__summary {
    margin-top: 18px;
    color: rgba(255, 255, 255, .82);
    font-weight: 500;
}

.day-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.day-nav__link,
.day-nav__pick,
.day-nav__today {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s;
}

.day-nav__link:hover,
.day-nav__pick:hover,
.day-nav__today:hover {
    background: rgba(255, 255, 255, .26);
}

.day-nav__today {
    background: #fff;
    color: var(--morado-oscuro);
}

.day-nav__today:hover {
    background: #F5E9FA;
}


/* =========================================================
   SANTORAL
========================================================= */

.saints {
    padding: 24px;
    background: var(--superficie);
    color: var(--texto);
    border-radius: var(--radio-grande);
    box-shadow: var(--sombra-media);
}

.saints__eyebrow {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--morado-texto);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.saint {
    margin-top: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--borde);
}

.saint:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
}

.saint__name {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
}

.saint__name a {
    color: inherit;
    text-decoration: none;
}

.saint__name a:hover {
    color: var(--morado-texto);
    text-decoration: underline;
}

.saint__sub {
    margin-top: 4px;
    color: var(--morado-texto);
    font-weight: 700;
}

.saint__sub::first-letter {
    text-transform: uppercase;
}

.saint__desc {
    margin-top: 8px;
    color: var(--texto-2);
}

.onomastics {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--borde);
}

.onomastics__label {
    margin-bottom: 8px;
    color: var(--texto-2);
    font-size: .85rem;
    font-weight: 600;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chips li {
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--morado-claro);
    color: var(--morado-texto);
    font-weight: 700;
    font-size: .92rem;
}

.saints__more {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--borde);
}

.saints__more summary {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--morado-texto);
    font-weight: 700;
    cursor: pointer;
}

.saints__more summary span {
    padding: 0 8px;
    border-radius: 999px;
    background: var(--morado-claro);
    font-size: .8rem;
}

.saints__more ul {
    margin-top: 10px;
    display: grid;
    gap: 6px;
}

.saints__more li {
    font-size: .93rem;
}

.saints__more small {
    margin-left: 6px;
    color: var(--texto-2);
}


/* =========================================================
   BARRA DE CONTROL
========================================================= */

.toolbar {
    position: sticky;
    top: var(--alto-barra);
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -28px 0 24px;
    padding: 12px 14px;
    background: color-mix(in srgb, var(--superficie) 96%, transparent);
    border: 1px solid var(--borde);
    border-radius: var(--radio-medio);
    box-shadow: var(--sombra-suave);
    backdrop-filter: blur(10px);
}

.segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.segmented__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--texto-2);
    font-weight: 700;
    cursor: pointer;
}

.segmented__item span {
    padding: 0 7px;
    border-radius: 999px;
    background: var(--fondo);
    font-size: .78rem;
}

.segmented__item:hover {
    color: var(--texto);
}

.segmented__item.is-active {
    background: var(--morado);
    color: #fff;
}

.segmented__item.is-active span {
    background: rgba(255, 255, 255, .24);
}

.toolbar__selects {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.select__label {
    color: var(--texto-2);
    font-size: .82rem;
    font-weight: 700;
}

.select select {
    padding: 7px 30px 7px 12px;
    border: 1px solid var(--borde);
    border-radius: var(--radio-pequeno);
    background-color: var(--superficie);
    font-weight: 600;
    cursor: pointer;
}

.button,
.more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--borde);
    border-radius: 999px;
    background: var(--superficie);
    font-weight: 700;
    text-decoration: none;
    color: var(--texto);
    cursor: pointer;
}

.button:hover,
.more-button:hover {
    border-color: var(--morado);
}

.button--primary {
    background: var(--morado);
    border-color: var(--morado);
    color: #fff;
}

.button--primary:hover {
    background: var(--morado-oscuro);
}


/* =========================================================
   LISTAS
========================================================= */

.events {
    margin-top: 40px;
}

.events:first-of-type {
    margin-top: 0;
}

.events__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.events__header h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -.02em;
}

.events__count {
    min-width: 34px;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--morado-claro);
    color: var(--morado-texto);
    font-weight: 800;
    text-align: center;
}

.entries {
    overflow: hidden;
    background: var(--superficie);
    border: 1px solid var(--borde);
    border-radius: var(--radio-grande);
}

.entry {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 4px 20px;
    padding: 18px 22px;
    border-top: 1px solid var(--borde);
}

.entry:first-child {
    border-top: 0;
}

.entry--image {
    grid-template-columns: 96px minmax(0, 1fr) auto;
}

.entry__year strong {
    display: block;
    color: var(--morado-texto);
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.entry__year small {
    display: block;
    color: var(--texto-2);
    font-size: .76rem;
    font-weight: 600;
}

.entry__title {
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.3;
}

.entry__desc {
    margin-top: 4px;
    color: var(--texto-2);
}

.entry__cielo {
    margin-top: 6px;
    font-size: .84rem;
}

.entry__cielo a {
    color: var(--texto-2);
    font-weight: 600;
    text-decoration: none;
}

.entry__cielo a:hover {
    color: var(--morado-texto);
    text-decoration: underline;
}

.entry__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}

.tag {
    padding: 2px 10px;
    border: 1px solid var(--borde);
    border-radius: 999px;
    color: var(--texto-2);
    font-size: .78rem;
    font-weight: 600;
}

.tag--country {
    background: var(--morado-claro);
    border-color: transparent;
    color: var(--morado-texto);
}

.entry__actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.entry__source {
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
}

.entry__source:hover {
    text-decoration: underline;
}

/* Entrada a la que apunta un enlace compartido (#e-123). */
.entry.is-target {
    animation: target-flash 2.4s ease-out;
    box-shadow: inset 4px 0 0 var(--morado);
}

@keyframes target-flash {
    0%, 45% { background: var(--morado-claro); }
}

.entry__image {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radio-pequeno);
    background: var(--fondo);
}

/* Relevancia 3: línea compacta */
.entry--r3,
.entry--r2,
.entry--r1 {
    padding-block: 13px;
}

.entry--r3 .entry__title,
.entry--r2 .entry__title,
.entry--r1 .entry__title {
    font-size: 1rem;
}

.entry--r3 .entry__year strong {
    font-size: 1.05rem;
}

/* Relevancia 5: destacada, con imagen grande */
.entry--r5 {
    padding-block: 24px;
    background: linear-gradient(90deg, var(--morado-claro), transparent 70%);
}

.entry--r5 .entry__title {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.entry--r5 .entry__desc {
    font-size: 1.04rem;
    color: var(--texto);
}

.entry--r5 .entry__year strong {
    font-size: 1.6rem;
}

.entry--r5 .entry__image {
    width: 240px;
    height: 160px;
}

.more-button {
    width: 100%;
    margin-top: 12px;
    border-radius: var(--radio-medio);
    color: var(--morado-texto);
}

.events__empty {
    padding: 22px;
    color: var(--texto-2);
    text-align: center;
}


/* =========================================================
   CELEBRACIONES
========================================================= */

.holiday-list {
    display: grid;
    gap: 1px;
    overflow: hidden;
    background: var(--borde);
    border: 1px solid var(--borde);
    border-radius: var(--radio-grande);
}

.holiday {
    padding: 14px 22px;
    background: var(--superficie);
}

.holiday__name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.holiday__desc {
    margin-top: 2px;
    color: var(--texto-2);
    font-size: .93rem;
}


.notice {
    margin: 22px 0 0;
    padding: 12px 18px;
    border: 1px solid var(--borde);
    border-radius: var(--radio-medio);
    background: var(--morado-claro);
    color: var(--morado-texto);
    font-weight: 600;
}

/* =========================================================
   VACÍO Y PIE
========================================================= */

.empty {
    margin: 36px 0;
    padding: 40px 24px;
    text-align: center;
    background: var(--superficie);
    border: 1px solid var(--borde);
    border-radius: var(--radio-grande);
}

.empty .eyebrow {
    color: var(--morado-texto);
}

.empty h2 {
    margin: 8px 0 10px;
    font-size: 1.7rem;
    letter-spacing: -.02em;
}

.empty p {
    max-width: 52ch;
    margin-inline: auto;
    color: var(--texto-2);
}

.empty__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.day-nav--bottom {
    justify-content: space-between;
    margin: 44px 0 56px;
}

.day-nav--bottom .day-nav__link {
    background: var(--superficie);
    border-color: var(--borde);
    color: var(--texto);
}

.day-nav--bottom .day-nav__link:hover {
    border-color: var(--morado);
    background: var(--superficie);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 860px) {

    .hero__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }
}

@media (max-width: 640px) {

    .hero {
        min-height: 0;
        padding: calc(var(--alto-barra) + 20px) 0 64px;
    }

    .toolbar {
        position: static;
        margin-top: -32px;
    }

    .segmented__item {
        padding: 6px 11px;
        font-size: .92rem;
    }

    .select {
        flex: 1 1 140px;
    }

    .select select {
        flex: 1;
        min-width: 0;
    }

    .entry {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 16px 16px;
    }

    .entry__year {
        grid-column: 1 / -1;
        display: flex;
        align-items: baseline;
        gap: 10px;
    }

    .entry__body {
        grid-column: 1;
    }

    .entry__image {
        grid-column: 2;
        grid-row: 2;
        width: 76px;
        height: 76px;
    }

    .entry--r5 {
        grid-template-columns: minmax(0, 1fr);
    }

    .entry--r5 .entry__image {
        grid-column: 1;
        grid-row: auto;
        order: 3;
        width: 100%;
        height: 190px;
        margin-top: 8px;
    }

    .entry__actions {
        margin-left: 0;
    }

    .day-nav--bottom {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}
