/*
Theme Name: Apex Spherefix v2
Theme URI: https://apexgeosolutions.com.br
Author: Apex Geo Solutions
Description: B2B dealer website theme for Spherefix GNSS, mapping and survey equipment in Brazil.
Version: 1.0.1
Text Domain: apex-spherefix
*/

:root {
  --bg: #051721;
  --panel: rgba(10, 35, 45, 0.78);
  --panel-strong: rgba(5, 21, 30, 0.94);
  --line: rgba(255, 255, 255, 0.14);
  --text: #eef8f6;
  --muted: #aec5c1;
  --gold: #e4b22f;
  --gold-2: #f7d74f;
  --green: #25d366;
  --teal: #34d2b1;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(228, 178, 47, 0.14), transparent 28rem),
    radial-gradient(circle at 82% 16%, rgba(37, 211, 102, 0.12), transparent 24rem),
    linear-gradient(135deg, #03131e 0%, #062431 48%, #061a17 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 22px;
  backdrop-filter: blur(18px);
  background: rgba(3, 16, 25, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav-shell {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 210px 1fr minmax(430px, 0.9fr);
  gap: 22px;
  align-items: center;
}

.brand { display: inline-flex; align-items: center; min-width: 0; }
.brand img { width: 190px; max-height: 42px; object-fit: contain; }

.main-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.main-nav > a,
.mega-trigger {
  color: #f4faf7;
  border: 0;
  background: transparent;
  padding: 11px 16px;
  border-radius: 999px;
  font-weight: 750;
  font-size: 14px;
  cursor: pointer;
}

.main-nav > a:hover,
.mega-wrap:hover .mega-trigger,
.mega-trigger:focus-visible {
  background: rgba(228, 178, 47, 0.16);
  color: var(--gold-2);
}

.mega-wrap { position: relative; }
.mega-wrap::after {
  content: "";
  position: absolute;
  left: -60px;
  right: -60px;
  top: 100%;
  height: 24px;
}

.mega-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: min(1040px, calc(100vw - 40px));
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 18px;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  background: linear-gradient(145deg, rgba(8, 31, 42, 0.92), rgba(9, 38, 33, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.mega-wrap:hover .mega-menu,
.mega-wrap:focus-within .mega-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-feature {
  min-height: 310px;
  padding: 22px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
}

.mega-feature img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  margin: 8px 0 12px;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.35));
}

.mega-feature-products {
  display: grid;
  gap: 10px;
  margin: 10px 0 4px;
}

.mega-feature-product {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 102px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.05);
}

.mega-feature-product:hover {
  border-color: rgba(228, 178, 47, 0.36);
  background: rgba(228, 178, 47, 0.09);
}

.mega-feature-product img {
  width: 76px;
  height: 82px;
  margin: 0;
}

.mega-feature-product strong {
  display: block;
  color: var(--gold-2);
  font-size: 18px;
}

.mega-feature-product small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mega-col h3,
.mega-feature h3 {
  margin: 0 0 10px;
  color: var(--gold-2);
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mega-col a {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: #eef8f6;
}

.mega-col a:hover {
  border-color: rgba(228, 178, 47, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.mega-col img {
  width: 58px;
  height: 48px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid rgba(228, 178, 47, 0.28);
  background:
    linear-gradient(145deg, rgba(7, 25, 34, 0.86), rgba(8, 38, 33, 0.68)),
    rgba(0, 0, 0, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 28px rgba(0, 0, 0, 0.2);
}

.language-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #f3df95;
  font-size: 12px;
  font-weight: 850;
  border: 1px solid transparent;
}

.language-switcher a:hover,
.language-switcher a.active {
  color: #12170e;
  background: linear-gradient(135deg, #f6df74, var(--gold-2));
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 22px rgba(228, 178, 47, 0.24);
}

.search-form {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  height: 42px;
  padding: 0 6px 0 14px;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
}

.search-form input {
  min-width: 0;
  width: 100%;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
}

.search-form button,
.pill-btn {
  border: 0;
  border-radius: 999px;
  color: #10210e;
  background: linear-gradient(135deg, var(--gold-2), #29df76);
  font-weight: 850;
  padding: 10px 15px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(228, 178, 47, 0.22);
}

.mobile-toggle { display: none; }

.section,
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 22px;
}

.hero {
  min-height: 720px;
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: 50px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  color: var(--teal);
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 13px;
}

h1, h2, h3 { line-height: 1.05; margin: 0; }
h1 { font-size: clamp(48px, 6vw, 86px); letter-spacing: 0; max-width: 760px; }
h2 { font-size: clamp(34px, 4vw, 58px); max-width: 760px; }
h3 { font-size: 22px; }
p { color: var(--muted); margin: 0; }

.lead { margin-top: 22px; font-size: 18px; max-width: 680px; }
.hero-actions, .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.ghost-btn {
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  color: #f8fffb;
  background: rgba(255,255,255,.06);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
}
.contact-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}
.whatsapp-btn {
  border-color: rgba(37, 211, 102, .38);
  background: linear-gradient(135deg, rgba(37, 211, 102, .16), rgba(255, 255, 255, .05));
}
.ghost-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(228, 178, 47, .42);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

.hero-visual {
  position: relative;
  min-height: 500px;
  display: grid;
  place-items: center;
}

.hero-card,
.glass-card,
.product-card,
.category-card,
.article-card,
.contact-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 30px;
  width: min(520px, 100%);
}

.hero-card img {
  height: 360px;
  width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 30px 45px rgba(0,0,0,.45));
}

.hero-card .product-family-img {
  height: 400px;
  object-fit: contain;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.metric {
  padding: 14px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
}
.metric strong { display: block; color: var(--gold-2); font-size: 22px; }
.metric span { display: block; color: var(--muted); font-size: 12px; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.section-head p { max-width: 520px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.category-card,
.product-card,
.article-card,
.contact-card,
.glass-card {
  padding: 22px;
}

.category-card img,
.product-card img {
  width: 100%;
  height: 190px;
  object-fit: contain;
  margin-bottom: 16px;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
}

.category-card:hover,
.product-card:hover,
.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(228, 178, 47, 0.42);
}

.product-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.product-facts div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
}
.product-facts strong {
  display: block;
  margin-top: 6px;
  color: #fffef2;
  font-size: 22px;
  line-height: 1.15;
}

.feature-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.feature-list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-2), var(--green));
  box-shadow: 0 0 14px rgba(37, 211, 102, .28);
}
.download-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.tag {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(228, 178, 47, 0.12);
  border: 1px solid rgba(228, 178, 47, 0.24);
  font-size: 12px;
  font-weight: 800;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
}
.spec-table th,
.spec-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.spec-table th { color: var(--gold-2); width: 230px; }

