/* ================================================
   Science PothGula | දර්ශන නුවන්
   Custom Stylesheet
   ================================================ */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.35);
  --dark-bg: #030712;
  --card-bg: #0f172a;
  --border-color: rgba(255, 255, 255, 0.08);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #020617;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Typography */
.font-sinhala {
  font-family: 'Noto Sans Sinhala', 'Yaldevi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: 0.01em;
}

/* ✨ Premium Sinhala shimmer brand name */
.brand-name {
  font-family: 'Noto Sans Sinhala', 'Yaldevi', sans-serif;
  font-weight: 900;
  background: linear-gradient(120deg,#e0f2fe 0%,#93c5fd 25%,#60a5fa 50%,#38bdf8 75%,#e0f2fe 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.04em;
  display: inline-block;
  line-height: 1.2;
  animation: sinhalShimmer 3.5s linear infinite;
  filter: drop-shadow(0 0 10px rgba(96,165,250,0.55));
}
@keyframes sinhalShimmer {
  0%   { background-position: 0%   center; }
  100% { background-position: 250% center; }
}

/* Logo icon glow */
@keyframes logoGlow {
  0%,100% { box-shadow: 0 0 8px 2px rgba(59,130,246,0.4); }
  50%      { box-shadow: 0 0 20px 7px rgba(59,130,246,0.75); }
}
.logo-glow { animation: logoGlow 2.5s ease-in-out infinite; }

/* Navbar active and links */
.nav-link {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.925rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}
.nav-link:hover {
  color: #ffffff;
}
.nav-active {
  color: #60a5fa !important;
  background-color: rgba(59, 130, 246, 0.1);
}

/* Glassmorphism & Cards */
.glass-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 12px 30px -10px rgba(37, 99, 235, 0.2);
}

/* Glow effects */
.glow-primary {
  box-shadow: 0 0 25px -5px rgba(37, 99, 235, 0.45);
}

/* Hero animated background */
.hero-glow-1 {
  position: absolute;
  top: -10%;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.hero-glow-2 {
  position: absolute;
  top: 10%;
  right: 15%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.2) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* Toast notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s ease-out forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-success {
  background: #064e3b;
  color: #a7f3d0;
  border: 1px solid #059669;
}
.toast-error {
  background: #7f1d1d;
  color: #fecaca;
  border: 1px solid #dc2626;
}
.toast-info {
  background: #1e3a8a;
  color: #bfdbfe;
  border: 1px solid #2563eb;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.hidden {
  display: none !important;
}
.modal-content {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  max-width: 32rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  animation: modalIn 0.25s ease-out;
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== Next.js Visual Parity: Hero & Aesthetics ===== */
.hero-gradient {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 40%, #1d4ed8 70%, #2563eb 100%);
}

.gradient-text {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out both;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out both;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out both;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Section background gradient matching Next.js */
.section-gradient {
  background: linear-gradient(180deg, #f8faff 0%, #eff6ff 100%);
}

.brand-name-dark {
  font-family: 'Noto Sans Sinhala', 'Yaldevi', sans-serif;
  font-weight: 900;
  background: linear-gradient(120deg,#1e3a8a 0%,#2563eb 40%,#0284c7 70%,#1d4ed8 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.04em;
  display: inline-block;
  line-height: 1.2;
  animation: sinhalShimmer 3.5s linear infinite;
}

/* ── Mobile optimisations ────────────────────────── */
@media (max-width: 768px) {
  nav a, nav button { min-height: 44px; -webkit-tap-highlight-color: transparent; }
  html { -webkit-text-size-adjust: 100%; }
  /* Slightly smaller shimmer filter on mobile for perf */
  .brand-name { filter: drop-shadow(0 0 7px rgba(96,165,250,0.45)); }
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.15);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 6px 25px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

