/* css/styles.css */

/* ================ Vigezo na Reset ================ */
:root {
    --primary: #1A3E72;
    --secondary: #F9D423;
    --light: #FFFFFF;
    --dark: #000000;
    --bg: #FFFFFF;
    --text: #333333;
    --card-bg: #F8F9FA;
}

[data-theme="dark"] {
    --primary: #0D2B52;
    --secondary: #FFD700;
    --bg: #121212;
    --text: #F0F0F0;
    --card-bg: #1E1E1E;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background 0.3s, color 0.3s;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}


/* ================ Kichwa ================ */
header {
    background: var(--primary);
    color: var(--light);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
    z-index: 101;
}

/* ================ Navigation ================ */
.navbar-toggler {
    display: none;
    background: transparent;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 101;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    outline: none;
}

nav {
    display: flex;
    gap: 1.0rem;
    transition: all 0.3s ease;
}

nav a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    padding: 0.5rem 0;
}

nav a:hover {
    color: var(--secondary);
}

/* ================ Kadi za Habari ================ */
.news-card {
    /*border: 1px solid #eee;
    border-radius: 8px;*/
    overflow: hidden;
    margin-bottom: 2rem;
    background: var(--card-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.featured-news {
    grid-column: 1 / -1;
}

.featured-news .news-card {
    display: flex;
    flex-direction: column;
}

.featured-news img {
    height: 460px;
    width: 100%;
    object-fit: cover;
}

.featured-news .news-content {
    padding: 1rem;
}

.featured-news h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.featured-news p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.regular-news img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.news-content {
    padding: 0.3rem;
}

.news-content h3 {
    color: var(--primary);
    margin-bottom: 0.7rem;
    font-size: 1.1rem;
}

.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem 1.5rem;
}

.btn {
    display: inline-block;
    background: var(--secondary);
    color: var(--primary);
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* ================ Vifungo vya Shiriki ================ */
/*.article-social {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.article-social span {
    color: var(--text);
    font-size: 0.9rem;
}

.article-social a {
    color: var(--primary);
    font-size: 1.2rem;
    transition: 0.3s;
}

.article-social a:hover {
    color: var(--secondary);
    transform: translateY(-2px);
}

/* ================ Grid ya Habari ================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.0rem;
    margin: 1rem 0;
}

/* ================ Modal ================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    position: relative;
    color: var(--text);
}

.social-share {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.social-share a {
    color: var(--primary);
    font-size: 1.5rem;
    margin: 0 0.8rem;
    transition: 0.3s;
    display: inline-block;
}

.social-share a:hover {
    color: var(--secondary);
    transform: translateY(-3px);
}

/* ================ Vifungo vya Ziada ================ */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: var(--light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 99;
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--secondary);
    color: var(--primary);
    transform: translateY(-5px);
}

.theme-toggle {
    position: fixed;
    left: 20px;
    bottom: 20px;
    background: var(--primary);
    color: var(--light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 99;
    border: none;
    font-size: 1.2rem;
}

/* ================ Footer ================ */
footer {
    background: var(--primary);
    color: var(--light);
    padding: 3rem 0 0;
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: var(--light);
    text-decoration: none;
    transition: 0.3s;
}

.footer-section a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact i {
    color: var(--secondary);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.footer-links a {
    color: var(--light);
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--secondary);
}

/* ================ Responsive Design ================ */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar-toggler {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateY(-100%);
        opacity: 0;
        z-index: 100;
    }
    
    nav.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .featured-news img {
        height: 300px;
    }
    
    .featured-news h3 {
        font-size: 1.5rem;
    }
    
    .modal-content {
        margin: 2% auto;
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .logo {
        font-size: 1.5rem;
    }
    
    .navbar-toggler {
        font-size: 1.3rem;
    }
    
    .header-container {
        padding: 0.5rem 0;
    }
    
    .featured-news img {
        height: 250px;
    }
    
    .featured-news .news-content {
        padding: 1.5rem;
    }
    
    .featured-news h3 {
        font-size: 1.3rem;
    }
    
    .featured-news p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .article-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        width: 95%;
        padding: 0 10px;
    }
}

   /* Style za logo - sasa haina mstari chini */
        .logo {
            display: inline-block;
            text-decoration: none;
        
        }
    
    /*SEHEMU YA KUHUSU SISI*/
            .about-section {
    padding: 4rem 1rem;
    background-color: #f9fafb;
    text-align: center;
}
.section-title {
    font-size: 2rem;
    color: #2d2d2d;
    margin-bottom: 1rem;
}
.section-intro {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 2rem auto;
    color: #555;
}
.about-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.about-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
    max-width: 300px;
}
.about-card i {
    color: #2e8b57;
    margin-bottom: 1rem;
}
.founder-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    justify-content: center;
}
.founder-image {
    width: 120px;
    border-radius: 50%;
}
/*MWISHO WAKE*/