.page-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 78px 22px 38px;
}
.page-hero h1 { font-size: clamp(42px, 5vw, 74px); }

.timeline {
  display: flex;
  overflow-x: auto;
  gap: 18px;
  padding: 8px 0 18px;
  scroll-snap-type: x mandatory;
}
.timeline-item {
  min-width: 300px;
  scroll-snap-align: start;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
}
.timeline-item img {
  height: 160px;
  width: 100%;
  object-fit: contain;
  margin-top: 12px;
}

.photo-wall img,
.certificate-wall img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.certificate-wall img { object-fit: contain; background: #fff; padding: 10px; }

.feedback-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.feedback-gallery figure,
.certificate-strip figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.feedback-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 220ms ease;
}

.feedback-gallery figure:hover img {
  transform: scale(1.04);
}

.feedback-gallery figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px 12px 12px;
  color: #fff9df;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

.certificate-showcase {
  position: relative;
  min-height: 360px;
  margin-bottom: 24px;
  border-radius: 12px;
  border: 1px solid rgba(228, 178, 47, 0.26);
  overflow: hidden;
  background:
    radial-gradient(circle at 48% 38%, rgba(228, 178, 47, 0.20), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.certificate-layer {
  position: absolute;
  width: min(360px, 28vw);
  min-width: 230px;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.35);
  transition: transform 180ms ease, z-index 180ms ease;
}

.certificate-layer:hover {
  z-index: 10;
  transform: translateY(-8px) rotate(0deg) scale(1.05);
}

.certificate-layer img {
  width: 100%;
  height: 230px;
  object-fit: contain;
}

.certificate-layer.layer-0 { left: 8%; top: 74px; transform: rotate(-8deg); opacity: .72; }
.certificate-layer.layer-1 { left: 23%; top: 48px; transform: rotate(4deg); }
.certificate-layer.layer-2 { left: 39%; top: 86px; transform: rotate(-3deg); z-index: 3; }
.certificate-layer.layer-3 { right: 22%; top: 54px; transform: rotate(5deg); }
.certificate-layer.layer-4 { right: 8%; top: 80px; transform: rotate(8deg); opacity: .78; }

.certificate-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.certificate-strip img {
  width: 100%;
  height: 190px;
  object-fit: contain;
  background: #fff;
  padding: 12px;
}

.certificate-strip figcaption {
  padding: 10px 12px 12px;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 850;
}

.wp-post-content h2 {
  margin: 30px 0 12px;
}

.wp-post-content p {
  margin: 12px 0;
}

.post-featured-image {
  margin: 0 0 22px;
  min-height: 280px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.045);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.post-featured-image img {
  width: min(100%, 760px);
  height: 390px;
  object-fit: contain;
  padding: 22px;
}

.inquiry-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.inquiry-form label { color: #dff7ed; font-weight: 750; font-size: 13px; }
.inquiry-form input,
.inquiry-form textarea,
.inquiry-form select {
  margin-top: 6px;
  width: 100%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 13px;
  outline: 0;
}
.inquiry-form textarea,
.span-2 { grid-column: span 2; }
.inquiry-form small { color: #ffcc8a; display: none; }
.inquiry-form .invalid small { display: block; }
.contact-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}

.map-frame {
  width: 100%;
  min-height: 370px;
  border: 0;
  border-radius: 8px;
  filter: contrast(1.05) saturate(1.05);
}

.contact-float,
.whatsapp-float {
  position: fixed;
  right: 22px;
  z-index: 80;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #25d366;
  box-shadow: 0 18px 34px rgba(37, 211, 102, .35);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.whatsapp-float { bottom: 22px; }
.email-float {
  bottom: 94px;
  color: var(--gold-2);
  background: linear-gradient(145deg, rgba(8, 31, 42, .96), rgba(14, 49, 43, .92));
  border: 1px solid rgba(228, 178, 47, .34);
  box-shadow: 0 18px 34px rgba(0, 0, 0, .32);
}
.email-float .contact-icon {
  width: 29px;
  height: 29px;
}
.contact-float:hover { transform: scale(1.06); box-shadow: 0 22px 44px rgba(228, 178, 47, .28); }
.whatsapp-float:hover { transform: scale(1.06); box-shadow: 0 22px 44px rgba(37, 211, 102, .48); }

.site-footer {
  margin-top: 60px;
  padding: 40px 22px;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,.22);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 30px;
}
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.footer-links a { display: block; color: var(--muted); margin: 7px 0; }

@media (max-width: 980px) {
  .nav-shell { grid-template-columns: 1fr auto; }
  .mobile-toggle { display: inline-flex; border: 1px solid var(--line); background: rgba(255,255,255,.08); color: var(--text); border-radius: 8px; padding: 10px 12px; }
  .main-nav,
  .nav-actions { grid-column: 1 / -1; width: 100%; justify-content: flex-start; display: none; }
  .nav-shell.open .main-nav,
  .nav-shell.open .nav-actions { display: flex; }
  .nav-actions { flex-wrap: wrap; }
  .search-form { flex: 1 1 260px; }
  .main-nav { overflow-x: auto; border-radius: 8px; }
  .mega-menu { position: fixed; left: 20px; right: 20px; top: 104px; transform: none; width: auto; grid-template-columns: 1fr; max-height: 72vh; overflow: auto; }
  .mega-wrap:hover .mega-menu,
  .mega-wrap:focus-within .mega-menu { transform: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 54px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; }
  .feedback-gallery { grid-template-columns: repeat(2, 1fr); }
  .certificate-strip { grid-template-columns: repeat(2, 1fr); }
  .certificate-showcase { min-height: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 16px; }
  .certificate-layer,
  .certificate-layer.layer-0,
  .certificate-layer.layer-1,
  .certificate-layer.layer-2,
  .certificate-layer.layer-3,
  .certificate-layer.layer-4 {
    position: static;
    width: auto;
    min-width: 0;
    transform: none;
    opacity: 1;
  }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header { padding: 10px 14px; }
  .brand img { width: 165px; }
  .section, .hero, .page-hero { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 44px; }
  .grid-4, .grid-3, .grid-2, .metric-row, .footer-links { grid-template-columns: 1fr; }
  .feedback-gallery,
  .certificate-strip,
  .certificate-showcase { grid-template-columns: 1fr; }
  .feedback-gallery img { height: 260px; }
  .product-facts { grid-template-columns: 1fr 1fr; }
  .inquiry-form { grid-template-columns: 1fr; }
  .inquiry-form textarea, .span-2 { grid-column: auto; }
  .hero-card img { height: 280px; }
  .section-head { display: block; }
  .whatsapp-float { right: 16px; bottom: 16px; width: 56px; height: 56px; }
  .email-float { right: 16px; bottom: 82px; width: 56px; height: 56px; }
}
