/* Northwest Vocal Music - Main Stylesheet */
/* Color Palette:
   Blue: #294089
   White: #ffffff
   Silver: #d8d8d6
   Gray: #8a8b8e
   Black: #000000
*/

/* Base Styles */
:root {
  --nw-blue: #294089;
  --nw-white: #ffffff;
  --nw-silver: #d8d8d6;
  --nw-gray: #8a8b8e;
  --nw-black: #000000;
  --nw-blue-dark: #1a2b5c;
  --nw-blue-light: #3d5eb3;

  --font-heading: "Kanit", sans-serif;
  --font-body: "Open Sans", sans-serif;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--nw-black);
  background-color: var(--nw-white);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.75rem;
}
h4 {
  font-size: 1.5rem;
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1rem;
}

a {
  color: var(--nw-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: var(--nw-blue-dark);
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--nw-blue);
  color: var(--nw-white);
  padding: 12px 16px;
  text-decoration: none;
  z-index: 1000;
  font-weight: 600;
  border-radius: 0 0 4px 0;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #ffff00;
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --nw-blue: #1a1a1a;
    --nw-white: #ffffff;
    --nw-silver: #cccccc;
    --nw-gray: #666666;
    --nw-black: #000000;
  }

  .btn-primary {
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
  }

  .btn-secondary {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .carousel-slide {
    transition: none !important;
  }
}

/* Header */
.site-header {
  background-color: var(--nw-white);
  border-bottom: 3px solid var(--nw-blue);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo-section {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--nw-black);
}

.site-logo {
  height: 60px;
  width: auto;
  margin-right: 1rem;
}

.site-title h1 {
  font-size: 1.75rem;
  margin: 0;
  color: var(--nw-blue);
}

.tagline {
  font-size: 0.875rem;
  color: var(--nw-gray);
  margin: 0;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--nw-blue);
  margin: 5px 0;
  transition: 0.3s;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  color: var(--nw-black);
  padding: 0.5rem 0;
  position: relative;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  color: var(--nw-blue);
  text-decoration: none;
}

.nav-menu a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--nw-blue);
}

/* Dropdown Menu */
.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--nw-white);
  box-shadow: var(--shadow-md);
  list-style: none;
  padding: 0.5rem 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--nw-black);
  font-size: 0.875rem;
}

.dropdown-menu a:hover {
  background-color: var(--nw-silver);
  text-decoration: none;
}

/* Search Form */
.search-form {
  display: flex;
  align-items: center;
  background-color: var(--nw-silver);
  border-radius: 4px;
  overflow: hidden;
}

.search-form input {
  border: none;
  background: none;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  width: 200px;
}

.search-form button {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--nw-gray);
}

.search-form button:hover {
  color: var(--nw-blue);
}

/* Announcements Bar */
.announcements-bar {
  background-color: var(--nw-silver);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--nw-gray);
}

.announcement {
  font-size: 0.875rem;
  padding: 0.25rem 0;
}

.announcement.urgent {
  color: #d32f2f;
  font-weight: 600;
}

/* Main Content */
main {
  min-height: calc(100vh - 400px);
  padding: 2rem 0;
}

/* Cards */
.card {
  background-color: var(--nw-white);
  border: 1px solid var(--nw-silver);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--nw-blue);
  color: var(--nw-white);
}

.btn-primary:hover {
  background-color: var(--nw-blue-dark);
  color: var(--nw-white);
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--nw-silver);
  color: var(--nw-black);
}

.btn-secondary:hover {
  background-color: var(--nw-gray);
  color: var(--nw-white);
  text-decoration: none;
}

.btn-warning {
  background-color: #ff9800;
  color: var(--nw-white);
}

.btn-warning:hover {
  background-color: #f57c00;
  color: var(--nw-white);
  text-decoration: none;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--nw-silver);
  color: var(--nw-black);
}

.btn-outline:hover {
  background-color: var(--nw-silver);
  color: var(--nw-black);
  text-decoration: none;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Footer */
.site-footer {
  background-color: var(--nw-blue);
  color: var(--nw-white);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--nw-white);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
  color: var(--nw-silver);
  font-size: 0.875rem;
}

.footer-section a:hover {
  color: var(--nw-white);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.contact-info {
  margin-top: 1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: block;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.social-links a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: var(--nw-silver);
}

.footer-bottom a {
  color: var(--nw-silver);
}

/* Mobile Search Overlay */
.mobile-search-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--nw-white);
  border-bottom: 3px solid var(--nw-blue);
  box-shadow: var(--shadow-md);
  padding: 1rem;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1001;
}

.mobile-search-overlay.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-search-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-search-form {
  flex: 1;
  display: flex;
  background-color: var(--nw-silver);
  border-radius: 4px;
  overflow: hidden;
}

.mobile-search-form input {
  flex: 1;
  border: none;
  background: none;
  padding: 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
}

.mobile-search-form button {
  background: none;
  border: none;
  padding: 0.75rem;
  cursor: pointer;
  color: var(--nw-gray);
}

.mobile-search-form button:hover {
  color: var(--nw-blue);
}

.mobile-search-close {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--nw-gray);
  font-size: 1.5rem;
  line-height: 1;
}

.mobile-search-close:hover {
  color: var(--nw-blue);
}

/* Mobile search toggle button */
.mobile-search-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--nw-gray);
}

.mobile-search-toggle:hover {
  color: var(--nw-blue);
}

/* Mobile controls container - hidden on desktop */
.mobile-controls {
  display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Compact mobile header - now sticky for all users */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .header-content {
    padding: 0.75rem 0;
    flex-direction: row; /* Keep as row for mobile top bar */
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }

  /* Simplified logo section */
  .logo-section {
    flex: 1;
    justify-content: flex-start;
  }

  .site-logo {
    display: none;
  }

  .site-title h1 {
    font-size: 1.25rem; /* Smaller title */
  }

  .tagline {
    display: none; /* Hide tagline on mobile to save space */
  }

  /* Mobile top bar controls */
  .mobile-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .mobile-search-toggle {
    display: block;
  }

  /* Mobile navigation */
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--nw-white);
    border-top: 1px solid var(--nw-silver);
    z-index: 1000;
    box-shadow: var(--shadow-md);
  }

  .nav-menu {
    background-color: var(--nw-white);
    padding: 0;
    box-shadow: none;
    display: none;
    width: 100%;
    list-style: none;
    margin: 0;
    max-height: 70vh; /* Limit height to 70% of viewport */
    overflow-y: auto; /* Enable vertical scrolling */
  }

  .nav-menu li {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .nav-menu a {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--nw-silver);
  }

  .nav-menu.active {
    display: block;
  }

  /* Hide dropdown on mobile - convert to flat menu */
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: #f8f9fa;
    margin-left: 1rem;
  }

  .dropdown-menu a {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  /* Custom scrollbar for main navigation on mobile */
  .nav-menu::-webkit-scrollbar {
    width: 6px;
  }

  .nav-menu::-webkit-scrollbar-track {
    background: transparent;
  }

  .nav-menu::-webkit-scrollbar-thumb {
    background-color: var(--nw-gray);
    border-radius: 3px;
  }

  .nav-menu::-webkit-scrollbar-thumb:hover {
    background-color: var(--nw-blue);
  }

  /* Hide desktop search form on mobile */
  .search-form {
    display: none;
  }

  /* Typography adjustments */
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  h3 {
    font-size: 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  /* Adjust main content padding for sticky header */
  main {
    padding-top: 2rem;
  }
}
