/*
Theme Name: ChipCrono Institucional
Theme URI: https://www.chipcrono.com.br/
Author: ChipCrono
Description: Tema institucional para ChipCrono Cronometragem Esportiva, com botão para acesso ao sistema externo.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: chipcrono
*/

:root {
  --bg: #f7fafb;
  --surface: #ffffff;
  --text: #101827;
  --muted: #667282;
  --line: #dbeaf0;
  --gold: #f6a400;
  --gold-dark: #cf7c00;
  --gold-soft: #fff4d8;
  --cyan: #00a8d8;
  --cyan-dark: #006ba6;
  --cyan-soft: #e7f8ff;
  --green: #14845c;
  --shadow: 0 18px 50px rgba(12, 42, 62, 0.09);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0 clamp(18px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(12, 42, 62, 0.06);
  backdrop-filter: blur(18px);
}

.site-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--gold), var(--cyan));
}

.site-header-inner,
.section-inner,
.footer-inner {
  width: min(100%, 1160px);
  margin: 0 auto;
}

.site-header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 174px;
}

.brand img {
  width: 172px;
  max-height: 52px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  margin: 0 auto;
  padding: 4px;
  color: #263446;
  background: #f8fcff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.site-nav li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav .menu-item {
  display: inline-flex;
}

.site-nav a:hover {
  color: var(--cyan-dark);
  background: var(--cyan-soft);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(12, 42, 62, 0.08);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cyan-dark);
  border-radius: 999px;
  transition: transform 160ms ease, opacity 160ms ease;
}

.site-header.is-menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.is-menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  color: var(--cyan-dark);
  background: #fff;
  border: 1px solid rgba(0, 168, 216, 0.34);
  border-radius: var(--radius);
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.wp-block-button__link:hover {
  color: var(--cyan-dark);
  background: var(--cyan-soft);
  border-color: var(--cyan);
  box-shadow: 0 12px 24px rgba(0, 168, 216, 0.16);
  transform: translateY(-1px);
}

.button.secondary {
  color: var(--cyan-dark);
  background: #fff;
  border-color: var(--line);
}

.button.secondary:hover {
  color: var(--cyan-dark);
  background: var(--cyan-soft);
  border-color: var(--cyan);
}

.button.whatsapp-button {
  color: #fff;
  background: #20b857;
  border-color: #20b857;
}

.button.whatsapp-button:hover {
  color: #fff;
  background: #159a45;
  border-color: #159a45;
  box-shadow: 0 12px 24px rgba(32, 184, 87, 0.2);
}

.hero {
  display: grid;
  min-height: min(720px, calc(100vh - 78px));
  padding: 72px clamp(18px, 5vw, 64px) 38px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(4, 20, 30, 0.82), rgba(4, 20, 30, 0.58) 48%, rgba(4, 20, 30, 0.18)),
    var(--hero-image) center / cover no-repeat;
}

.hero-inner {
  display: grid;
  align-content: center;
  width: min(100%, 1160px);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 0.98;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.04;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.lead {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.section {
  padding: 62px clamp(18px, 5vw, 64px);
}

.section.alt {
  background: #fff;
}

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

.section-heading p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
}

.service-grid,
.results-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-card,
.result-card,
.stat-card,
.contact-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.service-card {
  display: grid;
  gap: 12px;
  min-height: 220px;
  padding: 24px;
}

.service-card span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--cyan-dark);
  background: var(--cyan-soft);
  border-radius: var(--radius);
  font-size: 22px;
  font-weight: 900;
}

.service-card p,
.result-card p,
.contact-panel p {
  color: var(--muted);
}

.stats-grid {
  margin-top: 24px;
}

.stat-card {
  padding: 22px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  color: var(--cyan-dark);
  font-size: 34px;
  line-height: 1;
}

.feature-band {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(6, 28, 42, 0.94), rgba(6, 58, 78, 0.9)),
    url("assets/images/servico-trail.png") center / cover no-repeat;
}

.feature-band .section-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 28px;
  align-items: center;
}

.feature-band p,
.feature-band li {
  color: rgba(255, 255, 255, 0.82);
}

.feature-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  font-weight: 800;
}

.feature-icon {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 22px;
  line-height: 1;
}

.result-card {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.result-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  padding: 9px 12px;
  color: var(--cyan-dark);
  background: transparent;
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
  font-weight: 900;
}

.result-card a:hover {
  color: #fff;
  background: var(--cyan);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 22px;
  align-items: start;
}

.contact-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.contact-item {
  display: grid;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.contact-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-item strong,
.contact-item a {
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 900;
}

.site-footer {
  padding: 44px clamp(18px, 5vw, 64px) 28px;
  background: #eeeeef;
  border-top: 1px solid #d8dddf;
}

.footer-grid,
.footer-bottom {
  width: min(100%, 1190px);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(150px, 0.9fr));
  gap: 32px;
  align-items: start;
}

.footer-about {
  display: grid;
  gap: 14px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
}

.footer-brand img {
  width: 180px;
}

.footer-about p {
  max-width: 250px;
  margin-bottom: 0;
  color: #101827;
}

.footer-column {
  display: grid;
  gap: 12px;
  align-content: start;
}

.footer-column strong {
  margin-bottom: 4px;
  color: #050608;
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.footer-column a,
.footer-column span {
  color: #050608;
  font-weight: 500;
}

.footer-column a:hover {
  color: var(--cyan-dark);
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 24px;
  color: #050608;
  border-top: 1px solid #d2d6d8;
  font-size: 14px;
}

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
}

.whatsapp-float img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 12px 18px rgba(0, 60, 48, 0.22));
}

