/* ============================================================
   CYBERGUARD - Shared Stylesheet
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: #1f2937;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #888; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ── Typography Utilities ── */
.gradient-text {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout Utilities ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
.section { padding: 3rem 1rem; }
.section-bg { background: #f9fafb; }
.text-center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.grid { display: grid; }

/* ── Animations ── */
@keyframes ticker {
  0%   { transform: translateX(-100%); }  /* start from left */
  100% { transform: translateX(100%); }   /* move to right */
}

/* Slow + readable */
.ticker-animation {
  animation: ticker 120s linear infinite;
  letter-spacing: 1px;
}

/* Pause on hover */
.ticker-animation:hover {
  animation-play-state: paused;
}
@keyframes scrollUp {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
.notification-scroll { animation: scrollUp 20s linear infinite; }
.notification-scroll:hover { animation-play-state: paused; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}
.animate-pulse { animation: pulse 2s infinite; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.5s ease forwards; }

/* ── Card Hover ── */
.hover-card { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hover-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: 0.5rem;
  font-weight: 600; font-size: 0.9rem; transition: all 0.2s;
}
.btn-red    { background: #dc2626; color: #fff; }
.btn-red:hover { background: #b91c1c; }
.btn-blue   { background: #2563eb; color: #fff; }
.btn-blue:hover { background: #1d4ed8; }
.btn-green  { background: #16a34a; color: #fff; }
.btn-green:hover { background: #15803d; }
.btn-white  { background: #fff; color: #1e40af; }
.btn-white:hover { background: #eff6ff; }
.btn-outline { background: transparent; border: 2px solid currentColor; }

/* ── TOP NAVBAR ── */
.top-navbar {
  width: 100%; background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.5rem 1rem;
}
.top-navbar .inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.top-navbar .logos { display: flex; align-items: center; gap: 1rem; }
.top-navbar .logos img { height: 48px; width: auto; object-fit: contain; }
.top-navbar .meity-info { display: flex; align-items: center; gap: 0.5rem; padding-left: 1rem; border-left: 1px solid #d1d5db; }
.top-navbar .meity-info img { height: 40px; width: auto; object-fit: contain; }
.top-navbar .meity-info span { font-size: 0.75rem; color: #4b5563; line-height: 1.3; }
.top-navbar .right { display: flex; align-items: center; gap: 1rem; }
.top-navbar .college-logo {
  width: 36px; height: 36px; background: transparent; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.65rem; text-align: center;
  object-fit: contain; border: 1px solid #e5e7eb;
}
.top-navbar .college-name { font-size: 0.82rem; font-weight: 600; color: #374151; }
.top-navbar .theme-btn {
  padding: 0.5rem; border-radius: 50%;
  background: #f3f4f6; transition: background 0.2s;
}
.top-navbar .theme-btn:hover { background: #e5e7eb; }
.top-navbar .theme-btn svg { width: 20px; height: 20px; }

/* ── MAIN NAVBAR ── */
.main-navbar {
  width: 100%; background: #1e3a8a; color: #fff;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.main-navbar .inner {
  max-width: 1280px; margin: 0 auto; padding: 0 1rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.main-navbar .brand { display: flex; align-items: center; gap: 0.5rem; font-size: 1.2rem; font-weight: 700; letter-spacing: 0.05em; font-family: 'Rajdhani', sans-serif; }
.main-navbar .brand svg { width: 32px; height: 32px; color: #93c5fd; }
.main-navbar .nav-links { display: flex; align-items: center; gap: 2rem; }
.main-navbar .nav-links a {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.05em;
  color: #fff; transition: color 0.2s; position: relative; padding-bottom: 2px;
}
.main-navbar .nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px; background: #93c5fd; transition: width 0.3s;
}
.main-navbar .nav-links a:hover { color: #93c5fd; }
.main-navbar .nav-links a:hover::after,
.main-navbar .nav-links a.active::after { width: 100%; }
.main-navbar .nav-links a.active { color: #93c5fd; }
.main-navbar .hamburger { display: none; padding: 0.5rem; color: #fff; }
.main-navbar .hamburger svg { width: 24px; height: 24px; }
.main-navbar .mobile-menu {
  display: none; flex-direction: column;
  background: #1e3a8a; border-top: 1px solid #2d4fa3;
}
.main-navbar .mobile-menu a {
  display: block; padding: 0.875rem 1rem;
  font-size: 0.875rem; font-weight: 600;
  color: #fff; letter-spacing: 0.05em;
  transition: background 0.2s;
}
.main-navbar .mobile-menu a:hover,
.main-navbar .mobile-menu a.active { background: #1e40af; color: #93c5fd; }
.main-navbar .mobile-menu.open { display: flex; }

@media (max-width: 768px) {
  .main-navbar .nav-links { display: none; }
  .main-navbar .hamburger { display: block; }
  .top-navbar .meity-info { display: none; }
  .top-navbar .college-name { display: none; }
}

/* ── NEWS TICKER ── */
.news-ticker {
  width: 100%; background: #dc2626; color: #fff;
  padding: 0.75rem 0; overflow: hidden;
  display: flex; align-items: center;
}
.news-ticker .label {
  flex-shrink: 0; background: #b91c1c;
  padding: 0.5rem 1rem; font-weight: 700;
  display: flex; align-items: center; gap: 0.5rem;
  z-index: 2; white-space: nowrap;
}
.news-ticker .label svg { width: 18px; height: 18px; }
.news-ticker .track { overflow: hidden; flex: 1; }
.news-ticker .ticker-animation { white-space: nowrap; display: inline-block; }
.news-ticker .ticker-animation span { display: inline-block; margin: 0 2rem; }
.news-ticker .ticker-animation .dot { color: #fde047; }

/* ── FOOTER ── */
.footer { width: 100%; background: #f3f4f6; border-top: 1px solid #d1d5db; }
.footer .inner { max-width: 1280px; margin: 0 auto; padding: 3rem 1rem; }
.footer .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer h3 { font-size: 1rem; font-weight: 700; color: #1e3a8a; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.footer h3 svg { width: 20px; height: 20px; }
.footer ul li + li { margin-top: 0.5rem; }
.footer ul li a { font-size: 0.875rem; color: #4b5563; transition: color 0.2s; display: inline-flex; align-items: center; gap: 0.25rem; }
.footer ul li a:hover { color: #2563eb; }
.footer ul li a svg { width: 12px; height: 12px; }
.footer .contact-item { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; }
.footer .contact-item svg { width: 20px; height: 20px; color: #2563eb; flex-shrink: 0; margin-top: 2px; }
.footer .contact-item p { font-size: 0.875rem; color: #4b5563; line-height: 1.5; }
.footer .helpline-box {
  margin-top: 1.5rem; background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 0.75rem; padding: 1rem; text-align: center;
}
.footer .helpline-box .title { color: #991b1b; font-weight: 700; }
.footer .helpline-box .number { color: #dc2626; font-size: 2rem; font-weight: 800; margin: 0.25rem 0; }
.footer .helpline-box .sub { font-size: 0.75rem; color: #dc2626; }
.footer .bottom {
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #d1d5db;
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem;
}
@media (min-width: 768px) {
  .footer .bottom { flex-direction: row; justify-content: space-between; }
}
.footer .bottom p { font-size: 0.875rem; color: #6b7280; }
.footer .bottom-links { display: flex; gap: 1rem; }
.footer .bottom-links a { font-size: 0.875rem; color: #6b7280; transition: color 0.2s; }
.footer .bottom-links a:hover { color: #2563eb; }
@media (max-width: 768px) {
  .footer .grid { grid-template-columns: 1fr; }
}

/* ── CAROUSEL ── */
.carousel { position: relative; width: 100%; height: 300px; overflow: hidden; background: #e5e7eb; }
@media (min-width: 768px)  { .carousel { height: 400px; } }
@media (min-width: 1024px) { .carousel { height: 500px; } }
.carousel .slide { position: absolute; inset: 0; transition: opacity 0.5s ease; opacity: 0; }
.carousel .slide.active { opacity: 1; }
.carousel .slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel .arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.5); color: #fff; border-radius: 50%;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; z-index: 5;
}
.carousel .arrow:hover { background: rgba(0,0,0,0.75); }
.carousel .arrow svg { width: 24px; height: 24px; }
.carousel .arrow-left  { left: 1rem; }
.carousel .arrow-right { right: 1rem; }
.carousel .dots { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.5rem; }
.carousel .dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5); border: none; cursor: pointer; transition: background 0.2s; }
.carousel .dot.active { background: #fff; }

/* ── HERO SECTIONS ── */
.hero { padding: 4rem 1rem; text-align: center; }
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
.hero p  { font-size: 1.1rem; max-width: 40rem; margin: 0 auto; opacity: 0.9; }
@media (min-width: 768px) { .hero h1 { font-size: 3.5rem; } }

/* ── SECTION HEADINGS ── */
.section-heading { margin-bottom: 2.5rem; }
.section-heading h2 { font-size: 1.875rem; font-weight: 800; color: #1f2937; margin-bottom: 0.5rem; }
.section-heading p  { color: #6b7280; }

/* ── CARDS ── */
.card {
  background: #fff; border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb; padding: 1.5rem;
}
.card-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.card-icon svg { width: 28px; height: 28px; }

/* Color helpers */
.bg-red-100    { background: #fee2e2; }
.bg-blue-100   { background: #dbeafe; }
.bg-green-100  { background: #dcfce7; }
.bg-orange-100 { background: #ffedd5; }
.bg-yellow-100 { background: #fef9c3; }
.bg-purple-100 { background: #f3e8ff; }
.bg-pink-100   { background: #fce7f3; }
.text-red-600    { color: #dc2626; }
.text-blue-600   { color: #2563eb; }
.text-green-600  { color: #16a34a; }
.text-orange-600 { color: #ea580c; }
.text-yellow-600 { color: #ca8a04; }
.text-purple-600 { color: #9333ea; }
.text-pink-600   { color: #db2777; }

/* ── BADGE / TAG ── */
.badge {
  display: inline-block; padding: 0.2rem 0.6rem;
  border-radius: 9999px; font-size: 0.75rem; font-weight: 600;
}
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-green  { background: #dcfce7; color: #166534; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }

/* ── ACCORDION ── */
.accordion-item { border: 2px solid #e5e7eb; border-radius: 1rem; overflow: hidden; margin-bottom: 1rem; }
.accordion-header {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; background: linear-gradient(to right, #f9fafb, #fff);
  cursor: pointer; text-align: left; transition: background 0.2s;
}
.accordion-header:hover { background: linear-gradient(to right, #f3f4f6, #f9fafb); }
.accordion-header svg { width: 24px; height: 24px; color: #6b7280; flex-shrink: 0; transition: transform 0.3s; }
.accordion-header.open svg.chevron { transform: rotate(180deg); }
.accordion-body { display: none; padding: 1.5rem; border-top: 2px solid #f3f4f6; }
.accordion-body.open { display: block; }
.info-block { padding: 1rem; border-radius: 0 0.5rem 0.5rem 0; margin-bottom: 1rem; }
.info-block.red    { background: #fef2f2; border-left: 4px solid #ef4444; }
.info-block.blue   { background: #eff6ff; border-left: 4px solid #3b82f6; }
.info-block.green  { background: #f0fdf4; border-left: 4px solid #22c55e; }
.info-block h4 { font-weight: 700; margin-bottom: 0.5rem; }
.info-block.red h4   { color: #991b1b; }
.info-block.blue h4  { color: #1e40af; }
.info-block.green h4 { color: #166534; }
.info-block p, .info-block li { font-size: 0.9rem; color: #374151; line-height: 1.6; }
.info-block ul { padding-left: 0; }
.info-block li { display: flex; gap: 0.5rem; margin-bottom: 0.4rem; }
.check-green { color: #16a34a; font-weight: 700; flex-shrink: 0; }

/* ── QUIZ MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px); display: flex;
  align-items: center; justify-content: center;
  z-index: 200; padding: 1rem;
}
.modal-box { background: #fff; border-radius: 1.25rem; max-width: 560px; width: 100%; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-header { padding: 1.25rem 1.5rem; color: #fff; }
.modal-body { padding: 1.5rem; }
.quiz-option {
  width: 100%; text-align: left; padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb; border-radius: 0.75rem;
  margin-bottom: 0.75rem; transition: all 0.2s; font-size: 0.9rem;
  background: #fff; cursor: pointer;
}
.quiz-option:hover { border-color: #93c5fd; background: #eff6ff; }
.quiz-option.selected { border-color: #3b82f6; background: #eff6ff; }
.quiz-option.correct  { border-color: #22c55e; background: #f0fdf4; color: #166534; }
.quiz-option.wrong    { border-color: #ef4444; background: #fef2f2; color: #991b1b; }
.progress-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.3); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: #fff; border-radius: 3px; transition: width 0.3s; }

/* ── CERTIFICATE ── */
.cert-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 300; padding: 1rem; }
.cert-box { background: #fff; border-radius: 1.25rem; max-width: 640px; width: 100%; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
.cert-body {
  padding: 2rem; text-align: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #faf0ff 50%, #f0fff4 100%);
  position: relative;
}
.cert-border-outer { position: absolute; inset: 12px; border: 2px dashed #c7d2fe; border-radius: 0.75rem; pointer-events: none; }
.cert-border-inner { position: absolute; inset: 16px; border: 1px solid #e0e7ff; border-radius: 0.75rem; pointer-events: none; }
.cert-stars { display: flex; gap: 4px; justify-content: center; }
.cert-star { width: 14px; height: 14px; }
.cert-footer { padding: 1rem 1.5rem; background: #f9fafb; display: flex; gap: 0.75rem; }

/* ── STAT BOXES ── */
.stat-box {
  background: #fff; border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 1.5rem; text-align: center;
}
.stat-box .icon-wrap {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.stat-box .icon-wrap svg { width: 32px; height: 32px; }
.stat-box .value { font-size: 1.875rem; font-weight: 800; color: #1f2937; }
.stat-box .label { font-size: 0.875rem; color: #6b7280; margin-top: 0.25rem; }

/* ── SCORECARD ── */
.score-mini { border-radius: 0.75rem; padding: 1rem; text-align: center; }
.score-mini .val { font-size: 1.875rem; font-weight: 900; }
.score-mini .lbl { font-size: 0.75rem; color: #6b7280; margin-top: 2px; }

/* ── ALERT ROWS ── */
.alert-row { padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f3f4f6; transition: background 0.15s; }
.alert-row:hover { background: #f9fafb; }
.alert-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* ── FORM INPUTS ── */
.form-input {
  width: 100%; padding: 0.625rem 1rem;
  border: 1px solid #d1d5db; border-radius: 0.5rem;
  font-size: 0.9rem; color: #1f2937;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.form-label { display: block; font-size: 0.875rem; margin-bottom: 0.375rem; color: #fff; }

/* ── RESPONSIVE GRIDS ── */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px)  { .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 768px)  {
  .grid-2 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(3,1fr); }
  .grid-4 { grid-template-columns: repeat(4,1fr); }
}

/* ── DARK MODE toggle stub ── */
body.dark { background: #0f172a; color: #e2e8f0; }
body.dark .main-navbar { background: #0f172a; }
body.dark .card { background: #1e293b; border-color: #334155; }
body.dark .footer { background: #0f172a; border-color: #1e293b; }
