/* ============================================================
   M.D. Contracting Solutions — Global Stylesheet
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --navy:        #0d1b2a;
  --navy-light:  #1a2f45;
  --green:       #2e9e4f;
  --green-hover: #247a3e;
  --green-light: #e8f5ed;
  --bg-light:    #f8f9fa;
  --white:       #ffffff;
  --text-dark:   #1a1a2e;
  --text-mid:    #3d4555;
  --text-muted:  #6c757d;
  --border:      #dee2e6;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.08);
  --shadow-md:   0 4px 20px rgba(0,0,0,.12);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.16);
  --radius:      8px;
  --radius-lg:   16px;
  --transition:  .25s ease;
  --container:   1200px;
  --font-body:   'Inter', sans-serif;
  --font-heading:'Poppins', sans-serif;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--navy);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  padding-top: 5px;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  transition: box-shadow var(--transition);
}

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

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo img {
  height: 64px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  color: rgba(255,255,255,.85);
  font-size: .88rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.nav-links a:hover { background: rgba(255,255,255,.1); color: var(--white); }

.nav-links .dropdown {
  position: relative;
}

.nav-links .dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links .dropdown-toggle::after {
  content: '▾';
  font-size: .7rem;
  opacity: .7;
}

.nav-links .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: transparent;
  min-width: 240px;
  padding: 8px 0 0;
  z-index: 100;
}

/* White background + shadow only behind the links (below the 8px hover gap) */
.nav-links .dropdown-menu::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* Keep links above the pseudo-element */
.nav-links .dropdown-menu a {
  position: relative;
}

.nav-links .dropdown:hover .dropdown-menu,
.nav-links .dropdown:focus-within .dropdown-menu {
  display: block;
}

.nav-links .dropdown-menu a {
  display: block;
  color: var(--text-dark);
  padding: 9px 18px;
  font-size: .875rem;
  border-radius: 0;
}

.nav-links .dropdown-menu a:hover {
  background: var(--bg-light);
  color: var(--green);
}

/* Nav CTA */
.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-phone {
  color: rgba(255,255,255,.85) !important;
  font-size: .875rem;
  font-weight: 600;
}

.nav-phone:hover { color: var(--white) !important; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--navy-light);
  padding: 16px 0 20px;
  border-top: 1px solid rgba(255,255,255,.1);
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  color: rgba(255,255,255,.85);
  padding: 10px 24px;
  font-size: .9rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background var(--transition);
}

.nav-mobile a:hover { background: rgba(255,255,255,.08); color: var(--white); }

.nav-mobile .mobile-section-label {
  padding: 14px 24px 4px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--green);
  font-weight: 600;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-primary:hover { background: var(--green-hover); border-color: var(--green-hover); color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--navy); }

.btn-outline-green {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn-outline-green:hover { background: var(--green); color: var(--white); }

.btn-sm { padding: 10px 20px; font-size: .875rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 540px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,27,42,.92) 0%, rgba(13,27,42,.75) 60%, rgba(46,158,79,.25) 100%);
  z-index: 1;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .35;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 80px 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(46,158,79,.2);
  border: 1px solid rgba(46,158,79,.4);
  color: #7ee89a;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--white);
  margin-bottom: 20px;
  max-width: 700px;
  line-height: 1.2;
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  max-width: 560px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.75);
  font-size: .875rem;
}

.stars { color: #ffc107; font-size: 1rem; letter-spacing: 1px; }

/* ============================================================
   SECTION UTILITIES
   ============================================================ */
section { padding: 80px 0; }

.section-label {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--navy);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
}

.section-header { margin-bottom: 52px; }

.text-center { text-align: center; }
.text-center .section-sub { margin: 0 auto; }

.bg-light { background: var(--bg-light); }
.bg-navy  { background: var(--navy); }

/* ============================================================
   WHY US — FEATURE CARDS
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--green-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--green);
  margin-bottom: 18px;
}

.feature-icon i { font-size: 1.3rem; color: var(--green); }

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--navy);
}

.feature-card p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   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 var(--border);
  border-top: 3px solid var(--green);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Photo header — shown when .service-card-photo class is used */
.service-card-photo {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.service-card-icon {
  background: none;
  padding: 28px 28px 0;
  display: flex;
  align-items: flex-start;
}

.service-card-icon-badge {
  width: 60px;
  height: 60px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-card-icon-badge i {
  font-size: 1.4rem;
  color: var(--green);
}

.service-card-body {
  padding: 20px 28px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.service-card-body p {
  font-size: .9rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 20px;
}

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

.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.testimonial-stars { color: #ffc107; font-size: 1.1rem; letter-spacing: 2px; }

.testimonial-text {
  font-size: .92rem;
  color: var(--text-mid);
  line-height: 1.75;
  flex: 1;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .95rem;
  flex-shrink: 0;
}

.testimonial-author-info strong {
  display: block;
  font-size: .9rem;
  color: var(--navy);
}

.testimonial-author-info span {
  font-size: .78rem;
  color: var(--text-muted);
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a5c 100%);
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(46,158,79,.25) 0%, transparent 70%);
}

.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(46,158,79,.15) 0%, transparent 70%);
}

