/*
Theme Name: Identificación de aves
Description: Sitio editorial de las guías de Mundi-Prensa.
Version: 1.0.0
Requires at least: 6.9
Requires PHP: 8.1
Text Domain: identificacion-de-aves
*/

:root {
    color: #242927;
    background: #f7f8f4;
    font: 1rem/1.65 system-ui, sans-serif;
    --green: #214841;
    --line: #d7dfd8;
    --wrap: 66rem;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: #22564c; text-underline-offset: .18em; }
a:hover { color: #102b26; }
:focus-visible { outline: 3px solid #9a5c00; outline-offset: 3px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: Georgia, serif; color: var(--green); line-height: 1.15; }
h1 { font-size: clamp(2.15rem, 5vw, 3.75rem); margin: 0 0 1.65rem; }
h2 { font-size: clamp(1.55rem, 4vw, 2.2rem); margin: 2rem 0 1rem; }
h3 { font-size: 1.35rem; margin: 1.6rem 0 .45rem; }
p { margin: 0 0 1rem; }
[hidden] { display: none !important; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.site-header { background: white; }
.site-identity { display: flex; align-items: center; justify-content: space-between; gap: .75rem 2rem; flex-wrap: wrap; padding-block: 1.45rem; }
.custom-logo-link { display: inline-flex; }
.custom-logo { width: auto; max-width: min(100%, 16rem); max-height: 4.5rem; object-fit: contain; }
.site-name { font-family: Georgia, serif; font-size: 1.35rem; font-weight: bold; }
.site-authors { margin: 0; color: #4a544e; font-size: .9rem; }
.site-authors strong { margin-inline-start: .2rem; }
.site-nav { background: var(--green); }
.site-nav ul { display: flex; flex-wrap: wrap; column-gap: .35rem; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: block; padding: .7rem .75rem; color: white; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: #102d28; text-decoration: underline; }
.site-content { flex: 1; padding-block: clamp(2rem, 5vw, 3.4rem); }
.entry-content { display: flow-root; }
.entry-content > p { max-width: 76ch; }
.site-footer { color: var(--green); border-top: 1px solid var(--line); padding-block: 1.25rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; }

.wp-block-image { margin-inline: 0; }
.entry-content > .cover-illustration { float: right; width: min(40%, 24rem); margin: 0 0 1rem 2rem; }
.wp-block-gallery.has-nested-images { clear: both; margin: 1.6rem 0; background: #fff; padding: 1rem; border: 1px solid var(--line); border-radius: .45rem; }
.wp-block-gallery.has-nested-images figure.wp-block-image img { object-fit: contain; max-height: 15rem; }
.wp-block-gallery.has-nested-images .wp-lightbox-container img { cursor: zoom-in; }
.aves-video { margin: 1.5rem 0 .65rem; max-width: 45rem; }
.aves-video iframe { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; border: 0; }
.wp-block-file { margin-block: 1rem 2rem; }
.wp-block-button__link { background: var(--green); color: white; }
.wp-block-button__link:hover { background: #102d28; color: white; }

.aves-carousel { max-width: 45rem; margin: 1.25rem auto 2.2rem; border: 1px solid var(--line); border-radius: .45rem; overflow: hidden; background: white; }
.carousel-stage { height: clamp(15rem, 48vw, 31rem); padding: 1.15rem; display: flex; align-items: center; justify-content: center; }
.carousel-stage img { width: 100%; height: 100%; object-fit: contain; }
.carousel-controls { display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: .55rem; padding: .75rem; border-top: 1px solid var(--line); }
.carousel-controls button { border: 1px solid #8a9e93; border-radius: .25rem; padding: .4rem .65rem; color: var(--green); background: white; cursor: pointer; font: inherit; }
.carousel-controls button:hover { background: #edf2eb; }
.carousel-status { min-width: 4.25rem; text-align: center; }

.screen-reader-text { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.screen-reader-text:focus { clip-path: none; width: auto; height: auto; z-index: 20; padding: .75rem; background: white; }

@media (max-width: 43rem) {
    .entry-content > .cover-illustration { float: none; width: min(100%, 25rem); margin: 0 0 1.25rem; }
    .site-nav a { padding-inline: .5rem; }
    .wp-block-gallery.has-nested-images figure.wp-block-image { flex-basis: calc(50% - .8rem); }
}
