/* Anatoli Labs Help Scout Knowledge Center - Enhanced Styling */

/* Import Google Fonts - Lato for headings, Inter for body */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* Base Font Configuration */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Heading Typography - Lato 900 Weight */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

/* Specific heading overrides for better hierarchy */
h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 0.875rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.25rem;
    margin-bottom: 0.625rem;
}

h5 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

h6 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Search Section Styling - Black background with white text */
#docsSearch {
    background: #000000 !important;
    color: #ffffff !important;
    position: relative;
}

#docsSearch * {
    color: #ffffff !important;
}

#docsSearch h1 {
    color: #ffffff !important;
    font-family: 'Lato', sans-serif;
    font-weight: 900;
    font-size: 3rem !important;
}

/* Search Bar Styling */
#searchBar .search-query {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif;
}

#searchBar .search-query::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

#searchBar .search-query::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

#searchBar .search-query::-moz-placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

#searchBar .search-query:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

#searchBar .search-query:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
}

#searchBar button {
    background: #3651d4 !important;
    color: #ffffff !important;
    border: 1px solid #3651d4 !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.025em;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#searchBar button:hover {
    background: #2a42c7 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Enhanced Typography for Body Content */
p, li, td, th, .article-content, .content-body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

/* Navigation and Menu Items */
.nav, .nav li a, .navbar .nav li a {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

/* Buttons and Interactive Elements */
.btn, button, input[type="submit"], input[type="button"] {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Article Content Styling */
.contentWrapper, #fullArticle {
    font-family: 'Inter', sans-serif;
}

.contentWrapper h1, .contentWrapper h2, .contentWrapper h3, 
.contentWrapper h4, .contentWrapper h5, .contentWrapper h6,
#fullArticle h1, #fullArticle h2, #fullArticle h3, 
#fullArticle h4, #fullArticle h5, #fullArticle h6 {
    font-family: 'Lato', sans-serif;
    font-weight: 900;
}

/* Collection and Category Titles */
.collection h2, .threeCol h2, .twoCol h2, .category-list h3 {
    font-family: 'Lato', sans-serif;
    font-weight: 900;
}

/* Most Popular Articles Heading - Specific Override */
.most-pop-articles h2 {
    font-family: 'Lato', sans-serif !important;
    font-weight: 900 !important;
    margin-bottom: 1.2em;
    text-align: center;
}

/* Additional Popular Articles Selectors */
.most-popular-articles h2, 
h2:contains("Most Popular Articles"), 
[class*="popular"] h2,
.popular-articles h2,
/* Generic targeting for any h2 containing "Most Popular" text */
h2[text*="Most Popular"], h2[title*="Most Popular"],
/* Help Scout specific selectors */
.hs-popular-articles h2, .popular h2, .articles h2 {
    font-family: 'Lato', sans-serif !important;
    font-weight: 900 !important;
}

/* Universal fallback for any h2 that might be the Most Popular Articles heading */
h2 {
    font-family: 'Lato', sans-serif;
    font-weight: 900;
}

/* Sidebar Headings */
#sidebar h3 {
    font-family: 'Lato', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Form Labels */
label, .control-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

/* Improved Readability for Links */
a {
    color: #000000;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #333333;
}

/* Enhanced Focus States for Accessibility */
button:focus, input:focus, textarea:focus, select:focus, a:focus {
    outline: 2px solid rgba(0, 0, 0, 0.2);
    outline-offset: 2px;
}

/* Subtle Shadow Enhancement for Cards */
.collection, .contentWrapper {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.collection:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* Professional spacing adjustments */
.most-pop-articles, .threeCol, .twoCol {
    margin-bottom: 2rem;
}

/* Mobile responsive font scaling */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.375rem;
    }
    
    #docsSearch h1 {
        font-size: 2.25rem !important;
    }
}

/* High DPI display optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: subpixel-antialiased;
    }
}
