:root {
  --navbar-height: 120px;
  --navbar-height-mobile: 64px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  line-height: 1.6;
  /* make room for fixed navbar - use variable so mobile can override */
  padding-top: var(--navbar-height);
}

/* Reset default browser link styles (remove blue color and underlines) */
a,
a:link,
a:visited {
  color: inherit;
  text-decoration: none;
}

/* keep visible focus for keyboard users */
a:focus {
  outline: 3px solid rgba(46,204,113,0.25);
  outline-offset: 2px;
}

/* HERO */
.hero {
  height: calc(100vh - var(--navbar-height));
  /* anchor image to bottom center (change to top left / center 30% / etc.) */
  background-image: url("images/house2.PNG");
  background-position: center center; /* start centered; JS will modify on scroll */
  background-size: cover;             /* cover keeps aspect and crops */
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  background-attachment: scroll;      /* keep as scroll for mobile-safe behavior */
  will-change: background-position;
}

/* avoid background-attachment: fixed on small screens */
@media (min-width: 900px) {
  .hero {
    /* background-attachment: fixed can cause issues on some browsers; we use JS instead */
    background-position: center center;
  }
}

/* keep mobile fallback anchored to bottom */
@media (max-width: 900px) {
  .hero { background-position: center bottom !important; }
}

/* Logo (used in navbar) */
.logo {
  max-height: 120px;
  width: auto;
  display: block;
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 20px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  z-index: 1000;
}

.navbar .brand { display:flex; align-items:center; text-decoration:none; }
.nav-links { display:flex; align-items:center; gap:12px; }
.nav-links ul { list-style:none; display:flex; gap:16px; margin:0; padding:0; }
.nav-links a { color: #111; text-decoration: none; padding: 8px 10px; }
/* make navbar Call button compact and vertically centered */
.nav-btn {
  /* override .btn's top margin so it doesn't push down inside navbar */
  margin-top: 0;
  margin-bottom: 15px;            /* removed extra bottom margin that caused overflow */
  margin-left: 12px;
  display: inline-flex;
  align-items: center;         /* center vertically */
  justify-content: center;
  padding: 8px 12px;           /* slightly reduced padding for mobile fit */
  height: auto;
  line-height: 1;              /* keep single-line text aligned with padding */
  border-radius: 6px;
}

.menu-toggle { display: none; background: none; border: none; font-size: 24px; }

@media (max-width: 700px) {
  /* mobile navbar height + body/hero sync */
  .navbar { height: var(--navbar-height-mobile); padding: 0 12px; }
  body { padding-top: var(--navbar-height-mobile); }
  .hero { height: calc(100vh - var(--navbar-height-mobile)); }

  /* show toggle button */
  .menu-toggle { display: block; }

  /* collapse desktop list by default */
  .nav-links ul { display: none; }

  /* mobile menu panel (hidden until .nav-open on .navbar) */
  .nav-links {
    position: absolute;
    top: var(--navbar-height-mobile);
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    display: none;
    flex-direction: column;
    padding: 8px 12px;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  }

  /* when JS toggles .nav-open on .navbar, show menu */
  .navbar.nav-open .nav-links {
    display: flex;
  }

  .navbar.nav-open .nav-links ul {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .nav-links a { padding: 10px 8px; }

  /* scale down logo for mobile */
  .logo { max-height: 48px; }
  .nav-btn { padding: 8px 10px; }
}

/* Card images: consistent size inside .card */
.card-img {
  display: block;
  width: 100%;           /* fill card width */
  height: 180px;         /* fixed visual height — tweak as needed */
  object-fit: cover;     /* crop/scale to fill without distortion */
  border-radius: 8px;    /* match card radius */
  margin-top: auto;     /* push image to bottom of card */
  box-shadow: rgba(0,0,0,0.06) 0 1px 4px;
}

/* smaller images on narrow screens */
@media (max-width: 480px) {
  .card-img { height: 110px; }
}

.overlay {
  background: rgba(0, 0, 0, 0.719);
  color: white;
  padding: 40px;
  text-align: center;
}

.overlay h1 {
  font-size: 2.5rem;
}

.overlay p {
  margin: 10px 0;
}

/* BUTTON */
.btn {
  display: inline-block;
  background: #2ecc71;
  color: white;
  padding: 12px 24px;
  margin-top: 15px;
  text-decoration: none;
  border-radius: 5px;
}

/* SECTIONS */
.section {
  padding: 60px 20px;
  text-align: center;
}

.dark {
  background: #222;
  color: white;
}

/* GRID */
.grid {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.card {
  background: #f4f4f4;
  padding: 20px;
  width: 250px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}

.dark .card {
  background: #333;
}

/* GALLERY */
.gallery {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.gallery img {
  width: 300px;
  border-radius: 10px;
}

/* CTA */
.cta {
  background: #2ecc71;
  color: white;
  text-align: center;
  padding: 60px 20px;
}

/* FOOTER */
footer {
  background: #111;
  color: white;
  text-align: center;
  padding: 20px;
}