/*
Theme Name: Soma Representações Atualizado
Theme URI: https://somarepresentacoes.online
Author: Soma Representações
Description: Tema institucional personalizado para a Soma Representações, com foco em nutrição animal, atendimento regional e contato por WhatsApp.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: soma-representacoes
*/

:root {
  --soma-green-950: #0b2f22;
  --soma-green-900: #103d2a;
  --soma-green-800: #18543a;
  --soma-green-700: #2d6b3b;
  --soma-lime: #9dc82f;
  --soma-lime-soft: #dceab1;
  --soma-gold: #c79d27;
  --soma-gold-dark: #9b7611;
  --soma-cream: #f7f5ed;
  --soma-white: #ffffff;
  --soma-ink: #17231d;
  --soma-muted: #66736c;
  --soma-border: #dde4df;
  --soma-shadow: 0 18px 50px rgba(11, 47, 34, 0.11);
  --soma-radius: 24px;
  --soma-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--soma-ink);
  background: var(--soma-white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; height: auto; }
a { color: var(--soma-green-800); text-decoration: none; }
a:hover { color: var(--soma-gold-dark); }
button, input, textarea, select { font: inherit; }

.container { width: min(calc(100% - 40px), var(--soma-container)); margin-inline: auto; }
.section { padding: 92px 0; }
.section--soft { background: var(--soma-cream); }
.section-heading { max-width: 720px; margin-bottom: 42px; }
.section-heading--center { text-align: center; margin-inline: auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  color: var(--soma-green-800);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--soma-gold); }
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 18px;
  color: var(--soma-green-950);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.12;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2.7rem, 6vw, 5.4rem); }
