/* ========================================
   BLOG PAGE STYLES - MODERN & RESPONSIVE
   ======================================== */

/* Essential CSS Variables */
:root {
    --header-height: 80px;
    --transition-normal: 0.3s ease;
    --transition-fast: 0.2s ease;
    --border-radius-sm: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.2);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
    
    /* Medical theme colors */
    --medical-blue: #3b82f6;
    --medical-light: #60a5fa;
    --medical-dark: #1e40af;
    --primary-blue: #2563eb;
    --primary-cyan: #06b6d4;
    --text-gray-600: #4b5563;
    --text-gray-700: #374151;
    --text-gray-800: #1f2937;
    --text-gray-900: #111827;
    --bg-gray-50: #f9fafb;
    --bg-gray-100: #f3f4f6;
    --bg-gray-200: #e5e7eb;
    --bg-white: #ffffff;
}

/* Dark mode support */
html.dark {
    --text-gray-600: #9ca3af;
    --text-gray-700: #d1d5db;
    --text-gray-800: #e5e7eb;
    --text-gray-900: #f9fafb;
    --bg-gray-50: #111827;
    --bg-gray-100: #1f2937;
    --bg-gray-200: #374151;
    --bg-white: #1f2937;
}

/* ========================================
   HERO SECTION
   ======================================== */

