/* ============================================
   NorthArq Reformas - Stylesheet
   Sem bibliotecas externas | Mobile-first
   ============================================ */

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

/* Design Tokens */
:root {
  /* Brand Colors */
  --brand: #f84a0b;
  --brand-600: #e0430a;
  --brand-700: #c63a08;

  /* Neutral Colors */
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;

  /* Design System */
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);

  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Header Height */
  --header-height: 70px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f1a;
    --text: #e6eaf2;
    --muted: #a1a8b8;
    --line: #1f2937;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-md));
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
  margin-bottom: var(--space-sm);
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 200ms ease;
}

a:hover,
a:focus {
  color: var(--brand-600);
}

a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Header - STICKY/FIXED SECTION */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  height: var(--header-height);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-md);
}

/* Adicionados estilos para logo image */
.logo-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: var(--space-xs) 0;
}

/* Adicionados estilos para logo image */
/* Ajustando a logo para conter dentro do header e não extravasar */
.logo-img {
  height: 100%;
  max-height: 50px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  transition: opacity 200ms ease;
}

.logo-link:hover .logo-img,
.logo-link:focus .logo-img {
  opacity: 0.85;
}

/* Mantido estilo .logo para compatibilidade (caso exista uso no JS) */
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}

.logo:hover,
.logo:focus {
  color: var(--brand-600);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger {
  position: relative;
  width: 24px;
  height: 2px;
  background-color: var(--text);
  transition: background-color 200ms ease;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--text);
  transition: transform 200ms ease;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  bottom: -7px;
}

.menu-toggle[aria-expanded="true"] .hamburger {
  background-color: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Navigation */
.nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg);
  padding: var(--space-lg) var(--space-md);
  transform: translateX(100%);
  transition: transform 300ms ease;
  overflow-y: auto;
}

.nav.active {
  transform: translateX(0);
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.nav-link {
  display: block;
  padding: var(--space-sm);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  border-radius: 8px;
  transition: background-color 200ms ease;
}

.nav-link:hover,
.nav-link:focus {
  background-color: var(--line);
  color: var(--brand);
}

.header-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text);
  transition: all 200ms ease;
}

.icon-link:hover,
.icon-link:focus {
  background-color: var(--brand);
  border-color: var(--brand);
  color: white;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 200ms ease;
  text-decoration: none;
  line-height: 1.2;
}

.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

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

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--brand-600);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text);
  border: 2px solid var(--line);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.btn-outline {
  background-color: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
}

.btn-outline:hover,
.btn-outline:focus {
  background-color: var(--brand);
  color: white;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-block {
  width: 100%;
}

.btn-header {
  display: none;
}

/* Hero Section */
.hero {
  padding: var(--space-2xl) 0;
  background-color: var(--bg);
  background-image: repeating-linear-gradient(45deg, transparent, transparent 35px, var(--line) 35px, var(--line) 36px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, var(--line) 35px, var(--line) 36px);
  background-size: 50px 50px;
  background-position: 0 0;
}

.hero-content {
  max-width: 800px;
  text-align: center;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand);
  background-color: var(--bg);
  border: 1px solid var(--brand);
  border-radius: 100px;
  margin-bottom: var(--space-md);
}

.hero-title {
  margin-bottom: var(--space-sm);
  text-wrap: balance;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--muted);
  margin-bottom: var(--space-lg);
  text-wrap: pretty;
}

.hero-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  text-align: left;
}

.hero-highlights li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 1.125rem;
}

.highlight-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Section Base */
.section {
  padding: var(--space-2xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-md);
  text-wrap: balance;
}

.section-description {
  text-align: center;
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto var(--space-xl);
  text-wrap: pretty;
}

/* Services Section */
.services {
  background-color: var(--bg);
}

.services-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

.service-card {
  padding: var(--space-lg);
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all 200ms ease;
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--brand);
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-md);
  background-color: var(--line);
  border-radius: 12px;
  color: var(--brand);
}

.service-title {
  margin-bottom: var(--space-sm);
}

.service-description {
  color: var(--muted);
  margin-bottom: var(--space-md);
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  color: var(--brand);
}

.service-link:hover,
.service-link:focus {
  text-decoration: underline;
}

/* Process Section */
.process {
  background-color: var(--line);
}

.process-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.process-step {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.process-number {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background-color: var(--brand);
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
}

.process-title {
  margin-bottom: var(--space-xs);
}

.process-description {
  color: var(--muted);
}

/* Projects Section */
.projects {
  background-color: var(--bg);
}

.projects-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

.project-card {
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 200ms ease;
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--brand);
}

.project-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: var(--line);
}

.project-image svg,
.project-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  }

.project-info {
  padding: var(--space-md);
}

.project-title {
  margin-bottom: var(--space-xs);
}

