/**
 * Content Styles v2 - Premium visual component classes for styled content pages
 * All colors use CSS custom properties for theme compatibility
 * Prefix: gc- (generic content, reusable for any content)
 */

/* ==========================================================================
   Page Content Base
   ========================================================================== */
.page-content { margin: 0 auto; }
.page-content img { max-width: 100%; height: auto; border-radius: var(--border-radius, 0.375rem); }
.page-content h2 { margin-top: 0; margin-bottom: 1rem; }
.page-content p { margin-bottom: 1rem; }

/* Hide PHP-rendered h1 when a hero section immediately follows */
.page-content:has(> h1:first-child + .gc-breakout) > h1:first-child,
.page-content:has(> h1:first-child + [class*="gc-hero"]) > h1:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* ==========================================================================
   Layout Breakout - Escape .page-content AND .container for full-bleed
   ========================================================================== */
.gc-breakout {
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
}

/* ==========================================================================
   Sections - Full-width blocks with background colors for visual rhythm
   ========================================================================== */
.gc-section { padding: 4.5rem 2rem; }
.gc-section-light { background-color: #f8f9fa; padding: 4.5rem 2rem; }
.gc-section-surface { background-color: var(--surface-color, #ffffff); padding: 4.5rem 2rem; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.gc-section-primary { background-color: var(--primary-color, #0d6efd); color: #fff; padding: 4.5rem 2rem; }
.gc-section-primary h2, .gc-section-primary h3, .gc-section-primary p { color: #fff; }
.gc-section-primary .gc-stat-number { color: #fff; }
.gc-section-primary a:not(.btn) { color: rgba(255,255,255,0.9); text-decoration: underline; }
.gc-section-dark { background-color: #1a1a2e; color: #e0e0e0; padding: 4.5rem 2rem; }
.gc-section-dark h2, .gc-section-dark h3 { color: #fff; }
.gc-section-gradient { background: linear-gradient(135deg, var(--primary-color, #0d6efd), var(--secondary-color, #6610f2)); color: #fff; padding: 4.5rem 2rem; }
.gc-section-gradient h2, .gc-section-gradient h3, .gc-section-gradient p, .gc-section-gradient .lead { color: #fff; }

/* Section heading typography */
.gc-section h2, .gc-section-light h2, .gc-section-surface h2,
.gc-section-primary h2, .gc-section-dark h2, .gc-section-gradient h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Section subtitle */
.gc-section-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: #6c757d;
    max-width: 700px;
    margin: -0.5rem auto 2.5rem;
    line-height: 1.6;
    text-align: center;
}
.gc-section-primary .gc-section-subtitle,
.gc-section-gradient .gc-section-subtitle,
.gc-section-dark .gc-section-subtitle { color: rgba(255,255,255,0.8); }

/* Decorated section - subtle radial gradient accent */
.gc-section-decorated { position: relative; overflow: hidden; }
.gc-section-decorated::before {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.04) 0%, transparent 70%);
    top: -120px;
    right: -120px;
    pointer-events: none;
    z-index: 0;
}
.gc-section-decorated > * { position: relative; z-index: 1; }

/* ==========================================================================
   Hero Section
   ========================================================================== */
.gc-hero { padding: 5.5rem 2rem; text-align: center; }
.gc-hero h2 {
    font-size: clamp(1.75rem, 4vw, 3rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}
.gc-hero .lead {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    max-width: 720px;
    margin: 0 auto 2rem;
    opacity: 0.95;
    line-height: 1.6;
}
.gc-hero-img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius, 0.75rem);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.08);
}

/* Hero badge - pill above headline */
.gc-hero-badge {
    display: inline-block;
    padding: 0.4rem 1.15rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Hero buttons */
.gc-hero .btn-lg {
    padding: 0.85rem 2.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius, 0.5rem);
}

/* ==========================================================================
   Grid Layouts (CSS Grid, responsive)
   ========================================================================== */
.gc-grid-2, .gc-grid-3, .gc-grid-4 { display: grid; gap: 2rem; }
.gc-grid-2 { grid-template-columns: repeat(2, 1fr); }
.gc-grid-3 { grid-template-columns: repeat(3, 1fr); }
.gc-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
    .gc-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .gc-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .gc-grid-2, .gc-grid-3, .gc-grid-4 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Cards
   ========================================================================== */
.gc-card {
    background: var(--surface-color, #ffffff);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--border-radius, 0.5rem);
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}
.gc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}
.gc-card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; color: var(--text-color, #212529); }
.gc-card p:last-child { margin-bottom: 0; }

/* Card icon (flat) */
.gc-card-icon { font-size: 2rem; color: var(--primary-color, #0d6efd); margin-bottom: 0.75rem; line-height: 1; }
.gc-card.text-center .gc-card-icon { display: block; }

/* Card icon circle (tinted background) */
.gc-card-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    color: var(--primary-color, #0d6efd);
}
.gc-card.text-center .gc-card-icon-circle { margin-left: auto; margin-right: auto; }

/* Card accent - colored top border */
.gc-card-accent { border-top: 3px solid var(--primary-color, #0d6efd); }
.gc-card-accent-secondary { border-top: 3px solid var(--secondary-color, #6610f2); }
.gc-card-accent-success { border-top: 3px solid #198754; }
.gc-card-accent-warning { border-top: 3px solid #ffc107; }
.gc-card-accent-danger { border-top: 3px solid #dc3545; }

/* Featured card (for pricing, highlights) */
.gc-card-featured {
    border: 2px solid var(--primary-color, #0d6efd);
    position: relative;
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(13, 110, 253, 0.15);
    z-index: 1;
}

/* Card badge (positioned at top) */
.gc-card-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color, #0d6efd);
    color: #fff;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ==========================================================================
   Statistics Display
   ========================================================================== */
.gc-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.5rem; text-align: center; }
.gc-stat { flex: 1; min-width: 160px; }
.gc-stat-number { font-size: 2.5rem; font-weight: 700; line-height: 1.1; color: var(--primary-color, #0d6efd); }
.gc-stat-number small { font-size: 0.5em; font-weight: 400; }
.gc-stat-label { font-size: 0.9rem; margin-top: 0.35rem; opacity: 0.85; }

/* Stats with vertical separators */
.gc-stat-bordered { padding: 0 2rem; border-right: 1px solid rgba(255,255,255,0.2); }
.gc-stat-bordered:last-child { border-right: none; }
.gc-section-light .gc-stat-bordered,
.gc-section .gc-stat-bordered { border-right-color: rgba(0,0,0,0.1); }

/* ==========================================================================
   Split Layout (Image + Text side by side)
   ========================================================================== */
.gc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.gc-split-reverse { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.gc-split-reverse .gc-split-img { order: 2; }
.gc-split-reverse .gc-split-text { order: 1; }
.gc-split-img img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius, 0.5rem);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.04);
}
.gc-split-text h2 { margin-top: 0; }
.gc-split-text h3 { margin-top: 0; }

@media (max-width: 768px) {
    .gc-split, .gc-split-reverse { grid-template-columns: 1fr; }
    .gc-split-reverse .gc-split-img { order: 1; }
    .gc-split-reverse .gc-split-text { order: 2; }
}

/* ==========================================================================
   Process Steps
   ========================================================================== */
.gc-steps { display: flex; flex-direction: column; gap: 1.75rem; }
.gc-step { display: flex; gap: 1.5rem; align-items: flex-start; }
.gc-step-number {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: var(--primary-color, #0d6efd);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}
.gc-step-content h3 { margin-top: 0; margin-bottom: 0.5rem; font-size: 1.15rem; }
.gc-step-content p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Styled Lists
   ========================================================================== */
.gc-check-list, .gc-x-list { list-style: none; padding-left: 0; }
.gc-check-list li, .gc-x-list li { padding: 0.4rem 0 0.4rem 1.75rem; position: relative; line-height: 1.6; }
.gc-check-list li::before { content: "\f26b"; font-family: "bootstrap-icons"; position: absolute; left: 0; color: #198754; font-weight: 700; }
.gc-x-list li::before { content: "\f62a"; font-family: "bootstrap-icons"; position: absolute; left: 0; color: #dc3545; font-weight: 700; }

/* ==========================================================================
   Tables
   ========================================================================== */
.gc-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius, 0.5rem);
    overflow: hidden;
    border: 1px solid #dee2e6;
}
.gc-table { width: 100%; border-collapse: collapse; margin-bottom: 0; }
.gc-table th { background: var(--primary-color, #0d6efd); color: #fff; padding: 1rem 1.25rem; text-align: left; font-weight: 600; }
.gc-table td { padding: 0.9rem 1.25rem; border-bottom: 1px solid #dee2e6; }
.gc-table tbody tr:last-child td { border-bottom: none; }
.gc-table tr:nth-child(even) td { background: #f8f9fa; }
.gc-table tbody tr:hover td { background: rgba(13, 110, 253, 0.03); transition: background 0.15s ease; }
.gc-table .gc-highlight { background: rgba(13, 110, 253, 0.08) !important; font-weight: 600; color: var(--primary-color, #0d6efd); }

/* ==========================================================================
   Call to Action
   ========================================================================== */
.gc-cta { text-align: center; padding: 5rem 2rem; }
.gc-cta h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    letter-spacing: -0.02em;
}
.gc-cta p { max-width: 700px; margin: 0 auto 2rem; font-size: 1.1rem; line-height: 1.6; }
.gc-cta .btn { padding: 0.85rem 2.25rem; font-size: 1.1rem; font-weight: 600; }

/* ==========================================================================
   FAQ (Bootstrap Accordion wrapper)
   ========================================================================== */
.gc-faq { max-width: 800px; margin: 0 auto; }
.gc-faq .accordion-button { font-weight: 600; padding: 1.15rem 1.25rem; }
.gc-faq .accordion-button:not(.collapsed) { background-color: rgba(13, 110, 253, 0.05); color: var(--primary-color, #0d6efd); }
.gc-faq .accordion-body { line-height: 1.7; padding: 1.25rem; }

/* ==========================================================================
   Decorative Utilities
   ========================================================================== */
/* Horizontal accent line */
.gc-divider {
    width: 60px;
    height: 3px;
    background: var(--primary-color, #0d6efd);
    border: none;
    margin: 1.5rem auto;
    border-radius: 2px;
}

/* Gradient text */
.gc-text-gradient {
    background: linear-gradient(135deg, var(--primary-color, #0d6efd), var(--secondary-color, #6610f2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Article Enhancements
   ========================================================================== */
.gc-callout { border-left: 4px solid var(--primary-color, #0d6efd); background: #f8f9fa; padding: 1.25rem 1.5rem; margin: 1.5rem 0; border-radius: 0 var(--border-radius, 0.375rem) var(--border-radius, 0.375rem) 0; }
.gc-callout-info { border-left-color: #0dcaf0; background: #f0faff; }
.gc-callout-success { border-left-color: #198754; background: #f0faf4; }
.gc-callout-warning { border-left-color: #ffc107; background: #fffdf0; }
.gc-callout p:last-child { margin-bottom: 0; }

.gc-takeaway { background: linear-gradient(135deg, #f8f9fa, #e9ecef); border: 1px solid #dee2e6; border-radius: var(--border-radius, 0.375rem); padding: 1.5rem; margin: 2rem 0; }
.gc-takeaway h3, .gc-takeaway h4 { margin-top: 0; color: var(--primary-color, #0d6efd); }

.gc-tldr { background: var(--surface-color, #ffffff); border: 2px solid var(--primary-color, #0d6efd); border-radius: var(--border-radius, 0.375rem); padding: 1.25rem; margin-bottom: 2rem; }
.gc-tldr h4 { margin-top: 0; color: var(--primary-color, #0d6efd); font-weight: 700; }

.gc-img-caption { text-align: center; margin: 1.5rem 0; }
.gc-img-caption img { max-width: 100%; border-radius: var(--border-radius, 0.375rem); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.gc-img-caption small { display: block; margin-top: 0.5rem; color: #6c757d; font-style: italic; }

.gc-pull-quote { border-left: 4px solid var(--primary-color, #0d6efd); padding: 1rem 1.5rem; margin: 2rem 0; font-size: 1.15rem; font-style: italic; color: #495057; }
.gc-pull-quote p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Utility: Buttons within content sections
   ========================================================================== */
.gc-section .btn-primary, .gc-hero .btn-primary, .gc-cta .btn-primary {
    background-color: var(--btn-primary-bg, var(--primary-color, #0d6efd));
    border-color: var(--btn-primary-bg, var(--primary-color, #0d6efd));
    color: var(--btn-primary-text, #fff);
}
.gc-section .btn-primary:hover, .gc-hero .btn-primary:hover, .gc-cta .btn-primary:hover {
    background-color: var(--btn-primary-hover-bg, #0b5ed7);
    border-color: var(--btn-primary-hover-bg, #0b5ed7);
}
.gc-section .btn-outline-primary, .gc-hero .btn-outline-primary {
    color: var(--btn-primary-bg, var(--primary-color, #0d6efd));
    border-color: var(--btn-primary-bg, var(--primary-color, #0d6efd));
}
.gc-section-primary .btn, .gc-section-gradient .btn { background: #fff; color: var(--primary-color, #0d6efd); border-color: #fff; font-weight: 600; }
.gc-section-primary .btn:hover, .gc-section-gradient .btn:hover { background: #f0f0f0; border-color: #f0f0f0; }

/* Outline buttons on dark backgrounds */
.gc-section-primary .btn-outline-light, .gc-section-gradient .btn-outline-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}
.gc-section-primary .btn-outline-light:hover, .gc-section-gradient .btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
}

/* ==========================================================================
   Responsive Overrides
   ========================================================================== */
@media (max-width: 768px) {
    .gc-hero { padding: 3.5rem 1.25rem; }
    .gc-section, .gc-section-light, .gc-section-surface,
    .gc-section-primary, .gc-section-dark, .gc-section-gradient { padding: 3rem 1.25rem; }
    .gc-cta { padding: 3.5rem 1.25rem; }
    .gc-card { padding: 1.5rem; }
    .gc-card-featured { transform: scale(1); }
    .gc-stat-bordered { border-right: none; padding: 1rem 0; }
    .gc-split, .gc-split-reverse { gap: 2rem; }
    .gc-section-subtitle { margin-bottom: 1.5rem; }
}

@media (max-width: 576px) {
    .gc-hero .btn-lg { display: block; width: 100%; }
    .gc-hero .btn-lg + .btn-lg { margin-left: 0 !important; margin-top: 0.75rem; }
    .gc-hero h2 { font-size: 1.65rem; }
    .gc-stats { gap: 1.5rem; }
    .gc-stat { min-width: 120px; }
}
