/* =========================================================
    MOBILE: Up to 425px
  ========================================================= */
@media (max-width: 426px) {
  .header {
    background: linear-gradient(
      90deg,
      rgba(25, 0, 87, 0.7) 0%,
      rgba(64, 40, 121, 0.7) 50.48%,
      rgba(25, 0, 87, 0.7) 100%
    );
    border: 1px solid #7d68b3;
    border-radius: 72px;
    box-shadow: 0 0 20px 0 rgba(125, 104, 179, 0.2);
    height: 60px;
    margin: 0 8px;
    padding: 0 28px;
    width: 96%;
  }

  .logo img {
    height: 40px;
    width: 32px;
  }

  .nav {
    display: none;
  }

  .burger {
    display: block;
  }

  .mobile-menu {
    backdrop-filter: blur(24px);
    background: linear-gradient(
      90deg,
      rgba(25, 0, 87, 0.96) 0%,
      rgba(64, 40, 121, 0.96) 50.48%,
      rgba(25, 0, 87, 0.96) 100%
    );
    border: 1px solid #7d68b3;
    border-radius: 32px;
    box-shadow: 0 0 20px 0 rgba(125, 104, 179, 0.2);
    display: none;
    left: 50%;
    padding-top: 50px;
    position: fixed;
    top: 40px; /* slightly below the header (adjust if header height changes) */
    transform: translateX(-50%);
    width: 96%;
    z-index: 999; /* Above the sticky header */
  }

  .mobile-menu.active {
    display: flex !important;
    flex-direction: column;
  }

  .mobile-menu a {
    align-items: center;
    color: #fff;
    display: flex;
    font-weight: 600;
    height: 60px;
    padding: 0 20px;
    text-decoration: none;
  }

  .divider {
    background: #7d68b3;
    height: 2px;
    width: 100%;
  }
}

/* =========================================================
    TABLET: 426px – 768px
  ========================================================= */
@media (min-width: 426px) and (max-width: 768px) {
  .header {
    background: linear-gradient(
      90deg,
      rgba(25, 0, 87, 0.7) 0%,
      rgba(64, 40, 121, 0.7) 50.48%,
      rgba(25, 0, 87, 0.7) 100%
    );
    border: 1px solid #7d68b3;
    border-radius: 72px;
    box-shadow: 0 0 20px 0 rgba(125, 104, 179, 0.2);
    height: 64px;
    margin: 0 8px;
    padding: 0 28px;
    width: 96%;
  }

  .logo img {
    height: 40px;
    width: 32px;
  }

  .nav {
    display: none;
  }

  .burger {
    display: block;
  }

  .mobile-menu {
    backdrop-filter: blur(24px);
    background: linear-gradient(
      90deg,
      rgba(25, 0, 87, 0.96) 0%,
      rgba(64, 40, 121, 0.96) 50.48%,
      rgba(25, 0, 87, 0.96) 100%
    );
    border: 1px solid #7d68b3;
    border-radius: 32px;
    box-shadow: 0 0 20px 0 rgba(125, 104, 179, 0.2);
    display: none;
    left: 50%;
    padding-top: 50px;
    position: fixed;
    top: 40px; /* slightly below the header (adjust if header height changes) */
    transform: translateX(-50%);
    width: 96%;
    z-index: 999; /* Above the sticky header */
  }

  .mobile-menu.active {
    display: flex !important;
    flex-direction: column;
  }

  .mobile-menu a {
    align-items: center;
    color: #fff;
    display: flex;
    font-weight: 600;
    height: 60px;
    padding: 0 20px;
    text-decoration: none;
  }

  .divider {
    background: #7d68b3;
    height: 2px;
    width: 100%;
  }
}

/* =========================================================
    SMALL LAPTOP: 769px – 1024px
  ========================================================= */
@media (min-width: 769px) and (max-width: 1024px) {
  .header {
    backdrop-filter: blur(20px);
    background: linear-gradient(
      90deg,
      rgba(25, 0, 87, 0.7) 0%,
      rgba(64, 40, 121, 0.7) 50.48%,
      rgba(25, 0, 87, 0.7) 100%
    );
    border: 1px solid #7d68b3;
    border-radius: 90px;
    box-shadow: 0 0 40px 0 rgba(125, 104, 179, 0.2);
    height: 100px;
    margin: 0 auto 30px auto;
    padding: 0 40px;
    width: 90%;
  }

  .logo img {
    height: 50px;
  }

  .nav {
    display: flex;
    gap: 36px;
  }

  .nav a {
    font-size: 20px;
  }

  .burger {
    display: none;
  }
}

