/* ==========================================================
   RajTeachers Premium Custom Stylesheet (Bootstrap 5 Extended)
   Rajasthan Education, Jobs & Career Portal
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #0f172a;
    --primary-light: #1e293b;
    --accent-color: #e11d48;
    --accent-hover: #be123c;
    --accent-light: rgba(225, 29, 72, 0.08);
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.04), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15,23,42,0.04), 0 4px 6px -2px rgba(15,23,42,0.04);
    --shadow-hover: 0 20px 25px -5px rgba(15,23,42,0.08), 0 8px 10px -6px rgba(15,23,42,0.08);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 15px;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
}

/* Custom Micro-Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Header & Logo */
.logo-title {
    font-weight: 900;
    font-size: 30px;
    letter-spacing: -0.5px;
    color: var(--accent-color);
    line-height: 1;
}
.logo-title span {
    color: var(--primary-color);
}
.logo-tagline {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Sticky Custom Navbar */
.custom-navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 2px solid var(--accent-color);
    z-index: 1020;
}
.custom-navbar .nav-link {
    color: #cbd5e1 !important;
    font-weight: 600;
    padding: 12px 18px !important;
    transition: var(--transition);
}
.custom-navbar .nav-link:hover, 
.custom-navbar .nav-link.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

/* Homepage Quick Matrix Grid (Hindi Jobs Grid) */
.matrix-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}
.matrix-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(225, 29, 72, 0.3);
}
.matrix-header {
    padding: 12px 16px;
    font-weight: 800;
    font-size: 15px;
    text-transform: uppercase;
    color: #ffffff;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Matrix Colors */
.bg-jobs { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.bg-results { background: linear-gradient(135deg, #16a34a, #15803d); }
.bg-admit { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.bg-keys { background: linear-gradient(135deg, #d97706, #b45309); }
.bg-notes { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.bg-papers { background: linear-gradient(135deg, #ec4899, #db2777); }
.bg-tests { background: linear-gradient(135deg, #0f172a, #1e293b); }
.bg-teacher { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.bg-calcs { background: linear-gradient(135deg, #f43f5e, #e11d48); }

.matrix-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.matrix-list-item {
    border-bottom: 1px dashed var(--border-color);
    transition: var(--transition);
}
.matrix-list-item:last-child {
    border-bottom: none;
}
.matrix-list-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
}
.matrix-list-item a:hover {
    color: var(--accent-color);
    background-color: var(--accent-light);
}

.new-badge {
    background-color: #ef4444;
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    animation: blinker 1.5s linear infinite;
}
@keyframes blinker {
    50% { opacity: 0; }
}

/* Detail Table styling */
.job-table {
    border-collapse: collapse;
    width: 100%;
}
.job-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 12px;
}
.job-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}
.job-table tr:nth-child(even) {
    background-color: var(--bg-color);
}

/* Calculators Stylings */
.calc-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px;
}
.calc-result-box {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-left: 5px solid var(--accent-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 25px;
}

/* Mock Test Engine Styles */
.timer-box {
    position: sticky;
    top: 90px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: var(--radius-md);
    padding: 15px;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 100;
}
.timer-pulse {
    color: #f43f5e;
    animation: pulse 1s infinite alternate;
}
@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.question-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
    transition: var(--transition);
}
.question-card:hover {
    border-color: #cbd5e1;
}
.option-label {
    display: block;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}
.option-label:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.option-input {
    display: none;
}
.option-input:checked + .option-label {
    background: var(--accent-light);
    border-color: var(--accent-color);
    color: var(--accent-color);
    font-weight: 600;
}

/* Mock Test Analysis Styles */
.analysis-correct {
    border: 2px solid #10b981 !important;
    background-color: #f0fdf4 !important;
}
.analysis-incorrect {
    border: 2px solid #ef4444 !important;
    background-color: #fef2f2 !important;
}
.correct-badge {
    background-color: #10b981;
    color: white;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}
.incorrect-badge {
    background-color: #ef4444;
    color: white;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}
.explanation-box {
    background: #f1f5f9;
    border-left: 4px solid #64748b;
    padding: 15px;
    margin-top: 15px;
    border-radius: 4px;
}

/* Circular Progress Chart for Score Cards */
.score-circle {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    border-radius: 50%;
    background: conic-gradient(var(--accent-color) var(--percent), #e2e8f0 0);
    display: flex;
    align-items: center;
    justify-content: center;
}
.score-circle::after {
    content: '';
    position: absolute;
    width: 125px;
    height: 125px;
    background: var(--card-bg);
    border-radius: 50%;
}
.score-inner {
    position: relative;
    z-index: 1;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
}
.score-inner span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Breadcrumbs Custom styling */
.custom-breadcrumb {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-weight: 500;
    font-size: 13px;
    box-shadow: var(--shadow-sm);
}
.custom-breadcrumb a {
    text-decoration: none;
    color: var(--accent-color);
}
.custom-breadcrumb a:hover {
    text-decoration: underline;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    background-color: var(--accent-color);
    color: white;
    border: none;
    outline: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 999;
}
#backToTop:hover {
    background-color: var(--accent-hover);
    transform: scale(1.1);
}

/* Admin Dashboard layout */
.admin-sidebar {
    background-color: var(--primary-color);
    min-height: 100vh;
    color: #94a3b8;
}
.admin-sidebar .nav-link {
    color: #94a3b8;
    padding: 12px 20px;
    font-weight: 500;
    border-left: 4px solid transparent;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #ffffff;
    background-color: var(--primary-light);
    border-left-color: var(--accent-color);
}

/* Responsive Overrides */
@media (max-width: 991px) {
    .admin-sidebar {
        min-height: auto;
    }
}
