/* M&M Contractors Inc - Main Stylesheet */
:root {
  --color-primary: #0d3b4c;
  --color-accent: #e07c24;
  --color-accent-hover: #f59e0b;
  --color-dark: #0f172a;
  --color-light: #f8fafc;
  --color-muted: #64748b;
  --font-heading: 'Bebas Neue', 'Oswald', sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

/* Header & Nav */
.site-header {
  background: rgba(13, 59, 76, 0.98);
  color: white;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.site-header .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: white;
}

.logo span { color: var(--color-accent); }

.nav-main {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-main a {
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}

.nav-main a:hover { color: var(--color-accent); }

.cta-phone {
  background: var(--color-accent);
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
}

.cta-phone:hover { background: var(--color-accent-hover); color: white !important; }

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
  transition: transform 0.2s;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(13, 59, 76, 0.98);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.mobile-nav.is-open {
  max-height: 520px;
  opacity: 1;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
}

.mobile-nav li {
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.mobile-nav li:last-child { border-bottom: none; }

.mobile-nav a {
  display: block;
  padding: 0.9rem 1rem;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}

.mobile-nav a:hover { color: var(--color-accent); }

.mobile-nav .cta-phone {
  background: var(--color-accent);
  color: white !important;
  text-align: center;
  margin-top: 0.5rem;
  border-radius: 6px;
}

/* Footer */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.85);
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-section ul {
  list-style: none;
}

.footer-section li { margin-bottom: 0.5rem; }

.footer-section a {
  color: rgba(255,255,255,0.75);
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.copyright {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
}

.legal-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.legal-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
}

/* Legal Pages */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.legal-page-banner {
  height: 140px;
  background-size: cover;
  background-position: center;
  margin: 0 -2rem 2rem -2rem;
}

.legal-page h1 {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.legal-page .last-updated {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.legal-page h2 {
  font-size: 1.5rem;
  margin: 2rem 0 0.75rem;
  color: var(--color-dark);
}

.legal-page h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem;
}

.legal-page p, .legal-page li {
  margin-bottom: 1rem;
  color: var(--color-muted);
}

.legal-page ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-page .back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0a2d3a 100%);
  color: white;
  padding: 6rem 2rem;
  text-align: center;
}

.hero-with-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

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

.hero p { margin-bottom: 1.5rem; opacity: 0.95; }

.btn-primary {
  display: inline-block;
  background: var(--color-accent);
  color: white !important;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.25rem;
  transition: background 0.2s;
}

.btn-primary:hover { background: var(--color-accent-hover); }

.license-badge {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Sections */
.section {
  padding: 4rem 2rem;
}

.section h2 {
  font-size: 2rem;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 1rem;
}

.section-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--color-muted);
}

/* Homepage Services */
.section-services {
  background: var(--color-light);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.service-card {
  background: white;
  padding: 0;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card-img {
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-primary);
  flex-shrink: 0;
}

.service-card-content {
  padding: 1.25rem 1.5rem;
  flex: 1;
}

.service-card h3 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.service-card p {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}

a.service-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

a.service-card:hover h3 { color: var(--color-accent); }

/* Homepage About */
.section-about {
  background: white;
}

.about-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1000px;
}

.about-content h2 {
  text-align: left;
  margin-bottom: 1rem;
}

.about-content h3 {
  font-size: 1.15rem;
  color: var(--color-primary);
  margin: 1.5rem 0 0.5rem;
}

.about-content p {
  color: var(--color-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.about-list {
  list-style: none;
  margin: 0 0 1.5rem 0;
  padding: 0;
}

.about-list li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--color-dark);
  font-weight: 500;
}

.about-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.about-photo {
  height: 320px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-primary);
}

/* Legacy about (service pages) */
.about { background: var(--color-light); }

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

.about-img {
  height: 300px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-primary);
}

.about-text h2 { text-align: left; }

.contact-with-bg {
  color: white;
  background-size: cover;
  background-position: center;
}

.contact-with-bg h2 { color: white; }

.contact-with-bg a { color: var(--color-accent); }

.contact-with-bg p { color: rgba(255,255,255,0.95); }

