@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700;800&display=swap');

/* Base */
*{box-sizing:border-box}
body{margin:0;font-family:'Lato',sans-serif;color:#111827;background:#f8f9fa}
.container{width:90%;max-width:1200px;margin:0 auto}
.section-pad{padding:3rem 0}

/* Header + Nav (relative) */
.site-header{position:relative;top:auto;z-index:50;background:#1f2937;padding: .5px 0}
.header-content{display:flex;align-items:center;gap:28px;position:relative}
.logo{height:200px}
nav{margin-left:auto}
.nav-links{display:flex;gap:16px;list-style:none;margin:0;padding:0}
.nav-links a{display:inline-block;padding:10px 18px;border-radius:8px;background:transparent;color:#ffffff;text-decoration:none;font-weight:700;letter-spacing:.2px;transition:background-color .25s}
.nav-links a:hover,.nav-links a.active{background:#2563eb;color:#fff}

/* Breadcrumb */
.breadcrumb{background:#eef0f2;border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb}
.breadcrumb .container{padding:.6rem 0}
.breadcrumb a{color:#1f2937;text-decoration:none;font-weight:700}
.breadcrumb span{color:#6b7280;margin:0 .4rem}

/* Hero */
.hero{min-height: 42vh;background: linear-gradient(to right,rgba(31,41,55,.85),rgba(31,41,55,.65)), url('hero-bg.jpg'), url('hero_bg.jpg') center/cover no-repeat;color:#fff;text-align:center;padding: 196px 0 210px;line-height:1.1;font-weight:800;margin:0 0 16px}
.hero p{font-size:20px;margin:0 0 28px;opacity:.95}
.cta-button{background:#2563eb;color:#fff;padding:12px 24px;border-radius:6px;font-weight:800;text-decoration:none;box-shadow:0 2px 6px rgba(0,0,0,.15);transition:background-color .25s, transform .08s}
.cta-button:hover{background:#1e40af}
.cta-button:active{transform:translateY(1px)}

/* Content */
.service-items{display:flex;flex-wrap:wrap;gap:24px;justify-content:center}
.service{flex:1 1 300px;background:#ffffff;padding:24px;border-radius:10px;box-shadow:0 2px 10px rgba(0,0,0,.06)}
.service h3{margin-top:0;color:#1f2937}
.profile-photo{max-width:220px;border-radius:10px;box-shadow:0 4px 14px rgba(0,0,0,.12)}

.contact-form{max-width:640px;margin-top:1.5rem;display:flex;flex-direction:column;gap:1rem}
.contact-form label{display:flex;flex-direction:column;font-weight:700;color:#1f2937}
.contact-form input,.contact-form textarea{padding:.75rem;border:1px solid #cfd6dc;border-radius:8px;font-size:16px;background:#fff}
.submit-btn{border:none;cursor:pointer}

/* Footer */
.site-footer{background:#1f2937;color:#d1d5db;text-align:center;padding:18px 0;font-size:14px}

/* ---------- Mobile-first improvements ---------- */
img{max-width:100%;height:auto}
.logo{height:clamp(120px,22vw,220px)}
.hero{min-height: 42vh;padding: 160px 0 180px;background: linear-gradient(to right,rgba(31,41,55,.85),rgba(31,41,55,.65)), url('hero-bg.jpg'), url('hero_bg.jpg') center/cover no-repeat;border:0;padding: 196px 0 210px;margin-left:auto;cursor:pointer}
.menu-toggle .menu-bar{display:block;width:24px;height:2px;background:#ffffff;margin:5px 0;transition:transform .25s ease, opacity .25s ease}
#primary-nav{transition:transform .25s ease, opacity .2s ease}

@media (max-width: 900px){
  .header-content{gap:16px}
  nav{margin-left:0}
  .menu-toggle{background:transparent;border:0;outline:0;box-shadow:none;padding:0;margin-left:auto;cursor:pointer;display:none}
  #primary-nav{
    position:absolute;top:100%;right:0;left:0;background:#1f2937;
    transform:translateY(-10px);opacity:0;pointer-events:none;
    border-top:1px solid rgba(255,255,255,.08);box-shadow:0 6px 16px rgba(0,0,0,.18)
  }
  .nav-links{flex-direction:column;align-items:stretch;padding:10px;gap:8px}
  .nav-links a{background:transparent;padding:12px 14px;border-radius:6px;text-align:left}
  body.nav-open #primary-nav{transform:translateY(0);opacity:1;pointer-events:auto}
}

@media (max-width: 1200px){ .container{width:92%} }
@media (max-width: 600px){ .breadcrumb .container{padding:.5rem 0} }

/* ---------- Services quick-links + details ---------- */
.service-menu{
  list-style:none;padding:0;margin:1rem 0 2rem;
  display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px
}
.service-menu a{
  display:block;background:#ffffff;padding:12px 14px;border-radius:8px;text-decoration:none;color:#1f2937;
  font-weight:700;border:1px solid #e5e7eb;box-shadow:0 2px 8px rgba(0,0,0,.04);transition:background-color .2s, transform .05s
}
.service-menu a:hover{background:#f3f4f6}
.service-menu a:active{transform:translateY(1px)}
.service-detail{
  background:#ffffff;padding:22px;border-radius:10px;border:1px solid #e5e7eb;box-shadow:0 2px 10px rgba(0,0,0,.05);margin-bottom:18px
}
.service-detail h2{margin-top:0;color:#1f2937}
.back-to-top{margin-top:1.5rem;text-align:right}
.back-to-top a{color:#2563eb;font-weight:700;text-decoration:none}


/* Thinner header only on the Home page */
.home .site-header{padding: 3px 0;}


/* Mobile hero adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 3rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }
  .hero p {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  .hero .cta-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  .hero {
    padding: 80px 1rem 100px;
  }
}

.menu-toggle:focus-visible{outline:2px solid rgba(37,99,235,.6);outline-offset:4px}

@media (min-width: 901px){.menu-toggle{display:none !important}}

@media (max-width: 900px){.menu-toggle{display:block}}

.hero .container { text-align: left; max-width: 800px; }


.hero .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding-top: 2rem;
  padding-bottom: 2rem;
}


.hero h1 {
  margin-bottom: 1rem;
}
.hero p {
  margin-bottom: 1.5rem;
}


.hero .container {
  position: relative;
  top: -20px; /* Shift upward */
}


/* Shrink Learn More button to text width */
.hero .cta-button {
  display: inline-block;
  width: auto;
  max-width: max-content;
  padding: 10px 16px;
  font-size: 14px;
  white-space: nowrap;
}

/* === About page: make Derek's mobile layout match Amy's (≤768px) === */
@media (max-width: 768px) {
  .profile-section {
    display: flex;
    flex-direction: row;          /* keep the same row pattern as Amy */
    align-items: flex-start;
    gap: 1rem;
  }
  .profile-section img.profile-photo {
    width: 140px;                 /* consistent image size */
    max-width: 140px;
    height: auto;
    flex: 0 0 140px;
  }
  .profile-section > div {
    flex: 1;                      /* bio text fills remaining width */
  }
  .profile-section h2 {
    margin: 0 0 .5rem;
    line-height: 1.2;
  }
  .profile-section p {
    margin: 0 0 .75rem;
  }
}

/* Stack vertically only on very narrow screens */
@media (max-width: 480px) {
  .profile-section {
    flex-direction: column;       /* image on top, text below */
  }
  .profile-section img.profile-photo {
    width: 100%;
    max-width: 240px;
  }
  .profile-section > div {
    width: 100%;
  }
}
