/* =============================================
   TOKENS
   ============================================= */
:root {
  --color-accent-1: #1782cc;
  --color-accent-2: #d8a537;
  --color-text:     #000000;
  --color-bg:       #ffffff;
  --font-base:      'ABeeZee', sans-serif;
  --max-width:      1140px;
  --gap:            1.25rem;
  --header-h:       4rem;
}

/* =============================================
   RESET BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-base);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--color-accent-1); text-decoration: none; }
a:hover { text-decoration: underline; }
ul  { list-style: none; }

:where(h1, h2, h3, h4, h5, h6) {
  line-height: 1.2;
  margin-bottom: .6em;
}
p { margin-bottom: 1em; }

/* =============================================
   LAYOUT WRAPPER
   ============================================= */
.contenedor {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main { flex: 1; }

.inner-main {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 2rem var(--gap);
}

/* =============================================
   HEADER — mobile first
   ============================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #f9f9f9;
  height: 140px;
  transition: height .3s ease, box-shadow .3s ease;
}

.site-header.scrolled {
  height: 70px;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

/* Empuja el contenido bajo el header fijo */
.site-main { padding-top: 110px; }

.inner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 50px;
  height: 100%;
}

/* Logo */
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.site-logo img {
  height: auto;
  width: 118px;
  transition: width .3s ease;
}
.site-header.scrolled .site-logo img { width: 72px; }
.site-logo__text { font-weight: 700; font-size: 1.1rem; color: var(--color-accent-1); }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.25rem;
  height: 2.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav — oculto en móvil */
.site-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0; right: 0;
  border-bottom: 1px solid #e5e5e5;
  padding: 1rem var(--gap) 1.5rem;
}
.site-nav.is-open { display: block; }

.site-nav ul { display: flex; flex-direction: column; gap: .5rem; }
.site-nav ul li a {
  display: block;
  padding: .4rem 0;
  color: var(--color-text);
  font-size: .95rem;
  text-decoration: none;
}

@media (min-width: 781px) {
  .site-nav ul li a {
    border-bottom: 2px solid transparent;
    transition: border-color .2s;
  }
  .site-nav ul li a:hover,
  .site-nav ul li.current-menu-item > a,
  .site-nav ul li.current_page_item > a {
    border-bottom-color: var(--color-accent-1);
  }
}

