/* ========================================
   RGPV Notes Portal — Professional CSS v2
   Fonts: Plus Jakarta Sans + Inter
   ======================================== */

/* ── CSS Variables ─────────────────────── */
:root {
  /* Brand */
  --primary:       #4f46e5;
  --primary-dark:  #3730a3;
  --primary-light: #818cf8;
  --accent:        #06b6d4;
  --accent-warm:   #f59e0b;
  --success:       #10b981;
  --danger:        #ef4444;

  /* Surfaces */
  --bg:        #f5f6ff;
  --surface:   #ffffff;
  --surface-2: #eef0ff;
  --border:    #e0e3ff;

  /* Text */
  --text:       #0f0e2a;
  --text-2:     #3d3c6e;
  --text-muted: #7c7da0;

  /* Gradients */
  --grad-hero: linear-gradient(135deg, #312e81 0%, #4338ca 55%, #1d4ed8 100%);

  /* Shape & depth */
  --radius:    14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 10px rgba(79,70,229,0.08);
  --shadow:    0 8px 32px rgba(79,70,229,0.12);
  --shadow-lg: 0 20px 64px rgba(79,70,229,0.18);

  /* Motion */
  --ease:  cubic-bezier(0.4, 0, 0.2, 1);
  --speed: 0.28s;
  --hamburger-offset: 7px;
}

/* ── Dark Mode ─────────────────────────── */
[data-theme="dark"] {
  --bg:        #0c0b1d;
  --surface:   #16152e;
  --surface-2: #1e1d40;
  --border:    #2a2851;
  --text:       #e8e7ff;
  --text-2:     #a8a6d8;
  --text-muted: #6b6990;
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.35);
  --shadow:    0 8px 32px rgba(0,0,0,0.45);
  --shadow-lg: 0 20px 64px rgba(0,0,0,0.55);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

a { text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Scrollbar ─────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }

/* ── Keyframes ─────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-15px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}
@keyframes load {
  from { width: 0%; }
  to   { width: 100%; }
}
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

/* ── Loading Screen ────────────────────── */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--grad-hero);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  z-index: 9999;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
}
.loader-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: white;
  letter-spacing: -1px;
}
.loader-logo span { color: #67e8f9; }
.loader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  overflow: hidden;
}
.loader-progress {
  height: 100%;
  background: linear-gradient(90deg, #67e8f9, white);
  border-radius: 2px;
  animation: load 1.1s var(--ease) forwards;
}

/* ── Announcement Bar ──────────────────── */
.announcement-bar {
  background: linear-gradient(90deg, #1e1b4b, #312e81, #1e1b4b);
  background-size: 200% 100%;
  color: white;
  text-align: center;
  padding: 10px 20px;
  font-size: 0.82rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}
.announcement-bar::after {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
  animation: shimmer 4s linear infinite;
}
.announcement-bar a {
  color: #67e8f9;
  font-weight: 700;
  margin-left: 6px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Header ────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--speed) var(--ease), background var(--speed) var(--ease);
}
[data-theme="dark"] .header {
  background: rgba(22,21,46,0.90);
}
.header.scrolled {
  box-shadow: var(--shadow);
}
.nav {
  max-width: 1200px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  transition: opacity var(--speed);
}
.nav-logo:hover { opacity: 0.82; }
.nav-logo span { color: var(--text); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 7px 14px;
  border-radius: 10px;
  transition: all var(--speed) var(--ease);
}
.nav-links a:hover { color: var(--primary); background: var(--surface-2); }
.nav-links a.active { color: var(--primary); background: var(--surface-2); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all var(--speed) var(--ease);
}
.btn-icon:hover { background: var(--surface-2); color: var(--primary); transform: scale(1.06); }
.btn-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--speed) var(--ease);
}
.btn-back:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateX(-2px);
}

/* ── Hamburger (mobile) ────────────────── */
.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(var(--hamburger-offset)) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(calc(-1 * var(--hamburger-offset))) rotate(-45deg); }

/* ── Breadcrumb ─────────────────────────── */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); font-weight: 500; transition: color var(--speed); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { opacity: 0.45; }

