/* Variable */
:root {

    /* Button */
    --btn-height: 4.2rem;
    --btn-radius:.4rem;

    /* Gradient */
    --gradient-horizontal-primary: linear-gradient(to right, #ffac4e 0%,#fe4e66 100%);

}
@media(width < 768px){
    :root {

        /* Button */
        --btn-height: 3.8rem;

    }
}

/* Button */
.btn{height: var(--btn-height); border-radius: var(--btn-radius); padding: 0 2rem; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 0 .5rem; font-family: 'Gilroy-ExtraBold'; font-size: var(--fs-sm); transition: var(--transition);}
.btn.btn-md{font-size: var(--fs); height: calc(var(--btn-height) + .4rem);}
.btn.btn-lg{font-size: var(--fs); height: calc(var(--btn-height) + 1.2rem);}
.btn.btn-primary{color: white; background: var(--gradient-horizontal-primary);}
.btn.btn-o{background: none; border-width: .1rem; border-style: solid; color: #020304;}
.btn.btn-o.btn-primary{border-color:var(--primary); color: white;}
@media(width < 768px){
    .btn{padding: 0 1.5rem;}
}

/* Label Button */
.btn-label{height: 3.6rem; padding: 0 2.2rem; border-radius: 10rem; white-space: nowrap; font-size: var(--fs-sm); display: inline-flex; align-items: center; justify-content: center; border: .2rem solid #EBB1FF; background: linear-gradient(to right, #EBB1FF, #ED27BC); -webkit-background-clip: text; -webkit-text-fill-color: transparent;}
.btn-label.sm{height: 2.6rem; font-size: var(--fs-sm); padding: 0 1.5rem; border-width: .1rem;}
.btn-label.xs{height: 2.6rem; padding: 0 1.2rem; font-size: var(--fs-xs);}
@media(width < 768px){
    .btn-label{border-width: .1rem;}
}

/* Blog Post Cards - Basic styling for blog posts */
.post {
    background: rgba(0, 0, 0, 0.4) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 2rem !important;
    min-height: 460px !important;
    height: 460px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    justify-content: space-between !important;
}

.post:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.post-overlay-link {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    text-decoration: none !important;
    color: inherit !important;
    height: 100% !important;
    justify-content: space-between !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Blog Post Featured Images - In post-middle-section */
.post-featured-image {
    width: 100% !important;
    height: 100% !important;
    /*max-height: 120px !important;*/
    object-fit: contain !important;
    border-radius: 8px !important;
    margin: 0 !important;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Enhanced image display for home page cards - full image with blurred background */
/* CLS Fix: Added aspect-ratio to reserve space */
.post-middle-section {
    position: relative !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border-radius: 8px !important;
    margin: 1rem 0 !important;
    min-height: 140px !important;
    aspect-ratio: 16 / 9 !important; /* CLS Fix: Reserve space */
    height: 100% !important;
    /*overflow: hidden !important;*/
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Fallback styling for posts without images */
.post-middle-section:not(:has(img)) {
    background: linear-gradient(135deg, rgba(176, 128, 255, 0.1) 0%, rgba(233, 39, 188, 0.1) 100%) !important;
}

.post-middle-section::before {
    content: '' !important;
    position: absolute !important;
    top: -10px !important;
    left: -10px !important;
    right: -10px !important;
    bottom: -10px !important;
    background-image: inherit !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    filter: blur(25px) !important;
    opacity: 0.8 !important;
    z-index: 0 !important;
}

.post-featured-image {
    width: 100% !important;
    /*height: 140px !important;*/
    object-fit: contain !important;
    border-radius: 8px !important;
    margin: 0 !important;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
    background: rgba(0,0,0,0.1) !important;
}

.post-content {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.post-top-section {
    flex: 0 0 auto !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Removed duplicate - see line 86 for enhanced post-middle-section styles */

.post h5 {
    color: white !important;
    margin: 0 0 auto 0 !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}

.post-bottom-section {
    flex: 0 0 auto !important;
    margin-top: auto !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    position: relative !important;
    z-index: 1 !important;
}

.post p {
    color: rgba(255, 255, 255, 0.9) !important;
    line-height: 1.6 !important;
    margin: 0 0 1rem 0 !important;
    font-size: 1.1rem !important;
}

.post p.line-clamp-3 {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.post .place-date {
    margin: 0 0 1rem 0 !important;
    opacity: 0.9 !important;
}

.post .place-date p {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 1rem !important;
    margin: 0 !important;
    font-weight: 500 !important;
}

/* Blog Post Category Pills - Override for blog posts */
.post .btn-label {
    background: transparent !important;
    color: white !important;
    border: none !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: 20px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    margin-bottom: 1.5rem !important;
    display: inline-block !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
    text-shadow: none !important;
    box-shadow: none !important;
    height: auto !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Blog Category Pills - Gradient border using pseudo-element */
.post .btn-label::before {
    content: '' !important;
    position: absolute !important;
    inset: -2px !important;
    background: linear-gradient(135deg, #b080ff, #e91e63) !important;
    border-radius: 20px !important;
    z-index: -1 !important;
}

/* Blog Category Pills - Inner background to create border effect */
.post .btn-label::after {
    content: '' !important;
    position: absolute !important;
    inset: 2px !important;
    background: transparent !important;
    border-radius: 18px !important;
    z-index: -1 !important;
}

/* Blog Category Pills - Hover effects */
.post .btn-label.category-link:hover {
    transform: translateY(-1px) !important;
}

.post .btn-label.category-link:hover::before {
    background: linear-gradient(135deg, #d2a3ff, #ff4081) !important;
}

.post .btn-label.category-link:hover::after {
    background: rgba(176, 128, 255, 0.05) !important;
}

/* Burger */
.burger{position: relative; width: 3rem; height: 3rem; cursor: pointer;}
.burger::before, .burger::after{position: absolute; width: 100%; height: .1rem; content: ""; background-color: var(--primary); transition: 150ms linear;}
.burger::before{left: 50%; top: 40%; transform: translate(-50%, -50%);}
.burger::after{right: 50%; bottom:40%; transform:translate(50%, 50%);}
.burger.active::before{transform: translate(-50%, -50%) rotate(-45deg); top: 50%; background-color: var(--primary);}
.burger.active::after{transform: translate(50%, 50%) rotate(45deg); bottom:50%; background-color: var(--primary);}
header .burger{position: relative; z-index: 9999;}
.home-header .burger::before, .home-header .burger::after{background-color: var(--primary);}
@media(width > 1199px){
    .burger{display: none !important;}
}

/* Slider Controls */
.slider-control{aspect-ratio: 1; width: 5.6rem; display: grid; place-items: center; border: .5rem solid #020304;
    background: linear-gradient(to bottom, #ED27BC 0%,#9623BE 100%); border-radius: 100%; cursor: pointer;}
@media(width < 768px){
.slider-control{width: 4.4rem;border-width: .2rem;}
}

/* Read More Link */
.read-more-link{font-size: var(--fs); text-decoration: none; position: relative; background: linear-gradient(to right, var(--primary), var(--secondary)); background-clip: border-box; -webkit-background-clip: text; -webkit-text-fill-color: transparent;}
.read-more-link::after{position: absolute; left: 0; bottom: 0; width: 100%; height: .2rem; content: ""; background: linear-gradient(to right, #ffac4e 0%,#fe4e66 100%);}
.read-more-link:hover::after{display: none;}

/* Blog Post Read More Links - Override for blog posts */
.post .read-more-link,
.post .read-more-link:link,
.post .read-more-link:visited {
    color: #c7a6ff !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-color: transparent !important;
    border-bottom: 1px solid #c7a6ff !important;
    text-transform: none !important;
    letter-spacing: 0.5px !important;
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #c7a6ff !important;
    background-clip: unset !important;
    -webkit-text-decoration-color: transparent !important;
    text-underline-offset: unset !important;
    text-decoration-thickness: unset !important;
    position: relative !important;
}

.post .read-more-link::after {
    display: none !important;
}

.post .read-more-link:hover,
.post .read-more-link:active,
.post .read-more-link:focus {
    color: #9966ff !important;
    border-bottom-color: #9966ff !important;
    -webkit-text-fill-color: #9966ff !important;
    text-decoration: none !important;
    text-decoration-color: transparent !important;
}

/* Blog Post Title Links */
.post-title-link {
    text-decoration: none !important;
    color: inherit !important;
}

.post-title-link:hover h5 {
    color: #c7a6ff !important;
    transition: color 0.3s ease !important;
}

/* Blog Posts Grid Override - Reset homepage grid for blog pages */
.blog-with-sidebar .posts {
    display: grid !important;
    gap: 2rem !important;
}

@media(width > 991px) {
    .blog-with-sidebar .posts {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: auto !important;
    }
    .blog-with-sidebar .posts > :first-child,
    .blog-with-sidebar .posts > :nth-child(2),
    .blog-with-sidebar .posts > :nth-child(3),
    .blog-with-sidebar .posts > :nth-child(4),
    .blog-with-sidebar .posts > :nth-child(5),
    .blog-with-sidebar .posts > :nth-child(6),
    .blog-with-sidebar .posts > :nth-child(7),
    .blog-with-sidebar .posts > :nth-child(8),
    .blog-with-sidebar .posts > :nth-child(9),
    .blog-with-sidebar .posts > :nth-child(10),
    .blog-with-sidebar .posts > :nth-child(11),
    .blog-with-sidebar .posts > :nth-child(12) {
        grid-area: unset !important;
    }
}

@media(width < 992px) {
    .blog-with-sidebar .posts {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media(width < 641px) {
    .blog-with-sidebar .posts {
        grid-template-columns: 1fr !important;
    }
}

/* Icon List */
.icon-list li:not(:last-child){margin-bottom: 2.5rem;}
.icon-list li{display: flex; gap: 2rem;}
.icon-list li span img{max-width: 2.7rem;}

/* Blur Circle */
.blur-circle{width: 40vw; aspect-ratio: 1; border-radius: 100%; z-index: -1; pointer-events: none; filter: blur(300px); opacity: 30%;}
.blur-circle-2{width: 40vw; aspect-ratio: 1; border-radius: 100%; z-index: -1; pointer-events: none; filter: blur(300px); opacity: 30%;}
.blur-circle-3{width: 40vw; aspect-ratio: 1; border-radius: 100%; z-index: -1; pointer-events: none; filter: blur(300px); opacity: 30%;}
.blur-circle-4{width: 40vw; aspect-ratio: 1; border-radius: 100%; z-index: -1; pointer-events: none; filter: blur(300px); opacity: 30%;}
.section .blur-circle, .hero-section .blur-circle{left: 0; top: 0; transform: translateY(-50%); background: #9623BE;}
.section .blur-circle-2, .hero-section .blur-circle-2{left: 0; top: 50%; transform: translateY(-50%); background: #0A3445;}
.section .blur-circle-3, .hero-section .blur-circle-3{right: 0; bottom: 0; transform: translateY(50%); background: #0A3445;}
.section .blur-circle-4, .hero-section .blur-circle-4{right: 0; top: 50%; transform: translateY(-50%); background: #0A3445;}

/* ===============================================
   CLS (Cumulative Layout Shift) Fixes for Blog Pages
   =============================================== */

/* 1. Reserve consistent space for blog post cards */
.posts .post {
    min-height: 460px !important; /* Already set, ensuring consistency */
}

/* 2. Fixed dimensions for post titles to prevent reflow */
.posts .post h5 {
    min-height: 3.2rem !important; /* Reserve space for 2 lines */
    height: auto !important;
}

/* 3. Fixed dimensions for excerpts */
.posts .post p.line-clamp-3 {
    min-height: 4.8rem !important; /* Reserve space for 3 lines */
}

/* 4. Skeleton loading animation for lazy-loaded images */
@keyframes skeleton-loading {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.post-middle-section.loading,
.lazy-bg:not(.loaded) {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    ) !important;
    background-size: 200% 100% !important;
    animation: skeleton-loading 1.5s infinite !important;
}

/* 5. Smooth transition when images load */
.lazy-bg {
    transition: opacity 0.3s ease !important;
}

.lazy-bg.loaded {
    animation: none !important;
}

/* 6. Reserve space for featured images in blog posts */
.blog-post .post-featured-image {
    aspect-ratio: 1200 / 600 !important; /* Standard ratio */
    overflow: hidden !important;
    position: relative !important;
    background: linear-gradient(135deg, rgba(176, 128, 255, 0.1) 0%, rgba(233, 39, 188, 0.1) 100%) !important;
}

.blog-post .post-featured-image img,
.blog-post .post-featured-image picture img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* 7. Prevent font loading shifts with font-display */
.blog-post h1, .blog-post h2, .blog-post h3,
.blog-post h4, .blog-post h5, .blog-post h6,
.blog-post p, .blog-post li,
.post h5, .post p {
    font-display: swap !important;
}

/* 8. Fixed dimensions for category labels */
.post .btn-label {
    min-height: 2.6rem !important;
    display: inline-flex !important;
}

/* 9. Optimize rendering performance */
.posts .post,
.blog-post,
.post-featured-image,
.post-middle-section {
    contain: layout style paint !important;
    will-change: transform !important;
}

/* 10. GPU acceleration for hover effects */
.post-overlay-link,
.post:hover {
    transform: translateZ(0) !important;
}

.post:hover {
    transform: translateY(-4px) translateZ(0) !important;
}

/* 11. Reserve space for author/date metadata */
.post .place-date {
    min-height: 2.4rem !important;
}

/* 12. Prevent sidebar layout shifts */
.sidebar-content {
    will-change: transform !important;
    transform: translateZ(0) !important;
}

/* 13. Fixed header height to prevent content jump */
header {
    min-height: 80px !important;
}

/* 14. Mobile-specific CLS fixes */
@media (max-width: 768px) {
    .post-middle-section {
        aspect-ratio: 16 / 10 !important; /* Slightly taller on mobile */
    }

    .posts .post h5 {
        min-height: 2.8rem !important; /* Adjust for mobile font size */
    }

    .posts .post p.line-clamp-3 {
        min-height: 4.2rem !important; /* Adjust for mobile */
    }

    header {
        min-height: 60px !important;
    }

    .blog-post .post-featured-image {
        aspect-ratio: 16 / 10 !important;
    }
}

/* 15. Prevent layout shift from AOS animations */
[data-aos] {
    pointer-events: none !important;
}

[data-aos].aos-animate {
    pointer-events: auto !important;
}

/* 16. Ensure images maintain aspect ratio */
.post-content img {
    height: auto !important;
    max-width: 100% !important;
}

/* 17. Placeholder background for images */
.post-middle-section:empty,
.post-featured-image:empty {
    background: linear-gradient(135deg, rgba(176, 128, 255, 0.05) 0%, rgba(233, 39, 188, 0.05) 100%) !important;
}

/* ===============================================
   Blog Post & Category Page Styles
   Extracted from inline styles for better performance
   =============================================== */

/* Blog Post Page Styles */
.blog-post-section {
    padding-top: 120px;
    min-height: 50vh;
}

.blog-post-section .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
}

.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.post-header {
    margin-bottom: 3rem;
    text-align: center;
}

.post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    min-height: 32px;
}

.post-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.category-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

.post-title {
    font-size: clamp(2rem, 5vw, 2rem);
    line-height: 1.2;
    color: white;
	margin-top: 1em;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    min-height: 60px;
}

.post-author {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    font-size: 1rem;
    min-height: 24px;
}

.post-updated {
    opacity: 0.8;
	display: block;
}

.blog-post .post-featured-image {
    margin: 2rem -2rem 3rem -2rem;
    position: relative;
    overflow: hidden;
    max-width: calc(100% + 4rem);
    aspect-ratio: 1200 / 600;
    background: linear-gradient(135deg, rgba(176, 128, 255, 0.1) 0%, rgba(233, 39, 188, 0.1) 100%);
}

.blog-post .post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 2rem 2rem 1rem 2rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.blog-post .post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: white;
    margin-bottom: 3rem;
    text-align: left;
}

.blog-post .post-content ul li {
    font-size: 14px;
}

.blog-post .post-content h2 {
    color: #c7a6ff;
    margin: 2.5rem 0 1.5rem 0;
    font-size: 2rem;
    font-weight: 600;
}

.blog-post .post-content h3 {
    color: #ff8acb;
    margin: 2rem 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

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

.blog-post .post-content img,
.blog-post .post-content picture {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem auto;
    display: block;
    aspect-ratio: attr(width) / attr(height);
}

.blog-post .post-content picture img {
    margin: 0;
}

.blog-post .post-featured-image picture {
    width: 100%;
    display: block;
}

.blog-post .post-featured-image picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.blog-post .post-content blockquote {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid rgba(255, 255, 255, 0.3);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

.blog-post .post-content ul,
.blog-post .post-content ol {
    margin: 1.5rem 0 2rem 0 !important;
    padding-left: 2rem !important;
    list-style-position: outside !important;
}

.blog-post .post-content ul {
    list-style-type: disc !important;
}

.blog-post .post-content ol {
    list-style-type: decimal !important;
}

.blog-post .post-content ul li,
.blog-post .post-content ol li {
	font-size: var(--fs);
    margin-bottom: 0.75rem !important;
    line-height: 1.7 !important;
    list-style: inherit !important;
    display: list-item !important;
}

.blog-post .post-content ul li::marker,
.blog-post .post-content ol li::marker {
    color: rgba(255, 255, 255, 0.8) !important;
}

.blog-post .post-content a {
    color: #c7a6ff;
    text-decoration: underline;
}

.blog-post .post-content a:hover {
    color: #9966ff;
}

.post-seo-snippet {
    background: rgba(176, 128, 255, 0.1);
    border-left: 4px solid #c7a6ff;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    font-size: 1.5rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    font-style: italic;
}

.post-sharing {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    margin: 3rem 0;
    text-align: center;
}

.post-sharing h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.sharing-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.sharing-buttons a {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.share-x {
    background: #1da1f2;
    color: white;
}

.share-linkedin {
    background: #0077b5;
    color: white;
}

.share-facebook {
    background: #1877f2;
    color: white;
}

.share-whatsapp {
    background: #25d366;
    color: white;
}

.sharing-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.content-ctas a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(176, 128, 255, 0.3);
}

.content-ctas a:last-child:hover {
    background: #c7a6ff;
    color: white;
}

/* Fix related articles grid height issue */
.posts .post {
    height: auto !important;
    min-height: 400px !important;
    display: flex !important;
    flex-direction: column !important;
}

.posts {
    align-content: start !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
    width: 100% !important;
}

.posts > * {
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
    grid-column: unset !important;
    grid-row: unset !important;
}

/* Reset any existing grid area assignments */
.posts > :first-child,
.posts > :nth-child(2),
.posts > :nth-child(3) {
    grid-area: unset !important;
    grid-column: unset !important;
    grid-row: unset !important;
}

.posts .post-overlay-link {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    padding: 2rem 1.5rem !important;
}

.posts .post .btn-label {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin-bottom: 1rem !important;
    align-self: flex-start !important;
}

.posts .post h5 {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
    padding: 0 !important;
    flex-grow: 0 !important;
}

.posts .post .place-date {
    margin-bottom: auto !important;
}

/* Blog Category Page Specific Styles */
.categories-nav {
    margin: 0.5rem 0 2rem 0;
}

.categories-nav h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.category-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.category-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.category-link h4 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.category-description {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    line-height: 1.3;
}

/* Blog with sidebar layout */
.blog-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.main-content {
    min-width: 0; /* Prevents grid overflow */
}

.sidebar-content {
    position: sticky;
    top: 120px; /* Account for header height */
    will-change: transform;
    transform: translateZ(0);
}

/* Modal form styling overrides */
.modal-content .form-field-container input[type="text"],
.modal-content .form-field-container input[type="email"] {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    padding: 15px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.modal-content .form-field-container input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.modal-content .radio-group {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 20px !important;
    border-radius: 8px !important;
}

.modal-content .radio-label {
    color: #ffffff !important;
    font-weight: 600 !important;
    margin-bottom: 15px !important;
}

.modal-content .radio-option {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 10px !important;
    border-radius: 6px !important;
}

.modal-content .submit-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    padding: 15px 30px !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    width: 100% !important;
    margin-top: 20px !important;
    transition: all 0.3s ease !important;
}

.modal-content .submit-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3) !important;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .post-content {
        font-size: 1rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .post-categories {
        justify-content: center;
    }

    .sharing-buttons {
        flex-direction: column;
        align-items: center;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .posts {
        grid-template-columns: 1fr !important;
    }

    .blog-post {
        padding: 1rem;
        margin: 1rem;
    }

    .blog-post .post-featured-image {
        margin: 2rem -1rem 3rem -1rem;
        aspect-ratio: 16 / 10;
    }

    .image-caption {
        padding: 1.5rem 1rem 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .blog-post .post-content ul,
    .blog-post .post-content ol {
        padding-left: 1.5rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category-item {
        padding: 1rem;
    }

    /* Fix mobile layout - hide sidebar and make main content full width */
    .blog-with-sidebar {
        display: block !important;
        grid-template-columns: none !important;
        gap: 0 !important;
    }

    .blog-with-sidebar .main-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    .sidebar-content {
        display: none !important;
    }

    .post {
        min-height: 320px !important;
    }

    .post-overlay-link {
        padding: 1.5rem 1rem 1rem 1rem !important;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .blog-with-sidebar {
        grid-template-columns: 1fr 280px;
        gap: 2rem;
    }

    .blog-post {
        padding: 1.5rem;
    }
}

/* Fix for blog category page grid layout with more than 6 posts */
@media(width > 991px) {
    .posts {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: auto !important;
    }
    .posts > :first-child,
    .posts > :nth-child(2),
    .posts > :nth-child(3),
    .posts > :nth-child(4),
    .posts > :nth-child(5),
    .posts > :nth-child(6),
    .posts > :nth-child(7),
    .posts > :nth-child(8),
    .posts > :nth-child(9),
    .posts > :nth-child(10),
    .posts > :nth-child(11),
    .posts > :nth-child(12) {
        grid-area: unset !important;
    }
}

/* Hero Slider Title Link */
.hero-slide-content h1 a {
    color: white !important;
    text-decoration: none !important;
}
.hero-slide-content h1 a:hover {
    opacity: 0.9;
}