.blog-hero-section {
    position: relative;
    min-height: 60vh;
    padding: 8rem 0 6rem;
    margin-top: var(--header-height);
    background: linear-gradient(135deg, var(--medical-blue), var(--primary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

html.dark .blog-hero-section {
    background: linear-gradient(135deg, var(--medical-dark), var(--medical-blue));
}

/* Hero overlay */
.blog-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Floating elements */
.blog-hero-floating {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
    z-index: 2;
}

.blog-hero-floating-1 {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.blog-hero-floating-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 20%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Hero content */
.blog-hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.blog-hero-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 900;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.blog-hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   SEARCH SECTION
   ======================================== */

.blog-search-section {
    padding: 4rem 0;
    background: var(--bg-gray-50);
    position: relative;
}

html.dark .blog-search-section {
    background: var(--bg-gray-100);
}

.blog-search-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.blog-search-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

html.dark .blog-search-form {
    background: var(--bg-gray-200);
    box-shadow: var(--shadow-xl);
}

.search-input-group {
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--bg-gray-200);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: var(--bg-white);
    color: var(--text-gray-900);
}

html.dark .search-input {
    background: var(--bg-gray-100);
    color: var(--text-gray-100);
    border-color: var(--bg-gray-100);
}

.search-input:focus {
    outline: none;
    border-color: var(--medical-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-button {
    padding: 1rem 2rem;
    background: var(--medical-blue);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.search-button:hover {
    background: var(--medical-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Search results */
.search-results {
    margin-top: 2rem;
    text-align: center;
    padding: 1rem;
    background: var(--bg-white);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
}

html.dark .search-results {
    background: var(--bg-gray-200);
}

.search-results-label {
    color: var(--text-gray-600);
    margin-right: 0.5rem;
}

.search-results-term {
    font-weight: 600;
    color: var(--medical-blue);
    margin-right: 1rem;
}

.clear-search-link {
    color: var(--medical-blue);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.clear-search-link:hover {
    text-decoration: underline;
}

/* ========================================
   BLOG POSTS SECTION
   ======================================== */

.blog-posts-section {
    padding: 6rem 0;
    background: var(--bg-white);
}

html.dark .blog-posts-section {
    background: var(--bg-gray-50);
}

.blog-posts-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* No results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results-icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    color: var(--text-gray-400);
}

.no-results-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-gray-800);
    margin-bottom: 1rem;
}

html.dark .no-results-title {
    color: var(--text-gray-200);
}

.no-results-description {
    font-size: 1.125rem;
    color: var(--text-gray-600);
    margin-bottom: 2rem;
    line-height: 1.6;
}

html.dark .no-results-description {
    color: var(--text-gray-400);
}

.no-results-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--medical-blue);
    color: white !important; /* Ensure white text regardless of theme */
    text-decoration: none;
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    transition: all var(--transition-normal);
}

.no-results-button:hover {
    background: var(--medical-dark);
    color: white !important; /* Ensure white text on hover regardless of theme */
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Blog grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Blog cards - Premium Styling */
.blog-card {
    background: var(--bg-white);
    border-radius: 1.5rem; /* More rounded corners for modern look */
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04); /* Premium layered shadow */
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Ultra-smooth premium transition */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border */
    display: flex;
    flex-direction: column;
    height: auto; /* Allow automatic height */
    min-height: 280px; /* Consistent minimum height for better layout */
    backdrop-filter: blur(10px); /* Glass effect */
    position: relative;
}

html.dark .blog-card {
    background: rgba(31, 41, 55, 0.8); /* Semi-transparent dark background */
    border-color: rgba(75, 85, 99, 0.3); /* Subtle dark border */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2); /* Enhanced dark shadow */
    backdrop-filter: blur(20px); /* Stronger glass effect in dark mode */
}

.blog-card:hover {
    transform: translateY(-12px) scale(1.02); /* Enhanced lift and scale */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 25px rgba(0, 0, 0, 0.1); /* Premium hover shadow */
    border-color: rgba(59, 130, 246, 0.3); /* Subtle blue border on hover */
}

/* Enhanced dark mode hover effects */
html.dark .blog-card:hover {
    transform: translateY(-12px) scale(1.02); /* Same smooth lift and scale */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 8px 25px rgba(0, 0, 0, 0.3); /* Enhanced dark shadow */
    border-color: rgba(59, 130, 246, 0.4); /* More visible blue border in dark mode */
}

/* Image hover effects removed since images are now only in single blog view */

/* Add a subtle gradient overlay on hover */
.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(6, 182, 212, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.blog-card:hover::before {
    opacity: 1;
}

/* Blog card image section - Removed since images are now only in single blog view */

/* Blog card content - Premium Styling */
.blog-card-content {
    padding: 2.5rem; /* Increased padding for better spacing */
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Takes remaining space */
    justify-content: space-between;
    min-height: 0; /* Allows flex item to shrink if needed */
    text-align: center; /* Center all text content */
    align-items: center; /* Center all elements */
    position: relative;
    z-index: 2; /* Above the hover overlay */
    background: rgba(255, 255, 255, 0.95); /* Subtle background */
    backdrop-filter: blur(10px); /* Glass effect */
    border-radius: 1.5rem; /* Match card border radius */
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: center; /* Center the meta information */
    gap: 0.75rem; /* Increased gap */
    margin-bottom: 1.25rem; /* Increased spacing */
    font-size: 0.875rem;
    color: var(--text-gray-600);
    width: 100%; /* Take full width to center properly */
    font-weight: 500; /* Slightly bolder */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

html.dark .blog-card-meta {
    color: var(--text-gray-400);
}

html.dark .blog-card-content {
    background: rgba(31, 41, 55, 0.95); /* Dark content background */
}

.meta-separator {
    color: var(--text-gray-400);
    font-weight: 600;
    opacity: 0.7;
}

.blog-card-title {
    font-size: 1.5rem; /* Larger title */
    font-weight: 800; /* Bolder font weight */
    color: var(--text-gray-900);
    margin-bottom: 1.25rem; /* Increased spacing */
    line-height: 1.3; /* Tighter line height */
    text-align: center; /* Center the title */
    width: 100%; /* Take full width to center properly */
    letter-spacing: -0.025em; /* Slightly tighter letter spacing */
    background: linear-gradient(135deg, var(--text-gray-900), var(--medical-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

html.dark .blog-card-title {
    color: var(--text-gray-100);
}

.blog-card-excerpt {
    font-size: 1rem; /* Larger text */
    color: var(--text-gray-600);
    line-height: 1.7; /* Better line height for readability */
    margin-bottom: 2rem; /* Increased spacing */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center; /* Center the excerpt */
    width: 100%; /* Take full width to center properly */
    font-weight: 400; /* Clean font weight */
    flex-grow: 1;
}

html.dark .blog-card-excerpt {
    color: var(--text-gray-400);
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem; /* Better padding */
    background: linear-gradient(135deg, var(--medical-blue), var(--medical-dark)); /* Gradient background */
    color: white !important; /* Ensure white text regardless of theme */
    text-decoration: none;
    border-radius: var(--border-radius-sm); /* Consistent border radius */
    font-weight: 700; /* Bolder font weight */
    font-size: 0.875rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Ultra-smooth transition */
    text-transform: uppercase;
    letter-spacing: 0.05em; /* Better letter spacing */
    text-align: center; /* Center the button text */
    align-self: center; /* Center the button itself */
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); /* Subtle blue shadow */
    position: relative;
    overflow: hidden;
    margin-top: auto;
}

.blog-card-link:hover {
    background: linear-gradient(135deg, var(--medical-dark), #1e3a8a); /* Enhanced gradient on hover */
    color: white !important; /* Ensure white text on hover regardless of theme */
    transform: translateY(-3px) scale(1.05); /* Enhanced lift and scale */
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4); /* Enhanced shadow */
}

/* Add a subtle shine effect to the button */
.blog-card-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.blog-card-link:hover::before {
    left: 100%;
}

/* ========================================
   FEATURED TOPICS SECTION
   ======================================== */

.featured-topics-section {
    padding: 6rem 0;
    background: var(--bg-gray-50);
    position: relative;
    overflow: hidden;
}

/* Light pattern overlay for featured topics section in light mode */
.featured-topics-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.03) 0%, transparent 50%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots-light-blog" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="1.5" fill="rgba(59,130,246,0.15)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots-light-blog)"/></svg>');
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
}

/* Ensure content stays above the pattern in light mode */
.featured-topics-section > * {
    position: relative;
    z-index: 2;
}

html.dark .featured-topics-section {
    background: #0f172a; /* Much darker background */
    position: relative;
    overflow: hidden;
}

/* Cool pattern overlay for featured topics section in dark mode */
html.dark .featured-topics-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots-dark-blog" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="1.5" fill="rgba(59,130,246,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots-dark-blog)"/></svg>');
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
}

/* Ensure content stays above the pattern in dark mode */
html.dark .featured-topics-section > * {
    position: relative;
    z-index: 2;
}

.featured-topics-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.featured-topics-header {
    text-align: center;
    margin-bottom: 4rem;
}

.featured-topics-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-gray-900);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--medical-blue), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured-topics-description {
    font-size: 1.125rem;
    color: var(--text-gray-600);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

html.dark .featured-topics-description {
    color: var(--text-gray-400);
}

.featured-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Topic cards */
.topic-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--bg-gray-200);
}

