:root {
  /* Colors */
  --primary-color: #007bff;
  /* Vibrant Blue */
  --secondary-color: #0056b3;
  /* Darker Blue */
  --accent-color: #00c6ff;
  /* Light Cyan */
  --text-color: #333;
  --light-text: #666;
  --bg-color: #f8f9fa;
  --white: #ffffff;
  --dark-bg: #1a1a1a;

  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;

  /* Typography */
  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-heading: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  background-image: url('../img/body-bg.png');
  /* Subtle texture */
  background-repeat: repeat;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header & Nav */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  /* Colorful gradient */
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  /* Colored shadow */
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(5px);
  /* Keep slight blur if supported, though gradient is opaque */
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  /* White logo */
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
}

.nav-links a {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  /* White text */
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-color);
  /* Cyan underline */
  box-shadow: 0 0 5px var(--accent-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.4);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--white);
  /* White button */
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/hero-bg.png');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 6rem var(--spacing-lg);
  /* Increased padding for better visual */
  text-align: center;
  margin-bottom: var(--spacing-xl);
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero h1 {
  font-size: 3rem;
  /* Larger font */
  margin-bottom: var(--spacing-md);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: 1.4rem;
  /* Larger font */
  margin-bottom: var(--spacing-lg);
  opacity: 1;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  background-color: var(--white);
  color: var(--primary-color);
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  border: 2px solid transparent;
}

.btn:hover {
  background-color: transparent;
  border-color: var(--white);
  color: var(--secondary-color);
}


/* Components */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  font-size: 2rem;
  color: var(--secondary-color);
}

.rectangletop {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.rectangletop img {
  max-width: 200px;
  height: auto;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: var(--transition);
}

.rectangletop img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

.card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-content {
  padding: var(--spacing-lg);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  color: var(--secondary-color);
}



/* Auto-rotating Carousel & Slider */
.carousel-container {
  overflow: hidden;
  position: relative;
  max-width: 900px;
  margin: 0 auto var(--spacing-xl);
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  background-color: var(--white);
  /* Dark background for letterboxing --dark-bg,  #f5f5f5*/
}

.carousel-slide {
  display: none;
  animation: fade 1.5s;
  height: 100%;
  /* Ensure slide takes full height */
}

.carousel-slide.active {
  display: block;
}

.carousel-content {
  position: relative;
  height: 100%;
  /* Ensure content takes full height */
  display: flex;
  /* alignment */
  justify-content: center;
  align-items: center;
}

.carousel-content img {
  width: 50%;
  height: 50% ;
  /* Enforce a consistent height */
  object-fit: contain;
  /* Ensure image fits within area without cropping */
}

.carousel-text {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
  color: var(--white);
  padding: 4rem 2rem 2rem;
  text-align: left;
}

.carousel-text h3 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  font-weight: 700;
}

.carousel-text p {
  font-size: 1.1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
  max-width: 80%;
}

/* Navigation Buttons - Glassmorphism */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 20px;
  transition: all 0.3s ease;
  border-radius: 50%;
  user-select: none;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  /* Blue gradient like menu */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  border: none;
  margin: 0 15px;
  z-index: 10;
  text-decoration: none;
  opacity: 0.8;
  /* Slight transparency to not block image */
}

.next {
  right: 0;
}

.prev {
  left: 0;
}

.prev:hover,
.next:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

@keyframes fade {
  from {
    opacity: .4
  }

  to {
    opacity: 1
  }
}

/* Footer */
footer {
  margin-top: auto;
  background-color: var(--dark-bg);
  color: var(--white);
  padding: var(--spacing-xl) var(--spacing-lg);
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    /* Changed to var(--white) for better visibility */
    flex-direction: column;
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    text-align: center;
  }

  .nav-links.show {
    display: flex;
  }

  /* Fix for invisible text on mobile */
  .nav-links.show a {
    color: var(--text-color);
  }

  /* Adjust underline for dark text context */
  .nav-links.show a::after {
    background-color: var(--primary-color);
    box-shadow: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }
}