/* ===================================
   BLOG PAGE RESPONSIVE STYLES
   Mobile-First Approach
   =================================== */

/* ===================================
   MOBILE OPTIMIZATIONS (Default)
   =================================== */

/* Hero Section - Mobile */
.pt-32 {
    padding-top: 5rem !important;
}

.pb-12 {
    padding-bottom: 2rem !important;
}

.py-12 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

/* Blog Article Spacing - Mobile */
article {
    margin-bottom: 2rem !important;
}

/* Image Heights - Mobile */
article .h-96 {
    height: 16rem !important; /* Reduced from 24rem (96) */
}

article .h-64 {
    height: 12rem !important; /* Reduced from 16rem (64) */
}

/* Content Padding - Mobile */
article .p-8,
article .p-6 {
    padding: 1.25rem !important;
}

article .md\:p-12 {
    padding: 1.25rem !important;
}

/* Text Sizes - Mobile */
h1.text-4xl,
h1.md\:text-5xl {
    font-size: 1.75rem !important;
    line-height: 2rem !important;
}

h2.text-3xl {
    font-size: 1.5rem !important;
    line-height: 2rem !important;
}

h3.text-2xl {
    font-size: 1.25rem !important;
    line-height: 1.75rem !important;
}

h3.text-xl {
    font-size: 1.125rem !important;
    line-height: 1.5rem !important;
}

p.text-lg {
    font-size: 1rem !important;
    line-height: 1.625rem !important;
}

/* Grid Spacing - Mobile */
.grid.gap-8 {
    gap: 1.5rem !important;
}

.mt-16 {
    margin-top: 2rem !important;
}

/* Container Padding - Mobile */
.container.px-6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* Footer Padding - Mobile */
footer.pt-16 {
    padding-top: 3rem !important;
}

footer.pb-8 {
    padding-bottom: 2rem !important;
}

/* Blog Quote Box - Mobile */
.bg-purple-50.p-6 {
    padding: 1rem !important;
    margin-bottom: 1.5rem !important;
}

/* Social Share Section - Mobile */
.mt-8.flex {
    margin-top: 1.5rem !important;
    flex-direction: column;
    gap: 1rem;
}

.mt-8.flex .flex {
    justify-content: center;
}

/* ===================================
   BLOG CARD OVERLAY FIX - MOBILE
   =================================== */

/* Hide the overlay title on mobile - it will be repositioned */
article .relative.h-96 .absolute.bottom-6 {
    position: static !important;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%) !important;
    padding: 1.5rem 1rem !important;
    margin: 0 !important;
    text-align: center !important;
    min-height: 120px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Remove gradient overlay on image for mobile */
article .relative.h-96 .absolute.inset-0.bg-gradient-to-t {
    display: none !important;
}

/* Ensure the card has proper overflow handling */
article.rounded-3xl {
    overflow: hidden !important;
    border-radius: 1.5rem !important;
}

/* Fix image display on mobile */
article .relative.h-96 {
    position: relative !important;
    overflow: hidden !important;
}

article .relative.h-96 img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

/* Ensure smaller blog card images also display properly */
article .h-64 {
    position: relative !important;
    overflow: hidden !important;
}

article .h-64 img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}


/* Date and Author Text - Mobile */
.absolute.bottom-6 .flex.items-center {
    font-size: 0.7rem !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
}

.absolute.bottom-6 .flex.items-center span {
    white-space: nowrap !important;
}

.absolute.bottom-6 .flex.items-center i {
    font-size: 0.65rem !important;
    margin-right: 0.25rem !important;
}

.absolute.bottom-6 .flex.items-center .mx-3 {
    margin-left: 0.5rem !important;
    margin-right: 0.5rem !important;
}

/* Badge - Mobile */
.absolute.bottom-6 span.bg-purple-600 {
    font-size: 0.65rem !important;
    padding: 0.375rem 0.75rem !important;
    margin-bottom: 0.5rem !important;
}

/* Badge Spacing - Mobile */
.mb-4 {
    margin-bottom: 0.75rem !important;
}

.mb-6 {
    margin-bottom: 1rem !important;
}

.mb-8 {
    margin-bottom: 1.5rem !important;
}

.mb-12 {
    margin-bottom: 2rem !important;
}

/* ===================================
   TABLET (768px and up)
   =================================== */

@media (min-width: 768px) {
    /* Hero Section - Tablet */
    .pt-32 {
        padding-top: 7rem !important;
    }
    
    .pb-12 {
        padding-bottom: 3rem !important;
    }
    
    .py-12 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Blog Article Spacing - Tablet */
    article {
        margin-bottom: 3rem !important;
    }
    
    /* Image Heights - Tablet */
    article .h-96 {
        height: 20rem !important;
    }
    
    article .h-64 {
        height: 14rem !important;
    }
    
    /* Content Padding - Tablet */
    article .p-8 {
        padding: 1.75rem !important;
    }
    
    article .p-6 {
        padding: 1.5rem !important;
    }
    
    article .md\:p-12 {
        padding: 2rem !important;
    }
    
    /* Text Sizes - Tablet */
    h1.text-4xl,
    h1.md\:text-5xl {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }
    
    h2.text-3xl {
        font-size: 2rem !important;
        line-height: 2.25rem !important;
    }
    
    h3.text-2xl {
        font-size: 1.5rem !important;
        line-height: 2rem !important;
    }
    
    h3.text-xl {
        font-size: 1.25rem !important;
        line-height: 1.75rem !important;
    }
    
    /* Grid Layout - Tablet */
    .grid.md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .grid.gap-8 {
        gap: 2rem !important;
    }
    
    .mt-16 {
        margin-top: 3rem !important;
    }
    
    /* Container Padding - Tablet */
    .container.px-6 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    
    /* Footer Padding - Tablet */
    footer.pt-16 {
        padding-top: 4rem !important;
    }
    
    /* Social Share Section - Tablet */
    .mt-8.flex {
        flex-direction: row;
        justify-content: space-between;
    }
    
    /* Image Overlay Content - Tablet */
    .absolute.bottom-6 {
        bottom: 1.5rem !important;
        left: 1.5rem !important;
    }
    
    /* Restore overlay design for tablet and up */
    article .relative.h-96 .absolute.bottom-6 {
        position: absolute !important;
        background: transparent !important;
        padding: 0 !important;
        min-height: auto !important;
        display: block !important;
        text-align: left !important;
        bottom: 1.5rem !important;
        left: 1.5rem !important;
        right: auto !important;
        z-index: 20 !important;
    }
    
    /* Restore gradient overlay on image for tablet and up */
    article .relative.h-96 .absolute.inset-0.bg-gradient-to-t {
        display: block !important;
    }
    
    /* Left-align date and author text for tablet and up */
    article .relative.h-96 .absolute.bottom-6 .flex.items-center {
        justify-content: flex-start !important;
    }

}