/* CSS YA 3 GRID HABARI */
.three-column-news {
  padding: 3rem 1rem;
  background-color: #f8f8f8;
}
.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #2c2c2c;
}
.news-layout {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
}
.news-side,
.news-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
article {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(0,0,0,0.05);
}
article img {
  width: 100%;
  border-radius: 6px;
}
.summary {
  font-size: 0.95rem;
  color: #333;
}
.full-content {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #444;
}
.toggle-btn {
  margin-top: 0.5rem;
  background-color: #2e8b57;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 5px;
  cursor: pointer;
}
.toggle-btn:hover {
  background-color: #246c43;
}




.read-button {
  margin-top: 0.5rem;
  background-color: #2e8b57;
  color: white;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 5px;
  font-size: 0.9rem;
  cursor: pointer;
}
.read-button:hover {
  background-color: #256d45;
}
.full-article {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: #333;
  animation: fadeIn 0.3s ease-in;
}
.date {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #2e8b57;
}
.social-icons {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}
.social-icons i {
  font-size: 1.2rem;
  color: #2e8b57;
  cursor: pointer;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}
.modal-content {
  background: #fff;
  padding: 2rem;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  position: relative;
  animation: fadeIn 0.3s ease;
}
.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.8rem;
  cursor: pointer;
  color: #2e8b57;
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}


/* Simu ndogo – chini ya 768px */
@media (max-width: 768px) {
  .news-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .news-side,
  .news-main {
    width: 100%;
  }

  article img {
    height: auto;
  }

  .modal-content {
    width: 95%;
    padding: 1.5rem;
  }

  .read-button {
    width: 100%;
  }
}

/* Tablet au laptops ndogo – 769px hadi 1024px */
@media (max-width: 1024px) {
  .news-layout {
    grid-template-columns: 1fr 1fr;
  }

  .news-main {
    order: -1; /* Habari kuu iwe juu */
  }

  .news-side {
    width: 100%;
  }
}

/* Simu za wima (orientation) */
@media (orientation: portrait) {
  .section-title {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.1rem;
  }
}

/* Muundo wa awali kwa desktop */
.news-layout {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
}
.article-preview {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}
.article-preview h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.article-preview img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.read-button {
  background-color: #2e8b57;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 5px;
  cursor: pointer;
}
.read-button:hover {
  background-color: #256d45;
}


/* 📱 Simu ndogo: layout ya safu moja */
@media (max-width: 768px) {
  .news-layout {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .article-preview img {
    height: auto;
  }

  .read-button {
    width: 100%;
  }

  .modal-content {
    width: 95%;
    padding: 1.2rem;
  }

  h2.section-title {
    font-size: 1.5rem;
    text-align: center;
  }
}


/* 📲 Tablets: layout ya safu mbili, habari kuu juu */
@media (min-width: 769px) and (max-width: 1024px) {
  .news-layout {
    grid-template-columns: 1fr 1fr;
  }

  .news-main {
    order: -1;
  }

  .read-button {
    width: auto;
  }

  .modal-content {
    width: 90%;
    padding: 1.5rem;
  }
}
/* MWISHO WA GRID */
.sports-hero {
  text-align: center;
  padding: 10px 10px;
  background: linear-gradient(to right, #006400, #228B22);
  color: white;
  border-radius: 0 0 40px 40px;
}

.sports-hero h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.social-wall {
  position: fixed;
  top: 30%;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

.social-wall a {
  font-size: 22px;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.social-wall a:hover {
  transform: scale(1.1);
}

.social-wall a:nth-child(1) { background-color: #1877F2; }   /* Facebook */
.social-wall a:nth-child(2) { background-color: #25D366; }   /* WhatsApp */
.social-wall a:nth-child(3) { background-color: #1DA1F2; }   /* Twitter */
.social-wall a:nth-child(4) { background-color: #E1306C; }   /* Instagram */.

/* Hii niyakupunguza nakuondoa social media za kwenye ukuta, kwenye vifa vidogo */
@media (max-width: 600px) {
  .social-wall {
    display: none;
  }
/* Mwisho */

.tech-hero {
    background: linear-gradient(135deg, #006400, #003366);
    color: white;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1rem;
    border-radius: 0 0 30px 30px;
}

.tech-hero h1 {
    font-size: 2.5rem;
}
        .tech-hero p {
            font-size: 1.2rem;
            max-width: 900px;
            margin: 0 auto;
        }

        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.8);
            z-index: 9999;
            overflow-y: auto;
        }

        .modal-content {
            background: white;
            margin: 5% auto;
            padding: 20px;
            width: 80%;
            max-width: 800px;
            border-radius: 10px;
            position: relative;
        }

        .close {
            position: absolute;
            top: 10px;
            right: 20px;
            font-size: 2rem;
            cursor: pointer;
        }

        .article-date {
            display: block;
            color: #888;
            font-size: 0.9rem;
            margin-bottom: 10px;
        }