.project-description {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Testimonials Section */
.testimonials {
  background-color: var(--line);
}

.testimonials-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

.testimonial-card {
  padding: var(--space-lg);
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.testimonial-rating {
  font-size: 1.25rem;
  color: #fbbf24;
  margin-bottom: var(--space-sm);
}

.testimonial-text {
  font-style: italic;
  color: var(--muted);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.testimonial-author {
  display: block;
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--text);
}

.testimonial-author strong {
  color: var(--brand);
}

/* About Section */
.about {
  background-color: var(--bg);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-text {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: var(--space-md);
}

.about-text strong {
  color: var(--text);
  font-weight: 700;
}

.about-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.about-highlights li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background-color: var(--line);
  border-radius: 8px;
  font-weight: 500;
}

.about-highlights svg {
  flex-shrink: 0;
  color: var(--brand);
}

/* Contact Section */
.contact {
  background-color: var(--line);
}

/* Contact CTA Block */
.contact-cta-block {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.contact-cta-block .section-title {
  margin-bottom: var(--space-md);
}

.contact-cta-block .section-description {
  margin-bottom: var(--space-xl);
}

.contact-phone-hint {
  margin-top: var(--space-md);
  font-size: 1rem;
  color: var(--muted);
}

.contact-phone-hint a {
  color: var(--text);
  font-weight: 600;
}

.contact-phone-hint a:hover,
.contact-phone-hint a:focus {
  color: var(--brand);
}

.contact-details-row {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
  margin-top: var(--space-xl);
  text-align: left;
}

.contact-cta-block .contact-map {
  margin-top: var(--space-md);
}

/* WhatsApp Button Styles */
.btn-whatsapp {
  background-color: #25d366;
  color: white;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
  font-size: 1.25rem;
  padding: 1.125rem 2.5rem;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus {
  background-color: #1fb855;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
}

.btn-whatsapp-outline {
  background-color: transparent;
  color: #25d366;
  border: 2px solid #25d366;
}

.btn-whatsapp-outline:hover,
.btn-whatsapp-outline:focus {
  background-color: #25d366;
  color: white;
  border-color: #25d366;
}

.contact-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.contact-item svg {
  flex-shrink: 0;
  color: var(--brand);
}

.contact-item-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.contact-item-value {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.4;
}

.contact-map {
  margin-top: var(--space-sm);
}

/* Footer */
.footer {
  background-color: var(--text);
  color: var(--bg);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: 1fr;
  margin-bottom: var(--space-xl);
}

.footer-title {
  font-size: 1.25rem;
  color: var(--brand);
  margin-bottom: var(--space-sm);
}

.footer-subtitle {
  font-size: 1rem;
  color: var(--bg);
  margin-bottom: var(--space-sm);
}

.footer-text {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--bg);
  font-weight: 600;
  transition: color 200ms ease;
}

.footer-social:hover,
.footer-social:focus {
  color: var(--brand);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-links a {
  color: var(--muted);
  transition: color 200ms ease;
}

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

.footer-contact {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-contact a {
  color: var(--muted);
}

.footer-contact a:hover,
.footer-contact a:focus {
  color: var(--brand);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-privacy {
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-privacy:hover,
.footer-privacy:focus {
  color: var(--brand);
}

/* WhatsApp Float Button */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-md);
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: all 200ms ease;
}

.whatsapp-float:hover,
.whatsapp-float:focus {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
  color: white;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  background-color: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--brand);
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
  transition: background-color 200ms ease, transform 200ms ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modal-close svg {
  stroke: white;
}

.modal-close:hover,
.modal-close:focus {
  background-color: #d94009;
  transform: scale(1.1);
}

/* Modal Carousel */
.modal-carousel {
  position: relative;
  width: 100%;
  margin-bottom: 0;
  overflow: hidden;
  background-color: var(--dark);
  aspect-ratio: 16 / 10;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 400ms ease;
}

.carousel-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 200ms ease;
  z-index: 2;
}

.carousel-btn:hover,
.carousel-btn:focus {
  background-color: rgba(0, 0, 0, 0.8);
}

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

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

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 200ms ease, transform 200ms ease;
}

.carousel-dot.active {
  background-color: white;
  transform: scale(1.25);
}

.carousel-dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

.modal-carousel.hidden {
  display: none;
}

.modal-content-inner {
  padding: var(--space-lg) var(--space-xl) var(--space-xl);
  overflow-y: auto;
  max-height: calc(90vh - 260px);
}

.modal-title {
  margin-bottom: var(--space-md);
  padding-right: var(--space-xl);
  }

.modal-body {
  color: var(--muted);
  line-height: 1.7;
}

/* Tablet Breakpoint - 768px */
@media (min-width: 768px) {
  :root {
    --header-height: 80px;
  }

  /* Logo um pouco maior em tablets e desktops, mas ainda contida */
  .logo-img {
    max-height: 60px;
    max-width: 200px;
  }

  .menu-toggle {
    display: none;
  }

  .nav {
    position: static;
    transform: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    background-color: transparent;
  }

  .nav-list {
    flex-direction: row;
    margin-bottom: 0;
  }

  .nav-link {
    padding: var(--space-xs) var(--space-sm);
    font-size: 1rem;
  }

  .header-actions {
    flex-direction: row;
  }

  .btn-header {
    display: inline-flex;
  }

  .hero-cta {
    flex-direction: row;
    justify-content: center;
  }

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

  .process-timeline {
    flex-direction: row;
  }

  .process-step {
    flex-direction: column;
    text-align: center;
    flex: 1;
  }

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

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

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

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

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Desktop Breakpoint - 1024px */
@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .testimonials-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Large Desktop - 1280px */
@media (min-width: 1280px) {
  .container {
    padding: 0 var(--space-lg);
  }
}

/* Print Styles */
@media print {
  .header,
  .whatsapp-float,
  .modal {
    display: none !important;
  }
}