/* =========================================================
    DESKTOP: 1025px – 1440px
  ========================================================= */
@media (min-width: 1025px) and (max-width: 1440px) {
  .header {
    height: 110px;
    margin: 0 auto 30px auto;
    padding: 0 50px;
    width: 90%;
  }

  .logo img {
    height: 60px;
  }

  .nav {
    display: flex;
    gap: 40px;
  }

  .nav a {
    font-size: 22px;
  }

  .burger {
    display: none;
  }
}

/* =========================================================
    LARGE SCREENS: 1441px+
  ========================================================= */
@media (min-width: 1441px) {
  .header {
    height: 116px;
    margin: auto;
    max-width: 1320px;
    padding: 0 60px;
  }

  .logo img {
    height: 64px;
  }

  .nav {
    display: flex;
    gap: 48px;
  }

  .nav a {
    font-size: 24px;
  }

  .burger {
    display: none;
  }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  .services-grid {
    align-items: flex-start;
    display: flex; /* use flex so items can wrap naturally */
    flex-wrap: wrap; /* wrap into multiple rows */
    gap: 20px; /* same gap you use on desktop */
    justify-content: flex-start; /* keep layout left-aligned like desktop */
    margin-right: 0;
    max-width: 800px;
    padding: 10px 0;
  }

  .pink-stain-dark-first {
    right: -2rem;
    top: -4rem;
  }
  /* Ensure card keeps its fixed width as you defined per nth-child */
  .service-card {
    flex: 0 0 auto; /* do not grow or shrink */
    font-size: 18px; /* original size */
    height: 68px; /* keep original height */
    padding: 12px 20px; /* original padding */
  }

  /* Make sure the row breaks after 3 items (so we get 3 + 3).
     We do this by limiting the container's max-width to the sum of three
     largest cards + gaps so the fourth item automatically wraps.
     Adjust `--services-row-width` if card widths change in future. */
  :root {
    /* approximate sum of three medium-large cards + gaps; tweak as needed */
    --services-row-width: 980px;
  }
  .services-container {
    margin-left: 92px; /* keep the same left gutter as your base */
    margin-right: 92px;
    max-width: var(--services-row-width);
  }
}

@media (max-width: 1024px) {
  .pink-stain-dark-first {
    right: -60px;
    top: -60px;
  }

  .pink-stain-dark-second {
    height: 150px;
    right: 0;
    width: 150px;
  }

  /* If a device is very narrow, use smaller width */
  @media (max-width: 420px) {
    .service-card {
      font-size: 13px;
      padding: 8px 12px;
      width: 220px;
    }
  }
}

/* 🧩 Large laptops (1024–1439px) */
@media (max-width: 1439px) {
  .services-bee {
    bottom: -190px;
    right: -4rem;
    width: 320px;
  }
}

/* 🧩 Tablets (768–1023px) */
@media (max-width: 1023px) {
  .services-bee {
    bottom: -160px;
    right: -70px;
    width: 260px;
  }
}

/* 🧩 Mobiles (up to 767px) */
@media (max-width: 767px) {
  .services-grid {
    margin: 0;
  }
  .services-bee {
    bottom: -100px;
    right: 0;
    width: 180px;
  }

  .pink-stain-dark-first {
    height: 150px;
    right: 0px;
    top: -50px;
    width: 150px;
  }

  .services-cards-row {
    margin: 0;
    padding-top: 32px;
  }
}

/* ---------------------------
   Progressive scaling between 1440 -> 1024
   Slightly reduce typography & padding so row feels balanced
   (This is only for visual balance — the card widths still follow your nth-child px values.)
   --------------------------- */
@media (min-width: 1024px) and (max-width: 1430px) {
  .service-card {
    /* fluidly scale text/padding without changing the px widths set by nth-child */
    font-size: clamp(16px, 1.2vw + 10px, 18px);
    padding: clamp(10px, 0.7vw + 10px, 12px) clamp(14px, 0.9vw + 12px, 20px);
  }
}

