/* Blog Specific Styles */

/* Override navbar to always have background on blog pages */
.navbar {
    background: rgba(30, 58, 95, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
}

.navbar.scrolled {
    background: rgba(30, 58, 95, 0.98) !important;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2) !important;
}

body {
    background:
        radial-gradient(circle at 15% 15%, rgba(30, 41, 59, 0.05), transparent 35%),
        radial-gradient(circle at 85% 25%, rgba(30, 41, 59, 0.04), transparent 35%),
        radial-gradient(circle at 50% 70%, rgba(212, 175, 55, 0.04), transparent 35%),
        radial-gradient(circle at 25% 85%, rgba(30, 41, 59, 0.04), transparent 35%),
        linear-gradient(135deg, #f8fafc 0%, #f1f5f9 25%, #f8fafc 50%, #ffffff 75%, #f8fafc 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        repeating-linear-gradient(45deg, transparent, transparent 60px, rgba(30, 41, 59, 0.01) 60px, rgba(30, 41, 59, 0.01) 120px),
        repeating-linear-gradient(-45deg, transparent, transparent 60px, rgba(30, 41, 59, 0.01) 60px, rgba(30, 41, 59, 0.01) 120px);
    pointer-events: none;
    z-index: 0;
    animation: backgroundShift 60s linear infinite;
}

@keyframes backgroundShift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 50px) rotate(2deg); }
}

.blog-main {
    position: relative;
    z-index: 1;
    padding-top: 80px;
}

/* Blog Hero Section */
.blog-hero {
    background: linear-gradient(135deg, #142a47 0%, #1e3a5f 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    margin-top: 0;
}

.blog-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.blog-hero p {
    font-size: 1.25rem;
    opacity: 0.95;
}

/* Search and Filter Section */
.blog-search-section {
    background: transparent;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.3);
}

/* Search Bar */
.search-bar {
    max-width: 600px;
    margin: 0 auto 2rem;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.5rem;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    outline: none;
    transition: all 0.4s ease;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.35) 100%);
    box-shadow:
        0 8px 32px rgba(31, 38, 135, 0.15),
        0 2px 8px rgba(31, 38, 135, 0.1),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.9),
        inset -1px 0 0 0 rgba(255, 255, 255, 0.4);
}

.search-bar input:focus {
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-top: 2px solid rgba(59, 130, 246, 0.6);
    box-shadow:
        0 8px 32px rgba(59, 130, 246, 0.2),
        0 0 0 3px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 0 rgba(255, 255, 255, 1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.5) 100%);
}

.search-bar button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: #1e3a5f;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-bar button:hover {
    background: #142a47;
    transform: translateY(-50%) scale(1.05);
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.filter-btn {
    padding: 0.625rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.35) 100%);
    color: #475569;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 16px rgba(31, 38, 135, 0.12),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.9),
        inset -1px 0 0 0 rgba(255, 255, 255, 0.4);
}

.filter-btn:hover {
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-top: 2px solid rgba(59, 130, 246, 0.6);
    color: #1e3a5f;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.5) 100%);
    transform: translateY(-3px);
    box-shadow:
        0 8px 24px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 1);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.45) 0%, rgba(59, 130, 246, 0.35) 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-top: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 8px 24px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
}

/* Blog Articles Section */
.blog-articles {
    padding: 3rem 0;
    min-height: 600px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Article Card */
.article-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-left: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(31, 38, 135, 0.15),
        0 2px 8px rgba(31, 38, 135, 0.1),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.9),
        inset -1px 0 0 0 rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.article-card > * {
    position: relative;
    z-index: 1;
}

.article-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.45) 100%);
    box-shadow:
        0 20px 60px rgba(59, 130, 246, 0.25),
        0 8px 16px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 0 rgba(255, 255, 255, 1),
        inset -1px 0 0 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-top: 2px solid rgba(255, 255, 255, 0.9);
}

.article-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.article-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.25) 100%);
}

.article-category {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: rgba(59, 130, 246, 0.1);
    color: #1e3a5f;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.article-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

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

.article-card h3 a:hover {
    color: #1e3a5f;
}

.article-excerpt {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #94a3b8;
    font-size: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.article-date,
.article-reading-time {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.35) 100%);
    color: #475569;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 16px rgba(31, 38, 135, 0.12),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.9),
        inset -1px 0 0 0 rgba(255, 255, 255, 0.4);
}

.pagination-btn:hover:not(:disabled) {
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-top: 2px solid rgba(59, 130, 246, 0.6);
    color: #1e3a5f;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.5) 100%);
    transform: translateY(-3px);
    box-shadow:
        0 8px 24px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 1);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.35) 100%);
    color: #475569;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 16px rgba(31, 38, 135, 0.12),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.9),
        inset -1px 0 0 0 rgba(255, 255, 255, 0.4);
}

.page-number:hover {
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-top: 2px solid rgba(59, 130, 246, 0.6);
    color: #1e3a5f;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.5) 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 8px 24px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 1);
}

.page-number.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.45) 0%, rgba(59, 130, 246, 0.35) 100%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-top: 2px solid rgba(255, 255, 255, 0.9);
    color: white;
    box-shadow:
        0 8px 24px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, #142a47 0%, #1e3a5f 100%);
    padding: 4rem 0;
    color: white;
}

.newsletter-box {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-box h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter-box > p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    padding: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255,255,255,0.1);
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

.newsletter-form input::placeholder {
    color: rgba(255,255,255,0.7);
}

.newsletter-form input:focus {
    border-color: white;
    background: rgba(255,255,255,0.15);
}

.subscribe-btn {
    padding: 1rem 2rem;
    background: #9a7b3c;
    color: #1e3a5f;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subscribe-btn:hover {
    background: #b8982f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.privacy-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #475569;
}

/* Footer */
footer {
    background: #1e3a5f;
    color: white;
    padding: 3rem 0 1.5rem;
}

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

.footer-col h3 {
    margin-bottom: 1rem;
    color: #9a7b3c;
}

.footer-col p,
.footer-col a {
    color: #cbd5e1;
    line-height: 1.8;
}

.footer-col a:hover {
    color: white;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1.5rem;
    text-align: center;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2rem;
    }

    .blog-hero p {
        font-size: 1rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .category-filters {
        justify-content: flex-start;
    }

    .newsletter-form {
        max-width: 100%;
    }

    .pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .page-numbers {
        order: -1;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
