/* Modern Landing Page Styles with Contemporary Design System */

/* CSS Custom Properties for Modern Color Scheme */
:root {
    /* Modern Blue Color Palette */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #1d4ed8;
    --accent: #0ea5e9;
    --success: #10b981;
    --neutral-50: #fafafa;
    --neutral-100: #f4f4f5;
    --neutral-200: #e4e4e7;
    --neutral-300: #d4d4d8;
    --neutral-400: #a1a1aa;
    --neutral-500: #71717a;
    --neutral-600: #52525b;
    --neutral-700: #3f3f46;
    --neutral-800: #27272a;
    --neutral-900: #18181b;
    
    /* Glass Morphism */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    
    /* Modern Blue Gradients */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    --gradient-mesh: radial-gradient(at 27% 37%, hsla(215, 98%, 61%, 1) 0px, transparent 0%),
                     radial-gradient(at 97% 21%, hsla(200, 98%, 72%, 0.3) 0px, transparent 50%),
                     radial-gradient(at 52% 99%, hsla(220, 98%, 61%, 0.3) 0px, transparent 50%),
                     radial-gradient(at 10% 29%, hsla(210, 96%, 67%, 0.3) 0px, transparent 50%),
                     radial-gradient(at 97% 96%, hsla(195, 60%, 74%, 0.3) 0px, transparent 50%),
                     radial-gradient(at 33% 50%, hsla(222, 67%, 73%, 0.3) 0px, transparent 50%),
                     radial-gradient(at 79% 53%, hsla(205, 68%, 79%, 0.3) 0px, transparent 50%);
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
    --font-display: 'Inter', var(--font-sans);
}

/* Google Fonts are now loaded asynchronously via functions.php for better performance */

/* Screen Reader Only Text for Accessibility */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus management for better accessibility */
.skip-link:focus {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 999999;
    color: white;
    background: #000;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
}

.landing-container {
    width: 100vw;
    max-width: none;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    font-family: var(--font-sans);
}

/* Modern Hero Section with Animated Mesh Gradient */
.hero-section {
    background: #fafafa;
    position: relative;
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 140px 0;
}

/* Animated Mesh Gradient Background */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-mesh);
    background-size: 200% 200%;
    animation: meshGradient 15s ease infinite;
    opacity: 0.9;
    z-index: 1;
}

/* Subtle Pattern Overlay */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 2;
    opacity: 0.4;
}

@keyframes meshGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    z-index: 10;
    position: relative;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out;
    line-height: 1.1;
    letter-spacing: -0.02em;
    
    /* Modern Gradient Text */
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    
    /* Fallback for older browsers */
    color: var(--primary);
    
    /* Subtle text shadow for depth */
    filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.2));
}

/* Enhanced Glass Morphism Search Bar */
.hero-search {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 60px;
    padding: 6px;
    box-shadow: 
        0 25px 80px -15px rgba(59, 130, 246, 0.2),
        0 15px 60px -10px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.02);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Enhanced shimmer effect */
.search-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 100%);
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: inherit;
}

.search-form:focus-within {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 35px 100px -15px rgba(59, 130, 246, 0.3),
        0 25px 80px -10px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 0 0 1px rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.5);
}

.search-form:focus-within::before {
    left: 100%;
}

.search-input {
    flex: 1;
    border: none;
    padding: 20px 32px;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 50px;
    outline: none;
    background: transparent;
    color: var(--neutral-800);
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: var(--font-sans);
    position: relative;
    z-index: 2;
}

.search-input::placeholder {
    color: var(--neutral-500);
    font-weight: 400;
    font-size: 1.05rem;
}

.search-input:focus {
    color: var(--neutral-900);
}

.search-input:focus::placeholder {
    color: var(--neutral-400);
    opacity: 0.7;
}

.search-button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border: none;
    padding: 18px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 
        0 8px 25px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    z-index: 2;
}

/* Enhanced button effects */
.search-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    border-radius: inherit;
    pointer-events: none;
}

