/* ==========================================
   1. OUR CLIENTS SECTION (Clean Floating Layout)
   ========================================== */
.clients-wrapper {
    background-color: #f4f5f7; /* Light gray background container matching the image */
    border-radius: 24px;       /* Smooth, large rounded corners */
    padding: 50px 40px;
    border: none;              /* Removed outer rigid borders */
    box-shadow: none;

    /* ==========================================
       FIX: Page Alignment & Edge Padding
       ========================================== */
    max-width: 1500px;         /* Limits width to align perfectly with your news grid */
    margin: 0 auto 60px auto;  /* Centers the card horizontally and keeps the bottom gap */
    width: calc(100% - 32px);  /* Prevents the card from touching the screen corners on mobile */
}

/* Flexbox allows logos to scale naturally and center beautifully on any row */
.logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 35px 55px;            /* Generous spacing: 35px vertical, 55px horizontal */
    max-width: 100%;           /* Inherits the wrapper's boundaries smoothly */
    margin: 0 auto;
}

/* Stripped down: No backgrounds, no borders, no inner padding boxes */
.logo-item {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease-in-out;
}

.logo-item:hover {
    transform: scale(1.06);    /* Clean, elegant hover pop without moving boxes */
}

/* Increased max limits so your logos can use up all available breathing room */
.logo-item img {
    max-width: 165px;          
    max-height: 65px;          
    width: auto;
    height: auto;
    object-fit: contain;
    filter: none;              /* Displays original, vivid brand colors directly */
}

/* --- SECTION HEADERS --- */
.section-headerc {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 16px;           /* Prevents text from touching edge boundaries on small screens */
}

