/* ============================================
   PAGES — Shared subpage patterns
   ============================================
   Used by all inner pages (About, Contact, How It Works,
   Storage Calculator, and features/*). Built entirely on the
   V2 design tokens defined in base.css.

   Contents:
   1. Page Hero (compact hero with breadcrumb)
   2. Page Sections (spacing + alternating surfaces)
   3. Card Grids (icon cards)
   4. Split Layouts (text + visual)
   5. Vertical Timeline (numbered processes)
   6. Comparison / Pricing Tables
   7. Pricing Cards
   8. Standalone FAQ list (no sidebar)
   9. Calculator Embed
   10. Utility badges & misc
   ============================================ */


/* ── 1. Page Hero ─────────────────────────── */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: 170px 0 70px;
    background: var(--background-color);
}

.page-hero-ambient {
    position: absolute;
    inset: 0;
    background: var(--gradient-ambient);
    pointer-events: none;
}

.page-hero-dots {
    position: absolute;
    top: 0;
    right: 0;
    width: 45%;
    height: 100%;
    background-image: radial-gradient(rgba(234, 69, 38, 0.10) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.6), transparent);
    mask-image: linear-gradient(to left, rgba(0,0,0,0.6), transparent);
    pointer-events: none;
}

.page-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-full);
    box-shadow: var(--shadow-xs);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.page-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-color);
}

.page-breadcrumb a:hover {
    color: var(--primary-color);
}

.page-breadcrumb i {
    font-size: 0.7rem;
    color: var(--gray-400);
}

.page-breadcrumb .page-breadcrumb-current {
    color: var(--primary-color);
}

.page-hero-title {
    font-family: var(--font-primary);
    font-size: clamp(2.2rem, 4.5vw, 3.25rem);
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 20px;
    max-width: 820px;
}

.page-hero-title span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 680px;
    margin-bottom: 0;
}

.page-hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

/* Buttons — ported from hero.css so subpages don't need the
   full homepage hero stylesheet. Same tokens, same look. */
.hero-btn {
    padding: 14px 30px;
    border-radius: var(--border-radius-lg);
    font-weight: var(--weight-semibold);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all var(--dur) var(--ease);
    font-family: var(--font-primary);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    font-size: var(--text-base);
    text-decoration: none;
}

.btn-primary-masaha {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-primary);
    border: none;
}

.btn-primary-masaha:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary-lg);
    background: var(--gradient-primary-hover);
    color: #fff;
}

.btn-primary-masaha:active {
    transform: translateY(0);
}

.btn-outline-masaha {
    border: 2px solid var(--border-color, #E5E7EB);
    color: var(--gray-700, #374151);
    background: var(--surface, #fff);
}

.btn-outline-masaha:hover {
    border-color: var(--gray-400, #9CA3AF);
    color: var(--gray-900, #111827);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}


/* ── 2. Page Sections ─────────────────────── */
.pg-section {
    position: relative;
    padding: 90px 0;
    overflow: hidden;
}

.pg-section-alt {
    background: var(--surface);
}

.pg-section .section-title {
    margin-bottom: 60px;
}

/* Ambient glow reusable inside any pg-section */
.pg-ambient {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 69, 38, 0.05) 0%, transparent 70%);
    top: -150px;
    right: -150px;
    pointer-events: none;
}

.pg-ambient-2 {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
    bottom: -120px;
    left: -120px;
    pointer-events: none;
}


/* ── 3. Card Grids ────────────────────────── */
.pg-grid {
    display: grid;
    gap: 24px;
}

.pg-grid-2 { grid-template-columns: repeat(2, 1fr); }
.pg-grid-3 { grid-template-columns: repeat(3, 1fr); }
.pg-grid-4 { grid-template-columns: repeat(4, 1fr); }

.pg-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: 32px 28px;
    box-shadow: var(--shadow-card);
    transition: var(--transition), box-shadow 250ms var(--ease);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pg-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--primary-150);
}

.pg-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-100);
    color: var(--primary-color);
    border-radius: var(--border-radius-lg);
    font-size: 1.35rem;
    margin-bottom: 20px;
    transition: var(--transition-spring);
}

.pg-card:hover .pg-card-icon {
    background: var(--gradient-primary);
    color: var(--text-white);
    transform: scale(1.06) rotate(-4deg);
    box-shadow: var(--shadow-primary);
}

.pg-card-title {
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.pg-card-text {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.pg-card-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
}

.pg-card-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.92rem;
    color: var(--text-secondary);
    padding: 5px 0;
}

.pg-card-list li i {
    color: var(--success-color);
    font-size: 0.8rem;
    margin-top: 5px;
    flex-shrink: 0;
}


/* ── 4. Split Layouts ─────────────────────── */
.pg-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.pg-split-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background: var(--primary-100);
    color: var(--primary-color);
    border-radius: var(--border-radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 18px;
}

.pg-split-title {
    font-family: var(--font-primary);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 18px;
}

.pg-split-text {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Large surface card used as the visual half of a split */
.pg-panel {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-2xl);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.pg-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.pg-panel-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: var(--text-white);
    border-radius: var(--border-radius-xl);
    font-size: 1.6rem;
    margin-bottom: 22px;
    box-shadow: var(--shadow-primary);
}

