/* ============================================
   WHG Framing & Roofing - Main Stylesheet
   Color Scheme: NASH Blue (#3ba1da family)
   ============================================ */

/* CSS Variables */
:root {
  --primary: #0a2a4a;
  --primary-light: #1a4a7a;
  --primary-mid: #2a6aaa;
  --accent: #3ba1da;
  --accent-light: #44b0ec;
  --accent-lighter: #e8f4fd;
  --dark: #0a1628;
  --text: #2c3e50;
  --text-light: #6c7a89;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --shadow: 0 2px 15px rgba(10, 42, 74, 0.1);
  --shadow-lg: 0 5px 30px rgba(10, 42, 74, 0.15);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Archivo Black', 'Inter', sans-serif;
  --container: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 161, 218, 0.35);
}

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

.btn-outline-dark {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--accent);
}
.btn-outline-dark:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 161, 218, 0.3);
}

/* ========== HEADER / NAV ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 42, 74, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(10, 42, 74, 0.98);
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 75px;
  padding: 0 20px;
  max-width: var(--container);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
}

.logo-icon {
  width: 45px;
  height: 45px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--white);
  font-family: var(--font-heading);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.2;
  font-family: var(--font-heading);
}

.logo-text span {
  font-size: 11px;
  color: var(--accent-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
}

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

.nav-links a {
  color: rgba(255,255,255,0.85);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(59, 161, 218, 0.2);
}

.nav-links .btn {
  margin-left: 8px;
  padding: 10px 22px;
  font-size: 14px;
}

/* Mobile Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.hamburger span {
  width: 26px;
  height: 2.5px;
  background: var(--white);
  border-radius: 4px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  overflow: hidden;
  padding-top: 75px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(59, 161, 218, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(68, 176, 236, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(10, 42, 74, 0.3) 0%, transparent 50%);
  pointer-events: none;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.02) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.02) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.02) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.02) 75%);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 60px 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 161, 218, 0.15);
  border: 1px solid rgba(59, 161, 218, 0.3);
  color: var(--accent-light);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 60px);
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  color: var(--accent-light);
}

.hero p {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255,255,255,0.75);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 600px;
}

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

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat h3 {
  font-family: var(--font-heading);
  font-size: 28px;
  color: var(--accent-light);
  line-height: 1;
}

.hero-stat p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0;
  margin-top: 4px;
}

/* ========== SECTION STYLES ========== */
.section {
  padding: 90px 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-tag {
  display: inline-block;
  background: var(--accent-lighter);
  color: var(--accent);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.5vw, 40px);
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-light);
  font-size: 17px;
  line-height: 1.8;
}

/* ========== SERVICES SECTION ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-lighter);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 12px;
  font-weight: 700;
}

.service-card p {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.7;
}

.service-card .service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  margin-top: 20px;
}

.service-card:hover .service-link {
  gap: 10px;
}

/* ========== ABOUT SECTION ========== */
.about-section {
  background: var(--gray-100);
}

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

.about-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--gray-200);
  aspect-ratio: 4/3;
}

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

.about-content h2 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3vw, 36px);
  color: var(--primary);
  margin-bottom: 20px;
  line-height: 1.2;
}

.about-content p {
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.about-feature .check {
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 12px;
  flex-shrink: 0;
}

/* ========== WHY US ========== */
.why-us {
  background: var(--white);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.why-card {
  text-align: center;
  padding: 36px 24px;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.why-card:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.why-card .icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.why-card h4 {
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: 700;
}

.why-card p {
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.7;
}

.why-card:hover p { opacity: 0.85; }

/* ========== GALLERY ========== */
.gallery-section {
  background: var(--gray-100);
}

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

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--gray-200);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 42, 74, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  color: var(--white);
  padding: 20px;
  text-align: center;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h4 {
  font-size: 18px;
  margin-bottom: 6px;
}

.gallery-overlay p {
  font-size: 13px;
  opacity: 0.8;
}

/* ========== CTA SECTION ========== */
.cta-section {
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(59, 161, 218, 0.1) 0%, transparent 70%);
}

.cta-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 650px;
  margin: 0 auto;
}

.cta-content h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3vw, 38px);
  color: var(--white);
  margin-bottom: 16px;
}

.cta-content p {
  color: rgba(255,255,255,0.75);
  font-size: 17px;
  margin-bottom: 32px;
  line-height: 1.8;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ========== CONTACT ========== */
.contact-section {
  background: var(--white);
}

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

.contact-info h3 {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 20px;
}

.contact-info > p {
  color: var(--text-light);
  margin-bottom: 30px;
  line-height: 1.8;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-detail .icon {
  width: 48px;
  height: 48px;
  background: var(--accent-lighter);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.contact-detail .info h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.contact-detail .info p,
.contact-detail .info a {
  font-size: 15px;
  color: var(--text-light);
}

.contact-detail .info a:hover {
  color: var(--accent);
}

/* Contact Form */
.contact-form {
  background: var(--gray-100);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.contact-form h3 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 24px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: 15px;
  color: var(--text);
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 161, 218, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-about .logo-text strong {
  color: var(--white);
}

.footer-about .logo-text span {
  color: var(--accent-light);
}

.footer-about p {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
}

.footer h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links a:hover {
  color: var(--accent-light);
  padding-left: 4px;
}

.footer-contact li {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}

.footer-contact .fc-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-contact a {
  color: rgba(255,255,255,0.6);
}

.footer-contact a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* ========== PAGE HEADER (inner pages) ========== */
.page-header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  padding: 140px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(59, 161, 218, 0.1) 0%, transparent 70%);
}

.page-header-content {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4vw, 48px);
  color: var(--white);
  margin-bottom: 12px;
}

.page-header p {
  color: rgba(255,255,255,0.7);
  font-size: 17px;
  max-width: 600px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

.breadcrumb a {
  color: var(--accent-light);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ========== SERVICES DETAIL ========== */
.service-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
}

.service-detail-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.service-detail-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.service-detail-img {
  height: 220px;
  overflow: hidden;
}

.service-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-detail-card:hover .service-detail-img img {
  transform: scale(1.05);
}

.service-detail-body {
  padding: 30px;
}

.service-detail-body h3 {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 12px;
}

.service-detail-body p {
  color: var(--text-light);
  line-height: 1.8;
  font-size: 15px;
}

.service-detail-body ul {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-detail-body li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}

.service-detail-body li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
}

/* ========== ANIMATIONS ========== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .about-grid {
    gap: 40px;
  }
}

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 75px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(10, 42, 74, 0.98);
    backdrop-filter: blur(10px);
    padding: 20px;
    gap: 4px;
    transform: translateY(-120%);
    transition: var(--transition);
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-links a {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
  }

  .nav-links .btn {
    width: 100%;
    justify-content: center;
    margin-left: 0;
    margin-top: 8px;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 100px 20px 50px;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 24px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 24px;
  }

  .section {
    padding: 60px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .service-detail-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .cta-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .service-detail-grid {
    grid-template-columns: 1fr;
  }
}