html.dark .topic-card {
    background: rgba(31, 41, 55, 0.8); /* Semi-transparent dark background like product cards */
    border-color: rgba(75, 85, 99, 0.3); /* Subtle dark border */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2); /* Enhanced dark shadow */
    backdrop-filter: blur(20px); /* Glass effect */
}

.topic-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.topic-icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 50%;
    color: var(--medical-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

html.dark .topic-icon-container {
    background: rgba(59, 130, 246, 0.3);
    color: white; /* White icons in dark mode */
}

.topic-icon {
    width: 100%;
    height: 100%;
}

.topic-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-gray-900);
    margin-bottom: 1rem;
}

html.dark .topic-title {
    color: var(--text-gray-100);
}

.topic-description {
    font-size: 0.875rem;
    color: var(--text-gray-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

html.dark .topic-description {
    color: var(--text-gray-400);
}

.topic-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--medical-blue);
    color: white !important; /* Ensure white text regardless of theme */
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.topic-link:hover {
    background: var(--medical-dark);
    color: white !important; /* Ensure white text on hover regardless of theme */
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   NEWSLETTER SECTION
   ======================================== */

.newsletter-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--medical-blue), var(--primary-blue));
    text-align: center;
    position: relative;
    overflow: hidden;
}

html.dark .newsletter-section {
    background: linear-gradient(135deg, var(--medical-dark), var(--medical-blue));
}

