/* ==========================================
   SMI 2027 — DESIGN SYSTEM
   ========================================== */

:root {
  --primary:        #2554a0;
  --primary-deep:   #1a3d7a;
  --accent:         #e8952a;
  --accent-hover:   #c97918;
  --navy:           #162338;
  --navy-mid:       #1e2f45;
  --navy-light:     #253650;
  --surface-light:  #f4f7fc;
  --text-on-dark:   #ffffff;
  --text-muted-dark: #c8d4e8;
  --text-on-light:  #2c3e50;
  --border-radius:  6px;
  --border-radius-lg: 12px;
  --speed:          0.25s;
  --shadow:         0 4px 16px rgba(0,0,0,0.18);
  --shadow-hover:   0 10px 28px rgba(0,0,0,0.28);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ========== HEADER & NAVIGATION ========== */
#header {
  overflow: visible;   /* allow logo to hang below navbar bar */
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  z-index: 1030;
  /* position: sticky comes from Bootstrap's sticky-top class — do not override */
}

#header .navbar {
  position: relative;  /* containing block for the absolutely-positioned logo */
  background-color: var(--navy) !important;
  padding: 0.45rem 1.5rem 0.45rem 200px;
  min-height: 60px;
  border-bottom: 2px solid rgba(232, 149, 42, 0.45);
}

/* Logo floats below the navbar bar, anchored to top-left */
#header .navbar-brand {
  position: absolute;
  left: 1.25rem;
  top: 0;
  padding: 0;
  background-color: transparent;
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  z-index: 10;
  margin: 0;
}

#header .navbar-brand img {
  max-height: 160px;
  width: auto;
  display: block;
  transition: transform var(--speed) ease;
}

#header .navbar-brand:hover img {
  transform: scale(1.04);
}

#header .navbar-nav .nav-link {
  color: #ffffff !important;
  padding: 0.55rem 0.9rem;
  font-family: "Yanone Kaffeesatz", "Segoe UI", sans-serif;
  font-size: 1.45rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color var(--speed) ease, background-color var(--speed) ease;
  border-radius: var(--border-radius);
}

#header .navbar-nav .nav-link:hover,
#header .navbar-nav .nav-link.active {
  color: var(--accent) !important;
  background-color: rgba(255,255,255,0.08);
  text-decoration: none;
}

#header .navbar-nav .nav-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Mobile: revert to normal flow, shrink logo */
@media (max-width: 991px) {
  #header .navbar {
    padding: 0.5rem 1rem;
  }
  #header .navbar-brand {
    position: static;
    border-radius: var(--border-radius);
    box-shadow: none;
  }
  #header .navbar-brand img {
    max-height: 60px;
  }
  #header .navbar-collapse {
    background-color: var(--navy-mid);
    border-top: 2px solid var(--accent);
    padding: 0.25rem 0;
  }
  #header .navbar-nav .nav-link {
    padding: 0.7rem 1.5rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
}

/* ========== MAIN CONTENT SECTIONS ========== */
main {
  min-height: calc(100vh - 200px);
}

section {
  transition: background-color var(--speed) ease;
}

/* ========== HERO SECTION ========== */
.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.hero-section .carousel {
  height: 100%;
}

.hero-section .carousel-item {
  min-height: 400px;
  background-size: cover;
  background-position: center;
}

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

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

/* ========== SECTION TITLES ========== */
.section-title {
  font-size: 2.4rem;
  font-weight: 500;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 2.5rem;
  letter-spacing: 2px;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background-color: var(--accent);
  border-radius: 2px;
}

.section-subtitle,
.subsection-title {
  font-size: 1.4rem;
  font-weight: 500;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.75px;
  text-transform: uppercase;
  color: inherit;
}

@media (max-width: 768px) {
  .section-title { font-size: 1.75rem; }
  .section-subtitle, .subsection-title { font-size: 1.2rem; }
}

/* Content-area links: underline for colour-blind accessibility */
.contact-card-names a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ========== ABOUT SECTION ========== */
.about-section {
  background: linear-gradient(160deg, var(--primary-deep) 0%, var(--navy-mid) 60%, var(--navy) 100%);
  color: #ffffff;
  border-bottom: 3px solid rgba(232, 149, 42, 0.3);
}

.about-section p {
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.about-section a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--speed) ease;
}

.about-section a:hover {
  color: #ffd080;
}

/* ========== CALL FOR PAPERS SECTION ========== */
.cfp-section {
  background-color: var(--navy-mid);
  color: #ffffff;
}

.dates-list {
  background-color: rgba(255, 255, 255, 0.06);
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--accent);
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
}

.dates-list dt {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 0.9rem;
}

.dates-list dt:first-child { margin-top: 0; }

.dates-list dd {
  margin-left: 0;
  margin-bottom: 0;
  color: #ffffff;
  font-size: 1.05rem;
  padding-left: 0;
}

.conference-date {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
}

