* {
  box-sizing: border-box;
}

html { scroll-behavior: auto; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
  line-height: 1.6;
  background: #fff;
}

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

.site-header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-wrap {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  color: #171717;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 800;
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
}

nav a:hover,
.area-list a:hover,
.card a:hover {
  text-decoration: underline;
}

.phone-button,
.button {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
}

.phone-button,
.button.primary {
  background: #1f5f32;
  color: #fff;
}

.phone-button:hover,
.button.primary:hover {
  background: #174925;
}

.hero {
  padding: 110px 0;
  background-image: url('../images/black-chain-link-fence-background.png');
}

.hero-content {
  max-width: 850px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #1f5f32;
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.15;
}

h1 {
  max-width: 850px;
  margin: 0 0 20px;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.hero-text,
.section-intro {
  max-width: 760px;
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button.secondary {
  color: #1f5f32;
  border: 2px solid #1f5f32;
}

.section {
  padding: 85px 0;
}

.section-light {
  background: #f5f5f5;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}

.card {
  padding: 28px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
}

.card h3 {
  margin-top: 0;
  font-size: 1.4rem;
}

.card a {
  color: #1f5f32;
  font-weight: 700;
}

.two-column {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 50px;
  align-items: start;
}

.trust-box,
.contact-box {
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #ddd;
}

.area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.area-list a {
  padding: 10px 16px;
  color: #1f5f32;
  border: 1px solid #bbb;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
}

.contact-section {
  background: #eef2ed;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.contact-box a:not(.button) {
  color: #1f5f32;
  font-size: 1.2rem;
  font-weight: 700;
}

.site-footer {
  padding: 30px 0;
  background: #1c1c1c;
  color: #fff;
}

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

@media (max-width: 850px) {
  .nav-wrap {
    flex-wrap: wrap;
    padding: 15px 0;
  }

  nav {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .cards,
  .two-column,
  .contact-content {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 75px 0;
  }
}

@media (max-width: 520px) {
  .phone-button {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    text-align: center;
  }

  .footer-wrap {
    flex-direction: column;
  }
}


/* Added homepage photography and migrated content */
.hero {
  position: relative;
  background-image: url("../images/20170716_151209wood fence-boaz-alabama-35957.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .58);
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero .eyebrow {
  color: #d9eadc;
}
.hero .button.secondary {
  color: #fff;
  border-color: #fff;
}
.photo-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.photo-grid img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
}
.area-list span {
  padding: 10px 16px;
  color: #1f5f32;
  border: 1px solid #bbb;
  border-radius: 5px;
  font-weight: 700;
  background: #fff;
}
@media (max-width: 850px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }
}

/* Service-area pages */
.location-hero {
  padding: 95px 0;
  background: #eef2ed;
}
.location-hero h1 {
  max-width: 900px;
}
.narrow {
  max-width: 850px;
}
.faq-item {
  padding: 24px 0;
  border-bottom: 1px solid #ddd;
}
.faq-item h3 {
  margin: 0 0 8px;
}
.faq-item p {
  margin: 0;
}
.faq-item a,
.trust-box a {
  color: #1f5f32;
  font-weight: 700;
}

.faq-list {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}
.faq-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 22px;
}
.faq-item h3 {
  margin-top: 0;
}

/* SEO/content upgrade: FAQ and project information */
.faq-list{max-width:900px;margin-top:32px}.faq-list details{background:#fff;border:1px solid #ddd;border-radius:8px;padding:18px 20px;margin:12px 0}.faq-list summary{cursor:pointer;font-weight:800;font-size:1.08rem}.faq-list details p{margin-bottom:0}.service-photo{width:100%;border-radius:10px;max-height:520px;object-fit:cover}

/* Blog */
.blog-hero { min-height: 420px; }
.blog-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:28px; margin-top:30px; }
.blog-card { background:#fff; border:1px solid #ddd; border-radius:10px; overflow:hidden; box-shadow:0 8px 22px rgba(0,0,0,.07); }
.blog-card img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  display: block;
}
.blog-card-body { padding:24px; }
.blog-card h3 { margin-top:8px; }
.blog-card h3 a { color:inherit; text-decoration:none; }
.blog-card h3 a:hover { text-decoration:underline; }
.blog-meta { font-size:.9rem; color:#666; font-weight:600; }
.text-link { font-weight:700; }
.article-container { max-width:850px; }
.article-header { padding-bottom:36px; }
.article-lead { font-size:1.2rem; line-height:1.7; }
.article-feature-image {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  display: block;
  border-radius: 10px;
}
.article-copy { font-size:1.06rem; line-height:1.75; }
.article-copy h2 { margin-top:38px; }
.article-callout { background:#f4f7f2; border-left:5px solid #1f5f32; padding:22px 26px; margin:34px 0; }
.blog-feature { display:grid; grid-template-columns:1fr 1fr; gap:36px; align-items:center; }
.blog-feature img { width:100%; max-height:420px; object-fit:cover; border-radius:10px; }
@media (max-width:800px) {
  .blog-feature { grid-template-columns:1fr; }
}

/* Project video */
.project-video{max-width:900px;margin:0 auto}.project-video video{display:block;width:100%;height:auto;border-radius:10px;background:#111;box-shadow:0 8px 24px rgba(0,0,0,.14)}.project-video h3{margin-bottom:16px}.video-caption{margin-top:14px;line-height:1.65;color:#555}

/* Service-area project photos: reduced to 50% display width */
.service-area-photo-half {
  width: 50% !important;
  height: auto;
  justify-self: center;
  display: block;
}

/* About section owner photo: approximately 5 inches wide by 4 inches tall on desktop. */
.owner-about-photo {
  width: 5in;
  height: 4in;
  max-width: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 600px) {
  .owner-about-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 4;
  }
}

.photo-caption {
  margin-top: 10px;
  font-size: .92rem;
  color: #666;
  line-height: 1.5;
}

/* Local service-area project images: intentionally reduced for a cleaner layout */
.service-area-photo-half { width:50%; max-width:520px; height:auto; display:block; margin:0 auto; }
@media (max-width:720px){ .service-area-photo-half { width:100%; max-width:100%; } }

/* iPhone / Safari mobile improvements */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
}

video {
  display: block;
}

a,
button,
.button,
input,
select,
textarea {
  touch-action: manipulation;
}

.button,
.phone-button,
.area-list a,
nav a {
  min-height: 44px;
}

.button,
.phone-button,
.area-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .site-header,
  .contact-section,
  footer {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 28px, 1100px);
  }

  .hero-actions,
  .contact-content,
  .photo-grid,
  .two-column {
    gap: 18px;
  }

  .button,
  .phone-button {
    width: 100%;
    min-height: 48px;
  }

  .area-list a {
    min-height: 44px;
    padding: 10px 14px;
  }

  nav a {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  video {
    width: 100%;
  }
}

/* Project Gallery */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}
.gallery-card {
  margin: 0;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 18px rgba(0,0,0,.10);
}
.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.gallery-card figcaption {
  padding: 13px 15px 16px;
  line-height: 1.45;
}
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 20px 24px;
}
.gallery-lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.gallery-lightbox p {
  color: #fff;
  text-align: center;
  margin: 16px auto 0;
  max-width: 850px;
}
.gallery-close {
  position: absolute;
  top: 12px;
  right: 18px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}
.gallery-modal-open { overflow: hidden; }

@media (max-width: 900px) {
  .project-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .project-gallery { grid-template-columns: 1fr; gap: 18px; }
  .gallery-card img { aspect-ratio: 16 / 10; }
}

/* Reliable navigation alignment */
html {
  scroll-behavior: auto;
}

section[id] {
  scroll-margin-top: 0;
}

/* Chain-Link page hero — must remain after generic .city-hero rules */
.chainlink-page-hero {
  background-image: url("../images/black-chain-link-fence-background.png");
  background-size: cover;
  background-position: center;
}

/* Vinyl Fence page hero — page-specific image overrides generic wood hero */
.vinyl-page-hero {
  background-image: url("../images/vinyl-fence-hero-clean.png");
  background-size: cover;
  background-position: center;
}

.service-project-photo {
  margin: 24px 0;
}
.service-project-photo img {
  display: block;
  width: 100%;
  max-width: 1000px;
  height: auto;
  border-radius: 10px;
}
.service-project-photo figcaption {
  margin-top: 8px;
  font-size: .95rem;
}

/* Ornamental Fence page hero — page-specific image overrides generic hero */
.ornamental-page-hero {
  background-image: url("../images/ornamental-fence-puppy-pickets-trussville-alabama.jpg");
  background-size: cover;
  background-position: center;
}

/* Hooks Fence Company logo branding */
.logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  line-height: 0;
}
.logo img {
  display: block;
  width: clamp(190px, 19vw, 285px);
  height: auto;
  max-height: 92px;
  object-fit: contain;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.footer-logo img {
  display: block;
  width: min(250px, 55vw);
  height: auto;
  max-height: 82px;
  object-fit: contain;
}
.footer-wrap {
  align-items: center;
  flex-wrap: wrap;
}
@media (max-width: 850px) {
  .logo img {
    width: min(240px, 62vw);
    max-height: 78px;
  }
  .nav-wrap {
    gap: 14px 18px;
  }
  .footer-logo img {
    width: min(220px, 70vw);
  }
}
@media (max-width: 520px) {
  .logo img {
    width: min(205px, 58vw);
    max-height: 68px;
  }
}

/* Larger Hooks Fence Company header logo */
.logo img {
  width: clamp(245px, 24vw, 365px);
  max-height: 118px;
}
.nav-wrap {
  min-height: 96px;
}
@media (max-width: 850px) {
  .logo img {
    width: min(285px, 66vw);
    max-height: 92px;
  }
  .nav-wrap {
    min-height: 82px;
  }
}
@media (max-width: 520px) {
  .logo img {
    width: min(235px, 62vw);
    max-height: 78px;
  }
  .nav-wrap {
    min-height: 72px;
  }
}

/* Desktop header spacing polish: keep navigation and estimate CTA on one line */
@media (min-width: 851px) {
  .nav-wrap {
    gap: 18px;
  }
  .nav-wrap nav {
    gap: 16px;
    flex: 1 1 auto;
    justify-content: center;
  }
  .nav-wrap nav a,
  .nav-wrap .phone-button {
    white-space: nowrap;
  }
  .nav-wrap nav a {
    font-size: 0.96rem;
  }
  .nav-wrap .phone-button {
    padding: 12px 16px;
    flex: 0 0 auto;
  }
}
