/* ===================
   NWIM Website - Modern Design
   Clean, Professional, Easy to Maintain
   =================== */

/* CSS Variables for easy theming */
:root {
  /* Colors */
  --primary: #1e3a5f;        /* Deep navy blue */
  --primary-light: #2d5a8a;
  --accent: #e85a33;         /* Warm orange-red */
  --accent-hover: #d14a25;
  --text: #374151;
  --text-light: #6b7280;
  --text-dark: #111827;
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --border: #e5e7eb;
  --border-light: #f3f4f6;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Spacing */
  --container: 1100px;
  --radius: 8px;
  --radius-lg: 12px;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; color: var(--primary); }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; color: var(--accent); }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===================
   NAVIGATION
   =================== */

.nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo img {
  height: 50px;
  width: auto;
}

.nav-logo span {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--primary);
  margin-left: 0.75rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.5rem;
}

.nav-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text);
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.nav-menu a:hover {
  background: var(--border-light);
  color: var(--primary);
  text-decoration: none;
}

.nav-menu .current a {
  background: var(--primary);
  color: white;
}

.nav-menu .current a:hover {
  background: var(--primary-light);
  color: white;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: 0.3s;
}

/* ===================
   HERO SECTION
   =================== */

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.hero-badge img {
  height: 30px;
  width: auto;
  display: inline-block;
}

/* ===================
   MAIN CONTENT LAYOUT
   =================== */

.main {
  padding: 3rem 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* ===================
   CARDS
   =================== */

.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: 1.5rem;
}

.card-header {
  padding: 1.25rem 1.5rem;
  background: var(--border-light);
  border-bottom: 1px solid var(--border);
}

.card-header h3 {
  margin: 0;
  font-size: 1.125rem;
}

/* Sidebar cards */
.sidebar-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.sidebar-card:last-child {
  margin-bottom: 0;
}

.sidebar-card h3 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.sidebar-card h4 {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.sidebar-card p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0;
}

.sidebar-card img {
  margin: 0.75rem auto 0;
  max-width: 120px;
}

/* ===================
   CONTENT SECTIONS
   =================== */

.content-section {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.content-section h1 {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-light);
}

/* Lists */
.content-section ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.content-section ul li {
  padding: 0.5rem 0 0.5rem 1.75rem;
  position: relative;
}

.content-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.9rem;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

/* ===================
   FEATURE CARDS (Homepage)
   =================== */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-card {
  background: var(--border-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  border-left: 4px solid var(--accent);
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-light);
  margin: 0;
}

/* ===================
   EVENTS
   =================== */

.event-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}

.event-card:hover {
  box-shadow: var(--shadow);
}

.event-card:last-child {
  margin-bottom: 0;
}

.event-title {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.event-meta {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.event-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.event-map {
  border-radius: var(--radius);
  overflow: hidden;
}

.event-map iframe {
  width: 100%;
  height: 180px;
  border: none;
}

/* ===================
   TABLES
   =================== */

.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

thead {
  background: var(--primary);
  color: white;
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--border-light);
}

/* ===================
   CALENDAR EMBED
   =================== */

.calendar-container {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.calendar-embed {
  width: 100%;
}

.calendar-embed iframe {
  width: 100%;
  min-height: 550px;
  border: none;
}

/* ===================
   BUTTONS
   =================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  text-decoration: none;
}

/* Button group for stacking */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-group .btn {
  text-align: center;
  justify-content: center;
}

/* ===================
   FOOTER
   =================== */

.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 2rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.footer h3 {
  color: white;
  margin-bottom: 1rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.9);
}

.footer a:hover {
  color: white;
}

.footer p {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: white;
  font-weight: 500;
}

.footer-legal {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
  opacity: 0.7;
}

/* ===================
   UTILITY CLASSES
   =================== */

.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-light); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ===================
   RESPONSIVE
   =================== */

@media (min-width: 768px) {
  h1 { font-size: 2.75rem; }

  .hero { padding: 5rem 0; }
  .hero h1 { font-size: 3rem; }

  .content-grid {
    grid-template-columns: 1fr 300px;
  }

  .event-content {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .calendar-embed iframe {
    min-height: 650px;
  }
}

@media (min-width: 992px) {
  .calendar-embed iframe {
    min-height: 700px;
  }
}

/* Mobile Navigation */
@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu a {
    padding: 0.75rem 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .content-section {
    padding: 1.5rem;
  }

  .table-wrapper {
    font-size: 0.875rem;
  }

  th, td {
    padding: 0.75rem 0.5rem;
  }

  /* Mobile buttons - full width and stacked */
  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn {
    width: 100%;
  }
}

/* Print */
@media print {
  .nav, .footer, .sidebar-card {
    display: none;
  }

  .content-section {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
