/* SEO and UX improvements for SafeAI-Aus */

/* ============================================================================
   Navigation Header Styling - Match logo background
   ============================================================================ */

/* Light mode: Match the warm cream background of the SafeAI-Aus logo */
.md-header {
    background-color: #F6F3EF !important;
}

/* Dark mode: Use subtle dark grey that complements the logo when inverted */
[data-md-color-scheme="slate"] .md-header {
    background-color: #2d2d2d !important;
}

/* Ensure header text remains readable */
.md-header__title,
.md-header__button,
.md-header__topic {
    color: #2c3e50;
}

[data-md-color-scheme="slate"] .md-header__title,
[data-md-color-scheme="slate"] .md-header__button,
[data-md-color-scheme="slate"] .md-header__topic {
    color: #ffffff;
}

/* Navigation tabs styling for consistency */
.md-tabs {
    background-color: #FBF8F4;
}

[data-md-color-scheme="slate"] .md-tabs {
    background-color: #252525;
}

/* ============================================================================
   Heading Hierarchy and Readability
   ============================================================================ */

/* Improve heading hierarchy and readability */
h1 {
    font-size: 2.5em;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h2 {
    font-size: 2em;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #34495e;
    border-bottom: 2px solid #5c6bc0;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.5em;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: #2c3e50;
}

/* Dark mode support for headings */
[data-md-color-scheme="slate"] h1 {
    color: #ffffff;
}

[data-md-color-scheme="slate"] h2 {
    color: #e8e8e8;
    border-bottom-color: #7986cb;
}

[data-md-color-scheme="slate"] h3 {
    color: #e0e0e0;
}

/* Improve content readability */
.md-content {
    line-height: 1.7;
    font-size: 1.1em;
}

/* Better link styling for SEO */
.md-content a {
    color: #5c6bc0;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.3s ease;
}

.md-content a:hover {
    border-bottom: 1px solid #5c6bc0;
}

/* Improve list readability */
.md-content ul, .md-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.md-content li {
    margin-bottom: 0.5rem;
}

/* Better table styling */
.md-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
}

.md-content th, .md-content td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
}

.md-content th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Dark mode support for tables */
[data-md-color-scheme="slate"] .md-content th,
[data-md-color-scheme="slate"] .md-content td {
    border-color: #555;
    color: #e0e0e0;
}

[data-md-color-scheme="slate"] .md-content th {
    background-color: #424242;
}

/* Improve code block readability */
.md-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.md-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
}

/* Dark mode support for code elements */
[data-md-color-scheme="slate"] .md-content code {
    background-color: #424242;
    color: #e0e0e0;
}

[data-md-color-scheme="slate"] .md-content pre {
    background-color: #424242;
    color: #e0e0e0;
}

/* Better blockquote styling */
.md-content blockquote {
    border-left: 4px solid #5c6bc0;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    font-style: italic;
}

/* Dark mode support for blockquotes */
[data-md-color-scheme="slate"] .md-content blockquote {
    background-color: #424242;
    border-left-color: #7986cb;
    color: #e0e0e0;
}

/* Improve navigation visibility */
.md-nav__title {
    font-weight: 600;
    color: #2c3e50;
}

/* Dark mode support for navigation */
[data-md-color-scheme="slate"] .md-nav__title {
    color: #e8e8e8;
}

/* Better search results */
.md-search__input {
    border-radius: 20px;
}

/* Breadcrumb Navigation Styling */
.md-breadcrumb {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.md-breadcrumb__item {
    color: #6c757d;
    font-size: 0.9rem;
}

.md-breadcrumb__item:not(:last-child)::after {
    content: "›";
    margin: 0 0.5rem;
    color: #adb5bd;
    font-weight: bold;
}

.md-breadcrumb__link {
    color: #5c6bc0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.md-breadcrumb__link:hover {
    color: #3949ab;
    text-decoration: underline;
}

.md-breadcrumb__link--current {
    color: #2c3e50;
    font-weight: 600;
}

/* Dark mode support for breadcrumbs */
[data-md-color-scheme="slate"] .md-breadcrumb {
    background: linear-gradient(135deg, #424242 0%, #2d2d2d 100%);
    border-bottom-color: #555;
}

[data-md-color-scheme="slate"] .md-breadcrumb__item {
    color: #adb5bd;
}

[data-md-color-scheme="slate"] .md-breadcrumb__link {
    color: #7986cb;
}

[data-md-color-scheme="slate"] .md-breadcrumb__link:hover {
    color: #5c6bc0;
}

[data-md-color-scheme="slate"] .md-breadcrumb__link--current {
    color: #e8e8e8;
}

/* Responsive improvements */
@media (max-width: 768px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.6em; }
    h3 { font-size: 1.3em; }
    
    .md-content {
        font-size: 1em;
        line-height: 1.6;
    }
}

/* Newsletter form styling */
.listmonk-form {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin: 1.5rem auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 600px;
    width: 100%;
}

.listmonk-form h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.2em;
}

