/* ========================================
   Palisade Roofing - Main Stylesheet
   Colors: Dark (#1a1a1a) + White + Gold (#c8962e)
   Font: Inter (Google Fonts)
   ======================================== */

:root {
  --color-dark: #1a1a1a;
  --color-dark-alt: #2a2a2a;
  --color-gold: #c8962e;
  --color-gold-hover: #b0831f;
  --color-white: #ffffff;
  --color-light: #f5f5f5;
  --color-gray: #6b7280;
  --color-gray-light: #e5e7eb;
  --color-text: #333333;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --header-height: 80px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-main); color: var(--color-text); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-gold); text-decoration: none; }
a:hover { color: var(--color-gold-hover); }
ul { list-style: none; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--color-dark); }
h1 { font-size: 2.5rem; font-weight: 800; }
h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }

/* ---- Utilities ---- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.section-dark { background: var(--color-dark); color: var(--color-white); }
.section-dark h2, .section-dark h3 { color: var(--color-white); }
.section-light { background: var(--color-light); }
.text-center { text-align: center; }
.text-gold { color: var(--color-gold); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; padding: 0.75rem 1.75rem; border-radius: 4px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all 0.2s;
  border: 2px solid transparent; text-align: center;
}
.btn-primary { background: var(--color-gold); color: var(--color-white); border-color: var(--color-gold); }
.btn-primary:hover { background: var(--color-gold-hover); border-color: var(--color-gold-hover); color: var(--color-white); }
.btn-outline { background: transparent; color: var(--color-gold); border-color: var(--color-gold); }
.btn-outline:hover { background: var(--color-gold); color: var(--color-white); }
.btn-dark { background: var(--color-dark); color: var(--color-white); border-color: var(--color-dark); }
.btn-dark:hover { background: var(--color-dark-alt); }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.05rem; }
.btn-white { background: var(--color-white); color: var(--color-dark); border-color: var(--color-white); }
.btn-white:hover { background: var(--color-light); }

/* ---- Header ---- */
.site-header {
  background: var(--color-dark); position: sticky; top: 0; z-index: 100;
  height: var(--header-height); display: flex; align-items: center;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.logo { display: flex; flex-direction: column; line-height: 1; }
.logo-text { font-size: 1.4rem; font-weight: 800; color: var(--color-white); letter-spacing: 2px; }
.logo-sub { font-size: 0.7rem; font-weight: 500; color: var(--color-gold); letter-spacing: 4px; text-transform: uppercase; }
.nav-list { display: flex; gap: 1.5rem; align-items: center; }
.nav-list a { color: var(--color-white); font-weight: 500; font-size: 0.9rem; padding: 0.5rem 0; transition: color 0.2s; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--color-gold); }
.has-dropdown { position: relative; }
.dropdown {
  display: none; position: absolute; top: 100%; left: 0; background: var(--color-dark-alt);
  min-width: 220px; padding: 0.5rem 0; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.has-dropdown:hover .dropdown { display: block; }
.dropdown li a { display: block; padding: 0.5rem 1.25rem; font-size: 0.85rem; }
.dropdown li a:hover { background: var(--color-dark); }
.header-cta { display: flex; align-items: center; gap: 1rem; }
.phone-link { color: var(--color-white); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.phone-link:hover { color: var(--color-gold); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.hamburger, .hamburger::before, .hamburger::after {
  display: block; width: 24px; height: 2px; background: var(--color-white); transition: all 0.3s;
}
.hamburger { position: relative; }
.hamburger::before, .hamburger::after { content: ''; position: absolute; left: 0; }
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)), url('/assets/img/hero/hero-roof.jpg') center/cover no-repeat;
  color: var(--color-white); padding: 4rem 0; min-height: 550px;
  display: flex; align-items: center;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.hero h1 { color: var(--color-white); font-size: 2.25rem; margin-bottom: 0.75rem; text-transform: uppercase; }
.hero h2 { color: var(--color-gold); }
.hero p { font-size: 1rem; margin-bottom: 1.25rem; opacity: 0.95; }
.hero .highlight-list { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.hero .highlight-list li { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.9rem; text-transform: uppercase; }
.hero .highlight-list li::before { content: '\2022'; color: var(--color-gold); font-weight: 700; font-size: 1.2rem; }
.hero-badges { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.hero-badges img { max-height: 50px; width: auto; }
.hero-form {
  background: var(--color-white); border-radius: 8px; padding: 2rem; color: var(--color-text);
}
.hero-form h3 { color: var(--color-dark); font-size: 1.5rem; text-align: center; margin-bottom: 1.25rem; }
.hero-form .form-group label { color: var(--color-dark); }
.hero-form .btn { width: 100%; }

/* ---- Section Intro (page headers) ---- */
.page-header { background: var(--color-dark); color: var(--color-white); padding: 3rem 0; }
.page-header h1 { color: var(--color-white); font-size: 2.25rem; text-transform: uppercase; }
.page-header p { opacity: 0.9; max-width: 700px; }
.breadcrumb { font-size: 0.85rem; margin-bottom: 0.5rem; opacity: 0.7; }
.breadcrumb a { color: var(--color-gold); }
.breadcrumb span { color: var(--color-white); }

/* ---- Value Props ---- */
.value-props { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.value-card { text-align: center; padding: 2rem 1.5rem; }
.value-card h3 { color: var(--color-gold); margin-bottom: 0.75rem; }

/* ---- Service Cards ---- */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.service-card {
  background: var(--color-white); border: 1px solid var(--color-gray-light); border-radius: 8px;
  padding: 2rem; transition: box-shadow 0.2s;
}
.service-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.service-card h3 { margin-bottom: 0.75rem; }
.service-card p { color: var(--color-gray); margin-bottom: 1.25rem; font-size: 0.95rem; }

/* ---- Service Tiles (full-bleed on homepage) ---- */
.service-tiles {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.service-tile {
  position: relative; min-height: 350px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center;
}
.service-tile::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,0.45); transition: background 0.3s;
}
.service-tile:hover::before { background: rgba(0,0,0,0.3); }
.service-tile-label {
  position: relative; z-index: 1; border: 2px solid var(--color-white);
  padding: 2rem 3rem; text-align: center;
}
.service-tile-label h3 {
  color: var(--color-white); font-size: 1.5rem; font-weight: 700; margin: 0;
}
.service-tile-label a {
  color: var(--color-white); text-decoration: none; display: block;
}

/* ---- Process Steps (How We Work) ---- */
.how-we-work { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.how-we-work-img { border-radius: 8px; overflow: hidden; }
.how-we-work-img img { width: 100%; height: 100%; object-fit: cover; }
.process-list { counter-reset: step; }
.process-list-item {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1.25rem 0; border-bottom: 1px solid var(--color-gray-light);
}
.process-list-item::before {
  counter-increment: step; content: counter(step, decimal-leading-zero) ".";
  font-size: 1.75rem; font-weight: 800; color: var(--color-gold); min-width: 50px;
}
.process-list-item h3 { font-size: 1.1rem; margin: 0; }

/* ---- Legacy Process Steps (used on other pages) ---- */
.process-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; counter-reset: step; }
.process-step { text-align: center; padding: 1.5rem 1rem; }
.process-step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-size: 2.5rem; font-weight: 800; color: var(--color-gold); margin-bottom: 0.5rem;
}
.process-step h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; }

/* ---- Testimonials ---- */
.testimonials {
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('/assets/img/gallery/project-2.webp') center/cover no-repeat;
  position: relative; padding: 4rem 0;
}
.testimonials h2 { color: var(--color-white); }
.testimonials-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;
}
.testimonial-panel {
  background: rgba(255,255,255,0.95); border-radius: 8px; padding: 2.5rem;
}
.testimonial-item { margin-bottom: 2rem; }
.testimonial-item:last-child { margin-bottom: 0; }
.testimonial-stars { color: var(--color-gold); font-size: 1.2rem; margin-bottom: 0.5rem; }
.testimonial-item blockquote p { font-style: italic; color: var(--color-gray); font-size: 0.9rem; line-height: 1.7; }
.testimonial-item cite { display: block; margin-top: 0.5rem; font-weight: 700; font-style: normal; color: var(--color-dark); font-size: 1rem; }
/* Legacy card styles (used in sidebars) */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 2rem; }
.testimonial-card {
  background: var(--color-white); border: 1px solid var(--color-gray-light);
  border-radius: 8px; padding: 2rem;
}
.testimonial-card blockquote p { font-style: italic; color: var(--color-gray); font-size: 0.95rem; line-height: 1.7; }
.testimonial-card cite { display: block; margin-top: 1rem; font-weight: 600; font-style: normal; color: var(--color-dark); }

