/* Psychopathia Machinalis - Custom Styles */

/* Title spacing - add 0.3em space between title lines */
.title {
    line-height: 1.2;
}

.title-first-line,
.title-second-line {
    display: block;
}

.title-second-line {
    margin-top: 0.3em;
}

/* Button styling - light blue theme for header navigation */
.blog-title .info .button.icon {
    background-color: rgba(220, 229, 235, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: #2c3e50 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.blog-title .info .button.icon:hover {
    background-color: rgba(200, 212, 219, 0.9) !important;
    color: #2c3e50 !important;
    opacity: 1 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
}

.blog-title .info .button.icon:active {
    background-color: rgba(180, 195, 204, 0.95) !important;
    color: #2c3e50 !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.blog-title .info .button.icon i {
    color: #2c3e50 !important;
}

/* Citation box styling */
pre code.plaintext {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 25px !important;
    border: 1px solid #3d566f !important;
}

/* Ensure the pre container for citation also has gradient */
pre:has(code.plaintext) {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 0 !important;
    border: 1px solid #3d566f !important;
}

/* Specific spacing for therapeutic tables */
h3 + table#research_concepts {
    margin-top: 0.5em !important;
}

h3 + table#empirical_methods {
    margin-bottom: 0.3em !important;
}

/* Add extra spacing to the h3 headings themselves */
table#research_concepts + h3 + table#empirical_methods {
    margin-bottom: 0.3em !important;
}

/* More direct approach - add spacing around the specific tables */
table#research_concepts {
    margin-bottom: 0.3em !important;
}

table#empirical_methods {
    margin-bottom: 0.3em !important;
}

/* Add space below the observed examples table caption */
table#observed_examples caption {
    margin-bottom: 1em !important;
    padding-bottom: 1em !important;
}

