/* =========================================================
   CHINOPERL Website Stylesheet
   Clean, responsive design for desktop and mobile
   ========================================================= */

/* ---------------------------------------------------------
   1. CSS Variables & Reset
   --------------------------------------------------------- */
:root {
  --color-primary:     #8B0000;
  --color-primary-dk:  #6B0000;
  --color-primary-lt:  #a80000;
  --color-bg:          #ffffff;
  --color-bg-alt:      #f7f4f1;
  --color-border:      #ddd;
  --color-text:        #333333;
  --color-text-light:  #666666;
  --color-link:        #8B0000;
  --color-link-hover:  #6B0000;
  --color-nav-bg:      #333333;
  --color-nav-text:    #ffffff;
  --color-nav-hover:   #dc5300;
  --color-footer-bg:   #2c2c2c;
  --color-footer-text: #cccccc;
  --font-body:         Georgia, 'Times New Roman', serif;
  --font-sans:         'Helvetica Neue', Arial, sans-serif;
  --max-width:         1100px;
  --header-height:     130px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-link);
  text-decoration: underline;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

/* ---------------------------------------------------------
   2. Layout Utilities
   --------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
}

/* ---------------------------------------------------------
   3. Site Header
   --------------------------------------------------------- */
.site-header {
  background-color: #fff;
  text-align: left;
}

.site-logo {
  display: block;
  line-height: 0;
  opacity: 0.9;
  text-decoration: none;
}

.site-logo:hover {
  opacity: 0.85;
  text-decoration: none;
}

.site-logo img {
  width: auto;
  height: auto;
  max-height: 124px;
  max-width: 100%;
  display: block;
}

/* ---------------------------------------------------------
   4. Navigation
   --------------------------------------------------------- */
.main-nav {
  background-color: var(--color-nav-bg);
  position: relative;
  z-index: 100;
  height: 44px; /* fixed height — makes % children resolve correctly */
}

.main-nav .container {
  display: flex;
  align-items: stretch;
  height: 100%; /* fills the 44px exactly */
}

/* Nav toggle (hamburger) - hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px 0;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  margin-left: auto;
}

/* Primary nav list */
.nav-menu {
  display: flex;
  align-items: stretch;
  height: 100%; /* fills the 44px exactly */
}

.nav-menu > li {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 100%; /* fills the 44px exactly — bg covers full nav bar */
  transition: background 0.2s;
}

/* Hover/active background on the li — guaranteed full-height coverage */
.nav-menu > li:hover,
.nav-menu > li.active {
  background-color: var(--color-nav-hover);
}

.nav-menu > li > a {
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--color-nav-text);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
}

.nav-menu > li > a:hover,
.nav-menu > li.active > a,
.nav-menu > li:hover > a {
  text-decoration: none;
}

/* Dropdown menus */
.nav-menu .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #444444;
  min-width: 220px;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.nav-menu li:hover > .dropdown,
.nav-menu li:focus-within > .dropdown {
  display: block;
}

.nav-menu .dropdown li a {
  display: block;
  padding: 10px 18px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.83rem;
  font-weight: 400;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: background 0.2s;
}

.nav-menu .dropdown li a:hover {
  background-color: #dc5300;
  text-decoration: none;
}

.nav-menu .dropdown li:last-child a {
  border-bottom: none;
}

/* Dropdown arrow indicator */
.nav-menu > li.has-dropdown > a::after {
  content: ' ▾';
  font-size: 0.7rem;
  vertical-align: middle;
}

/* ---------------------------------------------------------
   5. Page Content Layout
   --------------------------------------------------------- */

/* Two-column: main content + right decorative panel (About Us etc.) */
.page-with-panel {
  display: flex;
  align-items: stretch;
  min-height: 500px;
}

.page-with-panel-main {
  flex: 1;
  min-width: 0;
  padding-top: 36px;
  padding-right: 40px;
}

.page-panel {
  width: 300px;
  flex-shrink: 0;
  background-color: #e2e0d6;
}

/* Panel sidebar navigation links */
.panel-nav {
  padding-top: 80px;
}

