:root {
    --brand: #0f766e;
    --brand-light: #14b8a6;
    --secondary: #0f172a;
    --accent: #3b82f6;
    --surface: #f8fafc;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--surface);
    color: #334155;
    line-height: 1.6;
}

.serif-title { font-family: 'Merriweather', serif; }
.container { max-width: 1200px !important; }

/* --- Header & Nav --- */
.top-header {
    background: var(--secondary);
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
    font-weight: 600;
}
.main-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.nav-link {
    color: #475569 !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 1rem 1.25rem !important;
    transition: color 0.2s;
}
.nav-link:hover { color: var(--brand) !important; }

/* Hover Dropdowns */
@media (min-width: 992px) {
    .dropdown:hover .dropdown-menu { display: block; margin-top: 0; animation: fadeIn 0.3s; }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Hero Slider --- */
.hero-section {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
    margin-bottom: 3rem;
}
.slide-container {
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    background-size: cover;
    background-position: center;
    color: #fff;
}
.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 100%);
    z-index: 1;
}
.slide-content {
    position: relative;
    z-index: 2;
    padding: 4rem;
    max-width: 800px;
}
.slide-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.slide-desc {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    font-weight: 500;
}

/* --- Global Search --- */
.search-area {
    position: relative;
    background: #fff;
    border-radius: 99px;
    padding: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    max-width: 500px;
    width: 100%;
}
.search-area input {
    border: none;
    padding: 0.8rem 1.5rem 0.8rem 3.5rem;
    width: 100%;
    border-radius: 99px;
    font-weight: 600;
    outline: none;
}
.search-icon-fixed {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand);
    font-size: 1.1rem;
}

/* --- Cards & Panels --- */
.feature-card {
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: var(--card-shadow);
    height: 100%;
    transition: all 0.3s ease;
}
.feature-card:hover { transform: translateY(-10px); border-color: var(--brand-light); }
.feature-icon {
    width: 50px;
    height: 50px;
    background: #f1f5f9;
    color: var(--brand);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}
.feature-card h5 { font-weight: 800; color: var(--secondary); }

.content-panel {
    background: #fff;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0,0,0,0.02);
    height: 100%;
}

/* --- Automated Digital Book Covers --- */
.digital-cover-box {
    width: 100%; height: 100%;
    border-radius: 6px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    color: #fff;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
    user-select: none;
}
.digital-cover-box::after {
    content: "";
    position: absolute;
    left: 0; top: 0;
    width: 5px; height: 100%;
    background: rgba(0,0,0,0.15);
    border-right: 1px solid rgba(255,255,255,0.05);
}
.cover-tag { font-size: 0.5rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.8; }
.cover-title-small { font-size: 0.8rem; font-weight: 800; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cover-footer-small { font-size: 0.65rem; opacity: 0.7; font-weight: 600; }
.cover-indigo { background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%); }
.cover-emerald { background: linear-gradient(135deg, #10b981 0%, #047857 100%); }
.cover-rose { background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%); }
.cover-amber { background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%); }
.cover-violet { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); }
.cover-cyan { background: linear-gradient(135deg, #06b6d4 0%, #0e7490 100%); }

/* --- Modern Resource Cards --- */
.resource-card-modern {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-color: rgba(0,0,0,0.08) !important;
    backface-visibility: hidden;
    transform: translateZ(0);
}
.resource-card-modern:hover {
    transform: translateY(-10px) translateZ(0);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15) !important;
    border-color: var(--brand-light) !important;
}
.modern-book-cover {
    box-shadow: 2px 5px 15px rgba(0,0,0,0.15);
}
.spine-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: rgba(0,0,0,0.15);
    border-right: 1px solid rgba(255,255,255,0.05);
}
.backdrop-blur { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tiny-title { font-size: 0.75rem; letter-spacing: -0.01em; line-height: 1.2; }

.pulse-animation {
    animation: pulse-border 3s ease-in-out infinite;
}
@keyframes pulse-border {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.bg-accent { background-color: var(--accent) !important; }

/* Grid Utilities for Dense Library */
@media (min-width: 1400px) {
    .col-xl-2 { width: 16.666667%; }
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8fafc;
}
.panel-title { font-weight: 800; font-size: 1.1rem; color: var(--secondary); text-transform: uppercase; letter-spacing: 0.05em; }

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    z-index: 2000;
    margin-top: 12px;
    display: none;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
.result-item {
    padding: 0.9rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #1e293b;
    border-bottom: 1px solid #f8fafc;
    transition: all 0.2s;
}
.result-item:hover { background: #f0f9ff; }
.result-icon {
    width: 38px;
    height: 38px;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
}

/* --- Footer --- */
.main-footer {
    background: var(--secondary);
    color: #94a3b8;
    padding-top: 5rem;
    margin-top: 5rem;
}
.footer-top { border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 4rem; }
.footer-brand h4 { color: #fff; font-weight: 800; margin-bottom: 1rem; }
.footer-title { color: #f8fafc; font-weight: 700; margin-bottom: 1.5rem; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.1em; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: #94a3b8; text-decoration: none; transition: color 0.2s; font-weight: 600; }
.footer-links a:hover { color: #fff; }
.footer-contact { display: flex; gap: 12px; margin-bottom: 1.6rem; align-items: flex-start; }
.footer-contact i { color: var(--brand-light); margin-top: 4px; }
.footer-bottom { background: #0b1120; padding: 2rem 0; color: #64748b; font-size: 0.85rem; font-weight: 600; }

.btn-brand-light { background: var(--brand-light); border-color: var(--brand-light); }
.btn-brand-light:hover { background: #0d9488; }

.bg-primary-soft { background-color: rgba(15, 118, 110, 0.1); }
.text-primary { color: var(--brand) !important; }
.btn-primary { background-color: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background-color: var(--brand-light); border-color: var(--brand-light); }
