/* ===== Base Styles ===== */
:root {
  --primary-color: #61dafb;
  --primary-dark: #149eca;
  --secondary-color: #282c34;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --gray-color: #6c757d;
  --light-gray: #e9ecef;
  --border-radius: 6px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: #f8fafc;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--secondary-color);
}

a {
  text-decoration: none;
  color: var(--primary-dark);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.btn-secondary {
  background-color: white;
  color: var(--primary-dark);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.btn-icon {
  padding: 0.5rem;
  border-radius: 50%;
}

/* ===== Header ===== */
header {
  background-color: var(--secondary-color);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: white;
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 1rem;
}

.nav-links > li {
  position: relative;
}

.nav-links a {
  color: white;
  font-weight: 500;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
}

.nav-links a:hover {
  color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-links i.fa-chevron-down {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  transition: var(--transition);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  min-width: 220px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 100;
  padding: 0.5rem 0;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  padding: 0;
  margin: 0;
}

.dropdown-menu a {
  color: var(--dark-color);
  padding: 0.75rem 1.5rem;
  display: block;
  border-bottom: 1px solid var(--light-gray);
}

.dropdown-menu a:hover {
  background-color: var(--light-gray);
  color: var(--primary-dark);
  padding-left: 1.75rem;
}

/* Mobile Menu */
.hamburger {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: white;
  padding: 0.5rem;
}

/* ===== Hero Section ===== */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5rem 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--gray-color);
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-image {
  flex: 1;
  text-align: center;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

/* ===== Sections ===== */
.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2rem;
  color: var(--secondary-color);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* ===== Cards ===== */
.card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--light-gray);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--light-gray);
  background-color: #f9f9f9;
}

/* ===== Grid Layouts ===== */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ===== Page Specific Styles ===== */
.page-header {
  background-color: var(--secondary-color);
  color: white;
  padding: 4rem 0;
  margin-bottom: 2rem;
  text-align: center;
}

.page-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #ddd;
}

.breadcrumb a {
  color: var(--primary-color);
}

.breadcrumb span {
  color: #aaa;
}

.page-content {
  padding: 2rem 0;
}

.container-flex {
  display: flex;
  gap: 2rem;
}

.content-article {
  flex: 2;
  min-width: 0; /* Prevent flex overflow */
}

.sidebar {
  flex: 1;
  min-width: 0; /* Prevent flex overflow */
}

/* ===== Content Blocks ===== */
.content-block {
  margin-bottom: 3rem;
}

.content-block h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light-gray);
}

.content-block h3 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--primary-dark);
}

.content-block h4 {
  font-size: 1.25rem;
  margin: 1.5rem 0 1rem;
  color: var(--secondary-color);
}

.content-block p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.content-block ul, 
.content-block ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.content-block li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.content-block img {
  margin: 1.5rem auto;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  max-height: 400px;
  width: auto;
}

/* ===== Tables ===== */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--light-gray);
}

th {
  background-color: var(--secondary-color);
  color: white;
  font-weight: 600;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

tr:hover {
  background-color: #f1f1f1;
}

/* ===== Sidebar ===== */
.sidebar-widget {
  background-color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 2rem;
}

.sidebar-widget h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--primary-dark);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light-gray);
}

.sidebar-widget ul {
  list-style: none;
  padding-left: 0;
}

.sidebar-widget li {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
}

.sidebar-widget a {
  color: var(--dark-color);
  display: block;
  padding: 0.5rem 0;
  transition: var(--transition);
}

.sidebar-widget a:hover {
  color: var(--primary-color);
  padding-left: 0.5rem;
}

/* ===== Footer ===== */
footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #ddd;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  color: white;
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #aaa;
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    padding: 3rem 0;
  }

  .hero-content {
    margin-bottom: 2rem;
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
  }

  .container-flex {
    flex-direction: column;
  }

  .sidebar {
    order: -1;
  }

  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--secondary-color);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    transition: var(--transition);
    z-index: 999;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links > li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    justify-content: center;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background-color: transparent;
    display: none;
    width: 100%;
  }

  .dropdown-menu a {
    color: white;
    padding: 1rem;
    border-bottom: none;
    justify-content: center;
  }

  .dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    padding-left: 1rem;
  }

  .dropdown.active .dropdown-menu {
    display: block;
  }

  .hamburger {
    display: block;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .btn {
    width: 100%;
  }

  .container {
    padding: 0 1rem;
  }
}