/**
 * Template: Expertise Page (tmpl-expertise)
 * ==========================================
 *
 * Layout and responsive styles for the expertise overview page.
 * Covers the expertise grid of 6 story cards and the CTA section.
 *
 * Depends on:
 *   - custom-tokens.css (design tokens)
 *   - global-classes.css (.x-card, .x-card-story, .x-section-soft, .x-container, .x-icon-sticker)
 *   - typography.css (headings, .x-highlight)
 *
 * Requirements: 16.1, 16.2, 16.3, 16.4, 23.3
 *
 * @package Xenopz
 */

/* =========================================================================
   EXPERTISE HEADER
   ========================================================================= */

.x-expertise-header {
    text-align: center;
    margin-bottom: var(--x-space-xl);
}

.x-expertise-header h2 {
    margin: 0 0 var(--x-space-sm);
}

.x-expertise-intro {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--x-muted);
    max-width: 640px;
    margin: 0 auto;
}

/* =========================================================================
   EXPERTISE GRID (6 cards, 3-column layout)
   ========================================================================= */

/**
 * .x-expertise-grid
 * 3-column grid on desktop, 2-column on tablet, 1-column on mobile.
 * Equal-height cards with consistent gap.
 */
.x-expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--x-space-lg);
}

/* =========================================================================
   EXPERTISE CARD (extends .x-card .x-card-story)
   ========================================================================= */

/**
 * .x-expertise-card
 * Clickable story card with icon, title, and description.
 * Uses .x-card and .x-card-story base styles.
 */
.x-expertise-card {
    text-decoration: none;
    color: inherit;
    padding: var(--x-space-md);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--x-space-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.x-expertise-card:hover,
.x-expertise-card:focus-visible {
    box-shadow: var(--x-shadow-hover);
    transform: translateY(-2px);
    border-color: var(--x-orange-500);
    text-decoration: none;
    color: inherit;
}

.x-expertise-card:focus-visible {
    outline: 2px solid var(--x-orange-500);
    outline-offset: 2px;
}

.x-expertise-card .x-icon-sticker {
    margin-bottom: var(--x-space-xs);
}

.x-expertise-card .x-card-story__title {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
}

.x-expertise-card .x-card-story__text {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--x-muted);
}

/* =========================================================================
   CTA SECTION
   ========================================================================= */

.x-cta-section {
    padding: var(--x-space-2xl) 0;
}

.x-cta-block {
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}

.x-cta-block__heading {
    margin: 0 0 var(--x-space-sm);
}

.x-cta-block__text {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--x-ink);
    margin: 0 0 var(--x-space-lg);
}

.x-cta-block__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--x-space-sm);
    justify-content: center;
    align-items: center;
}

/* =========================================================================
   RESPONSIVE: TABLET (768px - 991px)
   ========================================================================= */

@media (max-width: 991px) {
    .x-expertise-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--x-space-md);
    }
}

/* =========================================================================
   RESPONSIVE: MOBILE (< 768px)
   ========================================================================= */

@media (max-width: 767px) {
    .x-expertise-grid {
        grid-template-columns: 1fr;
        gap: var(--x-space-md);
    }

    .x-expertise-header {
        text-align: left;
        margin-bottom: var(--x-space-lg);
    }

    .x-expertise-intro {
        max-width: 100%;
    }

    .x-cta-block {
        text-align: left;
    }

    .x-cta-block__buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .x-cta-block__buttons .x-btn-primary,
    .x-cta-block__buttons .x-btn-secondary {
        justify-content: center;
        text-align: center;
    }
}