/* ---------- Tablet (768px → 1023px) --------- */
@media (min-width: 768px) and (max-width: 1023px) {
  /* content stays left but with modest gutter from left edge */
  .create-content {
    margin-left: 32px; /* keeps heading left but not flush to the viewport edge */
    max-width: 700px;
    text-align: left;
  }

  .create-title {
    font-size: 32px;
  }

  .create-subtitle {
    font-size: 20px;
  }

  /* CTA button: left aligned below the subtitle, slightly smaller */
  .create-btn {
    display: inline-flex;
    font-size: 18px;
    margin-top: 20px;
    padding: 14px 20px;
  }

  /* Bee reduced */
  .create-bee {
    bottom: 10px;
    height: 240px;
    right: 40px;
    width: 300px;
    z-index: -1;
  }

  /* Move the up button into the section top-right (absolute so it aligns with the heading) */
  .create-top-btn {
    border-radius: 8px;
    bottom: 8px; /* align with top of the create block area */
    position: fixed;
    right: 16px;
  }
}

/* ---------- Mobile (≤767px) ---------- */
@media (max-width: 767px) {
  .create-top-btn {
    height: 48px;
    width: 48px;
  }

  .create-top-btn img {
    height: 48px;
    width: 48px;
  }
  .create-together {
    margin-left: 0;
    margin-top: 0;
    min-height: 200px;
    padding: 0 16px;
    margin-bottom: 24px;
  }

  /* critical: keep content LEFT aligned — matches your screenshot */
  .create-content {
    max-width: calc(100% - 32px);
    text-align: left;
  }

  .create-title {
    font-size: 24px; /* your requested size */
    line-height: 1.05;
  }

  .create-subtitle {
    font-size: 16px;
    font-weight: 300;
    margin-top: 12px;
    max-width: 420px; /* keep it short, will break into ~2 lines */
  }

  /* button: left aligned under subtitle, compact */
  .create-btn {
    align-items: center;
    display: inline-flex;
    font-size: 16px;
    gap: 10px;
    justify-content: center;
    margin-left: 0;
    margin-top: 20px;
    padding: 12px 16px; /* your requested size */
    width: auto; /* do not center-stretch */
  }

  /* small bee (your requested size) */
  .create-bee {
    bottom: -8px;
    height: 130px;
    right: 8px;
    width: 157px;
    z-index: -1;
  }

  /* Put the up-button near the heading (absolute inside the section)
      so it sits to the right of the heading as in your example */
  .create-top-btn {
    align-items: center;
    border-radius: 8px;
    bottom: 12px;
    display: flex;
    justify-content: center;
    position: fixed; /* absolute relative to .create-together */
    right: 16px;
    z-index: 10;
    /* keep same visuals as desktop but smaller */
  }
}

/* =========================
    FOOTER — Responsive overrides
    (active under 1024px)
    ========================= */
