:root {
  /* Modern Color Palette */
  --primary-color: #00ad44;
  --primary-dark: #008f38;
  --primary-light: #e6f6ec;
  --secondary-color: #0c0c0c;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(255, 255, 255, 0.5);

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Border Radius */
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--secondary-color);
}

.sinhala-font {
  font-family: "FMMalithi", serif;
}

/* --- Components --- */

/* Modern Navbar */
.navbar-modern {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.navbar-modern .nav-link {
  font-weight: 500;
  color: var(--text-main);
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.navbar-modern .nav-link:hover,
.navbar-modern .nav-link.active {
  color: var(--primary-color);
  background: var(--primary-light);
}

.navbar-brand span {
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Hero Modern */
.hero-modern {
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: var(--spacing-xl) 0;
}

.hero-bg-circle {
  position: absolute;
  width: 600px;
  height: 600px;
  background: linear-gradient(
    135deg,
    var(--primary-light) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  border-radius: 50%;
  z-index: -1;
  top: -10%;
  right: -10%;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

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

  .hero-modern {
    padding: var(--spacing-lg) 0;
    text-align: center;
    flex-direction: column-reverse;
  }
}

/* ========================================
   Professional Hero Section - New Design
   ======================================== */

.hero-section-modern {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f8fdf9 50%, #e8f5eb 100%);
  display: flex;
  align-items: center;
}

.min-vh-hero {
  min-height: calc(100vh - 80px);
}

/* Animated Background */
.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      ellipse 80% 50% at 50% -20%,
      rgba(0, 173, 68, 0.15),
      transparent
    ),
    radial-gradient(
      ellipse 60% 40% at 100% 100%,
      rgba(0, 173, 68, 0.1),
      transparent
    );
  z-index: 0;
}

.hero-floating-shapes {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-light)
  );
  opacity: 0.1;
  animation: float 20s ease-in-out infinite;
}

.shape-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.shape-2 {
  width: 200px;
  height: 200px;
  bottom: 10%;
  left: -50px;
  animation-delay: -5s;
}

.shape-3 {
  width: 150px;
  height: 150px;
  top: 40%;
  right: 10%;
  animation-delay: -10s;
}

.floating-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    var(--primary-color) 1px,
    transparent 1px
  );
  background-size: 50px 50px;
  opacity: 0.03;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(20px, -20px) rotate(5deg);
  }
  50% {
    transform: translate(-10px, 20px) rotate(-5deg);
  }
  75% {
    transform: translate(-20px, -10px) rotate(3deg);
  }
}

/* Hero Container */
.hero-container {
  z-index: 1;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

/* Hero Content */
.hero-content {
  max-width: 600px;
}

/* Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 173, 68, 0.1);
  border: 1px solid rgba(0, 173, 68, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  color: var(--primary-dark);
  font-weight: 500;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.badge-icon {
  font-size: 1rem;
}

/* Hero Headline */
.hero-headline {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.headline-accent {
  display: block;
  color: var(--primary-color);
  font-size: 1.1em;
}

.headline-main {
  display: block;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #374151 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero Description */
.hero-description {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 500px;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, #e5e7eb, transparent);
}

/* Hero CTA Buttons */
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 173, 68, 0.3), 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-hero-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 173, 68, 0.4), 0 3px 6px rgba(0, 0, 0, 0.1);
  color: white;
}

.btn-hero-primary:hover::before {
  opacity: 1;
}

.btn-hero-primary svg {
  transition: transform 0.3s ease;
}

.btn-hero-primary:hover svg {
  transform: translateX(4px);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  color: var(--primary-color);
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--primary-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hero-secondary:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 173, 68, 0.2);
}

/* Hero Image */
.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-top: 2rem;
}

/* Decorative Background Shape */
.hero-image-backdrop {
  position: absolute;
  width: 420px;
  height: 420px;
  background: linear-gradient(
    135deg,
    rgba(0, 173, 68, 0.08) 0%,
    rgba(0, 173, 68, 0.15) 100%
  );
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  bottom: 5%;
  right: 5%;
  z-index: 0;
  animation: backdropPulse 8s ease-in-out infinite;
}

@keyframes backdropPulse {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.05) rotate(3deg);
  }
}

.hero-image-glow {
  position: absolute;
  width: 450px;
  height: 450px;
  background: radial-gradient(
    circle,
    rgba(0, 173, 68, 0.15) 0%,
    rgba(0, 173, 68, 0.05) 40%,
    transparent 70%
  );
  filter: blur(40px);
  z-index: 0;
  bottom: 10%;
  right: 10%;
  border-radius: 50%;
}

