/* ==========================================================================
   PIMECH Engenharia & Construção - Master Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Brand Colors */
  --primary-navy: #022873;
  --primary-navy-dark: #011848;
  --primary-navy-light: #043394;
  --brand-red: #d9183b;
  --brand-red-hover: #b5102f;
  --brand-red-light: #FFF0F2;
  --accent-cyan: #38BDF8;

  /* Neutral Colors */
  --bg-light: #F8FAFC;
  --bg-white: #FFFFFF;
  --bg-dark: #0B0F17;
  --bg-dark-card: #141B2D;
  --border-light: #E2E8F0;
  --border-dark: #2A364F;

  /* Text Colors */
  --text-dark: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --text-white: #FFFFFF;

  /* Typography */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
  --shadow-red: 0 8px 20px rgba(217, 24, 59, 0.35);

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* --- Container Utility --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Section Headers --- */
.section-kicker {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand-red);
  margin-bottom: 0.75rem;
}

.section-kicker-cyan {
  color: var(--accent-cyan);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.section-title-white {
  color: var(--text-white);
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 2.5rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn-primary {
  background-color: var(--brand-red);
  color: var(--text-white);
  box-shadow: var(--shadow-red);
}

.btn-primary:hover {
  background-color: var(--brand-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(227, 28, 68, 0.4);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-white);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  border-color: var(--text-white);
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-underline {
  background: transparent;
  color: var(--text-white);
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 0;
  padding: 0.6rem 0.25rem;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: none;
}

.btn-underline:hover {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

/* ==========================================================================
   1. HEADER / NAVBAR
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--primary-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
  transition: var(--transition);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 145px;
  width: auto;
  object-fit: contain;
  display: block;
  margin-top: -44px;
  margin-bottom: -44px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #E31C44 0%, #A80D2D 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.35rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-white);
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.logo-sub {
  font-size: 0.65rem;
  color: var(--accent-cyan);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.nav-link:hover {
  color: var(--text-white);
}

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

/* ==========================================================================
   2. HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  background-color: #022873;
  color: var(--text-white);
  padding: 5rem 0 6rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--accent-cyan);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

.hero-kicker::before {
  content: '';
  display: inline-block;
  width: 36px;
  height: 2px;
  background-color: var(--accent-cyan);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.25rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--text-white);
}

.hero-description {
  font-size: 1.1875rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.5rem;
  max-width: 680px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   3. CLIENTS LOGO STRIP
   ========================================================================== */
.clients-section {
  background-color: var(--bg-white);
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-light);
}

.clients-header {
  text-align: center;
  margin-bottom: 2rem;
}

.clients-header .section-kicker {
  color: #022873;
}

.clients-header p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1.5rem 2rem;
  align-items: center;
}

.client-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  color: #334155;
  transition: var(--transition);
  min-height: 54px;
}

.client-logo-card:hover {
  border-color: var(--brand-red);
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   4. SERVICES SECTION
   ========================================================================== */
.services-section {
  background-color: var(--bg-light);
  padding: 5rem 0;
}

.services-section .section-title {
  color: #022873;
}

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

.service-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.75rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(7, 29, 73, 0.2);
}

.service-icon-wrapper {
  width: 48px;
  height: 48px;
  background-color: rgba(7, 29, 73, 0.06);
  color: var(--primary-navy);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.service-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.service-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ==========================================================================
   5. PROJECTS SECTION
   ========================================================================== */
.projects-section {
  background-color: var(--bg-dark);
  color: var(--text-white);
  padding: 5rem 0;
}

.projects-section .section-title {
  margin-bottom: 3.5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-bottom: 3.5rem;
}

.project-card {
  background-color: transparent;
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.project-carousel {
  position: relative;
  width: 100%;
  height: 230px;
  background-color: #1a1a1a;
  overflow: hidden;
}

.project-carousel-img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
  transition: opacity 0.35s ease-in-out;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background-color: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  z-index: 10;
  transition: var(--transition);
  opacity: 0.7;
}

.project-carousel:hover .carousel-btn {
  opacity: 1;
}

.carousel-btn:hover {
  background-color: var(--brand-red);
  border-color: var(--brand-red);
}

.carousel-btn.prev {
  left: 8px;
}

.carousel-btn.next {
  right: 8px;
}

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 4px 8px;
  border-radius: 10px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}

.carousel-dot.active {
  background-color: #358ac0;
  transform: scale(1.3);
}

.project-content {
  background-color: #0d0d0d;
  border-left: 2px solid #358ac0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-client-tag {
  display: none;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.5;
}

.projects-cta {
  text-align: center;
}

/* ==========================================================================
   6. COMPLIANCE & SAFETY BADGES
   ========================================================================== */
.compliance-section {
  background-color: #f3f4f8;
  padding: 3rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.compliance-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.compliance-header .section-kicker {
  color: #022873;
}

.compliance-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem 1.25rem;
}

.compliance-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background-color: transparent;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  border: 1px solid #737373;
  box-shadow: none;
}

.badge-code {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 800;
  background-color: transparent;
  color: #737373;
  padding: 0;
  border-radius: 0;
  border: none;
}

.badge-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ==========================================================================
   7. WHY CHOOSE PIMECH (DIFFERENTIATORS)
   ========================================================================== */
.why-section {
  background-color: var(--bg-white);
  padding: 5rem 0;
}

.why-section .section-title {
  color: #022873;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.why-card {
  display: flex;
  gap: 1.25rem;
  padding: 0.75rem 0;
  background-color: transparent;
  border: none;
}

.why-icon {
  font-size: 1.5rem;
  color: var(--brand-red);
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background-color: var(--brand-red-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 0.5rem;
}

.why-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ==========================================================================
   8. ABOUT US (QUEM SOMOS & STATS)
   ========================================================================== */
.about-section {
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-navy-dark) 100%);
  color: var(--text-white);
  padding: 5rem 0;
}

.about-content {
  max-width: 860px;
  margin-bottom: 3.5rem;
}

.about-text-block {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
}

.about-text-block p {
  margin-bottom: 1.25rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-card {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3.25rem;
  font-weight: 900;
  color: var(--text-white);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   9. CONTACT FORM & INFO CARD
   ========================================================================== */
.contact-section {
  background-color: var(--bg-light);
  padding: 5rem 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  align-items: stretch;
}

.contact-form-card {
  background-color: var(--bg-white);
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  padding: 2.5rem;
  border: 1px solid var(--border-light);
  border-right: none;
  box-shadow: var(--shadow-md);
}

.contact-form-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 0.5rem;
}

.contact-form-sub {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;

  margin-bottom: 1.25rem;
}

.form-group-full {
  grid-column: span 2;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background-color: #FAFAFA;
  transition: var(--transition);
  color: var(--text-dark);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary-navy);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(7, 29, 73, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 110px;
}

/* Contact Info Card (Right Side) */
.contact-info-card {
  background: #022873;
  color: var(--text-white);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.contact-info-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1.25rem;
}

.contact-bullets {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-bullet-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
}

.contact-bullet-icon {
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.contact-phone-box {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-white);
  width: 100%;
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-dark);
}

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

.footer-brand p {
  font-size: 0.875rem;
  margin-top: 1rem;
  max-width: 360px;
  line-height: 1.6;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-light);
}

.footer-links a:hover {
  color: var(--brand-red);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-dark);
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .services-grid, .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--primary-navy);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-menu.active {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  .hero-title {
    font-size: 2rem;
  }

  .services-grid, .projects-grid, .why-grid, .stats-grid {
    grid-template-columns: 1fr;
  }

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

  .form-group-full {
    grid-column: span 1;
  }

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