/* ==========================================================================
   Design System & Custom Styles for phbcoop.com (Redesign)
   Modern Minimalist Professional - Health & Financial Cooperative
   ========================================================================== */

:root {
  /* Brand Color Palette */
  --coop-primary: #0f766e;        /* Deep Teal / Health Green */
  --coop-primary-hover: #115e59;
  --coop-primary-light: #ccfbf1;
  --coop-secondary: #1e3a8a;      /* Trust Blue / Financial */
  --coop-secondary-hover: #172554;
  --coop-secondary-light: #dbeafe;
  --coop-accent: #d97706;         /* Gold / Prosperity */
  --coop-accent-hover: #b45309;
  
  /* Neutral Palette */
  --coop-bg-main: #f8fafc;
  --coop-bg-card: #ffffff;
  --coop-border: #e2e8f0;
  --coop-border-focus: #0f766e;
  
  /* Typography Colors */
  --coop-text-dark: #0f172a;      /* Headings (High Contrast) */
  --coop-text-body: #334155;      /* Body Text */
  --coop-text-muted: #64748b;     /* Subtext */
  
  /* Typography Families */
  --font-heading: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Radii & Shadows */
  --coop-radius-sm: 8px;
  --coop-radius-md: 14px;
  --coop-radius-lg: 20px;
  --coop-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --coop-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --coop-shadow-lg: 0 12px 24px -4px rgba(15, 118, 110, 0.12), 0 4px 8px -2px rgba(0, 0, 0, 0.04);
  --coop-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --coop-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Accessibility & Font Scaling (WCAG 2.2 AA)
   ========================================================================== */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

html.font-scale-md {
  font-size: 18px;
}

html.font-scale-lg {
  font-size: 20px;
}

html.high-contrast {
  --coop-bg-main: #ffffff;
  --coop-text-dark: #000000;
  --coop-text-body: #000000;
  --coop-text-muted: #1e293b;
  --coop-border: #000000;
}

body {
  font-family: var(--font-body);
  color: var(--coop-text-body);
  background-color: var(--coop-bg-main);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
  color: var(--coop-text-dark);
  font-weight: 600;
  line-height: 1.35;
}

a {
  color: var(--coop-primary);
  text-decoration: none;
  transition: var(--coop-transition);
}

a:hover {
  color: var(--coop-primary-hover);
}

:focus-visible {
  outline: 3px solid var(--coop-accent) !important;
  outline-offset: 2px !important;
}

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  background: var(--coop-primary);
  color: #fff;
  padding: 10px 18px;
  z-index: 9999;
  border-radius: var(--coop-radius-sm);
  transition: top 0.2s;
  font-weight: 600;
}
.skip-link:focus {
  top: 15px;
}

/* ==========================================================================
   Header & Topbar
   ========================================================================== */
.topbar {
  background: linear-gradient(90deg, #094a45 0%, #0f766e 100%);
  color: #ffffff;
  font-size: 0.875rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar a {
  color: #f1f5f9;
  text-decoration: none;
}
.topbar a:hover {
  color: #fde047;
}

.font-resizer-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.font-resizer-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: var(--coop-transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
}
.font-resizer-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}
.font-resizer-btn.active {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--coop-primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.main-navbar {
  background: #ffffff;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(15, 118, 110, 0.08);
  transition: var(--coop-transition);
  padding: 10px 0;
}

.main-navbar.scrolled {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
  padding: 6px 0;
}

.brand-logo {
  height: 56px;
  max-height: 64px;
  width: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.navbar-brand:hover .brand-logo {
  transform: scale(1.02);
}

/* Brand lockup: round emblem + two-line cooperative name */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-lockup .brand-logo {
  height: 58px;
  width: 58px;
  flex-shrink: 0;
  border-radius: 50%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
  padding-left: 12px;
  border-left: 2px solid rgba(15, 118, 110, 0.18);
  white-space: nowrap;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--coop-secondary);
  letter-spacing: 0.1px;
}

.brand-subtitle {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--coop-primary);
  margin-top: 2px;
}

.main-navbar.scrolled .brand-lockup .brand-logo {
  height: 50px;
  width: 50px;
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  color: #1e293b !important;
  padding: 8px 16px !important;
  border-radius: 8px;
  transition: var(--coop-transition);
  position: relative;
  letter-spacing: -0.01em;
}

.nav-link:hover {
  color: var(--coop-primary) !important;
  background-color: var(--coop-primary-light);
  transform: translateY(-1px);
}

.nav-link.active {
  color: var(--coop-primary) !important;
  background-color: var(--coop-primary-light);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--coop-primary);
  border-radius: 2px;
}