.listmonk-form input[type="email"],
.listmonk-form input[type="text"] {
    width: 100%;
    padding: 0.6rem;
    margin: 0.4rem 0;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
}

.listmonk-form input[type="email"]:focus,
.listmonk-form input[type="text"]:focus {
    outline: none;
    border-color: #5c6bc0;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.listmonk-form input[type="checkbox"] {
    margin-right: 0.5rem;
    transform: scale(1.2);
}

.listmonk-form label {
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    font-size: 0.95rem;
}

.listmonk-form span {
    display: block;
    margin-top: 0.4rem;
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.4;
}

.listmonk-form input[type="submit"] {
    background-color: #5c6bc0;
    color: white;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 0.8rem;
}

.listmonk-form input[type="submit"]:hover {
    background-color: #3949ab;
    transform: translateY(-1px);
}

.listmonk-form input[type="submit"]:active {
    transform: translateY(0);
}

/* Dark mode support for newsletter form */
[data-md-color-scheme="slate"] .listmonk-form {
    background-color: #424242;
    border-color: #555;
}

[data-md-color-scheme="slate"] .listmonk-form h3 {
    color: #e8e8e8;
}

[data-md-color-scheme="slate"] .listmonk-form input[type="email"],
[data-md-color-scheme="slate"] .listmonk-form input[type="text"] {
    background-color: #2d2d2d;
    border-color: #555;
    color: #e0e0e0;
}

[data-md-color-scheme="slate"] .listmonk-form input[type="email"]:focus,
[data-md-color-scheme="slate"] .listmonk-form input[type="text"]:focus {
    border-color: #7986cb;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.1);
}

[data-md-color-scheme="slate"] .listmonk-form label {
    color: #e8e8e8;
}

[data-md-color-scheme="slate"] .listmonk-form span {
    color: #adb5bd;
}

/* Airia chat widget tweaks */
#airia-chat-root {
    font-size: 16px;
}

#airia-chat-root *,
#airia-chat-root button,
#airia-chat-root input,
#airia-chat-root textarea {
    font-size: 1rem;
    line-height: 1.5;
}

