/* Root Colors (inspired by Kenya flag & KSG theme) */
:root {
  --ksg-black: #000000;
  --ksg-red: hsla(0, 85%, 21%, 0.693);
  --ksg-green: #8a6f2f;
  --ksg-white: #fdfbf9;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html{
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--ksg-black);
  
}

header {
  background-color: var(--ksg-white);
  border-bottom: 4px solid var(--ksg-red);
  position: sticky;
  top: 0;
  z-index: 1000;
}



a{
    text-decoration: none;
    text-weight: 700;
}

.navbar-container{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 2rem;
    max-width: 1600px;
}

.navbar-logo{
    font-size: 2rem;
    font-weight: 600;
    color: rgb(247, 244, 244);
    text-decoration: none;
    cursor: pointer;
}

.navbar-container .navbar-menu{
    display: flex;
    text-align: center;
    gap: 1.5rem;
    list-style: none;
}

.navbar-container .navbar-menu li a{
    text-decoration: none;
    color: rgb(17, 17, 17);
    font-size: 1.3rem;
    font-weight: 500;
    padding: 3px 20px;
    border-radius: 10px;
    transition: all 0.7s ease;
    white-space: nowrap;
}

.navbar-container .navbar-menu li a:hover,
.navbar-container .navbar-menu li a.active {
    color: #3d2618;
    background: rgba(230, 192, 66, 0.8);    
}

.navbar-toggle{
    display: none;
    background: transparent;
    padding: 10px;
    border: none;
    cursor: pointer;
}

.bar{
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background: #0f0f0f;
    transition: all 0.3s ease-in-out;
}

@media(max-width: 880px){
    
    header{
      background: transparent;
      border-bottom: none;
      
    }

    .navbar{
        backdrop-filter: none;
    }
    .navbar-container .navbar-menu{
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.7rem !important;
        position: absolute;
        height: 100vh;
        width: 250px;
        top: 0;
        right: 0;
        padding: 5rem 1.5rem;
        background: rgba(255, 255, 255, 0.425);
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(10px);    
        transition: transform 0.4s ease-in-out, opacity 0.3s ease-in-out;
        opacity: 0;
        pointer-events: none;

    }  
    @keyframes slideNav{
        0%{
            transform: translateX(100%);
            opacity: 0;
        }
        100%{
            transform: translateX(0);
            opacity: 1;
        }
        
    }  
    .navbar-container .navbar-menu.active {
        animation: slideNav 0.2s ease;
        opacity: 1;
        pointer-events: auto;
    }
    .navbar-toggle{
        display: block;
        z-index: 999;

    }
    .navbar-toggle.active .bar:nth-child(2){
        opacity: 0;        
    }
    .navbar-toggle.active .bar:nth-child(1){
        transform: translateY(8px) rotate(45deg);
    }
    .navbar-toggle.active .bar:nth-child(3){
        transform: translateY(-8px) rotate(-45deg);
    }
}


@media(max-width: 480px){
    .navbar-container{
        padding: 0 1rem;
    }    
    .navbar-logo{
        font-size: 1.2rem;
    }
    .navbar-container .navbar-menu li a {
        font-size: 1.2rem;
        padding: 3px 15px;
    }
}


section{
  border-radius: 10px;
}


/* Hero Section */
.hero {
  position: relative;
  height: 90vh;
  background: url('https://ksg.ac.ke/wp-content/uploads/2022/12/Our-history-profile-page.png') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  background-color: rgba(0, 0, 0, 0.5); /* Dark overlay for text visibility */
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  color: var(--ksg-white);
  text-align: center;
  padding: 0 1rem;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--ksg-white);
}

.hero-content p {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--ksg-white);
}

@media (max-width: 768px) {
  .hero {
    height: 70vh;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
}

/* About Section */
.about {
  padding: 4rem 1rem;
  background-color: var(--ksg-white);
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.about-image {
  flex: 1 1 45%;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 4px solid var(--ksg-green);
}

.about-text {
  flex: 1 1 50%;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--ksg-green);
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--ksg-black);
}

