.news {
  // Main container
  &-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--spacing-xl);
    position: relative;
  }

  // Header section
  &-header {
    margin-bottom: var(--spacing-xxl);
    position: relative;
    border-left: 5px solid var(--primary-color);
    padding-left: var(--spacing-lg);

    h1 {
      font-size: 3rem;
      font-weight: 700;
      color: var(--white);
      margin-bottom: var(--spacing-sm);
      letter-spacing: -0.5px;
      position: relative;
      display: inline-block;
      
      &::after {
        content: '';
        position: absolute;
        bottom: -8px;
        left: 0;
        width: 60px;
        height: 4px;
        background-color: var(--primary-color);
        border-radius: var(--border-radius-sm);
      }
    }

    p {
      color: var(--light-gray);
      font-size: 1.2rem;
      max-width: 80%;
    }
  }

  // News grid for index page
  &-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);

    @media (max-width: var(--breakpoint-lg)) {
      grid-template-columns: repeat(2, 1fr);
    }

    @media (max-width: var(--breakpoint-md)) {
      grid-template-columns: 1fr;
    }
  }

  // News card component
  &-card {
    background-color: var(--dark-gray-lighter);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    position: relative;

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 3px;
      background: linear-gradient(90deg, var(--primary-color), var(--info));
      opacity: 0;
      transition: var(--transition-base);
    }

    &:hover {
      transform: translateY(-8px);
      box-shadow: var(--box-shadow-lg);
      border-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
      
      &::before {
        opacity: 1;
      }
    }

    &-image {
      width: 100%;
      height: 220px;
      object-fit: cover;
      transition: var(--transition-base);

      &-placeholder {
        width: 100%;
        height: 220px;
        background: linear-gradient(135deg, var(--dark-gray-lightest), var(--dark-gray-lighter));
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--mid-gray);
        transition: var(--transition-base);
      }
    }

    &:hover &-image {
      filter: brightness(1.1);
    }

    &-content {
      padding: var(--spacing-lg);
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      position: relative;
    }

    &-title {
      font-size: 1.4rem;
      font-weight: 600;
      margin-bottom: var(--spacing-md);
      color: var(--white);
      line-height: 1.3;

      a {
        color: inherit;
        text-decoration: none;
        transition: var(--transition-base);
        background-image: linear-gradient(transparent 97%, var(--primary-color) 3%);
        background-repeat: no-repeat;
        background-size: 0% 100%;
        transition: background-size 0.3s;

        &:hover {
          color: var(--primary-color);
          background-size: 100% 100%;
        }
      }
    }

    &-description {
      color: var(--lighter-gray);
      margin-bottom: var(--spacing-lg);
      line-height: var(--line-height-base);
      flex-grow: 1;
      font-size: 1rem;
    }

    &-meta {
      display: flex;
      justify-content: space-between;
      color: var(--light-gray);
      font-size: 0.875rem;
      border-top: 1px solid color-mix(in srgb, var(--primary-color) 10%, transparent);
      padding-top: var(--spacing-md);

      span {
        display: flex;
        align-items: center;

        i,
        svg {
          margin-right: var(--spacing-xs);
          color: var(--primary-color);
        }
      }
    }
  }

  // Article page styles
  &-article {
    background-color: var(--dark-gray-lighter);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow-md);
    border: 1px solid color-mix(in srgb, var(--primary-color) 10%, transparent);
    position: relative;
    
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 4px;
      background: linear-gradient(90deg, var(--primary-color), var(--info));
    }

    &-header {
      padding: var(--spacing-xl);
      border-bottom: 1px solid color-mix(in srgb, var(--primary-color) 15%, transparent);
      background-color: color-mix(in srgb, var(--dark-gray-lightest) 50%, transparent);
    }

    &-title {
      font-size: 2.8rem;
      font-weight: 700;
      margin-bottom: var(--spacing-lg);
      color: var(--white);
      line-height: 1.2;
      letter-spacing: -0.5px;
    }

    &-meta {
      display: flex;
      flex-wrap: wrap;
      gap: var(--spacing-md);
      color: var(--light-gray);
      font-size: 1rem;
      padding-bottom: var(--spacing-sm);

      span {
        display: flex;
        align-items: center;
        background-color: color-mix(in srgb, var(--dark-gray-lighter) 50%, transparent);
        padding: var(--spacing-xs) var(--spacing-sm);
        border-radius: var(--border-radius-lg);
        border: 1px solid color-mix(in srgb, var(--primary-color) 10%, transparent);

        i,
        svg {
          margin-right: var(--spacing-xs);
          color: var(--primary-color);
        }
      }
    }

    &-image {
      width: 100%;
      height: auto;
      max-height: 500px;
      object-fit: cover;
      border-bottom: 4px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
    }

    &-content {
      padding: var(--spacing-xl);
      color: var(--lighter-gray);
      line-height: 1.9;
      font-size: 1.05rem;

      p {
        margin-bottom: var(--spacing-lg);
      }

      h2 {
        color: var(--white);
        font-size: 1.85rem;
        margin-top: var(--spacing-xl);
        margin-bottom: var(--spacing-md);
        padding-bottom: var(--spacing-xs);
        border-bottom: 2px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
      }

      h3 {
        color: var(--white);
        font-size: 1.55rem;
        margin-top: var(--spacing-lg);
        margin-bottom: var(--spacing-md);
        position: relative;
        padding-left: var(--spacing-md);
        
        &::before {
          content: '';
          position: absolute;
          left: 0;
          top: 8px;
          bottom: 8px;
          width: 3px;
          background-color: var(--primary-color);
          border-radius: var(--border-radius-sm);
        }
      }

      ul,
      ol {
        margin-bottom: var(--spacing-lg);
        padding-left: var(--spacing-xl);
      }

      li {
        margin-bottom: var(--spacing-sm);
      }

      a {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 500;
        transition: var(--transition-base);

        &:hover {
          background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
        }
      }

      blockquote {
        border-left: 4px solid var(--primary-color);
        padding: var(--spacing-lg) var(--spacing-xl);
        margin: var(--spacing-xl) 0;
        background-color: color-mix(in srgb, var(--dark-gray-lightest) 50%, transparent);
        font-style: italic;
        border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
        position: relative;
        
        &::before {
          content: '"';
          position: absolute;
          top: 10px;
          left: 14px;
          font-size: 2.5rem;
          color: color-mix(in srgb, var(--primary-color) 30%, transparent);
          font-family: Georgia, serif;
        }
      }

      pre,
      code {
        background-color: var(--dark-gray-lightest);
        padding: var(--spacing-xs) var(--spacing-sm);
        border-radius: var(--border-radius-sm);
        font-family: monospace;
        border: 1px solid color-mix(in srgb, var(--primary-color) 10%, transparent);
      }

      pre {
        padding: var(--spacing-md);
        margin: var(--spacing-lg) 0;
        overflow-x: auto;
      }
    }
  }

  // Related news section
  &-related {
    margin-top: var(--spacing-xxl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid color-mix(in srgb, var(--primary-color) 15%, transparent);
    position: relative;
    
    &::before {
      content: '';
      position: absolute;
      top: -1px;
      left: 0;
      width: 100px;
      height: 3px;
      background-color: var(--primary-color);
    }

    &-title {
      font-size: 1.75rem;
      font-weight: 600;
      margin-bottom: var(--spacing-lg);
      color: var(--white);
      position: relative;
      display: inline-block;
      padding-bottom: var(--spacing-xs);
      
      &::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 50%;
        height: 3px;
        background-color: var(--primary-color);
        border-radius: var(--border-radius-sm);
      }
    }

    &-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: var(--spacing-lg);

      @media (max-width: var(--breakpoint-md)) {
        grid-template-columns: 1fr;
      }
    }
  }

  // Pagination
  &-pagination {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-xxl);

    .pagination {
      display: flex;
      list-style: none;
      padding: 0;
      margin: 0;

      li {
        margin: 0 var(--spacing-xs);

        a,
        span {
          display: flex;
          align-items: center;
          justify-content: center;
          width: 40px;
          height: 40px;
          border-radius: var(--border-radius-md);
          background-color: var(--dark-gray-lighter);
          color: var(--white);
          text-decoration: none;
          transition: var(--transition-base);
          border: 1px solid transparent;
        }

        &.active span {
          background-color: var(--primary-color);
          box-shadow: 0 0 10px color-mix(in srgb, var(--primary-color) 50%, transparent);
        }

        a:hover {
          background-color: var(--dark-gray-lightest);
          border-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
          transform: translateY(-2px);
        }

        &.disabled span {
          color: var(--mid-gray);
          cursor: not-allowed;
        }
      }
    }
  }
  
  // Adding a "back to top" button
  &-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    cursor: pointer;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--black) 25%, transparent);
    transition: var(--transition-base);
    opacity: 0;
    transform: translateY(20px);
    z-index: 100;
    
    &.visible {
      opacity: 1;
      transform: translateY(0);
    }
    
    &:hover {
      background-color: var(--primary-dark);
      transform: translateY(-5px);
    }
    
    svg {
      width: 20px;
      height: 20px;
    }
  }
}

// Additional utility classes
.hover-shadow {
  transition: var(--transition-base);
  
  &:hover {
    box-shadow: 0 8px 24px color-mix(in srgb, var(--black) 20%, transparent);
  }
}

// Animated button for "Back to News"
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  z-index: 1;
  
  &::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: color-mix(in srgb, var(--white) 10%, transparent);
    transition: all 0.4s cubic-bezier(0.42, 0, 0.58, 1);
    z-index: -1;
  }
  
  &:hover::before {
    width: 100%;
  }
}