/* ==========================================================================
   DELEGATE ERP — Section 5: Mobile Applications Showcase + All Apps Page
   Original Interactive Split Layout (Forest & Emerald Brand Identity)
   ========================================================================== */

.apps-section {
  position: relative;
  padding: 80px 0 88px;
  background: linear-gradient(180deg, #fafdfb 0%, #ffffff 100%);
  border-top: 1px solid #e6eee8;
  overflow: hidden;
}

.apps-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.5vw, 36px);
}

/* ==========================================================================
   2-Column Showcase (Left Side-by-Side 3D Phones + Right Stacked Suite Cards)
   ========================================================================== */
.apps-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 4.5vw, 64px);
  align-items: center;
}

/* Left Column: Side-by-Side 3D Perspective Smartphones */
.apps-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0;
}

.apps-visual-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(21, 128, 61, 0.1) 0%, transparent 68%);
  pointer-events: none;
}

.phones-duo {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  perspective: 1200px;
}

.phone-3d {
  width: 230px;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.phone-3d--left {
  transform: rotateY(15deg) rotateZ(-1deg);
}

.phone-3d--right {
  transform: rotateY(-15deg) rotateZ(1deg);
}

.phones-duo:hover .phone-3d--left {
  transform: rotateY(8deg) translateY(-4px);
}

.phones-duo:hover .phone-3d--right {
  transform: rotateY(-8deg) translateY(-4px);
}

.phone-3d-shell {
  border-radius: 38px;
  padding: 8px;
  background: linear-gradient(145deg, #3c4a40 0%, #141d17 45%, #2a362e 100%);
  box-shadow:
    0 32px 54px -22px rgba(12, 34, 18, 0.35),
    0 10px 22px -10px rgba(12, 34, 18, 0.18),
    0 0 0 1.5px rgba(255, 255, 255, 0.22) inset;
}

.phone-3d-screen {
  position: relative;
  border-radius: 30px;
  background: #ffffff;
  overflow: hidden;
  aspect-ratio: 9 / 19.3;
}

.phone-island {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 16px;
  border-radius: 999px;
  background: #0d1510;
  z-index: 4;
}

.phone-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Right Column: Header + Stacked App Cards */
.apps-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.apps-pill-eyebrow,
.apps-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ecf8f0;
  border: 1px solid #d5ecd9;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #15803d;
  margin-bottom: 14px;
}

.apps-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(2rem, 3.1vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.12;
  color: #122116;
  margin-bottom: 10px;
}

.apps-title span {
  color: #15803d;
}

.apps-subtitle {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #5b6c5f;
  margin-bottom: 24px;
}

/* 2 Compact Modern Stacked App Cards (Parent App & Teacher App) */
.apps-suite-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.apps-suite-card {
  padding: 16px 18px 18px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e6efe9;
  box-shadow: 0 8px 24px -16px rgba(15, 42, 22, 0.1);
}

.apps-suite-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  flex-wrap: wrap;
}

.apps-suite-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.apps-suite-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #eef8f1;
  color: #15803d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.apps-suite-icon svg {
  width: 16px;
  height: 16px;
}

.apps-suite-name h3 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.96rem;
  font-weight: 700;
  color: #122116;
}

.apps-suite-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.apps-mini-tile {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 11px;
  background: #f5faf7;
  border: 1px solid #eaf2ed;
}

.apps-mini-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #e4f4ea;
  color: #15803d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.apps-mini-icon svg {
  width: 14px;
  height: 14px;
}

.apps-mini-tile h4 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.83rem;
  font-weight: 700;
  color: #132116;
  line-height: 1.25;
  margin-bottom: 2px;
}

.apps-mini-tile p {
  font-size: 0.74rem;
  line-height: 1.42;
  color: #5c6d60;
}

.apps-store-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: 9px;
  background: #111813;
  color: #ffffff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  transition: background-color 180ms ease, transform 180ms ease;
}

.store-pill svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.store-pill:hover {
  background: #15803d;
  transform: translateY(-1px);
}

/* Bottom All Apps Action Row */
.apps-all-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.apps-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  background: #15803d;
  color: #ffffff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 10px 22px -10px rgba(21, 128, 61, 0.55);
  transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.apps-all-btn svg {
  width: 15px;
  height: 15px;
  transition: transform 180ms ease;
}

.apps-all-btn:hover {
  background: #166534;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -10px rgba(21, 128, 61, 0.65);
}

.apps-all-btn:hover svg {
  transform: translateX(3px);
}

.apps-all-caption {
  font-size: 0.77rem;
  font-weight: 600;
  color: #627366;
}

/* ==========================================================================
   DEDICATED ALL APPS PAGE (apps.html)
   ========================================================================== */
.apps-page-body {
  background: #f4f9f6;
  color: #122116;
  font-family: "Inter", "Plus Jakarta Sans", sans-serif;
  margin: 0;
}

.apps-page-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e4ede7;
}

