/* Root Variables */
:root {
  /* Light Theme Colors */
  --primary-blue: #2a3f9d;
  --accent-orange: #f47c20;
  --secondary-aqua: #4bafe0;
  --neutral-white: #ffffff;
  --subtle-gray: #f8f9fa;
  --text-dark: #2c3e50;
  --text-light: #6c757d;

  /* Glassmorphism Properties */
  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  --glass-blur: blur(10px);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-blue), var(--secondary-aqua));
  --gradient-accent: linear-gradient(135deg, var(--accent-orange), #ff6b35);
  --gradient-hero: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-aqua) 50%, var(--accent-orange) 100%);

  /* Typography */
  --font-primary: "Poppins", sans-serif;
  --font-secondary: "Inter", sans-serif;

  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --primary-blue: #4a90e2;
  --accent-orange: #ff8c42;
  --secondary-aqua: #5dade2;
  --neutral-white: #1a1a1a;
  --subtle-gray: #2c2c2c;
  --text-dark: #e8e8e8;
  --text-light: #b0b0b0;

  --glass-bg: rgba(26, 26, 26, 0.25);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);

  /* Dark mode specific gradients */
  --gradient-primary: linear-gradient(135deg, #4a90e2, #5dade2);
  --gradient-accent: linear-gradient(135deg, #ff8c42, #ff6b35);
  --gradient-hero: linear-gradient(135deg, #4a90e2 0%, #5dade2 50%, #ff8c42 100%);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-secondary);
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--neutral-white);
  overflow-x: hidden;
  transition: var(--transition-smooth);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
}
h2 {
  font-size: 2.5rem;
}
h3 {
  font-size: 2rem;
}
h4 {
  font-size: 1.5rem;
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1rem;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Glassmorphism Components */
.glassmorphism-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  padding: 2rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.glassmorphism-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.glassmorphism-card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: var(--transition-smooth);
  opacity: 0;
}

.glassmorphism-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

.glassmorphism-card:hover::after {
  opacity: 1;
  animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* Enhanced theme transition for smooth dark mode switching */
.theme-transition {
  transition: background-color 0.3s ease, color 0.3s ease !important;
}

.theme-transition * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* Navigation */
/* Making navbar floating and rounded with proper spacing */
.glassmorphism-nav {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
  padding: 1rem 0;
  margin: 1rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  width: calc(100% - 4rem);
}

.navbar-brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--primary-blue) !important;
  text-decoration: none;
}

.navbar-brand .logo {
  height: 40px;
  margin-right: 10px;
}

.brand-text {
  font-size: 1.5rem;
  font-family: var(--font-primary);
}

/* Improved nav link hover effects */
.nav-link {
  color: var(--text-dark) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  padding: 0.5rem 1rem !important;
  cursor: pointer;
  pointer-events: auto;
  z-index: 10;
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(42, 63, 157, 0.15), transparent);
  transition: var(--transition-smooth);
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-smooth);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.nav-link:hover {
  background: rgba(42, 63, 157, 0.1);
  color: var(--primary-blue) !important;
  transform: translateY(-2px);
}

/* Making dropdown background opaque and improving hover */
.glassmorphism-dropdown {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  box-shadow: var(--glass-shadow);
}

[data-theme="dark"] .glassmorphism-dropdown {
  background: rgba(26, 26, 26, 0.95) !important;
}

.dropdown-item {
  color: var(--text-dark);
  transition: var(--transition-smooth);
  border-radius: 8px;
  margin: 0.25rem;
}

.dropdown-item:hover {
  background: rgba(42, 63, 157, 0.15);
  color: var(--primary-blue);
  transform: translateX(5px);
}

/* Adding space between theme toggle and get started button */
.theme-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-dark);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  margin-right: 1rem;
}

.theme-toggle:hover {
  background: var(--primary-blue);
  color: white;
  transform: rotate(180deg) scale(1.1);
}

.cta-btn {
  background: var(--gradient-primary);
  border: none;
  border-radius: 25px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  color: white;
  cursor: pointer;
  pointer-events: auto;
}

.cta-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 5px 15px rgba(42, 63, 157, 0.4);
  color: white;
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  color: white;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(42, 63, 157, 0.4);
  color: white;
}

