/*
Theme Name: Competência Engenharia
Theme URI: https://competenciameioambiente.com.br
Author: Competência Engenharia do Meio Ambiente
Description: Tema personalizado para a Competência Engenharia do Meio Ambiente e Topografia - Consultoria Ambiental, Topografia e Regularização Fundiária.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: competencia
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ===================== VARIABLES ===================== */
:root {
  --forest: 152, 45%, 28%;
  --forest-light: 152, 30%, 90%;
  --earth: 38, 50%, 55%;
  --earth-light: 38, 40%, 92%;
  --bark: 25, 30%, 25%;
  --sand: 40, 30%, 94%;
  --bg: 40, 20%, 97%;
  --fg: 150, 30%, 10%;
  --muted: 150, 10%, 40%;
  --border-color: 40, 15%, 85%;
  --card-bg: 40, 15%, 95%;
  --radius: 0.75rem;
}

/* ===================== RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Source Sans 3', sans-serif;
  background-color: hsl(var(--bg));
  color: hsl(var(--fg));
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===================== UTILITIES ===================== */
.text-gradient-forest {
  background: linear-gradient(135deg, hsl(var(--forest)), hsl(var(--earth)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-forest {
  background: linear-gradient(135deg, hsl(var(--forest)), hsl(152, 45%, 22%));
}

.section-divider {
  width: 5rem;
  height: 0.25rem;
  border-radius: 9999px;
  margin: 1.5rem auto;
  background: linear-gradient(90deg, hsl(var(--forest)), hsl(var(--earth)));
}

.section-subtitle {
  color: hsl(var(--earth));
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: hsl(var(--fg));
}

@media (min-width: 768px) {
  .section-title { font-size: 3rem; }
}

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, hsl(var(--forest)), hsl(152, 45%, 22%));
  color: hsl(var(--bg));
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  transition: opacity 0.3s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover { opacity: 0.9; }

.btn-outline {
  display: inline-block;
  border: 2px solid hsla(var(--bg), 0.3);
  color: hsl(var(--bg));
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.3s;
  background: transparent;
  cursor: pointer;
}

.btn-outline:hover { background: hsla(var(--bg), 0.1); }

/* ===================== NAVBAR ===================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: all 0.3s;
  height: 5rem;
}

.navbar.scrolled {
  background: hsla(var(--bg), 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: hsl(var(--bg));
}

.navbar.scrolled .navbar-brand { color: hsl(var(--forest)); }

.navbar-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .navbar-links { display: flex; }
}

.navbar-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsla(var(--bg), 0.9);
  transition: color 0.3s;
}

.navbar.scrolled .navbar-links a { color: hsl(var(--fg)); }
.navbar-links a:hover { color: hsl(var(--earth)); }

.navbar-cta {
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
}

.mobile-toggle {
  display: block;
  background: none;
  border: none;
  color: hsl(var(--bg));
  font-size: 1.5rem;
  cursor: pointer;
}

.navbar.scrolled .mobile-toggle { color: hsl(var(--fg)); }

@media (min-width: 768px) {
  .mobile-toggle { display: none; }
}

.mobile-menu {
  display: none;
  background: hsl(var(--bg));
  border-top: 1px solid hsl(var(--border-color));
  padding: 1.5rem 1rem;
  flex-direction: column;
  gap: 1rem;
}

.mobile-menu.open { display: flex; }

@media (min-width: 768px) {
  .mobile-menu { display: none !important; }
}

.mobile-menu a {
  color: hsl(var(--fg));
  font-size: 1rem;
  padding: 0.5rem 0;
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    hsla(var(--bark), 0.7),
    hsla(var(--bark), 0.5),
    hsla(var(--bark), 0.8)
  );
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1rem;
  max-width: 56rem;
  margin: 0 auto;
}

.hero-content .tagline {
  color: hsl(var(--earth));
  font-size: 0.875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: hsl(var(--bg));
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-content h1 span { color: hsl(var(--earth)); }

@media (min-width: 768px) { .hero-content h1 { font-size: 3.75rem; } }
@media (min-width: 1024px) { .hero-content h1 { font-size: 4.5rem; } }

.hero-content .subtitle {
  font-size: 1.125rem;
  color: hsla(var(--bg), 0.8);
  font-weight: 300;
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .hero-buttons { flex-direction: row; }
}

.hero-buttons .btn-primary { font-size: 1.125rem; padding: 1rem 2rem; }
.hero-buttons .btn-outline { font-size: 1.125rem; padding: 1rem 2rem; }

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: hsla(var(--bg), 0.6);
  font-size: 2rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ===================== ABOUT ===================== */
.about { padding: 6rem 0; background: hsl(var(--bg)); }

.about .intro {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto 4rem;
}

.about .intro p.desc {
  color: hsl(var(--muted));
  font-size: 1.125rem;
  line-height: 1.7;
}

.diferenciais-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) { .diferenciais-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .diferenciais-grid { grid-template-columns: repeat(4, 1fr); } }

.diferencial-card {
  background: hsl(var(--card-bg));
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid hsl(var(--border-color));
  transition: all 0.3s;
}

.diferencial-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  border-color: hsla(var(--forest), 0.2);
}

.diferencial-card .icon-wrap {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius);
  background: hsl(var(--forest-light));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all 0.3s;
  color: hsl(var(--forest));
  font-size: 1.5rem;
}

.diferencial-card:hover .icon-wrap {
  background: linear-gradient(135deg, hsl(var(--forest)), hsl(152, 45%, 22%));
  color: hsl(var(--bg));
}

