/* 
========================================================
  HILLTOP STYLES GUIDE — WHERE TO EDIT WHAT
========================================================

MOST COMMON EDITS (SAFE):
1) Change site colors:
   - Look for :root variables at the top (recommended)
   - Example: --gold, --brown, --green, --tan

2) Change header look:
   - Search: "Header Styles"
   - Edit: .site-header, .site-nav, .logo, .hamburger

3) Change buttons:
   - Search: "Buttons"
   - Edit: .button, .button-primary, .button-ghost

4) Change hero section:
   - Search: "Hero Section"
   - Edit: .hero height, overlay darkness, h1 size

5) Change footer layout:
   - Search: "Footer (chrome.html)"
   - Edit: .site-footer, .footer-grid, .footer-links, .footer-phones

DO NOT EDIT (unless you know what you're doing):
- Lightbox section (used by image gallery)
- Anything with "DO NOT TOUCH" notes

IF SOMETHING LOOKS BROKEN:
- Check for duplicate rules (same selector defined multiple times)
- The LAST rule wins in CSS

========================================================
*/


/* ========================================================
   QUICK EDIT CHEAT SHEET (1-minute changes)
   --------------------------------------------------------
   Make header taller/shorter:        .site-header { padding: ... }
   Change logo size:                  .site-header .logo { font-size: ... }
   Change hero height:                .hero { height: ... }
   Make buttons bigger/smaller:       .button { padding / font-size }
   Change footer hover color:         .site-footer a:hover { color: ... }
   Change footer columns:             .footer-grid { grid-template-columns: ... }
======================================================== */


/* ==========================
   POLISH: Global spacing + type
========================== */
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.description p { margin: 0 0 14px; }

.section-title { letter-spacing: 0.2px; }

/* Give sections a little more breathing room */
.description,
.services-section,
.projects-section,
.contact-form-section,
.faq {
  margin: 44px auto;
}


/* ==========================
   General Styles
========================== */
:root{
  --brown: #573831;
  --tan: #F5F5DC;
  --gold: #c29819;
  --green: #2E7D32;
  --text: #333333;

  --header-padding: 18px;
  --hero-height: 60vh;

  --footer-link-color: #f7f6f4;
  --footer-link-hover: #ffffff;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--tan);
  overflow-x: hidden;
  width: 100%;
  text-align: center;
}

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

/* Default links (NOT buttons) */
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }


/* ==========================
   Buttons
========================== */
.button,
a.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  background-color: var(--gold);
  color: #fff;
  padding: 12px 25px;
  font-size: 1rem;
  font-weight: 700;

  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;

  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.button:hover,
a.button:hover,
button.button:hover {
  background-color: var(--green);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
  text-decoration: none;
}

.button svg,
button.button svg {
  margin-right: 8px;
  transition: transform 0.2s ease;
}
.button:hover svg,
button.button:hover svg {
  transform: scale(1.08);
}


/* ==========================
   Header Styles
========================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--brown);
  color: #fff;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  padding: 18px 0;
}

.site-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Brand */
.site-header .logo {
  font-weight: 900;
  letter-spacing: 0.3px;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: #f7f7f7;
  text-decoration: none;
}
.site-header .logo .logo-sub {
  font-weight: 900;
  opacity: 0.9;
  font-size: 1.25rem;
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  color: #fff;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
}
.site-nav a:hover {
  background-color: rgba(255,255,255,0.10);
  text-decoration: none;
}

/* Header button variants */
.button-primary { background: var(--gold); color: #2b1a14; }
.button-primary:hover { background: #ffcf3a; color: #2b1a14; }

.button-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.35);
  color: #fff;
  box-shadow: none;
}
.button-ghost:hover {
  border-color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.08);
  transform: none;
}

/* Hamburger Menu (Mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 110;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}


/* ==========================
   Hero Styles
========================== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;              /* full screen hero */
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  overflow: hidden;
  color: #fff;
  padding: 0;

  /* fallback background */
  background: url("media/logoverhead.jpg") center / cover no-repeat;
}

/* Video + overlay sizing */
.hero-video,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video {
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}

.hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0.25),
    rgba(0, 0, 0, 0.55)
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding-top: 20px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero-content h1 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 15px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}

.hero-content h3 {
  font-size: 1rem;
  font-weight: 100;
  margin-bottom: 15px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}

.hero-content h1,
.hero-content h3,
.hero-content p {
  color: #ffffff;
  text-shadow:
    1px 1px 2px rgba(0, 0, 0, 0.95),
   -1px 1px 2px rgba(0, 0, 0, 0.95),
    1px -1px 2px rgba(0, 0, 0, 0.95),
   -1px -1px 2px rgba(0, 0, 0, 0.95),
    0 6px 20px rgba(0, 0, 0, 0.8);
}

.hero-play{
  position:absolute;
  z-index:3;
  left:24px;
  bottom:24px;
  padding:10px 14px;
  border-radius:10px;
  border:0;
  font-weight:800;
  cursor:pointer;
  display:none;
}
.hero.no-video .hero-play{ display:inline-flex; }


