/* ============================================
   IISD - Institute of International Social Development
   Main Stylesheet
   ============================================ */

:root {
  --primary: #1a2a4a;
  --primary-light: #2c4270;
  --accent: #c9a227;
  --accent-light: #e0c14d;
  --text-dark: #2d2d2d;
  --text-gray: #666;
  --text-light: #999;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border: #e0e0e0;
  --shadow: 0 2px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.7;
  background: var(--bg-white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Georgia', 'Times New Roman', serif;
  color: var(--primary);
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.25rem; }

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Top Bar ---------- */
.top-bar {
  background: var(--primary);
  color: #fff;
  padding: 8px 0;
  font-size: 0.85rem;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.top-bar a { color: var(--accent-light); }
.top-bar .un-status {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-bar .un-badge {
  background: var(--accent);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  background: var(--bg-white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}
.site-logo img {
  height: 60px;
  width: auto;
}
.site-logo .logo-text {
  display: flex;
  flex-direction: column;
}
.site-logo .logo-title {
  font-family: 'Georgia', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}
.site-logo .logo-sub {
  font-size: 0.75rem;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 5px;
}
.main-nav a {
  display: block;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: 4px;
  transition: var(--transition);
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
  background: rgba(201, 162, 39, 0.08);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  height: 520px;
  background: linear-gradient(135deg, rgba(26,42,74,0.85), rgba(44,66,112,0.75)),
              url('../images/hero.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  color: #fff;
}
.hero-content {
  max-width: 750px;
}
.hero h1 {
  color: #fff;
  font-size: 3rem;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.95;
  line-height: 1.6;
}
.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--primary);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn-outline:hover {
  background: #fff;
  color: var(--primary);
}
.btn-outline-dark {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-dark:hover {
  background: var(--primary);
  color: #fff;
}

/* ---------- Section Common ---------- */
.section {
  padding: 80px 0;
}
.section-alt {
  background: var(--bg-light);
}
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
}
.section-header h2 {
  margin-bottom: 15px;
}
.section-header p {
  color: var(--text-gray);
  font-size: 1.05rem;
}
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 15px auto 0;
}

/* ---------- About Preview ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.about-image img {
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.about-text h2 { margin-bottom: 20px; }
.about-text p { margin-bottom: 15px; color: var(--text-gray); }
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}
.stat-item {
  text-align: center;
  padding: 20px 10px;
  background: var(--bg-light);
  border-radius: 8px;
}
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Georgia', serif;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-gray);
  margin-top: 5px;
}

/* ---------- UN Status Banner ---------- */
.un-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 50px 0;
  text-align: center;
}
.un-banner h2 { color: #fff; margin-bottom: 15px; }
.un-banner p { font-size: 1.1rem; opacity: 0.9; max-width: 800px; margin: 0 auto 25px; }
.un-banner .un-emblem {
  font-size: 3rem;
  margin-bottom: 15px;
}

/* ---------- Departments / Cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.card {
  background: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.card-image {
  height: 200px;
  background: var(--primary);
  overflow: hidden;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body {
  padding: 25px;
}
.card-body h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}
.card-body p {
  color: var(--text-gray);
  font-size: 0.95rem;
  margin-bottom: 15px;
}
.card-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.card-link:hover { gap: 10px; }

/* ---------- Events ---------- */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}
.event-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 25px;
  background: var(--bg-white);
  padding: 25px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.event-item:hover { box-shadow: var(--shadow-hover); }
.event-date {
  text-align: center;
  border-right: 2px solid var(--border);
  padding-right: 20px;
}
.event-date .day {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Georgia', serif;
  line-height: 1;
}
.event-date .month {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--text-gray);
  margin-top: 5px;
}
.event-date .year {
  font-size: 0.85rem;
  color: var(--text-light);
}
.event-content h3 { font-size: 1.2rem; margin-bottom: 8px; }
.event-content p { color: var(--text-gray); font-size: 0.95rem; margin-bottom: 8px; }
.event-meta {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-light);
}
.event-meta span { display: flex; align-items: center; gap: 5px; }

/* ---------- Page Header (inner pages) ---------- */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 60px 0;
  text-align: center;
}
.page-header h1 { color: #fff; margin-bottom: 10px; }
.page-header .breadcrumb {
  font-size: 0.9rem;
  opacity: 0.8;
}
.page-header .breadcrumb a { color: var(--accent-light); }

/* ---------- Content Page ---------- */
.content-section {
  padding: 60px 0;
}
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 50px;
}
.main-content h2 { margin: 30px 0 15px; }
.main-content h2:first-child { margin-top: 0; }
.main-content h3 { margin: 25px 0 12px; }
.main-content p { margin-bottom: 15px; color: var(--text-gray); }
.main-content ul, .main-content ol {
  margin: 15px 0 15px 25px;
  color: var(--text-gray);
}
.main-content li { margin-bottom: 8px; }
.main-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 15px 25px;
  margin: 25px 0;
  background: var(--bg-light);
  font-style: italic;
  color: var(--text-dark);
  border-radius: 0 8px 8px 0;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 120px;
  align-self: start;
}
.sidebar-widget {
  background: var(--bg-light);
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 25px;
}
.sidebar-widget h4 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}
.sidebar-widget ul { list-style: none; }
.sidebar-widget li { margin-bottom: 10px; }
.sidebar-widget a {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-widget a::before {
  content: '\203A';
  color: var(--accent);
  font-weight: bold;
}

/* ---------- Team / Governance ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.team-member {
  text-align: center;
}
.team-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.5rem;
  font-family: 'Georgia', serif;
  font-weight: 600;
  border: 4px solid var(--accent);
}
.team-member h4 { font-size: 1.1rem; margin-bottom: 5px; }
.team-member .role {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.team-member .bio {
  font-size: 0.85rem;
  color: var(--text-gray);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}
.contact-info h3 { margin-bottom: 20px; }
.contact-item {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  align-items: flex-start;
}
.contact-icon {
  width: 45px;
  height: 45px;
  min-width: 45px;
  background: var(--primary);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.contact-item h4 { font-size: 1rem; margin-bottom: 3px; }
.contact-item p { color: var(--text-gray); font-size: 0.95rem; margin: 0; }

.contact-form {
  background: var(--bg-light);
  padding: 35px;
  border-radius: 8px;
}
.contact-form h3 { margin-bottom: 20px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dark);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,162,39,0.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-about img {
  height: 50px;
  margin-bottom: 15px;
  filter: brightness(0) invert(1);
}
.footer-about p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 15px;
}
.footer-col h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background: var(--accent);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-col a:hover { color: var(--accent); padding-left: 5px; }
.footer-col .contact-line {
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
}
.footer-bottom a { color: var(--accent-light); }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  .hero h1 { font-size: 2.3rem; }
  .hero { height: 420px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .content-wrapper { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav.open { max-height: 500px; }
  .main-nav ul {
    flex-direction: column;
    padding: 15px 20px;
    gap: 0;
  }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .contact-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .event-item { grid-template-columns: 1fr; }
  .event-date {
    border-right: none;
    border-bottom: 2px solid var(--border);
    padding-right: 0;
    padding-bottom: 15px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    justify-content: center;
  }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .section { padding: 50px 0; }
  .hero { height: 380px; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .about-stats { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .top-bar .container { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
  .site-logo .logo-text { display: none; }
}
