/* Overlake Digital Theme - Core Styles */

/* Color tokens */
:root {
  --ov-neutral-25:  #F9F7F0;
  --ov-neutral-900: #21201F;

  --ov-darkgreen-400: #1A693E;
  --ov-darkgreen-500: #005829;
  --ov-darkgreen-700: #004621;

  --ov-lightgreen-25:  #E3F1DA;
  --ov-lightgreen-500: #6FA34A;

  --ov-yellow-25:  #FFF1D0;
  --ov-yellow-200: #FDB813;

  --ov-brown-400:  #AA572E;
  --ov-blue-500:   #0D8598;
  --ov-red-500:    #BD2B3C;

  --ov-bg-page: var(--ov-neutral-25);
  --ov-text-main: var(--ov-neutral-900);
  --ov-brand-primary: var(--ov-darkgreen-500);
  --ov-brand-accent: var(--ov-yellow-200);

  --ov-radius-pill: 999px;
  --ov-radius-card: 16px;
  --ov-radius-owl: 100% 100% 100% 16px;
}

/* Base typography & layout */
html {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body.ov-body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  background-color: var(--ov-bg-page);
  color: var(--ov-text-main);
}

/* Background image overrides (ensure brand solid background only) */
body.ov-body,
body,
#page-wrapper,
.layout-container {
  background-image: none !important;
  background: var(--ov-bg-page) !important;
}

/* Container helper (similar to Bootstrap container) */
.container {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Headings */
h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5 {
  font-family: "Besley", Georgia, serif;
  color: var(--ov-brand-primary);
  margin-top: 0;
}

h1, .h1 {
  font-weight: 500;
  font-size: 2.25rem;
  line-height: 1.2;
}
h2, .h2 {
  font-weight: 500;
  font-size: 1.8rem;
}
h3, .h3 {
  font-weight: 500;
  font-size: 1.5rem;
}
h4, .h4,
h5, .h5 {
  font-weight: 600;
  color: var(--ov-brown-400);
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Links */
a {
  color: var(--ov-brand-primary);
  text-decoration: underline;
}
a:hover {
  text-decoration: none;
}

/* Header & navigation */
.ov-header {
  background-color: var(--ov-darkgreen-500);
  color: #fff;
}

.ov-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  max-width: 1120px;
  margin: 0 auto;
}

.ov-branding {
  display: flex;
  align-items: center;
}

.ov-logo-img {
  max-height: 56px;
  width: auto;
}

.ov-site-name-link {
  color: #fff;
  font-family: "Besley", Georgia, serif;
  font-weight: 600;
  font-size: 1.5rem;
  text-decoration: none;
}

/* Mobile nav toggle */
.ov-nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  cursor: pointer;
}

.ov-nav-toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background-color: #fff;
  margin: 0 auto;
}

/* Main nav */
.ov-main-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 56px;
  background-color: var(--ov-darkgreen-500);
  display: none;
  padding: 0.5rem 1rem 1rem;
}

.ov-main-nav.is-open {
  display: block;
}

