@layer pages {

/**
 * ═══════════════════════════════════════════════════════════════════════════
 * G-Certi CONTENT PAGES — QUANTUM DNA v2.0.0
 * ═══════════════════════════════════════════════════════════════════════════
 * 
 * Shared styles for ALL content pages:
 * - Scroll reveal (gc-reveal)
 * - Hover interactions (gc-hover-lift)
 * - Accessibility (focus-visible, reduced-motion)
 * - F-Pattern mobile layout
 * - Carousel mobile
 * - Print styles
 * 
 * @version    2.0.0
 * @updated    2026-02-11
 * ═══════════════════════════════════════════════════════════════════════════
 */


/* ═══════════════════════════════════════════════════════════════════════════
   TOKENS
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --content-accent: var(--gc-red, #a62126);
}

.gc-content-page {
    --content-surface: #ffffff;
    --content-surface-soft: #f8fafc;
    --content-border: rgba(15, 23, 42, 0.08);
    --content-shadow: 0 20px 45px rgba(15, 23, 42, 0.05);
}

.gc-content-page section {
    position: relative;
    padding-block: clamp(4rem, 6vw, 6rem);
}

.gc-content-page section:first-of-type {
    padding-top: clamp(6rem, 9vw, 8rem);
    padding-bottom: clamp(4.25rem, 7vw, 6rem);
    background:
        radial-gradient(circle at top right, rgba(166, 33, 38, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.98));
    border-bottom: 1px solid var(--content-border);
}

.gc-content-page section:first-of-type h1 {
    letter-spacing: -0.03em;
    max-width: 14ch;
}

.gc-content-page section:first-of-type p {
    max-width: 42rem;
    color: #64748b;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BASE TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */

.gc-content-page h1 {
    font-family: var(--gc-font-display, 'Manrope', sans-serif);
    font-weight: 800;
    line-height: 1.1;
}

.gc-content-page h2 {
    font-family: var(--gc-font-display, 'Manrope', sans-serif);
    font-weight: 700;
    line-height: 1.2;
}

.gc-content-page h3 {
    font-family: var(--gc-font-display, 'Manrope', sans-serif);
    font-weight: 600;
    line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.gc-content-card {
    background: white;
    border-radius: 1.5rem;
    border: 1px solid var(--content-border);
    box-shadow: var(--content-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gc-content-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.08);
}

.gc-content-page .mx-auto.max-w-2xl,
.gc-content-page .mx-auto.max-w-3xl {
    max-width: 42rem;
}

.gc-content-page .quantum-button,
.gc-content-page a[class*="btn"],
.gc-content-page button[class*="btn"] {
    border-radius: 999px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE F-PATTERN — Max 767px
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 767.98px) {
    
    /* ═══════════════════════════════════════════════════════════════════════
       HERO F-PATTERN
       ═══════════════════════════════════════════════════════════════════════ */
    
    .gc-content-page section:first-of-type {
        text-align: left;
    }
    
    .gc-content-page section:first-of-type h1 {
        text-align: left;
        font-size: clamp(1.875rem, 8vw, 2.5rem);
    }
    
    .gc-content-page section:first-of-type p {
        text-align: left;
    }
    
    /* Trust badges left */
    .gc-content-page .inline-flex.rounded-full {
        margin-left: 0;
        margin-right: auto;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════
       SECTION HEADERS F-PATTERN
       ═══════════════════════════════════════════════════════════════════════ */
    
    .gc-content-page .text-center h2 {
        text-align: left;
    }
    
    .gc-content-page .text-center p {
        text-align: left;
        margin-left: 0;
        margin-right: 0;
    }
    
    .gc-content-page .mx-auto.max-w-2xl,
    .gc-content-page .mx-auto.max-w-3xl {
        margin-left: 0;
        margin-right: 0;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════
       CARDS F-PATTERN
       ═══════════════════════════════════════════════════════════════════════ */
    
    .gc-content-card {
        border-left: 0;
        border-radius: 1.25rem;
        text-align: left;
    }
    
    .gc-content-card h3,
    .gc-content-card h4 {
        text-align: left;
    }
    
    .gc-content-card p {
        text-align: left;
    }
    
    /* Grids to 1 column */
    
    /* ═══════════════════════════════════════════════════════════════════════
       LISTS F-PATTERN
       ═══════════════════════════════════════════════════════════════════════ */
    
    .gc-content-page ul.space-y-4 > li,
    .gc-content-page ul.space-y-3 > li {
        border-left: 0;
        padding-left: 0;
        list-style: none;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════
       CTAs F-PATTERN
       ═══════════════════════════════════════════════════════════════════════ */
    
    .gc-content-page a[class*="btn"],
    .gc-content-page button[class*="btn"] {
        width: 100%;
        justify-content: center;
    }
    
    /* Flex button containers stack */
    .gc-content-page .flex.gap-4:has(a[class*="btn"]) {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════
       FEATURE BLOCKS F-PATTERN
       ═══════════════════════════════════════════════════════════════════════ */
    
    .gc-content-page .flex.items-start {
        text-align: left;
    }
    
    .gc-content-page .flex.items-start h3,
    .gc-content-page .flex.items-start h4,
    .gc-content-page .flex.items-start p {
        text-align: left;
    }
    
    /* Icons stay left */
    .gc-content-page .flex.items-start > div:first-child {
        flex-shrink: 0;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════
       STATS F-PATTERN
       ═══════════════════════════════════════════════════════════════════════ */
    
    .gc-content-page .grid.grid-cols-2,
    .gc-content-page .grid.grid-cols-3,
    .gc-content-page .grid.grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .gc-content-page .grid > div {
        text-align: left;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════
       BREADCRUMBS
       ═══════════════════════════════════════════════════════════════════════ */
    
    .gc-content-page nav[aria-label*="Breadcrumb"],
    .gc-content-page .breadcrumb {
        justify-content: flex-start;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════
       FAQ ITEMS
       ═══════════════════════════════════════════════════════════════════════ */
    
    .gc-content-page details {
        border-left: 0;
        padding-left: 0;
    }
    
    .gc-content-page details summary {
        text-align: left;
    }
    
    .gc-content-page details > div,
    .gc-content-page details > p {
        text-align: left;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════
       HORIZONTAL SCROLL CAROUSEL — Para grids con 3+ items
       ═══════════════════════════════════════════════════════════════════════ */
    
    /* Activar carrusel horizontal con clase .gc-carousel-mobile */
    .gc-content-page .gc-carousel-mobile {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 1rem;
        padding-bottom: 1rem;
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .gc-content-page .gc-carousel-mobile::-webkit-scrollbar {
        display: none !important;
    }
    
    .gc-content-page .gc-carousel-mobile > * {
        flex: 0 0 auto;
        width: 85vw;
        max-width: 320px;
        scroll-snap-align: start;
    }
    
    /* Cards más pequeñas para carrusel */
    .gc-content-page .gc-carousel-mobile .gc-carousel-card {
        width: 75vw;
        max-width: 280px;
    }
    
    /* Indicador visual de scroll */
    .gc-content-page .gc-carousel-mobile::after {
        content: '';
        flex: 0 0 1rem;
    }
    
    /* Auto-detect: grids con 3+ hijos directos → carrusel */
    .gc-content-page .grid:has(> *:nth-child(3)):not(.gc-no-carousel) {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        gap: 1rem;
        padding-bottom: 0.5rem;
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .gc-content-page .grid:has(> *:nth-child(3)):not(.gc-no-carousel)::-webkit-scrollbar {
        display: none !important;
    }
    
    .gc-content-page .grid:has(> *:nth-child(3)):not(.gc-no-carousel) > * {
        flex: 0 0 auto;
        width: 80vw;
        max-width: 300px;
        scroll-snap-align: start;
    }
    
    /* Excluir grids de stats/métricas pequeñas */
    .gc-content-page .grid.grid-cols-2:has(> *:nth-child(3)),
    .gc-content-page .grid.grid-cols-4:has(> *:nth-child(3)) {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        overflow: visible;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
    
    .gc-content-page .grid.grid-cols-2 > *,
    .gc-content-page .grid.grid-cols-4 > * {
        width: auto;
        max-width: none;
    }
    
    /* Scroll indicators — thin line bars */
    .gc-carousel-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 5px;
        padding: 0.75rem 0;
    }
    
    .gc-carousel-dots span {
        width: 14px;
        height: 2px;
        border-radius: 1px;
        background: rgba(0, 0, 0, 0.10);
        transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    
    .gc-carousel-dots span.active {
        background: var(--content-accent);
        width: 22px;
        border-radius: 1px;
        transform: none;
        opacity: 0.8;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLET — 768px to 1023px
   ═══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 768px) and (max-width: 1023px) {
    .gc-content-page section:first-of-type h1 {
        text-align: left;
    }

    .gc-content-page section:first-of-type p {
        text-align: left;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   GC-REVEAL — Scroll-triggered entrance animation (global)
   Used by IntersectionObserver in layout JS
   ═══════════════════════════════════════════════════════════════════════════ */

.gc-content-page .gc-reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.gc-content-page .gc-reveal.gc-revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stagger delays for child elements */
.gc-content-page .gc-reveal-delay-1 { transition-delay: 0.1s; }
.gc-content-page .gc-reveal-delay-2 { transition-delay: 0.2s; }
.gc-content-page .gc-reveal-delay-3 { transition-delay: 0.3s; }
.gc-content-page .gc-reveal-delay-4 { transition-delay: 0.4s; }

/* ═══════════════════════════════════════════════════════════════════════════
   GC-HOVER-LIFT — Universal card hover pattern
   ═══════════════════════════════════════════════════════════════════════════ */

.gc-content-page .gc-hover-lift {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gc-content-page .gc-hover-lift:hover {
    transform: translateY(-8px);
}

.gc-content-page .gc-hover-lift:active {
    transform: scale(0.99);
    transition-duration: 0.1s;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOCUS-VISIBLE — Accessibility keyboard navigation
   ═══════════════════════════════════════════════════════════════════════════ */

.gc-content-page a:focus-visible,
.gc-content-page button:focus-visible,
.gc-content-page summary:focus-visible,
.gc-content-page [tabindex]:focus-visible {
    outline: 3px solid var(--content-accent, #a62126);
    outline-offset: 4px;
    border-radius: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   QUANTUM TEXT GRADIENT — Reusable gradient text
   ═══════════════════════════════════════════════════════════════════════════ */

.gc-content-page .quantum-text-gradient {
    background: linear-gradient(135deg, #a62126 0%, #ff6b6b 25%, #4F46E5 50%, #818CF8 75%, #a62126 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gc-gradient-shift 4s ease infinite;
}

/* gc-gradient-shift & gc-shimmer: canonical in _core.css — removed from here */

/* ═══════════════════════════════════════════════════════════════════════════
   QUANTUM BUTTON — Shimmer CTA pattern
   ═══════════════════════════════════════════════════════════════════════════ */

.gc-content-page .quantum-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gc-content-page .quantum-button:hover {
    transform: scale(1.05);
}

.gc-content-page .quantum-button:active {
    transform: scale(0.99);
    transition-duration: 0.1s;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FAQ ITEMS — Enhanced with Quantum DNA
   ═══════════════════════════════════════════════════════════════════════════ */

.gc-content-page .gc-faq-item {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gc-content-page .gc-faq-item[open] {
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.2);
}

.gc-content-page .gc-faq-item summary::-webkit-details-marker {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIVING GRID — 80px subtle background pattern
   ═══════════════════════════════════════════════════════════════════════════ */

.gc-content-page .gc-living-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(79, 70, 229, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 70, 229, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   REDUCED MOTION — WCAG 2.3.3 compliance (applies to ALL pages)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    /* v2026.5.2: scoped wildcard removed — canonical in _core.css */
    /* Unique page-specific overrides only: */

    .gc-content-page .gc-reveal {
        opacity: 1 !important;
        transform: none !important;
    }

    .gc-content-page .quantum-text-gradient {
        animation: none !important;
    }

    .gc-content-page [style*="animation"] {
        animation: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT — Clean output for all content pages
   ═══════════════════════════════════════════════════════════════════════════ */

@media print {
    .gc-content-page {
        color: #000;
    }

    .gc-content-page .gc-reveal {
        opacity: 1;
        transform: none;
    }

    .gc-content-page .quantum-text-gradient {
        -webkit-text-fill-color: #000;
        color: #000;
    }

    .gc-content-page .gc-content-card,
    .gc-content-page .quantum-step-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }

    .gc-content-page [class*="blur-"],
    .gc-content-page [class*="animate-"] {
        filter: none;
        animation: none;
    }
}


} /* end @layer pages */

/* v20.15 — FAQ pro navigation.
   Prevents cropped category chips and gives the sticky filter a calmer mobile shape. */
.gc-faq-tabs {
    top: var(--gc-header-h, 80px) !important;
}

.gc-faq-tabs__rail {
    scroll-padding-inline: 1rem;
    padding-inline: 0.125rem 1rem;
    scrollbar-width: none;
}

.gc-faq-tabs__rail::-webkit-scrollbar {
    display: none;
}

@media (max-width: 767.98px) {
    .gc-faq-tabs {
        position: sticky;
        top: var(--gc-header-h-mobile, 72px) !important;
        padding-block: 0.55rem !important;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }

    .gc-faq-tabs .container {
        padding-inline: 1rem !important;
    }

    .gc-faq-tabs__rail {
        gap: 0.45rem !important;
        padding-bottom: 0 !important;
        -webkit-overflow-scrolling: touch;
    }

    .gc-faq-tabs__rail > button {
        min-height: 2.55rem;
        padding-inline: 0.78rem;
        border-radius: 999px;
        font-size: 0.78rem;
        box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
    }
}