.btn-secondary {
  background: var(--gradient-accent);
  border: none;
  color: white;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(244, 124, 32, 0.4);
  color: white;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* Adding top padding for floating navbar */
  padding-top: 120px;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-hero);
  z-index: -2;
}

.floating-shapes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

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

.shape-1 {
  width: 100px;
  height: 100px;
  top: 20%;
  left: 10%;
  animation: float 8s ease-in-out infinite;
  animation-delay: 0s;
}

.shape-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation: floatReverse 10s ease-in-out infinite;
  animation-delay: 2s;
}

.shape-3 {
  width: 80px;
  height: 80px;
  top: 40%;
  left: 70%;
  animation: float 6s ease-in-out infinite;
  animation-delay: 4s;
  border-radius: 20%;
}

.shape-4 {
  width: 120px;
  height: 120px;
  bottom: 20%;
  left: 20%;
  animation: floatReverse 7s ease-in-out infinite;
  animation-delay: 1s;
  border-radius: 30%;
}

.shape-5 {
  width: 200px;
  height: 200px;
  top: 10%;
  right: 30%;
  animation: float 12s ease-in-out infinite;
  animation-delay: 3s;
  opacity: 0.05;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-15px) rotate(120deg);
  }
  66% {
    transform: translateY(-5px) rotate(240deg);
  }
}

