/*
Theme Name: O Barrio Editable
Theme URI: https://avcanido.org/
Author: AVV Canido
Description: Tema WordPress completamente editable para O Barrio, boletín da Asociación Veciñal de Canido. Cabecera con slider, logos, secciones modulares, números del boletín, noticias, colaboración, newsletter, widgets y footer editable.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: obarrio
Tags: custom-logo, custom-colors, custom-menu, featured-images, editor-style, blog, news, full-site-editing-ready
*/

:root{
  --green:#173f30;
  --green2:#2d6a4f;
  --paper:#f4ead9;
  --paper2:#fffaf1;
  --ink:#1f2a2e;
  --muted:#66736d;
  --ochre:#d8bd7f;
  --line:rgba(31,42,46,.14);
  --shadow:0 22px 60px rgba(31,42,46,.16);
  --radius:26px;
  --font-body:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --font-title:Georgia,"Times New Roman",serif;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:var(--font-body);color:var(--ink);background:var(--paper2);line-height:1.5}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto}
.screen-reader-text{position:absolute;left:-9999px}

/* CABECERA CORREGIDA */
.ob-header-fixed{
  position:sticky;
  top:0;
  z-index:999999;
  background:#fffaf1;
  border-bottom:1px solid var(--line);
  box-shadow:0 8px 24px rgba(31,42,46,.08);
  width:100%;
}
.ob-header-logos{
  height:116px;
  display:grid;
  grid-template-columns:230px minmax(260px,1fr) 120px;
  align-items:center;
  gap:1.25rem;
  padding:10px 5vw;
  overflow:hidden;
}
.ob-logo-avv,
.ob-logo-barrio{
  display:flex;
  align-items:center;
  min-width:0;
  height:96px;
  overflow:hidden;
}
.ob-logo-avv{justify-content:flex-start}
.ob-logo-barrio{justify-content:center}
.ob-logo-avv img{
  width:220px !important;
  max-width:220px !important;
  height:auto !important;
  max-height:86px !important;
  object-fit:contain !important;
  display:block !important;
}
.ob-logo-barrio img{
  width:360px !important;
  max-width:360px !important;
  height:auto !important;
  max-height:96px !important;
  object-fit:contain !important;
  display:block !important;
}
.ob-social-icons{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
}
.ob-social-icon{
  width:32px !important;
  height:32px !important;
  min-width:32px !important;
  max-width:32px !important;
  border-radius:50%;
  background:var(--green);
  color:#fff;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  padding:0 !important;
  overflow:hidden;
  line-height:0;
}
.ob-social-icon svg{
  width:17px !important;
  height:17px !important;
  min-width:17px !important;
  max-width:17px !important;
  display:block !important;
  fill:currentColor !important;
}
.ob-social-icon:hover{background:var(--green2)}

.ob-menu-fixed{
  min-height:52px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 260px;
  align-items:center;
  gap:1rem;
  padding:0 5vw;
  background:var(--green);
}
.ob-menu-principal{
  min-width:0;
  overflow:visible;
}
.ob-menu-list,
.ob-menu-principal ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:0;
}
.ob-menu-principal li{
  list-style:none;
  margin:0;
  padding:0;
  position:relative;
}
.ob-menu-principal a{
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 .85rem;
  color:#fff;
  font-weight:900;
  font-size:.94rem;
  line-height:1.1;
  white-space:nowrap;
}
.ob-menu-principal a:hover,
.ob-menu-principal .current-menu-item>a{
  background:rgba(255,255,255,.14);
}
.ob-menu-principal ul ul{
  display:none;
  position:absolute;
  top:100%;
  left:0;
  min-width:220px;
  background:#fffaf1;
  border:1px solid var(--line);
  box-shadow:0 16px 30px rgba(0,0,0,.12);
  z-index:999999;
}
.ob-menu-principal li:hover>ul{display:block}
.ob-menu-principal ul ul a{
  color:var(--green);
  background:#fffaf1;
  min-height:auto;
  justify-content:flex-start;
  padding:.85rem 1rem;
}
.ob-menu-principal ul ul a:hover{background:var(--paper)}
.ob-search-fixed{
  display:flex;
  height:38px;
  background:#fff;
  border-radius:8px;
  overflow:hidden;
}
.ob-search-fixed input{
  min-width:0;
  width:100%;
  border:0;
  padding:0 .8rem;
  outline:none;
}
.ob-search-fixed button{
  border:0;
  padding:0 .75rem;
  background:var(--ochre);
  color:var(--green);
  font-weight:900;
}

