/**
 * Guide Hub Premium CSS
 * Modern, responsive, premium design for guide section
 * Uses AzGo theme tokens for perfect light/dark support
 */

/* ========================================
   HERO SECTION
   ======================================== */

.gh-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 80px 0 60px;
    text-align: center;
    color: white;
    position: relative;
    overflow: visible;
    isolation: isolate;
}

.gh-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
    z-index: 0;
}

.gh-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.gh-hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.2;
}

.gh-hero p {
    font-size: 20px;
    opacity: 0.95;
    margin: 0 0 32px;
    line-height: 1.6;
}

/* ========================================
   SEARCH BAR
   ======================================== */

.gh-search {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
    z-index: 1000;
}

.gh-search-input {
    width: 100%;
    padding: 16px 56px 16px 20px;
    font-size: 16px;
    border: none;
    border-radius: 12px;
    background: white;
    color: #1F2937;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.gh-search-input:focus {
    outline: none;
    box-shadow: 0 6px 30px rgba(0,0,0,0.15);
}

.gh-search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    pointer-events: none;
}

.gh-search-results {
    position: fixed;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 99999;
}

.gh-search-results.active {
    display: block;
}

.gh-search-result {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background 0.2s ease;
    display: block;
    text-decoration: none;
}

.gh-search-result:hover {
    background: var(--color-bg);
}

.gh-search-result:last-child {
    border-bottom: none;
}

.gh-search-result-title {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
}

.gh-search-result-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.gh-search-result-meta {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 13px;
}

.gh-search-result-cat {
    color: var(--color-primary);
    font-weight: 500;
}

.gh-search-result-time {
    color: var(--color-text-muted);
}

.gh-search-empty {
    padding: 32px 20px;
    text-align: center;
    color: var(--color-text-muted);
}

/* ========================================
   CATEGORIES GRID
   ======================================== */

.gh-section {
    padding: 60px 0;
}

.gh-section-header {
    text-align: center;
    margin-bottom: 48px;
}

.gh-section-header h2 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--color-text);
}

.gh-section-header p {
    font-size: 18px;
    color: var(--color-text-muted);
    margin: 0;
}

.gh-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.gh-category-card {
    background: var(--color-bg-secondary);
    border: 2px solid var(--color-border);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.gh-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    border-color: var(--color-primary);
}

.gh-category-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.gh-category-card[data-category="demarrer"] .gh-category-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.gh-category-card[data-category="plateformes"] .gh-category-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.gh-category-card[data-category="gestion"] .gh-category-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.gh-category-card[data-category="automatisation"] .gh-category-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.gh-category-card[data-category="finance"] .gh-category-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.gh-category-card[data-category="vehicules"] .gh-category-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.gh-category-card[data-category="croissance"] .gh-category-icon {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

.gh-category-card[data-category="optimisation"] .gh-category-icon {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
}

.gh-category-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--color-text);
}

.gh-category-count {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0;
}

/* ========================================
   GUIDES GRID
   ======================================== */

.gh-guides {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.gh-guide-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    height: 100%;
}

.gh-guide-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: var(--color-primary);
}

.gh-guide-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.gh-guide-cat {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(89, 60, 251, 0.1);
    color: var(--color-primary);
}

.gh-guide-time {
    font-size: 13px;
    color: var(--color-text-muted);
}

.gh-guide-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--color-text);
    line-height: 1.4;
}

.gh-guide-card p {
    font-size: 15px;
    color: var(--color-text-secondary);
    margin: 0 0 16px;
    line-height: 1.6;
}

.gh-guide-read {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
}

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

.gh-cta {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    color: white;
    margin-top: 60px;
}

.gh-cta h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
}

.gh-cta p {
    font-size: 16px;
    opacity: 0.95;
    margin: 0 0 24px;
}

.gh-cta-btn {
    display: inline-block;
    padding: 14px 32px;
    background: white !important;
    color: #1F2937 !important;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.gh-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    background: rgba(255, 255, 255, 0.95) !important;
    color: #1F2937 !important;
}

/* ========================================
   CATEGORY PAGE
   ======================================== */

.gh-cat-header {
    padding: 60px 0 40px;
    text-align: center;
}

.gh-cat-icon-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.gh-cat-header h1 {
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--color-text);
}

.gh-cat-intro {
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 18px;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.gh-cat-guides {
    padding: 40px 0;
}

.gh-cat-related {
    padding: 60px 0;
    background: var(--color-bg);
    margin-top: 60px;
}

.gh-cat-related h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 32px;
    text-align: center;
    color: var(--color-text);
}

.gh-cat-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .gh-hero {
        padding: 60px 0 40px;
    }
    
    .gh-hero h1 {
        font-size: 32px;
    }
    
    .gh-hero p {
        font-size: 16px;
    }
    
    .gh-section-header h2 {
        font-size: 28px;
    }
    
    .gh-categories {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .gh-guides {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gh-cat-header h1 {
        font-size: 32px;
    }
    
    .gh-cat-intro {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .gh-hero h1 {
        font-size: 28px;
    }
    
    .gh-search-input {
        padding: 14px 48px 14px 16px;
        font-size: 15px;
    }
    
    .gh-category-card {
        padding: 24px 20px;
    }
    
    .gh-guide-card {
        padding: 20px;
    }
}

/* ========================================
   DARK THEME
   ======================================== */

[data-theme="dark"] .gh-search-input {
    background: var(--color-bg-secondary);
    color: var(--color-text);
}

[data-theme="dark"] .gh-search-icon {
    color: var(--color-text-muted);
}

[data-theme="dark"] .gh-guide-cat {
    background: rgba(89, 60, 251, 0.2);
}

[data-theme="dark"] .gh-category-card:hover,
[data-theme="dark"] .gh-guide-card:hover {
    background: var(--color-bg);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