/* Print-friendly styles */
@media print {
    .md-content {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .md-nav, .md-header {
        display: none;
    }
}

/* ============================================================================
   LANDING PAGE / HERO SECTION STYLING (Zensical-inspired)
   ============================================================================ */

/* Hero Section - Centered, bold, visually striking */
.hero-section {
    text-align: center;
    padding: 4rem 2rem 3rem;
    background-image: url('../assets/hero-background-v3.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    margin: 2rem 0 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
}

.hero-section h1 {
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
    line-height: 1.2;
    border-bottom: none;
}

.hero-section h3 {
    font-size: 1.4em;
    font-weight: 600;
    color: #495057;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Dark mode hero section */
[data-md-color-scheme="slate"] .hero-section {
    background-image: url('../assets/hero-background-v3.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Add dark overlay for dark mode to ensure text readability */
[data-md-color-scheme="slate"] .hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    z-index: 0;
}

[data-md-color-scheme="slate"] .hero-section > * {
    position: relative;
    z-index: 1;
}

[data-md-color-scheme="slate"] .hero-section h1 {
    color: #ffffff;
}

[data-md-color-scheme="slate"] .hero-section h3 {
    color: #adb5bd;
}

/* Value Props Section */
.value-props {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.value-prop {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-prop:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.value-prop h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.3em;
    border-bottom: none;
}

[data-md-color-scheme="slate"] .value-prop {
    background-color: #2d2d2d;
    border-color: #424242;
}

[data-md-color-scheme="slate"] .value-prop h3 {
    color: #e8e8e8;
}

/* Newsletter Section Styling */
.newsletter-section {
    text-align: center;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    margin: 3rem 0;
}

.newsletter-section h3 {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: none;
}

.newsletter-section p {
    font-size: 1.2em;
    margin-bottom: 2.5rem;
    color: #2c3e50;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    max-width: 700px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    min-width: 280px;
    padding: 1rem 1.5rem;
    border: 2px solid #90caf9;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: #5c6bc0;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.newsletter-button {
    padding: 1rem 2.5rem;
    background-color: #5c6bc0;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.newsletter-button:hover {
    background-color: #3949ab;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

[data-md-color-scheme="slate"] .newsletter-section {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
}

[data-md-color-scheme="slate"] .newsletter-section h3 {
    color: #ffffff;
}

[data-md-color-scheme="slate"] .newsletter-section p {
    color: #e8e8e8;
}

[data-md-color-scheme="slate"] .newsletter-input {
    background-color: #2d2d2d;
    border-color: #5c6bc0;
    color: #e0e0e0;
}

/* Homepage Footer Section */
.homepage-footer {
    text-align: center;
    background-color: #f8f9fa;
    padding: 2rem 2rem;
    border-radius: 12px;
    margin: 3rem 0 2rem;
}

.homepage-footer h2 {
    border-bottom: none;
    margin-bottom: 1rem;
}

[data-md-color-scheme="slate"] .homepage-footer {
    background-color: #2d2d2d;
}

/* Card grid enhancements for landing page */
.grid.cards {
    margin: 2rem 0;
}

.grid.cards > ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
}

/* Stack cards on smaller screens */
@media (max-width: 768px) {
    .grid.cards > ul {
        grid-template-columns: 1fr !important;
    }
}

.grid.cards li {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid.cards li:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

[data-md-color-scheme="slate"] .grid.cards li {
    background-color: #2d2d2d;
    border-color: #424242;
}

/* Responsive adjustments for hero section */
@media (max-width: 768px) {
    .hero-section {
        padding: 2.5rem 1.5rem 2rem;
    }
    
    .hero-section h1 {
        font-size: 2.5em;
    }
    
    .hero-section h3 {
        font-size: 1.2em;
    }
    
    .value-props {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .newsletter-input {
        min-width: 100%;
    }
}

/* Smooth section transitions */
.md-content section {
    scroll-margin-top: 100px;
}

/* Improved HR styling for section breaks */
.md-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e9ecef, transparent);
    margin: 3rem 0;
}

[data-md-color-scheme="slate"] .md-content hr {
    background: linear-gradient(90deg, transparent, #424242, transparent);
}

/* Remove bullets from lists inside grid cards for cleaner look */
.grid.cards li ul {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.grid.cards li ul li {
    margin-bottom: 0.5rem;
    padding-left: 0;
}

/* Add a subtle left border instead of bullets for visual hierarchy */
.grid.cards li ul li a {
    display: block;
    padding-left: 1rem;
    border-left: 2px solid transparent;
    transition: border-color 0.2s ease, padding-left 0.2s ease;
}

.grid.cards li ul li a:hover {
    border-left-color: #5c6bc0;
    padding-left: 1.2rem;
}

[data-md-color-scheme="slate"] .grid.cards li ul li a:hover {
    border-left-color: #7986cb;
}

/* Resource grid - cleaner 2-column layout without heavy card styling */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin: 2rem 0;
}

.resource-column h3 {
    color: #2c3e50;
    font-size: 1.3em;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.resource-column h3:first-of-type {
    margin-top: 0;
}

.resource-column ul {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.resource-column li {
    margin-bottom: 0.6rem;
}

.resource-column a {
    color: #5c6bc0;
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
}

.resource-column a:hover {
    color: #3949ab;
    padding-left: 0.3rem;
}

[data-md-color-scheme="slate"] .resource-column h3 {
    color: #e8e8e8;
    border-bottom-color: #424242;
}

[data-md-color-scheme="slate"] .resource-column a {
    color: #7986cb;
}

[data-md-color-scheme="slate"] .resource-column a:hover {
    color: #5c6bc0;
}

@media (max-width: 768px) {
    .resource-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
