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

/* --- MODERN DESIGN SYSTEM VARIABLES --- */
:root {
  --bg-main: #F8FAFC;
  --primary: #5B8DEF;
  /* Startup bright blue */
  --primary-hover: #4571D7;
  --secondary: #7DD3FC;
  /* Soft sky blue */
  --accent: #A78BFA;
  /* Pastel violet */
  --text-dark: #1E293B;
  /* Deep navy slate */
  --text-muted: #64748B;
  /* Slate gray */
  --card-bg: #FFFFFF;
  --border: #E2E8F0;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.5);

  --font-heading: 'Poppins', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --shadow-sm: 0 1px 3px rgba(30, 41, 59, 0.05);
  --shadow-md: 0 8px 30px rgba(30, 41, 59, 0.06);
  --shadow-lg: 0 20px 50px rgba(30, 41, 59, 0.08);
  --shadow-glow: 0 10px 30px rgba(91, 141, 239, 0.15);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --header-height: 80px;
}

/* --- BASE STYLES & RESET --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- PRELOADER --- */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-main);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- SCROLL PROGRESS BAR --- */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3.5px;
  z-index: 2000;
  pointer-events: none;
}

#scroll-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.1s ease-out;
}

/* --- BACK TO TOP BUTTON --- */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  color: var(--text-dark);
}

#back-to-top:hover {
  transform: translateY(-5px);
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top i,
#back-to-top svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* --- STICKY NAVBAR --- */
header.premium-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  z-index: 1500;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

header.premium-header.scrolled {
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  height: 70px;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
}

.logo img {
  height: 40px;
  width: auto;
  border-radius: var(--radius-sm);
}

.logo span {
  background: linear-gradient(135deg, var(--text-dark), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* NAVIGATION */
nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a.nav-link {
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  position: relative;
}

nav a.nav-link:hover {
  color: var(--primary);
  background-color: rgba(91, 141, 239, 0.06);
}

/* Active Nav State */
nav a.nav-link.active {
  color: var(--primary);
  background-color: rgba(91, 141, 239, 0.1);
  font-weight: 600;
}

nav a.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 16px;
  right: 16px;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}

/* MOBILE BURGER MENU */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1600;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- REVEAL-ON-SCROLL ANIMATIONS --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-grid>* {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0s);
}

.reveal-grid.active>* {
  opacity: 1;
  transform: translateY(0);
}

/* --- MULTI-COLUMN PREMIUM FOOTER --- */
footer.premium-footer {
  background: linear-gradient(135deg, #4A7CEE 0%, #7C3AED 50%, #A78BFA 100%); /* Premium Indigo-to-Violet gradient */
  color: #FFFFFF;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 80px 5% 40px;
  margin-top: 120px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  /* Centered equal columns */
  gap: 50px;
}

.footer-box {
  text-align: center;
  /* Centered content alignment */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-box h3 {
  font-size: 20px;
  margin-bottom: 24px;
  color: #FFFFFF; /* High-end bold white heading */
  font-weight: 700;
  letter-spacing: 0.5px;
}

.footer-box p {
  color: #E2E8F0; /* Soft slate-white for superior premium contrast */
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 12px;
  max-width: 320px;
}

.footer-box p a {
  color: #E2E8F0;
  transition: var(--transition);
}

.footer-box p a:hover {
  color: #7DD3FC; /* Highlighting sky cyan hover */
}

.footer-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-box ul li {
  margin-bottom: 14px;
}

.footer-box ul li a {
  color: #E2E8F0;
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
}

.footer-box ul li a:hover {
  color: #7DD3FC; /* Highlighting sky cyan hover */
}

/* Bottom Bar */
.footer-bottom {
  max-width: 1200px;
  margin: 60px auto 0;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center; /* Centered copyright text */
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* --- LIGHTBOX OVERLAY --- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.lightbox-close:hover {
  color: var(--secondary);
  transform: scale(1.1);
}

.lightbox-content {
  max-width: 85%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-overlay.active .lightbox-img {
  transform: scale(1);
}

.lightbox-caption {
  color: white;
  text-align: center;
}

.lightbox-caption h3 {
  color: white;
  margin-bottom: 6px;
  font-size: 20px;
}

.lightbox-caption p {
  color: #cbd5e1;
  font-size: 15px;
}

/* --- RESPONSIVE LAYOUTS --- */
@media (max-width: 992px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-box:nth-child(1) {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  header.premium-header {
    padding: 0 24px;
  }

  .menu-toggle {
    display: flex;
  }

  nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    flex-direction: column;
    align-items: stretch;
    padding: 20px 24px 30px;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
  }

  header.premium-header.scrolled nav {
    top: 70px;
  }

  nav.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  nav a.nav-link {
    padding: 12px 16px;
  }

  nav a.nav-link.active::after {
    left: 4px;
    bottom: 50%;
    transform: translateY(50%);
    width: 3px;
    height: 16px;
    border-radius: 2px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-box:nth-child(1) {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}