.search-button:hover {
    transform: scale(1.05) translateY(-1px);
    box-shadow: 
        0 15px 40px rgba(59, 130, 246, 0.35),
        0 5px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.search-button:hover::before {
    left: 100%;
}

.search-button:active {
    transform: scale(0.98) translateY(0);
    transition: all 0.1s ease-out;
}

.search-button svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.search-button:hover svg {
    transform: scale(1.1) rotate(5deg);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    box-shadow: 
        0 30px 80px -15px rgba(0, 0, 0, 0.15),
        0 15px 40px -10px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    margin-top: 16px;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 30;
    display: none;
    animation: suggestionsFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom scrollbar for suggestions */
.search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

@keyframes suggestionsFadeIn {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.search-suggestion {
    padding: 20px 32px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-weight: 500;
}

/* Enhanced liquid glass hover effect */
.search-suggestion::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.08) 50%,
        transparent 100%);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-suggestion::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

.search-suggestion:hover {
    background: rgba(59, 130, 246, 0.03);
    padding-left: 40px;
    color: var(--primary);
    transform: translateX(4px);
}

.search-suggestion:hover::before {
    left: 100%;
}

.search-suggestion:hover::after {
    width: 400px;
    height: 400px;
}

.search-suggestion:first-child {
    border-radius: 24px 24px 0 0;
}

.search-suggestion:last-child {
    border-bottom: none;
    border-radius: 0 0 24px 24px;
}

.search-suggestion:only-child {
    border-radius: 24px;
}

.search-suggestion strong {
    color: var(--neutral-900);
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.search-suggestion small {
    color: var(--neutral-600);
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
}

/* Liquid Glass Floating Elements */
.hero-bg-element {
    position: absolute;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.15),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    animation: liquidFloat 8s ease-in-out infinite;
    overflow: hidden;
}

/* Liquid Glass Shimmer Effect */
.hero-bg-element::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.3) 0%, 
        transparent 70%);
    animation: liquidShimmer 4s linear infinite;
}

/* Morphing Liquid Shapes */
.hero-bg-element:nth-child(1) {
    width: 150px;
    height: 150px;
    top: 15%;
    left: 8%;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: liquidFloat 10s ease-in-out infinite, liquidMorph 15s ease-in-out infinite;
}

.hero-bg-element:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 50%;
    right: 10%;
    border-radius: 40% 60% 70% 30% / 40% 70% 30% 60%;
    animation: liquidFloat 12s ease-in-out infinite reverse, liquidMorph 18s ease-in-out infinite;
    animation-delay: 2s;
}

.hero-bg-element:nth-child(3) {
    width: 120px;
    height: 120px;
    bottom: 15%;
    left: 75%;
    border-radius: 70% 30% 50% 50% / 30% 70% 50% 50%;
    animation: liquidFloat 8s ease-in-out infinite, liquidMorph 12s ease-in-out infinite reverse;
    animation-delay: 4s;
}

/* Liquid Glass Animations */
@keyframes liquidFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    33% {
        transform: translateY(-20px) rotate(120deg) scale(1.05);
    }
    66% {
        transform: translateY(15px) rotate(240deg) scale(0.95);
    }
}

@keyframes liquidMorph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        border-radius: 40% 60% 70% 30% / 40% 70% 30% 60%;
    }
    50% {
        border-radius: 70% 30% 50% 50% / 30% 70% 50% 50%;
    }
    75% {
        border-radius: 30% 70% 40% 60% / 70% 40% 60% 30%;
    }
}

@keyframes liquidShimmer {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes liquidShine {
    0% {
        transform: translateX(-100%) rotate(-45deg);
    }
    100% {
        transform: translateX(100%) rotate(-45deg);
    }
}

/* Blog Grid Section with Subtle Gradient */
.blog-grid-section {
    padding: 100px 40px 0;
    background: linear-gradient(180deg, 
        var(--neutral-50) 0%, 
        rgba(246, 248, 250, 0.8) 50%, 
        var(--neutral-100) 100%);
    position: relative;
    margin-bottom: 0;
}

/* Subtle background pattern */
.blog-grid-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.6;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.75rem);
    color: var(--neutral-800);
    margin-bottom: 80px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-family: var(--font-display);
    position: relative;
    z-index: 2;
    
    /* Subtle gradient text effect */
    background: linear-gradient(135deg, var(--neutral-800) 0%, var(--neutral-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    
    /* Fallback */
    color: var(--neutral-800);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.post-card {
    /* Liquid Glass Card Effect */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: slideInUp 0.6s ease-out;
    height: 480px;
    display: flex;
    flex-direction: column;
}

/* Liquid Glass Shimmer Effect on Cards */
.post-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 40%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 60%);
    transform: rotate(-45deg);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    z-index: 1;
}

.post-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 80px rgba(59, 130, 246, 0.1),
        inset 0 0 0 1px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.post-card:hover::before {
    opacity: 1;
    animation: liquidShine 0.8s ease-out;
}

@keyframes liquidShine {
    0% {
        transform: translateX(-100%) rotate(-45deg);
    }
    100% {
        transform: translateX(100%) rotate(-45deg);
    }
}

.post-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    flex-shrink: 0;
    /* Ensure aspect ratio is maintained for CLS prevention */
    aspect-ratio: 16/10;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.08);
}

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.9) 0%, 
        rgba(29, 78, 216, 0.8) 50%,
        rgba(245, 158, 11, 0.9) 100%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Liquid Glass Ripple Effect */