/* Social links */
.social-links {
  display: flex;
  gap: .75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.social-links a {
  color: var(--color-accent-1);
  font-size: 1.2rem;
  line-height: 1;
  transition: color .2s;
}
.social-links a:hover { color: var(--color-accent-2); text-decoration: none; }


/* ---- desktop 781px ---- */
@media (min-width: 781px) {
  .hamburger { display: none; }

  .site-nav {
    display: flex !important;
    position: static;
    border: none;
    padding: 0;
    align-items: center;
    gap: 30px;
    flex: 1;
    justify-content: space-between;
  }

  .site-nav ul {
    flex-direction: row;
    gap: 1.5rem;
    align-items: center;
    margin-top: 0;
  }

  .social-links { margin-top: 0; }
}

/* =============================================
   HOME
   ============================================= */
  .cta .wp-block-cover{
    width: 100%;
  }
  .cta .columnascta{
    margin: 8% auto;
    width: 1320px;
    max-width: 80%;
    overflow: hidden;
  }  
  .cta .columnascta .cajacta{
      margin: 0;
      padding: 20px;
  }
  .cta .columnascta .cajacta h3{
    font-weight: 400;
  }

/* =============================================
   FOOTER
   ============================================= */
/* Principal footer — flex directo sobre el contenedor, fondo full-width */
.principal-footer {
  background: #f2f2f2;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2.5rem 4%;
}

/* Si existe .footer-inner (versión nueva del PHP) hereda el flex del padre */
.principal-footer .footer-inner {
  display: flex;
  width: 1320px;
  max-width: calc(100vw - 40px);
  margin: 40px auto;
}

.footer-col h4 { color: #444; font-size: 1rem; margin-bottom: .6rem; }
.footer-col p  { font-size: .85rem; color: #666; line-height: 1.5; margin-bottom: .3rem; }
.footer-col ul li + li { margin-top: .35rem; }
.footer-col a  { color: #666; font-size: .9rem; }
.footer-col a:hover { color: var(--color-accent-1); text-decoration: none; }
.footer-logo img { height: 120px; width: auto; display: block; margin-bottom: .75rem; }

@media (min-width: 781px) {
  .principal-footer { flex-direction: row; }
  .footer-col { flex: 1; }
}

/* Footer secundario */
.footer-secundario {
  background: #e8e8e8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 4%;
  text-align: center;
}

.footer-secundario .footer-inner { display: contents; }

.footer-secundario p { font-size: .8rem; color: #666; margin-bottom: 0; }
.footer-secundario .social-links { margin-top: 0; justify-content: center; }
.footer-secundario .social-links a       { color: #666; }
.footer-secundario .social-links a:hover { color: var(--color-accent-1); }

/* =============================================
   TIPOGRAFÍA
   ============================================= */
.entry-title { font-size: 1.8rem; }
.entry-content > * + * { margin-top: 1em; }

/* =============================================
   GUTENBERG
   ============================================= */
.has-accent-1-color            { color: var(--color-accent-1) !important; }
.has-accent-2-color            { color: var(--color-accent-2) !important; }
.has-accent-1-background-color { background-color: var(--color-accent-1) !important; }
.has-accent-2-background-color { background-color: var(--color-accent-2) !important; }
.has-bg-background-color       { background-color: var(--color-bg) !important; }

/* Botones Gutenberg heredan fuente y radio */
.wp-block-button__link { font-family: var(--font-base) !important; border-radius: 4px !important; }

/* Alineaciones wide / full */
.alignwide  { max-width: 1300px; margin-inline: auto; }
.alignfull  { width: 100vw; margin-inline: calc(50% - 50vw); }

/* =============================================
   SLIDER .medios
   ============================================= */
.medios {
  position: relative;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  overflow: hidden;
  /* Override WP gallery flex */
  display: block !important;
  gap: 0 !important;
}

.medios .slider-track {
  display: flex;
  transition: transform .6s ease;
  will-change: transform;
}

.medios .wp-block-image {
  min-width: 100%;
  flex-shrink: 0;
  margin: 0;
}

.medios .wp-block-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* =============================================
   UTILIDADES
   ============================================= */
.btn {
  display: inline-block;
  padding: .65em 1.5em;
  border-radius: 4px;
  font-family: var(--font-base);
  font-size: 1rem;
  cursor: pointer;
  transition: opacity .2s;
  text-decoration: none;
}
.btn:hover { opacity: .85; text-decoration: none; }
.btn-primary   { background: var(--color-accent-1); color: #fff; }
.btn-secondary { background: var(--color-accent-2); color: #fff; }

/* =============================================
   BLOG TEMPLATE
   ============================================= */
.blog-hero {
  background: var(--color-accent-2);
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding: 3.5rem var(--gap);
  text-align: center;
}
.blog-hero__inner { max-width: var(--max-width); margin-inline: auto; }
.blog-hero h1 {
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 0;
}

.post-list { display: flex; flex-direction: column; gap: 2rem; margin-top: 2.5rem; }

.post-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e5e5;
}

.post-card__thumb {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  overflow: hidden;
  border-radius: 4px;
  display: block;
}
.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__body { flex: 1; }

.post-card__cat {
  display: inline-block;
  background: var(--color-accent-2);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .2em .65em;
  border-radius: 3px;
  margin-bottom: .5rem;
  text-decoration: none;
}
.post-card__cat:hover { opacity: .85; text-decoration: none; }

.post-card__title { font-size: 1.15rem; margin-bottom: .4rem; }
.post-card__title a { color: var(--color-text); text-decoration: none; }
.post-card__title a:hover { color: var(--color-accent-1); }

.post-card__excerpt { font-size: .9rem; color: #555; margin-bottom: .75rem; }

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .8rem;
  color: #888;
  flex-wrap: wrap;
}
.post-card__author {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.post-card__author img { border-radius: 50%; }

@media (max-width: 600px) {
  .post-card { flex-direction: column; }
  .post-card__thumb { width: 100%; height: 200px; }
}

/* Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: .4rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 .6rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: var(--color-text);
  font-size: .9rem;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
  background: var(--color-accent-1);
  color: #fff;
  border-color: var(--color-accent-1);
}

/* =============================================
   SINGLE POST
   ============================================= */
.post-hero {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  background: #222 center/cover no-repeat;
  position: relative;
}
.post-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.25) 60%, transparent 100%);
}
.post-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 2.5rem var(--gap);
}
.post-hero__cat {
  display: inline-block;
  background: var(--color-accent-2);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .25em .75em;
  border-radius: 3px;
  margin-bottom: .75rem;
  text-decoration: none;
}
.post-hero__cat:hover { opacity: .85; text-decoration: none; }
.post-hero__title {
  color: #fff;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  margin-bottom: .75rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.post-hero__meta {
  display: flex;
  gap: 1.25rem;
  color: rgba(255,255,255,.85);
  font-size: .875rem;
  flex-wrap: wrap;
}

/* Article body */
.single-post .entry-content {
  max-width: 780px;
  font-size: 1.05rem;
  line-height: 1.75;
}
.single-post .entry-content img { border-radius: 4px; margin-block: 1.5em; }
.single-post .entry-content h2,
.single-post .entry-content h3 { margin-top: 1.75em; }
.single-post .entry-content blockquote {
  border-left: 4px solid var(--color-accent-2);
  padding: .75em 1.25em;
  margin-block: 1.5em;
  background: #fafafa;
  font-style: italic;
  color: #555;
}

/* Author box */
.post-footer-meta { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid #e5e5e5; }

.post-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 2rem; }
.post-tag {
  background: #f0f0f0;
  color: #555;
  font-size: .8rem;
  padding: .25em .75em;
  border-radius: 20px;
  text-decoration: none;
  transition: background .2s;
}
.post-tag:hover { background: var(--color-accent-1); color: #fff; text-decoration: none; }

.post-author-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #f9f9f9;
  padding: 1.25rem;
  border-radius: 6px;
}
.post-author-box img { border-radius: 50%; flex-shrink: 0; }
.post-author-box p { font-size: .875rem; color: #666; margin-bottom: 0; }

/* Post nav */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e5e5;
  flex-wrap: wrap;
}
.post-nav a {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  font-size: .9rem;
  color: var(--color-text);
  text-decoration: none;
  max-width: 48%;
}
.post-nav a:hover { color: var(--color-accent-1); }
.post-nav a span { font-size: .75rem; color: #999; text-transform: uppercase; letter-spacing: .05em; }
.post-nav__next { text-align: right; margin-left: auto; }