@media (max-width: 768px) {

  /* Let hero reach the very top on homepage */
  body.homepage {
    padding-top: 0;
  }

  /* Hero layout */
  .hero {
    justify-content: center;
    text-align: center;
    height: 100svh;   /* iOS-safe full height */
    min-height: 0;
  }

  .hero-content {
    margin-left: 0;
    padding: 0 20px;
  }

  /* Reduce perceived zoom on iPhone */
  .hero-video {
    object-position: 50% 50%;
    .hero-video { object-fit: cover; transform: scale(0.96); }
  }

}

/* ==========================
   Sections & Grids
========================== */
.description,
.services-section,
.projects-section,
.contact-form-section,
.faq {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 20px;

}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 30px;
  color: var(--brown);
}

/* Keep same look; improve layout consistency */
.services-grid,
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  justify-items: center;
}

.service-item,
.media-item {
  width: 100%;
  max-width: 260px;

  background: rgba(245,245,220,0.85);
  padding: 22px 16px;
  border-radius: 14px;
  text-align: center;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 8px 22px rgba(0,0,0,0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-item:hover,
.media-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.16);
}

/* Service icons ONLY */
.services-section .service-item img { max-width: 60px; }

/* Project photos ONLY */
.projects-section .media-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  transition: transform 0.2s ease;
}
.projects-section .media-item:hover img { transform: scale(1.04); }

.service-item h3,
.service-item p {
  position: relative;
  z-index: 1;
  color: var(--text);
  transition: transform 0.2s ease, color 0.2s ease;
}

.service-item:hover h3 { color: var(--green); }
.service-item:hover p { transform: translateY(-5px); }


