/* ==============================================================================
   Enduring Education - Design System & Master Stylesheet
   Brand Colors:
     - Royal Blue: #103C8B
     - Education Green: #258514
     - White: #FFFFFF
     - Light Background: #F5F8F4
     - Dark Text: #1F2937
   ============================================================================== */

:root {
    --brand-royal-blue: #103C8B;
    --brand-royal-blue-dark: #0A265C;
    --brand-royal-blue-light: #2059BF;
    --brand-green: #258514;
    --brand-green-dark: #195E0D;
    --brand-green-light: #34B01E;
    --brand-bg-light: #F5F8F4;
    --brand-card-bg: #FFFFFF;
    --brand-dark-text: #1F2937;
    --brand-muted-text: #4B5563;
    --brand-border: #E5E7EB;
    --brand-border-focus: #103C8B;
    --brand-gold: #D97706;
    --shadow-soft: 0 4px 20px rgba(16, 60, 139, 0.06);
    --shadow-hover: 0 16px 36px rgba(16, 60, 139, 0.14);
    --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--brand-bg-light);
    color: var(--brand-dark-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--brand-dark-text);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--brand-royal-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-royal-blue-dark);
}

/* ==============================================================================
   Navbar & Branding
   ============================================================================== */
.navbar-brand-full-logo {
    height: 44px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
    display: inline-block;
    transition: transform 0.2s ease;
}

.navbar-brand:hover .navbar-brand-full-logo {
    transform: scale(1.02);
}

.header-social-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #64748b;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.header-social-btn:hover {
    background-color: var(--brand-royal-blue);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(16, 60, 139, 0.25);
}

.main-navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid rgba(16, 60, 139, 0.08);
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: #374151 !important;
    padding: 0.5rem 0.9rem !important;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--brand-royal-blue) !important;
    background-color: rgba(16, 60, 139, 0.05);
}

.nav-admin-link {
    font-size: 0.8rem;
    color: #9CA3AF !important;
    padding: 0.35rem 0.6rem !important;
}
.nav-admin-link:hover {
    color: var(--brand-royal-blue) !important;
}

/* ==============================================================================
   Hero Section
   ============================================================================== */
