/* Galería Caicoya. Colores y medidas tomados del tema Impreza de la web anterior. */
:root {
    --bg: #ffffff;
    --bg-alt: #f6f6f6;
    --border: #ebebeb;
    --heading: #333333;
    --text: #666666;
    --faded: #999999;
    --footer-bg: #333333;
    --footer-text: #e8e8e8;
    --content-width: 1140px;
    --gap: 1.5rem;
    --header-h: 100px;
    --header-h-sticky: 50px;
}

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

html { scroll-padding-top: var(--header-h-sticky); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    line-height: 23px;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--heading); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .75; }

h1, h2, h3, h4, h5, h6 {
    color: var(--heading);
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 1.5rem;
}
h1, h2, h3, h4, h6 { font-size: 2.5rem; }
h5 { font-size: 1.8rem; }
p { margin: 0 0 1.5rem; }

.container {
    max-width: calc(var(--content-width) + 2 * 2.5rem);
    margin: 0 auto;
    padding: 0 2.5rem;
}

.section { padding-top: 4rem; padding-bottom: 4rem; }

/* Cabecera */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    transition: height .3s;
}
.site-header.is-sticky .header-inner { height: var(--header-h-sticky); }
.site-header.is-sticky { box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

.logo img { height: 28px; width: auto; transition: height .3s; }
.site-header.is-sticky .logo img { height: 20px; }

.main-nav > ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}
.main-nav li { position: relative; }
.main-nav a,
.submenu-toggle {
    display: block;
    padding: 0 .9rem;
    font: inherit;
    font-size: 14px;
    letter-spacing: .02em;
    color: var(--heading);
    background: none;
    border: 0;
    cursor: pointer;
    line-height: var(--header-h-sticky);
}
.main-nav > ul > li.active > a,
.main-nav > ul > li.active > .submenu-toggle { font-weight: 700; }

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    list-style: none;
    margin: 0;
    padding: .5rem 0;
    background: var(--bg);
    box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .2s, transform .2s, visibility .2s;
}
.submenu a { line-height: 1.4; padding: .6rem 1.2rem; }
.has-children:hover > .submenu,
.has-children:focus-within > .submenu,
.has-children.open > .submenu { opacity: 1; visibility: visible; transform: none; }

.main-nav .social { display: flex; padding-left: .4rem; }
.main-nav .social a { padding: 0 .45rem; display: flex; align-items: center; height: var(--header-h-sticky); }
.main-nav .lang { display: flex; padding-left: .6rem; }
.main-nav .lang a { padding: 0 .35rem; color: var(--faded); }
.main-nav .lang a.current { color: var(--heading); font-weight: 700; }

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 12px 10px;
    background: none;
    border: 0;
    cursor: pointer;
}
.menu-toggle span {
    display: block;
    height: 2px;
    margin-bottom: 6px;
    background: var(--heading);
    transition: transform .3s, opacity .3s;
}
.menu-toggle span:last-child { margin-bottom: 0; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 900px) {
    :root { --header-h: 70px; }
    .menu-toggle { display: block; }
    .main-nav {
        position: fixed;
        top: var(--nav-top, var(--header-h));
        left: 0;
        right: 0;
        bottom: 0;
        overflow-y: auto;
        background: var(--bg);
        padding: 1rem 0 2rem;
        display: none;
    }
    .menu-open .main-nav { display: block; }
    .main-nav > ul { flex-direction: column; align-items: stretch; }
    .main-nav a, .submenu-toggle { line-height: 2.8; padding: 0 2.5rem; text-align: left; width: 100%; font-size: 15px; }
    .submenu { position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; padding: 0; }
    .has-children.open > .submenu { display: block; }
    .submenu a { padding-left: 3.5rem; line-height: 2.4; }
    .main-nav .social, .main-nav .lang { padding: 1rem 2.3rem 0; }
    .main-nav .social a, .main-nav .lang a { height: auto; padding: 0 .5rem; width: auto; }
}

/* Contenido */
.page-title { font-size: 2.5rem; margin-bottom: 2.5rem; }

