/* Trang chủ CSS - Giao diện giống drugs.com */

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

/* Hero Section */
.hero-section {
    background:#0048d8;
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content {
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.quick-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.quick-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.quick-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

/* Search Section trong Hero */
.hero-section .search-section {

    position: relative;
    z-index: 10;
}

.hero-section .search-section .search-form {
    position: relative;
}

.hero-section .search-section .search-input-group {
    max-width: 600px;
    margin: 0 auto;
}

.hero-section #search-input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #333;
    font-size: 18px;
    padding: 8px 20px;
}

.hero-section #search-input:focus {
    background: white;
    border-color: #0048d8;
    box-shadow: 0 0 0 3px rgba(0, 72, 216, 0.2);
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: #333;
}

/* Categories Section */
.categories-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.category-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0048d8, #0033a0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.category-icon .material-icons {
    font-size: 40px;
    color: white;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

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

.category-link {
    color: #0048d8;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border: 2px solid #0048d8;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: inline-block;
}

.category-link:hover {
    background: #0048d8;
    color: white;
    transform: translateY(-2px);
}

.search-section h2 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 600;
}

.search-form {
    margin-bottom: 20px;
}

.search-input-group {
    max-width: 600px;
    margin: 0 auto;
}

#search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius:30px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

#search-input:focus {
    border-color: #0048d8;
    box-shadow: 0 0 0 3px rgba(0, 72, 216, 0.1);
}

/* News Section */
.news-section {
    padding: 80px 0;
    background: white;
}

.news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
    margin-top: 50px;
}

.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

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

.news-card.featured {
    grid-row: span 2;
}

.news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-card.featured .news-image {
    height: 300px;
}

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

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

.news-content {
    padding: 25px;
}

.news-category {
    background: #0048d8;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 15px 0 10px;
    color: #333;
    line-height: 1.4;
}

.news-card.featured h3 {
    font-size: 1.5rem;
}

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

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #999;
}

.news-date, .news-author {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Stats Section */
.stats-section {
    padding: 60px 0;
    background: #0048d8;
    color: white;
}

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

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

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

/* Removed search button styles since button is removed */

/* Loading spinner */
.loading {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    margin: 10px 0;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Real-time search indicator */
#search-input:focus {
    border-color: #0048d8;
    box-shadow: 0 0 0 3px rgba(0, 72, 216, 0.1);
}

#search-input.searching {
    border-color: #ff9800;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

/* Kết quả tìm kiếm */
.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
    display: none; /* Ẩn mặc định */
}

/* Hiển thị khi có kết quả */
.search-results:not(:empty) {
    display: block !important;
}

/* Ẩn khi không có kết quả */
.search-results.empty {
    display: none !important;
}

.search-results h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
    text-align: left;
}

/* Grid layout cho kết quả tìm kiếm */
.search-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}

/* Responsive grid */
@media (max-width: 1200px) {
    .search-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .search-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .search-grid {
        grid-template-columns: 1fr;
    }
}

.search-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.search-item:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-4px);
}

/* Hình ảnh bài viết */
.search-item .post-thumbnail {
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    position: relative;
    overflow: hidden;
}

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

.search-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.search-item .post-thumbnail .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    color: #999;
    font-size: 48px;
}

/* Nội dung bài viết */
.search-item .post-content {
    padding: 15px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.search-item h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
    line-height: 1.4;
    font-weight: 600;
}

.search-item h4 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-item h4 a:hover {
    color: #0048d8;
}

/* Removed excerpt and meta styles since we only show image + title */

/* Badge cho loại bài viết */
.search-item .type-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Badge cho danh mục */
.search-item .category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 72, 216, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-results .material-icons {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
    display: block;
}

.no-results h3 {
    margin: 0 0 10px 0;
    color: #999;
}

.no-results p {
    margin: 0;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .quick-links {
        gap: 15px;
    }
    
    .quick-link {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-card.featured {
        grid-row: span 1;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .search-input-group {
        max-width: 100%;
    }
    
    .search-section {
        padding: 20px;
        margin: 10px 0;
    }
    
    .search-section h2 {
        font-size: 24px;
    }
    
    /* Grid responsive cho mobile */
    .search-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .search-item .post-thumbnail {
        height: 180px;
    }
    
    .search-item .post-content {
        padding: 12px;
    }
    
    .search-item h4 {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .search-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }
    
    .search-item .post-thumbnail {
        height: 160px;
    }
    
    .search-item .post-content {
        padding: 10px;
    }
    
    .search-item h4 {
        font-size: 14px;
    }
}