.newsletter-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.newsletter-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.newsletter-description {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.newsletter-input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.newsletter-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.newsletter-button {
    padding: 1rem 2rem;
    background: white;
    color: var(--medical-blue);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.newsletter-button:hover {
    background: var(--bg-gray-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.newsletter-privacy {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* ========================================
   SINGLE BLOG POST VIEW
   ======================================== */

.single-blog-post {
    padding: 2rem 0;
    margin-top: var(--header-height);
    background: var(--bg-white);
    min-height: calc(100vh - var(--header-height));
}

html.dark .single-blog-post {
    background: var(--bg-gray-50);
}

.single-blog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Back to blog */
.back-to-blog {
    margin-bottom: 3rem;
}

.back-to-blog-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--medical-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.back-to-blog-link:hover {
    color: var(--medical-dark);
    transform: translateX(-5px);
}

.back-arrow-icon {
    width: 20px;
    height: 20px;
}

/* Blog header */
.blog-header {
    margin-bottom: 3rem;
}

.blog-category {
    margin-bottom: 1rem;
}

.category-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--medical-blue);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

html.dark .category-badge {
    background: rgba(59, 130, 246, 0.2);
}

.blog-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-gray-900);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

html.dark .blog-title {
    color: var(--text-gray-100);
}

.blog-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray-600);
    font-size: 0.875rem;
}

html.dark .meta-item {
    color: var(--text-gray-400);
}

.meta-icon {
    width: 16px;
    height: 16px;
}

/* Blog featured image - Dynamic and Responsive */
.blog-featured-image {
    position: relative;
    width: 100%;
    height: auto; /* Let height be determined by image aspect ratio */
    min-height: 200px; /* Minimum height for consistency */
    background: linear-gradient(135deg, var(--bg-gray-100), var(--bg-gray-200));
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    overflow: visible; /* Allow image to determine container size */
}

html.dark .blog-featured-image {
    background: linear-gradient(135deg, var(--bg-gray-100), var(--bg-gray-200));
}

.blog-placeholder-icon {
    width: 80px;
    height: 80px;
    color: var(--medical-blue);
    opacity: 0.8;
}

.blog-actual-featured-image {
    width: 100%;
    height: auto; /* Let height be determined by image aspect ratio */
    object-fit: contain; /* Shows complete image without cropping */
    object-position: center; /* Centers the image */
    border-radius: var(--border-radius-lg);
    max-width: 100%; /* Ensure image doesn't exceed container width */
}

/* Blog content */
.blog-content {
    margin-bottom: 3rem;
}

.blog-content-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-gray-800);
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

html.dark .blog-content-text {
    color: var(--text-gray-200);
}

.blog-content-text p {
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Share and navigation */
.blog-share-navigation {
    border-top: 1px solid var(--bg-gray-200);
    padding-top: 2rem;
}

html.dark .blog-share-navigation {
    border-top-color: var(--bg-gray-100);
}

.share-navigation-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.share-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.share-label {
    font-size: 0.875rem;
    color: var(--text-gray-600);
    font-weight: 600;
}

html.dark .share-label {
    color: var(--text-gray-400);
}

.share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-gray-100);
    color: var(--text-gray-600);
    border-radius: 50%;
    transition: all var(--transition-normal);
}

html.dark .share-link {
    background: var(--bg-gray-200);
    color: var(--text-gray-400);
}

.share-link:hover {
    background: var(--medical-blue);
    color: white;
    transform: translateY(-2px);
}

.share-icon {
    width: 20px;
    height: 20px;
}

.view-all-articles-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--medical-blue);
    color: white !important; /* Ensure white text regardless of theme */
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.view-all-articles-btn:hover {
    background: var(--medical-dark);
    color: white !important; /* Ensure white text on hover regardless of theme */
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.5rem;
    }
    
    .featured-topics-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    /* Blog card image styling removed */
}