h2 { font-size: clamp(2.2rem, 4vw, 3.6rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 18px; }
.lead { color: var(--soma-muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }

.skip-link { position: absolute; left: -9999px; top: auto; }
.skip-link:focus { left: 16px; top: 16px; z-index: 9999; padding: 10px 14px; background: #fff; color: #000; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid rgba(16,61,42,.08);
  backdrop-filter: blur(14px);
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 30px rgba(11,47,34,.10); }
.header-inner { min-height: 84px; display: flex; align-items: center; gap: 28px; }
.site-branding { display: flex; align-items: center; min-width: 260px; }
.site-branding img { display: block; width: auto; max-width: 285px; max-height: 68px; object-fit: contain; }
.custom-logo-link { display: inline-flex; align-items: center; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { color: var(--soma-green-950); font-weight: 700; font-size: .95rem; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--soma-gold-dark); }
.menu-toggle { display: none; margin-left: auto; width: 46px; height: 46px; border: 0; border-radius: 12px; background: var(--soma-cream); color: var(--soma-green-950); cursor: pointer; }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after { content: ""; display: block; width: 22px; height: 2px; margin: 5px auto; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span { opacity: 0; }
.menu-toggle[aria-expanded="true"]::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"]::after { transform: translateY(-7px) rotate(-45deg); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { color: #fff; background: var(--soma-green-800); box-shadow: 0 12px 24px rgba(24,84,58,.20); }
.btn--primary:hover { color: #fff; background: var(--soma-green-950); }
.btn--gold { color: var(--soma-green-950); background: var(--soma-gold); }
.btn--gold:hover { color: var(--soma-green-950); background: #d9b650; }
.btn--ghost { color: var(--soma-green-950); background: rgba(255,255,255,.5); border-color: rgba(16,61,42,.18); }
.btn--ghost:hover { background: #fff; }
.header-cta { white-space: nowrap; }
.icon-whatsapp { width: 18px; height: 18px; fill: currentColor; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 82px 0 72px;
  background:
    radial-gradient(circle at 85% 10%, rgba(157,200,47,.28), transparent 27%),
    radial-gradient(circle at 12% 90%, rgba(199,157,39,.14), transparent 28%),
    linear-gradient(135deg, #f9fbf4 0%, #f3f5e9 48%, #e8efe1 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .25;
  background-image: linear-gradient(rgba(16,61,42,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(16,61,42,.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 64px; align-items: center; }
.hero-copy h1 strong { color: var(--soma-green-700); font-weight: inherit; }
.hero-copy .lead { max-width: 690px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 14px 24px; margin: 32px 0 0; padding: 0; list-style: none; color: var(--soma-green-900); font-size: .92rem; font-weight: 700; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before { content: "✓"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: var(--soma-green-700); font-size: .72rem; }
.hero-visual { position: relative; min-height: 500px; display: grid; place-items: center; }
.hero-orbit { position: absolute; inset: 6% 7%; border: 1px solid rgba(16,61,42,.15); border-radius: 50%; transform: rotate(-14deg); }
.hero-orbit::before, .hero-orbit::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--soma-gold); box-shadow: 0 0 0 8px rgba(199,157,39,.14); }
.hero-orbit::before { top: 17%; left: 4%; }
.hero-orbit::after { right: 1%; bottom: 24%; background: var(--soma-lime); box-shadow: 0 0 0 8px rgba(157,200,47,.15); }
.hero-card { position: relative; z-index: 2; width: min(100%, 470px); padding: 42px; border: 1px solid rgba(255,255,255,.9); border-radius: 34px; background: rgba(255,255,255,.88); box-shadow: var(--soma-shadow); backdrop-filter: blur(16px); }
.hero-card img { width: 100%; max-height: 150px; object-fit: contain; }
.hero-card-divider { height: 1px; margin: 28px 0; background: linear-gradient(90deg, transparent, var(--soma-gold), transparent); }
.hero-card-label { margin-bottom: 8px; color: var(--soma-muted); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero-card-value { color: var(--soma-green-950); font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 700; }
.hero-badge { position: absolute; right: -22px; bottom: 35px; display: grid; place-items: center; width: 112px; height: 112px; padding: 12px; border: 7px solid rgba(255,255,255,.92); border-radius: 50%; color: #fff; background: var(--soma-green-800); box-shadow: 0 14px 35px rgba(11,47,34,.22); text-align: center; }
.hero-badge strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 2.1rem; line-height: 1; }
.hero-badge span { display: block; margin-top: 5px; font-size: .7rem; font-weight: 800; line-height: 1.1; text-transform: uppercase; }

.stats-wrap { position: relative; z-index: 5; margin-top: -28px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 22px; background: var(--soma-green-950); box-shadow: 0 20px 45px rgba(11,47,34,.2); overflow: hidden; }
.stat { padding: 28px 34px; color: #fff; }
.stat + .stat { border-left: 1px solid rgba(255,255,255,.12); }
.stat strong { display: block; margin-bottom: 4px; color: var(--soma-lime); font-family: Georgia, "Times New Roman", serif; font-size: 2rem; }
.stat span { color: rgba(255,255,255,.78); font-size: .9rem; }

.about-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 74px; align-items: center; }
.about-visual { position: relative; min-height: 500px; border-radius: 32px; background: linear-gradient(145deg, var(--soma-green-950), var(--soma-green-700)); overflow: hidden; box-shadow: var(--soma-shadow); }
.about-visual::before { content: ""; position: absolute; width: 460px; height: 460px; right: -160px; top: -150px; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; box-shadow: 0 0 0 60px rgba(255,255,255,.03), 0 0 0 120px rgba(255,255,255,.02); }
.field-lines { position: absolute; left: -9%; right: -9%; bottom: -15px; height: 57%; transform: perspective(360px) rotateX(62deg); transform-origin: bottom; background: repeating-linear-gradient(90deg, transparent 0 42px, rgba(157,200,47,.5) 43px 46px); }
.field-lines::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 44px, rgba(255,255,255,.12) 45px 47px); }
.about-seal { position: absolute; inset: 48px auto auto 44px; max-width: 280px; color: #fff; }
.about-seal .mini { color: var(--soma-lime); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.about-seal strong { display: block; margin-top: 12px; font-family: Georgia, "Times New Roman", serif; font-size: 2.4rem; line-height: 1.12; }
.values { display: grid; gap: 14px; margin-top: 28px; }
.value-item { display: grid; grid-template-columns: 48px 1fr; gap: 15px; align-items: start; padding: 18px; border: 1px solid var(--soma-border); border-radius: 16px; background: #fff; }
.value-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: var(--soma-green-950); background: var(--soma-lime-soft); font-weight: 900; }
.value-item h3 { margin: 0 0 5px; font-size: 1.08rem; font-family: inherit; letter-spacing: 0; }
.value-item p { margin: 0; color: var(--soma-muted); font-size: .93rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { position: relative; padding: 30px; border: 1px solid var(--soma-border); border-radius: 22px; background: #fff; box-shadow: 0 10px 25px rgba(11,47,34,.05); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-5px); border-color: rgba(45,107,59,.35); box-shadow: var(--soma-shadow); }
.card-number { display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; margin-bottom: 22px; border-radius: 15px; color: #fff; background: var(--soma-green-800); font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; }
.card p { color: var(--soma-muted); }

.brand-panel { display: grid; grid-template-columns: 1.08fr .92fr; gap: 46px; align-items: center; padding: 52px; border-radius: 30px; color: #fff; background: linear-gradient(135deg, var(--soma-green-950), var(--soma-green-800)); box-shadow: var(--soma-shadow); }
.brand-panel h2, .brand-panel h3 { color: #fff; }
.brand-panel p { color: rgba(255,255,255,.75); }
.brand-mark { display: grid; place-items: center; min-height: 230px; padding: 34px; border: 1px solid rgba(255,255,255,.14); border-radius: 24px; background: rgba(255,255,255,.07); text-align: center; }
.brand-mark span { color: var(--soma-lime); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.brand-mark strong { display: block; margin-top: 12px; color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.4rem, 5vw, 4.4rem); line-height: 1; }

.area-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.area-pills { display: flex; flex-wrap: wrap; gap: 12px; }
.area-pill { display: inline-flex; align-items: center; gap: 9px; padding: 12px 16px; border: 1px solid var(--soma-border); border-radius: 999px; background: #fff; color: var(--soma-green-950); font-weight: 750; box-shadow: 0 6px 20px rgba(11,47,34,.05); }
.area-pill::before { content: "●"; color: var(--soma-gold); font-size: .65rem; }

.cta-box { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; padding: 50px 54px; border-radius: 30px; background: var(--soma-lime); }
.cta-box::after { content: ""; position: absolute; width: 280px; height: 280px; right: -100px; top: -120px; border: 1px solid rgba(16,61,42,.16); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.12), 0 0 0 90px rgba(255,255,255,.08); }
.cta-box > * { position: relative; z-index: 2; }
.cta-box h2 { margin-bottom: 10px; font-size: clamp(2rem, 4vw, 3.2rem); }
.cta-box p { margin: 0; color: rgba(11,47,34,.78); }

.page-hero { padding: 70px 0; background: linear-gradient(135deg, var(--soma-cream), #edf3e6); }
.page-hero h1 { max-width: 850px; font-size: clamp(2.5rem, 5vw, 4.5rem); }
.content-area { padding: 70px 0 95px; }
.entry-content { max-width: 860px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { margin-top: 42px; }
.entry-content h3 { margin-top: 30px; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content .wp-block-button__link { border-radius: 999px; background: var(--soma-green-800); }
.post-list { display: grid; gap: 24px; }
.post-card { padding: 28px; border: 1px solid var(--soma-border); border-radius: 20px; }

.site-footer { color: rgba(255,255,255,.76); background: var(--soma-green-950); }
.footer-main { display: grid; grid-template-columns: 1.25fr .75fr .9fr; gap: 46px; padding: 66px 0 48px; }
.footer-logo { width: min(100%, 330px); padding: 14px; border-radius: 14px; background: #fff; }
.footer-title { margin-bottom: 16px; color: #fff; font-family: inherit; font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li + li { margin-top: 8px; }
.footer-links a { color: rgba(255,255,255,.76); }
.footer-links a:hover { color: var(--soma-lime); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.10); font-size: .86rem; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.alignwide { max-width: 1180px; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }

@media (max-width: 980px) {
  body.admin-bar .site-header { top: 46px; }
  .header-cta { display: none; }
  .menu-toggle { display: block; }
  .primary-nav { position: absolute; left: 20px; right: 20px; top: calc(100% + 8px); display: none; margin: 0; padding: 18px; border: 1px solid var(--soma-border); border-radius: 18px; background: #fff; box-shadow: var(--soma-shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 4px; }
  .primary-nav a { display: block; padding: 11px 8px; }
  .hero-grid, .about-grid, .brand-panel, .area-layout { grid-template-columns: 1fr; }
  .hero-grid { gap: 30px; }
  .hero-visual { min-height: 430px; }
  .about-grid { gap: 38px; }
  .about-visual { min-height: 390px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-main > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .container { width: min(calc(100% - 28px), var(--soma-container)); }
  .section { padding: 68px 0; }
  .header-inner { min-height: 72px; gap: 14px; }
  .site-branding { min-width: 0; }
  .site-branding img { max-width: 225px; max-height: 54px; }
  .hero { padding: 56px 0 54px; }
  .hero-card { padding: 28px; }
  .hero-badge { right: -8px; bottom: 20px; width: 96px; height: 96px; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid rgba(255,255,255,.12); }
  .cards { grid-template-columns: 1fr; }
  .brand-panel { padding: 32px 24px; }
  .cta-box { grid-template-columns: 1fr; padding: 36px 26px; }
  .cta-box .btn { justify-self: start; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-main > :first-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 520px) {
  h1 { font-size: 2.6rem; }
  .site-branding img { max-width: 190px; }
  .hero-actions .btn { width: 100%; }
  .hero-visual { min-height: 360px; }
  .hero-card-value { font-size: 1.55rem; }
  .about-seal { inset: 34px 28px auto 28px; }
}

/* === Melhorias v1.1: cabeçalho mais forte, logo destacada e contraste maior === */
.site-title,
.site-description,
.wp-block-site-title,
.wp-block-site-tagline,
.site-branding .site-title,
.site-branding .site-description {
  display: none !important;
}

.site-header {
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid rgba(16,61,42,.10);
  box-shadow: 0 8px 26px rgba(11,47,34,.05);
}

.site-branding {
  min-width: 300px;
}

.site-branding a,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.site-branding img,
.custom-logo {
  width: auto;
  max-width: 360px;
  max-height: 84px;
  object-fit: contain;
}

.primary-nav a {
  color: var(--soma-green-900);
  font-weight: 800;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
  color: var(--soma-green-700);
}

.header-cta {
  color: #fff;
  background: linear-gradient(135deg, var(--soma-green-800), var(--soma-green-700));
  box-shadow: 0 12px 26px rgba(24,84,58,.18);
}

.header-cta:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--soma-green-950), var(--soma-green-800));
}

@media (max-width: 980px) {
  .site-branding { min-width: 0; }
  .site-branding img,
  .custom-logo { max-width: 270px; max-height: 64px; }
}

@media (max-width: 700px) {
  .site-branding img,
  .custom-logo { max-width: 220px; max-height: 56px; }
}

/* === Versão 1.2: identidade visual da marca representada === */
.hero-brand-logo {
  display: block;
  width: min(100%, 300px) !important;
  max-height: 105px !important;
  margin-top: 10px;
  object-fit: contain;
  object-position: left center;
}

.brand-mark--logo {
  min-height: 280px;
  background: rgba(255,255,255,.98);
  border-color: rgba(255,255,255,.65);
  box-shadow: 0 18px 45px rgba(0,0,0,.16);
}

.brand-mark--logo > div {
  width: 100%;
}

.brand-mark--logo span {
  display: block;
  margin-bottom: 22px;
  color: var(--soma-green-800);
}

.brand-mark--logo img {
  display: block;
  width: min(100%, 520px);
  max-height: 190px;
  margin-inline: auto;
  object-fit: contain;
}

@media (max-width: 700px) {
  .hero-brand-logo {
    max-width: 245px !important;
    max-height: 88px !important;
  }

  .brand-mark--logo {
    min-height: 220px;
    padding: 26px 22px;
  }

  .brand-mark--logo img {
    max-height: 145px;
  }
}
