/* ═══════════════════════════════════════════════════
   GIY Architecture Inc. — Shared Components
   Header, Footer, CTA Banner, Theme Toggle, Dropdown
   ═══════════════════════════════════════════════════ */

/* ─── HEADER / NAV ─── */
#site-header {
  /* Prevent FOUC: reserve space and hide until JS injects content */
  min-height: 0;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px var(--px);
  background: transparent;
  transition: background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  background: var(--bg);
  border-bottom-color: var(--border);
}

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
}

.logo-img {
  height: 80px;
  width: auto;
  display: block;
  /*
   * mix-blend-mode: multiply makes a white PNG background transparent on
   * light-coloured surfaces. Does not work in dark mode — a separate
   * dark-mode logo asset (white/light version) is needed for that.
   */
  mix-blend-mode: multiply;
}

[data-theme="dark"] .logo-img {
  mix-blend-mode: normal;
  /* TODO: swap to a light/white logo variant in dark mode */
}

.footer-logo-img {
  height: 80px;
}

/* Nav links */
.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-links a {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* Dark-hero pages (body.nav-on-dark): the fixed nav is transparent over a dark
   image until scrolled, so the default dark menu links are invisible. Invert the
   menu to light while transparent; once .scrolled adds the solid background, the
   normal dark-on-light colors apply again. */
body.nav-on-dark nav:not(.scrolled) .nav-links > a,
body.nav-on-dark nav:not(.scrolled) .nav-dropdown > .dropdown-toggle {
  color: rgba(255, 255, 255, 0.85);
}

body.nav-on-dark nav:not(.scrolled) .nav-links > a:hover,
body.nav-on-dark nav:not(.scrolled) .nav-links > a.active,
body.nav-on-dark nav:not(.scrolled) .nav-dropdown > .dropdown-toggle:hover {
  color: #fff;
}

body.nav-on-dark nav:not(.scrolled) .nav-dropdown .dropdown-toggle::after {
  border-color: rgba(255, 255, 255, 0.85);
}

/* ─── SERVICES DROPDOWN ─── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-dropdown .dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1px solid var(--text-muted);
  border-bottom: 1px solid var(--text-muted);
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 0.3s, border-color 0.3s;
}

.nav-dropdown:hover .dropdown-toggle::after {
  transform: rotate(-135deg);
  border-color: var(--text);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: -20px;
  min-width: 320px;
  padding: 20px 0;
  background: var(--bg);
  border: 1px solid var(--border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 110;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 24px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-muted);
  transition: color 0.3s, padding-left 0.3s;
}

.dropdown-menu a:hover {
  color: var(--text);
  padding-left: 32px;
}

/* ─── STANDARD CTA BANNER ─── */
.cta-banner {
  position: relative;
  padding: 120px var(--px);
  text-align: center;
  background: #111;
  color: #E8E4DF;
  overflow: hidden;
}

.cta-banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Real GIY photo by default; stock variant swaps in via body.images-stock */
  background: url('../img/photos/proj-church-tower.jpg') center/cover no-repeat;
  opacity: 0.25;
}

body.images-stock .cta-banner-bg {
  background-image: url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?w=1600&q=80');
}

.cta-banner-content {
  position: relative;
  z-index: 2;
}

.cta-banner h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 24px;
  color: #E8E4DF;
}

.cta-banner p {
  font-size: 16px;
  line-height: 1.75;
  color: rgba(232, 228, 223, 0.7);
  max-width: 600px;
  margin: 0 auto 40px;
}

.cta-banner .btn {
  border-color: var(--accent-warm);
  color: #E8E4DF;
}

.cta-banner .btn:hover {
  background: var(--accent-warm);
  color: #111;
}

/* ─── BRANCH LOCATIONS (shared component: About + Contact pages) ─── */
.locations-section,
.contact-locations {
  padding: 120px var(--px);
  background: var(--bg-alt);
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.locations-grid-row2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 66.66%;
}

.location-card {
  background: var(--card-bg);
  border-radius: 2px;
  overflow: hidden;
}

.location-map {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.location-info {
  padding: 24px;
}

.location-info .location-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.location-info .location-address {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.location-info .location-phone {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.location-info .location-hours {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 80px var(--px) 40px;
  gap: 60px;
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 4px;
}

.footer-columns {
  display: flex;
  gap: 60px;
}

.footer-col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  font-weight: 400;
}

.footer-col a,
.footer-col p {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.3s;
  line-height: 1.6;
}

.footer-col a:hover {
  color: var(--text);
}

/* Social icons */
.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.3s, border-color 0.3s;
  margin-bottom: 0;
}

.footer-social a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Footer bottom bar */
.footer-bottom {
  text-align: center;
  padding: 24px var(--px);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  border-top: 1px solid var(--border);
}

/* ─── MOBILE NAV TOGGLE (for responsive) ─── */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-mobile-toggle span {
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

/* ─── MOCKUP REVIEW CONTROLS (theme + image mode) — mockup phase only ─── */
/* Bottom-left cluster shared by the floating Theme and Photos pills. */
#dev-controls {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.dev-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: color 0.3s, border-color 0.3s, background 0.3s, opacity 0.3s;
  opacity: 0.55;
}

.dev-control:hover {
  opacity: 1;
  color: var(--text);
  border-color: var(--accent);
}

.dev-control-value {
  color: var(--accent);
  font-weight: 500;
}

