:root {
  --main-bg:#fcfcfc;
  --main-color:#232323;
  --accent:#f68934;
  --accent-dark:#876c2a;
  --header-bg:#4B3621;
  --title-sg:#fff;
  --section-bg:#fffbe7;
  --card-bg:#fff;
  --shadow:0 4px 16px rgba(0,0,0,0.06);
}

/* ===== Base ===== */
.foro-body {
  font-family:'Lato',sans-serif;
  background:var(--main-bg);
  color:var(--main-color);
}

/* Header */
.foro-header {
  background:var(--accent);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:1.2rem 2.5rem;
  position:sticky;
  top:0;
  z-index:10;
  box-shadow:var(--shadow);
}

.foro-logo {
  font-family:'Montserrat',sans-serif;
  font-size:2rem;
  font-weight:bold;
  color:var(--accent);
  letter-spacing:1px;
  display:flex;
  align-items:center;
  gap:.75rem;
}
.foro-logo img { height:60px; }

.foro-nav .menu {
  list-style:none;
  display:flex;
  gap:2rem;
  margin:0;
  padding:0;
}
.foro-nav .menu a {
  color:#fff;
  text-decoration:none;
  font-family:'Montserrat',sans-serif;
  font-weight:600;
  font-size:1.05rem;
  transition:color .2s;
}
.foro-nav .menu a:hover { color:var(--accent); }