.cta-banner h2 {
  color: var(--white);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.cta-banner p {
  color: rgba(255,255,255,.75);
  max-width: 520px;
  margin: 0 auto 32px;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

.cta-banner .btn-group {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ============================================================
   SERVICE AREAS
   ============================================================ */
.areas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.area-badge {
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text-dark);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 500;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.area-badge:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-light);
}

/* ============================================================
   ABOUT STRIP
   ============================================================ */
.about-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-strip-content h2 { margin-bottom: 18px; }
.about-strip-content p  { color: var(--text-muted); line-height: 1.8; margin-bottom: 14px; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.about-stat {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
}

.about-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--green);
  line-height: 1;
  margin-bottom: 6px;
}

.about-stat span {
  font-size: .85rem;
  color: rgba(255,255,255,.7);
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

details.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

details.faq-item[open] {
  box-shadow: var(--shadow-sm);
  border-color: var(--green);
}

details.faq-item summary {
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
}

details.faq-item summary::-webkit-details-marker { display: none; }

details.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--green);
  font-weight: 400;
  flex-shrink: 0;
  margin-left: 12px;
  transition: transform var(--transition);
}

details.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 4px 24px 20px;
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.75;
  border-top: 1px solid var(--border);
}

/* ============================================================
   SERVICE PAGE — HERO VARIANT
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a5c 100%);
  padding: 72px 0;
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 16px;
}

.page-hero p {
  color: rgba(255,255,255,.8);
  font-size: 1.05rem;
  max-width: 580px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 20px;
}

.breadcrumb a { color: rgba(255,255,255,.7); }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb span { color: rgba(255,255,255,.35); }

/* ============================================================
   BENEFITS SECTION (SERVICE PAGES)
   ============================================================ */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.benefit-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
}

.benefit-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.benefit-card .benefit-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.benefit-card h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.benefit-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================================
   SERVICE CONTENT BLOCK (long text on service pages)
   ============================================================ */
.service-body {
  max-width: 820px;
}

.service-body h2 { font-size: 1.6rem; margin-bottom: 16px; }
.service-body h3 { font-size: 1.15rem; margin: 28px 0 10px; color: var(--navy); }
.service-body p  { color: var(--text-muted); margin-bottom: 16px; line-height: 1.8; }

.service-body ul {
  list-style: none;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-body ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .92rem;
  color: var(--text-muted);
}

.service-body ul li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ============================================================
   FINANCING PAGE
   ============================================================ */
.financing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.financing-terms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.financing-term {
  text-align: center;
  padding: 24px 16px;
  background: var(--bg-light);
  border-radius: var(--radius);
}

.financing-term strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.7rem;
  color: var(--green);
  margin-bottom: 6px;
}

.financing-term span {
  font-size: .82rem;
  color: var(--text-muted);
}

.financing-disclaimer {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 20px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding-top: 64px;
}

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

.footer-brand p {
  margin: 16px 0 24px;
  font-size: .875rem;
  line-height: 1.75;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: rgba(255,255,255,.7);
  transition: background var(--transition), color var(--transition);
}

.footer-social a:hover { background: var(--green); color: var(--white); }

.footer-col h4 {
  color: var(--white);
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col ul a {
  color: rgba(255,255,255,.65);
  font-size: .875rem;
  transition: color var(--transition);
}

.footer-col ul a:hover { color: var(--green); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .875rem;
  color: rgba(255,255,255,.7);
  margin-bottom: 12px;
}

.footer-contact-item .icon { font-size: 1rem; flex-shrink: 0; margin-top: 2px; }

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

.footer-contact-item a:hover { color: var(--green); }

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

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

@media (max-width: 768px) {
  section { padding: 56px 0; }

  .nav-links, .nav-cta .nav-phone { display: none; }
  .nav-hamburger { display: flex; }

  .hero { min-height: 460px; }
  .hero-content { padding: 56px 0; }

  .about-strip { grid-template-columns: 1fr; gap: 40px; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .financing-card { padding: 28px 20px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 1.75rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; }
  .cta-banner .btn-group { flex-direction: column; align-items: center; }
  .about-stats { grid-template-columns: 1fr 1fr; }
}
