﻿/* ==========================================================================
   PdfMag Landing Page - Unified Card & Grid System
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (scoped to landing)
   -------------------------------------------------------------------------- */
:root {
  --pm-card-radius: 16px;
  --pm-card-padding: 24px;
  --pm-card-padding-sm: 18px;
  --pm-card-bg: #ffffff;
  --pm-card-border: #e2e8f0;
  --pm-card-shadow: 0 4px 16px rgba(16, 24, 40, 0.06), 0 1px 4px rgba(16, 24, 40, 0.04);
  --pm-card-shadow-hover: 0 12px 28px rgba(16, 24, 40, 0.1), 0 4px 12px rgba(16, 24, 40, 0.06);
  --pm-grid-gap: 20px;
  --pm-grid-gap-sm: 14px;
  --pm-section-py: 48px;
  --pm-section-py-sm: 32px;
}

/* --------------------------------------------------------------------------
   .pm-card - Universal card component
   -------------------------------------------------------------------------- */
.pm-card {
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-card-border);
  border-radius: var(--pm-card-radius);
  padding: var(--pm-card-padding);
  box-shadow: var(--pm-card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

/* Focus styles for keyboard navigation */
.pm-card:focus-within {
  outline: 2px solid var(--pm-primary, #3498db);
  outline-offset: 2px;
}

/* Hover effect - only on devices with hover capability */
@media (hover: hover) and (pointer: fine) {
  .pm-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pm-card-shadow-hover);
    border-color: #cbd5e1;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .pm-card {
    transition: none;
  }
  .pm-card:hover {
    transform: none;
  }
}

/* Card accent variations */
.pm-card--accent {
  border-top: 4px solid var(--pm-accent, #10b981);
}

.pm-card--info {
  border-top: 4px solid var(--pm-primary, #3498db);
}

.pm-card--highlight {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Card internal structure */
.pm-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--pm-primary, #3498db);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.pm-card__icon svg {
  width: 22px;
  height: 22px;
}

.pm-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark, #2c3e50);
  margin: 0 0 10px;
  line-height: 1.35;
}

.pm-card__desc {
  font-size: 0.9375rem;
  color: var(--pm-muted, #64748b);
  margin: 0 0 12px;
  line-height: 1.55;
  flex-grow: 1;
}

.pm-card__list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-dark, #2c3e50);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.pm-card__list li {
  margin-bottom: 6px;
}

.pm-card__list li:last-child {
  margin-bottom: 0;
}

.pm-card__cta {
  margin-top: auto;
  padding-top: 16px;
}

/* --------------------------------------------------------------------------
   .pm-grid - Responsive grid layout
   -------------------------------------------------------------------------- */
.pm-grid {
  display: grid;
  gap: var(--pm-grid-gap);
  grid-template-columns: 1fr;
}

/* Two column layout */
.pm-grid--2 {
  grid-template-columns: repeat(1, 1fr);
}

/* Three column layout */
.pm-grid--3 {
  grid-template-columns: repeat(1, 1fr);
}

/* Responsive breakpoints */
@media (min-width: 640px) {
  .pm-grid--2,
  .pm-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pm-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Equal height cards in grid */
.pm-grid > .pm-card {
  height: 100%;
}

/* --------------------------------------------------------------------------
   .pm-section - Consistent section spacing
   -------------------------------------------------------------------------- */
.pm-section {
  padding: var(--pm-section-py) 0;
}

.pm-section--alt {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-top: 1px solid var(--pm-border, #e5e7eb);
  border-bottom: 1px solid var(--pm-border, #e5e7eb);
}

.pm-section--dark {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
}

.pm-section__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.pm-section__header {
  text-align: center;
  margin-bottom: 32px;
}

.pm-section__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark, #2c3e50);
  margin: 0 0 12px;
}

.pm-section__subtitle {
  font-size: 1.0625rem;
  color: var(--pm-muted, #64748b);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Hero section updates
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px;
  background-color: #0b0d0f;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  text-align: center;
}

.hero__logo {
  height: 80px;
  width: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.hero__title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  line-height: 1.2;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 24px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.5;
}

.hero__bullets {
  max-width: 580px;
  margin: 0 auto 28px;
  text-align: left;
}

.hero__bullets ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero__bullets li {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
}

.hero__bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--pm-accent, #10b981);
  font-weight: 600;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.hero__ctas .btn {
  min-width: 160px;
  padding: 12px 24px;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Mobile responsive adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 639px) {
  :root {
    --pm-card-padding: var(--pm-card-padding-sm);
    --pm-grid-gap: var(--pm-grid-gap-sm);
    --pm-section-py: var(--pm-section-py-sm);
  }

  .pm-card__title {
    font-size: 1.0625rem;
  }

  .pm-card__desc,
  .pm-card__list {
    font-size: 0.875rem;
  }

  .pm-section__title {
    font-size: 1.5rem;
  }

  .pm-section__subtitle {
    font-size: 1rem;
  }

  .hero {
    min-height: 380px;
    padding: 40px 16px;
  }

  .hero__logo {
    height: 60px;
  }

  .hero__bullets li {
    font-size: 0.875rem;
  }

  .hero__ctas .btn {
    width: 100%;
    min-width: auto;
  }
}

/* Ensure touch targets are at least 44px for accessibility */
@media (pointer: coarse) {
  .pm-card a,
  .pm-card button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* --------------------------------------------------------------------------
   Step card variations (numbered steps with images)
   -------------------------------------------------------------------------- */
.pm-card__step-header {
  margin-bottom: 12px;
}

.pm-card__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pm-primary, #3498db);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

.pm-card__step-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 250px;
  background: #f5f8fb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}

.pm-card__step-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .pm-card__step-image:hover img {
    transform: scale(1.03);
  }
}

/* --------------------------------------------------------------------------
   Utility classes
   -------------------------------------------------------------------------- */
.pm-text-center {
  text-align: center;
}

.pm-mb-0 {
  margin-bottom: 0 !important;
}

.pm-mt-auto {
  margin-top: auto;
}
