/* ==========================================================================
   hooks/kj_adm/custom-edu.css - Enhanced AppGini LMS Stylesheet
   ========================================================================== */

/* --- Base Typography & Reset --- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #2d3748;
    background-color: #f7fafc;
    line-height: 1.6;
}

/* --- Header Section --- */
.edu-header {
    background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 100%);
    color: #ffffff;
    padding: 35px 20px;
    margin-bottom: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.edu-header h1 {
    margin: 0;
    font-size: 2.2em;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.edu-header .subtitle {
    margin-top: 10px;
    opacity: 0.9;
    font-size: 1.05em;
    font-weight: 300;
}

/* --- Breadcrumbs --- */
.breadcrumb-custom {
    background: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.breadcrumb-custom a {
    color: #3182ce;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-custom a:hover {
    text-decoration: underline;
}

.breadcrumb-custom .separator {
    margin: 0 8px;
    color: #a0aec0;
}

/* --- Subject & Topic Cards --- */
.subject-card, 
.topic-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.25s ease-in-out;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.subject-card {
    text-align: center;
    cursor: pointer;
}

.subject-card:hover, 
.topic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e0;
}

.subject-card h3 {
    color: #2d3748;
    margin: 0 0 10px 0;
    font-size: 1.35em;
    font-weight: 600;
}

.subject-card p {
    color: #718096;
    margin: 0;
    line-height: 1.5;
}

.topic-card h4 {
    color: #2d3748;
    margin: 0 0 10px 0;
    font-size: 1.2em;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
}

.topic-card h4:hover {
    color: #3182ce;
}

.topic-card-excerpt {
    color: #4a5568;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 12px;
    cursor: pointer;
}

.topic-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #edf2f7;
}

.topic-card-meta {
    font-size: 0.85em;
    color: #718096;
}