@media (max-width: 768px) {
    .blog-hero-section {
        padding: 6rem 0 4rem;
        min-height: 50vh;
    }
    
    .blog-hero-title {
        font-size: 2.5rem;
    }
    
    .blog-hero-subtitle {
        font-size: 1.125rem;
    }
    
    .blog-search-section,
    .blog-posts-section,
    .featured-topics-section,
    .newsletter-section {
        padding: 3rem 0;
    }
    
    .blog-search-container,
    .blog-posts-container,
    .featured-topics-container {
        padding: 0 1.5rem;
    }
    
    .blog-search-form {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .search-button {
        width: 100%;
    }
    
    .featured-topics-title {
        font-size: 2rem;
    }
    
    .newsletter-title {
        font-size: 2.25rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }
    
    .newsletter-input,
    .newsletter-button {
        width: 100%;
        max-width: 300px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        justify-items: center; /* Center the cards */
    }
    
    .blog-card {
        width: 90%; /* Cards cover 90% of screen width */
        max-width: 400px; /* Maximum width to prevent cards from being too wide */
    }
    
    .featured-topics-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Blog card image styling removed */
    
    .blog-card-content {
        padding: 1.25rem;
        text-align: center; /* Ensure centered text on mobile */
        align-items: center; /* Ensure centered elements on mobile */
    }
}

/* Medium screens - 2 columns with smaller cards */
@media (min-width: 481px) and (max-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .blog-card-content {
        padding: 1rem;
    }
    
    .blog-card-title {
        font-size: 1.125rem;
    }
    
    .blog-card-excerpt {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .single-blog-container {
        padding: 0 1.5rem;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .share-navigation-container {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .share-section {
        justify-content: center;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-hero-section {
        padding: 4rem 0 3rem;
    }
    
    .blog-hero-title {
        font-size: 2rem;
    }
    
    .blog-hero-subtitle {
        font-size: 1rem;
    }
    
    .blog-search-container,
    .blog-posts-container,
    .featured-topics-container {
        padding: 0 1rem;
    }
    
    .newsletter-container {
        padding: 0 1rem;
    }
    
    .blog-search-form {
        padding: 1rem;
    }
    
    .featured-topics-title {
        font-size: 1.75rem;
    }
    
    .newsletter-title {
        font-size: 2rem;
    }
    
    .single-blog-container {
        padding: 0 1rem;
    }
    
    .blog-title {
        font-size: 2rem;
    }
    
    .blog-featured-image {
        min-height: 150px; /* Dynamic height for small screens */
    }
    
    /* Blog card image styling removed */
    
    .blog-card-content {
        padding: 1rem;
    }
    
    .blog-grid {
        justify-items: center; /* Center the cards */
    }
    
    .blog-card {
        width: 90%; /* Cards cover 90% of screen width */
        max-width: 350px; /* Slightly smaller max width for very small screens */
    }
    
    .blog-card-content {
        text-align: center; /* Ensure centered text on very small screens */
        align-items: center; /* Ensure centered elements on very small screens */
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

/* Scroll trigger animations */
.scroll-trigger {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-trigger.animate {
    opacity: 1;
    transform: translateY(0);
}

.scroll-trigger.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for blog cards */
.blog-card:nth-child(1) { transition-delay: 0.1s; }
.blog-card:nth-child(2) { transition-delay: 0.2s; }
.blog-card:nth-child(3) { transition-delay: 0.3s; }
.blog-card:nth-child(4) { transition-delay: 0.4s; }
.blog-card:nth-child(5) { transition-delay: 0.5s; }
.blog-card:nth-child(6) { transition-delay: 0.6s; }

/* Staggered animations for topic cards */
.topic-card:nth-child(1) { transition-delay: 0.1s; }
.topic-card:nth-child(2) { transition-delay: 0.2s; }
.topic-card:nth-child(3) { transition-delay: 0.3s; }

/* Enhanced hover effects */
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Smooth transitions for all interactive elements */
.blog-card, .topic-card, .newsletter-button, .search-button, .blog-card-link, .topic-link, .back-to-blog-link, .view-all-articles-btn, .clear-search-link, .no-results-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
