/* General body styling */
body {
    font-family: 'Inter', sans-serif; /* Modern font */
    margin: 0; /* Remove default margins */
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%); /* Subtle gradient background */
    font-size: 16px; /* Base font size */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    box-sizing: border-box; /* Ensure padding/margins are included in width */
    line-height: 1.7; /* From first for readability */
    color: #1f2937; /* Darker text for better contrast */
    scroll-behavior: smooth; /* Smooth scrolling */
}
html { overflow-x:hidden; }

/* Ensure media never overflows causing horizontal drag */
img, svg, video, iframe { max-width:100%; height:auto; }
.content img, .content iframe { max-width:100%; height:auto; display:block; }
.content { overflow-wrap:anywhere; word-break:break-word; }

/* Ensure all elements use border-box */
*, *:before, *:after {
    box-sizing: inherit; /* Inherit box-sizing */
}

/* Container for centering content */
.container {
    width: 100%; /* Full width */
    max-width: 1280px; /* Larger max width for modern screens */
    margin: 0 auto; /* Center container */
    padding: 0 clamp(1rem, 5vw, 2.5rem); /* Equal responsive padding on both sides */
}

/* Header styling */
header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%); /* Enhanced gradient */
    color: white; /* White text */
    padding: 1.5rem 0; /* Increased padding */
    width: 100%; /* Full width */
    position: sticky; /* Sticky header */
    top: 0; /* Stick to top */
    z-index: 1000; /* Above other content */
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.15); /* Enhanced shadow */
    backdrop-filter: blur(10px); /* Glass effect */
    transition: box-shadow 0.3s ease;
}
header:hover {
    box-shadow: 0 6px 30px rgba(30, 58, 138, 0.2);
}
header .container {
    display: flex; /* Flexbox layout */
    justify-content: space-between; /* Space out elements */
    align-items: center; /* Center vertically */
    flex-wrap: nowrap; /* Prevent wrapping */
    max-width: 100%; /* Prevent overflow */
    flex-direction: row;
}
header h1 {
    font-family: 'Poppins', sans-serif; /* Modern heading font */
    font-size: clamp(1.2rem, 3vw, 1.6rem); /* Reduced responsive font */
    margin: 0; /* Remove default margin */
    flex: 1; /* Take available space */
    text-align: center; /* Center logo */
    letter-spacing: 1px; /* Subtle spacing */
    margin-right: 2rem; /* Push logo right to move search left */
}
/* Nav logo block */
.nav-logo { display:flex; align-items:center; font-family:'Poppins',sans-serif; font-size:clamp(1.1rem,3vw,1.6rem); font-weight:600; gap:6px; }
.nav-logo svg { width:1em; height:1em; color:#fff; flex-shrink:0; vertical-align:-0.125em; display:inline-block; }
.nav-logo .logo-link span { letter-spacing:0.5px; }
.nav-logo .logo-link:hover { opacity:.9; }

/* for post.html header only  */
header h2 {
    font-family: 'Poppins', sans-serif; /* Modern heading font */
    font-size: clamp(1.2rem, 3vw, 1.6rem); /* Reduced responsive font */
    margin: 0; /* Remove default margin */
    flex: 1; /* Take available space */
    text-align: center; /* Center logo */
    letter-spacing: 1px; /* Subtle spacing */
    margin-right: 2rem; /* Push logo right to move search left */
}

/* Navigation toggle button (hamburger) */
.nav-toggle {
    display: flex; /* Always visible */
    align-items: center;
    justify-content: center;
    font-size: 1.8rem; /* Larger icon */
    background: rgba(255, 255, 255, 0.1); /* Subtle background */
    border: none; /* No border */
    color: white; /* White icon */
    cursor: pointer; /* Clickable */
    padding: 0.5rem; /* Touch target size */
    border-radius: 0.5rem;
    order: -1; /* Position on the left */
    transition: all 0.3s ease; /* Smooth animation */
}
.nav-toggle:hover {
    transform: scale(1.1); /* Slight scale on hover */
    background: rgba(255, 255, 255, 0.2);
}

/* Search bar styling */
.search-container {
    display: flex; /* Flex for input alignment */
    align-items: center; /* Center vertically */
    max-width: 10%; /* Further reduced width for minimal search */
    height: 1rem; /* Reduced height for compact search */
    position: relative; /* For potential icon */
    margin-right: 3rem; /* Reduced to lower overflow risk */
}
.search-icon {
    position: absolute;
    left: 12px;
    pointer-events: none;
    color: #64748b;
    z-index: 1;
}
.search-container input {
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(0.5rem, 1.5vw, 0.75rem) clamp(0.5rem, 1.5vw, 0.75rem) clamp(2.5rem, 3vw, 3rem); /* Padding with space for icon */
    border: none; /* No border */
    border-radius: 2rem; /* Fully rounded corners */
    font-size: clamp(0.9rem, 2vw, 1rem); /* Responsive font */
    width: 100%; /* Full width */
    max-width: clamp(120px, 25vw, 180px); /* Wider input */
    background: rgba(255, 255, 255, 0.95); /* Slightly transparent */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Enhanced shadow */
    transition: all 0.3s ease; /* Smooth transitions */
}
.search-container input:focus {
    outline: none; /* Remove default outline */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15); /* Blue glow + shadow */
    background: rgba(255, 255, 255, 1); /* Solid white on focus */
    transform: translateY(-1px);
}

/* Navigation styling */
nav {
    max-width: 100%; /* Prevent overflow */
}

