/* Page Hero Section */
.page-hero {
    position: relative;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 180px; /* Account for fixed header - increased for better spacing */
}

/* Page Header with background color classes (for support pages) */
.page-header.bg-primary,
.page-header.bg-success,
.page-header.bg-info,
.page-header.bg-dark,
.page-header.bg-secondary,
.page-header.bg-warning,
.page-header.bg-danger {
    margin-top: 180px; /* Account for fixed header */
    padding-top: 4rem !important;
    padding-bottom: 2rem !important;
}

/* General page-header class for consistency */
section.page-header:not(.bg-primary):not(.bg-success):not(.bg-info):not(.bg-dark):not(.bg-secondary):not(.bg-warning):not(.bg-danger) {
    margin-top: 180px; /* Account for fixed header */
}

/* Mobile responsive adjustments for header offset */
@media (max-width: 991.98px) {
    .page-hero,
    .page-header.bg-primary,
    .page-header.bg-success,
    .page-header.bg-info,
    .page-header.bg-dark,
    .page-header.bg-secondary,
    .page-header.bg-warning,
    .page-header.bg-danger,
    section.page-header:not(.bg-primary):not(.bg-success):not(.bg-info):not(.bg-dark):not(.bg-secondary):not(.bg-warning):not(.bg-danger) {
        margin-top: 150px; /* Reduced margin for mobile smaller header */
    }
}

@media (max-width: 767.98px) {
    .page-hero,
    .page-header.bg-primary,
    .page-header.bg-success,
    .page-header.bg-info,
    .page-header.bg-dark,
    .page-header.bg-secondary,
    .page-header.bg-warning,
    .page-header.bg-danger,
    section.page-header:not(.bg-primary):not(.bg-success):not(.bg-info):not(.bg-dark):not(.bg-secondary):not(.bg-warning):not(.bg-danger) {
        margin-top: 120px; /* Further reduced margin for smaller mobile screens */
    }
}

.page-hero .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.page-hero .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.page-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.8) 0%, rgba(59, 130, 246, 0.7) 100%);
    z-index: 2;
}

.page-hero .hero-content h1 {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    position: relative;
    z-index: 3;
}

.page-hero .hero-content p {
    color: #f8f9fa;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    font-size: 1.1rem;
    position: relative;
    z-index: 3;
}

.page-hero .hero-content {
    position: relative;
    z-index: 3;
}

.page-hero .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
    border: none;
    position: relative;
    z-index: 3;
}

.page-hero .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.page-hero .breadcrumb-item a:hover {
    color: #fff;
}

.page-hero .breadcrumb-item.active {
    color: #fff;
}

.page-hero .breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: rgba(255, 255, 255, 0.6);
}

/* Statistics Section */
.stats-section {
    padding: 2rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Card Styles */
.publisher-card,
.database-card,
.service-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.publisher-card:hover,
.database-card:hover,
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.publisher-header,
.database-header,
.service-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.publisher-logo,
.database-logo,
.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 2rem;
}

.publisher-content p,
.database-content p,
.service-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.publisher-stats,
.database-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.publisher-stats span,
.database-stats span {
    background: #f3f4f6;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: #374151;
}

/* Subject Cards */
.subject-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.subject-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.subject-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.subject-card h5 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.subject-card span {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Step Cards */
.step-card {
    text-align: center;
    padding: 2rem 1rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.step-card h5 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.step-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* Info Cards */
.info-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
    text-align: center;
}

.info-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.info-card h4 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.info-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.info-card li {
    padding: 0.5rem 0;
    color: #6b7280;
    border-bottom: 1px solid #f3f4f6;
}

.info-card li:last-child {
    border-bottom: none;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-description {
    font-size: 1.1rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Database specific styles */
.database-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.database-features span {
    background: #f3f4f6;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #374151;
}

.database-features i {
    margin-right: 0.25rem;
    color: var(--primary-color);
}

/* E-books specific styles */
.book-item {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    overflow: hidden;
}

.book-item.list-view {
    display: flex;
    align-items: center;
    padding: 1.5rem;
}

.book-item.grid-view {
    display: block;
    text-align: center;
    padding: 1.5rem;
}

.book-cover {
    flex-shrink: 0;
    margin-right: 1.5rem;
    position: relative;
}

.book-item.list-view .book-cover {
    width: 100px;
    height: 130px;
}

.book-item.grid-view .book-cover {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
}

.cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.format-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
}

.book-info {
    flex: 1;
}

.book-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.book-meta span {
    display: flex;
    align-items: center;
}

.book-meta i {
    margin-right: 0.25rem;
    color: var(--primary-color);
}

.book-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.book-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.book-subjects span {
    background: #f3f4f6;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #374151;
}

.book-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.book-stats .stat {
    text-align: center;
}

.book-stats .stat strong {
    display: block;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.book-stats .stat span {
    font-size: 0.8rem;
    color: #6b7280;
}

.book-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Filter and Search */
.filter-section {
    border-bottom: 1px solid #e5e7eb;
}

.search-box input {
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    border: 1px solid #d1d5db;
}

.search-box button {
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
}

.alphabet-nav {
    text-align: center;
}

.alphabet-btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0.25rem;
    font-weight: 500;
}

.alphabet-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* View Controls */
.view-controls {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.results-info {
    color: #6b7280;
}

.view-options {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-hero {
        height: 40vh;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .book-item.list-view {
        flex-direction: column;
        text-align: center;
    }
    
    .book-cover {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .publisher-stats,
    .database-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .view-options {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .book-actions {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .page-hero {
        height: 35vh;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .publisher-card,
    .database-card,
    .service-card {
        padding: 1.5rem;
    }
    
    .book-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .quick-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .divider {
        display: none;
    }
}