.dropdown-menu {
  border: none;
  box-shadow: var(--coop-shadow-lg);
  border-radius: var(--coop-radius-md);
  padding: 8px;
  animation: fadeIn 0.2s ease-in-out;
}

.dropdown-item {
  font-family: var(--font-body);
  font-size: 0.925rem;
  padding: 10px 16px;
  border-radius: var(--coop-radius-sm);
  color: var(--coop-text-dark);
  transition: var(--coop-transition);
}

.dropdown-item:hover {
  background-color: var(--coop-primary-light);
  color: var(--coop-primary);
  transform: translateX(4px);
}

/* ==========================================================================
   Hero Banner Carousel
   ========================================================================== */
.hero-carousel {
  border-radius: var(--coop-radius-lg);
  overflow: hidden;
  box-shadow: var(--coop-shadow-md);
  background-color: #e2e8f0;
}

.hero-carousel .carousel-item {
  height: 440px;
  background-size: cover;
  background-position: center;
  position: relative;
}

@media (max-width: 768px) {
  .hero-carousel .carousel-item {
    height: 240px;
  }
}

.hero-carousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ffffff;
  opacity: 0.6;
}

.carousel-indicators .active {
  opacity: 1;
  background-color: var(--coop-accent);
  width: 28px;
  border-radius: 6px;
}

/* ==========================================================================
   Notice Ticker (ประกาศด่วน)
   ========================================================================== */
.notice-ticker {
  background: #ffffff;
  border: 1px solid var(--coop-border);
  border-left: 4px solid var(--coop-accent);
  border-radius: var(--coop-radius-md);
  padding: 10px 18px;
  box-shadow: var(--coop-shadow-sm);
}

.ticker-badge {
  background: #fef3c7;
  color: #92400e;
  font-size: 0.775rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

/* ==========================================================================
   Quick Service Cards
   ========================================================================== */
.service-card {
  background: #ffffff;
  border: 1px solid var(--coop-border);
  border-radius: var(--coop-radius-md);
  padding: 24px 20px;
  text-align: center;
  transition: var(--coop-transition);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--coop-primary), var(--coop-secondary));
  opacity: 0;
  transition: var(--coop-transition);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--coop-shadow-lg);
  border-color: #cbd5e1;
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon-box {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  transition: var(--coop-transition);
}

.service-card:hover .service-icon-box {
  transform: scale(1.1) rotate(4deg);
}

