/*
 * Hesper - hoja de estilos compartida para las páginas interiores.
 * Las variables, la cabecera, el pie y los componentes base viven en home.css;
 * este archivo añade los componentes propios de artículos, guías, formularios y textos legales.
 */

/* Cabecera de página interior */
.page-hero {
    padding: 40px 0 56px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.breadcrumb {
    margin-bottom: 28px;
    font-size: 14px;
    color: var(--text-soft);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumb li + li::before {
    content: "/";
    margin-right: 8px;
    color: var(--line);
}

.breadcrumb a {
    color: var(--text-soft);
}

.breadcrumb a:hover {
    color: var(--accent-dark);
}

.page-hero-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-soft);
}

.page-hero-meta .eyebrow {
    margin-bottom: 0;
}

.page-hero-meta time {
    font-style: italic;
}

.page-lead {
    max-width: 780px;
    margin-bottom: 0;
    font-size: 19px;
    color: var(--text-soft);
}

.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

/* Texto largo */
.prose {
    max-width: 780px;
}

.prose h2 {
    margin-top: 44px;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    margin-top: 28px;
}

.bullets {
    margin: 0 0 20px;
}

.bullets li {
    position: relative;
    padding: 4px 0 4px 24px;
}

.bullets li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 14px;
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
}

.steps {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    position: relative;
    margin-bottom: 14px;
    padding: 4px 0 4px 48px;
    counter-increment: step;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 2px;
    width: 32px;
    height: 32px;
    line-height: 30px;
    text-align: center;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 15px;
    color: var(--accent-dark);
    background: var(--bg-sage);
    border-radius: 50%;
}

.pull-quote {
    margin: 32px 0;
    padding: 24px 28px;
    background: var(--bg-beige);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    font-style: italic;
    font-size: 19px;
    color: var(--text);
}

.pull-quote cite {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    font-style: normal;
    color: var(--text-soft);
}

.section-split {
    display: flex;
    align-items: flex-start;
    gap: 56px;
}

.section-split-main {
    flex: 1 1 62%;
    min-width: 0;
}

.section-split-side {
    flex: 1 1 34%;
    min-width: 0;
}

/* Galerías */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.gallery figure {
    flex: 1 1 280px;
    margin: 0;
}

.gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.gallery figcaption,
.figure-note figcaption {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-soft);
}

.figure-note {
    margin: 0;
}

.figure-note img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

/* Tarjetas con imagen */
.card-media {
    margin: -28px -28px 20px;
}

.card-media img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.card-meta {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-soft);
}

/* Avisos informativos */
.notice {
    margin: 28px 0;
    padding: 22px 26px;
    background: var(--bg-sage);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
}

.notice-warm {
    background: var(--bg-beige);
}

.notice h3,
.notice h2 {
    margin-bottom: 8px;
    font-size: 18px;
}

.notice p:last-child {
    margin-bottom: 0;
}