/* ---- Blog Cards ---- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.blog-card {
  background: var(--color-white); border: 1px solid var(--color-gray-light);
  border-radius: 8px; overflow: hidden; transition: box-shadow 0.2s;
}
.blog-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.blog-card-body { padding: 1.5rem; }
.blog-card-meta { font-size: 0.8rem; color: var(--color-gray); margin-bottom: 0.5rem; }
.blog-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.blog-card h3 a { color: var(--color-dark); }
.blog-card h3 a:hover { color: var(--color-gold); }
.blog-card p { font-size: 0.9rem; color: var(--color-gray); }

/* ---- Contact Form ---- */
.cta-form { background: var(--color-light); }
.contact-form { max-width: 700px; margin: 2rem auto 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.75rem; border: 1px solid var(--color-gray-light);
  border-radius: 4px; font-family: var(--font-main); font-size: 0.95rem;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--color-gold); box-shadow: 0 0 0 2px rgba(200,150,46,0.2);
}

/* ---- FAQ ---- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--color-gray-light); }
.faq-question {
  width: 100%; background: none; border: none; text-align: left; padding: 1.25rem 0;
  font-size: 1.05rem; font-weight: 600; cursor: pointer; font-family: var(--font-main);
  display: flex; justify-content: space-between; align-items: center; color: var(--color-dark);
}
.faq-question::after { content: '+'; font-size: 1.5rem; color: var(--color-gold); transition: transform 0.2s; }
.faq-item.active .faq-question::after { content: '\2212'; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer p { padding: 0 0 1.25rem; color: var(--color-gray); line-height: 1.7; }
.faq-item.active .faq-answer { max-height: 500px; }

/* ---- Gallery ---- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.gallery-item {
  aspect-ratio: 4/3; background: var(--color-gray-light); border-radius: 8px; overflow: hidden;
  position: relative;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-caption {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 0.75rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: var(--color-white);
  font-size: 0.85rem; font-weight: 500;
}

/* ---- Case Study ---- */
.case-study-intro {
  background: var(--color-light); border-radius: 8px; padding: 2rem; margin-bottom: 2rem;
  font-size: 1.05rem; line-height: 1.7;
}
.case-study-info-box {
  background: #e8f4f8; border-left: 4px solid var(--color-gold); border-radius: 0 8px 8px 0;
  padding: 1.5rem 2rem; margin: 2rem 0;
}
.case-study-info-box h3 { color: var(--color-gold); margin-bottom: 0.75rem; }
.case-study-info-box ul { list-style: disc; padding-left: 1.25rem; }
.case-study-info-box li { margin-bottom: 0.5rem; }
.case-study-images {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 2rem 0;
}
.case-study-img-card {
  border: 1px solid var(--color-gray-light); border-radius: 8px; overflow: hidden;
}
.case-study-img-placeholder {
  height: 220px; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.9rem; color: var(--color-white);
}
.case-study-img-placeholder.before { background: var(--color-gray); }
.case-study-img-placeholder.after { background: #2d8a4e; }
.case-study-img-card p { padding: 0.75rem 1rem; font-size: 0.85rem; color: var(--color-gray); text-align: center; }
.case-study-quote {
  border-left: 4px solid var(--color-gold); padding: 1.25rem 1.5rem; margin: 2rem 0;
  background: var(--color-light); border-radius: 0 8px 8px 0;
}
.case-study-quote p { font-style: italic; color: var(--color-gray); line-height: 1.7; }
.case-study-details { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.case-study-details tr { border-bottom: 1px solid var(--color-gray-light); }
.case-study-details th, .case-study-details td { padding: 0.75rem 0; text-align: left; }
.case-study-details th { font-weight: 600; color: var(--color-dark); width: 40%; }
.case-study-details td { color: var(--color-gray); }
.case-study-content ul { list-style: disc; padding-left: 1.25rem; margin: 1rem 0; }
.case-study-content li { margin-bottom: 0.5rem; }
.case-study-content h2 { margin-top: 2.5rem; }
.case-study-content h3 { margin-top: 1.5rem; color: var(--color-dark); }
.case-study-content p { margin-bottom: 1rem; }
.case-study-cta-card {
  background: var(--color-light); border: 2px solid var(--color-gold); border-radius: 8px; padding: 2rem; text-align: center;
}
.case-study-cta-card h3 { color: var(--color-gold); margin-bottom: 0.75rem; }
.case-study-cta-card p { color: var(--color-gray); margin-bottom: 1rem; font-size: 0.95rem; }
.case-study-cta-card .phone-text { display: block; font-size: 0.85rem; color: var(--color-gray); margin-top: 0.5rem; }
@media (max-width: 768px) {
  .case-study-images { grid-template-columns: 1fr; }
}

/* ---- City Page ---- */
.city-hero { background: var(--color-dark); color: var(--color-white); padding: 4rem 0; }
.city-hero h1 { color: var(--color-white); }
.city-content { max-width: 800px; }
.city-content h2 { margin-top: 2rem; }
.city-content p { margin-bottom: 1rem; }
.city-sidebar { background: var(--color-light); border-radius: 8px; padding: 2rem; }
.city-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; }

/* ---- CTA Banner with Background ---- */
.cta-banner {
  background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), url('/assets/img/services/roof-repair-family.webp') center/cover no-repeat;
  color: var(--color-white); padding: 5rem 0;
}
.cta-banner h2 { color: var(--color-white); font-size: 2.25rem; }
.cta-banner p { opacity: 0.9; }