.pg-panel-title {
    font-family: var(--font-primary);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.pg-panel-text {
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Mini stat chips inside panels */
.pg-panel-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 26px;
}

.pg-panel-stat {
    background: var(--gray-50);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    padding: 16px;
    text-align: center;
}

.pg-panel-stat-value {
    display: block;
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.pg-panel-stat-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 4px;
}


/* ── 5. Vertical Timeline ─────────────────── */
.pg-timeline {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    padding-left: 0;
    list-style: none;
}

.pg-timeline::before {
    content: '';
    position: absolute;
    top: 28px;
    bottom: 28px;
    left: 27px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-200), var(--border-color));
}

.pg-timeline-item {
    position: relative;
    display: flex;
    gap: 28px;
    padding-bottom: 40px;
}

.pg-timeline-item:last-child {
    padding-bottom: 0;
}

.pg-timeline-num {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: var(--text-white);
    border-radius: 50%;
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 800;
    box-shadow: var(--shadow-primary);
}

.pg-timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: 24px 28px;
    box-shadow: var(--shadow-card);
    flex: 1;
    transition: var(--transition);
}

.pg-timeline-item:hover .pg-timeline-content {
    box-shadow: var(--shadow-card-hover);
    border-color: var(--primary-150);
    transform: translateX(4px);
}

.pg-timeline-title {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.pg-timeline-text {
    font-size: 0.94rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 0;
}


/* ── 6. Comparison / Data Tables ──────────── */
.pg-table-wrap {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-2xl);
    box-shadow: var(--shadow-card);
    overflow-x: auto;
}

.pg-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.pg-table th,
.pg-table td {
    padding: 18px 22px;
    text-align: left;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-light);
}

.pg-table thead th {
    background: var(--gray-50);
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--gray-900);
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.pg-table tbody th {
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
}

.pg-table td {
    color: var(--text-secondary);
}

.pg-table tbody tr:last-child th,
.pg-table tbody tr:last-child td {
    border-bottom: none;
}

.pg-table tbody tr {
    transition: background-color 150ms var(--ease);
}

.pg-table tbody tr:hover {
    background: var(--primary-50);
}

.pg-table .pg-table-price {
    font-family: var(--font-primary);
    font-weight: 800;
    color: var(--primary-color);
    white-space: nowrap;
}


/* ── 7. Pricing Cards ─────────────────────── */
.pg-price-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-2xl);
    padding: 36px 32px;
    box-shadow: var(--shadow-card);
    text-align: center;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pg-price-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--primary-150);
}

.pg-price-card.pg-price-featured {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-primary-lg);
}

.pg-price-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: 6px 18px;
    border-radius: var(--border-radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.pg-price-title {
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 18px;
}

.pg-price-amount {
    font-family: var(--font-primary);
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.03em;
    line-height: 1;
}

.pg-price-amount small {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0;
}

.pg-price-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 10px 0 22px;
}

.pg-price-card .pg-card-list {
    text-align: left;
    margin-top: 0;
    margin-bottom: 24px;
    flex: 1;
}


/* ── 8. Standalone FAQ list ───────────────── */
/* Reuses .faq-item / .faq-question / .faq-answer from
   cta-faq-contact.css — this wrapper replaces the two-column
   faq-layout when there is no category sidebar. */
.pg-faq {
    max-width: 820px;
    margin: 0 auto;
}


/* ── 9. Calculator Embed ──────────────────── */
.pg-calc-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-2xl);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    overflow: hidden;
}

.pg-calc-card #calcumate-root {
    min-height: 620px;
}


/* ── 10. Utilities ────────────────────────── */
.pg-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: var(--border-radius-full);
    font-size: 0.78rem;
    font-weight: 700;
}

.pg-badge-primary { background: var(--primary-100); color: var(--primary-color); }
.pg-badge-success { background: var(--success-ghost); color: var(--success-dark); }
.pg-badge-info    { background: var(--info-ghost); color: var(--info-dark); }
.pg-badge-frost   { background: var(--frost-ghost); color: var(--frost-color); }

.pg-center { text-align: center; }

.pg-section-cta {
    text-align: center;
    margin-top: 50px;
}


/* ── Responsive ───────────────────────────── */
@media (max-width: 991.98px) {
    .page-hero { padding: 150px 0 56px; }

    .pg-grid-3,
    .pg-grid-4 { grid-template-columns: repeat(2, 1fr); }

    .pg-split { grid-template-columns: 1fr; gap: 40px; }

    .pg-section { padding: 70px 0; }
}

@media (max-width: 767.98px) {
    .page-hero { padding: 130px 0 48px; }

    .pg-grid-2,
    .pg-grid-3,
    .pg-grid-4 { grid-template-columns: 1fr; }

    .pg-section { padding: 56px 0; }

    .pg-section .section-title { margin-bottom: 44px; }

    .pg-timeline::before { left: 23px; }

    .pg-timeline-item { gap: 18px; }

    .pg-timeline-num {
        width: 48px;
        height: 48px;
        font-size: 1.05rem;
    }

    .pg-timeline-content { padding: 20px 22px; }

    .pg-panel { padding: 30px 24px; }

    .pg-panel-stats { grid-template-columns: repeat(2, 1fr); }

    .pg-price-card { padding: 30px 24px; }

    .pg-table th,
    .pg-table td { padding: 14px 16px; font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
    .pg-card,
    .pg-card-icon,
    .pg-timeline-content,
    .pg-price-card {
        transition: none;
    }
}
