/* === Fuentes locales === */
@font-face {
  font-family: "Daniel";
  src: url("../fonts/daniel.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Baskerville";
  src: url("../fonts/baskervi.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Variables tipográficas (rellenadas desde PHP) */
:root{
  --ag-font-body: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --ag-font-headings: var(--ag-font-body);
  --ag-font-primary: var(--ag-font-body);
}

/* Aplicación */
body { font-family: var(--ag-font-body); }
h1,h2,h3,h4,h5,h6 { font-family: var(--ag-font-headings); }
.entry-content { font-family: var(--ag-font-primary); }

/* Estilos base del tema */
.object-fit-cover { object-fit: cover; }
.ag-hero .hero-overlay { background: rgba(0,0,0,.25); }


/* ===== Header superpuesto ===== */
.ag-header {
  background: rgba(255,255,255,1);           /* opacidad total en top */
  z-index: 3000;
  border-bottom: 1px solid rgb(0,0,0);
  border-top: 1px solid rgb(0,0,0);
}
.ag-menu-open .ag-header {
    border-bottom: none;
}

.ag-wide-nav { 
  backdrop-filter: saturate(180%) blur(6px);
  transition: background-color .25s ease, min-height .25s ease;
  will-change: background-color, min-height;
}
/* Estado scrolled: opacidad 0.8 */
.ag-wide-nav.is-scrolled {
  background: rgba(255,255,255,0.8);
}

/* Layout interno del header */
.navbar>.container-fluid.ag-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* menú | logo | buscador */
  align-items: flex-end;
  gap: 1rem;
  padding: .75rem 1rem;
  /* altura mínima en función de la altura del logo + respiración */
  min-height: calc(var(--ag-logo-max-h, 48px) + 16px);
}

/* Cuando hay scroll */
.ag-header.is-scrolled .ag-header-inner {
	min-height: 0;
}

/* Menú */
.ag-left, .ag-right { display: flex; align-items: center;}
.ag-center { display: flex; justify-content: center; align-items: center; }

.ag-menu {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 0;
}
.ag-menu > li > a {
  display: block; padding: .125rem 0; text-decoration: none; color: #111; font-size: .95rem; font-weight: 700;
}
.ag-menu > li > a:hover { text-decoration: underline; }

.ag-wide-nav.is-scrolled ul#menu-primary {
    display: flex;
    gap: 16px;
    list-style-type: none;
}
/* menú estecho */
.ag-menu-horizontal {
	display: flex;
	gap: 16px;
}

.ag-right {
	display: flex;
	justify-content: flex-end;
	gap: 16px;
}
/* buscador */
.ag-right form.search-form { width: 100%; max-width: 280px; margin-left: auto; }
.ag-right .search-field {
  width: 100%; max-width: 200px; border: 1px solid #ddd; padding: .375rem .5rem; border-radius: 999px; outline: none;
}
.ag-right .search-submit { display: none; }

/* ===== Logo ===== */
/* En top: usa la altura configurada en Customizer (var --ag-logo-max-h) */
img.custom-logo,
.ag-logo img {
  display: block;
  height: var(--ag-logo-max-h, 48px) !important;
  width: auto !important;
  max-height: none !important;
  transition: height .5s;
}

/* Con scroll: fuerza 32px de altura */
.ag-wide-nav.is-scrolled img.custom-logo,
.ag-wide-nav.is-scrolled .ag-logo img {
  height: 32px !important;
}
/* ===== buscador ========*/

.ag-right .search-form {
  position: relative;
  display: inline-block;
  max-width: 220px;
}

.ag-right .search-form .bi-search {
  left: 0;
  color: #999;
  pointer-events: none; /* no bloquea clics en input */
  font-size: 1rem;
}

.ag-right .search-field {
  width: 100%;
  border: none;
  border-bottom: 1px solid #ccc;
  border-radius: 0;
  background: transparent;
  color: #111;
  padding: .25rem 0 .25rem 1.5rem;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s ease;
}

.ag-right .search-field:focus {
  border-color: #333;
}

.ag-right .search-field::placeholder {
  color: transparent; /* oculta el texto "Search" */
}

.ag-right .search-submit {
  display: none !important;
}

/* ================================
   HAMBURGER BUTTON
================================ */
.ag-burger {
  width: 32px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 2001;
}

.ag-burger span {
  display: block;
  width: 100%;
  height: 3px;
  background: #000;
  transition: transform .3s ease, opacity .3s ease;
}

/* Animación a X */
.ag-burger.is-active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.ag-burger.is-active span:nth-child(2) {
  opacity: 0;
}
.ag-burger.is-active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* ================================
   FULLSCREEN MENU OVERLAY (MOBILE)
================================ */
body.ag-menu-open {
  overflow: hidden;
}

.ag-menu-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}