.panel-nav a,
.panel-nav-active {
  display: block;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px dotted rgba(0,0,0,0.25);
}

.panel-nav a:first-child,
.panel-nav-active:first-child {
  border-top: 1px dotted rgba(0,0,0,0.25);
}

.panel-nav a:hover {
  text-decoration: underline;
}

.panel-nav-active {
  background-color: #fff;
  font-weight: 600;
}

@media (max-width: 900px) {
  .page-with-panel {
    flex-direction: column;
  }
  .page-with-panel-main {
    padding-right: 0;
  }
  .page-panel {
    width: 100%;
    min-height: 40px;
  }
}
.site-main {
  padding: 36px 0 60px;
}

/* Homepage has no top padding – hero flush against nav */
.home-main {
  padding-top: 0;
}

/* Flush variant — removes site-main top padding so panel touches the nav */
.site-main--flush {
  padding-top: 0;
}

/* Two-column layout: content + sidebar */
.content-with-sidebar {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: 210px;
  flex-shrink: 0;
}

/* Breadcrumb */
.breadcrumb {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--color-text-light);
  text-decoration: none;
}

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

.breadcrumb .sep {
  margin: 0 6px;
}

/* Page title */
.page-title {
  font-size: 2rem;
  font-weight: normal;
  color: #111;
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
  font-family: var(--font-body);
}

/* ---------------------------------------------------------
   6. Sidebar Navigation (Journal, etc.)
   --------------------------------------------------------- */
.sidebar-nav {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li a {
  display: block;
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}

.sidebar-nav li:last-child a {
  border-bottom: none;
}

/* ---------------------------------------------------------
   7. Homepage Layout
   --------------------------------------------------------- */
/* ---------------------------------------------------------
   7a. Home Page – Hero Row (slideshow + info panel)
   --------------------------------------------------------- */
.home-hero {
  display: flex;
  align-items: stretch;
  min-height: 220px;
  margin-bottom: 24px;
}

.home-hero-left {
  flex: 0 0 50%;
  max-width: 50%;
  overflow: hidden;
}

.home-hero-right {
  flex: 1;
  background: #B05A22;
  color: #fff;
  padding: 28px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-tagline {
  font-size: 1.08rem;
  line-height: 1.7;
  margin: 0 0 22px;
}

.hero-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-links li {
  border-top: 1px dotted rgba(255,255,255,0.45);
}

.hero-links li:last-child {
  border-bottom: 1px dotted rgba(255,255,255,0.45);
}

.hero-links a {
  display: block;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 9px 0;
  text-decoration: none;
}

.hero-links a:hover {
  text-decoration: underline;
}

/* Slideshow */
.slideshow {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
  margin-bottom: 0;
  height: 100%;
}

.slideshow-track {
  display: flex;
  transition: transform 0.6s ease;
  height: 100%;
}

.slideshow-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.slideshow-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.slideshow-controls {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 5px;
}

.slideshow-btn {
  background: rgba(0,0,0,0.45);
  border: none;
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.slideshow-btn:hover {
  background: rgba(0,0,0,0.75);
}

.slideshow-dots {
  display: flex;
  gap: 5px;
  justify-content: center;
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
}

.slideshow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.2s;
}

.slideshow-dot.active {
  background: #fff;
}

/* ---------------------------------------------------------
   7b. Home Page – Body Row (news + description)
   --------------------------------------------------------- */
.home-body {
  display: flex;
}

.home-body-left {
  flex: 0 0 50%;
  max-width: 50%;
  padding-right: 0;
}

.home-body-right {
  flex: 1;
  padding: 20px 0 24px 36px;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--color-text);
}

.home-body-right p {
  margin-bottom: 1em;
}

.home-body-right a {
  color: var(--color-primary);
}

/* Home news section */
.home-news-header {
  background: #B05A22;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: right;
  padding: 7px 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

.home-news-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  align-items: flex-start;
}

.home-news-thumb {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  overflow: hidden;
  display: block;
}

.home-news-thumb img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  display: block;
}

.home-news-text {
  flex: 1;
  min-width: 0;
}