.hero-wrapper {
    background: linear-gradient(135deg, #103C8B 0%, #17489C 55%, #1F6E1C 100%);
    color: #ffffff;
    padding: 5rem 0 5.5rem;
    position: relative;
    overflow: hidden;
}

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

.hero-pill-badge {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border-radius: 50rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #E2E8F0;
    max-width: 620px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-search-box {
    background-color: #ffffff;
    border-radius: 50rem;
    padding: 0.4rem 0.5rem 0.4rem 1.4rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.hero-search-box:focus-within {
    border-color: var(--brand-green);
    box-shadow: 0 12px 35px rgba(37, 133, 20, 0.25);
}

.hero-search-input {
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--brand-dark-text);
    width: 100%;
    background: transparent;
}

/* Arrange book covers showcase in hero */
.hero-book-showcase {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

.hero-book-card-main {
    width: 240px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 3;
    transition: transform 0.3s ease;
}

.hero-book-card-main:hover {
    transform: translateY(-8px) scale(1.02);
}

.hero-book-card-bg-left {
    position: absolute;
    width: 190px;
    left: 20px;
    transform: rotate(-10deg) scale(0.9);
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
    z-index: 1;
    opacity: 0.85;
}

.hero-book-card-bg-right {
    position: absolute;
    width: 190px;
    right: 20px;
    transform: rotate(10deg) scale(0.9);
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
    z-index: 2;
    opacity: 0.88;
}

/* ==============================================================================
   Custom Buttons
   ============================================================================== */
.btn-primary-edu {
    background-color: var(--brand-royal-blue);
    border-color: var(--brand-royal-blue);
    color: #ffffff;
    font-weight: 600;
    border-radius: 50rem;
    padding: 0.65rem 1.6rem;
    transition: all 0.2s ease;
}

.btn-primary-edu:hover {
    background-color: var(--brand-royal-blue-dark);
    border-color: var(--brand-royal-blue-dark);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 60, 139, 0.25);
}

.btn-green-edu {
    background-color: var(--brand-green);
    border-color: var(--brand-green);
    color: #ffffff;
    font-weight: 600;
    border-radius: 50rem;
    padding: 0.65rem 1.6rem;
    transition: all 0.2s ease;
}

.btn-green-edu:hover {
    background-color: var(--brand-green-dark);
    border-color: var(--brand-green-dark);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 133, 20, 0.3);
}

.btn-outline-edu {
    background-color: transparent;
    border: 2px solid var(--brand-royal-blue);
    color: var(--brand-royal-blue);
    font-weight: 600;
    border-radius: 50rem;
    padding: 0.6rem 1.5rem;
    transition: all 0.2s ease;
}

.btn-outline-edu:hover {
    background-color: var(--brand-royal-blue);
    color: #ffffff;
}

.btn-amazon {
    background: linear-gradient(180deg, #FFA724 0%, #FF9900 100%);
    border: 1px solid #D67F00;
    color: #111111;
    font-weight: 700;
    border-radius: 50rem;
    padding: 0.5rem 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-amazon:hover {
    background: linear-gradient(180deg, #FFB84D 0%, #E68A00 100%);
    color: #000000;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.35);
}

/* ==============================================================================
   Book Cards
   ============================================================================== */
.book-card {
    background-color: var(--brand-card-bg);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.book-card-cover-wrapper {
    position: relative;
    background-color: #091f38;
    overflow: hidden;
    padding-top: 135%; /* 3:4 aspect ratio */
}

.book-card-cover-wrapper > a,
.book-card-cover-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.book-card-cover-wrapper .default-academic-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.book-card-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-card:hover .book-card-cover {
    transform: scale(1.03);
}

.badge-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--brand-green);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.75rem;
    border-radius: 50rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.badge-free {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #D97706;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.75rem;
    border-radius: 50rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.book-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book-card-format {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-royal-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.book-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.35rem;
    color: var(--brand-dark-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-card-author {
    font-size: 0.85rem;
    color: var(--brand-muted-text);
    margin-bottom: 0.75rem;
}

.book-card-desc {
    font-size: 0.82rem;
    color: #64748B;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.book-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #F1F5F9;
    margin-top: auto;
}

/* ==============================================================================
   Category Cards
   ============================================================================== */
.category-card {
    background-color: #ffffff;
    border-radius: 14px;
    padding: 1.5rem 1rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: var(--shadow-card);
    transition: all 0.25s ease;
    display: block;
    color: var(--brand-dark-text);
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    color: var(--brand-royal-blue);
    border-color: rgba(16, 60, 139, 0.15);
}

.category-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background-color: var(--brand-bg-light);
    color: var(--brand-royal-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    transition: all 0.25s ease;
}

.category-card:hover .category-icon-box {
    background-color: var(--brand-royal-blue);
    color: #ffffff;
}

.category-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.category-count {
    font-size: 0.75rem;
    color: #64748B;
    font-weight: 600;
}

/* ==============================================================================
   Free Books Banner
   ============================================================================== */
.free-books-banner {
    background: linear-gradient(135deg, #258514 0%, #16560B 60%, #103C8B 100%);
    border-radius: 20px;
    padding: 3.5rem 3rem;
    color: #ffffff;
    box-shadow: 0 15px 35px rgba(37, 133, 20, 0.2);
}

/* ==============================================================================
   Floating AI Chatbot Widget
   ============================================================================== */
.ai-floating-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1050;
    background: linear-gradient(135deg, #103C8B 0%, #258514 100%);
    color: #ffffff;
    border: none;
    border-radius: 50rem;
    padding: 0.85rem 1.4rem;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 10px 25px rgba(16, 60, 139, 0.35);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.ai-floating-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(16, 60, 139, 0.45);
    color: #ffffff;
}

.ai-floating-btn .ai-pulse {
    width: 10px;
    height: 10px;
    background-color: #4ADE80;
    border-radius: 50%;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.ai-chat-window {
    position: fixed;
    bottom: 85px;
    right: 25px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 520px;
    background-color: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    z-index: 1060;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.ai-chat-window.open {
    display: flex;
    animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-chat-header {
    background: linear-gradient(135deg, #103C8B 0%, #16560B 100%);
    color: #ffffff;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: #F8FAFC;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ai-msg {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.45;
}

.ai-msg-assistant {
    background-color: #ffffff;
    color: #1F2937;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #E2E8F0;
}

.ai-msg-user {
    background-color: var(--brand-royal-blue);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ai-chat-input-area {
    padding: 0.75rem;
    background-color: #ffffff;
    border-top: 1px solid #E2E8F0;
    display: flex;
    gap: 0.5rem;
}

.ai-quick-prompts {
    background-color: #f8fafc;
}

.ai-chip {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ai-chip:hover {
    background-color: var(--brand-royal-blue);
    border-color: var(--brand-royal-blue);
    color: #ffffff;
}

/* ==============================================================================
   Footer
   ============================================================================== */
.main-footer {
    background-color: #0F172A;
    color: #94A3B8;
    padding: 4.5rem 0 2.5rem;
    border-top: 3px solid var(--brand-royal-blue);
}

.footer-brand-title {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
}

.footer-heading {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a {
    color: #94A3B8;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 4px;
}

.footer-bottom {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.4rem;
    }
    .hero-subtitle {
        font-size: 1.05rem;
    }
    .free-books-banner {
        padding: 2.5rem 1.5rem;
    }
    .hero-academic-title {
        font-size: 2.35rem !important;
    }
    .hero-academic-wrapper {
        padding: 3.5rem 0 4rem;
    }
    .academic-categories-container {
        padding: 2rem 1.25rem;
    }
    .free-books-banner-custom {
        padding: 2.25rem 1.5rem;
        text-align: center;
    }
    .free-banner-text {
        margin-bottom: 1.5rem;
    }
}

/* ==============================================================================
   Mockup Design System Classes
   ============================================================================== */
.hero-academic-wrapper {
    background: radial-gradient(circle at 86% 25%, rgba(16, 185, 129, 0.45) 0%, rgba(5, 150, 105, 0.22) 36%, transparent 68%),
                linear-gradient(135deg, #092c6b 0%, #0d4685 30%, #0c5750 65%, #086338 100%);
    color: #ffffff;
    padding: 5.5rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.hero-scholarly-badge {
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.45rem 1.15rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-academic-title {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 1.25rem;
}

.hero-academic-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.92);
    max-width: 620px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-search-bar-mockup {
    background: #ffffff;
    border-radius: 50px;
    padding: 0.35rem 0.45rem 0.35rem 1.4rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    max-width: 580px;
    transition: all 0.2s ease;
}

.hero-search-bar-mockup:focus-within {
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    outline: 2px solid rgba(255, 255, 255, 0.5);
}

.hero-search-input-mockup {
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: #1f2937;
    width: 100%;
    background: transparent;
    padding-right: 0.5rem;
}

.btn-find-books-mockup {
    background-color: #0f2b60;
    color: #ffffff !important;
    font-weight: 700;
    border-radius: 50px;
    padding: 0.65rem 1.6rem;
    border: none;
    font-size: 0.92rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-find-books-mockup:hover {
    background-color: #091b3e;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.hero-showcase-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.4);
    max-width: 360px;
    margin: 0 auto;
    color: #1f2937;
    transition: transform 0.3s ease;
}

.hero-showcase-card:hover {
    transform: translateY(-6px);
}

.hero-showcase-cover {
    background: linear-gradient(135deg, #0d285c 0%, #173b7d 100%);
    border-radius: 12px;
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    overflow: hidden;
    color: #ffffff;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.hero-showcase-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.3s ease;
}

.hero-showcase-card:hover .hero-showcase-img {
    transform: scale(1.03);
}

.hero-showcase-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #16a34a;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.hero-showcase-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.hero-showcase-author {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.btn-details-green {
    background-color: #16a34a;
    color: #ffffff !important;
    font-weight: 700;
    border-radius: 50px;
    padding: 0.45rem 1.25rem;
    font-size: 0.82rem;
    text-decoration: none;
    border: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.btn-details-green:hover {
    background-color: #15803d;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn-view-detail-yellow,
.btn-details-yellow {
    background-color: #f59e0b !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 6px;
    padding: 0.45rem 0.9rem;
    font-size: 0.78rem;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.25);
    cursor: pointer;
}

.btn-view-detail-yellow:hover,
.btn-details-yellow:hover {
    background-color: #d97706 !important;
    color: #0f172a !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(245, 158, 11, 0.35);
}

/* Featured Scholarly Works */
.scholarly-work-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.scholarly-work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px rgba(16, 60, 139, 0.12);
}

.work-card-banner {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.25rem;
    position: relative;
    letter-spacing: -0.01em;
}

.work-banner-green { background: linear-gradient(135deg, #15803d 0%, #16a34a 100%); }
.work-banner-cyan { background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%); }
.work-banner-navy { background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%); }

.work-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 50px;
    padding: 3px 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ffffff;
}

.work-badge-blue { background-color: #1d4ed8; }
.work-badge-green { background-color: #059669; }
.work-badge-amber { background-color: #d97706; }

.work-card-body {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.work-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 0.4rem;
}

.work-card-author {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.work-card-desc {
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.55;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.work-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    border-top: 1px solid #f1f5f9;
}

.work-isbn-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: #15803d;
    letter-spacing: 0.02em;
}

.btn-book-details-navy {
    background-color: #0f2b60;
    color: #ffffff !important;
    font-weight: 700;
    border-radius: 50px;
    padding: 0.45rem 1.25rem;
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-book-details-navy:hover {
    background-color: #091b3e;
    transform: translateY(-1px);
}

.btn-catalog-pill {
    border: 1px solid #94a3b8;
    color: #0f2b60;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50px;
    padding: 0.45rem 1.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-catalog-pill:hover {
    background-color: #0f2b60;
    color: #ffffff;
    border-color: #0f2b60;
}

/* Categories Container */
.academic-categories-container {
    background: #ffffff;
    border-radius: 24px;
    padding: 3.5rem 2.5rem;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.03);
    border: 1px solid #eef2f6;
}

.categories-top-badge {
    background: rgba(16, 60, 139, 0.08);
    color: #103c8b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 4px 14px;
    border-radius: 50px;
    display: inline-block;
    text-transform: uppercase;
}

.categories-main-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 0.5rem;
    margin-bottom: 0.35rem;
}

.categories-main-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    max-width: 620px;
    margin: 0 auto 2.5rem;
}

.academic-cat-card {
    background: #f8fafc;
    border-radius: 14px;
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid #f1f5f9;
    height: 100%;
}

.academic-cat-card:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(16, 60, 139, 0.08);
}

.academic-cat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
}

.cat-icon-blue { background: #eff6ff; color: #2563eb; }
.cat-icon-green { background: #f0fdf4; color: #16a34a; }
.cat-icon-cyan { background: #ecfeff; color: #0891b2; }
.cat-icon-purple { background: #faf5ff; color: #7c3aed; }
.cat-icon-emerald { background: #f0fdf4; color: #059669; }
.cat-icon-sky { background: #f0f9ff; color: #0284c7; }
.cat-icon-amber { background: #fffbeb; color: #d97706; }
.cat-icon-rose { background: #fff1f2; color: #e11d48; }
.cat-icon-indigo { background: #eef2ff; color: #4f46e5; }
.cat-icon-teal { background: #f0fdfa; color: #0d9488; }
.cat-icon-orange { background: #fff7ed; color: #ea580c; }
.cat-icon-violet { background: #f5f3ff; color: #8b5cf6; }

.academic-cat-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.academic-cat-count {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* Recently Added Volumes */
.recent-vol-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.recent-vol-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

.recent-vol-banner {
    height: 125px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.recent-banner-navy { background: linear-gradient(135deg, #103c8b 0%, #1e3a8a 100%); }
.recent-banner-green { background: linear-gradient(135deg, #15803d 0%, #16a34a 100%); }
.recent-banner-blue { background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%); }
.recent-banner-dark { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); }

.recent-vol-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.recent-vol-tag {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
    display: block;
}

.tag-cyan { color: #0891b2; }
.tag-green { color: #16a34a; }
.tag-blue { color: #2563eb; }
.tag-purple { color: #7c3aed; }

.recent-vol-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 0.35rem;
}

.recent-vol-author {
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.btn-details-preview-outline {
    border: 1px solid #94a3b8;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    text-decoration: none;
    width: 100%;
    text-align: center;
    display: block;
    transition: all 0.2s;
}

.btn-details-preview-outline:hover {
    border-color: #0f2b60;
    background: #0f2b60;
    color: #ffffff;
}

.new-releases-link {
    color: #15803d;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.new-releases-link:hover {
    color: #166534;
    text-decoration: underline;
}

/* Distinguished Author Highlights */
.author-highlight-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #eef2f6;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
    transition: all 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.author-highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px rgba(16, 60, 139, 0.09);
}

.author-avatar-initials {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.avatar-initials-ev { background: linear-gradient(135deg, #103c8b, #1d4ed8); }
.avatar-initials-as { background: linear-gradient(135deg, #15803d, #16a34a); }
.avatar-initials-bd { background: linear-gradient(135deg, #0284c7, #38bdf8); }

.author-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.2rem;
}

.author-role {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0284c7;
    margin-bottom: 0.75rem;
}

.author-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.btn-author-profile-pill {
    color: #0f2b60;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 50px;
    padding: 0.45rem 1.4rem;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.btn-author-profile-pill:hover {
    background: #eff6ff;
    color: #103c8b;
}

/* Free Books Banner */
.free-books-banner-custom {
    background: linear-gradient(90deg, #15803d 0%, #0d9488 45%, #0284c7 100%);
    border-radius: 20px;
    padding: 3.25rem 3rem;
    color: #ffffff;
    box-shadow: 0 12px 35px rgba(21, 128, 61, 0.25);
}

.free-banner-badge {
    background: #ffffff;
    color: #15803d;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.free-banner-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.free-banner-text {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
    max-width: 680px;
}

.btn-free-library-white {
    background: #ffffff;
    color: #0284c7 !important;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 50px;
    padding: 0.75rem 2.25rem;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-free-library-white:hover {
    background: #f8fafc;
    color: #0369a1 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* ==============================================================================
   Homepage 5-Column Book Showcase Grid & Mint Pagination (Matching User Screenshot)
   ============================================================================== */
.book-showcase-section {
    background-color: #f8fafc;
    padding: 2.75rem 0 3.5rem 0;
}

.books-showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 576px) {
    .books-showcase-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

@media (min-width: 768px) {
    .books-showcase-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (min-width: 992px) {
    .books-showcase-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 22px;
    }
}

.book-showcase-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease;
    position: relative;
}

.book-showcase-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.09);
    border-color: #cbd5e1;
    color: inherit;
    text-decoration: none;
}

.book-showcase-cover-wrap {
    width: 100%;
    aspect-ratio: 1 / 1.42;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f1f5f9;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.book-showcase-cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.book-showcase-card:hover .book-showcase-cover-wrap img {
    transform: scale(1.02);
}

.book-showcase-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 10px;
    margin-bottom: 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.7em;
    transition: color 0.15s ease;
}

.book-showcase-card:hover .book-showcase-title {
    color: #103c8b;
}

.book-showcase-author {
    font-size: 0.76rem;
    color: #64748b;
    font-weight: 400;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* ==============================================================================
   Free Learning Resources Cards (Compact Size & Open Access Badges)
   ============================================================================== */
.free-learning-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.free-learning-card {
    width: 195px;
    min-width: 195px;
    max-width: 195px;
    background: #ffffff;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.free-learning-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.free-learning-cover-wrap {
    width: 100%;
    height: 230px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
    display: block;
}

.free-learning-cover-wrap img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.free-learning-card:hover .free-learning-cover-wrap img {
    transform: scale(1.03);
}

.free-learning-badge {
    position: absolute;
    top: 7px;
    left: 7px;
    background: #16a34a;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.free-learning-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 9px;
    margin-bottom: 6px;
    line-height: 1.35;
    height: 2.7em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.15s ease;
}

.free-learning-card:hover .free-learning-title {
    color: #103c8b;
}

.btn-free-download-icon {
    background-color: #16a34a;
    color: #ffffff !important;
    height: 36px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-size: 1rem;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.25);
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-free-download-icon:hover {
    background-color: #15803d;
    transform: translateY(-1px);
    color: #ffffff !important;
}

.btn-view-detail-icon {
    background-color: #f59e0b;
    color: #0f172a !important;
    height: 36px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-size: 1rem;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.25);
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-view-detail-icon:hover {
    background-color: #d97706;
    transform: translateY(-1px);
    color: #0f172a !important;
}

/* ==============================================================================
   Default Academic Book Cover (When no image is uploaded)
   ============================================================================== */
.default-academic-cover {
    width: 100%;
    height: 100%;
    min-height: 100%;
    background: linear-gradient(180deg, #091f38 0%, #0d364d 35%, #083c3e 65%, #04271d 100%);
    border-radius: 8px;
    padding: 6px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    overflow: hidden;
    color: #ffffff;
    user-select: none;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
}

.default-academic-cover-inner {
    border: 1px solid rgba(147, 197, 253, 0.35);
    border-radius: 6px;
    height: 100%;
    width: 100%;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.default-academic-cover-middle {
    margin: auto 0;
    text-align: center;
    width: 100%;
    padding: 6px 4px;
}

.default-academic-cover-title {
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace, sans-serif;
    font-weight: 800;
    font-size: 0.94rem;
    line-height: 1.34;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1.5px solid #d97706;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.default-academic-cover-subtitle {
    color: #cbd5e1;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.62rem;
    line-height: 1.35;
    margin-top: 4px;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.92;
}

/* Scaling up for large displays (like Book Details page) */
.default-academic-cover.large-cover {
    padding: 16px;
}
.default-academic-cover.large-cover .default-academic-cover-inner {
    padding: 32px 24px;
}
.default-academic-cover.large-cover .default-academic-cover-title {
    font-size: 1.45rem;
    line-height: 1.35;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom-width: 2.5px;
}
.default-academic-cover.large-cover .default-academic-cover-subtitle {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-top: 8px;
}

/* Mint Square Pagination Matching User Mockup */
.mint-pagination-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2rem;
}

.mint-page-btn {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    background-color: #a7f3d0;
    color: #065f46;
    border: none;
}

.mint-page-btn:hover {
    background-color: #6ee7b7;
    color: #064e3b;
    transform: translateY(-1px);
}

.mint-page-btn.active {
    background-color: #00c09d;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 192, 157, 0.35);
}

.mint-page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Polished Form Switch & Toggle Badges */
.form-switch .form-check-input {
    width: 2.5em;
    height: 1.35em;
    margin-top: 0.1em;
    cursor: pointer;
    transition: background-position 0.2s ease-in-out, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-switch .form-check-input:checked {
    background-color: var(--brand-royal-blue, #103C8B);
    border-color: var(--brand-royal-blue, #103C8B);
}

.form-switch .form-check-input:focus {
    border-color: var(--brand-royal-blue, #103C8B);
    box-shadow: 0 0 0 0.25rem rgba(16, 60, 139, 0.15);
}

/* Book Description Typography */
.book-description-content {
    font-size: 0.95rem;
    line-height: 1.75;
    color: #334155;
}

.book-description-content p {
    margin-bottom: 1rem;
}

.book-description-content p:last-child {
    margin-bottom: 0;
}

.book-description-content ul,
.book-description-content ol {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.book-description-content li {
    margin-bottom: 0.35rem;
}

.book-description-content strong,
.book-description-content b {
    color: #0f172a;
    font-weight: 600;
}

/* Free Learning Resources Compact Small Thumbnail Cards (Smaller than catalog) */
.free-learning-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

.free-learning-card {
    width: 168px;
    min-width: 168px;
    max-width: 168px;
    background: #ffffff;
    border-radius: 10px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    box-sizing: border-box;
}

.free-learning-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.09);
    border-color: #86efac;
    color: inherit;
    text-decoration: none;
}

.free-learning-cover-wrap {
    width: 100%;
    height: 195px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f1f5f9;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: block;
}

.free-learning-cover-wrap img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.free-learning-card:hover .free-learning-cover-wrap img {
    transform: scale(1.03);
}

.free-learning-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #16a34a;
    color: #ffffff;
    font-size: 0.64rem;
    font-weight: 700;
    padding: 2.5px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    line-height: 1.2;
}

.free-learning-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 8px;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6em;
    transition: color 0.15s ease;
}

.free-learning-card:hover .free-learning-title {
    color: #065f46;
}

.btn-free-download {
    background-color: #16a34a !important;
    color: #ffffff !important;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none !important;
    transition: background-color 0.15s ease, transform 0.15s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.25);
    width: 100%;
    box-sizing: border-box;
}

.btn-free-download:hover {
    background-color: #15803d !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(22, 163, 74, 0.35);
}

.free-learning-details-link {
    font-size: 0.68rem;
    color: #64748b;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    margin-top: 2px;
    display: block;
    transition: color 0.15s ease;
}

.free-learning-details-link:hover {
    color: #103c8b;
    text-decoration: underline;
}

/* Icon-only action buttons */
.btn-free-download-icon {
    background-color: #16a34a !important;
    color: #ffffff !important;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-size: 0.88rem;
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.25);
    border: none;
    cursor: pointer;
}

.btn-free-download-icon:hover {
    background-color: #15803d !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(22, 163, 74, 0.35);
}

.btn-view-detail-icon {
    background-color: #f59e0b !important;
    color: #0f172a !important;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-size: 0.88rem;
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.25);
    border: none;
    cursor: pointer;
}

.btn-view-detail-icon:hover {
    background-color: #d97706 !important;
    color: #0f172a !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(245, 158, 11, 0.35);
}




