/* ==========================================================================
   PHM AP 2027 — Conference Website Stylesheet
   Clean, professional academic-conference styling
   ========================================================================== */

:root {
  --color-primary: #0d2b4e;      /* deep navy */
  --color-primary-light: #16406f;
  --color-accent: #1f6feb;       /* bright blue accent */
  --color-gold: #c9a24b;         /* muted gold highlight */
  --color-bg: #ffffff;
  --color-bg-alt: #f5f7fa;
  --color-border: #e3e8ef;
  --color-text: #1f2933;
  --color-text-light: #52606d;
  --color-white: #ffffff;

  --font-base: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;

  --max-width: 1160px;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(13, 43, 78, 0.08);
  --shadow-md: 0 4px 16px rgba(13, 43, 78, 0.12);
  --transition: 0.2s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 96px;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  font-size: 16px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary);
}

ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.25;
  margin: 0 0 16px;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 16px; }

.section {
  padding: 36px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  max-width: 1080px;
  margin: 0 auto 48px;
}

.section-header .eyebrow {
  display: inline-block;
  color: var(--color-gold);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--color-text-light);
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-primary);
}

.btn-primary:hover {
  background: #ddb862;
  color: var(--color-primary);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--color-white);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-secondary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-secondary:hover {
  background: var(--color-primary-light);
  color: var(--color-white);
}

/* ---------------- Top bar ---------------- */

.topbar {
  display: none; /* TODO: re-enable when ready to show the top info bar again */
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  padding: 6px 0;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar a {
  color: rgba(255, 255, 255, 0.85);
}

.topbar a:hover {
  color: var(--color-gold);
}

/* ---------------- Header / Nav ---------------- */

.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-primary);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.brand-text {
  line-height: 1.2;
}

.brand-text strong {
  display: block;
  font-size: 1.05rem;
  color: var(--color-primary);
}

.brand-text span {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-light);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  display: inline-block;
  padding: 10px 14px;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: var(--radius);
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--color-primary);
  background: var(--color-bg-alt);
}

/* ---------------- Nav dropdown (submenu) ---------------- */

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
}

.nav-caret {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-light);
  font-size: 0.7rem;
  padding: 8px;
  transition: transform var(--transition);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 200;
}

.nav-dropdown-menu a {
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

@media (min-width: 901px) {
  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown.open .nav-dropdown-menu {
    display: flex;
  }

  .nav-dropdown:hover .nav-caret,
  .nav-dropdown.open .nav-caret {
    transform: rotate(180deg);
  }
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  margin: 5px 0;
  transition: var(--transition);
}

/* ---------------- Hero ---------------- */

.hero {
  background: radial-gradient(circle at 20% 20%, #16406f 0%, #0d2b4e 45%, #081b34 100%);
  color: var(--color-white);
  padding: 56px 0 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 27, 52, 0.6) 0%, rgba(13, 43, 78, 0.55) 55%, rgba(8, 27, 52, 0.72) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.6s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
  max-width: 1400px;
}

.hero .eyebrow {
  display: inline-block;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-gold);
  margin-bottom: 18px;
}

.hero h1 {
  color: var(--color-white);
  font-size: 2.6rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
}

.hero h1 .nowrap {
  display: block;
  width: 100%;
  text-align: center;
  font-size: clamp(1.4rem, 2.8vw, 2.6rem);
  white-space: nowrap;
}

.hero-date-location {
  margin: 0 auto 28px;
}

.hero-year {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.4;
}

.hero-location {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------------- Page header (inner pages) ---------------- */

.page-header {
  background: linear-gradient(135deg, var(--color-primary), #123a66);
  color: var(--color-white);
  padding: 56px 0;
  text-align: center;
}

.page-header h1 {
  color: var(--color-white);
  margin-bottom: 8px;
}

.breadcrumb {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
}

/* ---------------- Cards / Grid ---------------- */

.grid {
  display: grid;
  gap: 28px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  color: var(--color-text-light);
  margin-bottom: 0;
  font-size: 0.95rem;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--color-bg-alt);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ---------------- Dates table / timeline ---------------- */

.dates-list {
  max-width: 720px;
  margin: 0 auto;
}

.date-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 24px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.date-row .date {
  min-width: 160px;
  font-weight: 700;
  color: var(--color-primary);
}

.date-row .desc {
  color: var(--color-text-light);
}

.date-row.highlight {
  border-color: var(--color-gold);
  background: #fdf9f0;
}

/* ---------------- News list ---------------- */

.news-list {
  max-width: 780px;
  margin: 0 auto;
}

.news-item {
  display: flex;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  min-width: 100px;
  color: var(--color-text-light);
  font-size: 0.88rem;
  font-weight: 600;
  padding-top: 3px;
}

.news-content h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.news-content p {
  color: var(--color-text-light);
  font-size: 0.93rem;
  margin-bottom: 0;
}

/* ---------------- Tables ---------------- */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

table th, table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.94rem;
}

table th {
  background: var(--color-bg-alt);
  color: var(--color-primary);
  font-weight: 600;
}

table tr:last-child td {
  border-bottom: none;
}

/* ---------------- Committee ---------------- */

.person {
  text-align: center;
}

.person-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.4rem;
  margin: 0 auto 14px;
}

.person h3 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.person span {
  display: block;
  color: var(--color-text-light);
  font-size: 0.85rem;
}

/* ---------------- Contact / Forms ---------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-base);
  font-size: 0.95rem;
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* ---------------- CTA band ---------------- */

.cta-band {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: 56px 0;
}

.cta-band h2 {
  color: var(--color-white);
}

.cta-band p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 560px;
  margin: 0 auto 28px;
}

/* ---------------- Footer ---------------- */

.site-footer {
  background: #081b34;
  color: rgba(255, 255, 255, 0.75);
  padding: 56px 0 24px;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-grid h4 {
  color: var(--color-white);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.footer-grid ul li {
  margin-bottom: 10px;
}

.footer-grid a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-grid a:hover {
  color: var(--color-gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 12px 8px;
  }

  .nav-dropdown-toggle a {
    flex: 1;
  }

  .nav-caret {
    display: flex;
  }

  .nav-dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
    background: var(--color-bg-alt);
    border-radius: 0;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: flex;
  }

  .nav-dropdown.open .nav-caret {
    transform: rotate(180deg);
  }

  .hero h1 { font-size: 1.9rem; }
  .hero h1 .nowrap {
    white-space: normal;
    font-size: clamp(1.4rem, 5vw, 1.9rem);
  }
  .hero-year { font-size: 1.25rem; }

  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }

  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }
}