/* --- Pastel Badges & Reading Time --- */
.content-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.78em;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.badge-notes { background: #ebf8ff; color: #2b6cb0; }
.badge-grammar { background: #f0fff4; color: #2f855a; }
.badge-assignments { background: #fff5f5; color: #c53030; }
.badge-reference { background: #fffaf0; color: #c05621; }
.badge-questionanswer { background: #faf5ff; color: #6b46c1; }

.reading-time {
    font-size: 0.85em;
    color: #718096;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* --- Action Buttons --- */
.btn-read-more {
    background: #3182ce;
    color: #ffffff;
    border: none;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 0.88em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-read-more:hover {
    background: #2b6cb0;
    color: #ffffff;
    text-decoration: none;
    transform: translateX(2px);
}

.back-btn {
    background: #718096;
    color: #ffffff;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.back-btn:hover {
    background: #4a5568;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* --- Filter Pills --- */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-pill {
    padding: 6px 16px;
    border-radius: 20px;
    background: #edf2f7;
    color: #4a5568;
    font-size: 0.9em;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.filter-pill:hover, 
.filter-pill.active {
    background: #3182ce;
    color: #ffffff;
    text-decoration: none;
    border-color: #3182ce;
}

/* --- Search Box --- */
.search-controls {
    background: #ffffff;
    padding: 18px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

/* --- Single Topic View & Content Formatting --- */
.topic-single {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 35px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.topic-single-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ebf8ff;
}

.topic-single-header h2 {
    color: #1a202c;
    margin: 0 0 15px 0;
    font-size: 2em;
    font-weight: 600;
}

.topic-content {
    line-height: 1.85;
    color: #2d3748;
    margin-bottom: 30px;
    font-size: 1.05em;
    user-select: none;
    -webkit-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
}

.topic-content h1, .topic-content h2, .topic-content h3, 
.topic-content h4, .topic-content h5, .topic-content h6 {
    color: #1a202c;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
}

.topic-content h1 { font-size: 1.75em; border-bottom: 2px solid #3182ce; padding-bottom: 8px; }
.topic-content h2 { font-size: 1.5em; border-bottom: 1px solid #e2e8f0; padding-bottom: 6px; }
.topic-content h3 { font-size: 1.3em; color: #2b6cb0; }
.topic-content h4 { font-size: 1.15em; color: #2d3748; }

.topic-content p {
    margin-bottom: 18px;
    text-align: justify;
}

.topic-content ul, .topic-content ol {
    margin: 15px 0;
    padding-left: 28px;
}

.topic-content li {
    margin-bottom: 8px;
}

.topic-content blockquote {
    background: #f7fafc;
    border-left: 4px solid #3182ce;
    margin: 20px 0;
    padding: 15px 20px;
    font-style: italic;
    color: #4a5568;
    border-radius: 0 6px 6px 0;
}

.topic-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.topic-content table th,
.topic-content table td {
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    text-align: left;
}

.topic-content table th {
    background: #2d3748;
    color: #ffffff;
    font-weight: 600;
}

.topic-content table tr:nth-child(even) {
    background: #f7fafc;
}

.topic-content code {
    background: #edf2f7;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: #e53e3e;
    font-size: 0.9em;
}

.topic-content pre {
    background: #2d3748;
    color: #f7fafc;
    padding: 18px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.topic-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.topic-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    margin: 15px 0;
}

/* --- Embedded Responsive Video Player --- */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    margin: 25px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Attachments & External References --- */
.ref-links {
    background: #f7fafc;
    padding: 18px;
    border-radius: 8px;
    border-left: 4px solid #3182ce;
    margin-top: 25px;
}

.ref-links h5 {
    color: #2d3748;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.ref-links a {
    display: inline-block;
    margin: 4px 8px 4px 0;
    padding: 6px 14px;
    background: #3182ce;
    color: #ffffff;
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.88em;
    transition: background 0.2s ease;
}

.ref-links a:hover {
    background: #2b6cb0;
    text-decoration: none;
}

/* --- Topic Navigation Bar --- */
.topic-navigation {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.topic-nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: #3182ce;
    color: #ffffff;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.topic-nav-btn:hover {
    background: #2b6cb0;
    color: #ffffff;
    text-decoration: none;
}

.topic-nav-btn.disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    opacity: 0.7;
}

/* --- Share Options --- */
.share-options {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.share-options h4 {
    margin: 0 0 12px 0;
    color: #2d3748;
}

.share-btn {
    display: inline-block;
    margin: 4px;
    padding: 8px 18px;
    border-radius: 20px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.share-btn.copy { background: #718096; }
.share-btn.copy:hover { background: #4a5568; }
.share-btn.whatsapp { background: #25D366; }
.share-btn.whatsapp:hover { background: #1da851; }
.share-btn.email { background: #3182ce; }
.share-btn.email:hover { background: #2b6cb0; }

/* --- Reviews & Feedback Section --- */
.feedback-section {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    margin-top: 35px;
    border: 1px solid #e2e8f0;
}

.feedback-section h3 {
    color: #2d3748;
    margin: 0 0 20px 0;
    font-size: 1.6em;
    border-bottom: 2px solid #ebf8ff;
    padding-bottom: 10px;
}

.feedback-form {
    background: #f7fafc;
    padding: 22px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.stars-input .star-icon {
    font-size: 1.8em;
    color: #cbd5e0;
    cursor: pointer;
    transition: color 0.15s ease;
    margin-right: 4px;
}

.stars-input .star-icon:hover,
.stars-input .star-icon.active,
.stars-input .glyphicon-star,
.feedback-rating .glyphicon-star,
.topic-rating .glyphicon-star {
    color: #ecc94b;
}

.feedback-rating .glyphicon-star-empty,
.topic-rating .glyphicon-star-empty {
    color: #e2e8f0;
}

.feedback-item {
    background: #f7fafc;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.feedback-user {
    font-weight: 600;
    color: #2d3748;
}

.feedback-date {
    font-size: 0.85em;
    color: #a0aec0;
}
/* --- Mini Topic Card Ratings --- */
.topic-card-header .glyphicon-star {
    color: #ecc94b;
    font-size: 0.85em;
}

.topic-card-header .glyphicon-star-empty {
    color: #e2e8f0;
    font-size: 0.85em;
}

/* --- Draft Warnings & Status Labels --- */
.inactive-topic-warning {
    background-color: #fff5f5;
    border: 1px solid #feb2b2;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 6px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .edu-header h1 { font-size: 1.75em; }
    .topic-single { padding: 20px; }
    .topic-navigation { flex-direction: column; gap: 10px; }
    .share-btn { display: block; margin: 6px 0; }
    .feedback-section { padding: 18px; }
}