/* Metro360 Main Styles */

/* CSS Custom Properties */
:root {
    --primary-color: #FF6B35;
    --secondary-color: #F7931E;
    --accent-color: #000000;
    --background-color: #FFFFFF;
    --text-color: #333333;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

/* Page wrapper for sticky footer */
.page-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1 0 auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Responsive spacing for main content */
@media (max-width: 768px) {
    .main-content {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Header Styles */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--background-color);
    box-shadow: var(--shadow);
}
/* Brand Styles - Responsive Design */
.navbar-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 1rem;
    text-decoration: none;
}

.brand-favicon {
    width: 3.5rem;
    height: 3rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-title {
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: 0.03em;
    margin: 0;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
}

.brand-subtitle {
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
    margin-top: -0.125rem;
    font-size: clamp(0.7rem, 1.8vw, 0.86rem);
}

/* Brand hover effects */
.navbar-brand:hover .brand-title {
    color: var(--primary-color);
    transition: var(--transition);
}

.navbar-brand:hover .brand-subtitle {
    color: var(--secondary-color);
    transition: var(--transition);
}

/* Responsive adjustments for brand */
@media (max-width: 991.98px) {
    .brand-favicon {
        width: 3rem;
        height: 2.5rem;
        margin-right: 0.5rem;
    }
    
    .brand-title {
        font-size: clamp(1rem, 2.2vw, 1.2rem);
    }
    
    .brand-subtitle {
        font-size: clamp(0.65rem, 1.6vw, 0.8rem);
        margin-top: -0.1rem;
    }
}

@media (max-width: 767.98px) {
    .brand-favicon {
        width: 2.5rem;
        height: 2rem;
        margin-right: 0.4rem;
    }
    
    .brand-title {
        font-size: clamp(0.9rem, 2vw, 1.1rem);
    }
    
    .brand-subtitle {
        font-size: clamp(0.6rem, 1.4vw, 0.75rem);
        margin-top: -0.08rem;
    }
}

@media (max-width: 575.98px) {
    .brand-favicon {
        width: 2rem;
        height: 1.8rem;
        margin-right: 0.3rem;
    }
    
    .brand-title {
        font-size: clamp(0.8rem, 1.8vw, 1rem);
    }
    
    .brand-subtitle {
        font-size: clamp(0.55rem, 1.2vw, 0.7rem);
        margin-top: -0.05rem;
    }
}
/* Navbar styles consolidated above */

.navbar-toggler {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    background-color: var(--surface-color);
    transition: all 0.3s ease;
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-toggler:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.2);
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
    outline: none;
}

.navbar-toggler:active {
    transform: translateY(0);
}

/* Custom hamburger icon */
.navbar-toggler-icon {
    background-image: none !important;
    width: 20px;
    height: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after,
.navbar-toggler-icon {
    position: relative;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
    top: -6px;
}

.navbar-toggler-icon::after {
    bottom: -6px;
}

.navbar-toggler-icon {
    background-color: var(--text-color);
    height: 2px;
}

/* Hover effect for icon */
.navbar-toggler:hover .navbar-toggler-icon,
.navbar-toggler:hover .navbar-toggler-icon::before,
.navbar-toggler:hover .navbar-toggler-icon::after {
    background-color: white;
}

/* Animation when collapsed/expanded */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-color: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    transform: rotate(-45deg);
    bottom: 0;
}

.navbar-collapse {
    align-items: center;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 auto;
}

.other-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-form .form-control {
    min-width: 150px;
    transition: width 0.3s ease-in-out;
}

.search-form .form-control:focus {
    min-width: 250px;
}

.theme-toggle-btn {
    width: 40px;
}

.nav-link {
    font-weight: 700; /* Bold */
    white-space: nowrap;
    position: relative;
    padding: 0.5rem 0.75rem; /* Add horizontal padding */
    margin-bottom: 0.5rem; /* Add space below for underline */
    text-decoration: none;
    color: #000000; /* True black for light mode, will be overridden in dark theme */
}