.section-headerc h2 {
    font-size: 2.2rem;
    color: #111827;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.section-headerc p {
    color: #6b7280;
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}


    /* Header Styles */
    .header {
      position: sticky;
      top: 0;
      z-index: 50;
      background-color: var(--background);
      border-bottom: 1px solid var(--border);
    }

    .header-content {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 64px;
    }

    @media (min-width: 1024px) {
      .header-content {
        height: 80px;
      }
    }

    .logo {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-decoration: none;
    }

    .logo-icon {
      width: 32px;
      height: 32px;
      background: var(--gradient-primary);
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
    }

    @media (min-width: 1024px) {
      .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
      }
    }

    .logo-text {
      font-size: 8px;
      font-weight: 600;
      background: var(--gradient-primary);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      margin-top: 2px;
    }

    @media (min-width: 1024px) {
      .logo-text {
        font-size: 10px;
      }
    }

    .logo-subtext {
      font-size: 6px;
      color: var(--muted-foreground);
    }

    @media (min-width: 1024px) {
      .logo-subtext {
        font-size: 8px;
      }
    }




    /* News Categories */
    .news-categories {
      display: flex;
      justify-content: center;
      gap: 12px;
      flex-wrap: wrap;
      padding: 32px 0;
      border-bottom: 1px solid var(--border);
    }

    .category-btn {
      padding: 8px 20px;
      border-radius: 50px;
      font-size: 14px;
      font-weight: 500;
      border: 1px solid var(--border);
      background: var(--background);
      color: var(--muted-foreground);
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .category-btn:hover,
    .category-btn.active {
      background: var(--gradient-primary);
      color: white;
      border-color: transparent;
      transform: translateY(-2px);
      box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
    }

    /* News Grid */
    .news-section {
      padding: 60px 0;
    }

    .news-grid {
      display: grid;
      gap: 32px;
    }

    @media (min-width: 768px) {
      .news-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    @media (min-width: 1024px) {
      .news-grid {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    /* Featured Article */
    .featured-article {
      grid-column: 1 / -1;
      display: grid;
      gap: 32px;
      padding: 32px;
      background: var(--muted);
      border-radius: 16px;
      margin-bottom: 32px;
      position: relative;
      overflow: hidden;
    }

    @media (min-width: 768px) {
      .featured-article {
        grid-template-columns: 1fr 1fr;
        align-items: center;
      }
    }

    .featured-article::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 4px;
      height: 100%;
      background: var(--gradient-primary);
    }

    .featured-image {
      width: 100%;
      height: 300px;
      object-fit: cover;
      border-radius: 12px;
    }

    .featured-badge {
      display: inline-block;
      padding: 4px 12px;
      background: var(--gradient-primary);
      color: white;
      font-size: 12px;
      font-weight: 600;
      border-radius: 50px;
      margin-bottom: 16px;
    }

    .featured-content h2 {
      font-size: 1.75rem;
      font-weight: 700;
      margin-bottom: 16px;
      color: var(--foreground);
    }

    .featured-content p {
      color: var(--muted-foreground);
      margin-bottom: 24px;
      line-height: 1.7;
    }

    .featured-meta {
      display: flex;
      align-items: center;
      gap: 16px;
      font-size: 14px;
      color: var(--muted-foreground);
    }

    .featured-meta span {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    /* News Card */
    
    /* ==========================================
       NEW: News Grid Container
       ========================================== */
    .news-grid {
      display: grid;
      /* Automatically flows cards into columns (min 300px wide) based on screen space */
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 30px;
      width: 100%;
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px 0;
    }

    /* MAGIC TRICK: If there is ONLY ONE news card inside the grid,
       stop it from stretching full-width and perfectly center it.
    */
    .news-card:only-child {
      grid-column: 1 / -1;   /* Spans the available track workspace */
      justify-self: center;  /* Centers the card horizontally */
      max-width: 420px;      /* Prevents a single card from looking awkwardly massive */
      width: 100%;
    }
    
    .news-card {
      background: var(--background);
      border: 1px solid var(--border);
      border-radius: 0px;
      overflow: hidden;
      transition: all 0.3s ease;
      opacity: 0;
      transform: translateY(30px);
    }

    .news-card.animate {
      opacity: 1;
      transform: translateY(0);
    }

    .news-card:hover {
      transform: translateY(-8px);
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
      border-color: var(--primary);
    }

    .news-card-image {
      width: 100%;
      height: 200px;
      object-fit: cover;
      transition: transform 0.5s ease;
    }

    .news-card:hover .news-card-image {
      transform: scale(1.05);
    }

    .news-card-image-wrapper {
      overflow: hidden;
      position: relative;
    }

    .news-card-category {
      position: absolute;
      top: 12px;
      left: 12px;
      padding: 4px 12px;
      background: rgba(255, 255, 255, 0.95);
      color: var(--primary);
      font-size: 11px;
      font-weight: 600;
      border-radius: 50px;
      text-transform: uppercase;
    }

    .news-card-content {
      padding: 24px;
    }

    .news-card-date {
      font-size: 13px;
      color: var(--muted-foreground);
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .news-card-title {
      font-size: 1.125rem;
      font-weight: 600;
      margin-bottom: 12px;
      color: var(--foreground);
      line-height: 1.4;
      transition: color 0.2s;
    }

    .news-card:hover .news-card-title {
      color: var(--primary);
    }

    .news-card-excerpt {
      font-size: 14px;
      color: var(--muted-foreground);
      line-height: 1.6;
      margin-bottom: 16px;
    }

    .news-card-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 14px;
      font-weight: 500;
      color: var(--primary);
      text-decoration: none;
      transition: gap 0.2s;
    }

    .news-card-link:hover {
      gap: 10px;
    }

    .news-card-link svg {
      width: 16px;
      height: 16px;
      transition: transform 0.2s;
    }

    .news-card:hover .news-card-link svg {
      transform: translateX(4px);
    }

    /* Newsletter Section */
    .newsletter-section {
      background: var(--gradient-dark);
      padding: 80px 0;
      position: relative;
      overflow: hidden;
    }

    .newsletter-section::before {
      content: '';
      position: absolute;
      top: -50%;
      right: -10%;
      width: 400px;
      height: 400px;
      background: var(--secondary);
      border-radius: 50%;
      opacity: 0.1;
      filter: blur(100px);
    }

    .newsletter-content {
      text-align: center;
      max-width: 600px;
      margin: 0 auto;
      position: relative;
    }

    .newsletter-content h2 {
      font-size: 2rem;
      font-weight: 700;
      color: var(--hero-foreground);
      margin-bottom: 16px;
    }

    .newsletter-content p {
      color: var(--muted-foreground);
      margin-bottom: 32px;
    }

    .newsletter-form {
      display: flex;
      gap: 12px;
      max-width: 450px;
      margin: 0 auto;
      flex-direction: column;
    }

    @media (min-width: 640px) {
      .newsletter-form {
        flex-direction: row;
      }
    }

    .newsletter-input {
      flex: 1;
      padding: 14px 20px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.05);
      color: var(--hero-foreground);
      font-size: 14px;
      transition: border-color 0.2s, background 0.2s;
    }

    .newsletter-input::placeholder {
      color: var(--muted-foreground);
    }

    .newsletter-input:focus {
      outline: none;
      border-color: var(--primary);
      background: rgba(255, 255, 255, 0.1);
    }

    .newsletter-btn {
      padding: 14px 28px;
      background: var(--gradient-primary);
      color: white;
      border: none;
      border-radius: 8px;
      font-weight: 500;
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s;
    }

    .newsletter-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
    }

    /* Pagination */
    .pagination {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
      margin-top: 48px;
    }

    .pagination-btn {
      padding: 10px 16px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--background);
      color: var(--foreground);
      font-size: 14px;
      cursor: pointer;
      transition: all 0.2s;
    }

    .pagination-btn:hover:not(:disabled) {
      background: var(--gradient-primary);
      color: white;
      border-color: transparent;
    }

    .pagination-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .pagination-number {
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      border: 1px solid var(--border);
      background: var(--background);
      color: var(--foreground);
      cursor: pointer;
      transition: all 0.2s;
    }

    .pagination-number:hover,
    .pagination-number.active {
      background: var(--gradient-primary);
      color: white;
      border-color: transparent;
    }

   
    /* Scroll Progress */
    .scroll-progress {
      position: fixed;
      top: 0;
      left: 0;
      width: 0%;
      height: 3px;
      background: var(--gradient-primary);
      z-index: 1000;
      transition: width 0.1s;
    }

    /* Back to Top */
    .back-to-top {
      position: fixed;
      bottom: 30px;
      right: 30px;
      width: 50px;
      height: 50px;
      background: var(--gradient-primary);
      color: white;
      border: none;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
      box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
      z-index: 99;
    }

    .back-to-top.visible {
      opacity: 1;
      visibility: visible;
    }

    .back-to-top:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 30px rgba(59, 130, 246, 0.5);
    }

    .back-to-top svg {
      width: 24px;
      height: 24px;
    }

    /* Animations */
    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .animate-on-scroll {
      opacity: 0;
      transform: translateY(30px);
      transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .animate-on-scroll.animate {
      opacity: 1;
      transform: translateY(0);
    }