/* ── Hero Section ──────────────────────── */
.hero {
  background: var(--grad-hero);
  color: white;
  padding: 96px 20px 84px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(103,232,249,0.12) 0%, transparent 70%);
  top: -160px;
  right: -80px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  bottom: -60px;
  left: 8%;
  pointer-events: none;
}
.hero-content {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.8s var(--ease) both;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  padding: 7px 18px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeDown 0.6s var(--ease) 0.1s both;
  letter-spacing: 0.3px;
}
.hero h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  margin-bottom: 18px;
  animation: fadeUp 0.8s var(--ease) 0.15s both;
}
.hero h1 span {
  background: linear-gradient(135deg, #67e8f9, #a5f3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.05rem;
  opacity: 0.88;
  max-width: 580px;
  margin: 0 auto 32px;
  animation: fadeUp 0.8s var(--ease) 0.2s both;
  line-height: 1.75;
}
.hero-cta { animation: fadeUp 0.8s var(--ease) 0.25s both; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 52px;
  margin-top: 52px;
  animation: fadeUp 0.8s var(--ease) 0.35s both;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.stat-item .num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #67e8f9;
  display: block;
  line-height: 1;
}
.stat-item .lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.72;
}

/* ── Buttons ───────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all var(--speed) var(--ease);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.2px;
}
.btn-primary {
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 18px rgba(255,255,255,0.3);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(255,255,255,0.25);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* Ripple */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: ripple-anim 0.55s linear;
  pointer-events: none;
}

/* ── Section ───────────────────────────── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 20px;
}
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-label {
  display: inline-block;
  background: var(--surface-2);
  color: var(--primary);
  padding: 5px 16px;
  border-radius: 50px;
  font-size: 0.77rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--text);
  margin-bottom: 10px;
}
.section-header p { color: var(--text-muted); font-size: 0.95rem; }

/* ── Primary Cards (index) ─────────────── */
.primary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.primary-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 40px 32px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.primary-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s;
}
.primary-card.btech::before {
  background: linear-gradient(135deg, rgba(79,70,229,0.03), rgba(37,99,235,0.07));
}
.primary-card.diploma::before {
  background: linear-gradient(135deg, rgba(245,158,11,0.03), rgba(249,115,22,0.07));
}
.primary-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.primary-card:hover::before { opacity: 1; }
.card-inner { position: relative; z-index: 1; }
.card-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: white;
  margin-bottom: 24px;
  box-shadow: 0 8px 22px rgba(79,70,229,0.38);
  transition: transform 0.4s var(--ease);
}
.primary-card.diploma .card-icon-wrap {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 8px 22px rgba(245,158,11,0.38);
}
.primary-card:hover .card-icon-wrap { transform: scale(1.1) rotate(-5deg); }
.primary-card h3 { font-size: 1.4rem; margin-bottom: 10px; color: var(--text); }
.primary-card p  { color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; }
.card-arrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.88rem;
  margin-top: 24px;
  transition: gap 0.3s var(--ease);
}
.primary-card:hover .card-arrow { gap: 14px; }

/* ── Page Banner ───────────────────────── */
.page-banner {
  background: var(--grad-hero);
  color: white;
  padding: 52px 20px;
  text-align: center;
}
.page-banner-inner {
  max-width: 700px;
  margin: 0 auto;
  animation: fadeUp 0.7s var(--ease) both;
}
.page-banner h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 12px;
}
.page-banner p { opacity: 0.85; font-size: 0.95rem; margin-bottom: 20px; }
.page-banner-meta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Badges ────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.badge-blue   { background: rgba(79,70,229,0.15);  color: var(--primary-light); border: 1px solid rgba(79,70,229,0.28); }
.badge-orange { background: rgba(245,158,11,0.15); color: #fbbf24;              border: 1px solid rgba(245,158,11,0.28); }
.badge-green  { background: rgba(16,185,129,0.15); color: #34d399;              border: 1px solid rgba(16,185,129,0.28); }

/* ── Category Cards ────────────────────── */
.category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s var(--ease);
  cursor: pointer;
  display: block;
}
.category-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.cat-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 20px;
  transition: transform 0.35s var(--ease);
}
.category-card:hover .cat-icon { transform: scale(1.12) rotate(-8deg); }
.cat-notes .cat-icon { background: linear-gradient(135deg, #4f46e5, #818cf8); color: white; box-shadow: 0 8px 22px rgba(79,70,229,0.32); }
.cat-pyq   .cat-icon { background: linear-gradient(135deg, #06b6d4, #0891b2); color: white; box-shadow: 0 8px 22px rgba(6,182,212,0.32); }
.cat-syl   .cat-icon { background: linear-gradient(135deg, #10b981, #059669); color: white; box-shadow: 0 8px 22px rgba(16,185,129,0.32); }
.category-card h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text); }
.category-card p  { font-size: 0.85rem; color: var(--text-muted); }

/* ── Semester Grid ─────────────────────── */
.semester-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.sem-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.25s var(--ease);
  user-select: none;
}
.sem-card:hover { border-color: var(--primary); color: var(--primary); background: var(--surface-2); transform: translateY(-2px); }
.sem-card.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 16px rgba(79,70,229,0.42);
}
.sem-card i { font-size: 1.1rem; }

/* ── Search ────────────────────────────── */
.search-wrap { margin-bottom: 20px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 10px 20px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79,70,229,0.1);
}
.search-box i { color: var(--text-muted); font-size: 0.9rem; }
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
}
.search-box input::placeholder { color: var(--text-muted); }
.btn-search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  padding: 3px 10px;
  border-radius: 20px;
  transition: all 0.2s;
  opacity: 0;
  pointer-events: none;
}
.btn-search-clear.visible { opacity: 1; pointer-events: auto; }
.btn-search-clear:hover { background: var(--surface-2); color: var(--primary); }

