/* =========================
   VARIABLES
   ========================= */

:root {
  --max-width: 1100px;

  --pad-desktop: 1.5rem;
  --pad-tablet: 1.25rem;
  --pad-mobile: 1rem;

  --text-main: #111;
  --text-muted: #6b7280;
  --border-light: #e5e7eb;

  --brand-red: #e10600;
  --brand-red-dark: #c90500;
}

/* =========================
   RESET
   ========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background: #fff;
}

/* =========================
   LAYOUT HELPERS
   ========================= */

.page-padding {
  padding-left: var(--pad-desktop);
  padding-right: var(--pad-desktop);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 0;
}

@media (max-width: 1023px) {
  .page-padding {
    padding-left: var(--pad-tablet);
    padding-right: var(--pad-tablet);
  }
}

@media (max-width: 767px) {
  .page-padding {
    padding-left: var(--pad-mobile);
    padding-right: var(--pad-mobile);
  }
}

/* =========================
   HEADER / NAVIGATION
   ========================= */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  position: relative;
  z-index: 100;
}

/* Main navbar row */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo img {
  width: 56px;
  height: auto;
  display: block;
}

/* Desktop navigation */
.nav-links {
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
}

.nav-links a:hover {
  color: #111;
}

/* Active link */
.nav-links a.active {
  color: #111;
  position: relative;
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: #111;
}

/* =========================
   HAMBURGER BUTTON
   ========================= */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #111;
  margin: 5px 0;
}

/* =========================
   MOBILE NAV
   ========================= */

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;

  padding: 5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;

  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: 200;
}

.mobile-nav a {
  font-size: 1.05rem;
  font-weight: 500;
  color: #111;
  text-decoration: none;
}

/* Backdrop */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 150;
}

/* =========================
   OPEN STATE (JS TOGGLES body.nav-open)
   ========================= */

body.nav-open {
  overflow: hidden;
}

body.nav-open .mobile-nav {
  transform: translateY(0);
}

body.nav-open .nav-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* =========================
   RESPONSIVE NAV
   ========================= */

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

  .nav-toggle {
    display: block;
  }
}

/* =========================
   HERO
   ========================= */

.hero {
  background: linear-gradient(135deg, #5f6368, #4b4f54);
  color: #fff;
  padding: 5.5rem 0;
}

.hero-content {
  max-width: 720px;
}

.hero h1 {
  font-size: 2.4rem;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.hero p {
  color: #e5e7eb;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================
   BUTTONS
   ========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.6rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.btn-primary {
  background: var(--brand-red);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: var(--brand-red-dark);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.85);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
}

/* =========================
   SHOWCASE – PROJECT GRID
   ========================= */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 1023px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   PROJECT CARD
   ========================= */

.project-card {
  position: relative;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
}

.project-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  border-radius: 0.75rem;
}

.project-label {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0 0 0.75rem 0.75rem;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.75),
    rgba(0,0,0,0)
  );
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  pointer-events: none;
}

@media (hover: hover) {
  .project-card:hover img {
    filter: brightness(0.92);
  }
}

/* =========================
   PROJECT MODAL
   ========================= */

.project-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.project-modal.open {
  display: flex;
}

.project-modal-inner {
  background: #fff;
  width: 90%;
  max-width: 900px;
  padding: 2rem;
  border-radius: 0.75rem;
  position: relative;
}

.project-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* =========================
   PROJECT CAROUSEL
   ========================= */

.project-carousel {
  position: relative;
  text-align: center;
}

.project-carousel img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
}

.carousel-btn.prev { left: -1rem; }
.carousel-btn.next { right: -1rem; }

/* =========================
   FOOTER
   ========================= */

footer {
  background: #f3f4f6;
  padding: 2rem 0;
}

.footer-text {
  text-align: center;
  font-size: 0.875rem;
  color: #374151;
}

/* =========================
   WHATSAPP FLOATING CTA
   ========================= */

.whatsapp-cta {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  background: #1f7a4f;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  z-index: 80;
}

/* =========================
   SERVICES – GRID
   ========================= */

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

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

@media (max-width: 767px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   SERVICE TILE
   ========================= */

.service-tile {
  text-align: center;
  padding: 2rem 1.5rem;
  border: 1px solid var(--border-light);
  border-radius: 0.75rem;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  .service-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  }
}

.service-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon img {
  width: 100%;
  height: auto;
  display: block;
}

.service-title {
  margin: 0.5rem 0 0.75rem;
  font-size: 1.05rem;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}