/* Sports Sub Navigation */
.sports-subnav {
    background: #ffffff;
    border-top: 2px solid #1e3a8a;
    border-bottom: 2px solid #e2e8f0;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.subnav-wrapper { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.subnav-title { margin: 0; font-family: 'Poppins', sans-serif; color: #1e3a8a; font-weight: 700; font-size: 0.9rem; padding-left: calc(0.9rem + 1px); letter-spacing: 0.5px; }
.subnav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.subnav-link { display: inline-block; padding: 0.5rem 1rem; border: 2px solid #1e3a8a !important; border-radius: 999px !important; text-decoration: none; color: #1e3a8a !important; background: #fff !important; font-weight: 500; transition: all 0.3s ease; }
.subnav-link:hover { background: #eff6ff !important; transform: translateY(-1px); color: #1e3a8a !important; }
.subnav-link.active { background: #1e3a8a !important; color: #fff !important; border-color: #1e3a8a !important; }
header nav ul {
    list-style: none; /* Remove bullet points */
    display: flex; /* Horizontal menu */
    gap: 0.2rem; /* Minimal gap between navs */
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
    flex-wrap: wrap; /* Wrap on smaller screens */
}
header nav a {
    color: white; /* White text */
    text-decoration: none; /* No underline */
    font-family: 'Poppins', sans-serif; /* Modern font */
    font-size: clamp(0.95rem, 2.5vw, 1.1rem); /* Responsive font size */
    padding: 0.5rem 1rem; /* Larger touch area */
    border-radius: 1rem; /* Rounded links */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth hover */
}
header nav a:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Subtle hover background */
    color: #e0e7ff; /* Light indigo */
}
header nav a.active {
    font-weight: 600; /* Bolder for active */
    background-color: rgba(255, 255, 255, 0.2); /* Highlight active */
}

/* Hero section styling */
.hero-section {
    color: white;
    text-align: center;
    width: 100%;
    margin: 1.25rem 0 0 0; /* gap below header */
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    /* Adjust height so total (gap + hero) still fits viewport */
    min-height: calc(100vh - 96px - 1.25rem);
    animation: fadeIn 1s ease-out;
}
.hero-section #dynamic-hero, .hero-section .hero-card { box-sizing:border-box; max-width:100%; }
@media (max-width: 640px){
    .hero-section { padding-left: clamp(0.75rem,4vw,1rem); padding-right: clamp(0.75rem,4vw,1rem); }
    .hero-section .hero-card { border-radius:16px; }
}
.hero-section h2 {
    font-family: 'Poppins', sans-serif; /* Modern heading font */
    font-size: clamp(2rem, 7vw, 3.5rem); /* Larger responsive heading */
    margin: 0 0 1.5rem; /* Increased spacing */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Subtle shadow for readability */
}
.hero-section p {
    font-size: clamp(1.1rem, 3.5vw, 1.4rem); /* Larger text */
    margin: 0 0 1.5rem; /* Increased spacing */
    max-width: 600px; /* Limit width for readability */
    margin-left: auto; /* Center paragraph */
    margin-right: auto;
}
.hero-section a {
    display: inline-block; /* Block-level link */
    background: linear-gradient(135deg, #3b82f6, #1e3a8a); /* Gradient button */
    color: white; /* White text */
    padding: clamp(0.75rem, 2vw, 1rem) clamp(1.5rem, 3vw, 2rem); /* Responsive padding */
    text-decoration: none; /* No underline */
    border-radius: 2rem; /* Fully rounded */
    font-family: 'Poppins', sans-serif; /* Modern font */
    font-weight: 500; /* Medium weight */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover */
}
.hero-section a:hover {
    transform: translateY(-2px); /* Lift effect */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Shadow on hover */
}

/* Category Sections styling */
.category-sections {
    padding: clamp(1.5rem, 4.5vw, 2.5rem) 0 2.25rem;
    width: 100%;
    background: transparent;
}

.category-sections .container {
    display: block; /* Stack categories vertically */
}

/* Move sidebar to top or bottom */
.sidebar {
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* Individual category section */
.category-section {
    margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
    width: 100%; /* Full width for each category */
}

/* Category header styling */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    padding-bottom: 0.75rem;
    border-bottom: 3px solid transparent;
    background: linear-gradient(to right, #1e3a8a, #3b82f6) bottom / 100% 3px no-repeat;
    position: relative;
}
.category-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.category-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.category-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: #1e3a8a;
    margin: 0;
    font-weight: 700;
}

.view-all-btn {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1), rgba(59, 130, 246, 0.1));
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.08);
}

.view-all-btn:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}
.view-all-btn svg {
    transition: transform 0.3s ease;
}
.view-all-btn:hover svg {
    transform: translateX(3px);
}

/* Horizontal posts container */
.horizontal-posts {
    display: flex;
    gap: clamp(1rem, 3vw, 1.5rem);
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for horizontal scroll */
.horizontal-posts::-webkit-scrollbar {
    height: 8px;
}

.horizontal-posts::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.horizontal-posts::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.horizontal-posts::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Horizontal post card styling */
.horizontal-post {
    flex: 0 0 280px; /* Fixed width, no shrink/grow */
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 260px; /* Minimum height for uniformity, but allow expansion */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
}

.horizontal-post:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 32px rgba(30, 58, 138, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}
.post-image-wrapper {
    position: relative;
    overflow: hidden;
}
.post-image-wrapper img {
    transition: transform 0.5s ease;
}
.horizontal-post:hover .post-image-wrapper img {
    transform: scale(1.1);
}
.post-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.95), rgba(59, 130, 246, 0.95));
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.horizontal-post img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

.horizontal-post-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1; /* Take remaining space after image */
    gap: 0.75rem;
}
.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: #64748b;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}
.post-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.post-views {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
}

.horizontal-post h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.5;
    color: #0f172a;
    text-align: center;
    word-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.horizontal-post h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.horizontal-post h3 a:hover {
    color: #3b82f6;
    text-decoration: none;
}
/* Subscribe bell enhancement */
.subscribe-bell {
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    padding: 0.6rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.subscribe-bell:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1) rotate(15deg);
}
.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.horizontal-post .read-more-btn {
    display: inline-block;
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    margin-top: auto; /* Push to bottom of container */
    align-self: flex-start; /* Align to left */
}

.horizontal-post .read-more-btn:hover {
    background: #1e3a8a;
    color: white;
}

/* Responsive design for horizontal posts */
@media (max-width: 768px) {
    .category-sections .container {
        grid-template-columns: 1fr;
    }
    
    .horizontal-post {
        flex: 0 0 250px;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .view-all-btn {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .horizontal-post {
        flex: 0 0 220px;
    }
    
    .horizontal-post img {
        height: 140px;
    }
    
    .horizontal-post-content {
        padding: 0.75rem;
        height: 90px; /* Slightly smaller for mobile */
    }
}

/* Sidebar (Recent Posts) styling */
.sidebar {
    background-color: #f1f5f9; /* Light gray for contrast */
    padding: clamp(1.5rem, 4vw, 2rem); /* Increased padding */
    border-radius: 1rem; /* Softer corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Stronger shadow */
}
#sidebar-ad-slot { transition:background-color .3s ease, opacity .3s ease; }
#sidebar-ad-slot.sidebar-ad-loaded { background:#ffffff; }
/* Removed fallback outline per request */
/* #sidebar-ad-slot[data-fallback] { outline:1px dashed #94a3b8; } */
#sidebar-ad-slot[aria-busy="true"] { opacity:.75; }
/* Force remove any border/outline (including inline style) */
#sidebar-ad-slot, #sidebar-ad-slot[data-fallback] {
    border:0 !important;
    outline:none !important;
    box-shadow:none !important;
}
/* Sidebar Ad explicit sizing & overrides */
.sidebar-ad-container { display:flex; justify-content:center; align-items:center; padding:0; }
#sidebar-ad-slot { padding:0; background:#f8fafc; width:100%; display:flex; justify-content:center; }
.sidebar-ad-wrapper { line-height:0; }
/* Override the global img,iframe max-width shrink for ad iframe */
#sidebar-ad-slot iframe { max-width:none !important; width:300px !important; height:250px !important; border:0; }
/* If parent column narrower on small screens, scale proportionally */
@media (max-width: 740px){
    #sidebar-ad-slot iframe { width:100% !important; height:auto !important; aspect-ratio: 300 / 250; }
}
.sidebar h2 {
    font-family: 'Poppins', sans-serif; /* Modern font */
    font-size: clamp(1.4rem, 3.5vw, 1.8rem); /* Responsive heading */
    color: #1e3a8a; /* Dark blue */
    margin: 0 0 1.5rem; /* Increased spacing */
}
.sidebar .recent-post {
    margin-bottom: 1.5rem; /* Increased spacing */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover */
}
.sidebar .recent-post:hover {
    transform: translateY(-4px); /* Lift effect */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Shadow on hover */
}
.sidebar .recent-post img {
    width: 100%; /* Full-width */
    height: clamp(5rem, 15vw, 7rem); /* Slightly larger images */
    object-fit: cover; /* Crop to fit */
    margin-bottom: 0.75rem; /* Increased spacing */
    border-radius: 0.5rem; /* Softer corners */
    transition: opacity 0.3s ease; /* Smooth image hover */
}
.sidebar .recent-post img:hover {
    opacity: 0.9; /* Subtle fade on hover */
}
.sidebar .recent-post h3 {
    font-family: 'Poppins', sans-serif; /* Modern font */
    font-size: clamp(1rem, 2.5vw, 1.1rem); /* Slightly larger title */
    margin: 0 0 0.5rem; /* Adjusted spacing */
    color: #1e3a8a; /* Dark blue */
}
.sidebar .recent-post p {
    color: #4b5563; /* Darker gray for contrast */
    font-size: clamp(0.85rem, 2vw, 0.95rem); /* Responsive text */
    margin: 0 0 0.5rem; /* Adjusted spacing */
}
.sidebar .recent-post a {
    color: #3b82f6; /* Bright blue */
    text-decoration: none; /* No underline */
    font-size: clamp(0.8rem, 2vw, 0.9rem); /* Responsive link text */
    font-weight: 500; /* Medium weight */
    transition: color 0.3s ease; /* Smooth hover */
}
.sidebar .recent-post a:hover {
    color: #1e3a8a; /* Darker blue on hover */
    text-decoration: underline; /* Underline on hover */
}

/* Article styling */
article {
    background-color: white; /* White background */
    padding: clamp(1.5rem, 4vw, 2rem); /* Increased padding */
    border-radius: 1rem; /* Softer corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Stronger shadow */
    width: 100%; /* Full width */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover */
}
article:hover {
    transform: translateY(-4px); /* Lift effect */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); /* Stronger shadow */
}
article img {
    width: 100%; /* Full-width */
    height: clamp(10rem, 25vw, 14rem); /* Larger images */
    object-fit: cover; /* Crop to fit */
    margin-bottom: 1rem; /* Increased spacing */
    border-radius: 0.5rem; /* Softer corners */
    transition: opacity 0.3s ease; /* Smooth image hover */
}
article img:hover {
    opacity: 0.9; /* Subtle fade */
}
article h3 {
    font-family: 'Poppins', sans-serif; /* Modern font */
    font-size: clamp(1.2rem, 3.5vw, 1.5rem); /* Larger title */
    margin: 0 0 0.75rem; /* Increased spacing */
    color: #1e3a8a; /* Dark blue */
}
article p {
    color: #4b5563; /* Darker gray */
    margin: 0 0 0.75rem; /* Increased spacing */
    font-size: clamp(0.95rem, 2.5vw, 1.1rem); /* Larger text */
}
article a {
    color: #3b82f6; /* Bright blue */
    text-decoration: none; /* No underline */
    font-size: clamp(0.9rem, 2vw, 1rem); /* Responsive link text */
    font-weight: 500; /* Medium weight */
    transition: color 0.3s ease; /* Smooth hover */
}
article a:hover {
    color: #1e3a8a; /* Darker blue */
    text-decoration: underline; /* Underline on hover */
}