.icon-teal { background: #ccfbf1; color: #0f766e; }
.icon-blue { background: #dbeafe; color: #1e40af; }
.icon-amber { background: #fef3c7; color: #b45309; }
.icon-purple { background: #ede9fe; color: #6d28d9; }

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-header {
  margin-bottom: 28px;
  position: relative;
}

.section-header .section-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--coop-primary);
  background: var(--coop-primary-light);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.section-header h2 {
  font-size: 1.75rem;
  margin: 0;
}

.section-header p {
  color: var(--coop-text-muted);
  margin: 4px 0 0;
}

/* ==========================================================================
   News Cards & Grid
   ========================================================================== */
.news-card {
  background: #ffffff;
  border: 1px solid var(--coop-border);
  border-radius: var(--coop-radius-md);
  overflow: hidden;
  transition: var(--coop-transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--coop-shadow-md);
  border-color: #94a3b8;
}

.news-thumb-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: #e2e8f0;
}

.news-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-thumb {
  transform: scale(1.05);
}

.news-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 118, 110, 0.9);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.news-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-title a {
  color: var(--coop-text-dark);
}
.news-title a:hover {
  color: var(--coop-primary);
}

.news-excerpt {
  color: var(--coop-text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.news-meta {
  font-size: 0.8rem;
  color: var(--coop-text-muted);
  border-top: 1px solid var(--coop-border);
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Utility */
.min-w-0 {
  min-width: 0 !important;
}

/* ==========================================================================
   Document Item & Download Hub
   ========================================================================== */
.doc-item {
  background: #ffffff;
  border: 1px solid var(--coop-border);
  border-radius: var(--coop-radius-md);
  padding: 14px 18px;
  margin-bottom: 12px;
  transition: var(--coop-transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 100%;
  box-sizing: border-box;
}

.doc-item:hover {
  border-color: var(--coop-primary);
  box-shadow: var(--coop-shadow-sm);
  background-color: #fafbfc;
  transform: translateX(4px);
}

.doc-content-wrapper,
.doc-item > .d-flex {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.doc-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  margin: 0;
}

.doc-info {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.doc-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--coop-text-dark);
  margin-bottom: 4px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.doc-title a {
  color: var(--coop-text-dark);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  overflow-wrap: break-word;
}

.doc-title a:hover {
  color: var(--coop-primary);
}

.doc-meta {
  font-size: 0.815rem;
  color: var(--coop-text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  line-height: 1.4;
}

.doc-action {
  flex-shrink: 0;
  margin-left: 0;
}

@media (max-width: 575.98px) {
  .doc-item {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    gap: 12px;
  }
  .doc-content-wrapper,
  .doc-item > .d-flex {
    width: 100%;
  }
  .doc-action {
    display: flex;
    justify-content: flex-end;
    border-top: 1px dashed var(--coop-border);
    padding-top: 10px;
    width: 100%;
  }
  .doc-action .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
}

/* ==========================================================================
   Board & Staff Profile Cards
   ========================================================================== */
.profile-card {
  background: #ffffff;
  border: 1px solid var(--coop-border);
  border-radius: var(--coop-radius-md);
  padding: 24px 16px;
  text-align: center;
  transition: var(--coop-transition);
  height: 100%;
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--coop-shadow-md);
  border-color: #cbd5e1;
}

.profile-avatar-wrapper {
  width: 140px;
  height: 140px;
  margin: 0 auto 16px;
  position: relative;
}

.profile-avatar-wrapper > a {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.profile-avatar {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background-color: #f1f5f9;
}

.profile-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--coop-text-dark);
  margin-bottom: 4px;
}

.profile-position {
  font-size: 0.875rem;
  color: var(--coop-primary);
  font-weight: 500;
  margin-bottom: 8px;
}

/* ==========================================================================
   Chairman Profile Card (Featured Highlight)
   ========================================================================== */
.chairman-card {
  background: #ffffff;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: var(--coop-radius-lg);
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.08);
  transition: var(--coop-transition);
  position: relative;
  overflow: hidden;
}

.chairman-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--coop-primary), var(--coop-accent));
}

.chairman-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(15, 118, 110, 0.14);
}

.chairman-avatar-wrapper {
  width: 140px;
  height: 140px;
  margin: 0 auto 16px;
  position: relative;
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chairman-avatar {
  width: 140px !important;
  height: 140px !important;
  min-width: 140px !important;
  min-height: 140px !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  object-position: center top;
  border: 4px solid #ffffff !important;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.22) !important;
  background-color: #f1f5f9;
  display: block;
  margin: 0 auto;
  transition: transform 0.3s ease;
}

.chairman-card:hover .chairman-avatar {
  transform: scale(1.03);
}

.chairman-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: var(--coop-primary);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.chairman-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--coop-text-dark);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.chairman-position {
  font-size: 1rem;
  color: var(--coop-primary);
  font-weight: 600;
  margin-bottom: 6px;
}

.chairman-org {
  font-size: 0.85rem;
  color: var(--coop-text-muted);
}

.profile-badge {
  font-size: 0.75rem;
  background: #f1f5f9;
  color: var(--coop-text-muted);
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
}

/* ==========================================================================
   Loan Calculator Widget
   ========================================================================== */