.home-news-text a {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-primary);
  display: block;
  line-height: 1.35;
  font-weight: 600;
  text-decoration: none;
}

.home-news-text a:hover {
  text-decoration: underline;
}

.home-news-date {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 3px;
  display: block;
}

.home-news-more {
  text-align: right;
  border: 1px solid var(--color-border);
  border-top: none;
  padding: 4px 6px;
}

.home-news-more a {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  color: #fff;
  text-align: center;
  line-height: 24px;
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 2px;
}

.home-news-more a:hover {
  background: var(--color-primary-dk);
}

/* ---------------------------------------------------------
   8. General Content Styles
   --------------------------------------------------------- */
.content-body h2 {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin: 28px 0 12px;
  font-family: var(--font-sans);
}

.content-body h3 {
  font-size: 1.1rem;
  color: var(--color-text);
  margin: 20px 0 8px;
  font-family: var(--font-sans);
}

.content-body p {
  margin-bottom: 1em;
}

.content-body p.indent {
  text-indent: 2em;
}

.content-body ul,
.content-body ol {
  list-style: disc;
  padding-left: 1.6em;
  margin-bottom: 1em;
}

.content-body ol {
  list-style: decimal;
}

.content-body li {
  margin-bottom: 0.3em;
}

.content-body strong, .content-body b {
  font-weight: bold;
}

.content-body em, .content-body i {
  font-style: italic;
}

.content-body .chinoperl-name {
  color: var(--color-primary);
  font-weight: bold;
}

.content-body .section-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 32px 0;
}

/* ---------------------------------------------------------
   9. Board / People Listing
   --------------------------------------------------------- */
.people-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em;
}

.people-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}

.people-list li:last-child {
  border-bottom: none;
}

.people-list .person-name {
  font-weight: bold;
}

.people-list .person-role {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-text-light);
  font-style: italic;
}

.people-list .emeritus {
  color: var(--color-text-light);
  font-style: italic;
}

/* ---------------------------------------------------------
   10. Journal Specific Styles
   --------------------------------------------------------- */
.journal-header {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.journal-header-text {
  flex: 1;
}

.journal-cover-img {
  width: 140px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.journal-float-right {
  float: right;
  margin: 0 0 16px 24px;
  width: 160px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.journal-float-left {
  float: left;
  margin: 0 24px 16px 0;
  width: 280px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.volume-section {
  margin-bottom: 32px;
}

.volume-title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-bg-alt);
  padding: 10px 14px;
  border-left: 4px solid var(--color-primary);
  margin-bottom: 12px;
}

.volume-issue {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 16px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--color-border);
}

.article-list {
  list-style: none;
  padding: 0;
}

.article-list li {
  padding: 6px 0 6px 16px;
  border-bottom: 1px dotted #e0e0e0;
  font-size: 0.92rem;
  position: relative;
}

.article-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

.article-list li:last-child {
  border-bottom: none;
}

.article-author {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--color-text-light);
  display: block;
  margin-top: 2px;
}

.article-category {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  letter-spacing: 0.05em;
  display: block;
  margin: 14px 0 6px;
}

/* ---------------------------------------------------------
   11. Conference / Past Conferences
   --------------------------------------------------------- */
.conference-year {
  margin-bottom: 28px;
}

.conference-year-heading {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 4px;
  margin-bottom: 10px;
}

.conference-detail {
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.conference-detail .label {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-text-light);
}

.program-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.program-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-text);
  transition: border-color 0.2s, background 0.2s;
}

.program-link:hover {
  border-color: var(--color-primary);
  background: #fff;
  text-decoration: none;
  color: var(--color-primary);
}

.program-link::before {
  content: '📄';
  font-size: 0.85rem;
}

.conference-photos {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.conference-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.conference-photos-grid figure {
  margin: 0;
}

.conference-photos-grid img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.conference-photos-grid figcaption {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 4px;
  font-style: italic;
}

/* Single conference photo with stacked caption */
.conference-photos-single {
  margin: 0;
}

.conference-photos-single img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--color-border);
}

