/*
Theme Name: Ensaio Institucional
Theme URI: https://lovable.dev
Author: Lovable
Author URI: https://lovable.dev
Description: Tema WordPress one-page para a Ensaio Calibração e Reteste.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Text Domain: ensaio
*/

:root {
  --background: hsl(160 30% 97%);
  --foreground: hsl(160 40% 10%);
  --card: hsl(0 0% 100%);
  --card-foreground: hsl(160 40% 10%);
  --primary: hsl(163 55% 18%);
  --primary-foreground: hsl(60 80% 95%);
  --secondary: hsl(55 85% 55%);
  --secondary-foreground: hsl(163 55% 12%);
  --muted: hsl(160 15% 92%);
  --muted-foreground: hsl(160 10% 45%);
  --border: hsl(160 15% 88%);
  --hero-gradient: linear-gradient(135deg, hsl(163 55% 14%) 0%, hsl(163 55% 22%) 50%, hsl(150 40% 20%) 100%);
  /*--hero-gradient: linear-gradient(135deg, hsl(134 18% 45%) 0%, hsl(134 18% 57%) 50%, hsl(134 20% 50%) 100%);*/
  --shadow-card: 0 16px 48px hsl(163 55% 18% / 0.12);
  --shadow-card-hover: 0 24px 64px hsl(163 55% 18% / 0.18);
  --shadow-glow: 0 0 0 1px hsl(55 85% 55% / 0.1), 0 20px 60px hsl(163 55% 18% / 0.2);
  --radius: 24px;
  --container: min(1180px, calc(100% - 2rem));
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--foreground);
  background: var(--background);
  font-family: "Inter", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

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

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

button {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 6rem 0;
  scroll-margin-top: 6rem;
}

.section-divider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, hsl(55 85% 55% / 0.4), transparent);
}

.kicker {
  display: inline-block;
  color: var(--secondary);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  margin: 0.75rem 0 0;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
}

.section-header p {
  margin: 1rem auto 0;
  color: var(--muted-foreground);
  font-size: 1.05rem;
}

.text-gradient {
  background: linear-gradient(135deg, hsl(55 85% 55%), hsl(55 90% 65%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: solid #F0E033;
}

.site-header.is-scrolled {
  background: hsl(163 55% 18% / 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px hsl(163 55% 10% / 0.16);
  border-bottom: solid #F0E033;
}

.admin-bar .site-header {
  top: 32px;
}

.header-inner {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.50rem 0;
}

.brand img {
  height: 4.9rem;
  width: auto;
}

.header-nav,
.footer-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-nav a,
.footer-nav a {
  color: hsl(60 80% 95% / 0.82);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-nav a {
  color: hsl(60 80% 95% / 0.5);
}

.header-nav a:hover,
.footer-nav a:hover {
  color: hsl(60 80% 95% / 0.82);
}

.button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: 1rem;
  padding: 0.95rem 1.6rem;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease, border-color 0.25s ease;
}

.button:hover,
.wp-block-button__link:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  box-shadow: 0 16px 40px hsl(55 85% 55% / 0.22);
}

.button-primary:hover {
  filter: brightness(1.05);
}

.button-secondary {
  border: 2px solid hsl(60 80% 95% / 0.26);
  color: var(--primary-foreground);
}

.button-secondary:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.menu-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--primary-foreground);
  cursor: pointer;
}

.menu-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle.is-open .icon-open {
  display: none;
}

.menu-toggle.is-open .icon-close {
  display: block;
}

.mobile-nav {
  display: none;
  width: var(--container);
  margin: 0 auto;
  padding: 0 0 1rem;
}