.calc-widget {
  background: linear-gradient(135deg, #094a45 0%, #0f766e 100%);
  color: #ffffff;
  border-radius: var(--coop-radius-lg);
  padding: 32px;
  box-shadow: var(--coop-shadow-lg);
}

.calc-widget h3 {
  color: #ffffff;
  margin-bottom: 8px;
}

.calc-widget .form-label {
  color: #ccfbf1;
  font-size: 0.9rem;
  font-weight: 500;
}

.calc-widget .form-control, .calc-widget .form-select {
  border-radius: var(--coop-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.95);
  font-size: 1.05rem;
  padding: 10px 14px;
}

.calc-result-box {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--coop-radius-md);
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.calc-result-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: #fef08a;
  font-family: var(--font-heading);
}

/* ==========================================================================
   Page Headers & Breadcrumbs
   ========================================================================== */
.page-banner {
  background: linear-gradient(135deg, #0f766e 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 48px 0;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.page-banner::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.page-banner h1 {
  color: #ffffff;
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.breadcrumb-custom {
  background: transparent;
  padding: 0;
  margin: 0;
}

.breadcrumb-custom .breadcrumb-item a {
  color: #ccfbf1;
}

.breadcrumb-custom .breadcrumb-item.active {
  color: #ffffff;
  font-weight: 500;
}

.breadcrumb-custom .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: #0b1320;
  color: #94a3b8;
  font-size: 0.9rem;
  padding-top: 60px;
  border-top: 4px solid var(--coop-primary);
  margin-top: 60px;
}

.site-footer h4, .site-footer h5 {
  color: #f8fafc;
  font-size: 1.15rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.site-footer h4::after, .site-footer h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 3px;
  background: var(--coop-accent);
  border-radius: 2px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer ul li {
  margin-bottom: 10px;
}

.site-footer a {
  color: #cbd5e1;
  transition: var(--coop-transition);
}

.site-footer a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-bottom {
  background-color: #060b14;
  padding: 20px 0;
  margin-top: 48px;
  font-size: 0.825rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Utility Classes & Buttons
   ========================================================================== */
.btn-primary-coop {
  background-color: var(--coop-primary);
  border-color: var(--coop-primary);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 500;
  padding: 10px 22px;
  border-radius: var(--coop-radius-sm);
  transition: var(--coop-transition);
}

.btn-primary-coop:hover {
  background-color: var(--coop-primary-hover);
  border-color: var(--coop-primary-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}

.btn-secondary-coop {
  background-color: var(--coop-secondary);
  border-color: var(--coop-secondary);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 500;
  padding: 10px 22px;
  border-radius: var(--coop-radius-sm);
  transition: var(--coop-transition);
}

.btn-secondary-coop:hover {
  background-color: var(--coop-secondary-hover);
  border-color: var(--coop-secondary-hover);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-outline-coop {
  border: 1.5px solid var(--coop-primary);
  color: var(--coop-primary);
  background: transparent;
  font-family: var(--font-heading);
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--coop-radius-sm);
  transition: var(--coop-transition);
}

.btn-outline-coop:hover {
  background-color: var(--coop-primary);
  color: #ffffff;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--coop-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--coop-shadow-md);
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--coop-transition);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--coop-primary-hover);
  color: #ffffff;
  transform: translateY(-3px);
}

/* Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Overrides */
@media (max-width: 991.98px) {
  .brand-logo {
    height: 46px;
  }
  .brand-lockup .brand-logo {
    height: 46px;
    width: 46px;
  }
  .brand-lockup {
    gap: 10px;
  }
  .brand-text {
    padding-left: 10px;
  }
  .brand-title {
    font-size: 1rem;
  }
  .brand-subtitle {
    font-size: 0.85rem;
  }
  .nav-link {
    padding: 10px 16px !important;
  }
}

/* Large desktop with long menu: tighten brand so the nav fits on one line */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .brand-lockup .brand-logo {
    height: 48px;
    width: 48px;
  }
  .brand-title {
    font-size: 0.95rem;
  }
  .brand-subtitle {
    font-size: 0.8rem;
  }
}

@media (max-width: 380px) {
  .brand-lockup .brand-logo {
    height: 40px;
    width: 40px;
  }
  .brand-text {
    padding-left: 8px;
  }
  .brand-title {
    font-size: 0.88rem;
  }
  .brand-subtitle {
    font-size: 0.76rem;
  }
}
