/* BLOG PAGE */
.blog-main {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* Image Hero Banner */
.blogs-hero-banner {
    position: relative;
    padding: 8rem 1.5rem 6rem;
    text-align: center;
    background-image: url('../../images/banners/banner-blogs.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin-top: -6rem; /* adjust for main padding */
    margin-bottom: 4rem;
    min-height: 65vh; /* reasonable height for mobile */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.blogs-hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 31, 63, 0.65), rgba(0, 31, 63, 0.85));
    z-index: 1;
}

.blogs-hero-content {
    position: relative;
    z-index: 2;
    max-width: 56rem;
    margin: 0 auto;
}

.blogs-hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-family: "Manrope", sans-serif;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.blogs-hero-title .highlight {
    color: #f28c1b;
}

.blogs-hero-desc {
    font-size: 1.125rem;
    color: #e8f0ff;
    font-weight: 400;
    line-height: 1.625;
}

.blogs-hero-divider {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.blogs-hero-divider .divider-line {
    width: 4rem;
    height: 0.25rem;
    background-color: #b2fef6;
    border-radius: 9999px;
}

/* Standardized Section Headers (Matched to Home Page "Excellence in Care") */
.section-header-block {
    text-align: center;
    max-width: 48rem;
    margin: 0 auto 3.5rem;
}

.section-header-subtitle {
    color: #f28c1b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.5rem;
}

.section-header-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0a1f44;
    font-family: "Manrope", sans-serif;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-header-title .highlight-orange {
    color: #f28c1b;
}

.section-header-desc {
    color: #43474a;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0 auto;
}



/* Filters */
.blog-filters-section {
    padding: 0 1.5rem;
    max-width: 80rem;
    margin: 0 auto;
    margin-bottom: 3rem;
}

.blog-filters-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: none; /* Firefox */
}

.blog-filters-container::-webkit-scrollbar {
    display: none; /* Chrome */
}

.filter-chip {
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    background-color: #ffffff;
    border: 1px solid rgba(195, 199, 203, 0.2);
    color: #43474a;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: pointer;
    font-size: 0.875rem;
}

.filter-chip:hover {
    background-color: #e8f0ff;
    color: #0061a4;
}

.filter-chip.active {
    background-color: #0061a4;
    color: #ffffff;
    border-color: #0061a4;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 97, 164, 0.2);
}

/* Grid */
.blog-grid-section {
    padding: 0 1rem;
    width: 100%;
    margin: 0 auto;
    margin-bottom: 5rem;
}

@media (min-width: 1024px) {
    .blog-grid-section {
        width: 90%;
        max-width: 80rem;
        padding: 0 1.5rem;
    }
}

.blog-grid {
    display: grid;
    gap: 2rem;
}





.blog-post-card {
    background-color: #ffffff;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.02);
    transition: all 0.3s;
    cursor: pointer;
}

.blog-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0px 20px 40px rgba(0, 97, 164, 0.08);
}

.post-image-wrapper {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
}

.post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.blog-post-card:hover .post-img {
    transform: scale(1.1);
}

.post-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: #136964;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: -0.025em;
}

.primary-badge {
    color: #0061a4;
}

.post-content {
    padding: 2rem;
}

.post-title {
    font-family: "Manrope", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #191c1e;
    margin-bottom: 1rem;
    line-height: 1.375;
    transition: color 0.2s;
}

.blog-post-card:hover .post-title {
    color: #0061a4;
}

.post-excerpt {
    color: #43474a;
    font-size: 0.875rem;
    line-height: 1.625;
    margin-bottom: 1.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f2f4f6;
    padding-top: 1rem;
}

.post-date {
    font-size: 0.75rem;
    color: #73787b;
    font-weight: 500;
}

.btn-read-more {
    color: #0061a4;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
}

.icon-arrow {
    font-size: 0.875rem;
    transition: transform 0.2s;
}

.blog-post-card:hover .icon-arrow {
    transform: translateX(4px);
}

/* Featured Section */
.blog-featured-section {
    padding: 0 1.5rem;
    max-width: 80rem;
    margin: 0 auto;
    margin-bottom: 5rem;
}