.ov-menu-root {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ov-menu-item {
  margin-bottom: 0.25rem;
}

.ov-menu-link {
  display: block;
  padding: 0.35rem 0;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.ov-menu-link:hover,
.ov-menu-item.is-active > .ov-menu-link {
  text-decoration: underline;
}

/* Secondary nav (desktop) */
.ov-secondary-nav {
  display: none;
}

/* Hero */
.ov-hero {
  background-color: var(--ov-darkgreen-700);
  color: #fff;
  padding: 2.5rem 0;
}

.ov-hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Layout */
.ov-main {
  padding-bottom: 3rem;
}

.ov-page {
  margin-top: 2rem;
}

.ov-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.ov-content {
  flex: 1 1 auto;
}

.ov-sidebar {
  flex: 0 0 280px;
}

/* Footer */
.ov-footer {
  background-color: var(--ov-neutral-25);
  color: var(--ov-neutral-900);
  padding: 2.5rem 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.ov-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.ov-footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.ov-footer-column {
  font-size: 0.9rem;
}

.ov-footer-bottom {
  text-align: center;
  font-size: 0.8rem;
}

/* Dotted separator */
.ov-dotted-separator {
  border: 0;
  border-top: 2px dotted rgba(0,0,0,0.3);
  margin: 1.5rem 0;
}

/* Owl-eye image treatment */
.ov-owl-eye {
  border-radius: var(--ov-radius-owl);
  overflow: hidden;
}
.ov-owl-eye img {
  display: block;
  width: 100%;
  height: auto;
}

/* Buttons */
.button,
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.ov-btn {
  font-family: "Inter", Arial, sans-serif;
  font-weight: 500;
  border-radius: var(--ov-radius-pill);
  padding: 0.6rem 1.4rem;
  border: none;
  background-color: var(--ov-brand-primary);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
.ov-btn:hover {
  background-color: var(--ov-darkgreen-700);
}

.ov-btn-secondary {
  background-color: var(--ov-lightgreen-25);
  color: var(--ov-brand-primary);
  border: 1px solid var(--ov-brand-primary);
}

.ov-btn-tertiary {
  border-radius: 0;
  background: transparent;
  color: var(--ov-brand-primary);
  padding: 0;
  border: none;
  text-decoration: underline;
}

/* Site-wide form enhancements (migrated from project-week component) */
.ov-btn[disabled],
.ov-btn.disabled,
button[disabled].ov-btn,
input[type="submit"].ov-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(25%);
  pointer-events: none;
  background-color: #928E7F !important;
  border-color: #928E7F !important;
}
.ov-btn[disabled]:hover,
.ov-btn.disabled:hover { background-color: #928E7F !important; }

/* Unified invalid control styling */
.form-control.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-color: var(--ov-red-500);
  background-color: #fff8f8;
  box-shadow: 0 0 0 1px rgba(189,43,60,0.25);
}

/* Required explanation label */
.ov-form-required-label.is-required::after {
  content: ' * REQUIRED EXPLANATION';
  color: var(--ov-red-500);
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: .5px;
  margin-left: .5rem;
}

/* Helper note style */
.ov-form-required-note { color: var(--ov-red-500); font-weight: 500; }

/* Forms */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
textarea,
select {
  font-family: "Inter", Arial, sans-serif;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.2);
  padding: 0.5rem 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--ov-blue-500);
  outline-offset: 1px;
}

.form-item--error input,
.form-item--error textarea,
.form-item--error select {
  border-color: var(--ov-red-500);
}

/* Project Week Form SVG Icons */
.project-week-form__icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  display: inline-block;
}

/* Inline alerts */
.ov-inline-alert { display:inline-flex !important; flex-direction:row !important; align-items:baseline; gap:0.5rem; line-height:1.35; }
.ov-inline-alert__icon-wrapper { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; }
.ov-inline-alert__icon-wrapper svg { width:18px; height:18px; display:block; }
.ov-inline-alert--success svg { color: var(--ov-lightgreen-500); }
.ov-inline-alert--warning svg { color: var(--ov-yellow-200); }
.ov-inline-alert--info { background: var(--ov-lightgreen-25); padding: .4rem .65rem; border-radius: 8px; border: 1px solid var(--ov-darkgreen-400); }
.ov-inline-alert__icon { flex:0 0 18px; width:18px; height:18px; display:inline-block; }
.ov-inline-alert__text { flex:1 1 auto; margin:0; }

/* Parent inline info */
.ov-parent-inline-info { display:inline-flex; align-items:baseline; gap:.5rem; font-size:1rem; line-height:1.35; }
.ov-parent-inline-info__icon { flex:0 0 18px; width:18px; height:18px; display:block; }

/* Responsive behavior */
@media (min-width: 768px) {
  .ov-header-inner {
    padding: 0.75rem 0;
  }

  .ov-main-nav {
    position: static;
    display: block !important;
    padding: 0;
  }

  .ov-nav-toggle {
    display: none;
  }

  .ov-header-inner {
    gap: 2rem;
  }

  .ov-main-nav .ov-menu-root {
    display: flex;
    gap: 1.25rem;
  }

  .ov-menu-link {
    padding: 0.25rem 0;
  }

  .ov-secondary-nav {
    display: block;
    margin-left: auto;
  }

  .ov-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .ov-sidebar {
    margin-left: 2rem;
  }

  .ov-footer-top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  h1, .h1 {
    font-size: 2.4rem;
  }
  h2, .h2 {
    font-size: 2rem;
  }
}
