:root {
    --primary-color: #1a4d8c;
    --secondary-color: #e6f2ff;
    --accent-color: #ff6b35;
    --text-color: #333;
    --light-color: #f8f9fa;
    --dark-color: #1a1a1a;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 0;
    font-size: 0.9rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.university-logos {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.university-logos span {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.user-actions a {
    color: white;
    text-decoration: none;
    margin-right: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.user-actions a:hover {
    text-decoration: underline;
}

.main-header {
    padding: 15px 0;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.logo img {
    height: 60px;
    width: auto;
}

.logo-text h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.logo-text p {
    font-size: 0.9rem;
    color: #666;
}

.search-bar {
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
}

.search-bar form {
    display: flex;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-bar button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.search-bar button:hover {
    background-color: #e55a2b;
}

nav ul {
    display: flex;
    list-style: none;
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-top: 15px;
}

nav li {
    flex: 1;
}

nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--primary-color);
    text-align: center;
    font-weight: 500;
    transition: var(--transition);
}

nav a:hover, nav a.active {
    background-color: var(--primary-color);
    color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #2c5aa0);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.1;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background-color: #e55a2b;
    border-color: #e55a2b;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Quick Access Section */
.quick-access {
    padding: 60px 0;
    background-color: white;
}

.quick-access h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
    font-size: 2rem;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.quick-link {
    background: var(--light-color);
    padding: 30px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-color);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.quick-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    background: white;
}

.quick-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.8rem;
}

.quick-link h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.quick-link p {
    color: #666;
    font-size: 0.95rem;
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: var(--light-color);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-title p {
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-color);
    font-size: 2rem;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.feature-card p {
    color: #666;
    line-height: 1.7;
}

/* Universities Section */
.universities {
    padding: 80px 0;
    background-color: white;
}

.universities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.university-card {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 25px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.university-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: white;
}

.university-logo {
    height: 80px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 3rem;
}

.university-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.university-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Stats Section */
.stats {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary-color), #2c5aa0);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* News & Events Section */
.news-events {
    padding: 80px 0;
    background-color: var(--light-color);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

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

.news-date {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--accent-color);
    color: white;
    padding: 10px;
    border-radius: var(--border-radius);
    text-align: center;
    min-width: 60px;
}

.news-date .day {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}

.news-date .month {
    display: block;
    font-size: 0.9rem;
}

.news-card h3 {
    margin: 15px 0 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.news-card p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-color);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 5px 0;
}

.footer-column a:hover {
    color: white;
    padding-right: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #ccc;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .logo-section {
        flex-wrap: wrap;
    }
    
    .search-bar {
        max-width: 100%;
        margin: 15px 0;
        order: 3;
        flex: 1 1 100%;
    }
}

@media (max-width: 992px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .features-grid,
    .universities-grid,
    .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    nav ul {
        flex-wrap: wrap;
    }
    
    nav li {
        flex: 1 1 50%;
    }
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .university-logos {
        justify-content: center;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-text h1 {
        font-size: 1.3rem;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .features-grid,
    .universities-grid,
    .quick-links,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    nav a {
        padding: 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
    }
    
    .logo-text h1 {
        font-size: 1.1rem;
    }
    
    .logo-text p {
        font-size: 0.8rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card,
    .university-card,
    .quick-link {
        padding: 20px 15px;
    }
}

/* تنسيقات خاصة بصفحة الفهرس الموحد */
.catalog-hero {
    background: var(--gradient-primary), url('../images/catalog-bg.jpg') center/cover;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.catalog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255, 107, 53, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(26, 77, 140, 0.2) 0%, transparent 40%),
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.catalog-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.catalog-hero p {
    font-size: 1.4rem;
    opacity: 0.9;
    margin-bottom: 40px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 50px;
}

.hero-stats .stat {
    text-align: center;
}

.hero-stats .number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffd700 0%, #ff6b35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-stats .label {
    font-size: 1.1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* تحسين منطقة البحث */
.catalog-search {
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.search-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.search-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
}

.search-box {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.search-box input {
    flex: 1;
    padding: 20px 25px;
    border: none;
    background: white;
    font-size: 1.1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    background: #f8fafc;
}

.search-box button {
    background: var(--gradient-accent);
    color: white;
    border: none;
    padding: 0 35px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
}

.search-box button:hover {
    background: var(--accent-dark);
    transform: none;
}

/* تحسين أزرار التصفية السريعة */
.quick-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 77, 140, 0.15);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 77, 140, 0.3);
}

/* تحسين البحث المتقدم */
.advanced-search-toggle {
    text-align: center;
    margin: 25px 0;
}

.advanced-search-toggle button {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.advanced-search-toggle button:hover,
.advanced-search-toggle button.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 77, 140, 0.3);
}

.advanced-search {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-top: 20px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.advanced-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input,
.form-group select {
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(26, 77, 140, 0.15);
    transform: translateY(-1px);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* تحسين منطقة النتائج */
.catalog-results {
    padding: 60px 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-color);
}

.results-info {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.search-query {
    color: var(--accent-color);
    font-weight: 600;
}

.results-controls {
    display: flex;
    align-items: center;
    gap: 25px;
}

.results-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-sort label {
    font-weight: 600;
    color: var(--text-light);
}

.results-sort select {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    background: white;
    font-weight: 500;
}

.results-view {
    display: flex;
    gap: 5px;
    background: #f8fafc;
    padding: 5px;
    border-radius: var(--border-radius);
}

.view-btn {
    background: transparent;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-light);
}

.view-btn.active,
.view-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* تحسين بطاقات النتائج */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.results-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.result-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 25px;
    align-items: start;
    position: relative;
    overflow: hidden;
}

.result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.result-item.grid-item {
    grid-template-columns: 1fr;
    text-align: center;
}

.item-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    border-radius: var(--border-radius);
    background: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.item-type i {
    font-size: 1.5rem;
}

.item-type.book { background: #e8f4ff; color: #1a4d8c; }
.item-type.journal { background: #fff0e8; color: #d69e2e; }
.item-type.thesis { background: #f0f8ff; color: #3182ce; }
.item-type.digital { background: #e8fff0; color: #38a169; }

.item-content {
    flex: 1;
}

.item-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.4;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--text-light);
}

.item-meta strong {
    color: var(--primary-color);
}

.item-description {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.item-library {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.item-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.subject-tag {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.subject-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 150px;
}

/* تحسين التصفح بين الصفحات */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 50px 0 30px;
}

.page-btn {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 12px 18px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 77, 140, 0.15);
}

.page-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 77, 140, 0.3);
}

.page-btn.prev, .page-btn.next {
    font-weight: 700;
}

/* تحسين حالة التحميل */
.loading {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.loading-spinner {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.loading p {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 600;
}

/* تحسين حالة لا توجد نتائج */
.no-results {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.no-results-icon {
    font-size: 4rem;
    color: #e2e8f0;
    margin-bottom: 30px;
}

.no-results h3 {
    font-size: 1.8rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.no-results p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.suggestions {
    background: var(--secondary-color);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: right;
    max-width: 400px;
    margin: 0 auto;
}

.suggestions h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.suggestions ul {
    list-style: none;
    text-align: right;
}

.suggestions li {
    padding: 8px 0;
    color: var(--text-light);
    position: relative;
    padding-right: 20px;
}

.suggestions li::before {
    content: '•';
    position: absolute;
    right: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* تحسين النافذة المنبثقة */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        transform: translate(-50%, -40%);
        opacity: 0;
    }
    to { 
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: var(--gradient-primary);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

/* تحسين تفاصيل المادة */
.item-details .detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.detail-type {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

.detail-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars {
    color: #ffd700;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item strong {
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.availability.available {
    background: #e8fff0;
    color: var(--success-color);
}

.availability.unavailable {
    background: #ffe8e8;
    color: #e53e3e;
}

.detail-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

/* رسائل التنبيه */
.message {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 600;
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { 
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to { 
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.message.success { background: var(--success-color); }
.message.error { background: #e53e3e; }
.message.info { background: var(--info-color); }

/* تحسين التجاوب للجوال */
@media (max-width: 768px) {
    .catalog-hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .search-container {
        padding: 25px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box button {
        padding: 15px;
    }
    
    .results-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .results-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .result-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .item-actions {
        flex-direction: row;
        justify-content: center;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
}

/* تأثيرات إضافية */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.loading-spinner {
    animation: pulse 1.5s ease-in-out infinite;
}

/* تحسين شريط التمرير */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* أنماط خاصة بصفحة قواعد البيانات */
.databases-hero {
    background: linear-gradient(135deg, #2c5530, #4a7c59);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.databases-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/databases-bg.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.1;
    z-index: 0;
}

.databases-hero .container {
    position: relative;
    z-index: 1;
}

.databases-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.databases-hero h1 i {
    margin-left: 15px;
    color: #ffd700;
}

.databases-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.hero-stats .stat {
    text-align: center;
}

.hero-stats .number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #ffd700;
}

.hero-stats .label {
    font-size: 1rem;
    opacity: 0.9;
}

/* قواعد البيانات المميزة */
.featured-databases {
    padding: 60px 0;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-header h2 i {
    margin-left: 10px;
    color: #ffd700;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.featured-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border-top: 4px solid #ffd700;
    position: relative;
    overflow: hidden;
}

.featured-card::before {
    content: 'مميز';
    position: absolute;
    top: 15px;
    left: -30px;
    background: #ffd700;
    color: #333;
    padding: 5px 40px;
    transform: rotate(-45deg);
    font-size: 0.8rem;
    font-weight: bold;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.featured-card-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.featured-logo {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.featured-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.featured-title {
    flex: 1;
}

.featured-title h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.featured-provider {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.featured-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.featured-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.featured-category {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.featured-access {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.featured-access.paid {
    color: #dc3545;
}

.featured-access.free {
    color: var(--success-color);
}

.featured-actions {
    display: flex;
    gap: 10px;
}

/* بحث وقوائم قواعد البيانات */
.databases-search {
    padding: 40px 0;
    background: white;
}

.search-filters {
    background: var(--light-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.search-box button:hover {
    background: #1a3d6c;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.filter-group select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
}

.filter-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* نتائج قواعد البيانات */
.databases-results {
    padding: 40px 0 80px;
    background: var(--light-color);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.results-info {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 500;
}

.search-query {
    color: #666;
    font-weight: normal;
    margin-right: 10px;
}

.results-view {
    display: flex;
    gap: 5px;
    background: var(--secondary-color);
    padding: 5px;
    border-radius: var(--border-radius);
}

.view-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--primary-color);
    transition: var(--transition);
}

.view-btn.active,
.view-btn:hover {
    background: var(--primary-color);
    color: white;
}

.databases-grid {
    display: grid;
    gap: 25px;
}

.databases-grid.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.databases-grid.list-view {
    grid-template-columns: 1fr;
}

.database-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.database-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--primary-color);
}

.database-card.featured {
    border-left-color: #ffd700;
}

.database-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.database-logo {
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.database-logo img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.database-info {
    flex: 1;
}

.database-title {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.1rem;
    line-height: 1.3;
}

.database-provider {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.database-description {
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.database-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.database-category {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.database-access {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 500;
}

.database-access.paid {
    color: #dc3545;
}

.database-access.free {
    color: var(--success-color);
}

.database-popularity {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #666;
}

.database-actions {
    display: flex;
    gap: 10px;
}

/* التصفح بين الصفحات */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0 20px;
}

.page-btn {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: white;
    color: var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn.active,
.page-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn.prev i {
    order: 1;
}

.page-btn.next i {
    order: -1;
}

/* حالة التحميل */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--primary-color);
}

.loading-spinner {
    font-size: 2rem;
    margin-bottom: 15px;
}

.loading p {
    font-size: 1.1rem;
}

/* لا توجد نتائج */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ddd;
}

.no-results h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.no-results p {
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* النافذة المنبثقة */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: var(--border-radius);
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
    background: var(--light-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header h3 {
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.close-modal:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 30px;
}

/* تفاصيل قاعدة البيانات */
.database-details {
    line-height: 1.6;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.detail-logo {
    width: 80px;
    height: 80px;
    background: var(--secondary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.detail-logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.detail-title {
    flex: 1;
    margin: 0 20px;
}

.detail-title h2 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.detail-provider {
    color: #666;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.detail-access {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 20px;
}

.detail-access.paid {
    background: #ffe6e6;
    color: #dc3545;
}

.detail-access.free {
    background: #e6f4ea;
    color: var(--success-color);
}

.detail-popularity {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section p {
    color: #555;
    line-height: 1.7;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item strong {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.subjects-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.subject-tag {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.detail-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

/* التجاوب للجوال */
@media (max-width: 768px) {
    .databases-hero h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-row {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .results-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .databases-grid.grid-view {
        grid-template-columns: 1fr;
    }
    
    .detail-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .detail-title {
        margin: 0;
    }
    
    .detail-meta {
        align-items: center;
        width: 100%;
    }
    
    .detail-actions {
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
}

@media (max-width: 480px) {
    .databases-hero {
        padding: 60px 0;
    }
    
    .databases-hero h1 {
        font-size: 1.7rem;
    }
    
    .hero-stats .number {
        font-size: 2rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .featured-card-header {
        flex-direction: column;
        text-align: center;
    }
    
    .featured-logo {
        align-self: center;
    }
    
    .database-header {
        flex-direction: column;
        text-align: center;
    }
    
    .database-logo {
        align-self: center;
    }
}