/* ========================================
   Arbor Eyecare — Shared Styles
   see20-20.com

   Loaded on EVERY page. Contains: variables,
   base reset, top bar, header/nav, footer,
   shared buttons, and responsive rules for
   all of the above.

   Page-specific styles stay in each page's
   inline <style> tag.
   ======================================== */

/* --- CSS Variables --- */
:root {
  --green: #60BE4C;
  --green-dark: #4a9e38;
  --green-light: #8FCA6A;
  --green-lime: #89C425;
  --green-pale: #EDF7EA;
  --green-mist: #F4F9F2;
  --grey: #5B5D62;
  --black: #27262D;
  --white: #FFFFFF;
  --cream: #FAF8F5;
  --warm-bg: #F5F2ED;
  --border: #E2E8E0;
  --border-warm: #E2DDD5;
  --font-body: 'Nunito Sans', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
}

/* --- Base Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--grey); background: #FEFDFB; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-dark); }
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--black); line-height: 1.2; margin-bottom: 0.5em; }
p { margin-bottom: 1em; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* --- Shared Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  border-radius: 8px;
}
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-dark); color: var(--white); transform: translateY(-1px); }
.btn-warm { background: var(--green-pale); color: var(--black); border-radius: 8px; border: 2px solid var(--green-light); }
.btn-warm:hover { background: #ddf0d6; color: var(--black); }
.btn-outline { border: 2px solid var(--green); color: var(--green); background: transparent; }
.btn-outline:hover { background: var(--green); color: var(--white); }
.btn-white { background: var(--white); color: var(--green); }
.btn-white:hover { background: var(--cream); color: var(--green); }
.btn-round { border-radius: 30px; }

/* ===== TOP BAR ===== */
.top-bar {
  background: var(--green);
  color: var(--white);
  padding: 10px 0;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.top-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-bar-welcome {
  color: var(--white);
  font-weight: 400;
  font-size: 0.9rem;
  font-style: italic;
  padding-left: 10px;
}
.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.top-bar-actions .dot {
  color: rgba(255,255,255,0.4);
  font-size: 0.7rem;
  user-select: none;
}
.top-bar-actions a {
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.82rem;
  white-space: nowrap;
  background: #357A28;
  border-radius: 20px;
  padding: 5px 16px;
  transition: all 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.15);
}
.top-bar-actions a:hover {
  background: var(--black);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* ===== HEADER / NAV ===== */
.header {
  background: rgb(51, 51, 51);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
}
.header-logo img { height: 70px; }
.nav-list { display: flex; list-style: none; gap: 2px; align-items: center; }

/* Top-level nav items */
.nav-item { position: relative; }
.nav-link {
  padding: 8px 10px;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  white-space: nowrap;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.nav-link:hover { color: var(--green); background: rgba(255,255,255,0.06); }
.nav-link.active { color: var(--green); font-weight: 600; }

/* Dropdown */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgb(51, 51, 51);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 8px 0;
  min-width: 220px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  z-index: 100;
}
.nav-item:hover .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block;
  padding: 8px 20px;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s;
}
.nav-dropdown a:hover {
  color: var(--green);
  background: rgba(255,255,255,0.05);
}

/* Portal CTA button in nav */
.nav-cta {
  background: var(--green);
  color: var(--white) !important;
  padding: 9px 20px;
  border-radius: 24px;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s;
  margin-left: 6px;
}
.nav-cta:hover { background: var(--green-dark); color: var(--white); }

/* Hamburger (mobile) */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}
.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); }

/* ===== FOOTER ===== */
.footer {
  background: var(--black);
  color: rgba(255,255,255,0.65);
  padding: 56px 0 28px;
  margin-top: 70px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-brand img { height: 55px; margin-bottom: 14px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; }
.footer h4 {
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  font-family: var(--font-heading);
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: rgba(255,255,255,0.65); font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--green); }
.footer-services-group { margin-bottom: 14px; }
.footer-services-group strong { color: var(--white); font-size: 0.82rem; display: block; margin-bottom: 4px; }
.footer-services-group .footer-links { margin-bottom: 0; }
.footer-loc { font-size: 0.82rem; margin-bottom: 12px; line-height: 1.7; }
.footer-loc strong { color: var(--white); display: block; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
}

/* ===== SHARED RESPONSIVE ===== */
@media (max-width: 768px) {
  /* Top bar stacks */
  .top-bar .container { flex-direction: column; gap: 6px; text-align: center; }
  .top-bar-welcome { display: none; }
  .top-bar-actions { flex-wrap: wrap; justify-content: center; }
  .top-bar-actions .dot { display: none; }

  /* Mobile nav */
  .nav-list { display: none; }
  .nav-list.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgb(51, 51, 51);
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    max-height: 80vh;
    overflow-y: auto;
  }
  .hamburger { display: block; }
  .nav-cta { margin-left: 0; margin-top: 8px; text-align: center; display: block; }
  .nav-dropdown {
    display: none;
    position: static;
    border: none;
    box-shadow: none;
    padding: 0 0 0 16px;
    min-width: 0;
    background: transparent;
  }
  .nav-item.open .nav-dropdown { display: block; }
  .nav-dropdown a { padding: 6px 12px; font-size: 0.88rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
