* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header Styles */
.pamphlet-header {
    background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #e53935 100%);
    color: white;
    padding: 60px 0 40px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.pamphlet-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,128L48,144C96,160,192,192,288,186.7C384,181,480,139,576,138.7C672,139,768,181,864,197.3C960,213,1056,203,1152,186.7C1248,171,1344,149,1392,138.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: center;
    animation: wave 15s linear infinite;
}

@keyframes wave {
    0% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-5%);
    }
    100% {
        transform: translateX(0);
    }
}

.pamphlet-header h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    animation: fadeInDown 1s ease-out;
}

.pamphlet-header .subtitle {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    position: relative;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.breadcrumb {
    position: relative;
    margin-top: 10px;
    animation: fadeIn 1s ease-out 0.6s both;
}

.pamphlet-header a {
    display: inline-block;
    font-size: 14px;
    color: #fff;
    opacity: 0.85;
    text-decoration: none;
    transition: opacity 0.3s;
}

.pamphlet-header a:hover {
    opacity: 1;
}

.pamphlet-header a i {
    margin-right: 5px;
}

/* Search Bar */
.blog-search {
    max-width: 600px;
    margin: 30px auto 0;
    padding: 0 20px;
    position: relative;
    animation: fadeInUp 1s ease-out 0.9s both;
}

.search-container {
    display: flex;
    gap: 10px;
    background: white;
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.search-input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.search-btn {
    background: #1a237e;
    color: white;
    border: none;
    padding: 0 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background: #283593;
}

.reset-btn {
    background: #e53935;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 50px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reset-btn:hover {
    background: #c62828;
}

/* Blog Grid Styles */
.blog-container {
    max-width: 1500px;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;
    width: 100%;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.blog-image {
    height: auto;
    width: 100%;
    overflow: hidden;
    position: relative;
    background: #f0f2f5;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s ease;
    display: block;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-date {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(26, 35, 126, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.blog-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(229, 57, 53, 0.85);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.blog-content {
    padding: 10px;
}

.blog-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
    color: #1a237e;
}

.blog-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    color: #e53935;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.blog-read-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.blog-read-more:hover {
    color: #1a237e;
}

.blog-read-more:hover i {
    transform: translateX(5px);
}

/* Event Badge */
.event-badge {
    background: #4caf50;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}

/* Pharmaceutical Highlight */
.pharma-highlight {
    color: #e53935;
    font-weight: 600;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
    min-height: 300px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #1a237e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    margin: 40px auto;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.error-message i {
    font-size: 48px;
    color: #e53935;
    margin-bottom: 20px;
}

.error-message p {
    color: #666;
    margin-bottom: 20px;
    font-size: 16px;
}

.retry-btn {
    background: #1a237e;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.retry-btn:hover {
    background: #283593;
}

.debug-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.debug-btn:hover {
    background: #5a6268;
}

/* Debug Info Panel */
.debug-info {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #dc3545;
    border-radius: 8px;
    font-family: monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.debug-info h3 {
    color: #dc3545;
    margin-bottom: 15px;
}

#debug-content {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    max-height: 400px;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.5;
}

/* No Articles Message */
.no-articles {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
    grid-column: 1 / -1;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.no-articles i {
    font-size: 48px;
    color: #1a237e;
    margin-bottom: 20px;
    display: block;
}

.no-articles p {
    margin-bottom: 20px;
}

.no-articles .suggestion {
    font-size: 14px;
    color: #999;
    margin-top: 10px;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.pagination-list {
    display: flex;
    list-style: none;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.pagination-list a:hover:not(.disabled),
.pagination-list a.active {
    background: #1a237e;
    color: white;
}

.pagination-list a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: #f5f5f5;
    color: #999;
}

.pagination-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #666;
    font-weight: 600;
}

/* Animation delays for cards */
.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }
.blog-card:nth-child(7) { animation-delay: 0.7s; }
.blog-card:nth-child(8) { animation-delay: 0.8s; }
.blog-card:nth-child(9) { animation-delay: 0.9s; }

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1400px) {
    .blog-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .pamphlet-header h1 {
        font-size: 32px;
    }
    
    .pamphlet-header .subtitle {
        font-size: 16px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
    
    .search-container {
        flex-wrap: wrap;
        border-radius: 12px;
        background: transparent;
        box-shadow: none;
    }
    
    .search-input {
        width: 100%;
        border-radius: 50px;
        background: white;
    }
    
    .search-btn,
    .reset-btn {
        width: calc(50% - 5px);
        padding: 12px;
        border-radius: 50px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-container {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .pamphlet-header {
        padding: 40px 0 30px;
    }
    
    .pamphlet-header h1 {
        font-size: 24px;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .search-btn,
    .reset-btn {
        width: 100%;
    }
}