@keyframes floatReverse {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(10px) rotate(-120deg);
  }
  66% {
    transform: translateY(-10px) rotate(-240deg);
  }
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-buttons {
  margin-bottom: 2rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  height: 500px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === Floating Cards Area === */
.floating-area {
  position: relative;
  width: 100%;
  height: 520px;
  margin: 0 auto;

  /* control how much the whole stack shifts up (default no shift) */
  --stack-shift: 0%;
}

/* === Card base === */
.floating-card {
  position: absolute;
  left: 20%;
  transform: translateX(-50%);
  width: clamp(140px, 16vw, 200px);
  height: clamp(90px, 12vw, 140px);
  padding: 1.2rem;
  text-align: center;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: width 0.3s ease, height 0.3s ease, top 0.3s ease, transform 0.3s ease;

  /* Stronger neutral-white frosted glass effect (copying nav bar feel but neutral) */
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(40px) saturate(220%);
  -webkit-backdrop-filter: blur(40px) saturate(220%);
  border: 1px solid rgba(255, 255, 255, 0.40);
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -8px 20px rgba(0,0,0,0.05);
  background-clip: padding-box;
}

/* Floating animations (keyframes same, per-card durations + delays are varied below) */
@keyframes floatCard {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

/* set default animation - specific durations/delays applied below for stagger */
.floating-card {
  animation-name: floatCard;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

/* Staggered durations + delays so they don't move up/down at same time */
.floating-card:nth-child(1) { animation-duration: 4.0s;  animation-delay: 0s;    }
.floating-card:nth-child(2) { animation-duration: 4.4s;  animation-delay: 0.35s; }
.floating-card:nth-child(3) { animation-duration: 4.2s;  animation-delay: 0.7s;  }
.floating-card:nth-child(4) { animation-duration: 4.6s;  animation-delay: 1.05s; }
.floating-card:nth-child(5) { animation-duration: 3.8s;  animation-delay: 1.4s;  }

/* === Icon & Text === */
.floating-card i {
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  color: var(--primary-blue);
  margin-bottom: 0.7rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.floating-card h4 {
  font-size: clamp(0.75rem, 1.1vw, 0.95rem);
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.2;
  font-family: var(--font-primary);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.55);
}

/* === Stack positioning (uses --stack-shift so the whole stack can move up) */
.floating-card:nth-child(1) { top: calc(8%  + var(--stack-shift)); z-index: 1; }
.floating-card:nth-child(2) { top: calc(22% + var(--stack-shift)); z-index: 2; }
.floating-card:nth-child(3) { top: calc(36% + var(--stack-shift)); z-index: 3; }
.floating-card:nth-child(4) { top: calc(50% + var(--stack-shift)); z-index: 4; }
.floating-card:nth-child(5) { top: calc(64% + var(--stack-shift)); z-index: 5; }

/* === Medium screens === */
@media (max-width: 992px) {
  .floating-area { height: 460px;  --stack-shift: -10%; } /* more upward shift than before */
  .floating-card { left: 29%; }

  .floating-card:nth-child(1) { top: calc(4%  + var(--stack-shift)); }
  .floating-card:nth-child(2) { top: calc(18% + var(--stack-shift)); }
  .floating-card:nth-child(3) { top: calc(32% + var(--stack-shift)); }
  .floating-card:nth-child(4) { top: calc(46% + var(--stack-shift)); }
  .floating-card:nth-child(5) { top: calc(60% + var(--stack-shift)); }
}

/* === Tablets === */
@media (max-width: 768px) {
  /* significantly more upward shift on tablet: ~ -15% extra */
  .floating-area { height: 380px; --stack-shift: -15%; }

  .floating-card {
    width: clamp(120px, 26vw, 160px);
    height: clamp(80px, 20vw, 110px);
    padding: 0.9rem;
    left: 27%;
  }

  .floating-card:nth-child(1) { top: calc(2%  + var(--stack-shift)); }
  .floating-card:nth-child(2) { top: calc(14% + var(--stack-shift)); }
  .floating-card:nth-child(3) { top: calc(26% + var(--stack-shift)); }
  .floating-card:nth-child(4) { top: calc(38% + var(--stack-shift)); }
  .floating-card:nth-child(5) { top: calc(50% + var(--stack-shift)); }

  /* slightly smaller float amplitude */
  @keyframes floatCard {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
  }
}

/* === Mobile phones === */
@media (max-width: 480px) {
  /* largest upward shift on narrow screens: ~ -20% to -25% (very visible) */
  .floating-area { height: 320px; --stack-shift: -20%; }

  .floating-card {
    width: clamp(100px, 38vw, 140px);
    height: clamp(64px, 28vw, 95px);
    padding: 0.7rem;
    left: 25%;
  }

  .floating-card:nth-child(1) { top: calc(0%  + var(--stack-shift)); }
  .floating-card:nth-child(2) { top: calc(11% + var(--stack-shift)); }
  .floating-card:nth-child(3) { top: calc(22% + var(--stack-shift)); }
  .floating-card:nth-child(4) { top: calc(33% + var(--stack-shift)); }
  .floating-card:nth-child(5) { top: calc(44% + var(--stack-shift)); }

  /* smallest float amplitude on phones */
  @keyframes floatCard {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
  }
}

/* Page Hero Sections */
.page-hero {
  position: relative;
  padding: 150px 0 100px 0;
  background: var(--gradient-hero);
  overflow: hidden;
}

.page-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.breadcrumb {
  background: transparent;
  padding: 0;
}

.breadcrumb-item a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: white;
}

/* Removing floating balls from about and services pages */
.about-hero .floating-shapes,
.services-hero .floating-shapes {
  display: none;
}

/* Making gradients continue to the end of sections */
.page-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(to bottom, transparent, var(--neutral-white));
}

[data-theme="dark"] .page-hero::after {
  background: linear-gradient(to bottom, transparent, var(--neutral-white));
}

/* Statistics Section */
.stats-section {
  padding: 4rem 0;
  background: rgba(255, 255, 255, 0.05);
}

.stat-card {
  padding: 2rem 1rem;
  transition: var(--transition-smooth);
}

/* Making stat icons colorful instead of black */
.stat-icon {
  font-size: 2.5rem;
  color: var(--primary-blue);
  margin-bottom: 1rem;
  transition: var(--transition-smooth);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-light);
  margin: 0;
}