/* ===================================
   DESKTOP (1024px and up)
   =================================== */

@media (min-width: 1024px) {
    /* Hero Section - Desktop */
    .pt-32 {
        padding-top: 8rem !important;
    }
    
    .pb-12 {
        padding-bottom: 3rem !important;
    }
    
    .py-12 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Blog Article Spacing - Desktop */
    article {
        margin-bottom: 3rem !important;
    }
    
    /* Image Heights - Desktop */
    article .h-96 {
        height: 24rem !important;
    }
    
    article .h-64 {
        height: 16rem !important;
    }
    
    /* Content Padding - Desktop */
    article .p-8 {
        padding: 2rem !important;
    }
    
    article .p-6 {
        padding: 1.5rem !important;
    }
    
    article .md\:p-12 {
        padding: 3rem !important;
    }
    
    /* Text Sizes - Desktop */
    h1.text-4xl,
    h1.md\:text-5xl {
        font-size: 3rem !important;
        line-height: 1.2 !important;
    }
    
    h2.text-3xl {
        font-size: 1.875rem !important;
        line-height: 2.25rem !important;
    }
    
    h3.text-2xl {
        font-size: 1.5rem !important;
        line-height: 2rem !important;
    }
    
    h3.text-xl {
        font-size: 1.25rem !important;
        line-height: 1.75rem !important;
    }
    
    p.text-lg {
        font-size: 1.125rem !important;
        line-height: 1.75rem !important;
    }
    
    .mt-16 {
        margin-top: 4rem !important;
    }
    
    /* Container Padding - Desktop */
    .container.px-6 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    
    /* Footer Padding - Desktop */
    footer.pt-16 {
        padding-top: 4rem !important;
    }
    
    /* Image Overlay Content - Desktop */
    .absolute.bottom-6 {
        bottom: 1.5rem !important;
        left: 1.5rem !important;
    }
    
    /* Ensure overlay design for desktop */
    article .relative.h-96 .absolute.bottom-6 {
        position: absolute !important;
        background: transparent !important;
        padding: 0 !important;
        min-height: auto !important;
        display: block !important;
        text-align: left !important;
        bottom: 1.5rem !important;
        left: 1.5rem !important;
        right: auto !important;
        z-index: 20 !important;
    }
    
    /* Left-align date and author text for desktop */
    article .relative.h-96 .absolute.bottom-6 .flex.items-center {
        justify-content: flex-start !important;
    }

}

/* ===================================
   LARGE DESKTOP (1440px and up)
   =================================== */

@media (min-width: 1440px) {
    /* Hero Section - Large Desktop */
    .pt-32 {
        padding-top: 8rem !important;
    }
    
    /* Image Heights - Large Desktop */
    article .h-96 {
        height: 24rem !important;
    }
    
    article .h-64 {
        height: 16rem !important;
    }
    
    /* Content Padding - Large Desktop */
    article .md\:p-12 {
        padding: 3rem !important;
    }
    
    /* Text Sizes - Large Desktop */
    h1.text-4xl,
    h1.md\:text-5xl {
        font-size: 3rem !important;
    }
}

/* ===================================
   PREVENT OVERFLOW & SPACING ISSUES
   =================================== */

/* Ensure no horizontal overflow */
body,
html {
    overflow-x: hidden;
    width: 100%;
}

/* Ensure images don't overflow */
article img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ensure text doesn't overflow */
article h1,
article h2,
article h3,
article p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure proper spacing between sections */
section + section {
    margin-top: 0;
}

/* Remove excessive bottom margins on mobile */
@media (max-width: 767px) {
    .max-w-4xl {
        max-width: 100% !important;
    }
    
    /* Reduce footer grid gaps */
    footer .grid.gap-8 {
        gap: 2rem !important;
    }
    
    footer .mb-12 {
        margin-bottom: 2rem !important;
    }
    
    /* Optimize footer columns for mobile */
    footer .grid.md\:grid-cols-4 {
        grid-template-columns: 1fr !important;
    }
    
    footer .col-span-1.md\:col-span-2 {
        grid-column: span 1 !important;
    }
}

/* ===================================
   TOUCH OPTIMIZATIONS FOR MOBILE
   =================================== */

@media (max-width: 767px) {
    /* Increase tap target sizes */
    button,
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    
    /* Optimize social icons */
    .flex.space-x-4 a,
    .flex.space-x-3 a {
        padding: 0.5rem;
    }
}
