@import url('./index.css');

/* ==================================================================
   APP DETAIL PAGE  (Rental App case study)
   ================================================================== */

.app-detail {
  position: relative;
  width: 100%;
  background: #ffffff;
  overflow: hidden;
}

.app-hero-arcs-bg {
  display: none !important;
}

.app-detail-section {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 40px 40px 0 40px;
  box-sizing: border-box;
}

.app-detail-container {
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
}

/* ---------- Top bar : Go Back + breadcrumb ---------- */
.app-detail-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 28px;
}

.app-back-link {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  text-decoration: none !important;
  font-family: Satoshi, 'Inter', sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #505056 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase;
  transition: color 0.2s ease !important;
}

.app-back-link:hover {
  color: #85BD56 !important;
}

.app-back-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: #FFFFFF !important;
  border: 1px solid #EBEAEA !important;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.08), inset 0 0 2px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.2s ease !important;
}

.app-back-link:hover .app-back-icon {
  border-color: #85BD56 !important;
  box-shadow: inset 0 0 0 1px #85BD56, 0 4px 12px rgba(133, 189, 86, 0.25) !important;
  transform: translateY(-1px) !important;
}

.app-back-link:hover .app-back-icon svg path {
  fill: #85BD56 !important;
}

.app-detail-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.app-detail-breadcrumb span {
  color: #69686E;
  font-family: Satoshi, 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- Title & tags ---------- */
.app-detail-title {
  color: #75BF46 !important;
  font-family: Satoshi, 'Inter', -apple-system, sans-serif !important;
  font-size: clamp(36px, 4.5vw, 56px) !important;
  font-style: normal !important;
  font-weight: 500 !important;
  line-height: 1.16 !important;
  letter-spacing: -1.2px !important;
  text-align: center;
  margin: 16px auto 24px auto !important;
}

.app-detail-tags {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.app-detail-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  border-radius: 999px;
  background: #F3F3F3;
  border: 1px solid #E9E8E6;
  color: #69686E;
  font-family: Satoshi, 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ---------- Hero image ---------- */
.app-hero-frame {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 48px;
}

.app-hero-canvas {
  position: relative;
  width: 100%;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  box-sizing: border-box;
  border-radius: 20px;
  overflow: hidden;
  /* Silky light-grey backdrop */
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 30%),
    linear-gradient(200deg, rgba(255, 255, 255, 0.55) 8%, rgba(0, 0, 0, 0.035) 42%, rgba(255, 255, 255, 0.5) 72%),
    linear-gradient(135deg, #ededef 0%, #dcdce0 46%, #e7e7e9 62%, #d4d4d8 100%);
}

.app-hero-canvas::before {
  display: none !important;
}

.app-hero-phone {
  position: relative;
  z-index: 1;
  height: 380px;
  max-height: 62vh;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 30px 55px rgba(6, 6, 18, 0.28));
  border-radius: 42px;
}

/* ---------- Case study card ---------- */
.app-casestudy-card {
  width: 100%;
  border-radius: 18px;
  border: 1px solid #E7E6E4;
  background: #ffffff;
  box-shadow: 0 10px 40px rgba(6, 6, 18, 0.04);
  overflow: hidden;
  box-sizing: border-box;
}

.app-casestudy-head {
  padding: 30px 40px 24px 40px;
  border-bottom: 1px solid #EFEEEC;
}

.app-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--85BD56, #85BD56);
  font-family: Satoshi, 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.app-casestudy-title {
  color: var(--060612, #060612);
  font-family: Satoshi, 'Inter', sans-serif !important;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0;
}

.app-casestudy-body {
  padding: 30px 40px 40px 40px;
  background: #FCFCFB;
}

.app-block + .app-block {
  margin-top: 30px;
}

.app-block-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--85BD56, #85BD56);
  font-family: Satoshi, 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px 0;
}

.app-block-text {
  color: var(--69686E, #69686E);
  font-family: Satoshi, 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 24px;
  margin: 0;
  max-width: 820px;
}

/* Key highlights list */
.app-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 40px;
}

.app-highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--69686E, #69686E);
  font-family: Satoshi, 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
}

.app-leaf-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  object-fit: contain;
}

/* ==================================================================
   MORE PROJECTS
   ================================================================== */
.app-more-section {
  width: 100%;
  padding: 0 40px;
  background: #ffffff !important;
  box-sizing: border-box;
}

