/**
 * TP-ARMS Custom Stylesheet
 * Modern Academic Theme with Clean Typography and Tactile UI
 */

:root {
    --primary-blue: #1e3a8a;
    --primary-hover: #1e40af;
    --secondary-teal: #0f766e;
    --accent-amber: #f59e0b;
    --dark-slate: #0f172a;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --card-border: #e2e8f0;
    --sidebar-bg: #0f172a;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
    background-color: var(--bg-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

/* Typography & Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark-slate);
    letter-spacing: -0.02em;
}

/* Public Navbar */
.navbar-academic {
    background-color: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    padding: 0.85rem 0;
    transition: all 0.2s ease-in-out;
}

.navbar-academic .navbar-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.navbar-academic .nav-link {
    font-weight: 500;
    color: #475569;
    padding: 0.5rem 0.9rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.navbar-academic .nav-link:hover {
    color: var(--primary-blue);
    background-color: #f1f5f9;
}

.navbar-academic .nav-link.active {
    color: var(--primary-blue);
    font-weight: 600;
    background-color: #e0e7ff;
}

/* Hero Section */
.hero-wrapper {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #ffffff;
    padding: 5rem 0 4.5rem;
    position: relative;
    overflow: hidden;
}

.hero-wrapper::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    color: #93c5fd;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 50rem;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 2rem;
    max-width: 580px;
}

.hero-image-container img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.35));
    border-radius: 1rem;
    transition: transform 0.3s ease;
}

.hero-image-container img:hover {
    transform: translateY(-4px);
}

/* Stats Counter Row */
.stats-bar {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    margin-top: -2.5rem;
    position: relative;
    z-index: 10;
    padding: 1.5rem 1rem;
    border: 1px solid var(--card-border);
}

.stat-item {
    text-align: center;
    padding: 0.5rem 1rem;
}

.stat-value {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--primary-blue);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Teacher Bio & Avatar */
.teacher-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.teacher-avatar-box {
    text-align: center;
    padding: 2rem 1.5rem 1rem;
}

.teacher-avatar-img {
    width: 170px;
    height: 170px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #e0e7ff;
    box-shadow: 0 10px 15px -3px rgba(30, 58, 138, 0.15);
}

/* Papers & Video Cards */
.hover-shadow {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}
.hover-shadow:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04) !important;
    border-color: #93c5fd !important;
}

.resource-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 0.85rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08), 0 4px 8px -4px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

.card-badge-subject {
    font-size: 0.75rem;
    font-weight: 700;
    background-color: #dbeafe;
    color: #1e40af;
    border-radius: 0.35rem;
    padding: 0.25rem 0.55rem;
}

.card-badge-term {
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #f1f5f9;
    color: #475569;
    border-radius: 0.35rem;
    padding: 0.25rem 0.55rem;
}

.card-badge-cat {
    font-size: 0.75rem;
    font-weight: 700;
    background-color: #fef3c7;
    color: #92400e;
    border-radius: 0.35rem;
    padding: 0.25rem 0.55rem;
}

/* Video Thumbnails */
.video-thumbnail-container {
    position: relative;
    border-radius: 0.85rem 0.85rem 0 0;
    overflow: hidden;
    background-color: #000;
    aspect-ratio: 16 / 9;
    cursor: pointer;
}

.video-thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.2s ease;
    opacity: 0.95;
}

.video-thumbnail-container:hover img {
    transform: scale(1.05);
    opacity: 1;
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    background: rgba(239, 68, 68, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.4rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.video-thumbnail-container:hover .play-button-overlay {
    background: #dc2626;
    transform: translate(-50%, -50%) scale(1.12);
}

/* Filter Bar & Pills */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.filter-pill {
    display: inline-block;
    padding: 0.45rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50rem;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.filter-pill:hover {
    background: #f1f5f9;
    color: var(--primary-blue);
    border-color: #94a3b8;
}

.filter-pill.active {
    background: var(--primary-blue);
    color: #ffffff;
    border-color: var(--primary-blue);
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.25);
}

/* Search Input Styling */
.search-input-group {
    position: relative;
    max-width: 420px;
}

.search-input-group .form-control {
    padding-left: 2.4rem;
    border-radius: 0.6rem;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.search-input-group .form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

/* Footer Styling */
.academic-footer {
    background-color: var(--dark-slate);
    color: #94a3b8;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.academic-footer h5 {
    color: #f8fafc;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

.academic-footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.academic-footer a:hover {
    color: #60a5fa;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 2rem;
    margin-top: 3rem;
    font-size: 0.875rem;
}

/* Admin CMS Styling */
.admin-body {
    background-color: #f1f5f9;
}

.admin-sidebar {
    background-color: var(--sidebar-bg);
    min-height: 100vh;
    color: #94a3b8;
    padding-top: 1.5rem;
}

.admin-sidebar .sidebar-brand {
    padding: 0.5rem 1.5rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.admin-sidebar .nav-link {
    color: #94a3b8;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    margin: 0.2rem 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.admin-sidebar .nav-link:hover {
    color: #ffffff;
    background-color: #1e293b;
}

.admin-sidebar .nav-link.active {
    color: #ffffff;
    background-color: var(--primary-blue);
    font-weight: 600;
}

.admin-topbar {
    background: #ffffff;
    padding: 0.85rem 1.75rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-metric-card {
    border-radius: 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.2s ease;
}

.admin-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
}

.metric-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.metric-primary { background: #dbeafe; color: #1e40af; }
.metric-teal { background: #ccfbf1; color: #0f766e; }
.metric-amber { background: #fef3c7; color: #b45309; }
.metric-purple { background: #f3e8ff; color: #7e22ce; }

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.15rem;
    }
    .stats-bar {
        margin-top: 1.5rem;
    }
    .admin-sidebar {
        min-height: auto;
    }
}