/* PORTADA */
.ob-hero{position:relative;overflow:hidden;min-height:520px;background:var(--green)}
.ob-slide{display:none;min-height:520px;padding:4.3rem 6vw 2.4rem;background-size:cover;background-position:center;position:relative}
.ob-slide.is-active{display:block}
.ob-slide::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg, rgba(15,47,36,.82) 0%, rgba(15,47,36,.62) 45%, rgba(15,47,36,.18) 100%)}
.ob-slide-inner{position:relative;z-index:2;max-width:1240px;margin:auto;display:grid;grid-template-columns:1fr 1fr;gap:3rem;align-items:center}
.ob-kicker{color:var(--ochre);font-weight:950;text-transform:uppercase;letter-spacing:.14em;font-size:.82rem}
.ob-slide h1{font-family:var(--font-title);color:white;font-size:clamp(2.8rem,6vw,5.2rem);line-height:.96;margin:.6rem 0 1.1rem;letter-spacing:-.055em}
.ob-slide p{font-size:1.2rem;max-width:560px;color:rgba(255,255,255,.9)}
.ob-actions{display:flex;gap:.8rem;flex-wrap:wrap;margin-top:2rem}
.ob-btn{display:inline-flex;align-items:center;gap:.5rem;justify-content:center;padding:.95rem 1.25rem;border-radius:8px;border:1px solid var(--green);font-weight:950;letter-spacing:.02em}
.ob-btn.primary{background:var(--green);color:white;border-color:var(--green)}
.ob-btn.light{background:rgba(255,250,241,.88);color:var(--green)}
.ob-magazine-wrap{position:relative;min-height:360px}
.ob-cover-main{width:340px;max-width:70%;display:block;margin:0 auto;filter:drop-shadow(0 28px 32px rgba(31,42,46,.32));transform:rotate(-4deg);position:relative;z-index:3}
.ob-cover-shadow{position:absolute;right:30px;top:25px;width:320px;max-width:65%;opacity:.28;transform:rotate(4deg);filter:grayscale(1)}
.ob-slider-controls{position:absolute;left:50%;bottom:1.2rem;transform:translateX(-50%);display:flex;gap:.5rem;z-index:5}
.ob-slider-controls button{width:13px;height:13px;border-radius:999px;border:2px solid white;background:transparent;cursor:pointer}
.ob-slider-controls button.is-active{background:white}
.ob-slider-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:5;width:44px;height:44px;border-radius:50%;border:0;background:rgba(255,255,255,.92);cursor:pointer;font-size:1.4rem}
.ob-prev{left:2vw}.ob-next{right:2vw}

