// Hero Section
.hero-section {
  background-color: var(--dark-gray-lighter);
  background-image: linear-gradient(
      to bottom,
      color-mix(in srgb, var(--dark-gray) 80%, transparent) 50%,
      color-mix(in srgb, var(--primary-color) 70%, transparent) 100%
    ),
    url("/images/hero-bg.png");
  background-size: cover;
  background-position: center;
  padding: var(--spacing-xxl) 0;
  position: relative;

  @media (max-width: var(--breakpoint-md)) {
    padding: var(--spacing-xl) 0;
  }

  @media (max-width: var(--breakpoint-sm)) {
    padding: var(--spacing-lg) 0;
  }

  .hero-content {
    text-align: center;
    margin-bottom: var(--spacing-xl);

    h1 {
      font-size: 3rem;
      font-weight: 700;
      margin-bottom: var(--spacing-md);
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);

      span {
        color: var(--primary-color);
      }

      @media (max-width: var(--breakpoint-md)) {
        font-size: 2.5rem;
      }

      @media (max-width: var(--breakpoint-sm)) {
        font-size: 2rem;
      }
    }

    p {
      font-size: 1.25rem;
      margin-bottom: var(--spacing-lg);
      max-width: 700px;
      margin-left: auto;
      margin-right: auto;

      @media (max-width: var(--breakpoint-md)) {
        font-size: 1.125rem;
      }

      @media (max-width: var(--breakpoint-sm)) {
        font-size: 1rem;
      }
    }

    .hero-buttons {
      display: flex;
      justify-content: center;
      gap: var(--spacing-md);

      @media (max-width: var(--breakpoint-sm)) {
        flex-direction: column;
        align-items: center;

        .btn {
          width: 100%;
          max-width: 240px;
        }
      }
    }
  }

  .server-stats {
    display: flex;
    justify-content: center;
    gap: calc(var(--spacing-xl) * 2);

    @media (max-width: var(--breakpoint-md)) {
      gap: var(--spacing-xl);
    }

    @media (max-width: var(--breakpoint-sm)) {
      flex-direction: column;
      align-items: center;
      gap: var(--spacing-md);
    }

    .stat-item {
      text-align: center;

      .stat-value {
        display: block;
        font-size: 2.5rem;
        font-weight: 700;
        color: var(--primary-color);

        @media (max-width: var(--breakpoint-md)) {
          font-size: 2rem;
        }

        @media (max-width: var(--breakpoint-sm)) {
          font-size: 1.75rem;
        }
      }

      .stat-label {
        display: block;
        font-size: 1rem;
        color: var(--light-gray);
      }
    }
  }
}

// Section Title
.section-title {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xl);
  position: relative;

  &:after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: var(--spacing-sm) auto 0;
    border-radius: 2px;
  }

  @media (max-width: var(--breakpoint-md)) {
    font-size: 1.875rem;
  }
}

// Features Section
.features-section {
  padding: var(--spacing-xxl) 0;
  background-color: var(--dark-gray);

  @media (max-width: var(--breakpoint-md)) {
    padding: var(--spacing-xl) 0;
  }

  @media (max-width: var(--breakpoint-sm)) {
    padding: var(--spacing-lg) 0;
  }

  .features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);

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

    @media (max-width: var(--breakpoint-md)) {
      gap: var(--spacing-md);
    }

    @media (max-width: 768px) {
      grid-template-columns: repeat(2, 1fr);
      gap: var(--spacing-sm);
    }
  }

  .feature-card {
    background-color: var(--dark-gray-lighter);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: var(--transition-base);
    min-width: 0;

    @media (max-width: var(--breakpoint-sm)) {
      padding: var(--spacing-md) var(--spacing-sm);
    }

    &:hover {
      transform: translateY(-5px);
      box-shadow: var(--box-shadow-lg);

      @media (max-width: var(--breakpoint-sm)) {
        transform: none;
      }
    }

    .feature-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 80px;
      height: 80px;
      margin: 0 auto var(--spacing-md);
      background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
      border-radius: 50%;
      color: var(--primary-color);

      @media (max-width: var(--breakpoint-sm)) {
        width: 60px;
        height: 60px;
        margin-bottom: var(--spacing-sm);
      }

      svg,
      i {
        width: 40px;
        height: 40px;
        font-size: 40px;

        @media (max-width: var(--breakpoint-sm)) {
          width: 30px;
          height: 30px;
          font-size: 30px;
        }
      }
    }

    h3 {
      font-size: 1.25rem;
      margin-bottom: var(--spacing-sm);
      overflow-wrap: break-word;
      word-wrap: break-word;
      hyphens: auto;

      @media (max-width: var(--breakpoint-sm)) {
        font-size: 1.125rem;
      }
    }

    p {
      color: var(--light-gray);
      margin-bottom: 0;
      overflow-wrap: break-word;
      word-wrap: break-word;
      hyphens: auto;
      line-height: 1.6;

      @media (max-width: var(--breakpoint-sm)) {
        font-size: 0.938rem;
        line-height: 1.5;
      }
    }
  }
}


