/* AI4Educators Custom Styles */

/* ==========================================================================
   Brand Colors and Variables
   ========================================================================== */
:root {
    --brand-primary: #0d6efd;
    --brand-gold: #ffd700;
    --brand-orange: rgba(221, 72, 20, 1);
    --brand-orange-light: rgba(221, 72, 20, 0.2);
    --brand-orange-medium: rgba(221, 72, 20, 0.6);
    --text-primary: rgba(33, 37, 41, 1);
    --text-muted: rgba(0, 0, 0, 0.5);
    --bg-light: rgba(247, 248, 249, 1);
    --border-light: rgba(242, 242, 242, 1);
    --border-gray: rgba(218, 218, 218, 1);
}

/* ==========================================================================
   Brand Specific Styles
   ========================================================================== */
.brand-gold {
    color: var(--brand-gold);
}

/* ==========================================================================
   Layout and Component Styles
   ========================================================================== */
.content-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid #e9ecef;
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

.search-form {
    max-width: 500px;
}

.category-badge {
    font-size: 0.8rem;
    font-weight: 500;
}

.bg-light.rounded {
    background-color: #f8f9fa !important;
}

.form-select, .form-control {
    border: 1px solid #dee2e6;
}

.form-select:focus, .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Content detail page styles */
.content-body p {
    margin-bottom: .35rem; 
}

.content-body ul, 
.content-body ol {
    padding-left: 2rem;
}

.excerpt-content p {
    margin-bottom: 0.25rem; 
}

/* QuillJS Indentation for RTE output */
.content-body .ql-indent-1 {
    padding-left: 3em;
}
.content-body .ql-indent-2 {
    padding-left: 6em;
}
.content-body .ql-indent-3 {
    padding-left: 9em;
}

/* Copy button styles */
.btn-sm {
    font-size: 0.875rem;
}

.btn .bi {
    margin-right: 0.25rem;
}

/* ==========================================================================
   Editor Styles
   ========================================================================== */
.excerpt-editor {
    min-height: 120px;
    background: white;
}

.content-editor {
    min-height: 300px;
    background: white;
}

/* ==========================================================================
   Badge and Tag Styles
   ========================================================================== */
.category-badge {
    /* Dynamic background colors set via inline style for categories */
}

.tag-badge {
    /* Dynamic background colors set via inline style for tags */
}

/* ==========================================================================
   CodeIgniter Welcome Page Styles (Legacy)
   ========================================================================== */
.welcome-page * {
    transition: background-color 300ms ease, color 300ms ease;
}

.welcome-page *:focus {
    background-color: var(--brand-orange-light);
    outline: none;
}

.welcome-page html, 
.welcome-page body {
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    font-size: 16px;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.welcome-page header {
    background-color: var(--bg-light);
    padding: .4rem 0 0;
}

.welcome-page .menu {
    padding: .4rem 2rem;
}

.welcome-page header ul {
    border-bottom: 1px solid var(--border-light);
    list-style-type: none;
    margin: 0;
    overflow: hidden;
    padding: 0;
    text-align: right;
}

.welcome-page header li {
    display: inline-block;
}

.welcome-page header li a {
    border-radius: 5px;
    color: var(--text-muted);
    display: block;
    height: 44px;
    text-decoration: none;
}

.welcome-page header li.menu-item a {
    border-radius: 5px;
    margin: 5px 0;
    height: 38px;
    line-height: 36px;
    padding: .4rem .65rem;
    text-align: center;
}

.welcome-page header li.menu-item a:hover,
.welcome-page header li.menu-item a:focus {
    background-color: var(--brand-orange-light);
    color: var(--brand-orange);
}

.welcome-page header .logo {
    float: left;
    height: 44px;
    padding: .4rem .5rem;
}

.welcome-page header .menu-toggle {
    display: none;
    float: right;
    font-size: 2rem;
    font-weight: bold;
}

.welcome-page header .menu-toggle button {
    background-color: var(--brand-orange-medium);
    border: none;
    border-radius: 3px;
    color: rgba(255, 255, 255, 1);
    cursor: pointer;
    font: inherit;
    font-size: 1.3rem;
    height: 36px;
    padding: 0;
    margin: 11px 0;
    overflow: visible;
    width: 40px;
}

.welcome-page header .menu-toggle button:hover,
.welcome-page header .menu-toggle button:focus {
    background-color: rgba(221, 72, 20, .8);
    color: rgba(255, 255, 255, .8);
}

.welcome-page header .heroe {
    margin: 0 auto;
    max-width: 1100px;
    padding: 1rem 1.75rem 1.75rem 1.75rem;
}

.welcome-page header .heroe h1 {
    font-size: 2.5rem;
    font-weight: 500;
}

.welcome-page header .heroe h2 {
    font-size: 1.5rem;
    font-weight: 300;
}

.welcome-page section {
    margin: 0 auto;
    max-width: 1100px;
    padding: 2.5rem 1.75rem 3.5rem 1.75rem;
}

.welcome-page section h1 {
    margin-bottom: 2.5rem;
}

.welcome-page section h2 {
    font-size: 120%;
    line-height: 2.5rem;
    padding-top: 1.5rem;
}

.welcome-page section pre {
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    display: block;
    font-size: .9rem;
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    white-space: pre-wrap;
    word-break: break-all;
}

.welcome-page section code {
    display: block;
}

.welcome-page section a {
    color: var(--brand-orange);
}

.welcome-page section svg {
    margin-bottom: -5px;
    margin-right: 5px;
    width: 25px;
}

.welcome-page .further {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    border-top: 1px solid var(--border-light);
}

.welcome-page .further h2:first-of-type {
    padding-top: 0;
}

.welcome-page .svg-stroke {
    fill: none;
    stroke: #000;
    stroke-width: 32px;
}

.welcome-page footer {
    background-color: rgba(221, 72, 20, .8);
    text-align: center;
}

.welcome-page footer .environment {
    color: rgba(255, 255, 255, 1);
    padding: 2rem 1.75rem;
}

.welcome-page footer .copyrights {
    background-color: rgba(62, 62, 62, 1);
    color: rgba(200, 200, 200, 1);
    padding: .25rem 1.75rem;
}

@media (max-width: 629px) {
    .welcome-page header ul {
        padding: 0;
    }
    .welcome-page header .menu-toggle {
        padding: 0 1rem;
    }
    .welcome-page header .menu-item {
        background-color: rgba(244, 245, 246, 1);
        border-top: 1px solid var(--border-light);
        margin: 0 15px;
        width: calc(100% - 30px);
    }
    .welcome-page header .menu-toggle {
        display: block;
    }
    .welcome-page header .hidden {
        display: none;
    }
    .welcome-page header li.menu-item a {
        background-color: rgba(221, 72, 20, .1);
    }
    .welcome-page header li.menu-item a:hover,
    .welcome-page header li.menu-item a:focus {
        background-color: rgba(221, 72, 20, .7);
        color: rgba(255, 255, 255, .8);
    }
}

/* ==========================================================================
   Error Page Styles
   ========================================================================== */
.debug-info-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 1rem;
    margin: 1rem 0;
    text-align: left;
    font-family: monospace;
    border-radius: 5px;
}

.debug-info-box h3 {
    color: #dc3545;
    margin-top: 0;
}

.debug-table {
    width: 100%;
}

.debug-table-narrow {
    width: 10em;
}

.debug-table-medium {
    width: 12em;
}

.debug-table-wide {
    width: 15em;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.hide-element {
    display: none;
}