/* Coastal Sleep Lab – Optimized Styles */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Georgia, 'Times New Roman', Times, serif;
  color: #333;
  background: #fff;
  line-height: 1.65;
  font-size: 17px; /* slightly larger base */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* Top Bar */
.top-bar {
  background-color: #3d8bb0;
  color: #fff;
  padding: 11px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  font-size: 16px;
  font-family: Arial, Helvetica, sans-serif;
}

.top-bar .phone {
  text-align: center;
}

.top-bar .phone a {
  color: #fff;
  font-weight: 500;
}

.top-bar .social {
  position: absolute;
  right: 20px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.top-bar .social a {
  color: #fff;
  font-size: 18px;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.top-bar .social a:hover {
  opacity: 1;
}

/* Logo Section – tighter margins */
.logo-section {
  background: #fff;
  padding: 12px 16px 10px;
  text-align: center;
}

.logo-section a {
  display: inline-block;
}

.logo-section img {
  max-height: 100px;
  width: auto;
  margin: 0 auto;
}

/* Navigation */
.main-nav {
  background-color: #3d8bb0;
  padding: 0;
  position: relative;
}

.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 960px;
  margin: 0 auto;
}

.main-nav li {
  margin: 0;
}

.main-nav a {
  display: block;
  padding: 14px 20px;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.main-nav a.active {
  background-color: #f0f0f0;
  color: #333;
}

/* Hamburger button – top right corner of the top bar (logo green) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  padding: 6px 12px;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  line-height: 1;
}

.nav-toggle:hover {
  color: #e0e0e0;
}

/* Page Title Bar */
.page-title-bar {
  background-color: #3d8bb0;
  color: #fff;
  padding: 12px 20px;
  max-width: 960px;
  margin: 0 auto;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 1px;
  border-left: 5px solid #111;
}

/* Main Content */
.main-content {
  max-width: 960px;
  margin: 32px auto;
  padding: 0 20px;
  text-align: center;
}

.main-content h1 {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 16px;
  letter-spacing: 0.4px;
  color: #222;
}

.main-content h2 {
  font-size: 24px;
  margin: 28px 0 14px;
  color: #222;
}

.main-content p {
  font-size: 17.5px;
  margin-bottom: 22px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.75;
}

.hero-image {
  margin: 24px auto;
  max-width: 520px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  border-radius: 2px;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
}

/* Services */
.symptoms {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin: 28px 0;
  flex-wrap: wrap;
  text-align: left;
}

.symptoms ul {
  list-style: none;
  font-size: 17.5px;
}

.symptoms li {
  padding: 5px 0;
  position: relative;
  padding-left: 18px;
}

.symptoms li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #3d8bb0;
  font-weight: bold;
}

.staff-section {
  margin-top: 40px;
  border-top: 1px solid #ddd;
  padding-top: 30px;
}

.staff-section h3 {
  font-size: 19px;
  margin-bottom: 6px;
  color: #222;
}

.staff-section p {
  margin-bottom: 20px;
  font-size: 16.5px;
}

.call-cta {
  margin-top: 30px;
  font-size: 19px;
}

.call-cta a {
  color: #3d8bb0;
  font-weight: bold;
}

/* Contact / Map locations */
.locations {
  text-align: left;
  max-width: 560px;
  margin: 30px auto;
}

.location {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #eee;
}

.location:last-of-type {
  border-bottom: none;
}

.location h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: #3d8bb0;
}

.location p {
  margin: 0 0 8px;
  font-size: 16.5px;
  line-height: 1.55;
  max-width: none;
}

.location-image {
  margin-top: 14px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  max-width: 420px;
}

.location-image img {
  width: 100%;
  display: block;
}

/* Portal pages */
.portal-box {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  padding: 32px 28px;
  max-width: 600px;
  margin: 40px auto;
  border-radius: 6px;
  text-align: center;
}

.portal-box a.btn {
  display: inline-block;
  background: #3d8bb0;
  color: #fff;
  padding: 14px 32px;
  border-radius: 4px;
  margin-top: 16px;
  font-family: Arial, sans-serif;
  font-size: 17px;
  transition: background 0.2s;
}

.portal-box a.btn:hover {
  background: #2e6b8a;
}

/* Footer */
.site-footer {
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
  padding: 28px 20px;
  text-align: center;
  margin-top: 50px;
  font-family: Arial, sans-serif;
  font-size: 14.5px;
  color: #666;
}

.site-footer a {
  color: #3d8bb0;
}

.site-footer p {
  margin-bottom: 6px;
}

/* ===================== */
/* Mobile Optimization   */
/* ===================== */
@media (max-width: 768px) {
  .top-bar {
    padding: 10px 14px;
    font-size: 15px;
  }

  .top-bar .social {
    right: 12px;
  }

  .logo-section {
    padding: 10px 12px 8px;
  }

  .logo-section img {
    max-height: 80px;
  }

  .main-nav {
    padding: 0;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #3d8bb0;
  }

  .main-nav.nav-open ul {
    display: flex;
  }

  .main-nav a {
    text-align: center;
    padding: 15px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    font-size: 17px;
  }

  .main-nav a.active {
    background: #f0f0f0;
    color: #333;
  }

  .page-title-bar {
    margin: 0 10px;
    font-size: 15px;
    padding: 10px 14px;
  }

  .main-content {
    margin: 24px auto;
    padding: 0 16px;
  }

  .main-content h1 {
    font-size: 24px;
  }

  .symptoms {
    flex-direction: column;
    gap: 6px;
    align-items: center;
  }

  .locations {
    max-width: 100%;
  }

  .location-image {
    max-width: 100%;
  }

  .portal-box {
    padding: 24px 18px;
    margin: 28px 10px;
  }

  .hero-image {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .logo-section img {
    max-height: 70px;
  }

  .top-bar .phone {
    font-size: 14px;
  }

  .main-content h1 {
    font-size: 22px;
  }

  .main-content p {
    font-size: 16.5px;
  }
}

/* Accessibility focus styles */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #3d8bb0;
  outline-offset: 2px;
}
