/* ==========================================================================
   IMPACT STUDENT COUNCIL - MINIMALIST ELEGANT SKY-BLUE DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Outfit:wght@300;400;600;800&family=Prompt:wght@300;400;500;600&display=swap');

:root {
  /* Color Palette - Inspired by New Logo */
  --bg-dark: #060d24;
  --bg-deep-blue: #0b1739;
  --bg-card: rgba(11, 23, 56, 0.45);
  --bg-card-hover: rgba(16, 33, 77, 0.7);
  --bg-glass: rgba(8, 18, 46, 0.7);
  
  --sky-blue: #0ea5e9;
  --cyan-glow: #00d2ff;
  --cyan-soft: #38bdf8;
  --gold-accent: #facc15;
  --gold-star: #fef08a;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border-light: rgba(56, 189, 248, 0.15);
  --border-glow: rgba(56, 189, 248, 0.4);
  
  /* Status Colors */
  --status-pending: #f59e0b;
  --status-progress: #38bdf8;
  --status-resolved: #10b981;
  
  /* Shadows & Glows */
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-blue: 0 10px 30px -10px rgba(14, 165, 233, 0.25);
  --glow-cyan: 0 0 25px rgba(0, 210, 255, 0.35);
  --glow-gold: 0 0 15px rgba(250, 204, 21, 0.4);
  
  /* Radii & Spacing */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: 'Prompt', 'Kanit', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
  line-height: 1.7;
  background: radial-gradient(circle at 50% 10%, #0d2258 0%, #050b1e 65%, #020510 100%);
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: radial-gradient(rgba(56, 189, 248, 0.08) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.app-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Kanit', sans-serif;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.2px;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, var(--cyan-soft) 60%, var(--cyan-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-text {
  color: var(--gold-accent);
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 13, 36, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 2rem;
  transition: var(--transition-normal);
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.logo-img-wrapper {
  height: 48px;
  width: auto;
  display: flex;
  align-items: center;
}

.logo-img-wrapper img {
  height: 100%;
  width: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.brand-title {
  font-family: 'Outfit', 'Kanit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-fast);
  padding: 0.3rem 0.6rem;
  position: relative;
}

.nav-links a:hover, .nav-links a.active {
  color: #fff;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--cyan-glow);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--cyan-glow);
}

/* Minimal Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.65rem 1.4rem;
  font-family: 'Prompt', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition-normal);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #00d2ff 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 210, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 210, 255, 0.5);
  background: linear-gradient(135deg, #0369a1 0%, #38bdf8 100%);
}

.btn-outline {
  background: rgba(14, 165, 233, 0.08);
  color: var(--cyan-soft);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  background: rgba(14, 165, 233, 0.18);
  color: #fff;
  border-color: var(--cyan-glow);
}

.btn-admin {
  background: rgba(250, 204, 21, 0.1);
  color: var(--gold-accent);
  border: 1px solid rgba(250, 204, 21, 0.3);
  font-weight: 600;
}

.btn-admin:hover {
  background: rgba(250, 204, 21, 0.22);
  box-shadow: var(--glow-gold);
}

/* Hero Section */
.hero-section {
  padding: 5rem 1.5rem 4rem;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.hero-logo-banner {
  max-width: 320px;
  width: 80%;
  margin: 0 auto 2rem;
  display: block;
  border-radius: var(--radius-md);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 210, 255, 0.25);
  border: 1px solid var(--border-glow);
  transition: transform 0.5s ease;
}

.hero-logo-banner:hover {
  transform: scale(1.02);
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* Section Header */
.section {
  padding: 4.5rem 1.5rem;
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  color: var(--cyan-soft);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.4rem;
  display: block;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 0.6rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 620px;
  margin: 0 auto;
  font-weight: 300;
}

/* Policies Cards */
.policies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.policy-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
}

.policy-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-blue);
}

.policy-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--cyan-glow);
  margin-bottom: 1.25rem;
}

.policy-title {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.policy-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* Combined Clean Feedback & Post-it Section */
.portal-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.portal-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1rem;
}

