/* BLOGS PAGE CSS */

/* Background */
.blogs-bg {
    background: #000 !important;
    background-image: linear-gradient(rgba(255, 255, 255, 0.1) .6px, transparent 0.6px), linear-gradient(90deg, rgba(255, 255, 255, 0.1) .6px, transparent .6px) !important;
    background-size: 160px 160px !important;
    background-position: 0 0, 0 0 !important;
    background-repeat: repeat !important;
    min-height: 100vh !important;
    position: relative !important;
}

/* Blog Tabs Section */
.blog-tabs-section {
    position: relative;
    z-index: 2;
    padding: 10rem 3rem;
}

.tab-navigation {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
    position: relative;
}

.tab-navigation::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 80px;
    right: 80px;
    height: 1px;
    background: #666666;
    border-radius: 1px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #949090;
    padding: .5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.tab-btn:hover {
    color: #16D3CA;
}

.tab-btn.active {
    color: #16D3CA;
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, #16D3CA 0%, #1AB3C5 50%, #0FA3B8 100%);
    border-radius: 1px;
    z-index: 2;
}

.tab-content {
    position: relative;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.blog-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 0 1rem;
}

.blog-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 680px;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: rgba(22, 211, 202, 0.3);
    box-shadow: 0 10px 30px rgba(22, 211, 202, 0.1);
}

.blog-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    justify-content: space-between;
    align-items: flex-start;
}

.blog-content-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
    min-height: 21rem;
    padding-bottom: 1rem;
    gap: 0;
    position: relative;
}

.blog-card-link, .blog-card-link-mobile {
    text-decoration: none !important;
}

.author {
    font-size: .9rem;
    color: #949090;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    min-height: 1.2rem;
    max-height: 1.2rem;
    justify-content: flex-start;
    flex-shrink: 0;
}

.blog-author {
    flex-shrink: 0;
    min-width: fit-content;
}

.blog-author::after {
    content: "•";
    color: #949090;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.blog-title {
    color: #16D3CA;
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 30px;
    font-family: 'Montserrat', sans-serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin-bottom: 0.75rem;
    min-height: 10.5rem;
    max-height: 10.5rem;
    overflow: hidden;
}

/* Alternate blog title colors */
.blog-card:nth-child(odd) .blog-title {
    color: #2BD7BD;
}

.blog-card:nth-child(even) .blog-title {
    color: #1AB3C5;
}

.blog-excerpt {
    color: #cccccc;
    font-size: 1rem;
    line-height: 30px;
    min-height: 5.625rem;
    margin-top: 0;
    margin-bottom: 0;
    flex-shrink: 0;
    position: absolute;
    top: 12rem;
    left: 0;
    right: 0;
}

.blog-read-more {
    color: #cccccc;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    position: absolute;
    top: 22rem;
    left: 0;
    right: 0;
}

.blog-read-more a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-read-more:hover {
    color: #1AB3C5;
}

.blog-read-more img, .related-card .read-more img {
    transition: transform 0.3s ease;
    object-fit: contain;
    display: block;
}

.blog-read-more:hover img {
    transform: translateX(4px);
}

.blog-read-time {
    font-weight: 400;
}

/* Subscribe Section */
.bottom h2 {
    font-weight: 700;
    font-size: 1.875rem;
    line-height: 40px;
}

@media (max-width: 1400px) {
    .blog-card {
        height: 700px;
    }

    .blog-excerpt {
        line-height: 25px;
        top: 13rem;
    }

    .blog-read-more {
        top: 23.5rem;
    }
}

@media (max-width: 1300px) {
    .blog-card {
        height: 600px;
    }

    .blog-read-more {
        top: 17rem;
    }

    .blog-title {
        font-size: 1.125rem;
        line-height: 25px;
    }

    .blog-excerpt {
        top: 10rem;
        font-size: .8rem;
        line-height: 18px;
    }
}