.featured-card {
    display: grid;
    background-color: rgba(178, 254, 246, 0.3);
    border-radius: 3rem;
    overflow: hidden;
    align-items: center;
}



.featured-content {
    padding: 2.5rem;
}





.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background-color: rgba(19, 105, 100, 0.1);
    color: #136964;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.featured-title {
    font-family: "Manrope", sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #00504b;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}


.featured-title-highlight {
    color: #136964;
}
.featured-icon-sm {
    font-size: 0.875rem;
}

.featured-desc {
    color: #3e4a41;
    font-size: 1.125rem;
    line-height: 1.625;
    margin-bottom: 2rem;
    max-width: 42rem;
}

.featured-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-featured-primary {
    padding: 1rem 2rem;
    background-color: #136964;
    color: #ffffff;
    font-weight: 700;
    border-radius: 9999px;
    box-shadow: 0 20px 25px -5px rgba(19, 105, 100, 0.2);
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-featured-primary:hover {
    transform: scale(1.02);
}
.btn-featured-primary:active {
    transform: scale(0.95);
}

.btn-featured-secondary {
    padding: 1rem 2rem;
    background-color: transparent;
    border: 2px solid rgba(19, 105, 100, 0.2);
    color: #136964;
    font-weight: 700;
    border-radius: 9999px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-featured-secondary:hover {
    background-color: rgba(19, 105, 100, 0.05);
}

.featured-image-col {
    position: relative;
    height: 100%;
    min-height: 400px;
    width: 100%;
}

.featured-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-img-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(178, 254, 246, 0.3),
        transparent
    );
}



/* Subscribe Section */
.blog-subscribe-section {
    padding: 0 1.5rem;
    max-width: 80rem;
    margin: 0 auto;
}

.subscribe-card {
    position: relative;
    background-color: #e8f0ff;
    border-radius: 3rem;
    padding: 2.5rem 1.5rem;
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}



.subscribe-blob-tr {
    position: absolute;
    top: -2.5rem;
    right: -2.5rem;
    width: 16rem;
    height: 16rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    filter: blur(3rem);
}

.subscribe-blob-bl {
    position: absolute;
    bottom: -2.5rem;
    left: -2.5rem;
    width: 16rem;
    height: 16rem;
    background-color: rgba(0, 97, 164, 0.1);
    border-radius: 9999px;
    filter: blur(3rem);
}

.subscribe-title {
    font-family: 'Manrope', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #00497d;
    margin-bottom: 1rem;
    position: relative;
    z-index: 10;
}



.subscribe-desc {
    color: rgba(0, 73, 125, 0.7);
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    max-width: 36rem;
    position: relative;
    z-index: 10;
}

.subscribe-form {
    width: 100%;
    max-width: 32rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 10;
}



.subscribe-input {
    flex-grow: 1;
    padding: 1rem 2rem;
    border-radius: 9999px;
    background-color: #ffffff;
    border: none;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.subscribe-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #0061a4;
}

.btn-subscribe {
    padding: 1rem 2rem;
    background-color: #0061a4;
    color: #ffffff;
    font-weight: 700;
    border-radius: 9999px;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0, 97, 164, 0.3);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-subscribe:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 97, 164, 0.3);
    transform: translateY(-2px);
}

.subscribe-disclaimer {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: rgba(0, 73, 125, 0.5);
    font-weight: 500;
    position: relative;
    z-index: 10;
}

/* Responsive Settings */

/* Responsive Settings */
@media (min-width: 640px) {
    .subscribe-form { 
        flex-direction: row; 
    }
}

@media (min-width: 768px) {
    /* Image Hero Banner */
    .blogs-hero-banner {
        padding: 4rem 3rem 4rem;
        min-height: 100vh;
    }
    .blogs-hero-title {
        font-size: 4.5rem;
    }
    .blogs-hero-desc {
        font-size: 1.5rem;
    }
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .featured-content {
        padding: 4rem;
    }
    .featured-title {
        font-size: 3rem;
    }
    .subscribe-card { 
        padding: 5rem 2.5rem; 
    }
    .subscribe-title { 
        font-size: 2.25rem; 
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .featured-card {
        grid-template-columns: 7fr 5fr;
    }
    .featured-content {
        padding: 5rem;
    }
    .featured-img-overlay {
        display: block;
    }
}

/* Blog Modal Styles */
.blog-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.blog-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 31, 68, 0.75); /* Darker overlay for better focus */
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease;
}

