@use "../../../styles/abstracts/mixins" as *;

$primary-dark: #003845;
$primary-light: rgba(0, 56, 69, 0.07);
$primary-overlay: rgba(0, 56, 69, 0.7);
$success: #2eab5b;
$success-light: #ecfdf5;
$danger: #ef4444;
$danger-light: #fee2e2;

.programPage {
  @include dashPageComponent;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: #f7f9fa;
  padding: 0;

  // Hero Banner
  .heroBanner {
    position: relative;
    width: 100%;
    max-height: 300px;
    margin: 1rem 2rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid $primary-light;
    box-shadow: 0 6px 20px rgba(0, 56, 69, 0.12);

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .overlay {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 1rem 2rem;
      background: linear-gradient(to top, $primary-overlay, transparent);
      color: #ffffff;

      h1 {
        font-size: 1.8rem;
        font-weight: 700;
        margin-bottom: 0.2rem;
      }

      p {
        font-size: 1rem;
        font-weight: 500;
        opacity: 0.9;
      }
    }

    @media (max-width: 768px) {
      max-height: 180px;
      .overlay {
        padding: 0.8rem 1rem;
        h1 {
          font-size: 1.3rem;
        }
        p {
          font-size: 0.85rem;
        }
      }
    }
  }

  // Notice Box
  .noticeBox {
    margin: 1rem 2rem;
    background: $success-light;
    border-left: 4px solid $success;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 12px rgba($success, 0.1);

    .noticeHeader {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      svg {
        color: $success;
      }
      h1 {
        font-size: 1rem;
        font-weight: 600;
        color: $primary-dark;
      }
    }

    .noticeBody {
      margin-top: 0.5rem;
      p {
        font-size: 0.92rem;
        color: $primary-dark;
        opacity: 0.9;
      }
    }

    @media (max-width: 768px) {
      margin: 1rem;
    }
  }

  // Stats Wrapper
  .statsWrapper {
    margin: 1rem 2rem 0 2rem;

    @media (max-width: 768px) {
      overflow-x: auto;
      padding-bottom: 1rem;
    }

    > * {
      transition: transform 0.2s ease, box-shadow 0.2s ease;
      &:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba($success, 0.15);
      }
    }
  }

  // Tabs
  .tabsWrapper {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 2rem;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid $primary-light;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 4px 12px rgba($primary-dark, 0.08);
    overflow-x: auto;

    &::-webkit-scrollbar {
      height: 6px;
    }
    &::-webkit-scrollbar-thumb {
      background: $primary-overlay;
      border-radius: 3px;
    }

    @media (max-width: 768px) {
      margin: 1rem;
    }
  }

  .tab {
    flex: 0 0 auto;
    cursor: pointer;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    color: $primary-dark;
    background: $primary-light;
    transition: all 0.2s ease;

    &:hover {
      background: $primary-overlay;
      color: #fff;
    }
  }

  .active {
    background: $success;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba($success, 0.25);
  }

  // Tab Content
  .tabContent {
    margin: 1rem 2rem;
    min-height: 300px;
    display: flex;
    flex-direction: column;

    @media (max-width: 768px) {
      margin: 1rem;
      padding: 1rem;
    }
  }
}
