/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth; /* Enable smooth scrolling globally */
  scroll-padding-top: var(
    --header-height
  ); /* Reserve space for fixed navigation bar */
}

/* Global Variables */
:root {
  --primary-color: #ae1129; /* Deep red */
  --secondary-color: #7d0d1e; /* Darker shade of primary */
  --text-color: #474c55; /* Deep gray */
  --light-text: #6b7280;
  --background: #ffffff;
  --section-bg: #f8fafc;
  --max-width: 1200px;
  --header-height: 80px;
}

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(71, 76, 85, 0.4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(71, 76, 85, 0.6);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  overflow-y: overlay; /* Creates an overlay scrollbar on WebKit browsers */
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--background);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 0;
}

.logo img {
  height: 40px;
  user-select: none;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s;
}

.nav a.active,
.nav a:hover {
  color: var(--primary-color);
}

.cta-button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.cta-button:hover {
  background: var(--secondary-color);
}

/* Hero Section Styles */
.hero {
  padding: calc(var(--header-height) + 10rem) 0 10rem;
  background: linear-gradient(
      135deg,
      rgba(47, 50, 58, 0.45) 0%,
      rgba(44, 47, 54, 0.9) 100%
    ),
    url('images/hero-bg.jpg');
  background-size: cover;
  background-position: center 55%;
  background-repeat: no-repeat;
  color: white;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  text-align: left;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.2;
  margin-bottom: 2.5rem;
  color: white;
  letter-spacing: 1px;
}

.hero p {
  font-size: 1.35rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.8;
}

/* Features Section Styles */
.features {
  padding: 6rem 0;
  background: var(--background);
}

.features h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  font-size: 1.2rem;
  color: var(--text-color);
  line-height: 1.6;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.feature-card {
  padding: 2rem;
  background: var(--section-bg);
  border-radius: 1rem;
  text-align: center;
  transition: transform 0.3s;
  border: 1px solid rgba(0, 0, 0, 0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.06);
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  user-select: none;
  height: 102px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.feature-card h3 {
  height: 4rem; /* Fixed height to accommodate approximately 2 lines of text */
  margin-bottom: 1rem;
  color: var(--text-color);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
}

.feature-card p {
  color: var(--text-color);
  line-height: 1.5;
  flex-grow: 1;
  font-size: 1rem;
}

/* News Section Styles */
.news {
  padding: 6rem 0;
  background: var(--section-bg);
}

.news h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--text-color);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.news-card {
  background: var(--background);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  height: 100%;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.news-content h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: var(--text-color);
  line-height: 1.4;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.news-source {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 0.9rem;
}

.news-date {
  color: var(--light-text);
  font-size: 0.9rem;
}

.news-content p {
  margin-bottom: 1rem;
  line-height: 1.5;
  color: var(--text-color);
  font-size: 0.95rem;
}

.learn-more {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 600;
  margin-top: 1rem;
  text-decoration: none;
  transition: color 0.2s;
}

.learn-more:hover {
  color: var(--secondary-color);
}

/* Footer Styles */
.footer {
  background: var(--text-color);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.35rem;
}

.footer-logo {
  text-align: center;
}

.footer-logo img {
  height: 30px;
  filter: brightness(0) invert(1);
  user-select: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    height: 70px;
    padding: 0;
  }

  .header .container {
    flex-direction: row;
    justify-content: center;
  }

  .nav {
    display: none; /* Hide navigation menu on mobile devices */
  }

  .hero {
    padding-top: calc(70px + 3rem);
    padding-bottom: 3rem;
    text-align: left;
    background: linear-gradient(
        135deg,
        rgba(47, 50, 58, 0.45) 0%,
        rgba(44, 47, 54, 0.9) 100%
      ),
      url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center 45%;
    background-repeat: no-repeat;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

  .features-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }
}

/* Animation Effects */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero,
.feature-card,
.news-card {
  animation: fadeIn 0.8s ease-out forwards;
}