.post-overlay::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-overlay {
    opacity: 1;
}

.post-card:hover .post-overlay::before {
    width: 300px;
    height: 300px;
}

.read-more {
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 14px 28px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 2;
}

/* Liquid Glass Button Effect */
.read-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .read-more {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.post-card:hover .read-more::before {
    left: 100%;
}

.post-content {
    padding: 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.post-title {
    color: var(--neutral-800);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
    letter-spacing: -0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--font-display);
}

.post-card:hover .post-title {
    color: var(--primary);
    transform: translateY(-2px);
}

.post-excerpt {
    color: var(--neutral-600);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    font-weight: 400;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--neutral-500);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    gap: 12px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: 0;
}

.post-author span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.post-card:hover .author-avatar {
    border-color: var(--primary);
    transform: scale(1.1);
}

.post-date {
    font-weight: 500;
    color: var(--neutral-400);
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.8rem;
}

/* Modern Liquid Glass Pagination */
.modern-pagination {
    text-align: center;
    padding: 80px 20px;
    background: transparent;
    position: relative;
    z-index: 2;
    margin-bottom: 0;
}

/* Override WordPress default pagination and ensure ours shows */
.wp-pagenavi,
.page-links,
.posts-navigation,
.navigation.pagination:not(.modern-pagination .pagination) {
    display: none !important;
}

/* Ensure our custom pagination is visible */
.modern-pagination .pagination {
    display: inline-flex !important;
    visibility: visible !important;
}

/* Additional pagination selector overrides for WordPress themes */
.ast-pagination-wrapper,
.ast-row .ast-col-12 .navigation {
    display: none !important;
}

.pagination {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    align-items: center;
}

/* Target ALL pagination elements */
.pagination a,
.pagination span,
.pagination .page-number,
.pagination .current,
.pagination .prev,
.pagination .next,
.pagination .dots {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #000000;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    margin: 0 !important;
}

/* Fix WordPress default pagination list styles */
.pagination ul,
.pagination li {
    display: inline-flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pagination ul {
    gap: 12px;
}

/* Liquid Glass Shimmer Effect for Pagination */
.pagination a::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 40%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 60%);
    transform: rotate(-45deg);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.pagination a:hover::before {
    opacity: 1;
    animation: liquidShine 0.8s ease-out;
}

/* Enhanced Liquid Glass Hover Effect for Pagination */
.pagination a:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border-color: var(--primary);
    transform: translateY(-4px) scale(1.08);
    box-shadow: 
        0 15px 35px rgba(59, 130, 246, 0.3),
        0 0 30px rgba(59, 130, 246, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.pagination .current {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border-color: var(--primary);
    box-shadow: 
        0 8px 25px rgba(59, 130, 246, 0.35),
        0 0 20px rgba(59, 130, 246, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    position: relative;
}

.pagination .current::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    border-radius: inherit;
    pointer-events: none;
}

/* Navigation arrows enhancement */
.pagination .prev,
.pagination .next {
    font-size: 1.2rem;
    font-weight: 400;
}

.pagination .dots {
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--neutral-400);
    cursor: default;
}

.pagination .dots:hover {
    transform: none;
    background: transparent;
    color: var(--neutral-400);
    box-shadow: none;
}


