/* ============================================
   SBL Roofing - Main Stylesheet
   Color Palette from Logo:
   - Navy Blue (primary):  #1B3A6B
   - Steel Gray (accent):  #6B7FA3
   - Light Gray (bg):      #F2F3F5
   - White:                #FFFFFF
   - Dark text:            #1A1A2E
============================================ */

:root {
  --navy:      #1B3A6B;
  --navy-dark: #122850;
  --steel:     #6B7FA3;
  --steel-light: #8FA3C8;
  --bg-light:  #F2F3F5;
  --white:     #FFFFFF;
  --text-dark: #1A1A2E;
  --text-mid:  #444466;
  --accent:    #6B7FA3; /* steel gray from logo */
  --accent-hover: #526690;
  --shadow:    0 4px 20px rgba(27, 58, 107, 0.12);
  --radius:    8px;
  --transition: 0.25s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--navy);
  line-height: 1.2;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 620px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--white) !important;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(107,127,163,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--navy);
  transform: translateY(-2px);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover {
  background: var(--navy-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ---- Navigation ---- */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(27,58,107,0.1);
  transition: box-shadow var(--transition);
}
#site-header.scrolled { box-shadow: var(--shadow); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo img {
  height: 52px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: 0.03em;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cta {
  margin-left: 8px;
}
.nav-cta .btn {
  padding: 9px 22px;
  font-size: 0.88rem;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Hero ---- */
.hero {
  background: var(--white);
  display: flex;
  align-items: center;
  padding: 100px 0 72px;
  border-bottom: 1px solid rgba(27,58,107,0.08);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo-wrap img {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--navy);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero h1 span { color: var(--steel); }

.hero p {
  color: var(--text-mid);
  font-size: 1.1rem;
  margin-bottom: 36px;
  max-width: 480px;
  line-height: 1.7;
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--steel);
}
.hero-badge::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--steel);
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* ---- Trust Bar ---- */
.trust-bar {
  background: var(--bg-light);
  border-top: 1px solid rgba(27,58,107,0.08);
  border-bottom: 1px solid rgba(27,58,107,0.08);
  padding: 18px 0;
  color: var(--navy);
}
.trust-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--navy);
}
.trust-item svg { flex-shrink: 0; }

/* ---- Sections ---- */
section { padding: 88px 0; }

.section-header { margin-bottom: 56px; }
.section-header.centered { text-align: center; }
.section-header.centered .section-sub { margin: 0 auto; }

/* ---- Services Grid ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.service-card {
  background: var(--white);
  border: 1px solid rgba(27,58,107,0.08);
  border-radius: 12px;
  padding: 36px 30px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--steel));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(27,58,107,0.15);
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--bg-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--navy);
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.service-card p {
  color: var(--text-mid);
  font-size: 0.95rem;
}

/* ---- Why Choose Us ---- */
.why-section { background: var(--white); }

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.why-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--navy);
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.why-placeholder {
  color: var(--white);
  text-align: center;
  padding: 40px;
  opacity: 0.5;
  font-size: 0.9rem;
}

.why-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}