.nav-link:hover {
    color: var(--primary-color) !important; /* Orange on hover */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -0.2rem; /* Position underline below the item */
    left: 0.75rem; /* Align with padding */
    right: 0.75rem; /* Align with padding */
    height: 4px;
    background-color: var(--primary-color);
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.dropdown-arrow {
    font-size: 0.7em;
    margin-left: 0.3rem;
}

.nav-link-text {
    display: inline !important; /* Ensure text is always visible */
}

/* Fix dropdown toggle underlines - use consistent ::after positioning */
/* Keep dropdown arrow icon visible but fix the Bootstrap's default ::after styling */
.nav-link.dropdown-toggle::after {
    /* Reset Bootstrap's triangle caret */
    border: none !important; 
    content: none !important;
    display: none !important; /* Hide Bootstrap's default arrow */
}

/* Use our custom dropdown arrow icon */
.dropdown .dropdown-arrow {
    margin-left: 0.3rem;
    font-size: 0.7em;
}

/* Apply consistent underline to dropdown toggles */
.dropdown-toggle {
    position: relative;
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Restore the primary underline for all nav-links including dropdown toggles */
.nav-item .nav-link::before {
    content: '';
    position: absolute;
    bottom: -0.2rem;
    left: 0.75rem;
    right: 0.75rem;
    height: 4px;
    background-color: var(--primary-color);
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

/* Responsive Navbar */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 0.75rem; /* Reduced */
        width: 100%;
        max-width: 100%; /* Prevent horizontal expansion */
        overflow-x: hidden; /* Prevent horizontal scrolling */
        max-height: 80vh; /* Limit height to 80% of viewport height */
        overflow-y: auto; /* Allow vertical scrolling */
    }
    .main-nav, .other-nav {
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
        max-width: 100%; /* Prevent horizontal expansion */
    }
    .main-nav .nav-item, .other-nav .nav-item {
        padding: 0.2rem 0; /* Reduced from 0.5rem to 0.2rem */
        width: 100%;
    }
    .other-nav {
        margin-top: 0.5rem; /* Reduced from 1rem */
        padding-top: 0.5rem; /* Reduced from 1rem */
    }
    
    /* Style nav items in mobile menu */
    .other-nav .nav-item {
        width: 100%;
        text-align: left;
    }
    
    /* Create special wrapper for the theme toggle button */
    .other-nav .nav-item:has(.theme-toggle-btn) {
        display: flex;
        justify-content: center;
        margin: 0.6rem 0 0.15rem; /* Further adjusted for balanced spacing */
        width: 100%;
        text-align: center;
    }
    
    /* Center the theme toggle button specifically */
    .other-nav .theme-toggle-btn {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        margin: 0 auto; /* Removed vertical margin, parent li controls spacing */
        width: 45px; /* Slightly larger for better tap target but reduced */
        height: 35px; /* Reduced height */
    }
    
    /* Ensure consistent styling for all nav links in mobile with reduced spacing */
    .other-nav .nav-link {
        font-weight: 700; /* Match main nav weight */
        position: relative;
        padding: 0.4rem 0.75rem; /* Reduced vertical padding */
        margin-bottom: 0.3rem; /* Reduced margin */
        text-decoration: none;
        color: #000000;
        display: block; /* Full width clickable area */
        width: 100%;
    }
    
    /* Add underlines to other-nav items in mobile */
    .other-nav .nav-link::after {
        content: '';
        position: absolute;
        bottom: -0.2rem;
        left: 0.75rem;
        right: 0.75rem;
        height: 4px;
        background-color: var(--primary-color);
        transform: scaleX(1);
        transition: transform 0.3s ease;
    }
    
    .search-form {
        width: 100%;
        max-width: 100%; /* Prevent overflow */
    }
    .dropdown-menu {
        border: none;
        box-shadow: none;
        background-color: transparent;
        width: 100%; /* Full width in mobile */
        max-width: 100%; /* Prevent overflow */
        padding: 0.25rem 0; /* Reduced padding */
    }
    .dropdown-item {
        padding: 0.35rem 1rem; /* Compact padding */
        margin-bottom: 0.1rem; /* Tiny space between items */
    }
}

/* Improved touch targets for mobile menu with reduced spacing */
@media (max-width: 991.98px) {
    .navbar-nav .nav-item {
        padding: 0.125rem 0; /* Reduced padding */
    }
    
    .navbar-nav .nav-link {
        padding: 0.6rem 1rem; /* Reduced vertical padding */
        margin-bottom: 0.125rem; /* Smaller margin */
    }
    
    /* Dropdown items with reduced spacing */
    .dropdown-menu .dropdown-item {
        padding: 0.5rem 1.5rem; /* Reduced vertical padding */
        white-space: normal; /* Allow text wrapping */
    }
    
    /* Make sure the dropdown menu takes full width but has proper padding */
    .dropdown-menu {
        padding: 0.25rem 0; /* Reduced padding */
        margin: 0 0 0.25rem; /* Reduced margins */
    }
    
    /* Ensure dropdown menu has proper spacing inside mobile menu */
    .navbar-nav .dropdown-menu {
        margin-left: 1rem; /* Indent dropdown items */
    }
}

/* Additional mobile menu improvements with reduced spacing */
@media (max-width: 991.98px) {
    /* Add a smooth scrollbar for the mobile menu */
    .navbar-collapse {
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) transparent;
    }
    
    /* Webkit scrollbar styling */
    .navbar-collapse::-webkit-scrollbar {
        width: 4px; /* Thinner scrollbar */
    }
    
    .navbar-collapse::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .navbar-collapse::-webkit-scrollbar-thumb {
        background-color: var(--primary-color);
        border-radius: 10px;
    }
    
    /* Add some padding at the bottom of the mobile menu for better spacing */
    .navbar-collapse {
        padding-bottom: 15px; /* Reduced from 20px */
    }
    
}

