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

:root {
    --primary-color: #2b5876;
    --secondary-color: #4e4376;
    --bg-light: #f4f7f9;
    --card-bg: #ffffff;
    --text-main: #2d3748;
    --text-muted: #718096;
    --border-radius: 16px;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
    background-color: rgba(4, 25, 85, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem 0;
    z-index: 1030 !important;
    position: sticky !important;
    top: 0;
    width: 100%;
    align-self: flex-start;
}
.navbar-brand img { max-height: 44px; transition: transform 0.3s ease; }
.navbar-brand:hover img { transform: scale(1.03); }
.navbar .nav-link { 
    font-weight: 500; 
    color: rgba(255, 255, 255, 0.85); 
    font-size: 1rem; 
    margin: 0 5px;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: all 0.3s ease; 
}
.navbar .nav-link:hover, .navbar .nav-link.active { 
    color: #fff; 
    background-color: rgba(255, 255, 255, 0.15);
}

/* Hero Slider Section */
.hero-slider {
    position: relative;
    overflow: hidden;
    height: 500px;
    border-radius: 0 0 2rem 2rem;
    box-shadow: var(--shadow-md);
}
.hero-slider .carousel-item {
    height: 500px;
}
.hero-slider .carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}
.hero-static-caption {
    position: absolute;
    background: rgba(4, 25, 85, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 45px 50px;
    border-radius: 24px;
    bottom: 50%;
    transform: translateY(50%);
    width: 85%;
    max-width: 800px;
    left: 0;
    right: 0;
    margin: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 10;
    text-align: center;
}
.hero-static-caption h2 {
    color: #ffffff;
    letter-spacing: -1px;
}
.hero-static-caption p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 12px;
    padding: 12px 20px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}
.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 4px rgba(43, 88, 118, 0.1);
    border-color: var(--primary-color);
}
.btn {
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn:hover {
    transform: translateY(-2px);
}

/* Book Items (Custom, Non-Card layout) */
.book-item {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    background: transparent;
    border: none;
    padding-bottom: 20px;
}
.book-cover-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    margin-bottom: 16px;
    background-color: #f1f5f9;
}
.book-item:hover .book-cover-wrapper {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}
.book-cover {
    width: 100%;
    height: 320px;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}
.book-item:hover .book-cover {
    transform: scale(1.05);
}
.book-info {
    padding: 0 4px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.book-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
    line-height: 1.4;
    min-height: 2.8em;
    transition: color 0.2s;
}
.book-item:hover .book-title {
    color: var(--primary-color);
}
.book-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
}
.book-price {
    font-weight: 700;
    font-size: 1rem;
    color: #059669; /* Emerald 600 */
}
.badge-type {
    position: absolute;
    top: 12px;
    left: 12px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(4px);
    z-index: 2;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-main);
    margin: 0;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40%;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    letter-spacing: -0.5px;
}

/* Footer */
.footer {
    margin-top: auto;
    background-color: rgba(4, 25, 85, 0.95);
    color: rgba(255, 255, 255, 0.85);
    padding: 70px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer h5 { color: #ffffff; font-weight: 700; margin-bottom: 24px; letter-spacing: -0.5px; }
.footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; transition: color 0.3s ease; }
.footer a:hover { color: #fff; text-decoration: none; }
.footer .social-icons a { font-size: 1.5rem; margin-right: 18px; color: rgba(255, 255, 255, 0.8); display: inline-block; transition: transform 0.3s ease, color 0.3s ease; }
.footer .social-icons a:hover { color: #fff; transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 24px; margin-top: 48px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }
.admin-login { font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); font-weight: 500; }
.admin-login:hover { color: #fff; }

.location-map iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

main { flex: 1; }

/* Custom utilities */
.text-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
}
.card-title.text-truncate {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    line-height: 1.4;
    min-height: 2.8em;
}

/* Custom Modern Tabs */
.custom-modern-tabs {
    background: #f1f5f9;
    padding: 6px;
    border-radius: 50px;
    display: inline-flex;
    gap: 5px;
}
.custom-modern-tabs .nav-link {
    color: var(--text-muted) !important;
    font-weight: 600;
    padding: 10px 24px !important;
    border-radius: 40px;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
}
.custom-modern-tabs .nav-link:hover {
    color: var(--primary-color) !important;
}
.custom-modern-tabs .nav-link.active {
    background: #fff !important;
    color: var(--primary-color) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