.entry-header h3 em { font-style: italic; }
.entry-header h5 { font-size: 1.8rem; }
.entry-image { margin: 0 auto 2.5rem; text-align: center; }
.entry-image img { margin: 0 auto; max-height: 85vh; width: auto; }
.entry-title { text-align: center; font-size: 2.5rem; }
.entry-text { margin-bottom: 2.5rem; }
.entry-text h3 { font-size: 2rem; }
.entry-text h4 { font-size: 1.6rem; }
.entry-text h5 { font-size: 1.3rem; }
.entry-text img { margin: 1.5rem 0; }
.entry-text ul { padding-left: 1.2rem; }

.separator { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.empty { color: var(--faded); }

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
}
@media (max-width: 1200px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.tile { display: block; }
.tile-img { display: block; aspect-ratio: 1; background: var(--bg-alt); overflow: hidden; margin-bottom: .5rem; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tile:hover { opacity: 1; }
.tile:hover .tile-img img { transform: scale(1.03); }
.tile-title { display: block; font-size: 1rem; font-weight: 700; color: var(--heading); }
.tile-subtitle { display: block; font-style: italic; color: var(--text); }

.gallery-item { display: block; cursor: zoom-in; }
.grid-gallery .gallery-item { aspect-ratio: 1; overflow: hidden; background: var(--bg-alt); }
.grid-gallery .gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.grid-captioned figure { margin: 0; }
.grid-captioned figcaption { margin-top: .5rem; font-size: 14px; line-height: 1.4; }

/* Contacto */
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.col-images { display: grid; gap: var(--gap); align-content: start; }
@media (max-width: 900px) { .columns { grid-template-columns: 1fr; } }

.contact-form { margin-top: 2.5rem; max-width: 520px; }
.contact-form label { display: block; margin-bottom: 1rem; color: var(--heading); }
.contact-form input[type=text],
.contact-form input[type=email],
.contact-form input[type=tel],
.contact-form textarea {
    display: block;
    width: 100%;
    margin-top: .3rem;
    padding: .6rem .8rem;
    font: inherit;
    color: var(--heading);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0;
}
.contact-form [aria-invalid=true] { border-color: #c0392b; }
.contact-form .check { display: flex; gap: .6rem; align-items: flex-start; font-size: 14px; }
.contact-form .check input { margin-top: .3rem; }
.contact-form .check a { text-decoration: underline; }
.hp { position: absolute; left: -9999px; }
.notice { padding: .8rem 1rem; background: var(--bg-alt); color: var(--heading); }
.notice-error { color: #c0392b; }

.btn {
    display: inline-block;
    padding: .7rem 1.8rem;
    font: inherit;
    font-weight: 700;
    color: #fff;
    background: #666;
    border: 1px solid #666;
    cursor: pointer;
    transition: background .2s;
}
.btn:hover { background: var(--heading); border-color: var(--heading); }
.btn-outline { background: transparent; color: var(--heading); border-color: var(--heading); }
.btn-outline:hover { color: #fff; }

/* Pie */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 2.5rem 0 2rem;
    text-align: center;
    font-size: 14px;
}
.site-footer p { margin: 0 0 .6rem; }
.site-footer a { color: var(--footer-text); }
.legal-links a { margin: 0 .6rem; }

/* Aviso de cookies */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    max-width: 760px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .2);
    font-size: 14px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; }
.cookie-banner a { text-decoration: underline; }
.cookie-banner div { display: flex; gap: .5rem; flex-shrink: 0; }
@media (max-width: 600px) { .cookie-banner { flex-direction: column; align-items: stretch; } }

/* Ampliación de imágenes */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .9);
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 90vw; text-align: center; }
.lightbox img { max-width: 90vw; max-height: 82vh; width: auto; margin: 0 auto; }
.lightbox figcaption { color: #ddd; margin-top: .8rem; font-size: 14px; }
.lightbox button {
    position: absolute;
    background: none;
    border: 0;
    color: #fff;
    font-size: 3rem;
    line-height: 1;
    padding: 1rem;
    cursor: pointer;
    opacity: .7;
}
.lightbox button:hover { opacity: 1; }
.lb-close { top: 0; right: 0; }
.lb-prev { left: 0; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0; top: 50%; transform: translateY(-50%); }

@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    .section { padding-top: 2.5rem; padding-bottom: 2.5rem; }
    h1, h2, h3, h4, h6, .page-title, .entry-title { font-size: 2rem; }
    h5, .entry-header h5 { font-size: 1.5rem; }
    body { line-height: 26px; }
}