.portal-tab-btn {
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.portal-tab-btn.active {
  background: rgba(14, 165, 233, 0.15);
  color: #fff;
  border-color: var(--cyan-glow);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

/* Post-it Board Grid - Exactly 3 columns in a clean single row */
.postit-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 860px) {
  .postit-board {
    grid-template-columns: 1fr;
  }
}

.postit-card {
  padding: 1.4rem;
  border-radius: var(--radius-md);
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.postit-card:hover {
  transform: translateY(-4px);
}

.postit-yellow { background: #fef08a; }
.postit-cyan { background: #bae6fd; }
.postit-pink { background: #fbcfe8; }
.postit-green { background: #bbf7d0; }
.postit-purple { background: #e9d5ff; }

/* Form Controls */
.form-group {
  margin-bottom: 1.4rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(4, 9, 26, 0.6);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--cyan-glow);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.25);
}

textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

.file-upload-box {
  border: 1.5px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  background: rgba(14, 165, 233, 0.03);
  transition: var(--transition-fast);
}

.file-upload-box:hover {
  border-color: var(--cyan-glow);
  background: rgba(14, 165, 233, 0.08);
}

/* Team Members Cards */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.5rem;
}

.member-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.member-card:hover {
  transform: translateY(-6px);
  border-color: var(--cyan-soft);
  box-shadow: var(--shadow-blue);
}

.member-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 115%;
  background: #091433;
}

.member-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s ease;
}

.member-card:hover .member-img {
  transform: scale(1.05);
}

.avatar-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #091840, #04091a);
  color: var(--cyan-soft);
}

.member-info {
  padding: 1.2rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.member-role-badge {
  display: inline-block;
  align-self: center;
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.role-president { background: rgba(250, 204, 21, 0.15); color: var(--gold-accent); border: 1px solid rgba(250, 204, 21, 0.4); }
.role-executive { background: rgba(14, 165, 233, 0.15); color: var(--cyan-soft); border: 1px solid rgba(14, 165, 233, 0.3); }
.role-committee { background: rgba(148, 163, 184, 0.12); color: var(--text-muted); border: 1px solid rgba(148, 163, 184, 0.2); }

.member-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(2, 6, 20, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #091433;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  max-width: 850px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
  padding: 2rem;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.reports-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.88rem;
}

.reports-table th, .reports-table td {
  padding: 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.reports-table th {
  background: rgba(4, 9, 26, 0.5);
  color: var(--cyan-soft);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-light);
  background: rgba(3, 7, 18, 0.95);
  padding: 2.5rem 1.5rem 2rem;
  margin-top: auto;
  text-align: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-full);
  background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.toast {
  background: #091433;
  border: 1px solid var(--cyan-glow);
  color: #fff;
  padding: 0.9rem 1.3rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

/* ==========================================================================
   HAMBURGER MENU BUTTON (Mobile Only)
   ========================================================================== */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
  transition: var(--transition-fast);
  z-index: 200;
}

.hamburger:hover {
  background: rgba(14, 165, 233, 0.18);
  border-color: var(--cyan-glow);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cyan-soft);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

/* Hamburger → X animation */
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* .nav-actions for desktop */
.nav-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* --- Tablet (max 1024px) --- */
@media (max-width: 1024px) {
  .nav-links {
    gap: 1.2rem;
  }
  .hero-title {
    font-size: 2.4rem;
  }
  .members-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* --- Mobile (max 768px) --- */
@media (max-width: 768px) {
  /* Show hamburger button */
  .hamburger {
    display: flex;
    order: 3;
  }

  /* Nav content: logo left, hamburger right */
  .nav-content {
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    position: relative;
  }

  .brand-logo {
    order: 1;
    flex: 1;
  }

  /* Hide desktop nav by default on mobile */
  #mainNav {
    order: 4;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.3s ease,
                padding 0.3s ease;
    opacity: 0;
    background: rgba(6, 13, 36, 0.98);
    border-top: 1px solid var(--border-light);
  }

  #mainNav.open {
    max-height: 400px;
    opacity: 1;
    padding: 1rem 0;
  }

  .nav-links {
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
    padding: 0 1.2rem;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.9rem 0.5rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    width: 100%;
  }

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

  /* Hide IG link and admin button in top bar on mobile - move to nav */
  .nav-actions {
    order: 2;
    gap: 0.5rem;
  }

  .nav-actions .social-link {
    display: none;
  }

  .navbar {
    padding: 0.7rem 1.2rem;
  }

  /* Hero */
  .hero-section {
    padding: 3.5rem 1.2rem 2.5rem;
  }

  .hero-title {
    font-size: 1.9rem;
    line-height: 1.25;
  }

  .hero-description {
    font-size: 0.98rem;
  }

  .hero-logo-banner {
    max-width: 220px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
  }

  /* Sections */
  .section {
    padding: 3rem 1rem;
  }

  .section-title {
    font-size: 1.7rem;
  }

  /* Policies */
  .policies-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  /* Portal card */
  .portal-card {
    padding: 1.5rem 1rem;
  }

  .portal-tabs {
    flex-direction: column;
    gap: 0.6rem;
  }

  .portal-tab-btn {
    font-size: 0.88rem;
    padding: 0.6rem 1rem;
  }

  /* Post-it board: single column on mobile */
  .postit-board {
    grid-template-columns: 1fr;
  }

  /* Members grid */
  .members-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .member-name {
    font-size: 0.9rem;
  }

  /* Modal */
  .modal-content {
    padding: 1.5rem 1.2rem;
    max-height: 92vh;
  }

  /* Footer */
  .footer {
    padding: 2rem 1rem 1.5rem;
  }

  .footer > div:first-child > div {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  /* Toast */
  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    right: 1rem;
  }

  .toast {
    font-size: 0.88rem;
  }
}

/* --- Small phones (max 480px) --- */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.6rem;
  }

  .brand-title {
    font-size: 1.2rem;
  }

  .members-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .policy-card {
    padding: 1.6rem 1.4rem;
  }

  .reports-table {
    font-size: 0.78rem;
    display: block;
    overflow-x: auto;
  }

  .reports-table th, .reports-table td {
    padding: 0.6rem 0.5rem;
    white-space: nowrap;
  }
}