@media (max-width: 1024px) {
  .footer {
    height: auto;
    padding: 24px;
  }

  .footer-content {
    display: block;
    margin: 0 auto;
    max-width: 1440px;
    padding: 0;
    position: relative;
  }

  /* LOGO — stays on the left */
  .footer-left {
    align-items: center;
    display: flex;
    gap: 20px;
    padding-left: 0;
    position: relative;
    z-index: 2;
  }

  .footer-logo img {
    height: auto;
    width: 100px;
  }

  @media (max-width: 600px) {
    .services-container {
      width: 108%;
    }
    .services-section {
      margin: 0 20px;
    }
    .social-impact {
      margin: 0;
      padding: 32px 16px;
      padding-bottom: 40px;
    }

    .social-impact h2 {
      font-size: 28px;
      line-height: 1.2;
      text-align: left;
    }

    .social-impact-card {
      border-radius: 10px;
      font-size: 16px;
      line-height: 26px;
      max-width: 340px;
      padding: 16px 20px;
      padding-left: 8px;
      width: 100%;
    }

    .social-impact-card p {
      color: #fff;
      font-size: 16px;
      font-weight: 500;
      line-height: 26px;
      text-align: left;
    }
  }

  /* ICONS — top right */
  .footer-social {
    display: flex;
    gap: 18px;
    position: absolute;
    right: 24px;
    top: 12px;
    z-index: 2;
  }

  .social-link {
    height: 44px;
    width: 44px;
  }

  .social-link img {
    display: block;
    height: auto;
    width: 80%;
  }

  /* TEXT — bottom right, larger gap */
  .footer-text {
    bottom: -10px;
    font-size: 15px;
    margin: 0;
    position: absolute;
    right: 24px;
    text-align: right;
    white-space: nowrap;
    z-index: 2;
  }

  /* Hide bee on smaller screens */
  .create-bee {
    display: none !important;
  }

  /* Yellow stain — flipped and pinned above footer */
  .yellow-stain {
    bottom: 100%;
    left: unset;
    pointer-events: none;
    position: absolute;
    right: 0;
    transform: scaleX(-1);
    width: 280px;
    z-index: -1;
  }

  .yellow-stain img {
    display: block;
    height: auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .yellow-stain {
    height: auto;
    width: 10.5rem;
  }
  .footer {
    padding: 16px;
  }

  .footer-logo img {
    width: 68px;
  }

  .footer-social .social-link {
    height: 24px;
    width: 24px;
  }

  .footer-text {
    font-size: 12px;
    right: 7px;
  }
}

/* =========================
   Base / Desktop ≥1441px
   ========================= */

/* =========================
   Tablet range (1024–1440px)
   Make cards slightly smaller so they fit
   ========================= */

/* ============================= */
/* ======= RESPONSIVE ========== */
/* ============================= */

/* <=1440px */
@media (max-width: 1440px) {
  :root {
    --card-width: 960px;
  }

  .card-header {
    font-size: 34px;
  }

  .card-intro,
  .card-footer,
  .card-subhead,
  .list-text {
    font-size: 24px;
    line-height: 30px;
  }

  .bullet {
    height: 7px;
    width: 7px;
  }
}

/* <=1024px (tablet portrait) */
@media (max-width: 1024px) {
  :root {
    --card-width: 680px;
  }

  .card-front {
    gap: 16px;
    padding: 32px;
  }

  .card-header {
    font-size: 28px;
  }

  .card-intro,
  .card-footer,
  .card-subhead,
  .list-text {
    font-size: 22px;
    line-height: 28px;
  }

  .bullet {
    height: 7px;
    width: 7px;
  }
}

/* <=768px (mobile landscape / large phones) */
@media (max-width: 768px) {
  :root {
    --card-width: 500px;
  }

  .card-front {
    padding: 28px;
  }

  .card-header {
    font-size: 26px;
  }

  .card-intro,
  .card-footer,
  .card-subhead,
  .list-text {
    font-size: 20px;
    line-height: 26px;
  }

  .bullet {
    height: 6px;
    width: 6px;
  }
}

/* <=480px (mobile) */
@media (max-width: 480px) {
  :root {
    --card-width: 350px;
  }

  .card-front {
    gap: 14px;
    padding: 24px;
  }

  .card-header {
    font-size: 24px;
    font-weight: 700;
  }

  .card-intro,
  .card-footer,
  .card-subhead,
  .list-text,
  .card-list li p,
  .card-list li .list-text,
  .card-list li .list-strong,
  .card-footer--pink {
    font-size: 14px;
    line-height: 24px;
  }

  .bullet {
    height: 6px;
    width: 6px;
  }
}

@media (max-width: 767px) {
  .services-grid {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: flex-start;
    /* Ensure the grid starts and ends with padding to match screen edges */
    margin: 0 -16px; /* Negative margin to extend beyond container, offset by padding */
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    padding: 10px 16px 12px 16px;
    scroll-snap-type: x mandatory;
    scrollbar-color: #fb1d5a rgba(255, 255, 255, 0.06);
    scrollbar-width: thin;
    width: calc(100% + 50px); /* Account for left and right padding */
    flex-wrap: nowrap;
  }

  .services-container {
    margin: 0; /* Remove any fixed margins */
    padding: 0 16px; /* Add padding to align with screen edges */
    width: 100%; /* Reset to full width to avoid artificial stretching */
  }

  .service-card {
    align-items: center;
    background: #190057;
    border: 1px solid #9190af;
    border-radius: 10px;
    box-sizing: border-box;
    color: #fff;
    display: flex;
    flex: 0 0 auto;
    font-family: Inter;
    font-size: 14px;
    font-weight: 600;
    gap: 10px;
    height: 50px;
    justify-content: center;
    padding: 8px 16px;
    scroll-snap-align: start;
    text-align: left;
    width: 260px;
  }

  /* Optional: Add a subtle visual separator at the end */
  .services-grid:after {
    content: "";
    display: block;
    flex: 0 0 16px; /* Matches padding to create a gap at the end */
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .services-grid {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .services-header {
    font-size: 28px;
  }
  .social-impact-card .card-front {
    padding: 20px;
  }

  .main-cont {
    margin-top: 64px;
  }
}
