/**
 *  CSS for Archive - Cross-Platform Optimized
 */

:root {
	--primary-color-am: #fff; /* white color not primary color */
	--secondary-color-am: #203a60;
  	--text-color-am: #203a60;
	--tertiary-color-am: #5183e0; /*#2A65D3;*/
	--green-color-am: #46b5b5; /*#30d1b6;*/
  	
  	--grey-color-am: #fbfaf9;
	--grey-color-am-200: #f2f2f2; 
	--grey-color-am-300: #e5e5e5;
	
	--secondary-color-am-5: #203a600D;
	--secondary-color-am-10: #203a601A; /* #12377a1A  #f5f8ff*/
	--secondary-color-am-20: #bed3fa; /* #c7dff2 */
	--secondary-color-am-80: #1a4ead; /* #12377aCC */
  	--secondary-color-am-60: #5183e0; /* #12377a99 */

	--tertiary-color-am-60: #2a65d399;
  	--tertiary-color-am-50: #f9fbff;
	--tertiary-color-am-100: #f5f8ff;
  	--tertiary-color-am-150: #e3edfc;
	--tertiary-color-am-200: #bed3fa;
	--tertiary-color-am-300: #85a9ed;
	--tertiary-color-am-400: #5183e0;
  	--tertiary-color-am-550: #3875d6;
  	--tertiary-color-am-600: #2A65D3;/*#1a4ead;*/
	
	--green-color-am-50: #d7f2ef;
  	--green-color-am-100: #afe0dc;
  	--green-color-am-200: #88d3cf;
  	--green-color-am-300: #66ccca;
	--green-color-am-400: #6dccca;
  	--green-color-am-600: #38a09d;/*#26bc9f;*/
  
	--border-radius: 12px;
}

/* Container Styles */
.news-insights-container {
    padding: 0;
    background-color: #fff;
}

/* removing page-wrapper padding */
.blog-wrapper.blog-archive.page-wrapper {
  padding-bottom: 0px;
}

/* Category Filter */
.news-category-filter {
  border-bottom: 1px #203a6024 solid;
  padding: 30px 0px;
  margin-bottom: 40px;
}

.news-category-filter .row {
  justify-content: center;
  padding-right: 10px;
  padding-left: 10px;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.cat-button {
    display: inline-block;
    padding: 8px 25px;
    background-color: #f5f8ff; /* fallback */
    background-color: var(--tertiary-color-am-100);
    border-radius: 20px;
    color: #203a60; /* fallback */
    color: var(--secondary-color-am);
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 13px;
    font-weight: 500;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: background-color, color;
    contain: layout style;
}

.cat-button:hover {
    background-color: #5183e0; /* fallback */
    background-color: var(--tertiary-color-am);
    color: #fff; /* fallback */
    color: var(--primary-color-am);
}

.cat-button.active {
    background-color: #5183e0; /* fallback */
    background-color: var(--tertiary-color-am);
    color: #fff; /* fallback */
    color: var(--primary-color-am);
}

/* Section Titles */
.section-title {
    font-weight: 600;
    color: #203a60; /* fallback */
    color: var(--secondary-color-am);
    margin-bottom: 25px;
    position: relative;
}

/* Article Cards - Cross-Platform Shadow Optimization */
.article-card {
    background-color: white;
    border-radius: 8px;
    /* Base shadow for Mac/Safari browsers */
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: none;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
    contain: layout style;
}

/* Windows/Edge/Firefox fallback for better shadow visibility */
@supports not (-webkit-backdrop-filter: blur(1px)) {
    .article-card {
        filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
        box-shadow: none;
    }
}

/* High DPI Windows support */
@media (min-resolution: 144dpi) {
    .article-card {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1.5);
    }
    
    /* Enhanced Windows fallback for high DPI */
    @supports not (-webkit-backdrop-filter: blur(1px)) {
        .article-card {
            filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1.5));
            box-shadow: none;
        }
    }
}

.article-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #25c1a3; /* fallback */
    background-color: var(--green-color-am);
    color: #fff; /* fallback */
    color: var(--primary-color-am);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 500;
    z-index: 2;
    text-transform: capitalize;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.article-thumbnail {
    height: 220px;
    overflow: hidden;
    background-color: #f0f0f0; /* fallback */
    background-color: var(--grey-color-am-200);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
}

.article-card:hover .article-thumbnail img {
    transform: scale(1.05) translateZ(0);
  	transition: transform 0.4s ease;
}

