/*
Theme Name: Islamic Business · Blocksy Corporativo
Theme URI: https://halalbusinessofspain.com/
Description: Tema hijo de Blocksy para Islamic & Halal Business of Spain, con barra de contactos y diseños reversibles de las páginas principales.
Author: Islamic & Halal Business of Spain
Template: blocksy
Version: 2.6.1
Text Domain: hbs-blocksy-child
Requires PHP: 7.4
*/

/* Identidad corporativa base. El tema padre Blocksy aporta la estructura principal. */
:root {
  --hbs-brand-green: #165c45;
  --hbs-brand-dark: #104533;
  --hbs-brand-blue: #074d77;
  --hbs-brand-gold: #c5a66a;
  --hbs-brand-ink: #193d31;
  --hbs-brand-soft: #f5faf6;
  --hbs-brand-border: #dce9df;

  --theme-palette-color-1: #17694b;
  --theme-palette-color-2: #124c37;
  --theme-palette-color-3: #193d31;
  --theme-palette-color-4: #60766a;
  --theme-palette-color-5: #eaf3ed;
  --theme-palette-color-6: #f5faf7;
  --theme-palette-color-7: #fff;
  --theme-palette-color-8: #fff;
}

html { scroll-behavior: smooth; }
body { color: var(--hbs-brand-ink); background: #fff; }
h1, h2, h3, h4 { letter-spacing: -0.025em; }

/* Navegación Blocksy: cabecera fija solo si se activa desde el personalizador. */
#header, #header .ct-header { box-shadow: none; }
#header .menu > li > a,
#header [data-id="menu"] a { font-weight: 700; }
#header a:hover { color: var(--hbs-brand-green); }

/* Botones nativos; los botones propios de los plugins mantienen su aspecto. */
.ct-button:not(.hbs-no-theme),
button[type="submit"]:not(.hbs-no-theme) {
  border-radius: 10px;
}

/* Contactos y redes sobre la cabecera: identidad CoopHalal adaptada a Islamic. */
.hbs-brand-topbar {
  --hbs-topbar-green: #4ac624;
  position: relative;
  z-index: 10;
  width: 100%;
  background: var(--hbs-brand-blue);
  color: #fff;
  border-radius: 0 0 30px 30px;
  line-height: 1.3;
  overflow: hidden;
}
.hbs-brand-topbar__inner {
  width: min(calc(100% - 48px), 1680px);
  min-height: 48px;
  margin-inline: auto;
  padding: 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px 19px;
  flex-wrap: wrap;
}
.hbs-brand-topbar__links,
.hbs-brand-topbar__actions,
.hbs-brand-topbar__socials,
.hbs-brand-topbar__item,
.hbs-brand-topbar__office {
  display: flex;
  align-items: center;
}
.hbs-brand-topbar__links { gap: 7px 17px; flex-wrap: wrap; min-width: 0; }
.hbs-brand-topbar__actions { gap: 15px 23px; margin-left: auto; flex-wrap: wrap; }
.hbs-brand-topbar__item { gap: 8px; }
.hbs-brand-topbar .hbs-brand-topbar__item,
.hbs-brand-topbar .hbs-brand-topbar__office,
.hbs-brand-topbar .hbs-brand-topbar__social,
.hbs-brand-topbar .hbs-brand-topbar__address {
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.4;
}
.hbs-brand-topbar .hbs-brand-topbar__item:hover,
.hbs-brand-topbar .hbs-brand-topbar__social:hover { color: #fff; text-decoration: none; }
.hbs-brand-icon {
  flex: 0 0 auto;
  display: block;
  width: 19px;
  height: 19px;
  color: var(--hbs-topbar-green);
}
.hbs-brand-topbar__socials { gap: 10px; }
.hbs-brand-topbar .hbs-brand-topbar__social { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; min-height: 26px; }
.hbs-brand-topbar__social--pending { cursor: default; }
.hbs-brand-topbar__social:hover .hbs-brand-icon { color: #83e04e; }
.hbs-brand-topbar__social--pending:hover .hbs-brand-icon { color: var(--hbs-topbar-green); }
.hbs-brand-topbar .hbs-brand-topbar__office {
  gap: 6px;
  padding: 9px 14px;
  background: #07963e;
  color: #fff;
  border-radius: 9px;
  font-weight: 800;
  white-space: nowrap;
  transition: background .2s ease;
}
.hbs-brand-topbar .hbs-brand-topbar__office .hbs-brand-icon { width: 16px; height: 16px; color: #fff; }
.hbs-brand-topbar .hbs-brand-topbar__office:hover { background: #087a36; color: #fff; text-decoration: none; }
.hbs-brand-topbar a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 3px; }
@media (max-width: 1390px) {
  .hbs-brand-topbar__inner { width: min(calc(100% - 32px), 1680px); }
  .hbs-brand-topbar__links { gap: 7px 12px; }
  .hbs-brand-topbar__actions { gap: 12px; }
}
@media (max-width: 920px) {
  .hbs-brand-topbar__inner { justify-content: center; gap: 10px; padding: 10px 0; }
  .hbs-brand-topbar__links { width: 100%; justify-content: center; }
  .hbs-brand-topbar__actions { margin-left: 0; justify-content: center; }
}
@media (max-width: 640px) {
  .hbs-brand-topbar { border-radius: 0 0 23px 23px; }
  .hbs-brand-topbar__inner { width: min(calc(100% - 24px), 1680px); padding: 10px 0 12px; }
  .hbs-brand-topbar__links { justify-content: center; gap: 9px 14px; }
  .hbs-brand-topbar__item { gap: 6px; }
  .hbs-brand-topbar .hbs-brand-topbar__item,
  .hbs-brand-topbar .hbs-brand-topbar__address { font-size: 11px; }
  .hbs-brand-topbar__address { justify-content: center; text-align: center; }
  .hbs-brand-topbar__email { overflow-wrap: anywhere; }
  .hbs-brand-topbar__actions { gap: 8px 16px; }
  .hbs-brand-topbar__socials { gap: 10px; }
  .hbs-brand-topbar .hbs-brand-topbar__office { padding: 7px 11px; font-size: 11px; }
}

/* Barra institucional con logotipos de entidades del Grupo CoopHalal. */
.hbs-group-strip {
  width: 100%;
  background: linear-gradient(180deg,#f8fbf9,#fff);
  border-top: 1px solid var(--hbs-brand-border);
  border-bottom: 1px solid var(--hbs-brand-border);
  padding: 30px 0 32px;
}
.hbs-group-strip__inner {
  width: min(100% - 42px, 1310px);
  margin-inline: auto;
}
.hbs-group-strip__heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 20px;
}
.hbs-group-strip__eyebrow {
  display: inline-block;
  color: #187449;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .13em;
  margin-bottom: 7px;
}
.hbs-group-strip h2 {
  font-size: clamp(1.35rem, 2.1vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--hbs-brand-dark);
  margin: 0;
}
.hbs-group-strip__heading p {
  color: #63786b;
  font-size: 13px;
  line-height: 1.6;
  max-width: 355px;
  margin: 0;
}
.hbs-group-strip__list {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 12px;
}
.hbs-group-strip__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e0ece3;
  background: #fff;
  border-radius: 15px;
  height: 116px;
  padding: 13px 17px;
  transition: border-color .2s ease,transform .2s ease,box-shadow .2s ease;
}
.hbs-group-strip__logo img {
  display: block;
  width: 100%;
  height: 83px;
  object-fit: contain;
}
.hbs-group-strip a.hbs-group-strip__logo:hover {
  border-color: #a5cdb5;
  transform: translateY(-2px);
  box-shadow: 0 7px 19px rgba(19,73,47,.07);
}


/* Pie institucional: verde estable, sin barra azul ni contacto duplicado. */
footer.ct-footer, #footer { background: var(--hbs-brand-dark); }
footer.ct-footer [data-row], #footer [data-row] { background-color: transparent; }
footer.ct-footer,
footer.ct-footer h2,
footer.ct-footer h3,
footer.ct-footer h4,
#footer,
#footer h2,
#footer h3,
#footer h4 { color: #fff; }
footer.ct-footer a, #footer a { color: #e1f1e7; }
footer.ct-footer a:hover, #footer a:hover { color: #fff; }
footer.ct-footer p, #footer p { color: #d2e8da; }

/* Espaciado razonable, sin los grandes márgenes del tema original. */
body:not(.woocommerce-page) .entry-content > .alignfull { margin-inline: 0; }
.entry-content a:not(.wp-element-button) { text-underline-offset: 3px; }

@media(max-width: 1050px) {
  .hbs-group-strip__list { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .hbs-group-strip__heading { align-items: start; }
}
@media(max-width: 640px) {
  .hbs-group-strip { padding-block: 25px; }
  .hbs-group-strip__inner { width: min(100% - 26px, 1310px); }
  .hbs-group-strip__heading { display: block; }
  .hbs-group-strip__heading p { margin-top: 10px; max-width: none; }
  .hbs-group-strip__list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .hbs-group-strip__logo { height: 104px; padding: 12px; }
  .hbs-group-strip__logo img { height: 73px; }
  .hbs-group-strip__list > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  .hbs-group-strip__logo,.hbs-brand-topbar__office { transition:none; }
}

/* Versión final — tarjetas institucionales con foco accesible y logotipos nítidos. */
.hbs-group-strip a.hbs-group-strip__logo:focus-visible {
  outline: 3px solid var(--hbs-brand-green);
  outline-offset: 3px;
}
.hbs-group-strip__logo img { image-rendering: auto; }
@media (hover:none) {
  .hbs-group-strip a.hbs-group-strip__logo:hover {transform:none;box-shadow:none;}
}