.hero-image-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero-main-image {
  width: 100%;
  max-width: 520px;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.12));
  /* animation: heroImageFloat 6s ease-in-out infinite; */
  transform-origin: bottom center;
}

@keyframes heroImageFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.01);
  }
}

/* Floating Cards */
.hero-floating-card {
  position: absolute;
  background: white;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-main);
  z-index: 2;
  animation: cardFloat 4s ease-in-out infinite;
}

.floating-card-icon {
  width: 28px;
  height: 28px;
  background: var(--primary-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 0.875rem;
}

.card-1 {
  top: 15%;
  right: -5%;
  animation-delay: 0s;
}

.card-2 {
  bottom: 35%;
  left: 0;
  animation-delay: -2s;
}

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

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 2px;
  animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(8px);
    opacity: 0.5;
  }
}

/* Responsive Styles for New Hero */
@media (max-width: 991px) {
  .hero-section-modern {
    padding-top: 80px;
    min-height: auto;
  }

  .min-vh-hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .hero-content {
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-badge {
    justify-content: center;
  }

  .hero-description {
    max-width: 100%;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-image-wrapper {
    margin-top: 2rem;
  }

  .hero-main-image {
    max-width: 350px;
  }

  .hero-image-backdrop {
    width: 300px;
    height: 300px;
  }

  .hero-floating-card {
    display: none;
  }

  .scroll-indicator {
    display: none;
  }
}

@media (max-width: 576px) {
  .hero-headline {
    font-size: 2rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-main-image {
    max-width: 280px;
  }

  .hero-image-backdrop {
    width: 220px;
    height: 220px;
  }
}

/* Cards Modern */
.card-modern {
  border: none;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  height: 100%;
}

.card-modern:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-modern img {
  transition: transform 0.5s ease;
}

.card-modern:hover img {
  transform: scale(1.05);
}

/* Buttons Modern */
.btn-modern {
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 6px -1px rgba(0, 173, 68, 0.3);
  transition: all 0.2s ease;
}

.btn-modern:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 10px -1px rgba(0, 173, 68, 0.4);
  color: white;
}

/* Page Header */
.page-header-modern {
  background: linear-gradient(to right, var(--primary-light), var(--bg-body));
  padding: 4rem 0;
  margin-bottom: 3rem;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.page-header-modern h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}

/* Tables Modern */
.table-modern-wrapper {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1rem;
  overflow: hidden;
}

.table-modern {
  margin-bottom: 0;
}

.table-modern thead th {
  background: var(--primary-color) !important;
  color: white !important;
  border: none;
  font-weight: 600;
  padding: 1rem;
}

#table-modern-first-header {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

#table-modern-last-header {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.table-modern tbody td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f1f1;
}

.table-modern tr:last-child td {
  border-bottom: none;
}

/* Forms Modern */
.form-modern-wrapper {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.form-modern-input {
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-md);
  padding: 0.75rem;
  transition: border-color 0.2s ease;
}

.form-modern-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--primary-light);
  outline: none;
}

.form-label-modern {
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: block;
}

/* Gallery Grid */
.gallery-grid-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  /* or whatever aspect ratio is preferred */
}

.gallery-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-grid-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.gallery-grid-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-title {
  color: white;
  font-weight: 600;
  font-size: 1.25rem;
}

/* Timeline Component */
.timeline {
  position: relative;
  background: linear-gradient(to right, var(--primary-light), var(--bg-body));

  /* Softer blue bg */
}

.timeline::before {
  content: "";
  position: absolute;
  width: 4px;
  background-color: var(--primary-color);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 4px;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 1rem 3rem;
  margin-bottom: 2rem;
}

.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
  text-align: left;
}

.timeline-item::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  border: 4px solid var(--primary-color);
  top: 2rem;
  z-index: 1;
}

.timeline-item.left::before {
  right: -10px;
}

.timeline-item.right::before {
  left: -10px;
}

.timeline-card {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  background: white;
  transition: transform 0.3s ease;
}

.timeline-card:hover {
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 3rem;
    padding-right: 1rem;
  }

  .timeline-item.left,
  .timeline-item.right {
    left: 0;
    text-align: left;
  }

  .timeline-item.left::before,
  .timeline-item.right::before {
    left: 10px;
    right: auto;
  }
}

/* Results Grid */
.result-item-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  padding: 3px;
  background: white;
}

/* Footer Modern */
.footer-modern {
  background: white;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: auto;
}

.footer-modern h3 {
  color: var(--primary-dark);
}

.footer-modern a {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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