.ag-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.ag-menu-overlay-inner {
  height: 100%;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ag-mobile-menu {
  list-style: none;
  padding: 96px 0 0 0;
  margin: 0 0 2rem 0;
  text-align: center;
}

.ag-mobile-menu li {
  margin: 1rem 0;
}

.ag-mobile-menu li a {
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  color: #111;
}

/* Search inside overlay */
.overlay-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  border-bottom: 1px solid #000;
  width: 80%;
  max-width: 300px;
}

.overlay-search input {
  border: none;
  flex: 1;
  outline: none;
  background: transparent;
  padding: .4rem;
}


/* === superposición ====*/
/* Hero debajo del header (sin cambios) */
.ag-hero { position: relative; border-bottom: 1px solid #000000; width: 100%; height: 56vw}
@media (min-width: 991px){
.ag-hero {
  height: 100vh;
}
}
.ag-hero video,
.ag-hero .swiper {
  position: absolute; inset: 0; width: 100%; height: 100%;
}

/* Responsive tweaks */
@media (max-width: 991.98px) {
  .ag-header-inner {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "left right" "center center";
  }
  .ag-left { grid-area: left; }
  .ag-right { grid-area: right; justify-content: flex-end; }
  .ag-center { grid-area: center; padding-top: .25rem; }
  .ag-menu-vertical { display: flex; gap: .75rem; }
  .ag-menu-vertical > li > a { padding: .25rem 0; }
}
@media (max-width: 575.98px) {
  .ag-right form.search-form { max-width: 180px; }
}
/* cuando no es home, despejar altura de menú */
.ag-nav-clear{
	padding-top: var(--ag-logo-max-h, 48px);
	margin-top: 32px; 
}
home .ag-nav-clear{
	padding-top: 0 !important;
	margin-top: 0 !important;
}
/* Admin bar: empuja el header fijo hacia abajo */
body.admin-bar .ag-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .ag-header { top: 46px; }
}

/* ===== Footer ===== */
footer.site-footer {
  /* Fondo de lado a lado */
  width: 100%;
  background-color: var(--ag-footer-bg-color, #111);
  background-image: var(--ag-footer-bg-image, none);
  background-repeat: no-repeat;
  background-position: var(--ag-footer-bg-position, center center);
  background-size: var(--ag-footer-bg-size, cover);
  color: var(--ag-footer-text-color, #fff);
}

/* Tipografía del texto en el footer */
footer.site-footer,
footer.site-footer p,
footer.site-footer li,
footer.site-footer a,
footer.site-footer small {
  font-family: var(--ag-footer-text-font, var(--ag-font-body));
  font-size: var(--ag-footer-text-size, 14px);
  color: var(--ag-footer-text-color, #fff);
}
footer.site-footer a:hover { opacity: .85; }

/* Tipografía de títulos del footer */
footer.site-footer h1,
footer.site-footer h2,
footer.site-footer h3,
footer.site-footer h4,
footer.site-footer h5,
footer.site-footer h6 {
  font-family: var(--ag-footer-heading-font, var(--ag-font-headings));
  font-size: var(--ag-footer-heading-size, 16px);
  color: var(--ag-footer-text-color, #fff);
  margin-bottom: .5rem;
}
.footer-menu {
    display: flex;
    flex-direction: column;
}
.ag-footer-menu-container {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
}
.footer-menu {
	display: flex; flex-direction: row;
}
.footer-menu li {
	
}
.footer-menu li::after {
	content: '|';
	padding: 0 6px;
}
.footer-menu li:last-child::after {
	content: '';
}
/* ======== Loop ========== */
.ag-img-contain {
	object-fit:  contain;
	filter: drop-shadow(2px 8px 4px #999999)
}