.about-text ul {
  list-style: none;
  padding-left: 0;
}

.about-text ul li {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: var(--ksg-black);
}

.about-text ul li::before {
  content: "•";
  color: var(--ksg-red);
  font-weight: bold;
  margin-right: 0.5rem;
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
  }
  .about-text h2 {
    text-align: center;
  }
}


/* Publications Section */
.publications {
  padding: 4rem 1rem;
  background-color: var(--ksg-white);
  text-align: center;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--ksg-green);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--ksg-black);
  margin-bottom: 2rem;
}

.publication-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.publication-card {
  background-color: var(--ksg-white);
  border: 1px solid #ddd;
  border-top: 4px solid var(--ksg-red);
  border-radius: 8px;
  overflow: hidden;
  padding-bottom: 1rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.publication-card:hover {
  transform: translateY(-5px);
}

.publication-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.publication-card h3 {
  font-size: 1.2rem;
  color: var(--ksg-green);
  margin: 1rem;
}

.publication-card p {
  font-size: 0.95rem;
  color: var(--ksg-black);
  margin: 0 1rem 1rem;
  flex-grow: 1;
}

.publication-card a {
  color: var(--ksg-red);
  font-weight: 600;
  text-decoration: none;
  margin: 0 1rem;
}

.publication-card a:hover {
  text-decoration: underline;
}

.view-all {
  margin-top: 2rem;
}

.view-all a {
  color: var(--ksg-green);
  font-weight: 700;
  text-decoration: none;
}

.view-all a:hover {
  text-decoration: underline;
}


/* Team Section */
.team {
  padding: 4rem 1rem;
  background-color: #e2e0e060;
  text-align: center;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.team-card {
  background-color: var(--ksg-white);
  border: 1px solid #ddd;
  border-top: 4px solid var(--ksg-green);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.team-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 3px solid var(--ksg-red);
}

.team-card h3 {
  color: var(--ksg-green);
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.team-card .role {
  color: var(--ksg-red);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.team-card p {
  font-size: 0.9rem;
  color: var(--ksg-black);
  line-height: 1.4;
}


/* Contact Us Section */
.contact {
  padding: 4rem 1rem;
  background-color: #e2e0e060;
}

.contact-container {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.contact-form, .contact-info {
  flex: 1 1 45%;
  background-color: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.contact-form form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 1rem;
}

label {
  font-weight: 600;
  margin-bottom: 0.3rem;
  display: block;
}

input, textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 0.95rem;
}

button, .submit{
  background-color: var(--ksg-green);
  color: var(--ksg-white);
  padding: 0.8rem;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover{
  background-color: var(--ksg-green);
}

.submit:hover {
  background-color: var(--ksg-red);
}

.contact-info h3 {
  color: var(--ksg-green);
  margin-top: 1rem;
}

.contact-info p {
  margin-bottom: 1rem;
  color: var(--ksg-black);
}

.map iframe {
  border-radius: 5px;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .contact-container {
    flex-direction: column;
  }
}

/* Footer Section */
.footer {
  background-color: var(--ksg-black);
  color: var(--ksg-white);
  padding-top: 3rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 0 1rem;
}

.footer-logo, .footer-links, .footer-contact {
  flex: 1 1 250px;
}

.footer-logo img {
  height: 50px;
  margin-bottom: 1rem;
}

.footer-logo p {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #ccc;
}

.footer-links h3,
.footer-contact h3 {
  color: var(--ksg-green);
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li {
  margin-bottom: 0.5rem;
}

.footer-links ul li a {
  color: var(--ksg-white);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-links ul li a:hover {
  color: var(--ksg-red);
}

.footer-contact p {
  font-size: 0.95rem;
  color: #ccc;
}

.social-icons a img {
  width: 24px;
  height: 24px;
  margin-right: 0.5rem;
  transition: transform 0.3s ease;
}

.social-icons a img:hover {
  transform: scale(1.1);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #333;
  padding: 1rem;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #aaa;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .social-icons {
    justify-content: center;
    display: flex;
  }
}

