/*
 * Sections Font & Icon Consistency Fix
 * Ensures all sections use Cairo font and proper icon styling
 */

/* Force Cairo font on all section elements */
.section,
.section *,
.product-section,
.product-section *,
.plan-section,
.plan-section *,
.faq-section,
.faq-section *,
.header-section,
.header-section *,
.content-section,
.content-section *,
.footer-section,
.footer-section * {
    font-family: 'Cairo', sans-serif !important;
}

/* Database sections - force Cairo font on all custom sections */
.container h1,
.container h2,
.container h3,
.container h4,
.container h5,
.container h6,
.container p,
.container span,
.container div,
.container a,
.container button {
    font-family: 'Cairo', sans-serif !important;
}

/* Section headings consistent styling */
.section h1,
.section h2,
.section h3,
.section h4,
.section h5,
.section h6 {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

/* Product section specific styles */
.product-section .card h5,
.product-section .product-name {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 600 !important;
    color: #333 !important;
}

.product-section .btn {
    font-family: 'Cairo', sans-serif !important;
}

/* Plan section specific styles */
.plan-section .plan-name,
.plan-section .plan-title h5 {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 600 !important;
    color: #333 !important;
}

.plan-section .plan-price {
    font-family: 'Cairo', sans-serif !important;
    font-weight: bold !important;
}

.plan-section .plan-feature {
    font-family: 'Cairo', sans-serif !important;
}

/* FAQ section specific styles */
.faq-section .faq-question {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 600 !important;
}

.faq-section .faq-answer {
    font-family: 'Cairo', sans-serif !important;
    line-height: 1.6 !important;
}

/* Hero and Features section from database */
nav a,
nav .navbar-brand {
    font-family: 'Cairo', sans-serif !important;
}

.fw-semibold,
.fw-bold,
.badge,
.btn {
    font-family: 'Cairo', sans-serif !important;
}

/* Icon consistency */
.section i {
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* Features section icons */
.la-plug,
.la-dollar-sign,
.la-mouse-pointer {
    font-size: 3rem !important;
    margin-bottom: 1rem !important;
}

/* Plan feature icons - colors only */
.la-bolt.text-danger {
    color: #dc3545 !important;
}

.la-infinity.text-success {
    color: #198754 !important;
}

.la-infinity.text-primary {
    color: #0d6efd !important;
}

/* Ensure Line Awesome icons display correctly */
.la, .las, .lar, .lab {
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
}

/* Plan feature icons */
.plan-feature-icon {
    color: #dc3545; /* danger color for main features */
    margin-right: 0.5rem;
}

.plan-unlimited-icon {
    color: #198754; /* success color for unlimited features */
    margin-right: 0.5rem;
}

/* Button consistency */
.section .btn {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 500 !important;
}

/* Ensure proper text rendering */
.section {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Pricing tab buttons */
.pricing-tabs .btn {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 500 !important;
}

/* Override any Bootstrap defaults */
.section .text-muted,
.section .small,
.section .badge {
    font-family: 'Cairo', sans-serif !important;
}

/* Database content specific overrides */
.text-secondary,
.badge.bg-danger,
.btn.btn-outline-dark {
    font-family: 'Cairo', sans-serif !important;
}

/* Custom Icons via Mask Image (behave like font icons with currentColor) */
.custom-icon {
    display: inline-block !important;
    width: 1.25em !important; /* Match FA sizing */
    height: 1em !important;
    background-color: currentColor !important;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    vertical-align: -0.125em; /* Match FA alignment */
}

.ci-typescript {
    mask-image: url('https://cdn.simpleicons.org/typescript?v=1');
    -webkit-mask-image: url('https://cdn.simpleicons.org/typescript?v=1');
}

.ci-csharp {
    /* Switch to Devicon as Simple Icons C# might be failing */
    mask-image: url('https://cdn.jsdelivr.net/gh/devicons/devicon/icons/csharp/csharp-plain.svg');
    -webkit-mask-image: url('https://cdn.jsdelivr.net/gh/devicons/devicon/icons/csharp/csharp-plain.svg');
}

.ci-cpp {
    mask-image: url('https://cdn.simpleicons.org/cplusplus?v=1');
    -webkit-mask-image: url('https://cdn.simpleicons.org/cplusplus?v=1');
}

.ci-css {
    mask-image: url('https://cdn.simpleicons.org/css3?v=1');
    -webkit-mask-image: url('https://cdn.simpleicons.org/css3?v=1');
}

.ci-ruby {
    mask-image: url('https://cdn.simpleicons.org/ruby?v=1');
    -webkit-mask-image: url('https://cdn.simpleicons.org/ruby?v=1');
}

.captcha-card {
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
}

/* Override Code Block Dark Theme (user requested change from black) */
.code-block {
    background: #fff !important;
    border: 1px solid #dee2e6 !important;
}

.code-block pre {
    background: #f8f9fa !important; /* Light gray background for code */
}

.code-block pre code {
    color: #333 !important; /* Dark text for light background */
    text-shadow: none !important;
}

/* =========================================
   Quick Guide Code Snippet (Mac-like Window)
   ========================================= */
.code-snippet-window {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background: #fff;
    display: flex;
    flex-direction: column;
}

.code-snippet-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.code-snippet-controls {
    display: flex;
    gap: 0.5rem;
}

.window-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
}

.window-dot--red { background-color: #ef4444; }
.window-dot--yellow { background-color: #f59e0b; }
.window-dot--green { background-color: #22c55e; }

.code-snippet-title {
    font-family: 'Cairo', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

.code-snippet-body {
    background: #f8f9fa; /* Unified light gray background */
    padding: 0;
    position: relative;
    max-height: 520px;
    overflow: auto;
}

/* Override Prism container in snippet body */
.code-snippet-body pre {
    margin: 0 !important;
    padding: 1.5rem !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
}

.code-snippet-body pre code {
    background: transparent !important;
    font-family: inherit !important;
    color: #334155 !important; /* Slate-700 for better contrast */
    text-shadow: none !important;
}

/* Copy Button in Header */
.snippet-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: 1px solid #cbd5e1;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.snippet-copy-btn:hover {
    background: #fff;
    border-color: #94a3b8;
    color: #334155;
}

.snippet-copy-btn.copied {
    border-color: #22c55e;
    color: #22c55e;
    background: #f0fdf4;
}


/* Override aggressive font fix for Home Heading */
html body .home-heading,
html body .section .home-heading,
html body .container .home-heading {
    font-family: 'conthrax-sb', "Cairo", sans-serif !important;
}