.placeholder-image {
    background-color: #f0f0f0; /* fallback */
    background-color: var(--grey-color-am-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-image:before {
    content: "\f1c4";
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
    font-size: 28px;
    color: #fbfaf9; /* fallback */
    color: var(--grey-color-am);
}

.article-date {
  	padding-top: 10px;
  	margin: 10px 20px; 
    font-size: .8rem;
    color: #203a60; /* fallback */
    color: var(--secondary-color-am);
  	opacity: .8;
    display: flex;
    align-items: center;
}

.article-date .material-symbols-rounded.calendar-today {
    font-size: .9rem;
    color: #203a60; /* fallback */
    color: var(--text-color-am-80, var(--secondary-color-am));
    vertical-align: middle;
    margin-right: 5px;
    position: relative;
    top: -1px;
    background: none;
    width: 1rem;
    height: auto;
}

.article-title {
  	padding: 0px 20px; 
    line-height: 1.4;
    font-weight: 600;
}

.article-title a {
  	font-size: clamp(1rem, 1.1rem + 0.2vw, 1.5rem);
    color: #203a60; /* fallback */
    color: var(--text-color-am);
    text-decoration: none;
    transition: color 0.4s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: color;
}

.article-title a:hover {
    color: #5183e0; /* fallback */
    color: var(--tertiary-color-am);
}

.article-excerpt {
    padding-left: 20px; 
  	padding-right: 20px;
  	padding-bottom: 10px;
    color: #203a60; /* fallback */
    color: var(--text-color-am-80, var(--secondary-color-am));
    line-height: 1.5;
    flex-grow: 1;
}

.read-more-link {
    display: inline-block;
  	padding-left: 20px;
  	padding-right: 20px;
  	padding-bottom: 20px;
    color: #5183e0; /* fallback */
    color: var(--tertiary-color-am);
    font-weight: 900;
    text-decoration: none;
    transition: all 0.3s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: color;
}

.read-more-link:hover {
    color: #5183e0; /* fallback */
    color: var(--tertiary-color-am);
    text-decoration: none;
}

.read-more-link .icon-angle-right {
    margin: 3px !important;
    transition: transform 0.3s ease;
    font-size: 16px;
  	font-weight: 900;
  	transform: translate(0px, 2px) translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
}

.read-more-link:hover .icon-angle-right {
    transform: translate(3px, 2px) translateZ(0);
}

/* Featured Articles Section */
.featured-articles-section .article-card {
    height: calc(100% - 30px);
}

/* All Articles Section */
.all-articles-section {
  background-color: #fff; /* fallback */
  background-color: var(--primary-color-am);
  padding-bottom: 15px;
  background-attachment: scroll;
  background-size: 100% 100%;
}

.all-articles-section .container {
  margin-top: 30px;
  margin-bottom: 30px;
}

.all-articles-section .article-thumbnail {
    height: 220px;
}

/* Pagination - Cross-Platform Shadow Optimization */
.pagination-wrapper {
    margin-top: 20px;
    text-align: center;
}

.pagination-wrapper .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border-radius: 3px;
    background-color: #f5f8ff; /* fallback */
    background-color: var(--tertiary-color-am-100);
    color: #203a60; /* fallback */
    color: var(--secondary-color-am);
    text-decoration: none;
    transition: all 0.3s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: background-color, color;
}

.pagination-wrapper .page-numbers.current {
    background-color: #5183e0; /* fallback */
    background-color: var(--tertiary-color-am);
    color: #fff; /* fallback */
    color: var(--primary-color-am);
}

.pagination-wrapper .page-numbers:hover:not(.current) {
    background-color: #e0e0e0;
}

.no-posts-message {
    text-align: center;
    font-size: 16px;
    color: #203a60; /* fallback */
    color: var(--secondary-color-am);
  	opacity: .8;
    padding: 30px 0;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  #all-articles-container {
  gap: 30px;
}
}

@media (max-width: 767px) {
    .featured-articles-section .article-thumbnail,
    .all-articles-section .article-thumbnail {
        height: 160px;
    }
}

@media (max-width: 575px) {
    .cat-button {
        font-size: 12px;
    }
    
    .article-title {
        font-size: 15px;
    }
}

/* Fix for Flatsome theme specific conflicts */
.blog-wrapper {
    padding-top: 0 !important;
}

.news-insights-container .row .col {
    padding-bottom: 0;
}

/* Ensure section titles align with Flatsome structure */
h2.section-title.section-title {
    text-transform: none;
    letter-spacing: 0;
    font-family: inherit;
    line-height: 1.3;
}

/* Loading Spinner - Cross-Platform Shadow Optimization */
.spinner {
    margin: 30px auto;
    width: 70px;
    text-align: center;
    transform: translateZ(0);
    backface-visibility: hidden;
    contain: layout style;
}

.spinner > div {
    width: 18px;
    height: 18px;
    background-color: #1565c0;
    border-radius: 100%;
    display: inline-block;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
}

.spinner .bounce1 {
    animation-delay: -0.32s;
}

.spinner .bounce2 {
    animation-delay: -0.16s;
}

@keyframes sk-bouncedelay {
    0%, 80%, 100% { 
        transform: scale(0) translateZ(0);
    } 40% { 
        transform: scale(1.0) translateZ(0);
    }
}

/* Loading Overlay - Cross-Platform Backdrop Optimization */
#loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Base backdrop blur for Mac/Safari */
    backdrop-filter: blur(0.5px);
    -webkit-backdrop-filter: blur(0.5px);
    transform: translateZ(0);
    backface-visibility: hidden;
    contain: layout style;
}

/* Windows/Edge/Firefox fallback for better overlay visibility */
@supports not (-webkit-backdrop-filter: blur(1px)) {
    #loading-spinner {
        background-color: rgba(255, 255, 255, 0.85);
        backdrop-filter: none;
    }
}

/* High DPI Windows support for loading spinner */
@media (min-resolution: 144dpi) {
    #loading-spinner {
        background-color: rgba(255, 255, 255, 0.8);
    }
    
    /* Enhanced Windows fallback for high DPI */
    @supports not (-webkit-backdrop-filter: blur(1px)) {
        #loading-spinner {
            background-color: rgba(255, 255, 255, 0.9);
        }
    }
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}