/* --------------------------
   Global (Mobile-First)
-------------------------- */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Lato', sans-serif;
  background-color: #f9f7f4;
  color: #333;
}
body.modal-open { overflow: hidden; }

/* --------------------------
   Top Navigation (mobile)
-------------------------- */
.topnav {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  z-index: 20;
}
.topnav img.logo { height: 48px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nav-links a {
  color: #FFF;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  font-family: 'Playfair Display', serif;
  font-size: 12px;
  padding: 6px 8px;       /* touch target */
  border-radius: 4px;
  transition: background-color 0.25s;
}
.nav-links a:hover { background-color: rgba(255,255,255,0.2); }

.consultation-button {
  border: 2px solid #FFF;
  box-sizing: border-box;
  padding: 6px 10px;
  border-radius: 4px;
}

/* --------------------------
   Hero Section (image controls height)
-------------------------- */
.hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.hero-section .hero-media { line-height: 0; }
.hero-section .hero-media img {
  display: block;
  width: 100%;
  height: auto;
}
.hero-section::after {
  content: "";
  position: absolute; inset: 0;
  background-color: rgba(0,0,0,0.4);
  z-index: 1;
}
.hero-content {
  position: absolute; inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  padding: 0 16px;
}
.hero-content h1 {
  font-family: 'Playfair Display', serif;
  margin: 0 0 10px;
  color: #fff;
  line-height: 1.15;
  white-space: normal;          /* allow wrap */
  word-break: break-word;
  max-width: 90vw;
  font-size: clamp(22px, 7vw, 34px);
}

/* --------------------------
   Generic Sections
-------------------------- */
.content-section {
  padding: 24px 16px;
  margin: 0 auto;
  text-align: center;
}
.content-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  margin-bottom: 8px;
}
.content-section p {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
}

/* --------------------------
   About Section (stacked)
-------------------------- */
.about-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: left;
  padding: 0 16px;
}
.about-section p { max-width: 100%; }
.about-section img {
  display: none;
}