/* Footer styling */
footer {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6); /* Gradient background */
    color: white; /* White text */
    padding: clamp(2rem, 5vw, 3rem) 0; /* Increased padding */
    text-align: center; /* Center text */
    width: 100%; /* Full width */
    box-shadow: 0 -2px 8px rgba(59,130,246,0.07); /* From first */
}
footer p {
    margin: 0 0 1rem; /* Spacing below copyright */
    font-size: clamp(0.9rem, 2.5vw, 1rem); /* Responsive font */
}
footer ul {
    list-style: none; /* Remove bullet points */
    display: flex; /* Horizontal links */
    justify-content: center; /* Center links */
    gap: clamp(1.5rem, 4vw, 2rem); /* Larger gap */
    margin: 0; /* Remove margin */
    padding: 0; /* Remove padding */
    flex-wrap: wrap; /* Wrap on small screens */
}
footer a {
    color: white; /* White text */
    text-decoration: none; /* No underline */
    font-size: clamp(0.95rem, 2.5vw, 1.1rem); /* Responsive font */
    font-family: 'Poppins', sans-serif; /* Modern font */
    transition: color 0.3s ease, transform 0.3s ease; /* Smooth hover */
}
footer a:hover {
    color: #e0e7ff; /* Light indigo */
    transform: translateY(-2px); /* Lift effect */
}