/* ---- About Page Team ---- */
.team-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
  margin-bottom: 4rem;
}
.team-row.reverse { direction: rtl; }
.team-row.reverse > * { direction: ltr; }
.team-photo img { width: 100%; border-radius: 8px; }
.team-info h3 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.team-info .team-title {
  color: var(--color-gold); font-weight: 600; font-size: 1rem;
  display: block; margin-bottom: 0.5rem; padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--color-gold); display: inline-block;
}
.team-info p { margin-bottom: 1rem; }

/* ---- Footer Social Icons ---- */
.footer-social-icons { display: flex; gap: 0.75rem; margin-top: 1rem; }
.footer-social-icons a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.1); color: var(--color-white);
  transition: background 0.2s; font-size: 0.85rem;
}
.footer-social-icons a:hover { background: var(--color-gold); }
.footer-social-icons svg { width: 18px; height: 18px; fill: currentColor; }
.footer-review { margin-top: 1.5rem; }
.footer-review img { max-width: 150px; border-radius: 50%; }

/* ---- Footer ---- */
.site-footer { background: var(--color-dark); color: var(--color-white); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-col h3 { font-size: 1rem; color: var(--color-gold); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--color-white); font-size: 0.9rem; opacity: 0.8; }
.footer-col a:hover { opacity: 1; color: var(--color-gold); }
.footer-about p { font-size: 0.9rem; opacity: 0.8; margin-bottom: 0.25rem; }
.footer-social { display: flex; gap: 1rem; margin-top: 1rem; }
.footer-social a { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; }
.footer-bottom p { font-size: 0.8rem; opacity: 0.6; }

