/*
Theme Name: Visigodos
Theme URI: https://visigodos.info
Author: visigodos.info
Description: Tema de bloques para visigodos.info: caliza, pizarra, oro y granate.
Version: 1.0.1
Requires at least: 6.5
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: visigodos
*/

:root { --vg-line: #D6CCBA; --vg-ink: #23211E; --vg-stone: #6E6457; --vg-gold: #B4862F; --vg-gold-l: #C99B45; --vg-garnet: #7D2430; --vg-lime: #F3EEE3; --vg-lime2: #E9E1D2; }

body { -webkit-font-smoothing: antialiased; }
.vg-inter, .vg-eyebrow, .wp-block-post-date, .vg-meta, .vg-migas, figcaption, .wp-element-caption { font-family: Inter, system-ui, sans-serif; }
img { height: auto; }

/* Header */
.vg-header { border-bottom: 1px solid var(--vg-line); }
.vg-header .vg-logo img { display: block; height: 46px; width: auto; }
.vg-header .wp-block-navigation a { text-decoration: none; color: var(--vg-ink); }
.vg-header .wp-block-navigation a:hover { color: var(--vg-garnet); }
.vg-header .current-menu-item > a, .vg-header .wp-block-navigation-item.current-menu-ancestor > a { color: var(--vg-garnet); }
@media (max-width: 600px) { .vg-header .vg-logo img { height: 36px; } }

/* Footer */
.vg-footer { background: var(--vg-ink); color: #E4DCCB; font-family: Inter, system-ui, sans-serif; font-size: .9rem; }
.vg-footer a { color: #E4DCCB; }
.vg-footer a:hover { color: #fff; }
.vg-footer .vg-logo img { height: 52px; width: auto; }
.vg-footer .vg-small { color: #B8AE9C; }

/* Lead + eyebrow */
.is-style-lead { font-size: 1.3rem; line-height: 1.55; color: #3A3530; }
.vg-eyebrow { font-size: .8rem !important; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--vg-garnet); margin-bottom: .25rem !important; }
.vg-more { font-family: Inter, system-ui, sans-serif; font-weight: 600; font-size: .95rem; }
.vg-aviso { font-family: Inter, system-ui, sans-serif; font-size: .9rem; color: var(--vg-stone); }

/* Breadcrumbs */
.vg-migas { font-size: .85rem; color: var(--vg-stone); display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.vg-migas a { color: var(--vg-stone); }
.vg-migas span[aria-hidden] { opacity: .6; }

/* Home sections */
.vg-hero { background: var(--vg-ink); color: var(--vg-lime); padding-top: clamp(3rem, 7vw, 5.5rem) !important; padding-bottom: clamp(3rem, 7vw, 5.5rem) !important; margin-top: 0 !important; }
.vg-hero .vg-eyebrow { color: var(--vg-gold-l); }
.vg-hero .vg-hero-title { color: var(--vg-lime); font-size: clamp(2.4rem, 5vw, 4rem); margin-top: .5rem; }
.vg-hero .vg-hero-lead { font-size: 1.2rem; color: #E4DCCB; }
.vg-hero .wp-block-columns { align-items: center !important; gap: 3rem; }
.vg-hero .wp-block-button__link { background: var(--vg-gold-l); color: var(--vg-ink); }
.vg-hero .wp-block-button__link:hover { background: #E0B86A; color: var(--vg-ink); }
.vg-hero .is-style-outline .wp-block-button__link { background: transparent; color: var(--vg-lime); border: 1px solid #8A8072; }
.vg-hero figure img { border-radius: 4px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.vg-hero figcaption { color: #B8AE9C; }
.vg-hero figcaption a { color: #E0B86A; }
.vg-cifras { border-bottom: 1px solid var(--vg-line); margin-top: 0 !important; padding-top: 1.75rem !important; padding-bottom: 1.75rem !important; font-family: Inter, system-ui, sans-serif; font-size: .9rem; color: var(--vg-stone); }
.vg-cifras p { margin: 0; }
.vg-num { display: block; font-family: Marcellus, serif; font-size: 2.3rem; color: var(--vg-ink); line-height: 1.1; }
.vg-sec { padding-top: clamp(3rem, 6vw, 5rem) !important; padding-bottom: clamp(3rem, 6vw, 5rem) !important; margin-top: 0 !important; }
.vg-sec-alt { background: var(--vg-lime2); }
.vg-sec h2 { margin-top: 0; }
.vg-card { background: var(--vg-lime); border-radius: 6px; overflow: hidden; height: 100%; }
.vg-sec:not(.vg-sec-alt) .vg-card { background: var(--vg-lime2); }
.vg-card figure { margin: 0 !important; }
.vg-card figure img { aspect-ratio: 3/2; object-fit: cover; width: 100%; display: block; }
.vg-card figcaption { display: none; }
.vg-card h3, .vg-card p { padding: 0 1.25rem; }
.vg-card h3 { margin-top: 1rem; font-size: 1.45rem; }
.vg-card h3 a { color: var(--vg-ink); text-decoration: none; }
.vg-card h3 a:hover { color: var(--vg-garnet); }
.vg-card p { font-size: 1rem; color: #4A433A; padding-bottom: 1.25rem; }
.vg-crono .wp-block-columns { border-top: 2px solid var(--vg-gold); padding-top: 1rem; }
.vg-crono p { font-size: 1rem; line-height: 1.45; }
.vg-year { display: block; font-family: Marcellus, serif; font-size: 2.1rem; color: var(--vg-garnet); }

/* Images with credit */
.vg-img figcaption { font-size: .78rem; }
.vg-img img { border-radius: 4px; }

/* Boxes */
.vg-box, .vg-fuentes { background: var(--vg-lime2); border-radius: 6px; padding: 1.25rem 1.5rem !important; }
.vg-fuentes { font-family: Inter, system-ui, sans-serif; font-size: .88rem; margin-top: 3rem !important; }
.vg-fuentes h3 { font-family: Inter, system-ui, sans-serif; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin: 0; }

/* Tables */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th { text-align: left; background: var(--vg-ink); color: var(--vg-lime); font-weight: 600; }
.wp-block-table td, .wp-block-table th { border: 0; border-bottom: 1px solid var(--vg-line); padding: .6rem .75rem; vertical-align: top; }
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: rgba(214,204,186,.25); }
.wp-block-table { overflow-x: auto; }

/* Details (FAQ) */
.wp-block-details { border-top: 1px solid var(--vg-line); padding: .9rem 0; }
.wp-block-details summary { font-weight: 600; cursor: pointer; }

/* Ficha de lugar */
.vg-ficha-cols { gap: 3rem !important; }
.vg-tags { display: flex; flex-wrap: wrap; gap: .5rem; font-family: Inter, system-ui, sans-serif; font-size: .82rem; margin: 0; }
.vg-tags a, .vg-tags span { border: 1px solid #B8AE9C; border-radius: 999px; padding: .3rem .75rem; color: var(--vg-ink); text-decoration: none; }
.vg-tags .vg-estado { background: var(--vg-ink); color: var(--vg-lime); border-color: var(--vg-ink); }
.vg-tags .vg-estado.is-visitable { background: #5F6650; border-color: #5F6650; }
.vg-loc { font-family: Inter, system-ui, sans-serif; color: #4A433A; margin: 0; }
.vg-destacada { margin: 0; }
.vg-destacada img { width: 100%; max-height: 560px; object-fit: cover; border-radius: 6px; display: block; }
.vg-datos { background: var(--vg-ink); color: var(--vg-lime); border-radius: 6px; padding: 1.5rem 1.6rem; font-family: Inter, system-ui, sans-serif; }
.vg-datos h2 { color: var(--vg-gold-l); font-size: 1.5rem; margin: 0 0 1rem; }
.vg-datos dt { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #B8AE9C; }
.vg-datos dd { margin: .15rem 0 1rem; font-size: .95rem; line-height: 1.45; }
.vg-datos a { color: #E0B86A; }
.vg-datos .vg-nota { font-size: .8rem; color: #B8AE9C; margin: 0; }
.vg-cerca h2 { font-size: 1.4rem; margin: 1.5rem 0 .5rem; }
.vg-cerca ul, .vg-lista ul { list-style: none; margin: 0; padding: 0; }
.vg-cerca li a, .vg-lista li a { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--vg-line); text-decoration: none; color: var(--vg-ink); }
.vg-cerca li a strong, .vg-lista li a strong { font-weight: 600; }
.vg-cerca li a span, .vg-lista li a span { font-family: Inter, system-ui, sans-serif; font-size: .85rem; color: var(--vg-stone); text-align: right; }
.vg-cerca li a:hover strong, .vg-lista li a:hover strong { color: var(--vg-garnet); }
.vg-lista h3 { font-family: Inter, system-ui, sans-serif; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--vg-stone); margin: 2rem 0 .25rem; }
.vg-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: .5rem; vertical-align: middle; }

/* Map */
.vg-mapa-wrap { position: relative; border: 1px solid var(--vg-line); border-radius: 6px; overflow: hidden; background: var(--vg-lime2); }
.vg-mapa { width: 100%; }
.vg-mapa-leyenda { display: flex; flex-wrap: wrap; gap: 1rem; font-family: Inter, system-ui, sans-serif; font-size: .82rem; color: #4A433A; padding: .75rem 1rem; border-top: 1px solid var(--vg-line); background: var(--vg-lime); }
.vg-pin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--vg-lime); box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.vg-pin.is-p1 { width: 18px; height: 18px; }
.leaflet-popup-content { font-family: Inter, system-ui, sans-serif; font-size: .85rem; }
.leaflet-popup-content strong { font-family: Marcellus, serif; font-weight: 400; font-size: 1.05rem; display: block; }

/* Post grid */
.vg-grid .wp-block-post { background: var(--vg-lime2); border-radius: 6px; overflow: hidden; }
.vg-grid .wp-block-post-featured-image img { aspect-ratio: 3/2; object-fit: cover; }
.vg-grid .wp-block-post-title, .vg-grid .wp-block-post-excerpt, .vg-grid .wp-block-post-date { padding: 0 1.1rem; }
.vg-grid .wp-block-post-title { font-size: 1.35rem; }
.vg-grid .wp-block-post-title a { text-decoration: none; color: var(--vg-ink); }
.vg-grid .wp-block-post-excerpt { font-size: 1rem; padding-bottom: 1rem; }

@media (max-width: 781px) {
  .vg-hero .wp-block-columns { gap: 2rem; }
  .vg-cols-4, .vg-cols-5 { flex-wrap: wrap !important; }
  .vg-cols-4 > .wp-block-column, .vg-cols-5 > .wp-block-column { flex-basis: 45% !important; }
}
.vg-hero { margin-left: 0 !important; margin-right: 0 !important; }
.wp-block-post-content > .alignfull { max-width: none; }
main > .wp-block-post-featured-image img, .wp-block-post-featured-image.alignwide img { max-height: 440px; width: 100%; object-fit: cover; }
.vg-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--vg-lime); }
.vg-img img { max-height: 620px; width: auto; max-width: 100%; display: block; margin: 0 auto; }
.single-rey .wp-block-post-featured-image img { max-height: 520px; object-fit: contain; background: var(--vg-lime2); }