/* ==========================
   Contact Form
========================== */
.contact-form-section {
  padding: 20px;
  background: var(--tan);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contact-form-section form .form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.contact-form-section form input,
.contact-form-section form select,
.contact-form-section form textarea {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form-section form input:focus,
.contact-form-section form select:focus,
.contact-form-section form textarea:focus {
  outline: none;
  border-color: var(--brown);
  box-shadow: 0 0 5px rgba(78,52,46,0.3);
}

.contact-form-section form button { margin-top: 10px; }


/* ==========================
   Footer (chrome.html)
========================== */
/* Tightened spacing, same overall look */
.site-footer {
  background-color: var(--brown);
  color: #fff;
  padding: 28px 20px 0; /* was 34px */
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 20px; /* was 26px */
  align-items: start;
}

.footer-brand {
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 6px; /* slightly tighter */
}

.footer-title {
  font-weight: 900;
  margin-bottom: 8px; /* slightly tighter */
}

.footer-muted { opacity: 0.9; font-size: 0.95rem; }
.footer-address { margin-top: 10px; opacity: 0.95; }

.footer-links,
.footer-phones {
  display: grid;
  gap: 6px; /* was 8px */
}

/* Footer links */
.site-footer a {
  color: var(--footer-link-color);
  font-weight: 800;
  opacity: 1;
  visibility: visible;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-footer a:hover {
  color: var(--footer-link-hover);
  opacity: 1;
  visibility: visible;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 22px; /* was 28px */
  padding: 12px 0;  /* was 14px */
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}


/* ==========================
   Mobile Styles
========================== */
@media (max-width: 768px) {
  body { padding-top: 120px; }

  .site-header .logo { font-size: 1.15rem; }

  .site-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-top: 10px;
  }

  .site-nav.active { display: flex; }
  .hamburger { display: flex; }
  /* grid already handles wrapping; reduce gaps */
  .services-grid, .media-grid { gap: 15px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  body { padding-top: 140px; }
  .site-header .logo { font-size: 1.05rem; }
  .button, a.button, button.button { width: 100%; }
  .hero-content { max-width: 90%; padding: 0 20px; }
  .projects-section .media-item img { height: 160px; }
}

@media (max-width: 768px) {
  .projects-section .media-item img { height: 180px; }
}


/* ==========================
   Lightbox (REPLACEMENT)
========================== */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
  z-index: 99999;
  cursor: zoom-out;
  overscroll-behavior: contain;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

.lightbox-track {
  display: flex;
  transition: transform 0.35s ease;
  height: 100%;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  will-change: transform;
  pointer-events: none;
}

.lightbox-track .slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.lightbox-track img {
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  object-fit: contain;
  user-select: none;
  transition: transform 0.2s ease;
  transform-origin: center center;
  pointer-events: none;
}

.lightbox .prev,
.lightbox .next,
.lightbox-dots,
.lightbox-dots .dot {
  pointer-events: auto;
}

.lightbox .prev,
.lightbox .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: #fff;
  background: rgba(0,0,0,0.4);
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.lightbox .prev { left: 15px; }
.lightbox .next { right: 15px; }

.lightbox .prev:hover,
.lightbox .next:hover { background: rgba(0,0,0,0.7); }

.lightbox-dots {
  position: absolute;
  bottom: 15px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 10;
}

.lightbox-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-dots .dot.active { background: #fff; }

@media (max-width: 768px) {
  .lightbox .prev, .lightbox .next { width: 35px; height: 35px; font-size: 1.5rem; }
  .lightbox-dots .dot { width: 8px; height: 8px; }
}

@media (max-width: 480px) {
  .lightbox .prev, .lightbox .next { width: 30px; height: 30px; font-size: 1.2rem; }
  .lightbox-dots { bottom: 10px; }
}


/* ==========================
   Hero: Mobile fallback image
========================== */
@media (max-width: 768px) {
  /* allow the video to be used on mobile */
  .hero-video { display: block; }

  /* keep the poster/fallback image as the hero background in case video can’t autoplay */
  .hero { background: url("media/hero-fallback.jpg") center / cover no-repeat; }
}



/* ==========================
   Animated Header (Homepage Only)
========================== */
 .site-header {
  background-color: transparent;
  box-shadow: none;

  transition:
    background-color 220ms ease,
    padding 220ms ease,
    box-shadow 220ms ease,
    backdrop-filter 220ms ease,
    transform 220ms ease,
    opacity 220ms ease;

  transform: translateY(-10px);
  opacity: 0;
  animation: gzHeaderIntro 520ms ease-out forwards;
}

@keyframes gzHeaderIntro {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

 .site-header.is-scrolled {
  background-color: rgba(87, 56, 49, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  padding: 10px 0;

  body.hero-dark .site-header.is-scrolled { background-color: #111; }
  body.hero-green .site-header.is-scrolled { background-color: var(--green); }

}

/* ==========================
   Header mode system
   - data-header="transparent" or "solid"
   - JS sets this per page (override > auto)
========================== */

/* Default if nothing set (safe fallback) */
.site-header { background-color: var(--brown); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

/* Mode: transparent (top of page) */
.site-header[data-header="transparent"] {
  background-color: transparent;
  box-shadow: none;
}

/* Mode: solid (always brown) */
.site-header[data-header="solid"] {
  background-color: var(--brown);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Scroll state (always brown + shrink) */
.site-header.is-scrolled {
  background-color: var(--brown);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  padding: 10px 0;
}


/* ==========================
   Footer tightening (no redesign)
========================== */
.site-footer .footer-grid {
  gap: 18px;                 /* slightly tighter than 20/26 */
}

.site-footer .footer-col {
  min-width: 0;
}

.site-footer .footer-brand {
  margin-bottom: 6px;
  line-height: 1.15;
}

.site-footer .footer-muted {
  line-height: 1.4;
}

.site-footer .footer-address {
  margin-top: 10px;
  line-height: 1.35;
}

.site-footer .footer-title {
  margin-bottom: 8px;
  line-height: 1.15;
}

.site-footer .footer-links,
.site-footer .footer-phones {
  gap: 6px;                  /* tighter list spacing */
}

.site-footer a {
  line-height: 1.2;          /* prevents “loose” link spacing */
}

.site-footer .footer-bottom {
  margin-top: 20px;
  padding: 12px 0;
}

.site-footer .footer-bottom-inner {
  align-items: center;
}

/* Mobile: tighter vertical rhythm */
@media (max-width: 768px) {
  .site-footer { padding: 24px 20px 0; }
  .site-footer .footer-grid { gap: 16px; }
  .site-footer .footer-address { margin-top: 8px; }
  .site-footer .footer-bottom { margin-top: 16px; }
}

/* ==========================
   Service Areas list fix
========================== */
.service-areas {
  list-style-position: inside;   /* pulls bullets closer to text */
  padding-left: 0;               /* remove default browser indent */
  margin: 12px auto 16px;
  max-width: 420px;              /* keeps list visually tight */
}

.service-areas li {
  padding-left: 0;
  margin: 6px 0;
  line-height: 1.4;
}

@media (max-width: 768px) {

  /* Let hero breathe on mobile */
  body.homepage {
    padding-top: 0;
  }

  .hero {
    height: 100svh;
    min-height: 0;
    align-items: flex-end;   /* push text lower */
    padding-bottom: 64px;   /* space from bottom */
  }

  /* Text container */
  .hero-content {
    max-width: 90%;
    margin: 0 auto;
    padding: 16px 18px;

    text-align: center;
  }

  /* Headline */
  .hero-content h1 {
    font-size: 1.35rem;
    line-height: 1.25;
    margin-bottom: 8px;
  }

  /* Supporting text */
  .hero-content h3 {
    font-size: 0.95rem;
    line-height: 1.45;
    font-weight: 400;
    margin-bottom: 14px;
  }

  /* Button */
  .hero-content .button {
    padding: 10px 18px;
    font-size: 0.95rem;
  }

  /* Video crop tuning */
  .hero-video {
    object-position: 50% 45%;
  }
}