.app-more-container {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.app-more-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.app-more-eyebrow span {
  color: #69686E;
  font-family: Satoshi, 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-more-title {
  font-family: Satoshi, "DM Sans", system-ui, sans-serif;
  font-size: 44px;
  font-weight: 500;
  line-height: 56px;
  color: rgb(6, 6, 18);
  margin: 0 0 32px 0;
}

/* Horizontal scroll track */
.app-more-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 12px 6px 24px 6px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.app-more-track::-webkit-scrollbar {
  display: none;
}

.app-more-card {
  flex: 0 0 480px !important;
  max-width: 88vw;
  scroll-snap-align: start;
  display: flex !important;
  flex-direction: column !important;
  text-decoration: none;
  background: #ffffff !important;
  border-radius: 20px !important;
  border: 1px solid #EAE8E3 !important;
  padding: 14px !important;
  box-shadow: 0 4px 20px rgba(6, 6, 18, 0.06) !important;
  box-sizing: border-box;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.app-more-card:hover {
  transform: translateY(-4px);
  border-color: #D6D4CF !important;
  box-shadow: 0 12px 32px rgba(6, 6, 18, 0.1) !important;
}

.app-more-card-image {
  width: 100%;
  height: 300px !important;
  border-radius: 14px !important;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none !important;
  box-sizing: border-box;
}

.app-more-card-image img {
  width: auto;
  height: 85%;
  max-width: 90%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.app-more-card:hover .app-more-card-image img {
  transform: scale(1.03);
}

.app-more-card-footer {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 6px 4px 6px !important;
  width: 100%;
  box-sizing: border-box;
}

.app-more-card-title {
  color: #060612 !important;
  font-family: Satoshi, 'Inter', sans-serif !important;
  font-size: 22px !important;
  font-weight: 500 !important;
  margin: 0 !important;
}

.app-more-card-footer-right {
  display: flex;
  align-items: center;
  position: relative;
  min-height: 32px;
}

.app-more-card-tags {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.app-more-card-tags .app-detail-tag {
  background: #F1F0EC !important;
  border: none !important;
  border-radius: 20px !important;
  padding: 5px 14px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #69686E !important;
}

.app-more-card-view-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 8px;
  background: #85BD56;
  color: #FFFFFF;
  box-shadow: 2px 2px 2px 0 rgba(255, 255, 255, 0.28) inset, 0 0 0 2px color-mix(in srgb, #85BD56 35%, #ffffff);
  font-family: Satoshi, 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  right: 0;
  transform: translateX(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  white-space: nowrap;
}

.app-more-card-view-more svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.app-more-card:hover .app-more-card-tags {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  pointer-events: none;
}

.app-more-card:hover .app-more-card-view-more {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Carousel nav arrows */
.app-more-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.app-more-arrow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  border: 1px solid #EBEAEA !important;
  background: #ffffff !important;
  cursor: pointer;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.08), inset 0 0 2px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.03) !important;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
}

.app-more-arrow:hover {
  border-color: #85BD56 !important;
  background: #ffffff !important;
  box-shadow: inset 0 0 0 1px #85BD56, 0 4px 12px rgba(133, 189, 86, 0.25) !important;
  transform: translateY(-1px) !important;
}

.app-more-arrow:hover svg path {
  fill: #85BD56 !important;
}

.app-more-arrow:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  transform: none !important;
  border-color: #E5E4E2 !important;
  background: #ffffff !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

/* ==================================================================
   RESPONSIVE
   ================================================================== */
@media (max-width: 900px) {
  .app-casestudy-title,
  .app-more-title {
    font-size: 28px;
  }
  .app-highlights {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .app-detail-section,
  .app-more-section {
    padding-left: 20px;
    padding-right: 20px;
  }
  .app-detail-title {
    font-size: 34px;
  }
  .app-hero-canvas {
    min-height: 320px;
    padding: 30px 16px;
  }
  .app-hero-phone {
    height: 300px;
  }
  .app-casestudy-head {
    padding: 24px 22px 20px 22px;
  }
  .app-casestudy-body {
    padding: 24px 22px 30px 22px;
  }
  .app-more-card {
    flex: 0 0 340px;
    max-width: 85vw;
  }
  .app-more-card-image {
    height: 240px;
  }
}

@media (max-width: 480px) {
  .app-detail-breadcrumb span {
    font-size: 11px;
  }
  .app-back-link span:last-child {
    display: none;
  }
  .app-detail-title {
    font-size: 28px;
  }
  .app-more-card {
    flex: 0 0 290px;
  }
  .app-more-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

.app-back-link, .bd-back-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  text-decoration: none !important;
  font-family: Satoshi, 'Inter', sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #505056 !important;
  letter-spacing: 0.05em !important;
  transition: color 0.2s ease !important;
}

.app-back-link:hover, .bd-back-link:hover {
  color: #85BD56 !important;
}

.app-back-icon, .bd-back-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 12px !important;
  background: #FFFFFF !important;
  border: 1px solid #EBEAEA !important;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.08), inset 0 0 2px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.2s ease !important;
}

.app-back-link:hover .app-back-icon, .bd-back-link:hover .bd-back-icon {
  border-color: #85BD56 !important;
  box-shadow: inset 0 0 0 1px #85BD56, 0 4px 12px rgba(133, 189, 86, 0.25) !important;
  transform: translateY(-1px) !important;
}

.app-back-link:hover .app-back-icon svg path, .bd-back-link:hover .bd-back-icon svg path {
  fill: #85BD56 !important;
}

/* ---------- Multi-screen Hero Layout ---------- */
.app-screens-hero-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  flex-wrap: nowrap;
  box-sizing: border-box;
}

.app-screens-hero-grid .app-hero-phone {
  width: 100%;
  max-width: calc(25% - 15px);
  height: auto;
  max-height: 460px;
  flex: 1 1 0;
  object-fit: contain;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 15px 35px rgba(6, 6, 18, 0.18));
}

.app-screens-hero-grid .app-hero-phone:hover {
  transform: translateY(-8px) scale(1.03);
  filter: drop-shadow(0 25px 45px rgba(6, 6, 18, 0.25));
}

/* ---------- App Screens Showcase Grid ---------- */
.app-screens-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  margin-top: 16px;
  box-sizing: border-box;
}

.app-screen-card {
  background: #FFFFFF;
  border: 1px solid #EFEFEF;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(6, 6, 18, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.app-screen-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(6, 6, 18, 0.08);
}

.app-screen-card img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: 36px;
}