.why-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.why-check {
  width: 28px;
  height: 28px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.why-item h4 { font-size: 1rem; margin-bottom: 4px; }
.why-item p { color: var(--text-mid); font-size: 0.92rem; }

/* ---- Testimonials ---- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.testimonial-card {
  background: var(--white);
  border: 1px solid rgba(27,58,107,0.08);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(27,58,107,0.06);
}

.stars {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  color: #E8A020;
  font-size: 1.1rem;
}

.testimonial-card blockquote {
  color: var(--text-mid);
  font-size: 0.97rem;
  font-style: italic;
  margin-bottom: 20px;
  line-height: 1.7;
}

.reviewer {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.9rem;
}
.reviewer span {
  display: block;
  font-weight: 400;
  color: var(--steel);
  font-size: 0.82rem;
}

/* ---- Service Area ---- */
.area-section { background: var(--white); }
.area-section .section-label { color: var(--steel); }
.area-section .section-title { color: var(--navy); }
.area-section .section-sub { color: var(--text-mid); }

.area-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.map-container {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(27,58,107,0.12);
  min-height: 380px;
  background: var(--bg-light);
  box-shadow: var(--shadow);
}

.map-container iframe {
  width: 100%;
  height: 380px;
  border: 0;
  display: block;
}

.county-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.chip {
  background: var(--bg-light);
  border: 1px solid rgba(27,58,107,0.15);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.88rem;
  color: var(--navy);
  font-weight: 600;
}

/* ---- CTA Banner ---- */
.cta-banner {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: 64px 0;
  text-align: center;
}
.cta-banner h2 {
  color: var(--white);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 12px;
}
.cta-banner p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

/* ---- Footer ---- */
#site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand img { height: 56px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer-tagline {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-top: 12px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: 0.04em;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); }

.footer-contact p {
  font-size: 0.9rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
}

/* ---- Page Hero (inner pages) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: 140px 0 64px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero-bg.jpg') center/cover no-repeat;
  opacity: 0.08;
}
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 3rem); position: relative; }
.page-hero p { color: rgba(255,255,255,0.8); margin-top: 12px; font-size: 1.1rem; position: relative; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
  position: relative;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb span { color: rgba(255,255,255,0.4); }

/* ---- Forms ---- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #D0D8E8;
  border-radius: var(--radius);
  font-size: 0.97rem;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,58,107,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ---- FAQ ---- */
.faq-list { max-width: 760px; margin: 0 auto; }

.faq-item {
  border-bottom: 1px solid rgba(27,58,107,0.1);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 22px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: inherit;
}

.faq-question .faq-icon {
  width: 24px;
  height: 24px;
  border: 2px solid var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  transition: transform var(--transition), background var(--transition);
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: var(--navy);
  color: var(--white);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  color: var(--text-mid);
  font-size: 0.97rem;
  line-height: 1.75;
}
.faq-item.open .faq-answer { max-height: 400px; padding-bottom: 20px; }

/* ---- Gallery ---- */
.gallery-filter {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 8px 22px;
  border-radius: 20px;
  border: 1.5px solid var(--steel);
  background: transparent;
  color: var(--steel);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-light);
  position: relative;
}
.gallery-item .placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--steel) 100%);
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  text-align: center;
  gap: 10px;
}

/* ---- About ---- */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 48px;
}
.team-card {
  background: var(--bg-light);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  border: 1px solid rgba(27,58,107,0.08);
}
.team-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--steel));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: var(--white);
  font-weight: 800;
}
.team-card h3 { font-size: 1.3rem; margin-bottom: 4px; }
.team-card .role {
  color: var(--steel);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.team-card p { color: var(--text-mid); font-size: 0.95rem; }

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}
.value-card {
  background: var(--white);
  border: 1px solid rgba(27,58,107,0.08);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
}
.value-icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
}
.value-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.value-card p { color: var(--text-mid); font-size: 0.92rem; }

/* ---- Stats ---- */
.stats-section { background: var(--bg-light); padding: 64px 0; border-top: 1px solid rgba(27,58,107,0.08); border-bottom: 1px solid rgba(27,58,107,0.08); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}
.stat-number {
  font-size: 3rem;
  font-weight: 900;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  color: var(--steel);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---- Animate on scroll ---- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Form success message ---- */
.form-success {
  display: none;
  background: #e6f4ea;
  border: 1px solid #4CAF50;
  color: #2e7d32;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 16px;
  font-weight: 600;
  font-size: 0.97rem;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .why-grid, .area-grid { grid-template-columns: 1fr; gap: 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .hero-logo-wrap { order: -1; }
  .hero-logo-wrap img { max-width: 300px; margin: 0 auto; }
  .hero p { max-width: 100%; }
  .hero-btns { justify-content: center; }
  .hero-badge { justify-content: center; }
}

@media (max-width: 768px) {
  section { padding: 64px 0; }
  .nav-links { 
    display: none;
    flex-direction: column;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    padding: 24px;
    gap: 20px;
    border-top: 1px solid rgba(27,58,107,0.1);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  
  .hero { padding: 96px 0 56px; }
  
  .team-grid, .values-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .trust-items { gap: 24px; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { text-align: center; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .stat-number { font-size: 2.2rem; }
}
