/* blogs.css - Blog Page Styles */

/* blogs.css - Blog Page Styles */

.blog-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 60px auto;
}

.blog-search-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav__search {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.nav__search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.nav__search-input:focus {
    outline: none;
    border-color: #00BCD4;
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.2);
    background: white;
}

.nav__search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.filter-dropdown {
    position: relative;
    min-width: 200px;
}

.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    appearance: none;
    background: #f8fafc;
    cursor: pointer;
    padding-right: 2.5rem;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #00BCD4;
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.2);
    background: white;
}

.filter-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #64748b;
}

.blogs-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    padding: 15px;
    text-align: center;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 8px;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card h3 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1.25rem;
}

.blog-card p {
    color: #64748b;
    margin: 0.5rem 0;
    line-height: 1.6;
}

.blog-card a {
  color: white;
  background-color: #000;
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 0.85em;
  text-decoration: none;
}

.blog-card .blog-date {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.blog-card .read-more {
    display: inline-block;
    color: #00BCD4;
    font-weight: 600;
    text-decoration: none;
    margin-top: 1rem;
}

.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 188, 212, 0.2);
    border-radius: 50%;
    border-top-color: #00BCD4;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

@media (max-width: 768px) {
    .blog-search-container {
        flex-direction: column;
    }
    
    .nav__search, .filter-dropdown {
        width: 100%;
        max-width: 100%;
    }
}


/*=============== BLOG DETAILS ===============*/
/* blog_details.css - Blog Details Page Styles */

.blog-details-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 70px auto;
}

.blog-details-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 3rem;
    position: relative;
    min-height: 300px;
}

.blog-header-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.blog-content {
    padding: 2rem;
}

.blog-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.blog-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    color: #64748b;
    font-size: 0.9rem;
}

.blog-date, .blog-author, .blog-category {
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
}

.blog-date i, .blog-author i, .blog-category i {
    margin-right: 0.5rem;
    color: #00BCD4;
}

.blog-text {
    line-height: 1.8;
    color: #334155;
    font-size: 1.1rem;
}

.blog-text p {
    margin-bottom: 1.5rem;
}

.blog-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.related-posts {
    margin-top: 3rem;
}

.related-posts h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #1e293b;
    position: relative;
    padding-bottom: 0.5rem;
}

.related-posts h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #00BCD4;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-5px);
}

.related-post-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.related-post-content {
    padding: 1.25rem;
}

.related-post-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.related-post-excerpt {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-btn {
    display: inline-block;
    color: #00BCD4;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 188, 212, 0.2);
    border-radius: 50%;
    border-top-color: #00BCD4;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: #ef4444;
}

@media (max-width: 768px) {
    .blog-header-image {
        height: 250px;
    }
    
    .blog-content {
        padding: 1.5rem;
    }
    
    .blog-title {
        font-size: 1.5rem;
    }
    
    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .blog-date, .blog-author, .blog-category {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .blog-details-section {
        padding: 0.75rem;
    }
}
