/* ===============================
   🌈 GLOBAL THEME VARIABLES
================================= */
:root {
  --primary-color: #4f46e5;
  --secondary-color: #6b7280;
  --bg-color: #f9fafb;
  --text-color: #111827;
  --card-bg: #ffffff;
  --radius: 0.6rem;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

/* ===============================
   🌍 BASE RESET
================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: var(--transition);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
  overflow-x: hidden;
  animation: fadeInBody 0.8s ease-out;
}

/* Smooth page fade-in */
@keyframes fadeInBody {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===============================
   🧭 NAVBAR
================================= */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
  animation: fadeDown 0.8s ease-out;
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  position: relative;
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ===============================
   📱 MOBILE MENU TOGGLE
================================= */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-color);
  transition: transform 0.2s ease;
}

.menu-toggle:hover {
  transform: scale(1.1);
}

@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 1rem;
    background-color: var(--card-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.2rem;
    width: 240px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid #e5e7eb;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }
}

/* ===============================
   ⚡ UTILITIES & CARDS
================================= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-top: 1rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: fadeUp 0.8s ease-out forwards;
}

.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.error {
  color: #dc2626;
  font-weight: 600;
}

/* ===============================
   🚨 ALERTS
================================= */
.alert {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: fadeIn 0.5s ease forwards;
}

.alert.success {
  background-color: #16a34a;
}

.alert.error {
  background-color: #dc2626;
}

.alert.info {
  background-color: #2563eb;
}

/* ===============================
   ✨ ANIMATIONS
================================= */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Generic fade-in classes */
.fade-in {
  opacity: 0;
  animation: fadeUp 0.8s ease-out forwards;
}

.fade-delay-1 {
  animation-delay: 0.2s;
}
.fade-delay-2 {
  animation-delay: 0.4s;
}
.fade-delay-3 {
  animation-delay: 0.6s;
}

/* ===============================
   📱 BOTTOM MOBILE NAVBAR
================================= */
.mobile-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.7rem 0;
    z-index: 1000;
    animation: fadeUp 0.6s ease-out;
  }

  .mobile-nav a {
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: color 0.3s ease;
  }

  .mobile-nav a svg {
    width: 22px;
    height: 22px;
    margin-bottom: 4px;
  }

  .mobile-nav a.active,
  .mobile-nav a:hover {
    color: var(--primary-color);
  }

  body {
    padding-bottom: 60px; /* Prevent overlap with nav */
  }
}

/* ===============================
   🧱 RESPONSIVE FIXES
================================= */
@media (max-width: 480px) {
  .navbar {
    padding: 0.8rem 1rem;
  }

  .logo {
    font-size: 1.1rem;
  }
}
/* ===============================
   🌍 BRANDED PAGE LOADER
================================= */
.page-loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #eef2ff, #f3f4f6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  visibility: visible;
}

.loader-logo-spin {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  animation: spinLogo 2.5s linear infinite, fadeInLogo 1.2s ease forwards;
  opacity: 0;
}

.loader-text {
  margin-top: 1rem;
  font-weight: 500;
  color: var(--primary-color);
  letter-spacing: 0.5px;
  font-size: 1rem;
  animation: fadeInText 1.2s ease 0.6s forwards;
  opacity: 0;
}

/* ✨ Animations */
@keyframes spinLogo {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeInLogo {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeInText {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hide loader when done */
.page-loader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes logoZoomOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

