/* Inherit theme from main stylesheet */
@import url('styles.css');

/* Blog Page Specific Styles */

.blog-page {
    padding-top: 80px; /* Adjust for fixed header */
}

.blog-hero {
    position: relative;
    color: var(--light-text);
    padding: 120px 0;
    text-align: center;
    background-image: url('https://images.unsplash.com/photo-1416339158484-9637228cc908?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.blog-hero .container {
    position: relative;
    z-index: 2;
}

.hero-text-box {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 15px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.blog-hero p {
    font-size: 1.2rem;
    color: var(--light-color);
    max-width: 600px;
    margin: 0 auto;
}

.blog-listing {
    padding: 80px 0;
    background-color: #ffffff;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.blog-card {
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 28px rgba(0,0,0,.12),
                0 8px 24px rgba(0,0,0,.10);
}

.blog-card-image {
    height: 320px; /* Increased from 220px for better image visibility */
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-category {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: rgba(245, 32, 8, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    align-self: flex-start;
}

.blog-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 12px;
    line-height: 1.3;
}

.blog-card-excerpt {
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    align-self: flex-start;
}

.read-more:hover {
    text-decoration: underline;
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 800px;
    height: 85vh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2.5rem;
    font-weight: bold;
    color: #222;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-scroll-content {
    height: 100%;
    overflow-y: auto;
    padding: 40px;
    padding-top: 60px; /* Space for close button */
}

.modal-scroll-content img#modal-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 30px;
}

.modal-scroll-content h2#modal-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.modal-scroll-content #modal-body p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 20px;
}

/* Custom Scrollbar */
.modal-scroll-content::-webkit-scrollbar {
    width: 8px;
}

.modal-scroll-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-scroll-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.modal-scroll-content::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Prevent body from scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}