.conference-photos-single figcaption {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 8px;
  font-style: italic;
  line-height: 1.6;
}

/* Conference card (image + text side by side) */
.conference-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-top: 8px;
}

.conference-card-image {
  flex: 0 0 auto;
  border: 1px solid var(--color-border);
  line-height: 0;
}

.conference-card-image img {
  width: 200px;
  height: auto;
  display: block;
}

.conference-card-text {
  flex: 1;
}

.conference-card-text p {
  margin-bottom: 12px;
}

.conference-card-text a {
  color: var(--color-accent, #b22222);
}

/* ---------------------------------------------------------
   12. News Page
   --------------------------------------------------------- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.news-card {
  display: block;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.news-card:last-child {
  border-bottom: none;
}

.news-card-title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.news-card-title a {
  color: var(--color-primary);
  text-decoration: none;
}

.news-card-title a:hover {
  color: var(--color-primary-dk);
  text-decoration: underline;
}

.news-card-date {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text);
  margin-bottom: 10px;
}

.news-card-media {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.news-card-thumb {
  width: 91px;
  height: 91px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

.news-card-excerpt {
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}

/* Floated image in news articles (wraps text around it) */
.news-float-image {
  float: left;
  width: 280px;
  height: auto;
  margin: 0 24px 16px 0;
  border: 1px solid var(--color-border);
}

.content-body::after {
  content: "";
  display: table;
  clear: both;
}

@media (max-width: 600px) {
  .news-float-image {
    float: none;
    width: 100%;
    margin: 0 0 16px 0;
  }
}

/* News article detail layout (photo left, text right) */
.news-article-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.news-article-image {
  flex: 0 0 auto;
  border: 1px solid var(--color-border);
  line-height: 0;
}

.news-article-image img {
  width: 220px;
  height: auto;
  display: block;
}

.news-article-text {
  flex: 1;
}

.news-article-text p {
  margin-bottom: 14px;
}

.news-article-journal-cover {
  display: block;
  width: 100px;
  height: auto;
  margin-left: auto;
  margin-top: 8px;
}

@media (max-width: 600px) {
  .news-article-layout {
    flex-direction: column;
  }
  .news-article-image img {
    width: 100%;
  }
  .news-article-journal-cover {
    margin-left: 0;
  }
}

/* ---------------------------------------------------------
   13. Contact Page
   --------------------------------------------------------- */
.contact-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.contact-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  padding: 14px 16px;
}