/* Liquid Glass Category Badge */
.post-category {
    position: absolute;
    top: 18px;
    left: 18px;
    background: rgba(59, 130, 246, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    z-index: 3;
    box-shadow: 
        0 4px 16px rgba(59, 130, 246, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-category {
    background: rgba(29, 78, 216, 0.95);
    transform: scale(1.05);
    box-shadow: 
        0 6px 20px rgba(29, 78, 216, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Enhanced Animations with Micro-Interactions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes liquidShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Magnetic Cursor Effect for Interactive Elements */
@media (hover: hover) and (pointer: fine) {
    .search-button,
    .read-more,
    .pagination a {
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .search-button:hover,
    .read-more:hover {
        transform: scale(1.05);
    }
}

/* Staggered Animation for Cards */
.post-card {
    animation-fill-mode: both;
}

/* Parallax Effect on Scroll */
@supports (transform-style: preserve-3d) {
    .hero-bg-element {
        transform-style: preserve-3d;
        will-change: transform;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-bg-element {
        animation: none;
    }
}

/* Enhanced Responsive Design with Liquid Glass Effects */
@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        max-width: 1000px;
    }
    
    .post-card {
        height: 460px;
    }
    
    .hero-bg-element:nth-child(3) {
        display: none; /* Hide third element on smaller screens */
    }
}

@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 700px;
    }
    
    .blog-grid-section {
        padding: 60px 20px;
    }
    
    .post-card {
        height: 420px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 100px 0;
        min-height: 75vh;
    }
    
    .hero-title {
        font-size: clamp(2rem, 6vw, 2.5rem);
        margin-bottom: 32px;
    }
    
    .hero-search {
        max-width: 95%;
    }
    
    .search-form {
        flex-direction: column;
        gap: 12px;
        padding: 18px;
    }
    
    .search-button {
        width: 100%;
        justify-content: center;
        padding: 18px 32px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 15px;
    }
    
    .section-title {
        font-size: clamp(1.75rem, 5vw, 2rem);
        margin-bottom: 60px;
    }
    
    .blog-grid-section {
        padding: 80px 20px;
    }
    
    .post-card {
        height: auto;
        min-height: 400px;
        /* Enhanced touch interactions */
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .post-card:active {
        transform: scale(0.98);
    }
    
    /* Hide liquid glass elements on mobile for performance */
    .hero-bg-element:nth-child(2),
    .hero-bg-element:nth-child(3) {
        display: none;
    }
    
    .post-card::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 80px 0;
        min-height: 70vh;
    }
    
    .hero-title {
        font-size: clamp(1.75rem, 7vw, 2rem);
        margin-bottom: 28px;
    }
    
    .search-input {
        font-size: 1rem;
        padding: 14px 24px;
    }
    
    .search-button {
        padding: 16px 28px;
        font-size: 0.9rem;
    }
    
    .post-content {
        padding: 28px;
    }
    
    .post-title {
        font-size: 1.2rem;
        line-height: 1.4;
    }
    
    .post-image {
        height: 200px;
    }
    
    .blog-grid-section {
        padding: 60px 15px;
    }
    
    .pagination a,
    .pagination span {
        width: 44px;
        height: 44px;
        font-size: 0.9rem;
    }
    
    /* Optimize touch targets */
    .search-suggestion {
        padding: 18px 24px;
        min-height: 48px;
    }
    
    /* Touch-friendly interactions */
    .post-card {
        /* Larger touch target */
        min-height: 420px;
    }
    
    .post-card:active {
        transform: scale(0.97);
        transition: transform 0.1s ease-out;
    }
}

/* Print Styles */
@media print {
    .hero-bg-element,
    .search-form,
    .modern-pagination {
        display: none;
    }
    
    .post-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .hero-section {
        background: white;
        color: black;
        padding: 40px 0;
    }
    
    .hero-title {
        color: black !important;
        background: none !important;
        -webkit-text-fill-color: black !important;
    }
}

/* Staggered Card Animations with Performance Optimization */
.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card:nth-child(6) { animation-delay: 0.3s; }
.post-card:nth-child(7) { animation-delay: 0.35s; }
.post-card:nth-child(8) { animation-delay: 0.4s; }
.post-card:nth-child(9) { animation-delay: 0.45s; }
.post-card:nth-child(10) { animation-delay: 0.5s; }
.post-card:nth-child(11) { animation-delay: 0.55s; }
.post-card:nth-child(12) { animation-delay: 0.6s; }
.post-card:nth-child(13) { animation-delay: 0.65s; }
.post-card:nth-child(14) { animation-delay: 0.7s; }
.post-card:nth-child(15) { animation-delay: 0.75s; }
.post-card:nth-child(16) { animation-delay: 0.8s; }
.post-card:nth-child(17) { animation-delay: 0.85s; }
.post-card:nth-child(18) { animation-delay: 0.9s; }
.post-card:nth-child(19) { animation-delay: 0.95s; }
.post-card:nth-child(20) { animation-delay: 1s; }

/* Performance Optimizations */
.post-card {
    will-change: transform, opacity;
    contain: layout style paint;
}

.post-card:hover {
    will-change: transform;
}

/* GPU Acceleration for Smooth Animations */
.hero-bg-element,
.post-card,
.search-form,
.pagination a {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Focus States for Accessibility */
.search-input:focus,
.search-button:focus,
.pagination a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-color: var(--primary);
}

.post-card a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
    border-radius: 20px;
}

/* Dark Mode Support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    :root {
        --neutral-50: #18181b;
        --neutral-100: #27272a;
        --neutral-200: #3f3f46;
        --neutral-800: #f4f4f5;
        --neutral-600: #d4d4d8;
        --neutral-500: #a1a1aa;
        --neutral-400: #71717a;
    }
    
    .post-card {
        background: rgba(39, 39, 42, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .blog-grid-section {
        background: linear-gradient(180deg, 
            var(--neutral-100) 0%, 
            rgba(39, 39, 42, 0.8) 50%, 
            var(--neutral-50) 100%);
    }
}