.cfp-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--speed) ease;
}
.cfp-section a:hover { color: #ffd080; }

.topics-list {
  list-style: none;
  padding: 0;
  columns: 1;
}

@media (min-width: 576px)  { .topics-list { columns: 2; column-gap: 1.5rem; } }
@media (min-width: 992px)  { .topics-list { columns: 3; column-gap: 2rem;   } }
@media (min-width: 1200px) { .topics-list { columns: 4; column-gap: 2rem;   } }

.topics-list li {
  padding: 0.35rem 0 0.35rem 1.4rem;
  position: relative;
  margin-bottom: 0.2rem;
  break-inside: avoid;
  font-size: 1rem;
  line-height: 1.55;
}

.topics-list li::before {
  content: '\2022';
  position: absolute;
  left: 0.3rem;
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1.4;
}

.submission-button-wrapper {
  margin: 2rem 0;
}

.btn-primary {
  background-color: var(--primary);
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 0.85rem 2.4rem;
  font-size: 1rem;
  border-radius: var(--border-radius);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: background-color var(--speed) ease, transform var(--speed) ease, box-shadow var(--speed) ease;
}

.btn-primary:hover {
  background-color: var(--primary-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.alert-info {
  background-color: rgba(255, 255, 255, 0.08);
  border: none;
  border-left: 3px solid var(--accent);
  border-radius: var(--border-radius);
  padding: 1.1rem 1.5rem;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.75;
}

/* ========== REGISTRATION SECTION ========== */
.registration-section {
  background-color: #faf8f5;
  color: #2c3e50;
}

.registration-section .section-title {
  color: var(--primary);
}

.registration-section .text-muted {
  color: #556070 !important;
}

/* ========== PROGRAM SECTION ========== */
.program-section {
  background-color: #eef2fa;
  color: #2c3e50;
}

.program-section .section-title {
  color: var(--primary);
}

.program-section .text-muted {
  color: #556070 !important;
}

/* ========== COMMITTEE SECTION ========== */
.committee-section {
  background-color: var(--navy-mid);
  color: var(--text-on-dark);
}

.committee-group {
  margin-bottom: 3.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.committee-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Horizontal layout with full-height card-body to ensure vertical border extends completely */
.committee-member {
  --bs-card-bg: #243350;        /* override Bootstrap's white card background */
  --bs-card-color: #edf1f8;     /* override Bootstrap's dark card text */
  background-color: #243350;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: transform var(--speed) ease, box-shadow var(--speed) ease, border-color var(--speed) ease;
  height: 100%;
  flex-direction: row;
  align-items: stretch;
}

.committee-member:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(232, 149, 42, 0.5);
}

.committee-member .card-img-top {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  align-self: center;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(10%);
  transition: filter var(--speed) ease;
}

.committee-member:hover .card-img-top {
  filter: grayscale(0%);
}

.committee-member .card-body {
  background-color: transparent;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  color: #ffffff;
  flex-grow: 1;
}

.committee-member .card-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
  line-height: 1.3;
  color: #ffffff;
}

.committee-member .card-title a {
  color: #ffffff;
  text-decoration: none;
  transition: color var(--speed) ease;
}

.committee-member .card-title a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.committee-member .btn-outline-secondary {
  color: var(--accent);
  border-color: rgba(232, 149, 42, 0.55);
  font-size: 0.88rem;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  transition: all var(--speed) ease;
  background-color: transparent;
}

.committee-member .btn-outline-secondary:hover {
  background-color: var(--accent);
  color: var(--navy);
  border-color: var(--accent);
  text-decoration: none;
}

.committee-member .small.text-muted {
  color: #c8d4e8 !important;
  font-size: 0.9rem;
  margin-bottom: 0;
  line-height: 1.4;
}

/* ========== CONTACT SECTION ========== */
.contact-section {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--text-on-dark);
  border-top: 3px solid var(--accent);
}

.contact-intro {
  font-size: 1.1rem;
  color: var(--text-muted-dark);
  margin-bottom: 0;
  line-height: 1.8;
}

.contact-card {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 3px solid var(--accent);
  border-radius: var(--border-radius-lg);
  padding: 1.75rem 1.5rem;
  height: 100%;
  transition: transform var(--speed) ease, box-shadow var(--speed) ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.contact-card-icon {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.contact-card h4 {
  font-size: 1.1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-on-dark);
  margin-bottom: 0.75rem;
}

.contact-card p {
  font-size: 1rem;
  color: var(--text-muted-dark);
  line-height: 1.7;
  margin-bottom: 0.6rem;
}

.contact-card-names {
  font-size: 0.95rem !important;
  color: #c8d4e8 !important;
}

.contact-card-names a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--speed) ease;
}

.contact-card-names a:hover {
  opacity: 0.75;
}

/* ========== FOOTER ========== */
footer {
  background-color: var(--navy);
  color: var(--text-on-dark);
  border-top: 2px solid rgba(232, 149, 42, 0.3);
  padding: 2rem 0;
}

footer p {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: rgba(220, 232, 248, 0.7);
}

footer a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--speed) ease;
}

footer a:hover {
  opacity: 0.75;
}

/* ========== RESPONSIVE SPACING ========== */
@media (max-width: 576px) {
  .py-5 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  .section-title { font-size: 1.5rem; }
}

@media (min-width: 1200px) {
  .section-title { font-size: 2.2rem; }
}

/* Only dark sections need Bootstrap text-muted overridden to stay light */
.about-section .text-muted,
.cfp-section .text-muted,
.committee-section .text-muted {
  color: var(--text-muted-dark) !important;
}

/* ========== PRINT ========== */
@media print {
  header, footer, .navbar { display: none; }
  section { page-break-inside: avoid; }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