/* Section Styles */
.section-title {
  color: var(--primary-blue);
  margin-bottom: 1rem;
  position: relative;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* About Preview Section */
.about-preview-section {
  padding: 5rem 0;
}

.differentiators {
  padding: 2rem;
}

.differentiator-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Making differentiator icons colorful */
.differentiator-item i {
  color: var(--accent-orange);
  margin-right: 1rem;
  font-size: 1.2rem;
}

/* Services Section */
.services-section {
  padding: 5rem 0;
  background: rgba(75, 175, 224, 0.05);
}

.service-card {
  text-align: center;
  transition: var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: var(--transition-smooth);
  z-index: 1;
}

.service-card:hover::before {
  left: 100%;
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
}

/* Making service icons colorful instead of black */
.service-icon {
  font-size: 3rem;
  color: var(--primary-blue);
  margin-bottom: 1.5rem;
  transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
  color: var(--accent-orange);
  transform: scale(1.1);
}

.service-card h4 {
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.service-card p {
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

/* Centering buttons in service cards and adding spacing */
.service-card .btn {
  margin: 0 auto;
  margin-top: auto;
}

.service-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: auto;
}

/* Projects Section */
.projects-section {
  padding: 5rem 0;
}

.project-card {
  overflow: hidden;
  transition: var(--transition-smooth);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: var(--transition-smooth);
  z-index: 1;
}

.project-card:hover::before {
  left: 100%;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
}

.project-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(42, 63, 157, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-category {
  background: var(--accent-orange);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.project-content {
  padding: 1.5rem;
}

.project-stats {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.project-stats span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Centering view details buttons in project cards */
.project-card .btn {
  margin: 0 auto;
  display: block;
  width: fit-content;
}

/* ===================================
   Blog Section
   =================================== */
/* Completing the blog section CSS that was cut off */
.blog-section {
  padding: 5rem 0;
}

.blog-filters {
  background: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .blog-filters {
  background: rgba(26, 26, 26, 0.5);
}

.category-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  border-radius: 25px;
  padding: 0.5rem 1.5rem;
  transition: var(--transition-smooth);
}

.filter-btn.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
}

.blog-search .input-group {
  border-radius: 25px;
  overflow: hidden;
}

.blog-search .form-control {
  border-right: none;
}

.blog-search .btn {
  border-left: none;
}

/* Featured Article */
.featured-article {
  background: rgba(75, 175, 224, 0.05);
}

.featured-post {
  overflow: hidden;
}

.featured-image {
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: 15px;
  margin-bottom: 2rem;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.featured-post:hover .featured-image img {
  transform: scale(1.05);
}

.featured-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--gradient-primary);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
}

.featured-content h2 {
  margin-bottom: 1rem;
}

.featured-content h2 a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.featured-content h2 a:hover {
  color: var(--accent-orange);
}

.post-category {
  display: inline-block;
  background: var(--accent-orange);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  gap: 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-light);
  font-size: 0.9rem;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Newsletter Widget */
.newsletter-widget h4 {
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.newsletter-widget .form-control {
  border-radius: 10px;
  border: 1px solid var(--glass-border);
}

/* Popular Articles */
.popular-articles h4 {
  color: var(--primary-blue);
  margin-bottom: 1.5rem;
}

.popular-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.popular-item {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  transition: var(--transition-smooth);
}

[data-theme="dark"] .popular-item {
  background: rgba(255, 255, 255, 0.05);
}

.popular-item:hover {
  background: rgba(42, 63, 157, 0.1);
  transform: translateX(5px);
}

.popular-item h6 {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.popular-item h6 a {
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.popular-item h6 a:hover {
  color: var(--primary-blue);
}

.popular-item small {
  color: var(--text-light);
  font-size: 0.8rem;
}

/* Blog Grid */
.blog-grid {
  background: var(--neutral-white);
}

.blog-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.blog-card:hover {
  transform: translateY(-10px);
}

.blog-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  border-radius: 15px;
  margin-bottom: 1.5rem;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.blog-card:hover .blog-image img {
  transform: scale(1.1);
}

.blog-category {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--accent-orange);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

.blog-type-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--primary-blue);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.blog-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-content h4 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.blog-content h4 a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.blog-content h4 a:hover {
  color: var(--accent-orange);
}

.blog-content p {
  flex-grow: 1;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.blog-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--text-light);
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.blog-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* CTA Section */
.cta-section {
  padding: 5rem 0;
  background: rgba(75, 175, 224, 0.05);
}

.cta-title {
  color: var(--primary-blue);
  margin-bottom: 1.5rem;
}

.cta-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Testimonials Section */
.testimonials-section {
  padding: 5rem 0;
}

.testimonial-card {
  text-align: center;
  padding: 2rem;
}

.testimonial-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  overflow: hidden;
  border: 3px solid var(--primary-blue);
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-text {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

.testimonial-author {
  font-weight: 600;
  color: var(--primary-blue);
  margin-bottom: 0.25rem;
}

.testimonial-position {
  color: var(--text-light);
  font-size: 0.9rem;
}

.testimonial-rating {
  color: var(--accent-orange);
  margin-bottom: 1rem;
}

/* Contact Section */
.contact-section {
  padding: 5rem 0;
}

.contact-info-card {
  text-align: center;
  padding: 2rem;
  transition: var(--transition-smooth);
}

.contact-info-card:hover {
  transform: translateY(-5px);
}

.contact-icon {
  font-size: 2.5rem;
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.contact-info-card h4 {
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.contact-info-card p {
  color: var(--text-light);
  margin: 0;
}

.contact-form .form-control,
.contact-form .form-select {
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  transition: var(--transition-smooth);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 0.2rem rgba(42, 63, 157, 0.25);
  outline: 0;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  border-color: #495057;
  background-color: #2c2c2c;
  color: #e8e8e8;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  border-color: var(--primary-blue);
  background-color: #2c2c2c;
}

/* Footer */
.glassmorphism-footer {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer-section h5 {
  color: var(--primary-blue);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-section h6 {
  color: var(--primary-blue);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-logo {
  margin-bottom: 1rem;
}

.footer-logo h5 {
  margin: 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition-smooth);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--primary-blue);
  transform: translateX(5px);
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-light);
}

.contact-info i {
  color: var(--primary-blue);
  font-size: 1.1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.social-link:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-3px);
}

.newsletter-section {
  margin: 3rem 0;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 15px;
}

[data-theme="dark"] .newsletter-section {
  background: rgba(255, 255, 255, 0.05);
}

.newsletter-section h5 {
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.newsletter-form .input-group {
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form .form-control {
  border-radius: 25px 0 0 25px;
  border-right: none;
  padding: 0.75rem 1.5rem;
}

.newsletter-form .btn {
  border-radius: 0 25px 25px 0;
  padding: 0.75rem 2rem;
}

.footer-divider {
  border-color: var(--glass-border);
  margin: 2rem 0;
}

.copyright {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0;
}

.copyright a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.copyright a:hover {
  color: var(--accent-orange);
}

/* =====================================================
   Scroll To Top Button
   ===================================================== */
.scroll-to-top {
    position: fixed;
    bottom: 25px; /* Adjust distance from bottom */
    right: 25px; /* Adjust distance from right */
    z-index: 1050; /* Ensure it is above the navbar and other content */
    width: 50px;
    height: 50px;
    background-color: var(--accent-orange); /* Use your accent color */
    color: var(--neutral-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    
    /* Animation: Initially hidden off-screen */
    opacity: 0; 
    visibility: hidden; 
    transform: scale(0.8); 
    transition: all 0.3s ease-in-out;
}

.scroll-to-top:hover {
    background-color: var(--primary-blue); /* Hover effect using primary color */
}

/* This is activated by initScrollToTop() in main.js */
.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Mobile responsive for scroll button */
@media (max-width: 768px) {
  #scrollToTop {
    width: 45px;
    height: 45px;
    bottom: 90px;
    font-size: 18px;
  }
}

/* ===================================
   Utility Classes
   =================================== */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-aqua));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glassmorphism {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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

/* Smooth page transitions */
.page-transition {
  animation: fadeOut 0.3s ease;
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}

/* Notification styles */
.notification-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  padding: 0.25rem;
  margin-left: auto;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.notification-close:hover {
  opacity: 1;
}

/* Form validation styles */
.is-invalid {
  border-color: var(--accent-orange) !important;
  animation: shake 0.3s;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .container {
    max-width: 100%;
    padding: 0 2rem;
  }
}

@media (max-width: 992px) {
  .section-title {
    font-size: 2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.75rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .glassmorphism-card {
    padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  .section-title {
    font-size: 1.5rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

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

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

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

.animate-fade-in-down {
  animation: fadeInDown 0.6s ease-out;
}

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

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-buttons .btn {
    width: 100%;
    margin: 0 !important;
  }

  .category-filters {
    justify-content: center;
  }

  .filter-btn {
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
  }

  .featured-image {
    height: 250px;
  }

  .social-links {
    justify-content: center;
  }

  .newsletter-form .btn {
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 576px) {
  .scroll-to-top {
    bottom: 90px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }

  .blog-meta {
    font-size: 0.75rem;
  }

  .post-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Adding visible borders to form inputs before focus */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="url"],
textarea,
select {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: #ffffff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Fix checkbox styling to show tick in light mode */
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #ffffff;
  position: relative;
  transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
  background-color: var(--primary-blue);
  border-color: var(--primary-blue);
}

input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 14px;
  font-weight: bold;
}

input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