.mobile-nav-panel {
  background: hsl(163 55% 18% / 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid hsl(60 80% 95% / 0.08);
  border-radius: 1.5rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-glow);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav a {
  display: block;
  text-align: center;
  color: hsl(60 80% 95% / 0.86);
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
}

.mobile-nav a:hover {
  background: hsl(60 80% 95% / 0.06);
  color: var(--secondary);
}

.mobile-nav .button {
  width: 100%;
  margin-top: 0.5rem;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--hero-gradient);
  color: var(--primary-foreground);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, hsl(163 55% 14% / 0.2), hsl(163 55% 10% / 0.35));
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-orb,
.hero-ring {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero-orb.one {
  top: 6rem;
  left: 5vw;
  width: 18rem;
  height: 18rem;
  background: hsl(55 85% 55% / 0.08);
  filter: blur(28px);
}

.hero-orb.two {
  right: 4vw;
  bottom: 5rem;
  width: 24rem;
  height: 24rem;
  background: hsl(55 85% 55% / 0.1);
  filter: blur(36px);
}

.hero-ring {
  inset: 50% auto auto 50%;
  width: min(42rem, 78vw);
  height: min(42rem, 78vw);
  border: 1px solid hsl(60 80% 95% / 0.12);
  transform: translate(-50%, -50%);
}

.hero-copy {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
  padding: 8rem 0 4rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  font-size: 0.78rem;
}

.hero-badge svg,
.scroll-indicator svg,
.contact-cta svg,
.whatsapp-float svg,
.contact-card__icon svg,
.service-card__icon svg,
.about-card__icon svg,
.gallery-close svg {
  width: 1.4rem;
  height: 1.4rem;
}

.hero h1 {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2.9rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero p {
  max-width: 760px;
  margin: 1.6rem auto 0;
  color: hsl(60 80% 95% / 0.74);
  font-size: clamp(1rem, 2vw, 1.3rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 4rem auto 0;
}

.hero-stat {
  padding: 1.4rem 1rem;
  border: 1px solid hsl(60 80% 95% / 0.1);
  border-radius: 1.4rem;
  background: hsl(60 80% 95% / 0.04);
  backdrop-filter: blur(12px);
}

.hero-stat strong {
  display: block;
  color: var(--secondary);
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.hero-stat span {
  color: hsl(60 80% 95% / 0.56);
  font-size: 0.92rem;
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 1.8rem;
  transform: translateX(-50%);
  color: hsl(60 80% 95% / 0.5);
  animation: bob 2.2s ease-in-out infinite;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 3rem;
  align-items: center;
}

.about-copy p {
  margin: 0 0 1.35rem;
  font-size: 1.05rem;
  color: var(--muted-foreground);
}

.about-copy strong {
  color: var(--foreground);
}

.about-cards {
  display: grid;
  gap: 1rem;
}

.about-card,
.contact-card {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1.35rem;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.about-card:hover,
.contact-card:hover,
.gallery-card:hover,
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.about-card:hover,
.contact-card:hover {
  border-color: hsl(55 85% 55% / 0.35);
}

.about-card__icon,
.contact-card__icon,
.service-card__icon {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.about-card__icon,
.contact-card__icon {
  background: hsl(163 55% 18% / 0.08);
  color: hsl(163 55% 18%);
}

.about-card h3,
.service-card h3,
.contact-card h3,
.gallery-caption h3,
.lightbox-copy h3 {
  margin: 0;
  font-family: "Montserrat", sans-serif;
}

.about-card p,
.contact-card p {
  margin: 0.3rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.96rem;
}

.services-section {
  background: var(--hero-gradient);
  color: var(--primary-foreground);
}

.services-section .section-header p {
  color: hsl(60 80% 95% / 0.62);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.service-card {
  padding: 1.8rem;
  border-radius: 1.5rem;
  border: 1px solid hsl(60 80% 95% / 0.1);
  background: hsl(60 80% 95% / 0.05);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.service-card:hover {
  border-color: hsl(55 85% 55% / 0.4);
  background: hsl(60 80% 95% / 0.08);
}

.service-card__icon {
  background: hsl(55 85% 55% / 0.16);
  color: var(--secondary);
  margin-bottom: 1.1rem;
}

.service-card p {
  margin: 0.65rem 0 0;
  color: hsl(60 80% 95% / 0.64);
}

.service-warning {
  margin-top: 2rem;
  text-align: center;
  color: hsl(55 85% 55% / 0.9);
  font-weight: 600;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 1.5rem;
  background: hsl(163 55% 18% / 0.08);
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.gallery-card:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  background: linear-gradient(180deg, hsl(163 55% 18% / 0.04), hsl(163 55% 18% / 0.86));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 1rem 1.2rem;
  background: hsl(163 55% 18% / 0.78);
  color: var(--primary-foreground);
  backdrop-filter: blur(10px);
  transition: opacity 0.25s ease;
}

.gallery-card:hover .gallery-caption {
  opacity: 0;
}

.gallery-overlay span,
.lightbox-copy span {
  display: inline-block;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.gallery-overlay h3,
.gallery-caption h3,
.lightbox-copy h3 {
  color: var(--primary-foreground);
  font-size: 1.15rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: hsl(0 0% 0% / 0.85);
  backdrop-filter: blur(12px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-dialog {
  position: relative;
  width: min(100%, 980px);
}

.lightbox-dialog img {
  width: 100%;
  border-radius: 1.5rem;
  box-shadow: 0 24px 80px hsl(0 0% 0% / 0.38);
}

.lightbox-copy {
  position: absolute;
  inset: auto 0 0;
  padding: 1.5rem;
  border-radius: 0 0 1.5rem 1.5rem;
  background: linear-gradient(180deg, hsl(163 55% 18% / 0), hsl(163 55% 18% / 0.94));
}

.gallery-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: hsl(163 55% 18% / 0.7);
  color: var(--primary-foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
}

.contact-card {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-card--highlight {
  background: hsl(163 55% 18%);
  border-color: hsl(163 55% 18%);
}

.contact-card--highlight .contact-card__icon {
  background: hsl(55 85% 55% / 0.2);
  color: var(--secondary);
}

.contact-card--highlight h3 {
  color: var(--primary-foreground);
}

.contact-card--highlight p {
  color: hsl(60 80% 95% / 0.68);
}

.contact-cta {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}

.site-footer {
  background: hsl(163 55% 18%);
  color: var(--primary-foreground);
  padding: 3rem 0;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-brand img {
  height: 4.9rem;
}

.footer-brand span {
  color: hsl(60 80% 95% / 0.56);
  font-size: 0.92rem;
}

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid hsl(60 80% 95% / 0.08);
  text-align: center;
  color: hsl(60 80% 95% / 0.34);
  font-size: 0.82rem;
}

.whatsapp-float {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 70;
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: hsl(142 70% 45%);
  color: hsl(0 0% 100%);
  box-shadow: 0 18px 40px hsl(142 70% 20% / 0.35);
  animation: whatsappPulse 2s ease-in-out infinite;
}

@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 0 0 0 hsl(142 70% 45% / 0.5); }
  50% { box-shadow: 0 0 0 16px hsl(142 70% 45% / 0); }
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

@media (max-width: 1024px) {
  .services-grid,
  .gallery-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-grid,
  .footer-top {
    grid-template-columns: 1fr;
    display: grid;
  }

  .footer-top {
    justify-items: center;
    text-align: center;
  }
}

@media (max-width: 820px) {
  .header-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-copy {
    padding-top: 9rem;
  }

  .hero-stats,
  .services-grid,
  .gallery-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 5rem 0;
  }

  .whatsapp-float {
    width: 3.6rem;
    height: 3.6rem;
    right: 1rem;
    bottom: 1rem;
  }
}

@media (max-width: 640px) {
  .brand img {
    height: 2.6rem;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 11vw, 3.4rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .button,
  .wp-block-button__link {
    width: 100%;
  }

  .about-card,
  .contact-card,
  .service-card {
    padding: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