@media (max-width: 960px) {
  .site-header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand action"
      "nav nav";
    gap: 10px 18px;
    padding: 10px 0;
  }

  .brand {
    grid-area: brand;
  }

  .site-nav {
    grid-area: nav;
    justify-content: flex-start;
    width: 100%;
    margin: 0;
    overflow-x: auto;
  }

  .header-action {
    grid-area: action;
  }

  .service-grid,
  .results-grid,
  .feature-band .section-inner,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header-inner,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand toggle"
      "nav nav"
      "action action";
    align-items: center;
  }

  .menu-toggle {
    display: inline-flex;
    grid-area: toggle;
    justify-self: end;
  }

  .site-nav {
    display: none;
    grid-template-columns: 1fr;
    font-size: 13px;
    width: 100%;
    padding: 8px;
    background: #fff;
    border-radius: var(--radius);
  }

  .site-nav a {
    justify-content: flex-start;
    padding-right: 8px;
    padding-left: 8px;
  }

  .site-header.is-menu-open .site-nav {
    display: grid;
  }

  .button,
  .header-action {
    width: 100%;
  }

  .header-action {
    display: none;
  }

  .site-header.is-menu-open .header-action {
    display: inline-flex;
  }

  .hero {
    min-height: 640px;
    padding-top: 48px;
  }

  .section-heading {
    display: flex;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .whatsapp-float {
    right: 14px;
    bottom: 14px;
    width: 52px;
    height: 52px;
  }
}

/* Home integrada */
h1 {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 600;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 600;
  letter-spacing: 0;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: min(680px, calc(100vh - 78px));
  color: #fff;
  background: #061c2a;
}

.hero-slides {
  position: relative;
  min-height: inherit;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  min-height: inherit;
  padding: 72px clamp(18px, 5vw, 64px) 54px;
  background:
    linear-gradient(180deg, rgba(4, 20, 30, 0.66), rgba(4, 20, 30, 0.82)),
    var(--hero-image) center / cover no-repeat;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 520ms ease, transform 720ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-inner.centered {
  justify-items: center;
  text-align: center;
}

.hero-inner.centered h1,
.hero-inner.centered .lead {
  margin-right: auto;
  margin-left: auto;
}

.centered-actions {
  justify-content: center;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-arrow:hover {
  color: var(--cyan-dark);
  background: #fff;
  border-color: #fff;
}

.hero-arrow.prev {
  left: clamp(14px, 3vw, 34px);
}

.hero-arrow.next {
  right: clamp(14px, 3vw, 34px);
}

.hero-dots {
  position: absolute;
  right: 0;
  bottom: 24px;
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 9px;
}

.hero-dots button {
  width: 10px;
  min-height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.48);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 28px;
  background: var(--cyan);
}

.section-heading.centered {
  display: grid;
  justify-content: center;
  text-align: center;
}

.section-heading.centered > div {
  max-width: 820px;
  margin: 0 auto;
}

.section-heading.centered p {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
}

.home-events {
  position: relative;
  z-index: 2;
}

.event-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.home-event-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.home-event-cover {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #061c2a;
}

.home-event-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.home-event-card:hover .home-event-cover img {
  transform: scale(1.035);
}

.home-event-body {
  display: grid;
  gap: 10px;
  padding: 16px;
  text-align: center;
}

.home-event-body h3 {
  margin-bottom: 0;
  font-size: 20px;
  font-weight: 600;
}

.home-event-body p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 700;
}

.home-event-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-event-topline span,
.home-event-sport {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-event-topline strong {
  color: var(--cyan-dark);
  text-align: right;
}

.external-event-pill {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 9px;
  color: var(--cyan-dark);
  background: var(--cyan-soft);
  border: 1px solid #bcefff;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: var(--surface-soft);
  border: 1px dashed #c4dfe8;
  border-radius: var(--radius);
}

.service-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 22px;
}

.media-card {
  display: grid;
  gap: 12px;
  align-content: start;
  margin: 0;
  padding: 14px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.media-card img,
.media-card video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: #061c2a;
}

.video-card video {
  aspect-ratio: 16 / 10;
}

.media-card figcaption {
  color: var(--muted);
  font-weight: 700;
}

.service-roadmap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 10px;
  padding: 4px 0;
}

.service-step {
  display: grid;
  gap: 9px;
  min-height: 232px;
  padding: 22px;
  background: transparent;
  border: 1px solid rgba(0, 107, 166, 0.32);
  border-radius: var(--radius);
  text-align: left;
}

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

.service-icon {
  color: var(--cyan-dark);
  font-size: 34px;
  line-height: 1;
}

.service-step strong {
  color: var(--cyan-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.service-step h3 {
  margin-bottom: 0;
  font-size: 19px;
  font-weight: 600;
}

.service-step p {
  max-width: 300px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.contact-copy {
  text-align: left;
}

.contact-copy .lead {
  margin-left: 0;
}

.contact-copy .hero-actions {
  justify-content: flex-start;
}

@media (max-width: 960px) {
  .event-preview-grid,
  .service-showcase,
  .service-roadmap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .hero-slider {
    min-height: 620px;
  }

  .hero-slide {
    padding: 54px 44px 58px;
  }

  .hero-arrow {
    display: none;
  }

  .event-preview-grid,
  .service-showcase,
  .service-roadmap {
    grid-template-columns: 1fr;
  }

  .service-roadmap {
    gap: 10px;
    padding-top: 8px;
  }

  .service-step {
    min-height: 0;
    padding: 10px 8px 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-about p {
    max-width: none;
  }

  .video-card {
    grid-column: auto;
  }

  .home-event-topline {
    align-items: center;
    flex-direction: column;
  }

  .home-event-topline strong {
    text-align: center;
  }
}