@media (min-width: 992px) {
    .navbar-expand-lg .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        justify-content: space-between;
    }
}


/* Dropdown Menu */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-hover);
    border-radius: 8px;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #e55a2e;
    border-color: #e55a2e;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

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

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.card-title a:hover {
    color: var(--primary-color);
}

.card-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    position: relative;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background-color: #cce7f0;
    color: #055160;
    border-left: 4px solid #17a2b8;
}

/* Flash Messages */
.flash-messages-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 500px;
    pointer-events: none;
}

.flash-messages-container .alert {
    pointer-events: auto;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced alert styles for flash messages */
.flash-messages-container .alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-left: 4px solid #28a745;
    color: #155724;
}

.flash-messages-container .alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.flash-messages-container .alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left: 4px solid #ffc107;
    color: #856404;
}

.flash-messages-container .alert-info {
    background: linear-gradient(135deg, #cce7f0, #b8daff);
    border-left: 4px solid #17a2b8;
    color: #055160;
}

/* Mobile optimizations for flash messages */
@media (max-width: 768px) {
    .flash-messages-container {
        width: 95%;
        max-width: none;
        top: 10px;
    }
    
    .flash-messages-container .alert {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }
}

@media (max-width: 576px) {
    .flash-messages-container {
        width: 98%;
        top: 5px;
    }
    
    .flash-messages-container .alert {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.page-link:hover {
    background-color: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Forms */
.form-control {
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
    border-color: var(--primary-color);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Tables */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    font-weight: 600;
    background-color: rgba(255, 107, 53, 0.1);
    border-bottom: 2px solid var(--primary-color);
}

.table td {
    border-bottom: 1px solid var(--border-color);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* List Groups */
.list-group-item {
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    transition: var(--transition);
}

.list-group-item:hover {
    background-color: rgba(255, 107, 53, 0.05);
}

.list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Breadcrumbs */
.breadcrumb {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(247, 147, 30, 0.05));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    margin: 0 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
    background-color: rgba(255, 107, 53, 0.1);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--text-color);
    font-weight: 600;
}

/* Breadcrumb icons */
.breadcrumb-item a i,
.breadcrumb-item.active i {
    margin-right: 0.5rem;
    font-size: 0.8rem;
}

/* Responsive breadcrumbs */
@media (max-width: 768px) {
    .breadcrumb {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        margin: 0 0.5rem;
    }
    
    .breadcrumb-item a {
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width: 576px) {
    .breadcrumb {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        margin: 0 0.4rem;
    }
    
    /* Hide long breadcrumb text on very small screens */
    .breadcrumb-item:not(.active):not(:first-child) a {
        max-width: 60px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .breadcrumb-item.active {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Enhanced breadcrumb variants */
.breadcrumb.breadcrumb-modern {
    background: var(--background-color);
    border: none;
    padding: 1rem 0;
    box-shadow: none;
    border-bottom: 2px solid var(--border-color);
    border-radius: 0;
}

.breadcrumb.breadcrumb-minimal {
    background: transparent;
    border: none;
    padding: 0.5rem 0;
    box-shadow: none;
}

.breadcrumb.breadcrumb-card {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-hover);
}

/* Breadcrumb animations */
.breadcrumb-item a {
    position: relative;
    overflow: hidden;
}

.breadcrumb-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.breadcrumb-item a:hover::after {
    width: 100%;
}

/* Breadcrumb loading state */
.breadcrumb.loading {
    opacity: 0.6;
    pointer-events: none;
}

.breadcrumb.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
    animation: breadcrumb-shimmer 1.5s infinite;
}

@keyframes breadcrumb-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Breadcrumb with action buttons */
.breadcrumb-with-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(247, 147, 30, 0.05));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.breadcrumb-with-actions .breadcrumb {
    margin: 0;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

.breadcrumb-actions {
    display: flex;
    gap: 0.5rem;
}

.breadcrumb-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Dark theme breadcrumb action buttons */
[data-theme="dark"] .breadcrumb-with-actions {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(247, 147, 30, 0.1));
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
}

.hero-slideshow {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    height: 500px;
}

.hero-slides-container {
    position: relative;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-in-out;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 40px 30px 30px;
    color: white;
}

.hero-category {
    background: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    display: inline-block;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero-meta {
    font-size: 0.9rem;
    opacity: 0.9;
}

.hero-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.hero-control-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hero-control-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.hero-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.hero-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-indicator.active {
    background: white;
    transform: scale(1.2);
}

.breaking-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    animation: pulse 2s infinite;
    z-index: 10;
}

/* Featured Articles Grid */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.featured-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 250px;
    transition: transform 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 25px 20px 20px;
    color: white;
}

.featured-category {
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    margin-bottom: 10px;
    display: inline-block;
}

.featured-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.featured-meta {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Section Headers */
.section-header {
    padding: 20px;
    margin-bottom: 35px;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(247, 147, 30, 0.05));
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.section-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px 0 0 2px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
    position: relative;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Load More Button Enhancement */
#load-more-container {
    margin-top: 40px;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
}

#load-more-btn {
    position: relative;
    overflow: hidden; /* Prevent the pseudo-element from causing horizontal scroll */
}

#load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

#load-more-btn:hover::before {
    left: 100%;
}


#load-more-btn:disabled {
    opacity: 0.7;
    transform: none;
    cursor: not-allowed;
}

