
/* ── Blog page top-level layout ─────────────────────────────────────────── */
.blog-main {
    padding-top: 80px; /* offset for fixed navbar */
}

/* Gap between the quote hero and the search bar */
.blog-quote-hero {
    margin-bottom: 24px;
}

/* Search bar row */
.blog-search {
    padding: 20px;
    display: flex;
    justify-content: center;
}
.blog-search-inner { 
    width: 100%; 
    max-width: 1160px; 
    display: flex; 
    gap: 22px; 
    align-items: center; 
}
.blog-search-inner input[type="search"],
.blog-search-inner select {
    box-sizing: border-box;
    height: 48px;
    padding: 0 16px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: #012c39;
    color: var(--yellow-100);
    outline: none;
    font-size: var(--fs-sm);
    font-family: inherit;
    font-weight: 100;
    line-height: normal;
    -webkit-appearance: none;
    appearance: none;
}
.blog-search-inner input[type="search"] {
    flex: 1;
    min-width: 0;
}
.blog-search-inner input[type="search"]::placeholder {
    color: var(--yellow-50);
    opacity: 0.7;
    font-weight: 100;
}
.blog-search-inner input[type="search"]:focus,
.blog-search-inner select:focus {
    border-color: var(--primary-orange-500);
    box-shadow: 0 0 0 2px rgba(255, 186, 66, 0.2);
}
.blog-search-inner select {
    min-width: 220px;
    cursor: pointer;
    /* Custom dropdown arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23d4af35' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.blog-grid { 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: clamp(12px, 3vw, 20px); 
    display: grid; 
    grid-template-columns: repeat(5, minmax(0, 1fr)); 
    gap: clamp(14px, 2.5vw, 20px); 
}
.blog-card { 
    background: #ffffff; 
    color: #012c39; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.06); 
    transition: all 0.3s ease;
    cursor: pointer;
}
.blog-card:hover {
    box-shadow: 0 16px 40px rgba(0,0,0,0.18), 0 8px 20px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}
.blog-card-link { 
    display: flex;
    flex-direction: column;
    color: inherit; 
    text-decoration: none;
    height: 100%;
}
.blog-card-image-wrapper {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
}
.blog-card-image { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
    transition: transform 0.4s ease;
}
.blog-card:hover .blog-card-image {
    transform: scale(1.08);
}
.blog-card-body { 
    padding: 12px 14px; 
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}
.blog-card-title { 
    font-size: 0.78rem; 
    font-weight: 700;
    color: #c4900a; 
    text-transform: uppercase; 
    letter-spacing: 1.5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-subtitle { 
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--dark-blue-800);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.blog-card-meta { 
    display: flex; 
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.67rem; 
    font-weight: 400;
    color: var(--dark-green-400);
    line-height: 1.3;
}
.blog-card-excerpt { 
    font-size: 0.72rem;
    font-weight: 300;
    color: #012c39;
    line-height: 1.5;
    margin-top: auto;
    padding-top: 4px;
}

@media (max-width: 1200px) { 
    .blog-grid { 
        grid-template-columns: repeat(4, minmax(0, 1fr)); 
        gap: 18px;
    } 
}

@media (max-width: 1000px) { 
    .blog-grid { 
        grid-template-columns: repeat(3, minmax(0, 1fr)); 
        gap: 16px;
    } 
}

@media (max-width: 700px) { 
    .blog-grid { 
        grid-template-columns: 1fr; /* Changed to 1 column for mobile devices */
        gap: 16px;
        padding: 16px;
    } 
}

@media (max-width: 650px) { 
    .blog-grid { 
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    } 
    
    .blog-card-image-wrapper { 
        height: 240px;
    }
    
    /* Responsive blog search */
    .blog-search { 
        padding: 15px; 
    }
    
    .blog-search-inner { 
        flex-direction: column; 
        gap: 12px; 
    }
    
    .blog-search-inner input[type="search"] {
        width: 100%;
        height: 48px;
        min-height: 48px;
        max-height: 48px;
    }
    
    .blog-search-inner select {
        width: 100%;
        min-width: unset;
        height: 48px;
        min-height: 48px;
        max-height: 48px;
        line-height: 48px;
        padding-top: 0;
        padding-bottom: 0;
        display: block;
    }
}

.blog-grid-actions { 
    max-width: 1200px; 
    margin: 2rem auto 2rem; 
    padding: 0 20px; 
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.show-more-btn { 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--green-300); 
    color: #012c39; 
    border: none;
    border-radius: 8px; 
    padding: 14px 28px; 
    font-size: clamp(0.85rem, 1.6vw, 0.95rem); 
    font-weight: 600;
    cursor: pointer; 
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.show-more-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--primary-dark-blue-500), var(--primary-green-500));
    border: 0.5px solid var(--primary-orange-500);
    border-radius: 8px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease;
    opacity: 0;
    z-index: 0;
}

.show-more-btn::after {
    content: attr(data-label);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-orange-500);
    font-weight: 700;
    font-size: inherit;
    line-height: 1;
    opacity: 0;
    white-space: nowrap;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.4s ease;
}

.show-more-btn:hover::before { 
    transform: scaleX(1.5); 
    opacity: 1; 
}
.show-more-btn:hover { 
    color: transparent; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.2); 
}
.show-more-btn:hover::after { 
    opacity: 1; 
}


/* Blog: No results message */
.blog-no-results { 
    max-width: 1200px; 
    margin: 0 auto 28px; 
    padding: 0 20px; 
}
.blog-no-results .no-results-box {
    border-top: 1px solid rgba(255,255,255,0.22);
    padding-top: 14px;
    color: var(--yellow-100);
    text-align: center;
}
.blog-no-results .no-results-text {
    display: inline-block;
    font-size: var(--fs-sm);
    letter-spacing: 0.3px;
    font-weight: 100;
}
.blog-no-results .no-results-text::before,
.blog-no-results .no-results-text::after {
    content: ' ✦ ';
    opacity: 0.6;
}


@media (max-width: 980px) {
    .contact-grid { grid-template-columns: 1fr; }
    .contact-hero-v2 { height: 220px; }
}

@media (max-width: 980px) { .post-main { grid-template-columns: 1fr; } }

/* Medium Mobile - Blog Page */
@media (max-width: 600px) {
    .blog-quote-hero {
        margin-bottom: 18px;
    }
    .blog-search {
        padding: 16px;
    }
    .blog-grid {
        grid-template-columns: 1fr; /* Changed to 1 column for mobile */
        gap: 16px;
        padding: 16px;
    }
}

/* Small Mobile - Blog Page */
@media (max-width: 480px) {
    .blog-card-title {
        font-size: var(--fs-sm);
    }
    .blog-card-excerpt {
        font-size: var(--fs-xs);
    }
    .blog-search-inner {
        gap: 10px;
    }
}

/* Extra Small Mobile - Blog Page */
@media (max-width: 375px) {
    .blog-hero {
        min-height: 280px;
    }
    
    .blog-title {
        font-size: var(--fs-lg);
    }
    
    .blog-card {
        padding: 12px;
    }
    
    .blog-card-title {
        font-size: var(--fs-base);
    }
}

/* Large Desktop - Blog Page */
@media (min-width: 1920px) {
    .blog-hero {
        height: 500px;
    }
    
    .blog-container {
        max-width: 1600px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 28px;
    }
}
