/* Advanced Content Viewer Styles */
/* Enhanced filtering system with loaders and responsive design */

/* =================================================
   Enhanced Filter Card Styles
   ================================================= */
.filter-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.filter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.filter-card .card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 15px 15px 0 0;
    padding: 1.25rem 2rem;
}

.filter-card .card-header h5 {
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.filter-card .card-body {
    padding: 2rem;
}

/* =================================================
   Filter Form Enhancements
   ================================================= */
.form-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.form-label .text-danger {
    font-size: 1.1rem;
}

.input-group .input-group-text {
    font-weight: 600;
    border: 2px solid #dee2e6;
    border-right: none;
    transition: all 0.3s ease;
}

.input-group .form-control,
.input-group .form-select {
    border: 2px solid #dee2e6;
    border-left: none;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.input-group:focus-within .input-group-text {
    border-color: #007bff;
    background-color: #e3f2fd;
}

.input-group:focus-within .form-control,
.input-group:focus-within .form-select {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Field Error Styles */
.field-error {
    font-size: 0.875rem;
    font-weight: 500;
    animation: fadeInUp 0.3s ease;
}

.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* =================================================
   Button Enhancements
   ================================================= */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

.btn-outline-secondary {
    border-width: 2px;
    font-weight: 600;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%);
    border: none;
}

/* Button Loading State */
.btn .spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* =================================================
   Filter Status and Loader Styles
   ================================================= */
.alert {
    border: none;
    border-radius: 10px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

#filterLoader {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#filterLoader .spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 3px;
}

/* =================================================
   Content Section Visibility Animations
   ================================================= */
.content-section {
    animation: fadeInUp 0.5s ease;
    transition: all 0.3s ease;
}

.content-section.hiding {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* =================================================
   Enhanced Content Cards
   ================================================= */
.blog-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    background: #fff;
}

/* Book cards inherit blog-card with subtle accent */
.book-card {
    position: relative;
}
.book-card::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, #4fd1c5, #7c3aed);
    opacity: 0.6;
}
.book-card:hover::after {
    opacity: 1;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-img-container {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .card-img-container img {
    transform: scale(1.1);
}

.blog-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    z-index: 2;
}

/* Video Play Overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.play-overlay:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-overlay i {
    font-size: 2rem;
    margin-left: 3px;
}

/* =================================================
   Action Buttons Enhancement
   ================================================= */
.card-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
  /* padding: 0.5rem 0;
   border-top: 1px solid #f1f3f4;
   margin-top: 1rem;*/
}

.action-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.action-item:hover {
    background: #f8f9fa;
    color: #495057;
    transform: translateY(-1px);
}

.action-item i {
    font-size: 1rem;
    transition: all 0.3s ease;
}

.action-item.liked {
    color: #dc3545;
}

.action-item.liked i {
    animation: heartbeat 0.6s ease;
}

.action-item.in-wishlist {
    color: #ffc107;
}

/* =================================================
   Pagination Enhancement
   ================================================= */
.pagination {
    margin: 0;
}

.page-link {
    border: 2px solid #dee2e6;
    color: #6c757d;
    font-weight: 600;
    padding: 0.75rem 1rem;
    margin: 0 0.125rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #007bff;
    border-color: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.page-item.active .page-link {
    background: #007bff;
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* =================================================
   Toast Notifications Enhancement
   ================================================= */
.toast-container .toast {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.toast-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.toast-body {
    font-weight: 500;
    padding: 1rem 1.25rem;
}

/* =================================================
   Responsive Design Enhancements
   ================================================= */
@media (max-width: 992px) {
    .filter-card .card-body {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .col-lg-3,
    .col-lg-2 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .filter-card .card-header {
        padding: 1rem 1.5rem;
    }
    
    .filter-card .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .action-item {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
    
    .blog-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .card-img-container {
        height: 150px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .pagination {
        font-size: 0.875rem;
    }
    
    .page-link {
        padding: 0.5rem 0.75rem;
    }
}

/* =================================================
   Animation Keyframes
   ================================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* =================================================
   Loading States
   ================================================= */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =================================================
   Utility Classes
   ================================================= */
.text-shadow {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card-hover-effect {
    transition: all 0.3s ease;
}

.card-hover-effect:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gradient-bg {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.border-radius-lg {
    border-radius: 15px;
}

/* =================================================
   Focus States for Accessibility
   ================================================= */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .filter-card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .blog-card {
        border: 1px solid #000;
    }
}
.page-header {
    background: linear-gradient(135deg, #007bff 0%, #28a745 100%);
    color: white;
    padding: 4rem 0;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.content-section {
    margin-bottom: 4rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.content-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.content-card:hover .card-image img {
    transform: scale(1.05);
}

.content-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.content-card:hover .play-overlay {
    color: white;
    transform: translate(-50%, -50%) scale(1.1);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.publish-date {
    color: #6c757d;
    font-size: 0.8rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #212529;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card-text {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.content-tags {
    margin-bottom: 1rem;
}

.content-tags .badge {
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 20px;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.rating-display .stars {
    display: flex;
    gap: 2px;
}

.rating-text {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.btn-action {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 5px;
    border-radius: 8px;
    min-width: 45px;
}

.btn-action:hover {
    color: #495057;
    background: #f8f9fa;
}

.btn-action i {
    font-size: 1.2rem;
}

.btn-action span {
    font-size: 0.75rem;
    font-weight: 500;
}

.btn-action.liked {
    color: #dc3545;
}

.btn-action.liked i {
    transform: scale(1.1);
}

.btn-action.in-wishlist {
    color: #ffc107;
}

.view-count {
    cursor: default;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.page-link {
    border: none;
    padding: 12px 16px;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: #e9ecef;
    color: #007bff;
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

/* Filter Section Styles */
.card-title {
    color: #495057;
    font-weight: 600;
}

.input-group-text {
    border: none;
    font-weight: 500;
}

.form-select, .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.form-select:focus, .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Share Modal Styles */
.btn-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-social:hover {
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-social i {
    font-size: 1.5rem;
}

.btn-whatsapp { 
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.btn-facebook { 
    background: linear-gradient(135deg, #1877F2, #166FE5);
}

.btn-twitter { 
    background: linear-gradient(135deg, #1DA1F2, #0d8bd9);
}

.btn-telegram { 
    background: linear-gradient(135deg, #0088cc, #006699);
}

.btn-linkedin { 
    background: linear-gradient(135deg, #0077b5, #005582);
}

/* Toast Styles */
.toast {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.toast-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 10px 10px 0 0;
}

.toast-body {
    padding: 15px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-section {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header .display-4 {
        font-size: 2rem;
    }
    
    .action-buttons {
        justify-content: space-between;
        padding: 5px 0;
    }
    
    .btn-action {
        min-width: 35px;
        font-size: 0.8rem;
    }
    
    .btn-action i {
        font-size: 1rem;
    }
    
    .btn-action span {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .content-card {
        margin-bottom: 1rem;
    }
    
    .share-buttons {
        justify-content: center !important;
        gap: 10px !important;
    }
    
    .btn-social {
        min-width: 80px;
        padding: 10px 15px;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom scrollbar for better UX */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #007bff, #28a745);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0056b3, #1e7e34);
}