/* ---------- Responsive Behavior: Desktop (All Screens) vs Mobile (Carousel) ---------- */
@media (max-width: 868px) {
  .app-hero-canvas {
    padding: 24px 12px !important;
  }

  /* Hero Multi-screen Mobile Carousel */
  .app-screens-hero-grid {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 16px !important;
    padding: 12px 6px 20px 6px !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .app-screens-hero-grid::-webkit-scrollbar {
    height: 6px;
  }
  .app-screens-hero-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
  }
  .app-screens-hero-grid::-webkit-scrollbar-thumb {
    background: #85BD56;
    border-radius: 10px;
  }

  .app-screens-hero-grid .app-hero-phone {
    flex: 0 0 78% !important;
    max-width: 78% !important;
    height: 360px !important;
    scroll-snap-align: center !important;
    scroll-snap-stop: always !important;
  }

  /* App Screens Showcase Mobile Carousel */
  .app-screens-grid {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 16px !important;
    padding: 8px 10% 20px 10% !important;
    width: 100% !important;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
  }

  .app-screens-grid::-webkit-scrollbar {
    display: none;
  }

  .app-screen-card {
    flex: 0 0 80% !important;
    min-width: 250px !important;
    scroll-snap-align: center !important;
    scroll-snap-stop: always !important;
  }
}

@media (max-width: 480px) {
  .app-screens-hero-grid .app-hero-phone {
    flex: 0 0 85% !important;
    max-width: 85% !important;
    height: 310px !important;
  }

  .app-screens-grid {
    padding: 8px 6% 20px 6% !important;
  }
  
  .app-screen-card {
    flex: 0 0 88% !important;
  }
}

/* App Screens Carousel Controls */
.app-screens-carousel-wrapper {
  position: relative;
  width: 100%;
}

.app-screen-nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid #EFEFEF;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: #060612;
  transition: background 0.3s ease, color 0.3s ease;
}

.app-screen-nav:hover {
  background: #85BD56;
  color: #FFFFFF;
}

.app-screen-nav.prev {
  left: -8px;
}

.app-screen-nav.next {
  right: -8px;
}

@media (max-width: 868px) {
  .app-screen-nav {
    display: flex;
  }
}

/* ==========================================================================
   UNIFORM GLOBAL SECTION SPACING (MATCHING INDEX.HTML)
   ========================================================================== */

/* Desktop: 60px gap between sections */
.app-detail-section,
.app-more-section,
.contact-section {
  margin-bottom: 60px !important;
  background: #ffffff !important;
}

.app-detail-container,
.app-more-container,
.contact-container {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Tablet: 44px gap between sections */
@media (max-width: 960px) {
  .app-detail-section,
  .app-more-section,
  .contact-section {
    margin-bottom: 44px !important;
  }

  .app-detail-container,
  .app-more-container,
  .contact-container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}

/* Mobile: 32px gap between sections */
@media (max-width: 480px) {
  .app-detail-section,
  .app-more-section,
  .contact-section {
    margin-bottom: 32px !important;
  }

  .app-detail-container,
  .app-more-container,
  .contact-container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}