/* --------------------------
   Call-to-Action Button
-------------------------- */
.cta-button {
  background-color: #333;
  color: #fff;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 16px;
  transition: background-color 0.25s;
  width: 100%;
  max-width: 320px;
}
.cta-button:hover { background-color: #555; }

/* --------------------------
   Masonry Portfolio (single column)
-------------------------- */
.masonry-grid {
  column-count: 2;
  column-gap: 16px;
  padding: 16px;
}
.masonry-item { break-inside: avoid; margin-bottom: 16px; }
.masonry-item img {
  width: 100%; height: auto; display: block;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: zoom-in;
  transition: transform 0.2s ease;
}
.masonry-item img:is(:hover,:focus) { transform: scale(1.01); outline: none; }

/* --------------------------
   Lightbox (Image Viewer)
-------------------------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.lightbox.is-open { display: flex; }

.lightbox__stage {
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__stage img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox__close {
  position: absolute; top: 16px; right: 16px;
  font-size: 28px; line-height: 1;
  background: transparent; color: #fff;
  border: none; cursor: pointer; padding: 8px 10px;
  opacity: 0.9;
}
.lightbox__close:hover { opacity: 1; }

.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  font-size: 28px;
  width: 44px; height: 44px;
  cursor: pointer; display: grid; place-items: center;
  user-select: none;
}
.lightbox__nav:hover { background: rgba(255,255,255,0.15); }
.lightbox__prev { left: 14px; }
.lightbox__next { right: 14px; }

.lightbox__counter {
  position: absolute; bottom: 14px; left: 50%;
  transform: translateX(-50%);
  color: #ddd; font-size: 13px; letter-spacing: 0.3px;
  background: rgba(0,0,0,0.35);
  padding: 6px 10px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* --------------------------
   Footer
-------------------------- */
footer {
  background-color: #f3f1ee;
  padding: 16px;
  text-align: center;
  font-size: 14px;
  color: #777;
  border-top: 1px solid #e0dedc;
}

/* --------------------------
   Social Icons
-------------------------- */
.social-icons { margin-top: 16px; }
.social-icons a {
  color: #777;
  margin: 0 8px;
  font-size: 18px;
  text-decoration: none;
  transition: color 0.25s;
}
.social-icons a:hover { color: #333; }

/* --------------------------
   Services (mobile cards)
-------------------------- */
.service-grid {
  width: 100%;
  margin: 16px auto 0;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr; /* single column on mobile */
  justify-content: center;
}
.service-card {
  background: #fff;
  border: 1px solid #e6e2dc;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.service-card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}
.service-media {
  position: relative; width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden; background: #eee;
}
.service-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.service-media::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,0.18);
  opacity: 0; transition: opacity 0.25s ease;
}
.service-card:hover .service-media::after { opacity: 1; }
.service-body {
  padding: 14px;
  flex-grow: 1;
  text-align: left;
}
.service-body h3 {
  font-size: 1rem; font-weight: 700; margin: 6px 0 8px; color: #333;
  font-family: 'Playfair Display', serif;
}
.service-body p { font-size: 0.95rem; color: #555; margin: 0; }
.service-link {
  display: inline-block; margin-top: 8px; font-size: 13px;
  text-decoration: none; color: #808080;
}
.service-link:hover { text-decoration: underline; }

/* --------------------------
   Contact
-------------------------- */
.contact-inner { max-width: 100%; margin: 0 auto; text-align: center; padding: 0 16px; }
.contact-item {
  display: flex; justify-content: center; align-items: center;
  gap: 10px; margin: 10px 0; line-height: 1.4;
}
.contact-item svg { width: 22px; height: 22px; fill: #333; flex: 0 0 22px; }
.contact-item strong { font-weight: 700; }

.contact-divider {
  border: none; border-top: 1px solid #333;
  margin: 18px auto; max-width: 260px;
}

.contact-social {
  display: flex; justify-content: center; gap: 12px; align-items: center; margin-top: 16px;
}
.social {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .2s ease, background .2s ease;
}
.social svg { width: 30px; height: 30px; fill: #333; }
.social:hover { transform: translateY(-2px); background: #1863B1; }

/* --------------------------
   Free Consultation Popup
-------------------------- */
.popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center; justify-content: center;
  z-index: 1000;
}
.popup-overlay.active { display: flex; }

.popup {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  max-width: 520px;
  width: 92%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  position: relative;
  text-align: left;
}
.popup h2 {
  margin: 0 0 12px 0;
  font-family: 'Playfair Display', serif;
}
.popup form label {
  display: block;
  margin: 8px 0 6px;
  font-weight: 700;
  font-size: 14px;
}
.popup form input,
.popup form textarea {
  width: 100%;
  padding: 10px 0px;
  border-radius: 8px;
  border: 1px solid #cccccc;
  font-family: inherit;
  font-size: 15px;
}
.popup .close-btn {
  position: absolute; top: 10px; right: 14px;
  font-size: 22px; line-height: 1;
  background: transparent; border: none; color: #666; cursor: pointer;
}
.popup form button {
  border-radius: 6px;
  padding: 12px 18px;
  border: none; color: #fff; font-weight: 700; cursor: pointer;
  transition: background-color 0.25s;
  margin-top: 12px;
  width: 33%;
}

/* --------------------------
   Small Phones Tweak
-------------------------- */
@media (max-width: 380px) {
  .nav-links a { font-size: 11px; padding: 6px; }
  .hero-content h1 { font-size: clamp(20px, 7.2vw, 30px); }
}

/* --------------------------
   Mobile Hamburger Nav
-------------------------- */
.hamburger {
  background: none;
  border: none;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  display: block;
  z-index: 30;
}

/* Hide nav links by default on mobile */
.nav-links {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 60px; right: 12px;
  background: rgba(0,0,0,0.9);
  padding: 12px;
  border-radius: 8px;
}

/* Show when toggled */
.nav-links.show {
  display: flex;
}

.nav-links a {
  display: block;
  margin: 8px 0;
}

/* Desktop: hide hamburger, show nav */
@media (min-width: 1201px) {
  .hamburger { display: none; }
  .nav-links { display: flex !important; position: static; background: none; flex-direction: row; }
  .nav-links a { margin: 0; }
}
