/* Base Styles */
:root {
  --primary-color: #e40046; /* Kenyan flag red */
  --secondary-color: #006600; /* Kenyan flag green */
  --accent-color: #000000; /* Kenyan flag black */
  --light-color: #ffffff;
  --gray-color: #f4f4f4;
  --dark-gray: #504040;
  --font-primary: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-secondary: "Georgia", serif;
}

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

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--dark-gray);
  background-color: var(--light-color);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--dark-gray);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.5rem;
  color: var(--secondary-color);
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
header {
  background-color: var(--primary-color);
  color: var(--light-color);
  padding: 2rem 0;
  text-align: center;
}

header h1 {
  color: var(--light-color);
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Navigation */
nav {
  background-color: var(--secondary-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  flex-wrap: wrap;
}

nav ul li {
  margin: 0 1rem;
}

nav ul li a {
  color: var(--light-color);
  font-weight: 600;
  transition: all 0.3s ease;
}

nav ul li a:hover {
  color: #ffcc00; /* Kenyan flag yellow */
  text-decoration: none;
}

/* Main Content */
main {
  padding: 2rem 0;
}

section {
  margin-bottom: 3rem;
}

/* Introduction Section */
.intro-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  margin-top: 1.5rem;
}

.intro-text {
  flex: 1;
  min-width: 300px;
}

.intro-image {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

/* Concepts Section */
.concept-overview {
  text-align: center;
  margin-bottom: 2rem;
}

.concept-main-img {
  max-width: 100%;
  height: auto;
  margin-bottom: 1.5rem;
}

.concept-card {
  background-color: var(--gray-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.concept-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.concept-text {
  flex: 1;
  min-width: 300px;
}

.concept-image,
.inheritance-image {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.responsive-img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Code Examples */
.code-example {
  background-color: #272822;
  border-radius: 8px;
  overflow: auto;
  margin-bottom: 1rem;
}

.code-example pre {
  padding: 1rem;
  font-family: "Courier New", Courier, monospace;
  color: #f8f8f2;
  font-size: 0.9rem;
}

/* Kenyan Context Section */
.kenyan-context-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.context-card {
  background-color: var(--gray-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Resources Section */
.resources-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.resource-card {
  background-color: var(--gray-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.resource-card ul {
  list-style-position: inside;
  margin-left: 1rem;
}

.resource-card li {
  margin-bottom: 0.5rem;
}

/* Example Card */
.example-card {
  background-color: var(--gray-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
  background-color: var(--dark-gray);
  color: var(--light-color);
  padding: 2rem 0;
  text-align: center;
}

footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.social-links {
  margin-top: 1rem;
}

.social-links a {
  color: var(--light-color);
  font-size: 1.5rem;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.7rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
  }

  nav ul li {
    margin: 0.5rem 0;
  }

  .intro-content,
  .concept-content {
    flex-direction: column;
  }

  .concept-image,
  .intro-image {
    order: -1;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section {
  animation: fadeIn 0.8s ease-out;
}