/* SECCIONES */
.ob-section{padding:3.8rem 6vw}
.ob-wrap{max-width:1240px;margin:auto}
.ob-section-head{display:flex;align-items:end;justify-content:space-between;gap:1.5rem;margin-bottom:1.5rem}
.ob-section h2,.ob-title{font-family:var(--font-title);color:var(--green);font-size:clamp(2rem,3vw,3rem);margin:0;letter-spacing:-.035em}
.ob-rule{display:inline-block;width:42px;height:3px;background:var(--green);margin-left:.8rem;vertical-align:middle}
.ob-issues-sections{display:grid;grid-template-columns:1.45fr .9fr;gap:2.4rem;align-items:start}
.ob-issues{display:grid;grid-template-columns:repeat(4,1fr);gap:1.1rem}
.ob-issue{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden;box-shadow:0 10px 28px rgba(31,42,46,.08);text-align:center}
.ob-issue img{width:100%;display:block;background:var(--paper)}
.ob-issue-body{padding:.7rem .7rem 1rem}
.ob-issue strong{display:block;margin-bottom:.65rem}
.ob-mini-btn{background:var(--green);color:white;border-radius:6px;padding:.45rem .9rem;font-weight:900;font-size:.84rem;display:inline-flex;gap:.35rem}
.ob-section-list{display:grid;gap:.75rem}
.ob-section-card{display:grid;grid-template-columns:56px 1fr 28px;gap:.8rem;align-items:center;padding:1rem;border-radius:8px;border:1px solid var(--line);background:linear-gradient(90deg,#efe8d3,#fffaf1)}
.ob-section-card:nth-child(2){background:linear-gradient(90deg,#eadcaf,#fff3d2)}
.ob-section-card:nth-child(3){background:linear-gradient(90deg,#dce8dc,#f4fbf2)}
.ob-section-card:nth-child(4){background:linear-gradient(90deg,#dbe6ea,#f4fafc)}
.ob-section-card:nth-child(5){background:linear-gradient(90deg,#eadade,#fff5f7)}
.ob-icon{font-size:1.7rem;opacity:.72}
.ob-section-card strong{display:block;color:var(--green)}
.ob-section-card small{color:var(--muted)}
.ob-feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
.ob-feature-card{display:block;background:var(--paper2);border:1px solid var(--line);border-radius:var(--radius);padding:1.4rem;box-shadow:0 12px 32px rgba(31,42,46,.08);color:inherit}
.ob-feature-card .big{font-size:2.3rem}
.ob-posts-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.2rem}
.ob-post-card{background:white;border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:0 10px 28px rgba(31,42,46,.08)}
.ob-post-card .thumb{height:190px;background:var(--paper);display:block;overflow:hidden}
.ob-post-card .thumb img{width:100%;height:100%;object-fit:cover}
.ob-post-card .content{padding:1rem}
.ob-post-card h3{margin:.2rem 0 .6rem;color:var(--green)}
.ob-about{background:var(--green);color:white;border-radius:32px;display:grid;grid-template-columns:1.1fr .9fr;gap:2rem;padding:2.3rem;overflow:hidden}
.ob-about h2{color:white}.ob-about p{color:rgba(255,255,255,.8)}
.ob-about-box{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.24);border-radius:24px;padding:1.4rem}
.ob-newsletter{background:linear-gradient(90deg,var(--green),#0f2f24);color:white;padding:1.1rem 6vw}
.ob-newsletter .ob-wrap{display:grid;grid-template-columns:1fr 1.3fr;gap:1rem;align-items:center}
.ob-newsletter form{display:flex;background:white;border-radius:8px;overflow:hidden}
.ob-newsletter input{flex:1;border:0;padding:1rem;font-size:1rem}
.ob-newsletter button{border:0;background:var(--ochre);padding:0 1.4rem;font-weight:950;color:#183125}
.ob-newsletter-alert{padding:.75rem 1rem;border-radius:8px;margin-bottom:.8rem;font-weight:800}
.ob-newsletter-alert.success{background:#dce8dc;color:#173f30}
.ob-newsletter-alert.error{background:#ffe1df;color:#7b1f17}
.ob-footer{background:#111d18;color:white;padding:3rem 6vw}
.ob-footer-grid{max-width:1240px;margin:auto;display:grid;grid-template-columns:1.2fr repeat(3,1fr);gap:2rem}
.ob-footer p,.ob-footer a{color:rgba(255,255,255,.72)}
.ob-footer-social{display:flex;gap:.45rem;margin-top:1rem}

/* RESPONSIVE */
@media(max-width:1080px){
  .ob-header-logos{
    height:100px;
    grid-template-columns:180px minmax(220px,1fr) 105px;
    padding:8px 1rem;
  }
  .ob-logo-avv,.ob-logo-barrio{height:84px}
  .ob-logo-avv img{width:180px !important;max-width:180px !important;max-height:76px !important}
  .ob-logo-barrio img{width:300px !important;max-width:300px !important;max-height:84px !important}
  .ob-menu-fixed{grid-template-columns:1fr;padding:.45rem 1rem;gap:.45rem}
  .ob-menu-principal{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .ob-menu-list,.ob-menu-principal ul{flex-wrap:nowrap;min-width:max-content}
  .ob-menu-principal a{min-height:40px;padding:0 .7rem;font-size:.9rem}
  .ob-search-fixed{max-width:520px;width:100%;margin:0 auto;height:38px}
  .ob-slide-inner,.ob-issues-sections,.ob-about,.ob-newsletter .ob-wrap,.ob-footer-grid{grid-template-columns:1fr}
  .ob-issues,.ob-feature-grid,.ob-posts-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:640px){
  .ob-header-logos{
    height:118px;
    grid-template-columns:1fr auto;
    grid-template-areas:"av social" "barrio barrio";
    gap:4px 10px;
    padding:6px .75rem;
  }
  .ob-logo-avv{grid-area:av;height:48px;justify-content:flex-start}
  .ob-logo-barrio{grid-area:barrio;height:58px;justify-content:center}
  .ob-social-icons{grid-area:social}
  .ob-logo-avv img{width:160px !important;max-width:160px !important;max-height:46px !important}
  .ob-logo-barrio img{width:230px !important;max-width:230px !important;max-height:56px !important}
  .ob-social-icon{width:28px !important;height:28px !important;min-width:28px !important;max-width:28px !important}
  .ob-social-icon svg{width:15px !important;height:15px !important;min-width:15px !important;max-width:15px !important}
  .ob-menu-fixed{padding:.4rem .5rem}
  .ob-menu-principal a{min-height:38px;font-size:.86rem;padding:0 .65rem}
  .ob-search-fixed{height:36px}
  .ob-search-fixed button{padding:0 .55rem}
  .ob-slide{min-height:auto;padding:2.7rem 1rem 4.4rem}
  .ob-slide-inner{text-align:center;grid-template-columns:1fr}
  .ob-actions{justify-content:center}
  .ob-cover-shadow{display:none}
  .ob-cover-main{width:230px;max-width:78%}
  .ob-slider-arrow{display:none}
  .ob-section{padding:2.5rem 1rem}
  .ob-section-head{align-items:flex-start;flex-direction:column}
  .ob-issues,.ob-feature-grid,.ob-posts-grid{grid-template-columns:1fr}
  .ob-issue{max-width:330px;margin:auto}
  .ob-newsletter form{flex-direction:column;background:transparent;gap:.6rem}
  .ob-newsletter input,.ob-newsletter button{width:100%;border-radius:8px}
  .ob-newsletter button{padding:1rem}
  .ob-footer{padding:2.5rem 1rem}
}
