/* Base */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-600: #1e40af;
  --accent: #f97316;
  --orange: #f97316;
  --blue: #2563eb;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(0,0,0,.1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 70% -10%, rgba(37, 99, 235, 0.08), transparent 60%),
              radial-gradient(1000px 500px at -10% 20%, rgba(249, 115, 22, 0.06), transparent 60%),
              var(--bg);
  line-height: 1.6;
}

.container { width: min(1100px, 92%); margin: 0 auto; }

/* Inner pages: push main content below fixed header so titles aren't covered (margin so inline padding on main isn't overridden) */
body.page-inner main { margin-top: 100px; }

/* Header */
.site-header { 
  position: fixed; 
  top: 0; 
  left: 0;
  right: 0;
  z-index: 50; 
  background: transparent !important;
  backdrop-filter: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  width: 100%;
}
.nav { 
  display: flex; 
  align-items: center; 
  justify-content: flex-end; 
  padding: 16px 0;
  background: transparent !important;
}
.logo { 
  font-weight: 800; 
  letter-spacing: .2px; 
  color: #ffffff; 
  text-decoration: none; 
  display: flex; 
  align-items: center; 
  gap: 8px;
  transition: transform 0.3s ease;
}
.logo:hover { transform: scale(1.05); }
.logo img { height: 56px; display: block; filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }

/* Header logo positioning (top-left corner) */
.site-header .logo {
  position: fixed;
  left: 56px;
  top: 8px;
  z-index: 51;
}
.nav-toggle { 
  background: rgba(255,255,255,.15); 
  border: 1px solid rgba(255,255,255,.3); 
  color: #ffffff; 
  padding: 8px 10px; 
  border-radius: 10px; 
  display: none;
  transition: all 0.3s ease;
}
.nav-toggle:hover { 
  background: rgba(255,255,255,.25); 
  transform: scale(1.05);
}
.nav-menu { 
  display: flex; 
  gap: 18px; 
  align-items: center;
}
.nav-menu a { 
  color: rgba(255,255,255,.95); 
  text-decoration: none; 
  padding: 10px 14px; 
  border-radius: 10px; 
  transition: all 0.3s ease;
  text-shadow: 0 2px 4px rgba(0,0,0,.3);
  font-weight: 500;
  position: relative;
}
/* When header is scrolled, show solid blue banner and pill-style nav buttons */
.site-header--scrolled {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(30, 64, 175, 0.9)) !important;
  border-bottom: 2px solid rgba(255,255,255,.15) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.2) !important;
}

.nav-menu a::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: rgba(255,255,255,.5);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.nav-menu a:hover::before,
.nav-menu a.active::before {
  transform: scaleX(1);
}
.nav-menu a:hover, .nav-menu a.active { 
  color: #ffffff; 
  background: rgba(255,255,255,.15);
  transform: translateY(-1px);
}
.nav-menu a.btn-primary { 
  background: linear-gradient(135deg, var(--orange), #ea580c);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
  border: none;
}
.nav-menu a.btn-primary:hover { 
  background: linear-gradient(135deg, #ea580c, #dc2626);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.5);
  transform: translateY(-2px);
}

.btn { display: inline-block; padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-600); }
.btn-orange { background: var(--orange); color: #fff; box-shadow: var(--shadow); }
.btn-orange:hover { background: #ea580c; }
.btn-outline { border: 1px solid var(--border); color: var(--text); background: transparent; }
.btn-whatsapp { display: inline-flex; align-items: center; gap: 8px; }
.btn-whatsapp .whatsapp-icon { flex-shrink: 0; color: #fff; }
.btn-outline.btn-whatsapp .whatsapp-icon { color: inherit; }
.btn-outline:hover { background: var(--surface); border-color: var(--primary); }

/* Hero */
.hero {
  position: relative;
  padding: 120px 0 80px;
  background-image: url('../images/hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 600px;
  padding-top: 200px;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.08));
  z-index: 0;
}
.hero-wrap {
  position: relative;
  z-index: 1;
  max-width: 800px;
}
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.12; margin: 10px 0 12px; }
.hero p { color: var(--muted); max-width: 56ch; }
.hero-cta { margin-top: 18px; display: flex; gap: 12px; }

/* Stats */
.stats { padding: 24px 0 12px; background: #ffffff; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.05)); border: 2px solid rgba(249, 115, 22, 0.3); border-radius: 14px; padding: 18px; text-align: center; opacity: 0; box-shadow: 0 2px 8px rgba(249, 115, 22, 0.15); transition: all 0.3s ease; }
.stat:hover { border-color: var(--orange); box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25); transform: translateY(-2px); }
.stat-number { font-size: 34px; font-weight: 800; color: var(--orange); }
.stat-label { color: var(--muted); }

/* Project Slider */
.project-slider {
  padding: 40px 0;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(37, 99, 235, 0.7), rgba(30, 64, 175, 0.85));
  position: relative;
}
.slider-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}
.slider-track {
  display: flex;
  gap: 16px;
  animation: slideRightToLeft 30s linear infinite;
  will-change: transform;
}
.slider-track a {
  flex-shrink: 0;
  display: block;
  text-decoration: none;
  transition: transform 0.3s ease;
}
.slider-track a:hover {
  transform: scale(1.05);
}
.slider-track img {
  width: 280px;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: block;
  cursor: pointer;
}
.project-slider:hover .slider-track {
  animation-play-state: paused;
}