/* Risk level indicators */
.risk-low { color: #27ae60; font-weight: bold; } /* Green */
.risk-moderate { color: #f39c12; font-weight: bold; } /* Orange-Yellow */
.risk-high { color: #e67e22; font-weight: bold; } /* Darker Orange */
.risk-critical { color: #c0392b; font-weight: bold; } /* Red */

/* Legend styling */
.legend { 
    margin-top: 15px; 
    margin-bottom: 20px; 
    text-align: center;
}
.legend span { 
    margin-right: 15px; 
    font-size: 0.9em;
}
.legend .dot { 
    height: 12px; 
    width: 12px; 
    border-radius: 50%; 
    display: inline-block; 
    margin-right: 5px; 
    vertical-align: middle;
}

/* Disorder separator */
hr.disorder-separator {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.15), rgba(0,0,0,0));
    margin: 60px 0;
}

/* Footnote styling */
.footnote { 
    font-size: 0.85em; 
    color: #666; 
    margin-top: 10px; 
}

/* Table-specific styles */
.glossary-table td:first-child { 
    font-weight: bold; 
    color: #2c3e50; 
}
.abbreviations-table td:first-child { 
    font-weight: bold; 
    color: #2c3e50; 
}

/* Specific table styling */
#conditions_overview td:nth-child(1) { font-style: italic; }
#conditions_overview td:nth-child(4) { text-align: center; }
#observed_examples td:nth-child(1) { font-style: italic; }
#observed_examples td:nth-child(3) { font-size: 0.9em; }
#observed_examples td:nth-child(4) a { word-break: break-all; color: #2c3e50; }
#human_ai_therapy td:nth-child(1) { font-weight: bold; }
#research_concepts td:nth-child(1) { font-weight: bold; }
#empirical_methods td:nth-child(1) { font-weight: bold; }
#empirical_methods td:nth-child(2) { font-style: italic; }

/* Code blocks for this paper */
pre {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); 
    color: #ffffff; 
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 0.9em;
    border: 1px solid #3d566f;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* Dysfunction category intro boxes */
.dysfunction-intro {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #f8f8f2;
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0 40px 0;
    border: 1px solid #3d566f;
}

.dysfunction-intro h1 {
    color: #f8f8f2 !important;
    border-bottom: 2px solid #f8f8f2 !important;
    margin-top: 0 !important;
}

.dysfunction-intro p {
    color: #ecf0f1 !important;
}

/* Individual disorder alternating backgrounds */
.disorder-white {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    margin: 25px 0;
    border: 1px solid #e8e9ea;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
    transition: all 0.3s ease;
}

.disorder-grey {
    background-color: #fbfcfd;
    padding: 30px;
    border-radius: 10px;
    margin: 25px 0;
    border: 1px solid #e8e9ea;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
    transition: all 0.3s ease;
}

/* Auto-styling for disorder sections */
.disorder-section {
    padding: 25px;
    border-radius: 6px;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
}

.disorder-section:nth-child(odd) {
    background-color: #ffffff;
}

.disorder-section:nth-child(even) {
    background-color: #f8f9fa;
}

/* Enhanced disorder styling */
.disorder-white h3,
.disorder-grey h3 {
    color: #2c3e50 !important;
    font-size: 1.35em;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 18px;
    border-bottom: 3px solid #2c3e50;
    background: linear-gradient(90deg, rgba(44, 62, 80, 0.06), transparent);
    padding: 18px 24px;
    margin: -30px -30px 30px -30px;
    border-radius: 10px 10px 0 0;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.disorder-white h4,
.disorder-grey h4 {
    color: #2c3e50 !important;
    font-size: 1.15em;
    font-weight: 650;
    margin-top: 30px;
    margin-bottom: 18px;
    position: relative;
    padding-left: 35px;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

/* Monochrome icons for section headers - 25% larger */
.disorder-white h4:before,
.disorder-grey h4:before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2c3e50;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(44, 62, 80, 0.15);
}

/* Description icon - FontAwesome clipboard list */
.disorder-white h4.description:before,
.disorder-grey h4.description:before {
    font-family: "Font Awesome 6 Free";
    content: "\f46d";
    font-weight: 900;
    color: #2c3e50;
    background: none !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-size: 25px;
    width: 22px;
    height: 22px;
}

/* Diagnostic icon - FontAwesome search */
.disorder-white h4.diagnostic:before,
.disorder-grey h4.diagnostic:before {
    font-family: "Font Awesome 6 Free";
    content: "\f00e";
    font-weight: 900;
    color: #2c3e50;
    background: none !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-size: 25px;
    width: 22px;
    height: 22px;
}

.disorder-white h4.diagnostic:after,
.disorder-grey h4.diagnostic:after {
    display: none;
}

/* Symptoms icon - FontAwesome thermometer */
.disorder-white h4.symptoms:before,
.disorder-grey h4.symptoms:before {
    font-family: "Font Awesome 6 Free";
    content: "\f2c7";
    font-weight: 900;
    color: #2c3e50;
    background: none !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-size: 25px;
    width: 22px;
    height: 22px;
    position: absolute;
}

.disorder-white h4.symptoms:after,
.disorder-grey h4.symptoms:after {
    display: none;
}

/* Etiology icon - FontAwesome DNA */
.disorder-white h4.etiology:before,
.disorder-grey h4.etiology:before {
    font-family: "Font Awesome 6 Free";
    content: "\f471";
    font-weight: 900;
    color: #2c3e50;
    background: none !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-size: 25px;
    width: 22px;
    height: 22px;
}

/* Impact icon - FontAwesome warning triangle */
.disorder-white h4.impact:before,
.disorder-grey h4.impact:before {
    font-family: "Font Awesome 6 Free";
    content: "\f071";
    font-weight: 900;
    color: #2c3e50;
    background: none !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-size: 25px;
    width: 22px;
    height: 22px;
}

.disorder-white h4.impact:after,
.disorder-grey h4.impact:after {
    display: none;
}

/* Mitigation icon - FontAwesome band-aid */
.disorder-white h4.mitigation:before,
.disorder-grey h4.mitigation:before {
    font-family: "Font Awesome 6 Free";
    content: "\f462";
    font-weight: 900;
    color: #2c3e50;
    background: none !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-size: 25px;
    width: 22px;
    height: 22px;
}

/* Better list styling with monochrome bullets */
.disorder-white ol,
.disorder-grey ol {
    margin: 18px 0;
    padding-left: 35px;
    list-style: none;
    counter-reset: custom-counter;
}

.disorder-white ol li,
.disorder-grey ol li {
    margin-bottom: 14px;
    line-height: 1.65;
    color: #444;
    position: relative;
    counter-increment: custom-counter;
    padding-left: 6px;
    font-size: 0.98em;
}

.disorder-white ol li:before,
.disorder-grey ol li:before {
    content: counter(custom-counter);
    position: absolute;
    left: -35px;
    top: 0px;
    background: #2c3e50;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(44, 62, 80, 0.15);
}

/* Special styling for mitigation lists - blue theme */
.disorder-white h4.mitigation + ol li:before,
.disorder-grey h4.mitigation + ol li:before {
    background: #dce5eb;
    color: #2c3e50;
    border-radius: 3px;
}

/* Alternative bullet styles for nested lists */
.disorder-white ol ol li:before,
.disorder-grey ol ol li:before {
    content: '→';
    background: transparent;
    color: #2c3e50;
    font-weight: bold;
    border: 1px solid #2c3e50;
    font-size: 12px;
}

/* Human analogue styling */
.disorder-white p strong,
.disorder-grey p strong {
    color: #2c3e50;
    font-weight: 700;
}

.disorder-white p.human-analogue,
.disorder-grey p.human-analogue {
    background: linear-gradient(90deg, rgba(44, 62, 80, 0.08), rgba(44, 62, 80, 0.02));
    padding: 32px 40px !important;
    margin: 22px 0;
    border-radius: 8px;
    font-style: italic;
    position: relative;
    line-height: 1.6;
    font-size: 0.97em;
    color: #555;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
    border: 1px solid rgba(44, 62, 80, 0.1);
}

/* Human analogue icon - removed */
.disorder-white p.human-analogue:before,
.disorder-grey p.human-analogue:before {
    display: none;
}

/* Description, Impact and etiology special styling */
.disorder-white h4 + p,
.disorder-grey h4 + p,
.disorder-white h4.description + p,
.disorder-grey h4.description + p {
    margin-top: 12px;
    padding: 32px 40px;
    background: rgba(44, 62, 80, 0.025);
    border-radius: 8px;
    line-height: 1.65;
    font-size: 0.98em;
    color: #444;
    border: 1px solid rgba(44, 62, 80, 0.08);
}

/* Additional padding for any Description sections not caught by h4+p */
.disorder-white h4.description ~ p:not(.human-analogue),
.disorder-grey h4.description ~ p:not(.human-analogue) {
    padding: 32px 40px;
    background: rgba(44, 62, 80, 0.025);
    border-radius: 8px;
    border: 1px solid rgba(44, 62, 80, 0.08);
}

/* Ensure all paragraph content under disorder sections has minimum padding */
.disorder-white p:not(.human-analogue),
.disorder-grey p:not(.human-analogue) {
    padding: 32px 40px;
    background: rgba(44, 62, 80, 0.02);
    border-radius: 6px;
    margin-bottom: 16px;
}

/* Navy styling for Diagnostic Criteria and Etiology */
.disorder-white h4.diagnostic + ol,
.disorder-grey h4.diagnostic + ol,
.disorder-white h4.etiology + ol,
.disorder-grey h4.etiology + ol {
    background: linear-gradient(90deg, rgba(44, 62, 80, 0.08), transparent);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid rgba(44, 62, 80, 0.15);
}

.disorder-white h4.diagnostic + ol li:before,
.disorder-grey h4.diagnostic + ol li:before,
.disorder-white h4.etiology + ol li:before,
.disorder-grey h4.etiology + ol li:before {
    background: #2c3e50;
    color: white;
    border-radius: 3px;
}

/* Light blue styling for Symptoms and Mitigation */
.disorder-white h4.symptoms + ol,
.disorder-grey h4.symptoms + ol,
.disorder-white h4.mitigation + ol,
.disorder-grey h4.mitigation + ol {
    background: linear-gradient(90deg, rgba(220, 229, 235, 0.3), transparent);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid rgba(220, 229, 235, 0.5);
}

.disorder-white h4.symptoms + ol li:before,
.disorder-grey h4.symptoms + ol li:before,
.disorder-white h4.mitigation + ol li:before,
.disorder-grey h4.mitigation + ol li:before {
    background: #dce5eb;
    color: #2c3e50;
    border-radius: 3px;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .disorder-white,
    .disorder-grey {
        padding: 24px 18px;
        margin: 18px 0;
        border-radius: 8px;
    }
    
    .disorder-white h3,
    .disorder-grey h3 {
        font-size: 1.25em;
        margin: -24px -18px 24px -18px;
        padding: 15px 18px;
        border-radius: 8px 8px 0 0;
    }
    
    .disorder-white h4,
    .disorder-grey h4 {
        padding-left: 30px;
        font-size: 1.08em;
        margin-top: 26px;
        margin-bottom: 16px;
    }
    
    .disorder-white h4:before,
    .disorder-grey h4:before {
        width: 20px;
        height: 20px;
    }
    
    .disorder-white ol,
    .disorder-grey ol {
        padding-left: 30px;
        margin: 16px 0;
    }
    
    .disorder-white ol li:before,
    .disorder-grey ol li:before {
        width: 22px;
        height: 22px;
        left: -30px;
        font-size: 11px;
    }
    
    .disorder-white p.human-analogue,
    .disorder-grey p.human-analogue {
        padding: 28px 32px !important;
        margin: 20px 0;
    }
    
    /* Adjust text sizing for mobile */
    .disorder-white p,
    .disorder-grey p,
    .disorder-white ol li,
    .disorder-grey ol li {
        font-size: 0.96em;
    }
    
    /* Reduce animation on mobile for performance */
    .disorder-white,
    .disorder-grey {
        animation: none;
    }
}

/* Hover effects for interactivity */
.disorder-white:hover,
.disorder-grey:hover {
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.12);
    transform: translateY(-3px);
    border-color: #d0d1d2;
}

/* Add subtle entrance animations */
.disorder-white,
.disorder-grey {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Improved typography for readability */
.disorder-white p.text,
.disorder-grey p.text {
    line-height: 1.7;
    margin-bottom: 18px;
    color: #444;
    font-size: 0.98em;
}

.disorder-white p,
.disorder-grey p {
    line-height: 1.65;
    color: #444;
    margin-bottom: 16px;
}

.disorder-white em,
.disorder-grey em {
    color: #2c3e50;
    font-weight: 650;
    font-style: italic;
}

/* Enhanced section spacing */
.disorder-white h4 + ol,
.disorder-grey h4 + ol,
.disorder-white h4 + p,
.disorder-grey h4 + p {
    margin-top: 15px;
}

/* Beautiful scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Enhanced focus states for accessibility */
.disorder-white:focus-within,
.disorder-grey:focus-within {
    outline: 2px solid #2c3e50;
    outline-offset: 2px;
}

/* Subtle text selection styling */
.disorder-white ::selection,
.disorder-grey ::selection {
    background-color: rgba(44, 62, 80, 0.15);
    color: #2c3e50;
}

/* Enhanced readability for long text blocks */
.disorder-white p:not(.human-analogue),
.disorder-grey p:not(.human-analogue) {
    max-width: 75ch;
    hyphens: auto;
    word-spacing: 0.1em;
}

/* Professional table styling enhancements */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 1px;
    margin: 20px 0;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

table th, 
table td {
    padding: 12px 15px;
    text-align: left;
    border: 0.5px solid #e8e9ea;
    background-color: #ffffff;
}

table th {
    background-color: #dde5eb;
    color: #2c3e50;
    font-weight: 600;
    border: 0.5px solid #c8d4db;
}

table tr:nth-child(even) td {
    background-color: #f9fafb;
}

/* Specific styling for taxonomy tables */
#conditions_overview {
    border-collapse: separate;
    border-spacing: 0.5px;
}

#conditions_overview th,
#conditions_overview td {
    border: 0.5px solid #e8e9ea;
}

#conditions_overview tr:nth-child(even) td {
    background-color: #f9fafb;
}