.diferencial-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.diferencial-card p {
  color: hsl(var(--muted));
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ===================== SERVICES ===================== */
.services { padding: 6rem 0; background: hsl(var(--sand)); }

.services-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s;
  cursor: pointer;
  border: 1px solid hsl(var(--border-color));
  background: hsl(var(--card-bg));
  color: hsl(var(--muted));
}

.tab-btn:hover { color: hsl(var(--fg)); }

.tab-btn.active {
  background: linear-gradient(135deg, hsl(var(--forest)), hsl(152, 45%, 22%));
  color: hsl(var(--bg));
  border-color: transparent;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.services-content {
  display: none;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.services-content.active { display: grid; }

@media (min-width: 1024px) {
  .services-content { grid-template-columns: repeat(2, 1fr); }
}

.services-content .service-image {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.services-content .service-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.services-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

@media (min-width: 768px) { .services-content h3 { font-size: 1.875rem; } }

.services-content .service-desc {
  color: hsl(var(--muted));
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.service-items { display: flex; flex-direction: column; gap: 0.75rem; }

.service-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.service-item .chevron {
  color: hsl(var(--forest));
  margin-top: 0.125rem;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.service-item:hover .chevron { transform: translateX(4px); }

.service-item span { font-size: 0.875rem; color: hsl(var(--fg)); }

/* ===================== CLIENTS ===================== */
.clients { padding: 6rem 0; background: hsl(var(--bg)); }

.clients-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) { .clients-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .clients-grid { grid-template-columns: repeat(5, 1fr); } }

.client-card {
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: hsl(var(--card-bg));
  border: 1px solid hsl(var(--border-color));
  transition: all 0.3s;
}

.client-card:hover {
  border-color: hsla(var(--forest), 0.2);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.client-card .icon-circle {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: hsl(var(--forest-light));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  transition: all 0.3s;
  color: hsl(var(--forest));
  font-size: 1.5rem;
}

.client-card:hover .icon-circle {
  background: linear-gradient(135deg, hsl(var(--forest)), hsl(152, 45%, 22%));
  color: hsl(var(--bg));
}

.client-card h3 {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.client-card p {
  color: hsl(var(--muted));
  font-size: 0.75rem;
  line-height: 1.5;
}

/* Stats */
.stats-bar {
  margin-top: 5rem;
  border-radius: 1rem;
  padding: 3rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
  background: linear-gradient(135deg, hsl(var(--forest)), hsl(152, 45%, 22%));
}

@media (min-width: 768px) {
  .stats-bar { grid-template-columns: repeat(4, 1fr); }
}

.stats-bar .stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: hsl(var(--bg));
}

@media (min-width: 768px) { .stats-bar .stat-num { font-size: 2.5rem; } }

.stats-bar .stat-label {
  color: hsla(var(--bg), 0.7);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ===================== REVIEWS ===================== */
.reviews { padding: 6rem 0; background: hsl(var(--sand)); }

.reviews .google-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.reviews .stars { color: hsl(var(--earth)); font-size: 1.25rem; }
.reviews .rating-num { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.125rem; }
.reviews .rating-source { color: hsl(var(--muted)); font-size: 0.875rem; }

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) { .reviews-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }

.review-card {
  background: hsl(var(--card-bg));
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid hsl(var(--border-color));
  transition: all 0.3s;
  position: relative;
}

.review-card:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }

.review-card .quote-icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: hsl(var(--forest-light));
  font-size: 2rem;
}

.review-card .card-stars { color: hsl(var(--earth)); margin-bottom: 1rem; }

.review-card .review-text {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: hsl(var(--fg));
}

.review-card .reviewer-name {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
}

.review-card .reviewer-role {
  color: hsl(var(--muted));
  font-size: 0.75rem;
}

/* ===================== CONTACT ===================== */
.contact { padding: 6rem 0; background: hsl(var(--bg)); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

.contact-info .desc {
  color: hsl(var(--muted));
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-item .icon-box {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  background: hsl(var(--forest-light));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  color: hsl(var(--forest));
  font-size: 1.25rem;
}

.contact-item:hover .icon-box {
  background: linear-gradient(135deg, hsl(var(--forest)), hsl(152, 45%, 22%));
  color: hsl(var(--bg));
}

.contact-item span { transition: color 0.3s; }
.contact-item:hover span { color: hsl(var(--forest)); }

.contact-cta {
  border-radius: 1rem;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, hsl(var(--forest)), hsl(152, 45%, 22%));
}

.contact-cta .cta-icon { font-size: 3rem; color: hsla(var(--bg), 0.8); margin-bottom: 1.5rem; }

.contact-cta h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--bg));
  margin-bottom: 1rem;
}

.contact-cta p {
  color: hsla(var(--bg), 0.8);
  max-width: 24rem;
  margin-bottom: 2rem;
}

.contact-cta .btn-white {
  background: hsl(var(--bg));
  color: hsl(var(--forest));
  padding: 1rem 2.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1.125rem;
  transition: opacity 0.3s;
  display: inline-block;
}

.contact-cta .btn-white:hover { opacity: 0.9; }

/* ===================== FOOTER ===================== */
.site-footer {
  background: hsl(var(--bark));
  padding: 3rem 0;
  color: hsla(var(--bg), 0.8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }

.footer-grid h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--bg));
  margin-bottom: 1rem;
}

.footer-grid h4 {
  font-weight: 600;
  color: hsl(var(--bg));
  margin-bottom: 1rem;
}

.footer-grid p, .footer-grid li {
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-grid ul { display: flex; flex-direction: column; gap: 0.5rem; }

.footer-bottom {
  border-top: 1px solid hsla(var(--bg), 0.1);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: hsla(var(--bg), 0.5);
}