@keyframes slideRightToLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Services */
.services { padding: 28px 0; }
.services h2 { margin: 0 0 14px; font-size: 28px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--border); padding: 16px; border-radius: 14px; text-decoration: none; color: var(--text); opacity: 0; box-shadow: 0 1px 3px rgba(0,0,0,.05); transition: all 0.3s ease; }
.card:hover { border-color: var(--blue); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); transform: translateY(-2px); }
.card h3 { margin: 4px 0 6px; }
.card p { color: var(--muted); }
.card-img { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; background: var(--surface); display: block; opacity: 0; transition: opacity 0.8s ease-out; }
.shake-effect .card-img { opacity: 1; }
/* Project page photos: visible immediately (cards are added dynamically, so scroll animation doesn't apply) */
#project-photos .card { opacity: 1; }
#project-photos .card .card-img { opacity: 1; }

/* Planning / Transparency */
.planning { padding: 28px 0; }
.planning .lede { color: var(--muted); margin: 6px 0 20px; }
.planning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 8px;
}
.planning-grid > div:first-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { padding-left: 28px; position: relative; line-height: 1.5; }
.checklist li:before { content: '✔'; color: var(--accent); position: absolute; left: 0; font-weight: bold; }
.gantt { min-height: 220px; border-radius: 12px; border: 1px dashed var(--border); background: repeating-linear-gradient(90deg, rgba(37, 99, 235, 0.08) 0 40px, transparent 40px 80px), linear-gradient(#f8fafc, #ffffff); }
.planning-img-wrap {
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
  aspect-ratio: 4 / 3;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.planning-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}

#project-brief {
  white-space: pre-line;
}

/* CTA */
.cta { padding: 28px 0 44px; }
.cta-wrap { background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(249, 115, 22, 0.08)); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; box-shadow: 0 4px 6px rgba(0,0,0,.05); }
.cta p { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: #f8fafc; padding: 28px 0 0; margin-top: 18px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 18px; align-items: start; }
.footer-grid > div > .logo,
.footer-grid > div > h4 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  line-height: 1.3;
  letter-spacing: 0.02em;
}
.site-footer .logo { display: block; }
.google-rating-block {
  display: block;
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 1px 0 rgba(255,255,255,.8) inset;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.google-rating-block:hover {
  border-color: rgba(66, 133, 244, 0.4);
  box-shadow: 0 4px 16px rgba(66, 133, 244, 0.12), 0 1px 0 rgba(255,255,255,.9) inset;
  transform: translateY(-1px);
}
.google-rating-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.google-rating-icon { flex-shrink: 0; }
.google-rating-score {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.google-rating-value {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}
.google-rating-stars {
  color: #fbbc04;
  letter-spacing: 2px;
  font-size: 14px;
  line-height: 1;
}
.google-rating-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.google-rating-count {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.google-rating-count strong { color: var(--text); font-weight: 700; }
.google-rating-cta {
  font-size: 12px;
  font-weight: 600;
  color: #4285f4;
}
.google-rating-block:hover .google-rating-cta { text-decoration: underline; }
.footer-links { display: grid; gap: 6px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }
.contact { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.social { display: flex; gap: 10px; }
.copyright { border-top: 1px solid var(--border); padding: 12px 0; margin-top: 18px; color: var(--muted); }

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 24px;
}
.team-member {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.team-member:hover {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  transform: translateY(-2px);
}
.team-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 20px;
  border: 3px solid var(--border);
}
.team-member h3 {
  text-align: center;
  margin: 0 0 8px;
  font-size: 24px;
}
.team-title {
  text-align: center;
  color: var(--muted);
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 500;
}
.team-qualification {
  text-align: center;
  color: var(--accent);
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
}
.team-description {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  text-align: justify;
}

/* Gallery Page Styles */
.gallery-search-wrapper {
  position: relative;
  max-width: 500px;
}
.gallery-search {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  background: var(--surface);
  color: var(--text);
  transition: all 0.3s ease;
}
.gallery-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.filter-btn {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: capitalize;
}
.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
}
.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.gallery-item {
  text-decoration: none;
  color: inherit;
  display: block;
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
}
.gallery-item.hidden {
  display: none;
}
.gallery-item-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}
.gallery-item:hover .gallery-item-image {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
  border-color: var(--primary);
}
.gallery-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(249, 115, 22, 0.04));
  min-height: 200px;
}
/* Hide until loaded: no broken/empty icon, only neutral placeholder */
.gallery-item-image img[src=""],
.gallery-item-image img:not(.gallery-img-loaded) {
  opacity: 0;
}
.gallery-item-image img.gallery-img-loaded {
  opacity: 1;
}
.gallery-item:hover .gallery-item-image img {
  transform: none;
}
.gallery-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: transparent;
  padding: 20px;
  color: var(--text);
  transform: translateY(calc(100% - 60px));
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.gallery-item:hover .gallery-item-overlay {
  transform: translateY(0);
  height: auto;
  padding: 24px 20px 20px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
}
.gallery-item-overlay h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gallery-item:hover .gallery-item-overlay h3 {
  white-space: normal;
}
.gallery-item-client {
  display: block;
  font-size: 13px;
  margin: 0 0 10px;
  line-height: 1.3;
}
.gallery-view-details {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--orange), #ea580c);
  color: #ffffff;
  border-radius: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
  transition: all 0.3s ease 0.1s;
  align-self: flex-start;
  opacity: 0;
  transform: translateY(10px);
}
.gallery-item:hover .gallery-view-details {
  opacity: 1;
  transform: translateY(0);
  background: linear-gradient(135deg, #ea580c, #dc2626);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.5);
}

/* Utilities */
h2, h3, h4 { line-height: 1.2; }

/* Fade Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.shake-effect {
  animation: fadeIn 0.8s ease-out forwards;
  opacity: 1 !important;
}

/* Responsive */
@media (max-width: 900px) {
  .hero { padding: 80px 0 60px; min-height: 500px; }
  .planning-grid { grid-template-columns: 1fr; gap: 24px; align-items: stretch; }
  .planning-grid > div:first-child { order: 1; }
  .planning-img-wrap { order: 2; min-height: 220px; aspect-ratio: 16 / 10; }
  .grid-3, .cards, .footer-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-block; }
  .nav-menu { position: absolute; right: 4%; left: 4%; top: 62px; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); border: 2px solid rgba(255,255,255,.2); border-radius: 12px; padding: 10px; display: none; flex-direction: column; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
  .nav-menu.open { display: flex; }
  .slider-track img { width: 220px; height: 160px; }
  .project-slider { padding: 28px 0; }
  .team-grid { grid-template-columns: 1fr; gap: 24px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
  .gallery-filters { gap: 8px; }
  .filter-btn { padding: 8px 16px; font-size: 13px; }
  .gallery-item-overlay { padding: 20px 16px 16px; }
  .gallery-item-overlay h3 { font-size: 16px; }
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-search-wrapper { max-width: 100%; }
}