#conditions_overview tr:hover td {
    background-color: #f2f4f6;
}

#conditions_overview td[colspan="5"] {
    padding: 10px;
    text-align: center;
}

/* Better link styling within disorders */
.disorder-white a,
.disorder-grey a {
    color: #2c3e50;
    text-decoration: none;
    border-bottom: 1px solid rgba(44, 62, 80, 0.3);
    transition: all 0.2s ease;
}

.disorder-white a:hover,
.disorder-grey a:hover {
    border-bottom-color: #2c3e50;
    background-color: rgba(44, 62, 80, 0.05);
}

/* Contact Form Styling */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.contact-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #2c3e50;
}

.contact-form label:first-child {
    margin-top: 0;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #dce5eb;
    border-radius: 6px;
    font-size: 16px;
    font-family: "Charter", sans-serif;
    color: #2c3e50;
    background-color: #fff;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #2c3e50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
}

.contact-form textarea {
    min-height: 150px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #95a5a6;
    font-size: 15px;
}

.send-button {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.send-button:hover {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    transform: translateY(-2px);
}

.send-button:active {
    transform: translateY(0);
}

.send-button i {
    margin-left: 8px;
}

/* Mobile styles update */
@media (max-width: 768px) {
    /* Contact form styles - narrower width */
    .contact-form {
        width: 85%;
        max-width: 85%;
        padding: 15px;
        margin: 0 auto;
    }
    
    .contact-form label {
        margin-bottom: 8px;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .contact-form input::placeholder,
    .contact-form textarea::placeholder {
        font-size: 14px;
    }
    
    .send-button {
        padding: 10px 20px;
        font-size: 14px;
        width: auto;
        display: inline-block;
    }
    
    /* Fix for all tables on mobile - general table fixes */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
        max-width: 100%;
        font-size: 14px;
        -webkit-overflow-scrolling: touch;
        border-spacing: 0.5px;
        margin-left: 0;
        margin-right: 0;
    }
    
    table th, 
    table td {
        padding: 8px;
        border: 0.5px solid #e8e9ea;
    }
    
    table th {
        background-color: #dde5eb;
        color: #2c3e50;
        font-weight: 600;
        border: 0.5px solid #c8d4db;
        position: sticky;
        top: 0;
        z-index: 1;
    }
    
    /* Container for tables */
    .container.blog {
        padding-left: 10px;
        padding-right: 10px;
        width: auto;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Fix for all specific tables */
    #conditions_overview,
    #observed_examples,
    #human_ai_therapy,
    #research_concepts,
    #empirical_methods,
    .glossary-table,
    .abbreviations-table {
        width: 100%;
        max-width: 100%;
        font-size: 13px;
        border-collapse: separate;
        border-spacing: 0.5px;
    }
    
    /* Specific cell styling for all tables */
    #conditions_overview td,
    #observed_examples td,
    #human_ai_therapy td,
    #research_concepts td,
    #empirical_methods td,
    .glossary-table td,
    .abbreviations-table td,
    #conditions_overview th,
    #observed_examples th,
    #human_ai_therapy th,
    #research_concepts th,
    #empirical_methods th,
    .glossary-table th,
    .abbreviations-table th {
        padding: 6px;
        border: 0.5px solid #e8e9ea;
        vertical-align: top;
    }
    
    /* Specific width adjustments for different tables */
    #conditions_overview td:first-child {
        min-width: 90px; /* Latin names need a bit more space */
    }
    
    #conditions_overview td:last-child {
        min-width: 120px;
        max-width: 180px;
        white-space: normal;
    }
    
    #observed_examples td:nth-child(2) {
        max-width: 150px;
        white-space: normal;
    }
    
    #human_ai_therapy td:last-child,
    #research_concepts td:last-child,
    #empirical_methods td:last-child {
        max-width: 150px;
        white-space: normal;
    }
    
    .glossary-table td:last-child,
    .abbreviations-table td:last-child {
        max-width: 200px;
        white-space: normal;
    }
    
    #conditions_overview td[colspan="5"] {
        background-color: #dde5eb;
        font-weight: bold;
        text-align: center;
        color: #2c3e50;
        position: sticky;
        top: 0;
        z-index: 1;
    }
    
    /* Make risk indicators more visible on mobile */
    .risk-low, 
    .risk-moderate, 
    .risk-high, 
    .risk-critical {
        font-size: 13px;
        padding: 2px 4px;
        border-radius: 3px;
        display: inline-block;
    }
    
    .risk-low { background-color: rgba(39, 174, 96, 0.1); }
    .risk-moderate { background-color: rgba(243, 156, 18, 0.1); }
    .risk-high { background-color: rgba(230, 126, 34, 0.1); }
    .risk-critical { background-color: rgba(192, 57, 43, 0.1); }
    
    /* Fix for table containers */
    .container.blog.main.gray#taxonomy-summary,
    .container.blog.main.gray#observed_examples,
    .container.blog.main.gray#glossary {
        padding-left: 5px;
        padding-right: 5px;
        width: auto;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Ensure form elements don't overflow */
    .contact-form input,
    .contact-form textarea {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Ensure the contact container is properly sized */
    .contact-container {
        max-width: 85% !important;
        margin: 0 auto;
    }
}

/* Header height reduction and image positioning adjustments */
div.container.blog#first-content div.blog-title {
    padding-top: 2em !important;
    padding-bottom: 2em !important;
}

div.container.blog#first-content div.blog-title .blog-cover {
    margin-top: -1em !important; /* Move image up by 1em */
    padding: 2vh 0 !important;
}

/* Mobile adjustments for header */
@media (max-width: 768px) {
    div.container.blog#first-content div.blog-title {
        padding-top: 1.5em !important;
        padding-bottom: 1.5em !important;
    }
    
    div.container.blog#first-content div.blog-title .blog-cover {
        margin-top: -1em !important; /* Move image up by 1em on mobile too */
        padding: 1.5vh 0 !important;
    }
}