// Servers Section
.servers-section {
  padding: var(--spacing-xxl) 0;
  background-color: var(--dark-gray-lightest);

  @media (max-width: var(--breakpoint-md)) {
    padding: var(--spacing-xl) 0;
  }

  @media (max-width: var(--breakpoint-sm)) {
    padding: var(--spacing-lg) 0;
  }

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

    // Center single server card
    &:has(.server-card:only-child) {
      grid-template-columns: 1fr;
      max-width: 500px;
      margin: 0 auto;
    }

    @media (max-width: var(--breakpoint-lg)) {
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      justify-items: center;
    }

    @media (max-width: var(--breakpoint-md)) {
      grid-template-columns: 1fr;
      max-width: 500px;
      margin: 0 auto;
    }
  }

  .server-card {
    background-color: var(--dark-gray-lighter);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
    min-width: 0;

    @media (max-width: var(--breakpoint-lg)) {
      max-width: 400px;
      width: 100%;
    }

    &:hover {
      transform: translateY(-5px);
      box-shadow: var(--box-shadow-lg);
    }

    .server-header {
      padding: var(--spacing-md);
      background-color: var(--dark-gray);
      display: flex;
      justify-content: space-between;
      align-items: center;

      h3 {
        margin-bottom: 0;
        font-size: 1.125rem;
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
      }
    }

    .server-info {
      padding: var(--spacing-md);

      .info-item {
        display: flex;
        justify-content: space-between;
        margin-bottom: var(--spacing-sm);

        &:last-child {
          margin-bottom: 0;
        }

        .info-label {
          color: var(--light-gray);
        }

        .info-value {
          font-weight: 500;
          overflow-wrap: break-word;
          word-wrap: break-word;
          hyphens: auto;
        }
      }
    }

    .btn {
      border-top-left-radius: 0;
      border-top-right-radius: 0;
    }
  }
}

// Server Status
.server-status {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;

  &:before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: var(--spacing-xs);
  }

  &.online {
    color: var(--success);

    &:before {
      background-color: var(--success);
    }
  }

  &.offline {
    color: var(--danger);

    &:before {
      background-color: var(--danger);
    }
  }

  &.maintenance {
    color: var(--warning);

    &:before {
      background-color: var(--warning);
    }
  }
}

// News Section
.news-section {
  padding: var(--spacing-xxl) 0;
  background-color: var(--dark-gray);

  @media (max-width: var(--breakpoint-md)) {
    padding: var(--spacing-xl) 0;
  }

  @media (max-width: var(--breakpoint-sm)) {
    padding: var(--spacing-lg) 0;
  }

  .news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: 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;
      gap: var(--spacing-md);
      max-width: 100%;
      margin-left: 0;
      margin-right: 0;
    }

    @media (max-width: var(--breakpoint-sm)) {
      gap: var(--spacing-md);
    }
  }

  .news-card {
    background-color: var(--dark-gray-lighter);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
    min-width: 0;

    @media (max-width: var(--breakpoint-md)) {
      max-width: 100%;
    }

    &:hover {
      transform: translateY(-5px);
      box-shadow: var(--box-shadow-lg);

      .news-image img {
        transform: scale(1.05);
      }
    }

    .news-image {
      height: 200px;
      overflow: hidden;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
      }
    }

    .news-content {
      padding: var(--spacing-md);

      .news-date {
        display: block;
        font-size: 0.875rem;
        color: var(--light-gray);
        margin-bottom: var(--spacing-sm);
      }

      h3 {
        font-size: 1.25rem;
        margin-bottom: var(--spacing-sm);
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
      }

      p {
        color: var(--light-gray);
        margin-bottom: var(--spacing-sm);
        line-height: 1.5;
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
      }

      .read-more {
        display: inline-block;
        font-weight: 500;
        color: var(--primary-color);

        &:hover {
          color: var(--primary-light);
        }
      }
    }
  }

  .view-all-news {
    text-align: center;
  }
}

// CTA Section
.cta-section {
  padding: var(--spacing-xl) 0;
  background-color: var(--primary-color);
  background-image: linear-gradient(135deg, var(--primary-color), var(--primary-dark));

  @media (max-width: var(--breakpoint-md)) {
    padding: var(--spacing-xl) 0;
  }

  @media (max-width: var(--breakpoint-sm)) {
    padding: var(--spacing-lg) 0;
  }

  .cta-content {
    text-align: center;

    h2 {
      font-size: 2rem;
      font-weight: 600;
      margin-bottom: var(--spacing-md);
      color: var(--white);

      @media (max-width: var(--breakpoint-md)) {
        font-size: 1.75rem;
      }
    }

    p {
      font-size: 1.125rem;
      max-width: 600px;
      margin-left: auto;
      margin-right: auto;
      margin-bottom: var(--spacing-lg);
      color: color-mix(in srgb, var(--white) 90%, transparent);

      @media (max-width: var(--breakpoint-md)) {
        font-size: 1rem;
      }
    }

    .cta-buttons {
      display: flex;
      justify-content: center;
      gap: var(--spacing-md);

      .btn-primary {
        background-color: var(--white);
        color: var(--primary-color);

        &:hover {
          background-color: var(--lighter-gray);
        }
      }

      .btn-secondary {
        background-color: transparent;
        border-color: var(--white);

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

      @media (max-width: var(--breakpoint-sm)) {
        flex-direction: column;
        align-items: center;

        .btn {
          width: 100%;
          max-width: 240px;
        }
      }
    }
  }
}