.apps-page-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px clamp(16px, 2.5vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.apps-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #15803d;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  background: #eff9f2;
  transition: background-color 180ms ease;
}

.apps-back-link:hover {
  background: #dff3e6;
}

.apps-back-link svg {
  width: 15px;
  height: 15px;
}

.apps-page-brand {
  font-family: "Sora", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #122116;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.apps-page-brand span {
  color: #15803d;
}

.apps-page-hero {
  background: #ffffff;
  border-bottom: 1px solid #e4ede7;
  padding: 56px 0 46px;
  text-align: center;
}

.apps-page-hero h1 {
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.85rem, 3vw, 2.65rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  color: #122116;
  margin: 0 0 10px;
}

.apps-page-hero h1 span {
  color: #15803d;
}

.apps-page-hero p {
  font-size: 0.96rem;
  line-height: 1.6;
  color: #56675a;
  max-width: 640px;
  margin: 0 auto 24px;
}

.apps-filter-row {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.apps-filter-tab {
  position: relative;
  padding: 5px 2px 8px;
  border: none;
  background: transparent;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  color: #607164;
  cursor: pointer;
  transition: color 180ms ease;
}

.apps-filter-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: #15803d;
  transform: scaleX(0);
  transition: transform 200ms ease;
}

.apps-filter-tab:hover {
  color: #122116;
}

.apps-filter-tab.is-active {
  color: #15803d;
  font-weight: 700;
}

.apps-filter-tab.is-active::after {
  transform: scaleX(1);
}

/* 6 Dedicated Apps Grid */
.apps-catalog-section {
  padding: 52px 0 72px;
}

.apps-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.app-card {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e1ece4;
  border-bottom: 3px solid #cfe6d7;
  box-shadow:
    0 12px 24px -14px rgba(15, 42, 22, 0.14),
    0 4px 8px -4px rgba(15, 42, 22, 0.06);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 180ms ease;
}

.app-card:hover {
  transform: translateY(3px);
  box-shadow:
    0 4px 10px -6px rgba(15, 42, 22, 0.14),
    0 1px 3px -1px rgba(15, 42, 22, 0.06);
}

.app-card.is-hidden {
  display: none;
}

.app-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.app-card-preview {
  position: relative;
  height: 170px;
  margin-bottom: 16px;
  border-radius: 11px;
  background: linear-gradient(180deg, #eff8f2 0%, #e4f2e9 100%);
  border: 1px solid #dcebe1;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 14px;
}

.app-card-mini-phone {
  width: 156px;
  border-radius: 22px 22px 0 0;
  padding: 6px 6px 0;
  background: #152219;
  box-shadow: 0 12px 24px -8px rgba(12, 34, 18, 0.32);
}

.app-card-mini-phone img {
  display: block;
  width: 100%;
  height: 152px;
  object-fit: cover;
  object-position: top center;
  border-radius: 16px 16px 0 0;
  background: #ffffff;
}

.app-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, #effaf3 0%, #dcf4e4 100%);
  border: 1px solid #cde9d6;
  color: #15803d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-card-icon svg {
  width: 20px;
  height: 20px;
}

.app-card-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eff9f2;
  color: #15803d;
}

.app-card h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  color: #122116;
  margin: 0 0 6px;
}

.app-card-desc {
  font-size: 0.83rem;
  line-height: 1.52;
  color: #58695c;
  margin: 0 0 16px;
}

.app-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.app-card-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #2c3e30;
  font-weight: 500;
}

.app-card-features li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #15803d;
  flex-shrink: 0;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid #edf3ef;
}

.app-platform-tags {
  font-size: 0.72rem;
  font-weight: 600;
  color: #637467;
}

.app-card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #15803d;
  text-decoration: none;
}

.app-card-link:hover {
  text-decoration: underline;
}

/* Bottom CTA Band on apps.html */
.apps-page-cta {
  max-width: 1260px;
  margin: 0 auto 64px;
  padding: 0 clamp(16px, 2.5vw, 36px);
}

.apps-page-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #dce9e0;
  box-shadow: 0 14px 32px -20px rgba(15, 42, 22, 0.16);
  flex-wrap: wrap;
}

.apps-page-cta-box h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #122116;
  margin: 0 0 4px;
}

.apps-page-cta-box p {
  font-size: 0.86rem;
  color: #5b6c5f;
  margin: 0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .apps-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .apps-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .apps-section {
    padding: 54px 0 64px;
  }

  .phones-duo {
    gap: 8px;
  }

  .phone-3d {
    width: 152px;
  }

  .phone-3d-shell {
    border-radius: 26px;
    padding: 6px;
  }

  .phone-3d-screen {
    border-radius: 20px;
  }

  .phone-island {
    width: 44px;
    height: 12px;
    top: 6px;
  }

  .apps-suite-tiles {
    grid-template-columns: 1fr;
  }

  .apps-catalog-grid {
    grid-template-columns: 1fr;
  }

  .apps-page-cta-box {
    padding: 22px 20px;
  }
}