/* Mobile Responsiveness for Blog Tabs */
@media (max-width: 1200px) {
    .blog-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .blog-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-tabs-section-mobile {
        margin-top: -15rem;
    }

    .tab-navigation {
        gap: 0.5rem;
        margin-bottom: 2rem;
    }

    .tab-content {
        padding: 2rem 1.5rem 10rem;
    }

    .tab-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .blog-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    .blog-title {
        font-size: 1.1rem;
    }

    .blog-excerpt {
        font-size: 0.85rem;
    }

    /* Mobile Blog Cards Grid - 1 column */
    .blog-cards-grid-mobile {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 1rem;
        padding: 0 0.5rem;
        max-width: 100%;
    }

    .blog-card-mobile {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        overflow: hidden;
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        height: 100%;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .blog-card-image-mobile {
        width: 100%;
        height: 150px;
        overflow: hidden;
    }

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

    .blog-card-content-mobile {
        padding: 1rem;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        justify-content: space-between;
    }

    .author-mobile {
        font-size: 10px;
        color: #949090;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .blog-author-mobile::after {
        content: "•";
        color: #949090;
        font-size: 0.8rem;
        margin-left: 0.5rem;
    }

    .blog-title-mobile {
        color: #16D3CA;
        font-size: 20px;
        font-weight: 600;
        line-height: 25px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .blog-excerpt-mobile {
        font-size: 10px;
        line-height: 15px;
        color: #cccccc;
    }

    .blog-read-more-mobile {
        color: #ffffff;
        font-size: 10px;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

    .blog-read-more-mobile a {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

    .blog-read-more-mobile img {
        /* width: 30px;
        height: 30px; */
        max-width: 100%;
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    .tab-navigation {
        flex-direction: column;
        align-items: center;
    }

    .tab-btn {
        width: 200px;
        text-align: center;
    }

    .blog-tabs-section {
        padding: 2rem 0;
    }
}

/* Pagination Styles */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    padding: 2rem 0;
}

.blog-pagination-nav {
    display: flex;
    justify-content: center;
}

.blog-pagination {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.blog-pagination-link,
.blog-pagination-ellipsis {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #949090;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.blog-pagination-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-2px);
}

.blog-pagination-link.active {
    background: #1ab3c5;
    border-color: #1ab3c5;
    color: #000;
    font-weight: 600;
}

.blog-pagination-ellipsis {
    cursor: default;
    opacity: 0.6;
}

/* Article Page Styles */
.article-bg {
    background: #000 !important;
    background-image: linear-gradient(rgba(255, 255, 255, 0.1) .6px, transparent 0.6px), linear-gradient(90deg, rgba(255, 255, 255, 0.1) .6px, transparent .6px) !important;
    background-size: 160px 160px !important;
    background-position: 0 0, 0 0 !important;
    background-repeat: repeat !important;
    min-height: 100vh !important;
    position: relative !important;
}

.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 1rem 6rem;
}

.article-header {
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.article-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-description {
    font-size: 1.125rem;
    color: #c5c5c5;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.article-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* Content images (images within article content) */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

/* Image alignment classes for content images */
.article-content img {
    display: block;
    clear: both;
}

.article-content .content-image-left {
    margin: 1rem 0 1rem 0 !important;
    margin-right: auto !important;
    float: none;
    clear: both;
}

.article-content .content-image-center {
    display: block;
    margin: 1rem auto !important;
    float: none;
    clear: both;
}

.article-content .content-image-right {
    margin: 1rem 0 1rem 0 !important;
    margin-left: auto !important;
    float: none;
    clear: both;
}

.article-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #fff;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5 {
    font-weight: bold;
    margin: 2rem 0 1rem 0;
    /* Don't override color - let headings keep their original text color */
}

.article-content h2 {
    font-size: 2rem;
}

.article-content h3 {
    font-size: 1.75rem;
}

.article-content h4 {
    font-size: 1.5rem;
}

.article-content h5 {
    font-size: 1.25rem;
}

.article-content h6 {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    margin: 1.5rem 0 0.75rem 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4 !important;
}

/* Override any inline styles on h6 */
.article-content h6[style] {
    font-size: 0.75rem !important;
}

.article-content blockquote {
    border: none;
    margin: 3rem auto;
    max-width: 900px;
    text-align: left;
    background: transparent;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.8;
    color: #16d3ca;
    font-style: normal;
    border-radius: 0;
    position: relative;
    quotes: none;
}

/* Opening quotation mark before the first paragraph */
.article-content blockquote p:first-of-type {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

/* Opening quote - positioned absolutely before the first paragraph using transform */
.article-content blockquote.mdc-c-blockquote--is-quotes p:first-of-type::before,
.article-content blockquote p:first-of-type::before {
    content: "\201C";
    position: absolute;
    transform: translateX(-100%);
    left: -3px;
    font-size: 1.375rem;
    font-weight: 500;
    line-height: 30px;
    background-color: rgba(22, 211, 202, 0.05);
    color: #16d3ca;
    font-style: italic;
    text-align: left;
}

/* Closing quotation mark - add to the last quote paragraph */
.article-content blockquote.mdc-c-blockquote--is-quotes p:last-of-type::after,
.article-content blockquote p:only-child::after,
.article-content blockquote p:not(:last-child):last-of-type::after {
    content: "\201D";
    font-family: Montserrat;
    font-size: 1.375rem;
    font-weight: 500;
    color: #16d3ca;
    margin-left: 0.25rem;
}

/* Quote text styling - all paragraphs in blockquote */
.article-content blockquote p {
    margin: 0 0 1rem 0;
    font-weight: 500;
    color: #16d3ca;
    font-family: Montserrat;
    font-size: 1.375rem;
    line-height: 30px;
    text-align: left;
}

/* If there's only one paragraph, treat it as quote text */
.article-content blockquote p:only-child {
    font-weight: 500;
    font-size: 1.375rem;
    margin-bottom: 0;
    line-height: 30px;
}

/* Attribution styling - last paragraph if there are multiple paragraphs */
.article-content blockquote p:not(:only-child):last-child {
    font-weight: 500 !important;
    font-size: 1.375rem !important;
    color: #16d3ca;
    font-family: Montserrat;
    font-style: normal;
    margin-top: 1.5rem;
    margin-bottom: 0 !important;
    display: block;
    line-height: 30px;
}

.article-content blockquote p b {
    font-weight: 500 !important;
}

/* Handle cite and footer elements for attribution */
.article-content blockquote cite,
.article-content blockquote footer {
    font-weight: 400;
    font-size: 1.125rem;
    color: #16d3ca;
    font-family: Montserrat;
    font-style: normal;
    display: block;
    margin-top: 1.5rem;
    line-height: 30px;
    text-align: center;
}

/* Direct text content in blockquote (no child elements) */
.article-content blockquote > text {
    font-weight: 500;
    color: #16d3ca;
    font-family: Montserrat;
    font-size: 1.375rem;
    line-height: 30px;
}

.article-content p {
    margin-bottom: 1.5rem;
}

/* Links in article content */
.article-content a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: #16d3ca;
    text-underline-offset: 2px;
    transition: text-decoration-color 0.3s ease;
}

.article-content ul,
.article-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    margin-top: 1rem;
    transition: color 0.3s;
    white-space: nowrap;
}

.back-button:hover {
    color: #16d3ca;
}

.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related-posts h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.related-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.related-card .related-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

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

.related-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 200px;
}

.related-card .author {
    flex-shrink: 0;
    margin-bottom: 0.5rem;
}

.related-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #16d3ca;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.related-card p {
    font-size: 0.875rem;
    color: #cccccc;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
    flex-grow: 1;
}

.related-card .read-more {
    color: #cccccc;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.related-card .read-more:hover {
    color: #1AB3C5;
}

.related-card .read-more:hover img {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .article-container {
        padding: 1.5rem 1rem 4rem;
    }

    .article-title {
        font-size: 2rem;
    }

    .article-image {
        height: 250px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
