/* Blog Page Specific Styles */

/* Blog Hero Section */
.blog-hero {
    min-height: calc(100vh - 5rem);
    padding-top: 2rem;
}

/* Blog Cards */
.blog-card,
.article-card {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(250, 204, 21, 0.2);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: translateY(0);
    cursor: pointer;
}

.blog-card:hover,
.article-card:hover {
    transform: translateY(-8px);
    border-color: rgba(250, 204, 21, 0.5);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Blog Navigation Fix */
.blog-nav {
    background: rgba(15, 23, 42, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

/* Blog Typography */
.blog-title {
    background: linear-gradient(to right, var(--primary-yellow), var(--accent-gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Blog Content Spacing */
.blog-content {
    padding-top: 2rem;
}

/* Blog Modal Styles */
.blog-modal {
    background: rgba(15, 23, 42, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(250, 204, 21, 0.2);
}

.blog-modal-content {
    max-height: 80vh;
    overflow-y: auto;
}

/* Complete Blog Modal Popup Styles */
#blogModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
}

#blogModal.hidden {
    display: none !important;
}

#blogModal.flex {
    display: flex !important;
    animation: modalFadeIn 0.3s ease-out;
}

#blogModal .bg-white {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 2px solid rgba(250, 204, 21, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border-radius: 1rem;
    margin: 1rem;
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

#blogModal .p-8 {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#blogModal .max-h-\[85vh\] {
    max-height: 85vh;
    overflow-y: auto;
    flex: 1;
}

#blogModal h2 {
    color: #1e293b;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

#blogModal #closeModal {
    color: #64748b;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.25rem;
    border-radius: 0.5rem;
}

#blogModal #closeModal:hover {
    color: #334155;
    background: rgba(250, 204, 21, 0.1);
    transform: scale(1.1);
}

#modalContent {
    color: #334155;
    line-height: 1.7;
}

#modalContent h1,
#modalContent h2,
#modalContent h3,
#modalContent h4 {
    color: #1e293b;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

#modalContent p {
    margin-bottom: 1rem;
}

#modalContent a {
    color: #3b82f6;
    text-decoration: underline;
}

#modalContent a:hover {
    color: #1d4ed8;
}

#modalContent img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

#modalContent code {
    background: #f1f5f9;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

#modalContent pre {
    background: #f1f5f9;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Search and Filter Styles */
.search-filter-section input[type="text"] {
    background: rgba(15, 23, 42, 0.8);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(250, 204, 21, 0.2);
    transition: all 0.3s ease;
}

.search-filter-section input[type="text"]:focus {
    border-color: rgba(250, 204, 21, 0.5);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.1);
}

.search-filter-section select {
    background: rgba(15, 23, 42, 0.8);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(250, 204, 21, 0.2);
    transition: all 0.3s ease;
}

.search-filter-section select:focus {
    border-color: rgba(250, 204, 21, 0.5);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.1);
}

.search-filter-section select option {
    background: #0f172a;
    color: #ffffff;
    padding: 0.5rem;
}

/* Hidden articles animation */
.article-card.hidden {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.article-card:not(.hidden) {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

/* Article Card Content Styling */
.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover img {
    transform: scale(1.05);
}

.article-card .p-6 {
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.8);
}

.article-card h3 {
    color: #facc15;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.article-card h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-card:hover h3 a {
    color: #fbbf24;
}

.article-card p {
    color: #94a3b8;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-card .text-xs {
    color: #64748b;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.article-card .text-primary-yellow {
    color: #facc15;
}

.article-card .bg-primary-yellow {
    background-color: rgba(250, 204, 21, 0.1);
    color: #facc15;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .featured-article .flex-row {
        flex-direction: column;
    }

    .featured-article .w-1/2 {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 3rem;
    }

    .blog-hero p {
        font-size: 1.125rem;
    }

    .search-filter-section .flex-row {
        flex-direction: column;
    }

    .article-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }

    .featured-article h3 {
        font-size: 1.5rem;
    }

    .search-filter-section .flex-1 {
        max-width: 100%;
    }
}