/* Tablas */
.table-wrap {
    margin: 24px 0 32px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: #FFFFFF;
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

table.data caption {
    padding: 14px 18px;
    text-align: left;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 16px;
    color: var(--text);
    border-bottom: 1px solid var(--line);
}

table.data th,
table.data td {
    padding: 14px 18px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

table.data thead th {
    background: var(--bg-beige);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 15px;
}

table.data tbody tr:last-child td,
table.data tbody tr:last-child th {
    border-bottom: 0;
}

table.data tbody th {
    font-weight: 600;
}

/* Textos legales */
.legal-layout {
    display: flex;
    align-items: flex-start;
    gap: 56px;
}

.legal-toc {
    position: sticky;
    top: 96px;
    flex: 0 0 260px;
    padding: 22px;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    font-size: 15px;
}

.legal-toc h2 {
    margin-bottom: 10px;
    font-size: 16px;
}

.legal-toc li {
    padding: 4px 0;
}

.legal-toc a {
    text-decoration: none;
}

.legal-toc a:hover {
    text-decoration: underline;
}

.legal-body {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 800px;
}

.legal-body h2 {
    margin-top: 40px;
    padding-top: 8px;
    font-size: 24px;
    scroll-margin-top: 96px;
}

.legal-body h2:first-of-type {
    margin-top: 0;
}

.legal-body h3 {
    margin-top: 24px;
    font-size: 18px;
}

.legal-meta {
    margin-bottom: 28px;
    padding: 16px 20px;
    background: var(--bg-beige);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    font-size: 15px;
}

.legal-meta p {
    margin: 0;
}

.data-list {
    margin: 0 0 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: #FFFFFF;
}

.data-list div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
}

.data-list div:last-child {
    border-bottom: 0;
}

.data-list dt {
    flex: 0 0 200px;
    font-weight: 600;
}

.data-list dd {
    flex: 1 1 240px;
    margin: 0;
    color: var(--text-soft);
}

/* Formularios */
.contact-layout {
    display: flex;
    align-items: flex-start;
    gap: 56px;
}

.contact-form-wrap {
    flex: 1 1 58%;
    min-width: 0;
    padding: 36px;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
}

.contact-side {
    flex: 1 1 36%;
    min-width: 0;
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 15px;
}

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    border: 1px solid #CBD2DA;
    border-radius: var(--radius-btn);
}

.field textarea {
    min-height: 160px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 3px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent-dark);
}

.field-hint {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--text-soft);
}

.field-error {
    margin: 6px 0 0;
    font-size: 14px;
    color: #A8472A;
}

.field-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 15px;
}

.field-check input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 3px;
    accent-color: var(--accent-dark);
}

.form-success {
    margin-bottom: 24px;
    padding: 18px 22px;
    background: var(--bg-sage);
    border: 1px solid var(--accent);
    border-radius: var(--radius-card);
}

.form-success h2,
.form-success h3 {
    margin-bottom: 6px;
    font-size: 18px;
}

.form-success p {
    margin: 0;
}

.info-card {
    margin-bottom: 24px;
    padding: 26px;
    background: var(--bg-beige);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
}

.info-card h2,
.info-card h3 {
    font-size: 18px;
}

.info-card address {
    font-style: normal;
    line-height: 1.8;
}

/* Glosario */
.az-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 40px;
}

.az-nav a {
    display: inline-block;
    min-width: 40px;
    padding: 8px 12px;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-btn);
}

.az-nav a:hover {
    background: var(--bg-sage);
}

.glossary-group {
    margin-bottom: 40px;
    scroll-margin-top: 96px;
}

.glossary-group h2 {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    color: var(--accent-dark);
}

.glossary-group dl {
    margin: 0;
}

.glossary-group dt {
    margin-top: 18px;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 18px;
}

.glossary-group dd {
    margin: 4px 0 0;
    color: var(--text-soft);
}

/* Mapa del sitio */
.sitemap-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.sitemap-group {
    flex: 1 1 300px;
    padding: 26px;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
}

.sitemap-group h2 {
    font-size: 20px;
}

.sitemap-group li {
    padding: 6px 0;
    border-bottom: 1px solid var(--line);
}

.sitemap-group li:last-child {
    border-bottom: 0;
}

.sitemap-group span {
    display: block;
    font-size: 14px;
    color: var(--text-soft);
}

/* Etiquetas */
.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
}

.pill-list li {
    padding: 5px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-dark);
    background: var(--bg-sage);
    border-radius: 999px;
}

.related {
    margin-top: 8px;
}

@media (max-width: 1024px) {
    .section-split,
    .legal-layout,
    .contact-layout {
        flex-direction: column;
        gap: 36px;
    }

    .section-split-main,
    .section-split-side,
    .contact-form-wrap,
    .contact-side {
        flex: 1 1 auto;
        width: 100%;
    }

    .legal-toc {
        position: static;
        flex: 1 1 auto;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .page-hero {
        padding: 24px 0 40px;
    }

    .page-lead {
        font-size: 17px;
    }

    .contact-form-wrap {
        padding: 22px;
    }

    .data-list dt {
        flex-basis: 100%;
    }
}