/* ── Results Info ──────────────────────── */
.results-info { margin-bottom: 16px; font-size: 0.85rem; color: var(--text-muted); }
.results-count { font-weight: 600; }

/* ── PDF Grid ──────────────────────────── */
.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.pdf-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s var(--ease);
  animation: fadeUp 0.5s var(--ease) both;
}
.pdf-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}
.pdf-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.pdf-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(239,68,68,0.32);
}
.pdf-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pdf-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pdf-actions { display: flex; gap: 8px; }
.pdf-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 10px 14px;
  font-size: 0.82rem;
  border-radius: 10px;
}
.pdf-actions .btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(79,70,229,0.38);
}
.pdf-actions .btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(79,70,229,0.48);
  transform: translateY(-2px);
}
.pdf-actions .btn-outline {
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
}
.pdf-actions .btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface-2);
  transform: translateY(-2px);
}

/* ── Empty State ───────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 16px; opacity: 0.38; display: block; }
.empty-state p { font-size: 0.95rem; }
.empty-state .hint { font-size: 0.82rem; margin-top: 8px; opacity: 0.7; }

/* ── Newsletter / Request ──────────────── */
.newsletter-section { padding-top: 0; }
.newsletter-card {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 52px 32px;
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}
.newsletter-card h3 { font-size: 1.65rem; margin-bottom: 12px; color: var(--text); }
.newsletter-card p  { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }

/* ── Footer ────────────────────────────── */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 60px;
}
.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 20px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.footer-brand .nav-logo { font-size: 1.2rem; margin-bottom: 14px; display: flex; }
.footer-brand p { color: var(--text-muted); font-size: 0.87rem; line-height: 1.7; max-width: 280px; }
.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--speed) var(--ease);
}
.footer-socials a:hover { background: var(--primary); border-color: var(--primary); color: white; transform: translateY(-2px); }
.footer-col h5 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { color: var(--text-muted); font-size: 0.88rem; transition: color var(--speed); display: flex; align-items: center; gap: 6px; }
.footer-col ul a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px;
  text-align: center;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.83rem; }

/* ── Scroll to Top ─────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 22px rgba(79,70,229,0.45);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all var(--speed) var(--ease);
  z-index: 500;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { background: var(--primary-dark); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(79,70,229,0.52); }

/* ── Toast ─────────────────────────────── */
.toast-container { position: fixed; bottom: 82px; right: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 9000; }
.toast {
  background: #1e1b4b;
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s var(--ease) both, toastOut 0.3s var(--ease) 2.8s both;
}

/* ── Page Transition ───────────────────── */
.page-transition { animation: fadeUp 0.5s var(--ease) both; }

/* ── Utility ───────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.mt-3 { margin-top: 1.5rem; }

/* ── Responsive ─────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    gap: 4px;
    box-shadow: var(--shadow);
    z-index: 999;
  }
  .nav-toggle { display: flex; }
  .hero { padding: 60px 16px 52px; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { gap: 24px; }
  .stat-item .num { font-size: 1.5rem; }
  .primary-cards { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand p { max-width: 100%; }
  .pdf-grid { grid-template-columns: 1fr; }
  .semester-grid { grid-template-columns: repeat(3, 1fr); }
  .page-banner { padding: 36px 20px; }
  .header { position: sticky; }
}

@media (max-width: 480px) {
  .hero { padding: 50px 16px 44px; }
  .hero-stats { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .section { padding: 40px 16px; }
  .newsletter-card { padding: 36px 20px; }
  .category-cards { grid-template-columns: 1fr; }
  .semester-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats .stat-item { min-width: 80px; }
}

/* ── Performance hints ─────────────────── */
.announcement-bar::after { will-change: transform; }

/* ── Reduced motion ────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