.contact-card h3 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.contact-card p {
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

.contact-card a {
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

/* Contact Form */
.contact-form {
  max-width: 560px;
  margin-top: 32px;
}

.contact-form h2 {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  color: var(--color-primary);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: #fff;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-group textarea {
  height: 140px;
  resize: vertical;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

.form-submit {
  display: inline-block;
  padding: 10px 28px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s;
}

.form-submit:hover {
  background: var(--color-primary-dk);
}

.form-required-note {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 8px;
}

/* ---------------------------------------------------------
   14. Resources Page
   --------------------------------------------------------- */
.resources-list {
  list-style: none;
  padding: 0;
}

.resource-item {
  padding: 18px 0;
}

.resource-item h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.resource-item h3 a {
  color: var(--color-primary);
}

.resource-item h3 a:hover {
  color: var(--color-primary-dk);
}

.resource-item p {
  font-size: 0.9rem;
  color: var(--color-text);
  margin: 0;
}

/* ---------------------------------------------------------
   15. Membership Page
   --------------------------------------------------------- */
.membership-box {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  padding: 20px 24px;
  margin-bottom: 28px;
}

.membership-box h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.life-members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.life-members-table th {
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 12px;
  text-align: left;
}

.life-members-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
}

.life-members-table tr:nth-child(even) td {
  background: var(--color-bg-alt);
}

/* ---------------------------------------------------------
   16. History Page
   --------------------------------------------------------- */
.founding-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
  border: 1px solid var(--color-border);
  margin: 16px 0;
}

.founding-member {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.founding-member:nth-child(even) {
  background: var(--color-bg-alt);
}

.founding-member-name {
  font-weight: bold;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.founding-member-affil {
  font-size: 0.82rem;
  color: var(--color-text-light);
  font-style: italic;
  margin-top: 2px;
}

/* ---------------------------------------------------------
   17. Footer
   --------------------------------------------------------- */
.site-footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 32px 0 20px;
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 20px;
}

.footer-about {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 500px;
}

.footer-about strong {
  display: block;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 8px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.footer-links li a {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-footer-text);
  transition: color 0.2s;
}

.footer-links li a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-bottom {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

/* ---------------------------------------------------------
   18. Utility Classes
   --------------------------------------------------------- */
.text-red   { color: var(--color-primary); }
.text-bold  { font-weight: bold; }
.text-italic{ font-style: italic; }
.text-small { font-size: 0.85rem; }
.text-center{ text-align: center; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.alert-box {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-left: 4px solid #ffc107;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.info-box {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-primary);
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 0.93rem;
}

/* ---------------------------------------------------------
   19. Responsive — Tablet (≤ 900px)
   --------------------------------------------------------- */
@media (max-width: 900px) {
  .home-hero {
    flex-direction: column;
  }

  .home-hero-left {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .home-hero-right {
    padding: 24px 20px;
  }

  .home-body {
    flex-direction: column;
  }

  .home-body-left {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .home-body-right {
    padding: 20px 0;
  }

  .content-with-sidebar {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    order: -1;
  }

  .sidebar-nav ul {
    display: flex;
    flex-wrap: wrap;
  }

  .sidebar-nav li {
    flex: 1;
    min-width: 160px;
  }

  .sidebar-nav li a {
    text-align: center;
    border-right: 1px solid var(--color-border);
  }

  .journal-header {
    flex-direction: column;
  }

  .journal-cover-img {
    width: 100px;
  }

  .journal-float-right,
  .journal-float-left {
    float: none;
    display: block;
    margin: 0 auto 16px auto;
    width: 140px;
  }

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

/* ---------------------------------------------------------
   20. Responsive — Mobile (≤ 700px)
   --------------------------------------------------------- */
@media (max-width: 700px) {
  :root {
    --header-height: 86px;
  }

  .site-logo img {
    max-height: 86px;
  }

  /* Mobile nav: remove fixed height so menu can expand */
  .main-nav {
    height: auto;
  }

  /* Mobile nav toggle visible */
  .nav-toggle {
    display: flex;
    align-items: center;
  }

  .main-nav .container {
    flex-wrap: wrap;
    height: auto;
  }

  /* Nav menu collapses */
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    height: auto;
    background: var(--color-nav-bg);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu > li {
    height: auto;
    flex-direction: column;
  }

  .nav-menu > li > a {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
  }

  /* Arrow flips when dropdown is open */
  .nav-menu > li.has-dropdown > a::after {
    float: right;
    transition: transform 0.2s;
  }

  .nav-menu > li.has-dropdown.dropdown-open > a::after {
    transform: rotate(180deg);
  }

  /* Dropdowns hidden by default on mobile; shown when toggled */
  .nav-menu .dropdown {
    display: none;
    position: static;
    width: 100%;
    box-shadow: none;
    background: rgba(0,0,0,0.25);
    min-width: 0;
  }

  .nav-menu > li.dropdown-open > .dropdown {
    display: block;
  }

  .nav-menu .dropdown li a {
    padding-left: 32px;
    font-size: 0.85rem;
    text-decoration: none;
  }

  .page-title {
    font-size: 1.6rem;
  }

  .form-row {
    flex-direction: column;
  }

  .contact-contacts {
    grid-template-columns: 1fr;
  }

  .founding-members-grid {
    grid-template-columns: 1fr;
  }

  .conference-photos-grid {
    grid-template-columns: 1fr 1fr;
  }

  .news-card-media {
    flex-direction: column;
  }

  .news-card-thumb {
    width: 100%;
    height: 160px;
  }

  .slideshow-slide img {
    height: 220px;
  }

  .footer-links ul {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }

  .conference-photos-grid {
    grid-template-columns: 1fr;
  }

  .program-links {
    flex-direction: column;
  }
}