.contact { text-align: center; }

.contact p { margin-bottom: 0.5rem; }

/* Homepage Our Work */
.section-work {
  background: var(--color-light);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.work-item {
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Homepage Contact */
.section-contact {
  color: white;
  text-align: center;
  background-size: cover;
  background-position: center;
}

.section-contact h2 {
  color: white;
  margin-bottom: 0.5rem;
}

.contact-phone {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.contact-phone a {
  color: white;
}

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

.contact-email {
  margin-bottom: 0.25rem;
}

.contact-email a {
  color: white;
}

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

.contact-address {
  color: rgba(255,255,255,0.9);
  margin-bottom: 1.5rem;
}

.btn-light {
  background: white;
  color: var(--color-primary) !important;
}

.btn-light:hover {
  background: var(--color-light);
  color: var(--color-primary) !important;
}

/* Contact Page */
.section-contact-page {
  text-align: center;
  padding: 4rem 2rem;
}

.contact-page-content h2 {
  margin-bottom: 1rem;
}

.contact-phone-large {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.contact-phone-large a {
  color: var(--color-primary);
}

.contact-phone-large a:hover {
  color: var(--color-accent);
}

.contact-areas {
  color: var(--color-muted);
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

/* SEO Content Blocks */
.seo-content {
  max-width: 800px;
  margin: 0 auto 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
}

.seo-content h2 {
  font-size: 1.35rem;
  text-align: left;
  margin-bottom: 1rem;
}

.seo-content p {
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.seo-content p:last-child {
  margin-bottom: 0;
}

.seo-content-compact {
  max-width: 700px;
  margin: 0 auto 2rem;
  color: var(--color-muted);
  line-height: 1.6;
  font-size: 0.95rem;
  text-align: center;
}

.seo-content-compact p {
  margin-bottom: 0;
}

/* Gallery (legacy) */
.gallery { background: white; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.gallery-item {
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* Service Pages */
.service-page .service-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0a2d3a 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}

.service-page .service-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
}

.service-page .service-hero .service-tagline {
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.service-page .service-hero .back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}

.service-page .service-hero .back-link:hover { color: var(--color-accent); }

.service-hero-with-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.article-hero-img {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-primary);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.article-inline-img {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-primary);
  border-radius: 12px;
  margin: 2rem 0;
}

.sidebar-img {
  min-height: 120px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-primary);
}

.sidebar-img h3,
.sidebar-img p {
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.sidebar-img p { font-size: 0.9rem; }

.services-with-bg {
  background-size: cover;
  background-position: center;
}

.legal-inline-img {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  margin: 2rem 0;
}

.service-content {
  padding: 3rem 2rem 4rem;
}

.content-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

.service-content article h2 {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin: 2rem 0 0.75rem;
  text-align: left;
}

.service-content article h2:first-of-type { margin-top: 0; }

.service-content article p,
.service-content article li {
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.service-content article ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.service-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-card {
  background: var(--color-light);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid rgba(0,0,0,0.08);
}

.sidebar-card h3 {
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.sidebar-card ul { list-style: none; margin-left: 0; }

.sidebar-card li { margin-bottom: 0.5rem; }

.sidebar-card.cta { background: var(--color-primary); color: white; }

.sidebar-card.cta h3 { color: white; }

.sidebar-card.cta .btn-primary { margin-top: 0.5rem; }

.sidebar-card.cta .license-badge { color: rgba(255,255,255,0.8); font-size: 0.85rem; margin-top: 0.5rem; }

@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .service-sidebar { position: static; }
}

/* Mobile – smaller sizing for better fit */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
    margin-left: auto;
  }
  .site-header nav { display: none; }
  .mobile-nav { display: block; }
  .site-header { padding: 0.75rem 1rem; }
  .logo { font-size: 1.35rem; }
  .container { padding: 0 1rem; }

  .hero { padding: 3rem 1rem; }
  .hero h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .hero p { font-size: 0.9rem; margin-bottom: 1rem; }
  .btn-primary { padding: 0.75rem 1.25rem; font-size: 1rem; }
  .license-badge { font-size: 0.8rem; margin-top: 1rem; }

  .section { padding: 2.5rem 1rem; }
  .section h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
  .section-intro { font-size: 0.9rem; margin-bottom: 1.5rem; }

  .service-grid { grid-template-columns: 1fr; gap: 1rem; }
  .service-card-img { height: 140px; }
  .service-card-content { padding: 1rem 1.25rem; }
  .about-block { grid-template-columns: 1fr; gap: 2rem; }
  .about-photo { height: 240px; order: -1; }
  .work-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-img { height: 220px; order: -1; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .service-card h3 { font-size: 1.1rem; }
  .service-card p { font-size: 0.9rem; }

  .site-footer { padding: 2rem 1rem 1rem; margin-top: 2.5rem; }
  .footer-grid { gap: 1.5rem; margin-bottom: 1.5rem; }
  .footer-section h4 { font-size: 0.9rem; }
  .footer-section a, .footer-section li { font-size: 0.9rem; }
  .footer-bottom { padding-top: 1rem; flex-direction: column; align-items: flex-start; }
  .copyright { font-size: 0.8rem; }
  .legal-links { gap: 1rem; }
  .legal-links a { font-size: 0.8rem; }

  .service-page .service-hero { padding: 2.5rem 1rem; }
  .service-page .service-hero h1 { font-size: clamp(1.5rem, 7vw, 2.25rem); }
  .service-page .service-hero .service-tagline { font-size: 0.9rem; margin-bottom: 1rem; }
  .service-page .service-hero .back-link { font-size: 0.9rem; margin-bottom: 1rem; }

  .service-content { padding: 1.5rem 1rem 2rem; }
  .service-content article h2 { font-size: 1.25rem; margin: 1.5rem 0 0.5rem; }
  .service-content article p, .service-content article li { font-size: 0.9rem; }
  .service-content article ul { margin-left: 1.25rem; }
  .article-hero-img { height: 180px; margin-bottom: 1rem; }
  .article-inline-img { height: 160px; margin: 1.5rem 0; }
  .legal-inline-img { height: 140px; margin: 1.5rem 0; }
  .sidebar-img { min-height: 100px; }

  .sidebar-card { padding: 1rem; }
  .sidebar-card h3 { font-size: 0.95rem; }
  .sidebar-card p { font-size: 0.85rem; }
  .sidebar-card .btn-primary { padding: 0.6rem 1rem; font-size: 0.95rem; }

  .legal-page { padding: 0 1rem 2.5rem; }
  .legal-page-banner { height: 100px; margin: 0 -1rem 1.5rem -1rem; }
  .legal-page h1 { font-size: 1.5rem; }
  .legal-page h2 { font-size: 1.25rem; margin: 1.5rem 0 0.5rem; }
  .legal-page h3 { font-size: 1.05rem; }
  .legal-page p, .legal-page li { font-size: 0.9rem; }
  .legal-page ul { margin-left: 1.25rem; }
}

@media (max-width: 480px) {
  .site-header { padding: 0.6rem 0.75rem; }
  .logo { font-size: 1.2rem; }
  .container { padding: 0 0.75rem; }

  .hero { padding: 2rem 0.75rem; }
  .hero h1 { font-size: 1.5rem; }
  .btn-primary { padding: 0.65rem 1rem; font-size: 0.95rem; }

  .section { padding: 1.75rem 0.75rem; }
  .section h2 { font-size: 1.35rem; }
  .service-card h3 { font-size: 1.1rem; }
  .work-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }

  .site-footer { padding: 1.5rem 0.75rem; }
  .footer-grid { gap: 1.25rem; }

  .service-page .service-hero { padding: 1.75rem 0.75rem; }
  .service-page .service-hero h1 { font-size: 1.4rem; }
  .service-content { padding: 1.25rem 0.75rem 1.5rem; }
  .service-content article h2 { font-size: 1.15rem; }

  .legal-page { padding: 0 0.75rem 1.5rem; }
  .legal-page-banner { height: 80px; margin: 0 -0.75rem 1rem -0.75rem; }
  .legal-page h1 { font-size: 1.35rem; }
}