/* Enhanced Footer Layout */
footer .footer-grid { display:grid; gap:2rem; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); align-items:start; text-align:left; }
footer .footer-brand h3 { margin:0 0 .5rem; font-family:'Poppins',sans-serif; font-size:1.35rem; letter-spacing:.5px; }
footer .footer-brand p { line-height:1.4; }
footer .footer-copy { margin-top:1rem; font-size:.8rem; opacity:.8; }
footer h4 { margin:.25rem 0 .75rem; font-size:1rem; font-weight:600; font-family:'Poppins',sans-serif; letter-spacing:.5px; }
footer .footer-links ul, footer .footer-meta ul { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.4rem; }
footer .footer-links a, footer .footer-meta a { font-size:.9rem; opacity:.9; }
footer .footer-links a:hover, footer .footer-meta a:hover { opacity:1; text-decoration:underline; }
footer .footer-subscribe-form { display:flex; flex-direction:column; gap:.55rem; }
footer .footer-subscribe-form input { padding:.6rem .75rem; border-radius:.55rem; border:1px solid #334155; background:#0f172a; color:#fff; font-size:.85rem; }
footer .footer-subscribe-form input:focus { outline:none; box-shadow:0 0 0 3px rgba(255,255,255,0.15); }
footer .footer-subscribe-form button { padding:.6rem .9rem; border:none; background:#1e3a8a; color:#fff; font-size:.8rem; border-radius:.55rem; cursor:pointer; font-weight:600; letter-spacing:.5px; transition:background .25s ease, transform .25s ease; }
footer .footer-subscribe-form button:hover { background:#3b82f6; transform:translateY(-2px); }
footer .footer-subscribe-status { font-size:.7rem; min-height:1em; }
footer .footer-social { display:flex; gap:.6rem; margin-top:.75rem; }
footer .footer-social .social-icon { width:32px; height:32px; display:flex; align-items:center; justify-content:center; background:#1e3a8a; color:#fff !important; text-decoration:none; border-radius:50%; font-size:.75rem; font-weight:600; letter-spacing:.5px; transition:background .25s ease, transform .25s ease; }
footer .footer-social .social-icon:hover { background:#3b82f6; transform:translateY(-2px); }
footer .footer-social .social-icon--twitter { background:#000; }
footer .footer-social .social-icon--twitter:hover { background:#111; }
footer .footer-social .social-icon--facebook { background:#1877F2; }
footer .footer-social .social-icon--facebook:hover { background:#0d65d9; }
footer .footer-social .social-icon--instagram { 
    background: radial-gradient(circle at 30% 110%, #feda75 0%, #fa7e1e 25%, #d62976 50%, #962fbf 70%, #4f5bd5 90%);
    box-shadow:0 2px 6px rgba(214,41,118,0.4);
}
footer .footer-social .social-icon--instagram:hover { 
    filter:brightness(1.1);
    transform:translateY(-2px) scale(1.05);
}
footer .footer-social .social-icon--tiktok { background:#000; position:relative; overflow:hidden; }
footer .footer-social .social-icon--tiktok svg { width:22px; height:22px; }
footer .footer-social .social-icon--tiktok:hover { background:#111; box-shadow:0 0 0 3px rgba(255,255,255,0.15); }
footer .back-to-top, #back-to-top { position:fixed; right:1.1rem; bottom:1.1rem; background:#1e3a8a; color:#fff; border:none; width:44px; height:44px; border-radius:50%; cursor:pointer; box-shadow:0 4px 20px rgba(0,0,0,0.3); font-size:1.2rem; display:flex; align-items:center; justify-content:center; transition:background .3s ease, transform .3s ease; z-index:999; }
footer .back-to-top:hover, #back-to-top:hover { background:#3b82f6; transform:translateY(-4px); }
@media (max-width:600px) { footer .footer-grid { grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:1.5rem; } }

/* Visually hidden utility (if not present elsewhere) */
.visually-hidden { position:absolute !important; left:-9999px !important; width:1px !important; height:1px !important; overflow:hidden !important; }

/* Fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Post Details styling (from first) */
.post-details {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease-out;
}
.post-details h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    color: #1e3a8a;
    margin-bottom: 1rem;
    line-height: 1.3;
}
.post-details img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(59,130,246,0.09);
}

/* Post Meta styling (from first) */
.post-meta {
    display: flex;
    gap: 1rem;
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.post-meta svg {
    width: 16px;
    height: 16px;
    fill: #64748b;
}

/* ===== Enhanced Post Page Layout ===== */
body .article-layout { position:relative; }
.article-grid { display:grid; grid-template-columns: minmax(0,1fr) 300px; gap:clamp(2rem,4vw,3rem); align-items:start; }
/* Prevent horizontal cut-off on small but >1080px breakpoints where 300px + padding may overflow */
@media (max-width: 980px){
    .article-grid { grid-template-columns: 1fr; }
    .article-aside { position:static; width:100%; }
}
/* Clamp descendants to viewport to avoid accidental horizontal scroll on post page */
.article-layout, .article-layout * { max-width:100%; }
.article-layout img, .article-layout iframe { height:auto; }
@media (max-width: 1080px){ .article-grid { grid-template-columns: 1fr; } .article-aside { order:2; display:flex; flex-wrap:wrap; gap:1rem; } .article-aside .aside-card { flex:1 1 260px; } }

.post-column { position:relative; }
#reading-progress { position:fixed; top:0; left:0; height:4px; width:100%; background:linear-gradient(90deg,#1e3a8a var(--progress,0%), #e2e8f0 var(--progress,0%)); z-index:1500; transition:background-size .15s linear; }

.post-header-block { display:flex; flex-direction:column; gap:.75rem; }
.post-kicker-row { 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.pill { 
    background: linear-gradient(135deg, #1e3a8a, #3b82f6); 
    color: #fff; 
    padding: 0.4rem 0.85rem; 
    font-size: 0.75rem; 
    letter-spacing: 0.5px; 
    text-transform: uppercase; 
    border-radius: 0.5rem; 
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.2);
}
.reading-badge { 
    background: #eff6ff; 
    color: #1e40af; 
    padding: 0.4rem 0.75rem; 
    font-size: 0.75rem; 
    border-radius: 0.5rem; 
    font-weight: 600;
    border: 1px solid #bfdbfe;
}
.post-title { 
    font-family: 'Poppins', sans-serif; 
    font-size: clamp(2.25rem, 5vw, 3.5rem); 
    line-height: 1.2; 
    margin: 0.5rem 0 1rem; 
    letter-spacing: -0.02em;
    font-weight: 800;
    color: #0f172a;
    max-width: 90%;
}
.post-hero { 
    margin: 1.5rem 0 2rem; 
    position: relative; 
    overflow: hidden; 
    border-radius: 1rem;
    box-shadow: 0 12px 32px -8px rgba(30, 58, 138, 0.25);
}
.post-hero img { 
    width: 100%; 
    height: clamp(320px, 55vh, 600px); 
    object-fit: cover; 
    display: block; 
    filter: saturate(1.05) brightness(0.98); 
    transition: transform 0.6s ease, filter 0.4s ease;
}
.post-hero img:hover { 
    transform: scale(1.015); 
    filter: saturate(1.1) brightness(1);
}

.content.typography { 
    font-size: 1.125rem; 
    line-height: 1.85; 
    color: #1e293b;
    max-width: 75ch;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.content.typography p { 
    margin: 1.5rem 0; 
    text-align: justify;
    hyphens: auto;
}
.content.typography p:first-of-type {
    font-size: 1.2rem;
    line-height: 1.75;
    color: #0f172a;
}
.content.typography h2, .content.typography h3 { 
    font-family: 'Poppins', sans-serif; 
    color: #0f172a; 
    scroll-margin-top: 100px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.content.typography h2 { 
    margin: 3rem 0 1.25rem; 
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    border-bottom: 3px solid #e0e7ff;
    padding-bottom: 0.5rem;
}
.content.typography h3 { 
    margin: 2.5rem 0 1rem; 
    font-size: clamp(1.35rem, 2.5vw, 1.65rem);
}
.content.typography blockquote { 
    margin: 2.5rem 0; 
    padding: 1.5rem 2rem; 
    background: linear-gradient(135deg, #eff6ff, #dbeafe); 
    border-left: 5px solid #3b82f6; 
    border-radius: 0.75rem; 
    font-style: italic; 
    color: #1e293b; 
    position: relative;
    font-size: 1.15rem;
    line-height: 1.7;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.08);
}
.content.typography blockquote:before { 
    content: '\201C'; 
    font-size: 5rem; 
    position: absolute; 
    top: -1.5rem; 
    left: 1rem; 
    color: rgba(59, 130, 246, 0.15);
    font-family: Georgia, serif;
}
.content.typography img { 
    border-radius: 0.75rem; 
    margin: 2rem auto; 
    box-shadow: 0 8px 24px -8px rgba(30, 58, 138, 0.2);
    display: block;
}
.content.typography a { 
    color: #2563eb; 
    font-weight: 500; 
    text-decoration: none; 
    border-bottom: 2px solid #93c5fd; 
    transition: all 0.2s ease;
    padding-bottom: 1px;
}
.content.typography a:hover { 
    color: #1e40af; 
    border-bottom-color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
}
.content.typography ul, .content.typography ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    line-height: 1.85;
}
.content.typography li {
    margin: 0.75rem 0;
}
.content.typography code {
    background: #f1f5f9;
    color: #e11d48;
    padding: 0.2rem 0.5rem;
    border-radius: 0.35rem;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}
.content.typography pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 2rem 0;
    line-height: 1.6;
}
.content.typography pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Outline & aside cards */
.article-aside { position:sticky; top:90px; align-self:start; height:fit-content; display:flex; flex-direction:column; gap:1.25rem; }
.aside-card { background:#ffffff; border:1px solid #e2e8f0; border-radius:.9rem; padding:1rem 1.05rem 1.2rem; box-shadow:0 4px 14px -6px rgba(30,58,138,.12); animation:fadeIn .5s ease; }
.aside-card h3 { font-family:'Poppins',sans-serif; font-size:.95rem; margin:0 0 .75rem; letter-spacing:.5px; text-transform:uppercase; color:#1e3a8a; }
#outline-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.4rem; }
#outline-list li a { display:block; font-size:.85rem; padding:.4rem .55rem; border-radius:.45rem; text-decoration:none; color:#1e3a8a; background:#f1f5f9; line-height:1.3; transition:background .25s,color .25s; }
#outline-list li a:hover { background:#e0e7ff; color:#0f172a; }
#outline-list li.ol-h3 a { padding-left:1.25rem; font-size:.8rem; }
.meta-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:.35rem; font-size:.8rem; }
.meta-list li strong { color:#0f172a; font-weight:600; }
.tips-card ul { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:.4rem .75rem; }
.tips-card kbd { background:#1e3a8a; color:#fff; padding:.25rem .45rem; border-radius:.4rem; font-size:.65rem; box-shadow:0 2px 4px rgba(0,0,0,.15); }

/* Share bar */
.enhanced-share { display:flex; gap:.65rem; margin:2.25rem 0 1.25rem; position:sticky; top:70px; background:linear-gradient(90deg,#ffffffcc,#ffffffdd); backdrop-filter:blur(4px); padding:.5rem .75rem; border:1px solid #e2e8f0; border-radius:3rem; box-shadow:0 4px 14px -6px rgba(30,58,138,.18); z-index:500; }
.share-btn { background:#1e3a8a; color:#fff; border:none; width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:background .25s, transform .25s; position:relative; }
.share-btn svg { width:20px; height:20px; }
.share-btn:hover { background:#3b82f6; transform:translateY(-3px); }
.share-btn:active { transform:scale(.94); }
.share-btn[data-share="copy"].copied:after { content:'Copied'; position:absolute; top:-28px; background:#1e3a8a; color:#fff; padding:.2rem .5rem; font-size:.65rem; border-radius:.4rem; animation:fadeIn .3s ease; }

/* Article utility row */
.article-utility-row { margin:2rem 0 2.5rem; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:1rem; }
.article-utility-row .reading-time { font-size:.8rem; color:#475569; background:#f1f5f9; padding:.4rem .7rem; border-radius:.6rem; font-weight:500; }

/* Skeleton loader */
.post-skeleton { display:grid; gap:.9rem; margin:2rem 0 1rem; }
.sk-title { height:42px; background:linear-gradient(90deg,#e2e8f0,#f1f5f9,#e2e8f0); background-size:200% 100%; animation:shimmer 1.4s linear infinite; border-radius:.6rem; }
.sk-meta { height:18px; width:50%; background:linear-gradient(90deg,#e2e8f0,#f1f5f9,#e2e8f0); background-size:200% 100%; animation:shimmer 1.4s linear infinite; border-radius:.4rem; }
.sk-image { height: clamp(220px,40vh,420px); background:#e2e8f0; border-radius:1rem; position:relative; overflow:hidden; }
.sk-paragraph { height:14px; background:linear-gradient(90deg,#e2e8f0,#f1f5f9,#e2e8f0); background-size:200% 100%; animation:shimmer 1.4s linear infinite; border-radius:.4rem; }
.sk-paragraph.short { width:60%; }
@keyframes shimmer { 0%{background-position:0 0;} 100%{background-position:200% 0;} }

/* Back link refinement */
.back { text-decoration:none; font-weight:500; color:#1e3a8a; display:inline-flex; align-items:center; gap:.35rem; background:#eef2ff; padding:.55rem .9rem; border-radius:.65rem; transition:background .25s, color .25s; }
.back:hover { background:#e0e7ff; color:#0f172a; }

/* Responsive tweaks */
@media (max-width:740px){
    .enhanced-share { position:static; border-radius:1rem; justify-content:center; }
    .article-utility-row { justify-content:center; }
    .article-aside { position:static; flex-direction:row; }
    .aside-card { flex:1 1 100%; }
    .post-title { font-size:clamp(1.75rem,7vw,2.35rem); }
    .post-hero img { height: clamp(220px,48vw,380px); }
}


/* Share Buttons styling (from first) */
.share-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    position: relative;
}
.share-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #1e3a8a;
    text-decoration: none;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    position: relative;
}
.share-buttons a:hover {
    background: #c7d2fe;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(59,130,246,0.2);
}
.share-buttons a svg {
    width: 24px;
    height: 24px;
    fill: #1e3a8a;
    transition: fill 0.3s;
}
.share-buttons a:hover svg {
    fill: #1e40af;
}
.share-buttons a .tooltip {
    visibility: hidden;
    background: #1e3a8a;
    color: #fff;
    text-align: center;
    border-radius: 0.5rem;
    padding: 0.4rem 0.8rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}
.share-buttons a:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Related Posts styling (from first) */
.related-posts {
    margin-top: 3rem;
}
.related-posts h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    color: #1e3a8a;
    margin-bottom: 1.5rem;
}
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.related-post {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}
.related-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.related-post img {
    max-height: 150px;
}
.related-post h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: #1e3a8a;
    margin: 1rem;
    line-height: 1.4;
}

/* Category styling (from first) */
.category {
    color: #3b82f6;
    font-weight: 600;
    margin-bottom: 1rem;
    display: inline-block;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
    background: #e0e7ff;
    padding: 0.3rem 1rem;
    border-radius: 1rem;
}

/* Content styling (from first) */
.content {
    color: #222;
    font-size: 1.15rem;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, #f1f5f9 0%, #e0e7ff 100%);
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(59,130,246,0.07);
    padding: 2rem 1.5rem;
    line-height: 1.8;
    letter-spacing: 0.01em;
    font-family: 'Inter', sans-serif;
    transition: box-shadow 0.3s;
}
.content:hover {
    box-shadow: 0 6px 24px rgba(59,130,246,0.13);
}

/* Back link styling (from first) */
a.back {
    display: inline-block;
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 500;
    margin-top: 2rem;
    background: #e0e7ff;
    padding: 0.5rem 1.2rem;
    border-radius: 1rem;
    transition: background 0.3s;
}
a.back:hover {
    text-decoration: underline;
    background: #c7d2fe;
}

/* Read More Button styling (from first) */
.read-more-btn {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6, #1e3a8a);
    color: #fff !important;
    padding: 0.6rem 1.4rem;
    border-radius: 2rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    text-decoration: none;
    margin-top: 0.5rem;
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
    box-shadow: 0 2px 8px rgba(59,130,246,0.08);
}
.read-more-btn:hover {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    box-shadow: 0 4px 16px rgba(59,130,246,0.15);
    transform: translateY(-2px);
}

/* Media Queries for responsiveness */
@media (max-width: 768px) { /* Tablets and smaller */
    header .container {
        flex-wrap: wrap; /* Allow wrapping */
        gap: 1rem; /* Increased spacing */
    }
    .search-container { margin-right:0 !important; max-width:50%; }
    header .container { overflow-x:hidden; }
    nav ul {
        justify-content: center; /* Center nav items */
        width: 100%; /* Full width */
        margin-top: 1rem; /* Increased space */
    }
    .search-container {
        max-width: 40%; /* Wider search */
    }
    .hero-section {
        padding: clamp(2.5rem, 6vw, 3.5rem); /* Adjusted padding */
    }
    .hero-section h2 {
        font-size: clamp(1.8rem, 5vw, 2.5rem); /* Smaller heading */
    }
    .hero-section p {
        font-size: clamp(1rem, 3vw, 1.2rem); /* Smaller text */
    }
    .latest-posts .container {
        grid-template-columns: 1fr; /* Stack sidebar below */
    }
    .sidebar {
        margin-top: 2rem; /* Increased spacing */
    }
    .post-details {
        padding: 1.5rem; /* From first */
    }
}

@media (max-width: 480px) { /* Mobile devices */
    .container {
        width: 95%; /* Nearly full width */
        padding: 0 0.75rem; /* Adjusted padding */
    }
    .search-container { margin-right:0 !important; max-width:60%; }
    body, html { overflow-x:hidden; }
    header {
        padding: 1rem 0; /* Reduced padding */
    }
    header .container {
        flex-direction: row; /* Keep row layout */
        align-items: center; /* Center vertically */
        justify-content: space-between; /* Space out */
        padding: 0.75rem; /* Adjusted padding */
    }
    header h1 {
        font-size: clamp(1.5rem, 4vw, 1.8rem); /* Smaller logo */
        flex: 0 1 auto; /* Prevent overgrowth */
    }
    .nav-toggle {
        display: block; /* Show hamburger */
    }
    nav {
        width: 100%; /* Full width */
        order: 1; /* Move below */
    }
    nav ul {
        display: none; /* Hide by default */
        flex-direction: column; /* Vertical links */
        align-items: stretch; /* Full-width clickable rows */
        width: 100%; /* Will be constrained by refined override later */
        background: transparent; /* Base, refined override adds panel */
        padding: 0; /* Base reset */
        position: absolute; /* Position below header */
        top: 100%; /* Below header */
        left: 0; /* Align left */
        right: 0; /* Span viewport */
        z-index: 1000; /* Above content */
        max-width: 100%; /* Prevent overflow */
        overflow-x: hidden; /* Prevent horizontal scroll */
    }
    nav ul.show {
        display: flex; /* Show when toggled */
    }
    nav a {
        font-size: 1.05rem; /* Comfortable size */
        padding: 0.65rem 0.75rem; /* Touch area */
        width: 100%; /* Full-width row in panel */
        border-radius:0.65rem !important;
        color:#0f172a !important;
        font-weight:500;
        position:relative;
    }
    nav a::after { bottom:0.4rem; }
    nav a:hover { background:rgba(0,0,0,0.05) !important; }
    nav a:active { background:rgba(0,0,0,0.1) !important; }
    /* (Removed stray closing brace that caused syntax error) */
    .search-container {
        max-width: 50%; /* Wider search */
    }
    .search-container input {
        max-width: clamp(80px, 30vw, 120px); /* Smaller input */
    }
    .hero-section {
        padding: clamp(2rem, 5vw, 2.5rem); /* Smaller padding */
    }
    .hero-section h2 {
        font-size: clamp(1.5rem, 4vw, 2rem); /* Smaller heading */
    }
    .hero-section p {
        font-size: clamp(0.9rem, 3vw, 1rem); /* Smaller text */
    }
    .latest-posts .grid {
        grid-template-columns: 1fr; /* Single column */
    }
    article img {
        height: clamp(8rem, 20vw, 10rem); /* Smaller images */
    }
    .sidebar .recent-post img {
        height: clamp(4rem, 15vw, 6rem); /* Smaller sidebar images */
    }
    .post-details h1 {
        font-size: clamp(1.5rem, 3.5vw, 1.8rem); /* From first */
    }
}

/* Hero navigation arrows (new styling) */
.hero-nav { position:absolute; bottom:0.9rem; top:auto; transform:none; background:rgba(30,58,138,0.9); color:#fff; border:none; border-radius:50%; width:2.5rem; height:2.5rem; cursor:pointer; z-index:5; display:flex; align-items:center; justify-content:center; box-shadow:0 4px 14px rgba(30,58,138,0.25); transition:background .25s, transform .25s; }
.hero-nav:hover { background:#1e3a8a; transform:scale(1.05); }
.hero-prev { left:0.9rem; }
.hero-next { right:0.9rem; }
@media (max-width:900px){ .hero-prev { left:0.65rem; } .hero-next { right:0.65rem; } }
@media (max-width:640px){ .hero-nav { width:2.2rem; height:2.2rem; bottom:0.75rem; } .hero-prev { left:0.6rem; } .hero-next { right:0.6rem; } }

    
/* --- HEADER GRADIENT THEME (Modern UI) ---------------------------------- */
/* Keep the modern gradient header with glass-morphism effect */
/* header {
    background: #ffffff !important;
    color: #1e3a8a !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.05);
} */
/* Commented out to preserve gradient header */
header h1, header h2 { color: white !important; }
.nav-logo svg { color: white !important; fill: white !important; }
.nav-logo .logo-link { color: white !important; }

/* Navigation links on gradient background */
nav a { color: white !important; }
nav a:hover { background: rgba(255, 255, 255, 0.1) !important; color: #e0e7ff !important; }
nav a.active { background: rgba(255, 255, 255, 0.2) !important; color: white !important; font-weight: 600; }
nav a:focus-visible { outline: 2px solid white; outline-offset: 2px; }

/* Mobile menu: refined translucent panel (reduces solid white block under hero) */
@media (max-width: 480px) {
    nav ul {
        background:linear-gradient(180deg,rgba(255,255,255,0.95),rgba(255,255,255,0.88)) !important;
        box-shadow:0 12px 28px -8px rgba(15,23,42,0.22), 0 4px 10px -2px rgba(15,23,42,0.12) !important;
        border:1px solid #e2e8f0;
        border-radius:1rem;
        padding:1rem 1.15rem 1.1rem;
        margin:0.4rem 0 0; /* slight separation from header */
        width:auto; /* shrink to inset */
        left:0.75rem;
        right:0.75rem;
        position:absolute;
        backdrop-filter:blur(6px);
        -webkit-backdrop-filter:blur(6px);
        max-height:70vh; /* prevent covering whole screen */
        overflow-y:auto;
        box-sizing:border-box;
    }
    nav ul.show { animation:mobileNavSlide .28s ease; }
    @keyframes mobileNavSlide { from { opacity:0; transform:translateY(-8px);} to { opacity:1; transform:translateY(0);} }
}

/* Hamburger icon - keep white on gradient header */
.nav-toggle { color: white !important; }
.nav-toggle:hover { background: rgba(255, 255, 255, 0.2) !important; border-radius: 0.5rem; }

/* Search input contrast on white header */
.search-container input { background:#f1f5f9 !important; border:1px solid #e2e8f0; box-shadow:none; }
.search-container input:focus { box-shadow:0 0 0 3px rgba(30,58,138,0.25) !important; }

/* Ensure hero still has space visually separated */
.hero-section { margin-top: 1.25rem; }

/* Adjust footer border separation from content for visual balance */
footer { border-top: 4px solid #1e3a8a; }

/* ------------------------------------------------------------------------------ */
/* Home page active nav background restoration */
/* Home nav highlight only on hover now */
body.home-page nav a.active { background:transparent !important; }
body.home-page nav a.active:hover {
    background: rgba(0,0,0,0.08) !important;
    border-radius:1.4rem !important;
}
/* --- FOOTER BLACK THEME OVERRIDE --------------------------------------------- */
footer {
    background:#000 !important;
    color:#fff !important;
    border-top:none !important;
}
footer p { color:#fff !important; }
footer a { color:#fff !important; }
footer a:hover { color:#cbd5e1 !important; }
/* ------------------------------------------------------------------------------ */
/* Enhanced Hero Slider Styles */
.hero-section { position:relative; }
#dynamic-hero { width:100%; max-width:1100px; margin:0 auto; position:relative; }
#dynamic-hero.single-slide .hero-controls, #dynamic-hero.single-slide .hero-dots, #dynamic-hero.single-slide .hero-progress { display:none; }
.hero-slider { position:relative; overflow:hidden; }
.hero-slide { position:relative; display:none; animation:fadeIn .6s ease; }
.hero-slide.active { display:block; }
.hero-media-wrapper { position:relative; aspect-ratio:16/9; width:100%; overflow:hidden; border-radius:18px 18px 0 0; }
.hero-img { width:100%; height:100%; object-fit:cover; display:block; }
.hero-overlay { position:absolute; inset:0; background:linear-gradient(180deg,rgba(0,0,0,0.5),rgba(0,0,0,0.2)); pointer-events:none; }
.hero-meta-top { position:absolute; top:.75rem; left:.75rem; display:flex; gap:.5rem; flex-wrap:wrap; z-index:2; }
.hero-cat { background:#1e3a8a; color:#fff; padding:.35rem .75rem; font-size:.7rem; border-radius:1rem; letter-spacing:.5px; font-weight:600; text-transform:uppercase; }
.hero-date, .hero-rt { background:rgba(0,0,0,0.55); color:#fff; padding:.35rem .6rem; font-size:.65rem; border-radius:.6rem; }
.hero-content-wrapper { background:#fff; padding:1rem 1.1rem 1.4rem; border-radius:0 0 18px 18px; box-shadow:0 4px 16px rgba(0,0,0,0.08); position:relative; }
.hero-title { font-family:'Poppins',sans-serif; font-size:clamp(1.15rem,2.1vw,1.65rem); margin:.4rem 0 .55rem; line-height:1.25; color:#0a2a6c; }
.hero-title a { text-decoration:none; color:inherit; }
.hero-title a:hover { text-decoration:underline; }
.hero-excerpt { font-size:clamp(.85rem,1.8vw,1rem); margin:.2rem 0 .7rem; color:#222; line-height:1.42; }
.hero-read-more { font-size:.75rem; }
.hero-controls { position:absolute; inset:0; pointer-events:none; }
.hero-btn { position:absolute; top:50%; transform:translateY(-50%); background:rgba(0,0,0,0.55); color:#fff; width:2.4rem; height:2.4rem; border:none; border-radius:50%; cursor:pointer; pointer-events:auto; display:flex; align-items:center; justify-content:center; backdrop-filter:blur(2px); transition:background .25s, transform .25s; }
.hero-btn:hover { background:rgba(0,0,0,0.75); transform:translateY(-50%) scale(1.07); }
.hero-btn.prev { left:.6rem; }
.hero-btn.next { right:.6rem; }
.hero-dots { display:flex; justify-content:center; gap:.5rem; margin:.75rem 0 .4rem; flex-wrap:wrap; }
.hero-dot { width:.65rem; height:.65rem; border-radius:50%; border:none; background:#cbd5e1; cursor:pointer; padding:0; transition:background .3s, transform .3s; }
.hero-dot[aria-selected="true"] { background:#1e3a8a; transform:scale(1.3); }
.hero-progress { position:relative; height:4px; background:#e5e7eb; border-radius:4px; overflow:hidden; margin:.2rem auto 1rem; max-width:400px; }
.hero-progress-bar { position:absolute; left:0; top:0; bottom:0; width:0%; background:linear-gradient(90deg,#1e3a8a,#3b82f6); }
.hero-empty { background:#fff; border-radius:16px; padding:3rem 1.5rem; text-align:center; box-shadow:0 4px 18px rgba(0,0,0,0.06); font-size:1rem; color:#334155; }
.hero-empty p { margin:0; }
@media (max-width:820px){ .hero-media-wrapper { border-radius:14px 14px 0 0; } .hero-content-wrapper { border-radius:0 0 14px 14px; } .hero-btn { width:2.1rem; height:2.1rem; } }
@media (max-width:640px){ .hero-btn { top:auto; bottom:.6rem; transform:none; } .hero-btn.prev { left:.55rem; } .hero-btn.next { right:.55rem; } .hero-progress { margin:.6rem auto 1.1rem; } }
@media (prefers-reduced-motion: reduce){ .hero-slide { animation:none; } .hero-progress { display:none !important; } }
/* End Enhanced Hero Slider Styles */
/* Hero Compact Size Overrides */
/* Reduce overall hero footprint (user request: hero section too big) */
body .hero-section { min-height:auto !important; padding-top:0.75rem; padding-bottom:1.5rem; }
body #dynamic-hero { max-width:980px; }
body #dynamic-hero .hero-media-wrapper { aspect-ratio:16/7; max-height:clamp(240px,45vh,420px); }
body #dynamic-hero .hero-content-wrapper { padding:0.85rem 1rem 1.1rem; }
body #dynamic-hero .hero-title { font-size:clamp(1rem,1.8vw,1.4rem); margin:.25rem 0 .5rem; }
body #dynamic-hero .hero-excerpt { font-size:clamp(.8rem,1.5vw,.95rem); margin:.15rem 0 .55rem; }
body #dynamic-hero .hero-cat { font-size:.62rem; padding:.3rem .55rem; }
body #dynamic-hero .hero-date, 
body #dynamic-hero .hero-rt { font-size:.55rem; padding:.3rem .5rem; }
body #dynamic-hero .hero-btn { width:2.05rem; height:2.05rem; }
@media (max-width:640px){
    body #dynamic-hero .hero-media-wrapper { aspect-ratio:16/8; max-height:clamp(200px,42vh,340px); }
    body #dynamic-hero .hero-content-wrapper { padding:0.75rem .85rem 1rem; }
    body #dynamic-hero .hero-title { font-size:clamp(.95rem,4vw,1.2rem); }
    body #dynamic-hero .hero-excerpt { font-size:clamp(.75rem,3.2vw,.9rem); }
}
/* End Hero Compact Size Overrides */
/* --- NAV UNDERLINE HOVER EFFECT OVERRIDE -------------------------------------- */
/* Replace background hover with animated underline line for nav links. */
nav a {
    position: relative;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0.5rem 0.9rem; /* slightly tighter for underline aesthetic */
    transition: color .25s ease;
}
nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0.25rem; /* a bit above bottom for visual balance */
    width: 100%;
    height: 2px;
    background: #000; /* underline color */
    transform: scaleX(0); /* hidden by default */
    transform-origin: left center;
    transition: transform .25s ease, background-color .3s ease;
}
/* Removed active underline to make Home behave same as others (no line). */
nav a:focus-visible { outline:2px solid #000; outline-offset:2px; }
/* ------------------------------------------------------------------------------ */

/* Reinforce mobile nav link sizing after global overrides */
@media (max-width:480px){
    nav ul.show a { font-size:1.05rem; padding:0.65rem 0.75rem; }
}

/* Mobile nav reset (remove scrollable floating container) */
@media (max-width:480px){
    nav ul { 
        position:static !important; 
        left:auto !important; right:auto !important; top:auto !important; 
        width:100% !important; 
        background:transparent !important; 
        padding:0.35rem 0 0 0 !important; 
        margin:0 !important; 
        border:none !important; 
        border-radius:0 !important; 
        box-shadow:none !important; 
        max-height:none !important; 
        overflow:visible !important; 
        backdrop-filter:none !important; -webkit-backdrop-filter:none !important;
        animation:none !important;
    }
    nav ul.show { display:flex; flex-direction:column; }
    header { position:sticky; }
}

/* Body scroll lock when nav open (mobile) */
@media (max-width:480px){
    body.nav-open, html.nav-open { overflow:hidden !important; height:100%; }
    body.nav-open main, body.nav-open footer { filter:blur(1px); transition:filter .25s ease; }
    body.nav-open header { box-shadow:0 2px 12px rgba(0,0,0,0.15); }
}

/* ================= Subscription Bell & Modal ================= */
.subscribe-bell { 
    position: relative;
    background: rgba(255, 255, 255, 0.15); 
    border: none; 
    color: white !important; 
    cursor: pointer; 
    padding: 0.6rem; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.3s ease; 
    margin-left: 0.75rem;
}
.subscribe-bell:hover { 
    background: rgba(255, 255, 255, 0.25) !important; 
    transform: scale(1.1) rotate(15deg) !important; 
}
.subscribe-bell:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.subscribe-bell.subscribed { color: white !important; }
.subscribe-bell.subscribed:hover { background: rgba(255, 255, 255, 0.3) !important; }
.subscribe-bell-badge svg { display: block; }
.subscribe-bell svg { fill: white !important; }

.subscription-modal { 
    position:fixed; inset:0; 
    background:rgba(0,0,0,0.4); 
    display:flex; 
    align-items:center; 
    justify-content:center; 
    padding:1.5rem; 
    opacity:0; 
    pointer-events:none; 
    transition:opacity .3s ease; 
    z-index:2000;
}
.subscription-modal.open { opacity:1; pointer-events:auto; }
.subscription-dialog { 
    background:#ffffff; 
    width:100%; 
    max-width:380px; 
    border-radius:1rem; 
    padding:1.75rem 1.5rem 1.5rem; 
    box-shadow:0 10px 32px -4px rgba(0,0,0,.15), 0 4px 12px rgba(0,0,0,.08);
    position:relative; 
    animation:fadeIn .4s ease;
}
.subscription-dialog h2 { 
    margin:0 0 .5rem; 
    font-family:'Poppins',sans-serif; 
    font-size:1.35rem; 
    color:#0a2a6c; 
}
.subscription-desc { 
    margin:0 0 1.1rem; 
    font-size:.9rem; 
    color:#334155; 
    line-height:1.4; 
}
.subscription-dialog form { display:flex; flex-direction:column; gap:.75rem; }
.subscription-dialog input[type=email] { 
    padding:.75rem .9rem; 
    border:1px solid #cbd5e1; 
    border-radius:.65rem; 
    font-size:.95rem; 
    font-family:'Inter',sans-serif; 
    background:#f8fafc; 
    transition:border-color .25s, box-shadow .25s; 
}
.subscription-dialog input[type=email]:focus { 
    outline:none; 
    border-color:#1e3a8a; 
    box-shadow:0 0 0 3px rgba(30,58,138,0.25); 
}
.subscription-submit { 
    background:linear-gradient(135deg,#3b82f6,#1e3a8a); 
    border:none; 
    color:#fff; 
    padding:.7rem 1rem; 
    border-radius:.65rem; 
    font-size:.9rem; 
    font-family:'Poppins',sans-serif; 
    cursor:pointer; 
    font-weight:500; 
    letter-spacing:.3px; 
    transition:box-shadow .25s, transform .25s, background .3s; 
}
.subscription-submit:hover { 
    box-shadow:0 4px 14px rgba(59,130,246,0.3); 
    transform:translateY(-2px); 
}
.subscription-close { 
    position:absolute; 
    top:.6rem; 
    right:.75rem; 
    background:transparent; 
    border:none; 
    font-size:1.5rem; 
    color:#64748b; 
    cursor:pointer; 
    line-height:1; 
}
.subscription-close:hover { color:#1e3a8a; }
.subscription-status { 
    min-height:1.1rem; 
    font-size:.75rem; 
    font-weight:500; 
    color:#334155; 
    visibility:hidden; 
}
.subscription-status[data-status=error] { color:#b91c1c; }
.subscription-status[data-status=success] { color:#047857; }
.visually-hidden { 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; }
@media (max-width:480px){ .subscription-dialog { max-width:92%; padding:1.4rem 1.2rem 1.2rem; } }
/* ============================================================ */

/* --- NAV BORDER RADIUS OVERRIDE (user request: add radius) -------------------- */
nav a {
    border:none !important; /* border removed per latest request */
    border-radius:1.4rem !important; /* keep pill shape */
    background:transparent; /* transparent so underline stays clean */
}
/* Hover/active styling handled by underline + color rules above; explicit border styles removed. */
@media (max-width:480px){
    nav a { width:auto; }
}
/* ------------------------------------------------------------------------------ */


/* === Inline Ad Wrapper Overrides (remove white border/background) === */
.inline-article-ad, .inline-article-ad * { box-shadow:none !important; }
.inline-article-ad { background:transparent !important; padding:0 !important; border:none !important; outline:none !important; }
.inline-article-ad iframe { border:0 !important; outline:0 !important; background:transparent !important; display:block; margin:0 auto !important; }
/* Force collapse of any default margins inserted by ad code */
.inline-article-ad > div:first-child { margin-top:0 !important; }
.inline-article-ad > div:last-child { margin-bottom:0 !important; }

/* ====================================================================== */
/* HEADER AD SLOT FIXED DIMENSIONS (User request: width 728, height 90)    */
/* Desktop: 728x90 (Leaderboard). Mobile fallback: 320x50.                 */
:root { --header-ad-width: 728px; --header-ad-height: 90px; }
#header-ad-slot {
    width: var(--header-ad-width);
    height: var(--header-ad-height);
    max-width: 100%; /* Prevent horizontal scroll */
    max-height: var(--header-ad-height);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Crop anything larger */
    margin: 0.3rem auto 0; /* Slight gap below nav/logo */
    padding: 0;
    line-height: 0; /* Remove inline gaps */
    position: relative;
}
/* On very narrow screens, wrap slot to allow internal creative scaling */
@media (max-width:400px){
    #header-ad-slot { width:100%; }
}
/* Constrain creative containers */
#header-ad-slot img,
#header-ad-slot iframe,
#header-ad-slot video,
#header-ad-slot > div,
#header-ad-slot ins, /* some ad networks inject <ins> */
#header-ad-slot script + div { /* common script wrapper */
    width: 100% !important;
    height: 100% !important;
    max-width: var(--header-ad-width) !important;
    max-height: var(--header-ad-height) !important;
    object-fit: contain;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
/* Neutralize stray margins/padding from injected ad code */
#header-ad-slot * { margin-top:0 !important; margin-bottom:0 !important; }
/* Hide the slot entirely if nothing was injected */
#header-ad-slot:empty { display:none; }
/* Mobile fallback size */
@media (max-width: 760px) {
    :root { --header-ad-width: 320px; --header-ad-height: 50px; }
}
/* Optional ultra-narrow fallback */
@media (max-width: 400px) {
    :root { --header-ad-width: 300px; --header-ad-height: 50px; }
}
/* ====================================================================== */

/* === Responsive Ad Utilities ========================================= */
.ad-responsive { position:relative; display:flex; align-items:center; justify-content:center; width:100%; max-width:100%; overflow:hidden; }
.ad-responsive[data-aspect] { aspect-ratio: attr(data-aspect); }
.ad-scale-wrapper { position:relative; display:inline-block; line-height:0; }
/* Allow downscaling large creatives on narrow mobile without cropping */
@media (max-width: 640px){
    .ad-auto-scale[data-width][data-height] { position:relative; }
    .ad-auto-scale[data-width][data-height] > * { 
         width: attr(data-width px); height: attr(data-height px); max-width:none; display:block; 
         transform-origin: top left; 
    }
    .ad-auto-scale[data-width][data-height][data-scaled="true"] > * { pointer-events:auto; }
}
/* Sidebar ad full bleed on very small screens */
@media (max-width:480px){
    #sidebar-ad-slot iframe { width:100% !important; height:auto !important; aspect-ratio:300/250; }
    #sidebar-ad-slot { background:transparent !important; border:none !important; }
}
/* Header: ensure no horizontal scroll when scaling down */
@media (max-width:480px){
    #header-ad-slot { width:100% !important; }
    #header-ad-slot > div, #header-ad-slot iframe, #header-ad-slot img { width:100% !important; height:auto !important; }
}
/* Inline article ads: ensure shrink within content column */
.inline-article-ad iframe, .inline-article-ad img { width:100% !important; height:auto !important; }
/* ====================================================================== */
/* Mobile Cleanup: remove large white block under hero on home page */
@media (max-width: 640px) {
    body.home-page .latest-posts { 
        background: transparent !important; 
        padding-top: 1rem; 
        padding-bottom: 2rem; 
    }
    body.home-page .latest-posts .container { 
        background: transparent !important; 
    }
    body.home-page .latest-posts .sidebar { 
        background: transparent !important; 
        box-shadow: none !important; 
        padding: 0.75rem 0 0 0; 
    }
    body.home-page .latest-posts .sidebar h2 { margin-top:0; }
    /* Flatten article cards for cleaner feed (activated) */
    body.home-page .latest-posts article { background:transparent !important; box-shadow:none !important; padding:0 0 1.35rem 0 !important; border-radius:0 !important; border-bottom:1px solid #e2e8f0; }
    body.home-page .latest-posts article:last-child { border-bottom:none; }
    body.home-page .latest-posts article img { border-radius:0.65rem; }
}