#load-more-btn.btn-outline-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-color: transparent;
}

#load-more-btn .spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* News List */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-item {
    border-bottom: 1px solid var(--border-color);
    padding: 25px 0;
    transition: all 0.3s ease;
    position: relative;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background: rgba(255, 107, 53, 0.02);
    padding-left: 15px;
    padding-right: 15px;
    margin-left: -15px;
    margin-right: -15px;
    border-radius: 12px;
    border-bottom-color: transparent;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.news-item:hover + .news-item {
    border-top: 1px solid transparent;
}

.news-item-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.news-item-image {
    width: 140px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover .news-item-image {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.news-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-item-image img {
    transform: scale(1.05);
}

.news-item-text {
    flex-grow: 1;
    min-width: 0; /* Allows flex item to shrink */
}

.news-item-category {
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    display: inline-block;
    background: rgba(255, 107, 53, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.news-item:hover .news-item-category {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.news-item-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-item-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.news-item-title a:hover {
    color: var(--primary-color);
    transform: translateX(3px);
}

.news-item-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 0.8rem;
    color: var(--text-muted);
    align-items: center;
}

.news-item-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.news-item-meta span:hover {
    color: var(--primary-color);
}

.news-item-meta i {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .news-item-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .news-item-image {
        width: 100%;
        height: 200px;
    }
    
    .news-item-title {
        font-size: 1.1rem;
    }
    
    .news-item-meta {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .news-item {
        padding: 20px 0;
    }
    
    .news-item:hover {
        padding-left: 10px;
        padding-right: 10px;
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .news-item-meta {
        gap: 8px;
        font-size: 0.75rem;
    }
    
    /* Only stack items on very small screens when they really don't fit */
    .news-item-meta span {
        font-size: 0.75rem;
        flex-shrink: 1;
        min-width: 0;
    }
}



/* Trending Sidebar */
.trending-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-rank {
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.trending-content {
    flex: 1;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.trending-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.trending-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.trending-item:hover .trending-image img {
    transform: scale(1.05);
}

.trending-text {
    flex: 1;
}

.trending-content h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.trending-content h6 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.trending-content h6 a:hover {
    color: var(--primary-color);
}

.trending-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.trending-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Enhanced card header for trending section */
.card-header.bg-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    border: none;
}


/* Category Sections with Horizontal Slideshows */
.category-section {
    margin-bottom: 60px;
    background: var(--card-background);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(247, 147, 30, 0.05));
    border-radius: 12px;
    box-shadow: var(--shadow);
    position: relative;
}

.category-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px 0 0 2px;
}

.category-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.category-info {
    flex-grow: 1;
}

.category-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: var(--text-color);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.category-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.category-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-nav-controls {
    display: flex;
    gap: 8px;
}

.category-nav-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    background: var(--card-background);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.category-nav-btn:hover:not(.disabled) {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.category-nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.category-view-all {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.category-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.category-slideshow-container {
    position: relative;
    overflow: hidden;
}

.category-slideshow {
    width: 100%;
    overflow: hidden;
}

.category-slides {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 20px;
}

.category-slide {
    flex-shrink: 0;
    padding: 0 5px;
}

.category-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.category-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-card-image img {
    transform: scale(1.05);
}

.category-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

.category-card-date {
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(10px);
}

.category-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-card-title a:hover {
    color: var(--primary-color);
}

.category-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.category-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.category-card-author,
.category-card-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

.category-card-author i,
.category-card-views i {
    color: var(--primary-color);
}

.category-progress {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.category-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #ff8c42);
    border-radius: 2px;
    transition: width 0.4s ease;
    position: relative;
}

.category-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-20px); }
    100% { transform: translateX(20px); }
}

/* Footer */
.site-footer {
    background-color: var(--accent-color) !important;
    color: white;
    flex-shrink: 0;
    margin-top: auto;
}

.site-footer h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.site-footer a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

.site-footer a:hover {
    color: var(--primary-color);
}

.social-links a {
    margin-right: 1rem;
    font-size: 1.5rem;
}

.social-links a:hover {
    transform: scale(1.1);
}


/* YouTube Shorts Styling */
.youtube-short {
    max-width: 400px;
    margin: 0 auto;
}

.embed-responsive-9by16 {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.embed-responsive-9by16::before {
    content: "";
    display: block;
    padding-top: 177.78%; /* 16:9 aspect ratio flipped = 9:16 */
}

.youtube-short .embed-responsive-item {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0.375rem;
}

/* YouTube Shorts badge styling */
.youtube-short .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Container for YouTube Shorts to center them */
.youtube-short .embed-responsive {
    max-width: 350px;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 0.375rem;
    overflow: hidden;
}

/* Mobile responsiveness for YouTube Shorts */
@media (max-width: 768px) {
    .youtube-short {
        max-width: 100%;
    }
    
    .youtube-short .embed-responsive {
        max-width: 280px;
    }
}

@media (max-width: 576px) {
    .youtube-short .embed-responsive {
        max-width: 250px;
    }
}

/* Regular YouTube video styling */
.embed-responsive-16by9 {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.embed-responsive-16by9::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.youtube-video:not(.youtube-short) .embed-responsive-item {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0.375rem;
}

/* Enhanced video container styling */
.youtube-video {
    position: relative;
    background-color: #000;
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.youtube-video:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Video title styling */
.youtube-video h6 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.4;
}

.youtube-video .fab.fa-youtube {
    color: #FF0000;
}

/* Media description styling */
.media-description {
    margin-top: 0.5rem;
    line-height: 1.5;
}
/* Brand container with favicon and text */
.brand-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-favicon {
    width: 85px;
    height: 70px;
    margin-right: 12px;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: 0.5px;
    margin: 0;
}

.brand-subtitle {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    margin-top: -2px;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

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

.border-primary {
    border-color: var(--primary-color) !important;
}

.shadow-sm {
    box-shadow: var(--shadow) !important;
}

.shadow {
    box-shadow: var(--shadow-hover) !important;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-img-top {
        height: 150px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .news-item-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .news-item-image {
        width: 100%;
        height: 200px;
    }
    
    .category-section {
        padding: 20px;
        margin-bottom: 40px;
    }
    
    .category-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .category-header-left {
        flex-direction: column;
        gap: 15px;
    }
    
    .category-header-right {
        width: 100%;
        justify-content: center;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .category-card-image {
        height: 160px;
    }
    
    .category-card-content {
        padding: 15px;
    }
    
    .navbar .form-control {
        width: 100%;
        margin-bottom: 0;
        height: 38px;
    }
    
    .navbar .form-control:focus {
        width: 100%;
    }
}



@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-text {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .category-section {
        padding: 15px;
        margin-bottom: 30px;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .category-title {
        font-size: 1.3rem;
    }
    
    .category-description {
        font-size: 0.85rem;
    }
    
    .category-nav-controls {
        gap: 5px;
    }
    
    .category-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .category-view-all {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .category-card-image {
        height: 140px;
    }
    
    .category-card-content {
        padding: 12px;
    }
    
    .category-card-title {
        font-size: 1rem;
    }
    
    .category-card-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .category-slides {
        gap: 10px;
    }
    
    .category-slide {
        padding: 0 2px;
    }
}



/* Article Actions Mobile Alignment Enhancement */
@media (max-width: 767.98px) {
    .article-actions .row {
        flex-direction: column;
        align-items: flex-start; /* Align to left in LTR */
    }
    
    .article-actions .col-md-6 {
        width: 100%;
        margin-bottom: 0.75rem;
        text-align: left;
    }
    
    .article-actions .col-md-6:last-child {
        margin-bottom: 0;
    }
    
    .article-actions .col-md-6.text-md-end {
        text-align: left !important;
    }
    
    .article-actions .btn-group {
        justify-content: flex-start;
    }
    
    /* Ensure buttons have proper spacing */
    .article-actions .btn-group .btn {
        margin-right: 0.25rem;
        margin-bottom: 0.25rem;
    }
    
    .article-actions .btn-group .btn:last-child {
        margin-right: 0;
    }
}

/* Additional mobile specific adjustments */
@media (max-width: 575.98px) {
    .article-actions .btn-group {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .article-actions .btn-group .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 107, 53, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Styles */
:focus {
    outline: none; /* Remove default focus outline */
}

/* Only show focus styles for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Remove focus outline from buttons and nav links */
.btn:focus,
.nav-link:focus,
.navbar-toggler:focus {
    outline: none;
    box-shadow: none;
}

/* Keep focus visible for accessibility when using keyboard */
.btn:focus-visible,
.nav-link:focus-visible,
.navbar-toggler:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background-color: var(--primary-color);
    color: white;
}

/* Print Styles */
@media print {
    .navbar,
    .site-footer,
    .btn,
    .pagination {
        display: none !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* Category detail specific breadcrumb fixes */
.category-header .breadcrumb {
    min-width: 100%;
    flex-wrap: nowrap;
    position: relative;
    overflow: visible;
}

.category-header .breadcrumb-item {
    white-space: nowrap;
    flex-shrink: 0;
}

.category-header .breadcrumb-item a,
.category-header .breadcrumb-item.active {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    min-width: 0;
}

/* Allow breadcrumb to expand beyond its container when needed */
.category-header nav[aria-label="breadcrumb"] {
    position: relative;
    overflow: visible;
    margin-left: -15px;
    margin-right: -15px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Ensure category name doesn't get cut off */
.category-header .breadcrumb-item.active {
    overflow: visible;
    text-overflow: unset;
    max-width: none;
}

/* RTL specific fixes for category header breadcrumb */
.rtl .category-header .breadcrumb {
    direction: rtl;
    text-align: right;
}

.rtl .category-header .breadcrumb-item {
    direction: rtl;
    white-space: nowrap;
}

.rtl .category-header .breadcrumb-item a,
.rtl .category-header .breadcrumb-item.active {
    direction: rtl;
    text-align: right;
}

/* Mobile specific adjustments for category breadcrumb */
@media (max-width: 768px) {
    .category-header nav[aria-label="breadcrumb"] {
        margin-left: -10px;
        margin-right: -10px;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .category-header .breadcrumb-item.active {
        max-width: 300px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 576px) {
    .category-header nav[aria-label="breadcrumb"] {
        margin-left: -5px;
        margin-right: -5px;
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .category-header .breadcrumb-item.active {
        max-width: 200px;
    }
    
    .category-header .breadcrumb {
        font-size: 0.8rem;
    }
}

/* Speaking Image Detail Page Styles */
.speaking-image-detail {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.speaking-main-image {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    cursor: zoom-in;
    transition: all 0.3s ease;
}

.speaking-main-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.speaking-image-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: none;
    margin-bottom: 2rem;
}

.speaking-image-header {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(247, 147, 30, 0.05));
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.speaking-image-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.speaking-image-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.speaking-image-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.speaking-image-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.speaking-image-badges .badge {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 500;
}

.speaking-caption-container {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(247, 147, 30, 0.08));
    border-left: 4px solid var(--primary-color);
    border-radius: 0 12px 12px 0;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

.speaking-caption-icon {
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.speaking-caption-content {
    flex: 1;
}

.speaking-caption-title {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.speaking-caption-text {
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}

.speaking-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.speaking-info-section {
    background: var(--surface-color, #f8f9fa);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.speaking-info-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.speaking-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.speaking-info-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.speaking-info-list li:last-child {
    border-bottom: none;
}

.speaking-info-label {
    font-weight: 500;
    color: var(--text-muted);
}

.speaking-info-value {
    color: var(--text-color);
    font-weight: 500;
}

.speaking-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.speaking-stat-card {
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.speaking-stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.speaking-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.speaking-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.speaking-tags-container {
    margin: 1.5rem 0;
}

.speaking-tags-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.speaking-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.speaking-tag {
    background: var(--surface-color, #f8f9fa);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.speaking-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.speaking-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1.5rem;
    text-align: center;
}

.speaking-action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.speaking-action-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.speaking-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.speaking-publish-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
}

.speaking-sidebar-card {
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.speaking-sidebar-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 1rem;
}

.speaking-sidebar-header.bg-primary {
    background: var(--surface-color, #f8f9fa) !important;
    color: var(--text-color) !important;
    border-bottom: 1px solid var(--border-color);
}

.speaking-related-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background-color 0.3s ease;
}

.speaking-related-item:hover {
    background-color: rgba(255, 107, 53, 0.02);
}

.speaking-related-item:last-child {
    border-bottom: none;
}

.speaking-related-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.speaking-related-content {
    flex: 1;
    min-width: 0;
}

.speaking-related-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
}

.speaking-related-title:hover {
    color: var(--primary-color);
}

.speaking-related-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.speaking-photographer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.speaking-photographer-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: none;
}

.speaking-photographer-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.speaking-photographer-image {
    height: 180px;
    object-fit: cover;
    width: 100%;
}



.speaking-photographer-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1rem;
}

.speaking-photographer-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.speaking-photographer-title a {
    color: white;
    text-decoration: none;
}

.speaking-photographer-title a:hover {
    color: var(--secondary-color);
}

.speaking-quick-nav {
    background: var(--surface-color, #f8f9fa);
    border-radius: 12px;
    padding: 1.25rem;
}

/* E-book Detail Page Styles */
.ebook-detail {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.ebook-cover-image {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    transition: all 0.3s ease;
}

.ebook-cover-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.ebook-cover-placeholder {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.ebook-cover-placeholder:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.ebook-header-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: none;
    margin-bottom: 2rem;
}

.ebook-header {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(247, 147, 30, 0.05));
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.ebook-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.ebook-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.ebook-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--surface-color, #f8f9fa);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.ebook-meta-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.ebook-meta-icon {
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.ebook-meta-content {
    flex: 1;
    min-width: 0;
}

.ebook-meta-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.ebook-meta-value {
    font-size: 0.95rem;
    color: var(--text-color);
    font-weight: 600;
    word-break: break-word;
}

.ebook-summary-container {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(247, 147, 30, 0.08));
    border-left: 4px solid var(--primary-color);
    border-radius: 0 12px 12px 0;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

.ebook-summary-icon {
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.ebook-summary-content {
    flex: 1;
}

.ebook-summary-title {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ebook-summary-text {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}

.ebook-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.ebook-info-section {
    background: var(--surface-color, #f8f9fa);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.ebook-info-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ebook-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ebook-info-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ebook-info-list li:last-child {
    border-bottom: none;
}

.ebook-info-label {
    font-weight: 500;
    color: var(--text-muted);
}

.ebook-info-value {
    color: var(--text-color);
    font-weight: 500;
}

.ebook-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.ebook-stat-card {
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.ebook-stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.ebook-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.ebook-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ebook-tags-container {
    margin: 1.5rem 0;
}

.ebook-tags-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ebook-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ebook-tag {
    background: var(--surface-color, #f8f9fa);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.ebook-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.ebook-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1.5rem;
    text-align: center;
}

.ebook-action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.ebook-action-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.ebook-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.ebook-publish-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
}

.ebook-sidebar-card {
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.ebook-sidebar-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 1rem;
}

.ebook-sidebar-header.bg-primary {
    background: var(--surface-color, #f8f9fa) !important;
    color: var(--text-color) !important;
    border-bottom: 1px solid var(--border-color);
}

.ebook-related-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background-color 0.3s ease;
}

.ebook-related-item:hover {
    background-color: rgba(255, 107, 53, 0.02);
}

.ebook-related-item:last-child {
    border-bottom: none;
}

.ebook-related-cover {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.ebook-related-content {
    flex: 1;
    min-width: 0;
}

.ebook-related-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
}

.ebook-related-title:hover {
    color: var(--primary-color);
}

.ebook-related-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ebook-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.ebook-category-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: none;
}

.ebook-category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.ebook-category-cover {
    height: 120px;
    object-fit: cover;
    width: 100%;
}

.ebook-category-overlay {
          position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1rem;
}

.ebook-category-title {
    font-size:  0.9rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.ebook-category-title a {
    color: white;
    text-decoration: none;
}

.ebook-category-title a:hover {
    color: var(--secondary-color);
}

.ebook-quick-nav {
    background: var(--surface-color, #f8f9fa);
    border-radius: 12px;
    padding: 1.25rem;
}

/* Related Articles Widget Enhancement */
.related-articles .related-item {
    padding: 0.75rem;
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.related-articles .related-item:hover {
    background-color: var(--surface-color);
    border-color: var(--border-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.related-articles .related-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.related-articles .related-item:hover .related-image {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.related-articles .related-content {
    flex: 1;
    min-width: 0;
}

.related-articles .related-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.related-articles .related-title a {
    color: var(--text-color);
    transition: var(--transition);
}

.related-articles .related-title a:hover {
    color: var(--primary-color);
}

.related-articles .related-item small {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Newsletter Widget Enhancement */
.newsletter-form {
    margin-top: 1rem;
}

.newsletter-form .input-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.newsletter-form .form-control {
    border: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.newsletter-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.15);
}

.newsletter-form .btn {
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid var(--primary-color);
    transition: var(--transition);
}

.newsletter-form .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

/* Widget Title Enhancement */
.widget .widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.widget .widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--secondary-color);
}

.widget {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.widget:hover {
    box-shadow: var(--shadow-hover);
}

.widget p {
    color: var(--text-muted);
    line-height: 1.5;
}

/* Card headers with background styling similar to section headers */
.card-header.bg-secondary {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.9), rgba(108, 117, 125, 0.7)) !important;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.card-header.bg-secondary::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.card-header.bg-secondary .card-title {
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

/* General card header improvements */
.card-header {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(247, 147, 30, 0.05));
    position: relative;
}

.card-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.card-header .card-title {
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

/* Article Content Styles */
.article-content {
    line-height: 1.8;
    font-size: 1rem;
    color: var(--text-color);
    word-wrap: break-word;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
}

.article-content h1 {
    font-size: 2rem;
}

.article-content h2 {
    font-size: 1.75rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content h4 {
    font-size: 1.25rem;
}

.article-content h5 {
    font-size: 1.125rem;
}

.article-content h6 {
    font-size: 1rem;
}

.article-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.article-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 0.25rem;
    font-style: italic;
}

.article-content blockquote p {
    margin-bottom: 0;
}

.article-content blockquote p:last-child {
    margin-bottom: 0;
}

.article-content strong,
.article-content b {
    font-weight: 600;
}

.article-content em,
.article-content i {
    font-style: italic;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    margin: 1rem 0;
}

.article-content table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.article-content table th,
.article-content table td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.article-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.article-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.article-content code {
    background-color: #f8f9fa;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875em;
}

.article-content pre code {
    background-color: transparent;
    padding: 0;
}

/* Responsive font sizes for article content */
@media (max-width: 768px) {
    .article-content {
        font-size: 0.95rem;
    }
    
    .article-content h1 {
        font-size: 1.75rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
}

/* World Pulse Specific Styles */
.world-pulse-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
    overflow: hidden;
    background: var(--background-color);
}

.world-pulse-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.world-pulse-image-container {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.world-pulse-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.world-pulse-card:hover .world-pulse-image {
    transform: scale(1.05);
}

.world-pulse-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.world-pulse-title a {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.world-pulse-title a:hover {
    color: var(--primary-color);
}

.world-pulse-excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.world-pulse-meta {
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.world-pulse-meta .text-muted {
    font-size: 0.85rem;
}

.world-pulse-meta i {
    margin-right: 0.25rem;
    color: var(--primary-color);
}

.world-pulse-badges {
    margin-top: 0.5rem;
}

.world-pulse-badges .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Responsive adjustments for World Pulse */
@media (max-width: 768px) {
    .world-pulse-card .row.g-0 {
        flex-direction: column;
    }
    
    .world-pulse-image-container {
        height: 180px;
    }
    
    .world-pulse-title {
        font-size: 1rem;
    }
    
    .world-pulse-excerpt {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .world-pulse-image-container {
        height: 160px;
    }
    
    .world-pulse-meta .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Alert close button mobile fix */
.alert {
    position: relative;
}

.alert .btn-close {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    margin: 0;
    padding: 0;
    width: 1em;
    height: 1em;
    line-height: 1;
}

/* RTL support for alert close button */
.alert[dir="rtl"] .btn-close,
[dir="rtl"] .alert .btn-close {
    right: auto;
    left: 1rem;
}

/* Mid-sized screen adjustments for error alerts (504px to 786px) */
@media  (max-width: 786px) {
    .alert-danger {
        padding: 1.25rem 1.5rem;
        margin: 1rem 0;
        border-radius: 10px;
        font-size: 0.95rem;
        max-width: 100%;
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
    }
    
    .alert-danger h5 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
        font-weight: 600;
    }
    
    .alert-danger p {
        margin-bottom: 1rem;
        line-height: 1.5;
        font-size: 0.9rem;
    }
    
    .alert-danger .btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.9rem;
        border-radius: 6px;
        min-width: 120px;
        margin-top: 0.5rem;
    }
    
    .alert-danger i.fas {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
        display: block;
    }
    
    /* Ensure proper spacing and centering */
    .alert-danger.text-center {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 150px;
    }
    
    /* Container adjustments for error states */
    #images-container .alert-danger,
    #articles-container .alert-danger,
    #ebooks-container .alert-danger,
    .search-results-container .alert-danger {
        margin: 2rem auto;
        max-width: 90%;
    }
    
    /* Improve button styling on mid-sized screens */
    .alert-danger .btn-primary {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
        transition: all 0.3s ease;
    }
    
    .alert-danger .btn-primary:hover {
        background-color: #e55a2b;
        border-color: #e55a2b;
        transform: translateY(-1px);
    }
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .alert .btn-close {
        top: 50%;
        transform: translateY(-50%);
        position: absolute;
    }
    
    .alert {
        padding-right: 3rem;
        min-height: 3rem;
        display: flex;
        align-items: center;
    }
    
    /* RTL mobile adjustments */
    .alert[dir="rtl"],
    [dir="rtl"] .alert {
        padding-right: 1rem;
        padding-left: 3rem;
    }
}
