/* =========================================
   APPLICATION PAGES - REUSABLE COMPONENTS
   ========================================= */

/* --- Section Layouts --- */
.app-section-padding {
  padding: 8rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}

/* 1. Split Section (Text Left, Image Right) 
   Used for "Work Smarter" style layout */
.app-split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Mobile: Stack vertically */
@media (max-width: 992px) {
  .app-split-section {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Variant: Image Left, Text Right */
.app-split-section.reverse {
  direction: rtl; /* Simple hack for grid swap, reset inner direction */
}

/* --- Content Side --- */
.app-content-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  direction: ltr; /* Reset direction */
}

.app-eyebrow {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-accent, #64ffda); /* Default to accent, fallback to cyan */
  margin-bottom: 1rem;
  display: block;
}

.app-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 3rem; /* Large impact title */
  line-height: 1.1;
  font-weight: 600;
  color: var(--c-text-primary, #ffffff);
  margin-bottom: 1.5rem;
}

.app-description-large {
  font-family: "Inter", sans-serif;
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--c-text-secondary, rgba(255, 255, 255, 0.7));
  margin-bottom: 3rem;
  max-width: 90%;
}

/* --- Feature Grid (2x2) within Content Side --- */
.app-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 600px) {
  .app-feature-grid {
    grid-template-columns: 1fr;
  }
}

.app-feature-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-feature-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-text-primary, #ffffff);
}

.app-feature-desc {
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--c-text-tertiary, rgba(255, 255, 255, 0.5));
}

/* --- Image Side --- */
.app-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  direction: ltr; /* Reset direction */
}

.app-image-container img {
  width: 100%;
  height: auto;
  max-width: 600px;
  object-fit: contain;
  border-radius: 16px;
  /* box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); */ /* Optional shadow */
}

/* --- 2. GRID SECTIONS --- */

/* 2. Mixed Grid Section (5 Cards: 2 Top, 3 Bottom) */
.app-centered-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-mixed-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}

/* 2-Column Grid */
.app-grid-2-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .app-grid-2-cols {
    grid-template-columns: 1fr;
  }
}

/* 4-Column Grid */
.app-grid-4-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1200px) {
  .app-grid-4-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .app-grid-4-cols {
    grid-template-columns: 1fr;
  }
}

/* Asymmetric Grid (40/60 Split) */
.app-grid-asymmetric {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 1.5rem;
}

.w-40 {
  grid-column: span 5;
}

.w-60 {
  grid-column: span 5;
}

@media (max-width: 900px) {
  .app-grid-asymmetric {
    grid-template-columns: 1fr;
  }
  .w-40,
  .w-60 {
    grid-column: span 1;
  }
}

.app-grid-card {
  background: rgba(255, 255, 255, 0.03); /* Dark Transparent */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff; /* White text for dark mode */
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow: hidden;
  position: relative;
  min-height: 200px;
  max-height: 550px;
}

/* Maintain larger height for Mixed Grid (Platform Section) */
.app-mixed-grid .app-grid-card {
  min-height: auto; /* Allow card to shrink */
  height: auto; /* Stop stretching to row height if it causes gaps */
  max-height: 420px; /* User requested limit */
  padding: 2.5rem;
}

.app-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f0f0f0; /* placeholder */
}

.app-card-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff; /* White title */
  margin-bottom: 0.5rem;
}

.app-card-desc {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7); /* Light grey text */
}

.app-card-image {
  margin-top: auto;
  width: 100%; /* Force full width */
  height: 220px; /* Fixed height for stretch */
  border-radius: 8px;
  /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); */
  display: block;
  object-fit: fill; /* Stretch image (user request: "fit stretch, no cut") */
}

/* Constrain images in compact grids (Asymmetric, 2-Cols, 4-Cols) to reduce card height */
/* 2-Column Grid Specifics: Enforce 3:2 Aspect Ratio per user request */
.app-grid-2-cols .app-card-image,
.app-grid-2-cols .app-showcase-media {
  min-height: 300px;
  width: 100%;
  object-fit: fill; /* Scaled fill as requested */
}

/* Span logic for 2 top, 3 bottom */
.span-3 {
  grid-column: span 3;
} /* For top row */
.span-2 {
  grid-column: span 2;
} /* For bottom row */

@media (max-width: 900px) {
  .app-mixed-grid {
    grid-template-columns: 1fr;
  }
  .span-3,
  .span-2 {
    grid-column: span 1;
  }
}

/* --- 3. SHOWCASE GRID (Alternate Layout) --- */
.app-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .app-showcase-grid {
    grid-template-columns: 1fr;
  }
}

.app-card-showcase {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-showcase-media {
  height: 200px;
  width: 100%;
  display: block; /* Removed flex centering */
  padding: 0;
  position: relative;
  background: transparent !important; /* Force no background */
}

/* Gradients for backgrounds */
.app-gradient-1 {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.2),
    rgba(168, 85, 247, 0.2)
  );
}
.app-gradient-2 {
  background: linear-gradient(
    135deg,
    rgba(236, 72, 153, 0.2),
    rgba(239, 68, 68, 0.2)
  );
}
.app-gradient-3 {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.2),
    rgba(34, 211, 238, 0.2)
  );
}

.app-showcase-img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: fill; /* Stretch to fill container */
  filter: none; /* Remove drop shadow */
  transition: transform 0.3s ease;
}

.app-card-showcase:hover .app-showcase-img {
  transform: scale(1.05);
}

.app-showcase-content {
  padding: 1.5rem;
}

.app-showcase-content h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.app-showcase-content p {
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* --- 4. FEATURED GRID (Center Highlight) --- */
.app-featured-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr; /* Center one slightly wider */
  gap: 1.5rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .app-featured-grid {
    grid-template-columns: 1fr;
  }
}

.app-card-featured {
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease;
}
.app-card-featured:hover {
  transform: translateY(-5px);
}

.app-card-dark {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
}

.app-card-light {
  background: rgba(255, 255, 255, 0.08); /* Slightly lighter for emphasis */
  backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.2);
}

.app-card-image-wrapper {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-card-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Animations (Reuse global classes if avail, else define simplified) */
.anim-fade,
.anim-up,
.anim-text {
  /* Assumes GSAP handles opacity/transform 
     We can set initial state if needed, but usually handled by JS */
}