.modal-container {
    background: #ffffff;
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 1.5rem;
    position: relative;
    z-index: 10;
    overflow: hidden;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.4);
    animation: modalSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; /* Allow inner fixed elements */
    flex-direction: column;
}

.modal-body {
    flex: 1;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .modal-container {
        height: 600px;
    }
}


/* Remove desktop padding increase as layout handles it */
@media (min-width: 768px) {
    .modal-container {
        padding: 0;
    }
}

.modal-container::-webkit-scrollbar {
    width: 6px;
}

.modal-container::-webkit-scrollbar-thumb {
    background-color: #e1e7ec;
    border-radius: 9999px;
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ffffff;
    border: 1px solid #e1e7ec;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #43474a;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.modal-close span {
    font-size: 20px;
}

.modal-close:hover { 
    background: #0a1f44; 
    color: #ffffff;
    transform: rotate(180deg);
    border-color: #0a1f44;
}

.modal-body h2 {
    font-family: "Manrope", sans-serif;
    line-height: 1.2;
}

.modal-body p {
    margin-bottom: 2rem;
}

.hidden-full-content {
    display: none;
}

/* Modal Layout Enhancements */
#modalLayout {
    display: flex;
    height: 100%;
    width: 100%;
}

.modal-img-container {
    flex: 1;
    max-width: 40%;
    background: #0a1f44;
    overflow: hidden;
    display: block;
}

.modal-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-content-container {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    background: #fff;
    position: relative;
}

.modal-text-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem 3rem;
    scrollbar-width: thin;
    scrollbar-color: #f28c1b transparent;
}

.modal-header-wrapper {
    display: flex;
    flex-direction: column;
    align-items: start;
}

.header-accent {
    width: 3.5rem;
    height: 4px;
    background: linear-gradient(90deg, #f28c1b, #ffa94d);
    border-radius: 2px;
    margin-bottom: 1.5rem;
}

.modal-text-scroll h2 {
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    color: #0a1f44;
    margin-bottom: 1.25rem;
    font-weight: 800;
    font-family: 'Manrope', sans-serif;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.modal-body-text {
    color: #43474a;
    line-height: 1.75;
    font-size: 1.125rem;
    font-family: 'Inter', sans-serif;
}

.modal-body-p {
    margin-bottom: 0.6rem;
}

/* Modal Footer */
.modal-footer {
    padding: 0.75rem 2rem;
    border-top: 1px solid #f2f4f6;
    background: #fafbfc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.modal-footer p {
    color: #6c757d;
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.2;
}

.support-highlight {
    color: #136964;
    font-weight: 700;
}

.btn-modal-help {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    border-radius: 9999px;
    text-decoration: none;
}

.btn-modal-help span {
    font-size: 1rem;
}

/* Responsive Modal Overrides (Mobile-First Ergonomics) */
@media (max-width: 1023px) {
    .modal-container {
        width: 90% !important;
        height: 560px !important;
        max-height: 85vh !important;
        border-radius: 1.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }
    
    #modalLayout {
        flex-direction: column !important;
        height: 100% !important;
    }

    .modal-img-container {
        max-width: 100% !important;
        height: 180px !important;
        min-height: 180px !important;
        flex-shrink: 0 !important;
        flex: none !important;
    }

    .modal-content-container {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
    }

    .modal-text-scroll {
        padding: 1.25rem 1rem !important;
        flex: 1 !important;
        overflow-y: auto !important;
    }

    .modal-text-scroll h2 {
        font-size: 1.4rem !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.1 !important;
    }

    .modal-body-text {
        font-size: 0.82rem !important;
        line-height: 1.4 !important;
    }

    .modal-footer {
        padding: 0.75rem 1rem !important;
        flex-shrink: 0 !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 0.5rem !important;
    }

    .modal-footer p {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
    }

    .btn-modal-help {
        padding: 8px 14px !important;
        font-size: 0.75rem !important;
        white-space: nowrap !important;
    }
}