/* Hero */
.hero {
  background:linear-gradient(120deg,#fffbe7 60%,#e4c77b 100%);
  min-height:340px;
  display:flex;
  align-items:center;
  padding:3rem 0 2rem;
  box-shadow:var(--shadow);
  position:relative;
}
.hero-content { max-width:700px; margin-left:5%; }
.hero-title {
  font-family:'Montserrat',sans-serif;
  font-size:2.8rem;
  color:var(--header-bg);
  margin-bottom:1rem;
  font-weight:900;
  line-height:1.15;
}
.hero-desc { font-size:1.2rem; margin-bottom:2rem; color:#444; }

/* Buttons */
.cta-btn {
  padding:.9rem 2.3rem;
  background:var(--accent);
  border:none;
  color:#fff;
  font-family:'Montserrat',sans-serif;
  font-size:1.1rem;
  font-weight:700;
  border-radius:2rem;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(201,163,67,0.17);
  transition:background .2s;
  display:inline-block;
}
.cta-btn:hover { background:var(--accent-dark); }
.cta-small { font-size:.97rem; padding:.4rem 1.2rem; margin-top:auto; align-self:flex-start; }

/* Layout principal */
.foro-main {
  max-width:1280px;
  margin:0 auto;
  padding:2.5rem 1rem 1rem;
  display:grid;
  grid-template-columns:1fr 320px;
  gap:2.5rem;
}
@media (max-width:1024px){
  .foro-main{ grid-template-columns:1fr; gap:1.5rem; }
}

/* Secciones y títulos */
.news-section,.events-section,.blog-section { margin-bottom:2.5rem; }
.section-title {
  font-family:'Montserrat',sans-serif;
  font-size:2rem;
  color:var(--accent);
  margin-bottom:1rem;
  font-weight:800;
}

/* Rows de tarjetas (por defecto flex; en categorías forzamos grid) */
.cards-row { display:flex; gap:1.3rem; flex-wrap:wrap; }

/* Tarjeta genérica */
.news-card {
  background:var(--card-bg);
  border-radius:1.1rem;
  box-shadow:var(--shadow);
  padding:1.2rem;
  flex:1 1 260px;
  min-width:250px;
  max-width:310px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  margin-bottom:1rem;
  transition:box-shadow .2s;
}
.news-card:hover { box-shadow:0 6px 24px rgba(201,163,67,0.12); }
.news-title {
  font-size:1.13rem;
  font-family:'Montserrat',sans-serif;
  font-weight:700;
  margin:0 0 .7rem;
  color:var(--header-bg);
}
.news-excerpt { color:#444; font-size:.97rem; margin-bottom:.8rem; }
.news-meta { font-size:.88rem; color:#bcb59c; margin-bottom:.5rem; }

/* Eventos/Blog */
.events-list { list-style:none; padding:0; margin:0; }
.event-item {
  background:#fffdfa;
  border-left:5px solid var(--accent);
  border-radius:.7rem;
  margin-bottom:1.1rem;
  padding:.9rem 1.2rem;
  box-shadow:0 2px 8px rgba(201,163,67,0.07);
  font-size:1rem;
  display:flex;
  flex-direction:column;
}
.event-title {
  font-family:'Montserrat',sans-serif;
  font-weight:600;
  color:var(--header-bg);
  font-size:1.08rem;
  margin-bottom:.2rem;
}
.event-date { color:var(--accent-dark); font-size:.98rem; font-weight:700; }

.blog-list { list-style:none; padding:0; margin:0; display:flex; gap:1.3rem; flex-wrap:wrap; }
.blog-item {
  background:var(--card-bg);
  border-radius:1rem;
  box-shadow:var(--shadow);
  padding:1.1rem;
  min-width:220px;
  flex:1 1 220px;
  margin-bottom:1rem;
  display:flex;
  flex-direction:column;
  transition:box-shadow .2s;
}
.blog-item:hover { box-shadow:0 8px 30px rgba(201,163,67,0.16); }
.blog-title {
  font-family:'Montserrat',sans-serif;
  font-weight:700;
  font-size:1.09rem;
  color:var(--header-bg);
  margin-bottom:.3rem;
}
.blog-excerpt { font-size:.97rem; color:#444; }

/* Sidebar */
.foro-sidebar { display:flex; flex-direction:column; gap:2rem; }
.widget-foro {
  background:#fffef9;
  border-radius:1rem;
  box-shadow:0 2px 8px rgba(201,163,67,0.07);
  padding:1.5rem;
}
.widget-title {
  font-family:'Montserrat',sans-serif;
  color:var(--accent);
  font-size:1.2rem;
  font-weight:700;
  margin-bottom:.9rem;
}

/* Social */
.social-icons {
  position:fixed;
  top:42%;
  left:0;
  display:flex;
  flex-direction:column;
  gap:.5rem;
  z-index:1000;
}
.social-icons a {
  background:var(--accent);
  color:#fff;
  padding:.6rem;
  border-radius:0 8px 8px 0;
  text-decoration:none;
  font-size:1.2rem;
  transition:background .2s;
  box-shadow:0 2px 10px rgba(201,163,67,0.11);
  margin-left:2px;
}
.social-icons a:hover { background:var(--accent-dark); }

/* Footer */
.foro-footer {
  background:var(--header-bg);
  color:#fff;
  padding:1.4rem 0;
  text-align:center;
  margin-top:2rem;
  font-size:1rem;
}

/* Utilidades */
.enlace-acento { color:var(--accent); font-weight:700; margin-top:.3rem; text-decoration:none; }
.only-desktop{ display:none !important; }
.only-mobile{ display:block !important; }
@media (min-width:1025px){
  .only-desktop{ display:block !important; }
  .only-mobile{ display:none !important; }
}

/* Imágenes sueltas */
.single-thumb {
  display:block;
  width:100%;
  height:auto;
  border-radius:1rem;
  box-shadow:var(--shadow);
  margin-bottom:1rem;
}
.entry-content{ color:#333; }

/* ===== SINGLE ===== */
.single .news-card,
.single .news-article {
  background: var(--card-bg);
  border-radius: 1.1rem;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  max-width: none;
  min-width: 0;
  width: 100%;
  display: block;
  margin-bottom: 1.5rem;
}

.single .entry-content{
  color:#222;
  font-size:1.06rem;
  line-height:1.65;
}
.single .entry-content p{ margin: 0 0 1.1rem; }
.single .entry-content h2{
  font-family:'Montserrat',sans-serif;
  font-size:1.6rem;
  margin:1.4rem 0 .6rem;
  color:var(--header-bg);
}
.single .entry-content h3{
  font-family:'Montserrat',sans-serif;
  font-size:1.3rem;
  margin:1.2rem 0 .5rem;
  color:var(--header-bg);
}

/* Medios fluidos en single */
.single .entry-content img,
.single .entry-content figure,
.single .entry-content iframe,
.single .entry-content video{
  max-width:100%;
  width:100%;
  height:auto;
  border-radius:.6rem;
  box-shadow: var(--shadow);
}

/* Grid del single */
.single .foro-main{
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
}
@media (max-width:1024px){
  .single .foro-main{ grid-template-columns: 1fr; }
}

/* SINGLE con hero sobre imagen */
.hero-article {
  min-height: 320px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow);
  background-color: var(--section-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-article__inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}
.hero-article__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 3.6rem;
  line-height: 1.15;
  margin: 0 0 .4rem 0;
  color: var(--title-sg);
  font-weight: 900;
}
.hero-article__meta {
  color: #5b4b2a;
  font-weight: 700;
  font-size: 1rem;
}

/* Single + sidebar */
.foro-main.single-with-sidebar {
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
}
@media (max-width: 1024px) {
  .hero-article { min-height: 240px; }
  .hero-article__title { font-size: 2.1rem; }
  .foro-main.single-with-sidebar { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* Navegación del single */
.news-article .entry-content img { max-width: 100%; height: auto; }
.news-article .post-navigation {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.news-article .post-navigation a { text-decoration: none; }

/* ===== NAV hamburguesa (WP) ===== */
.nav-toggle{
  display:none;
  background:transparent;
  border:0;
  padding:.4rem;
  margin-left:auto;
  cursor:pointer;
  outline-offset:2px;
}
.nav-toggle:focus-visible{ outline:2px solid #fff; }
.nav-toggle__bar{
  display:block;
  width:28px; height:3px;
  background:#fff; border-radius:2px;
  margin:5px 0;
  transition:transform .25s ease, opacity .2s ease;
}
.nav-open .nav-toggle__bar:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle__bar:nth-child(2){ opacity:0; }
.nav-open .nav-toggle__bar:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

/* Menú móvil */
@media (max-width:1024px){
  .nav-toggle{ display:block; }
  .foro-nav{
    position:fixed;
    left:0; right:0;
    top:var(--header-h-mobile);
    background:var(--accent);
    box-shadow:0 8px 24px rgba(0,0,0,.15);
    transform: translateY(-120%);
    transition: transform .28s ease;
    z-index: 999;
  }
  .foro-nav.is-open{ transform: translateY(0); }

  .foro-nav .menu{
    display:flex;
    flex-direction:column;
    gap:0;
    padding:.4rem .75rem .9rem;
    margin:0;
  }
  .foro-nav .menu li{ list-style:none; }
  .foro-nav .menu a{
    display:block;
    padding:.8rem .6rem;
    border-radius:.5rem;
    font-size:1.05rem;
    color:#fff;
  }
  .foro-nav .menu a:hover{ color:#fff; background:rgba(0,0,0,.08); }
  body.no-scroll{ overflow:hidden; }
  .foro-header{ min-height: var(--header-h-mobile); }
}

/* ===== Hero con video ===== */
.hero.hero--with-video { position: relative; overflow: hidden; }
.hero-media {
  order: -1;
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 0 0 1rem 0;
}
.hero-video {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 9 / 16;
  height: auto;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
  background: #000;
}

@media (max-width:1024px){
  .hero.hero--with-video{
    flex-direction: column;
    align-items: stretch;
  }
  .hero-media{
    order:-1;
    width:100%;
    display:flex;
    justify-content:center;
    margin: .25rem 0 1rem;
  }
  .hero-video{
    width: min(94vw, 480px);
    aspect-ratio: 9 / 16;
    height: auto;
    object-fit: cover;
    object-position: center;
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(0,0,0,.18);
    display: block;
  }
  .hero-content{ padding: 0 clamp(12px, 4vw, 24px); }
}

@media (min-width:1025px){
  .hero.hero--with-video{ min-height:420px; position:relative; }
  .hero-content{ max-width:760px; margin-left:5%; position:relative; z-index:2; }
  .hero-media{
    position:absolute; right:3%; top:50%; transform:translateY(-50%);
    width:min(32vw, 420px); margin:0; z-index:1; pointer-events:none;
  }
  .hero-video{
    width:100%; aspect-ratio:9/16; border-radius:1.2rem;
    box-shadow:0 18px 48px rgba(0,0,0,.22);
  }
}

/* ===== Listado de categoría: grid consistente ===== */
.category .news-section .cards-row{
  display:grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
}
@media (min-width:700px) and (max-width:1024px){
  .category .news-section .cards-row{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
  }
}
@media (max-width:699px){
  .category .news-section .cards-row{
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
/* Cada card ocupa su celda (evita width:100% en categorías) */
.category .news-card{
  max-width: none;
  width: auto;
}

/* ===== Overlay y títulos para tarjetas de 'Ejemplos' ===== */
.news-card--ejemplo .card-thumb{
  position:relative;
  display:block;
  overflow:hidden;
  border-radius:1rem;
}
.news-card--ejemplo .card-thumb img{
  display:block; width:100%; height:auto;
}

/* Desktop: overlay negro + título encima de la imagen */
@media (min-width:1025px){
  .news-card--ejemplo .card-thumb::after{
    content:"";
    position:absolute; inset:0;
    background:linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.65) 100%);
    pointer-events:none; z-index:1;
  }
  .news-card--ejemplo .news-title--overlay{
    position:absolute; left:14px; right:14px; bottom:14px; margin:0;
    color:#fff; font-family:'Montserrat',sans-serif; font-weight:800; line-height:1.15;
    text-shadow:0 2px 12px rgba(0,0,0,.45); z-index:2;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  }
  .news-card--ejemplo .news-title--mobile{ display:none !important; }
}

/* Móvil/Tablet: título debajo con color del menú */
@media (max-width:1024px){
  .news-card--ejemplo .news-title--mobile{
    color:#fff;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  }
}

/* ===== HOME: tarjetas de 'Ejemplos' sin overlay ni título overlay ===== */
.home .news-card--ejemplo .news-thumb{
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 1rem;
}
.home .news-card--ejemplo .news-thumb img{
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
}
.home .news-card--ejemplo .news-thumb::after{ display: none !important; }
.home .news-card--ejemplo .news-title--overlay,
.home .news-card--ejemplo .news-title--mobile{
  display: none !important;
}

/* ===== Ajustes responsive generales ===== */
@media (max-width:1024px){
  .social-icons{ display:none; }
  .hero-title{ font-size:2.1rem; }
  .foro-main{ padding:1rem; }
}
@media (max-width:650px){
  .hero{ padding:1.5rem 0; }
  .foro-main{ padding:.2rem; }
}

/* ===== Variantes de single para 'Ejemplos' ===== */
@media (max-width:1024px){
  .single.is-ejemplos .hero-article__title{ display:none !important; }
  .single.is-ejemplos .entry-title--mobile-only{
    display:block;
    margin:1rem;
    font-size:1.6rem;
    font-family:'Montserrat',sans-serif;
    font-weight:900;
    line-height:1.2;
    color:#fff;
  }
  .single.is-ejemplos .entry-meta--mobile-only{
    display:block;
    margin:0 1rem 1rem;
    color: var(--accent-dark);
    font-weight:700;
  }
}
@media (min-width:1025px){
  .single.is-ejemplos .hero-article{ position:relative; }
  .single.is-ejemplos .hero-article::after{
    content:""; position:absolute; inset:0;
    background:linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,.55) 70%);
    z-index:0;
  }
  .single.is-ejemplos .hero-article__inner{ position:relative; z-index:1; }
  .single.is-ejemplos .hero-article__title{
    color:#fff; text-shadow:0 2px 12px rgba(0,0,0,.45);
  }
  .single.is-ejemplos .entry-title--mobile-only,
  .single.is-ejemplos .entry-meta--mobile-only{ display:none; }
}

/* ===== Hero móvil de single 'Ejemplos' ===== */
@media (max-width:1024px){
  .single.is-ejemplos .hero-article{
    width:100%;
    height: 100vw;
    max-height: 85vh;
    overflow:hidden;
  }
  .single.is-ejemplos .hero-article img,
  .single.is-ejemplos .hero-article figure,
  .single.is-ejemplos .hero-article picture{
    width:100% !important;
    height:100% !important;
    object-fit:cover;
    object-position:center;
    display:block;
  }
}
