/* ======================================================
   _style-theme.css  (R3 / Oakland v1.3)
   Purpose: Color system, buttons, cards, dividers, footer,
            theme modes, nav + mobile menu appearance
   ====================================================== */

/* ---------- Theme Variables (Light as default) ---------- */
:root {
  --brand: #80013f;                 /* primary maroon */
  --text: #333;                     /* body text */
  --muted: #666;                    /* secondary text */
  --bg: #ffffff;                    /* page background */
  --card-bg: #f9f9f9;               /* panels/cards */
  --divider: color-mix(in srgb, var(--brand), white 70%);
  --link: var(--brand);
  --button-text: #fff;
}

/* ---------- Optional: auto-respect system Dark Mode ---------- */
@media (prefers-color-scheme: dark) {
  :root:not(.force-light) {
    --brand: #e067a5;               /* brighter rose for contrast on dark */
    --text: #eee;
    --muted: #aaa;
    --bg: #1b1b1b;
    --card-bg: #2b2b2b;
    --divider: color-mix(in srgb, var(--brand), black 70%);
    --link: #f3a3c7;
    --button-text: #fff;
  }
}

/* ---------- Manual Dark Mode (add .dark-theme to <body> or <html>) ---------- */
.dark-theme {
  --brand: #e067a5;
  --text: #eee;
  --muted: #aaa;
  --bg: #1b1b1b;
  --card-bg: #2b2b2b;
  --divider: color-mix(in srgb, var(--brand), black 70%);
  --link: #f3a3c7;
  --button-text: #fff;
}

/* If you ever need to force light even when OS is dark: add .force-light to <html> */
.force-light { }

/* ---------- Cards / Panels ---------- */
.card {
  background: var(--card-bg);
}
.card p {
  margin-bottom: 0.9em;
}
.card .actions {
  margin-top: 1em;
}

/* ---------- Dividers (brand-tinted) ---------- */
/*
/ * Default for light backgrounds * /
.divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--divider),
    transparent
  );
  margin: 1.6em auto;   / * tighter vertical gap around dividers * /
  width: min(80%, 1100px);
  border: none;
}

/ * Stronger variant for darker sections (e.g., on gray/maroon bands) * /
.divider--light {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    color-mix(in srgb, var(--brand), black 60%),
    transparent
  );
  margin: 2.4em auto;
  width: min(80%, 1100px);
  border: none;
}
*/

/* Default divider – best on white */
.divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--divider),
    transparent
  );
  margin: 1.6em auto;
  width: min(80%, 1100px);
  border: none;
}

/* Stronger variant for darker sections (already there) */
.divider--strong {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    color-mix(in srgb, var(--brand), black 60%),
    transparent
  );
  margin: 2.4em auto;
  width: min(80%, 1100px);
  border: none;
}

/* NEW: divider tuned for section--light background */
.section--light .divider--on-light {
  background: linear-gradient(
    to right,
    transparent,
    color-mix(in srgb, var(--brand), black 20%),
    transparent
  );
}


/* ---------- Buttons (works for <a> and <button>) ---------- */
.w3-button,
.btn {
  padding: 10px 20px;          /* balanced vs 18px body text */
  font-size: 16px;
  border-radius: 8px;
  transition: opacity 0.2s ease, transform 0.02s ease;
  color: var(--button-text);
}

.w3-button.w3-theme,
.btn--brand,
.w3-button.w3-blue,
.w3-button.w3-deep-purple {
  background: var(--brand) !important;
  color: var(--button-text) !important;
  border: none;
}

.w3-button:hover,
.btn:hover {
  opacity: 0.92;
}
.w3-button:active,
.btn:active {
  transform: translateY(1px);
}

/* CTA / brand button semantic hook */
.btn--brand {
  /* already styled above; keep as named variant */
}

/* Section background helper */
.section--light {
  background: #f7f7f7;
}

/* Dark mode version: keep it "lighter" than full black but not pale */
.dark-theme .section--light {
  background: #262626;
}

/* ---------- Nav links & buttons (desktop) ---------- */
.nav-button,
.nav-link {
  color: var(--text) !important;
  background-color: transparent !important;
}

.nav-button:hover,
.nav-link:hover {
  background-color: #f1f1f1 !important;
}

/* prevent theme icon from drifting on some browsers */
.theme-toggle i.theme-icon {
  font-size: 20px;
  line-height: 1;
}

/* give theme icon more spacing */
.theme-toggle-label {
  margin-left: 6px;
}

/* ---------- Footer ---------- */
.site-footer {
  color: #eee;
}
.site-footer a {
  color: #fff;
  opacity: 0.95;
}
.site-footer a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Final override: Services dropdown trigger background */
#main-nav .w3-dropdown-hover > .w3-button,
#main-nav .w3-dropdown-hover > .w3-button:hover,
#main-nav .w3-dropdown-hover > .w3-button:active,
#main-nav .w3-dropdown-hover > .w3-button:focus {
  background-color: transparent !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

/* Kill stubborn grey block behind Services wrapper itself */
#main-nav .w3-dropdown-hover,
#main-nav .w3-dropdown-hover:hover,
#main-nav .w3-dropdown-hover:active,
#main-nav .w3-dropdown-hover:focus {
  background-color: transparent !important;
}

/* ---------- MOBILE NAV (hamburger) ---------- */

/* Base look – follow light theme variables */
#mobile-menu {
  background-color: var(--bg) !important;
  color: var(--text);
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Links inside the mobile menu */
#mobile-menu .w3-bar-item.w3-button {
  background-color: transparent !important;
  color: var(--text) !important;
  text-align: left;
  box-shadow: none !important;
}

/* Hover state for links */
#mobile-menu .w3-bar-item.w3-button:hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
}

/* Section headings like "SERVICES" / "MORE" */
#mobile-menu .w3-small {
  color: var(--muted) !important;
}

/* Dark theme variants */
.dark-theme #mobile-menu {
  background-color: #111 !important;
  border-top-color: rgba(255, 255, 255, 0.12) !important;
}

.dark-theme #mobile-menu .w3-bar-item.w3-button {
  color: #eee !important;
}

.dark-theme #mobile-menu .w3-bar-item.w3-button:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

.dark-theme #mobile-menu .w3-small {
  color: #aaa !important;
}

/* Stop W3 opacity utilities from making text nearly invisible */
.w3-opacity,
.w3-opacity-min,
.w3-hover-opacity:hover {
  opacity: 1 !important;
}

