/* /var/www/relyn/static_src/css/ai_design.css */

.ai-design-section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 24px 80px;
}

.ai-design-shell {
  position: relative;
  width: 100%;
  max-width: 1919px;
  min-height: 1687px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 158px;

  /* Blur placement for this section */
  --blur-top: 62%;
  --blur-h: 537px;
}

.ai-design-header {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #FFFFFF;
  max-width: 820px;
}

.ai-design-kicker {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.ai-design-title {
  margin: 39px 0 0;
  font-size: 48px;
  font-weight: 600;
  color: #FFFFFF;
}

.ai-design-card-row {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* INTERACTIVE LAYOUT WRAPPER */
.ai-design-layout {
  position: relative;
  width: 100%;
  max-width: 1300px;
  min-height: 1200px;
  margin-top: 114px;
  border-radius: 40px;
}

/* Cards */
.ai-design-card {
  position: absolute;
  width: 350px;
  height: 382.13px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(99, 62, 178, 0.8) 0%, rgba(99, 62, 178, 0.2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 38px 28px 0;
  color: #FFFFFF;
  text-align: center;
  overflow: visible;

  /* --- Spread system --- */
  --tx: 0px;
  --ty: 0px;
  --lift: 0px;

  transform: translate(var(--tx), var(--ty)) translateY(var(--lift));
  will-change: transform, box-shadow;
  transition:
    transform 1.8s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Hover the whole section: cards gently spread apart + tiny lift */
@media (hover: hover) and (pointer: fine) {
  .ai-design-section:hover .ai-design-card {
    --lift: -6px;
    box-shadow: 0 30px 95px rgba(0, 0, 0, 0.95);
  }

  /* Spread directions (a little further from nearby boxes) */
  .ai-design-section:hover .ai-card-2 { --tx: 42px; --ty: -14px; }
  .ai-design-section:hover .ai-card-6 { --tx: -42px; --ty: -14px; }

  .ai-design-section:hover .ai-card-3 { --tx: 42px; --ty: 14px; }
  .ai-design-section:hover .ai-card-5 { --tx: -42px; --ty: 14px; }

  .ai-design-section:hover .ai-card-1 { --ty: -30px; }
  .ai-design-section:hover .ai-card-4 { --ty: 30px; }

  /* Slightly stagger for premium smoothness */
  .ai-design-section:hover .ai-card-1 { transition-delay: 0.00s; }
  .ai-design-section:hover .ai-card-2 { transition-delay: 0.05s; }
  .ai-design-section:hover .ai-card-6 { transition-delay: 0.05s; }
  .ai-design-section:hover .ai-card-3 { transition-delay: 0.10s; }
  .ai-design-section:hover .ai-card-5 { transition-delay: 0.10s; }
  .ai-design-section:hover .ai-card-4 { transition-delay: 0.15s; }
}

.ai-design-card-title {
  margin: 0 0 18px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  color: #FFFFFF;
}

.ai-design-card-text {
  margin: 0 0 40px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #FFFFFF;
  opacity: 0.95;
}

/* IMAGE – touches bottom of card */
.ai-design-card-image-wrap {
  width: 300px;
  height: 157px;
  border-radius: 30px 30px 0 0;
  overflow: hidden;
  margin: auto auto 0;
}

.ai-design-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* See More button overlapping bottom edge */
.ai-design-card-button {
  position: absolute;
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%);
  width: 145px;
  height: 40px;
  border-radius: 999px;
  background-color: #633EB2;
  border: 1px solid #A697E0;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9);
  background-image: linear-gradient(135deg, #633EB2, #633EB2);
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out, filter 0.16s ease-out;
}

.ai-design-card-button:hover {
  transform: translateX(-50%) translateY(-1px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.95);
  filter: brightness(1.04);
}

/* Final absolute positions (original layout) */
.ai-card-1 { top: 0; left: calc(50% - 175px); }
.ai-card-2 { top: 131px; left: calc(50% + 275px); }
.ai-card-6 { top: 131px; left: calc(50% - 625px); }

.ai-card-3 {
  top: calc(131px + 382.13px + 100px);
  left: calc(50% + 275px);
}

.ai-card-5 {
  top: calc(131px + 382.13px + 100px);
  left: calc(50% - 625px);
}

.ai-card-4 {
  top: calc(382.13px + 371px);
  left: calc(50% - 175px);
}

/* Logo circle */
.ai-design-logo-circle {
  position: absolute;
  top: calc(382.13px + 140px);
  left: 50%;

  transform: translateX(-50%) scale(1);
  opacity: 1;

  width: 120.71px;
  height: 120.71px;
  border-radius: 50%;
  border: 2px solid #633EB2;
  background-color: #08111B;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.9);
  z-index: 2;

  transform-origin: center center;
  will-change: transform, box-shadow;
  transition:
    transform 1.8s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-design-logo-circle img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  transform: scale(1);
  transition: transform 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Hover: circle grows more + logo grows more */
@media (hover: hover) and (pointer: fine) {
  .ai-design-section:hover .ai-design-logo-circle {
    transform: translateX(-50%) scale(1.68);
    box-shadow:
      0 28px 95px rgba(0, 0, 0, 0.95),
      0 0 55px rgba(166, 151, 224, 0.55);
  }

  .ai-design-section:hover .ai-design-logo-circle img {
    transform: scale(1.52);
  }
}

/* Responsive */
@media (max-width: 1280px) {
  .ai-design-shell {
    min-height: 1200px;
  }

  .ai-design-title {
    font-size: 40px;
  }
}

/* ============================================================
   ✅ REQUESTED: Laptop + Tablet (LANDSCAPE) ONLY
   - Subtitle 18px
   - Title 42px
   - Reduce cards, images, and inside fonts
   - Do NOT affect desktop (>1440) and do NOT affect mobile/tablet portrait (<=768)
   ============================================================ */

/* ✅ Laptop (1025–1440) */
@media (max-width: 1440px) and (min-width: 1025px) {
  .ai-design-shell {
    padding-top: 136px;
    min-height: 1500px;
  }

  .ai-design-kicker {
    font-size: 18px;
    letter-spacing: 0.16em;
  }

  .ai-design-title {
    font-size: 42px;
    margin-top: 30px;
  }

  .ai-design-layout {
    max-width: 1200px;
    min-height: 1080px;
    margin-top: 96px;
    border-radius: 36px;
  }

  .ai-design-card {
    width: 320px;
    height: 350px;
    border-radius: 18px;
    padding: 32px 24px 0;
    box-shadow: 0 22px 72px rgba(0, 0, 0, 0.95);
  }

  .ai-design-card-title {
    font-size: 28px;
    margin: 0 0 14px;
    line-height: 1.18;
  }

  .ai-design-card-text {
    font-size: 15px;
    margin: 0 0 32px;
    line-height: 1.55;
  }

  .ai-design-card-image-wrap {
    width: 274px;
    height: 142px;
    border-radius: 26px 26px 0 0;
  }

  .ai-design-card-button {
    width: 132px;
    height: 38px;
    font-size: 13px;
    bottom: -18px;
  }

  /* Re-tuned absolute positions for smaller cards */
  .ai-card-1 { top: 0; left: calc(50% - 160px); }
  .ai-card-2 { top: 118px; left: calc(50% + 250px); }
  .ai-card-6 { top: 118px; left: calc(50% - 570px); }

  .ai-card-3 {
    top: calc(118px + 350px + 92px);
    left: calc(50% + 250px);
  }

  .ai-card-5 {
    top: calc(118px + 350px + 92px);
    left: calc(50% - 570px);
  }

  .ai-card-4 {
    top: calc(350px + 338px);
    left: calc(50% - 160px);
  }

  .ai-design-logo-circle {
    top: calc(350px + 122px);
    width: 108px;
    height: 108px;
  }

  .ai-design-logo-circle img {
    width: 108px;
    height: 108px;
  }
}

/* ✅ Tablet (landscape) — keep your existing flex-wrap behavior, but smaller */
@media (max-width: 1024px) and (min-width: 769px) {
  .ai-design-section {
    padding: 0 16px 64px;
  }

  .ai-design-shell {
    padding-top: 120px;
    min-height: 1000px;
  }

  .ai-design-kicker {
    font-size: 18px;
    letter-spacing: 0.16em;
  }

  .ai-design-title {
    font-size: 42px;
    margin-top: 30px;
  }

  .ai-design-layout {
    margin-top: 72px;
    min-height: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
  }

  .ai-design-card {
    position: static;
    width: 300px;
    height: auto;
    min-height: 300px;
    transform: none !important;
    border-radius: 18px;
    padding: 32px 22px 0;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9);
    transition: box-shadow 0.3s ease;
  }

  .ai-design-card-title {
    font-size: 26px;
    margin: 0 0 12px;
    line-height: 1.18;
  }

  .ai-design-card-text {
    font-size: 14px;
    margin: 0 0 28px;
    line-height: 1.55;
  }

  .ai-design-card-image-wrap {
    width: 260px;
    height: 136px;
    border-radius: 26px 26px 0 0;
  }

  .ai-design-card-button {
    width: 132px;
    height: 38px;
    font-size: 13px;
    bottom: -18px;
  }

  .ai-card-1,
  .ai-card-2,
  .ai-card-3,
  .ai-card-4,
  .ai-card-5,
  .ai-card-6 {
    top: auto;
    left: auto;
  }

  .ai-design-logo-circle {
    position: static;
    transform: none;
    margin-top: 64px;
    opacity: 1;
    width: 108px;
    height: 108px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9);
    transition: none;
  }

  .ai-design-logo-circle img {
    width: 108px;
    height: 108px;
    transition: none;
    transform: none;
  }
}

/* ============================================================
   ✅ UPDATED: Mobile + Tablet (PORTRAIT)
   - 3 boxes should be visible within one screen (first group)
   - then logo circle
   - then remaining 3 boxes after logo
   - all vertically aligned
   ============================================================ */
@media (max-width: 768px) {
  .ai-design-shell {
    padding-top: 96px;
    min-height: 900px;
  }

  /* ✅ Reduce subtitle + title fonts (mobile + tablet portrait) */
  .ai-design-kicker {
    font-size: 16px;
    letter-spacing: 0.14em;
  }

  .ai-design-title {
    font-size: 28px;
    margin-top: 24px;
  }

  /* ✅ Portrait layout: vertical stack, but cards are compact so 3 fit on one screen */
  .ai-design-layout {
    margin-top: 56px;
    min-height: auto;

    display: flex;
    flex-direction: column;
    align-items: center;

    /* tight but still premium spacing */
    gap: 18px;
  }

  /* ✅ Compact cards so 3 are visible on one screen */
  .ai-design-card {
    position: relative;
    width: 320px;
    height: 220px;

    transform: none !important;

    border-radius: 18px;
    padding: 18px 18px 0;

    /* enough room for the image at bottom */
    padding-bottom: 96px;

    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.88);
    transition: box-shadow 0.3s ease;
  }

  .ai-design-card-title {
    font-size: 18px;
    margin: 0 0 8px;
    line-height: 1.18;
  }

  .ai-design-card-text {
    font-size: 12.5px;
    margin: 0 0 10px;
    line-height: 1.5;
    opacity: 0.96;
  }

  /* ✅ Image: compact at bottom, inside card */
  .ai-design-card-image-wrap {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;

    width: auto;
    height: 82px;

    border-radius: 18px 18px 0 0;
    overflow: hidden;
    margin: 0;
    z-index: 0;
  }

  .ai-design-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .ai-design-card-title,
  .ai-design-card-text {
    position: relative;
    z-index: 1;
  }

  /* ✅ Button stays overlapping bottom edge, above image */
  .ai-design-card-button {
    width: 122px;
    height: 34px;
    font-size: 12px;
    bottom: -16px;
    z-index: 2;
  }

  /* ✅ Re-order: 3 cards -> logo -> 3 cards (portrait) */
  .ai-card-1 { order: 1; }
  .ai-card-2 { order: 2; }
  .ai-card-3 { order: 3; }

  .ai-design-logo-circle {
    order: 4;

    position: static;
    transform: none;

    width: 110px;
    height: 110px;

    margin: 14px 0 6px;

    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9);
    transition: none;
  }

  .ai-design-logo-circle img {
    width: 102px;
    height: 102px;
    transition: none;
    transform: none;
  }

  .ai-card-4 { order: 5; }
  .ai-card-5 { order: 6; }
  .ai-card-6 { order: 7; }

  /* ✅ Ensure absolute-position rules don’t fight portrait layout */
  .ai-card-1,
  .ai-card-2,
  .ai-card-3,
  .ai-card-4,
  .ai-card-5,
  .ai-card-6 {
    top: auto;
    left: auto;
  }
}

@media (max-width: 480px) {
  .ai-design-shell {
    padding-top: 80px;
    min-height: 800px;
  }

  .ai-design-kicker {
    font-size: 15px;
    letter-spacing: 0.12em;
  }

  .ai-design-title {
    font-size: 24px;
    margin-top: 20px;
  }

  .ai-design-layout {
    margin-top: 44px;
    gap: 16px;
  }

  /* ✅ Even more compact so 3 cards still fit on smaller phones */
  .ai-design-card {
    width: 280px;
    height: 206px;

    padding: 16px 16px 0;
    padding-bottom: 90px;

    border-radius: 18px;
  }

  .ai-design-card-title {
    font-size: 17px;
    margin: 0 0 7px;
  }

  .ai-design-card-text {
    font-size: 12px;
    margin: 0 0 8px;
  }

  .ai-design-card-image-wrap {
    left: 12px;
    right: 12px;
    height: 78px;
    border-radius: 16px 16px 0 0;
  }

  .ai-design-card-button {
    width: 118px;
    height: 32px;
    font-size: 11.5px;
    bottom: -15px;
  }

  .ai-design-logo-circle {
    width: 104px;
    height: 104px;
    margin: 12px 0 6px;
  }

  .ai-design-logo-circle img {
    width: 96px;
    height: 96px;
  }
}