/* ---- Blog Post ---- */
.post-content { max-width: 800px; margin: 0 auto; }
.post-content p { margin-bottom: 1.25rem; }
.post-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.post-content h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.post-content ul, .post-content ol { margin: 1rem 0 1.25rem 1.5rem; }
.post-content li { margin-bottom: 0.5rem; }
.post-meta { color: var(--color-gray); font-size: 0.9rem; margin-bottom: 2rem; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .city-layout { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 1.75rem; }
  .hero { min-height: auto; padding: 3rem 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .service-tiles { grid-template-columns: 1fr; }
  .service-tile { min-height: 250px; }
  .how-we-work { grid-template-columns: 1fr; }
  .how-we-work-img { max-height: 300px; }
  .testimonials-inner { grid-template-columns: 1fr; }
  .team-row, .team-row.reverse { grid-template-columns: 1fr; direction: ltr; }
  .team-photo { max-width: 400px; }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-list {
    display: none; flex-direction: column; position: absolute;
    top: var(--header-height); left: 0; right: 0;
    background: var(--color-dark); padding: 1rem 1.5rem; gap: 0;
  }
  .nav-list.active { display: flex; }
  .nav-list li { padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .dropdown { position: static; box-shadow: none; padding-left: 1rem; }
  .has-dropdown:hover .dropdown { display: none; }
  .has-dropdown.active .dropdown { display: block; }
  .header-cta .btn { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.4rem; }
  h2 { font-size: 1.5rem; }
  .section { padding: 3rem 0; }
  .hero .highlight-list { flex-direction: column; gap: 0.5rem; }
  .hero-badges { gap: 0.75rem; }
  .hero-badges img { max-height: 35px; }
}
