/*
 * EduCenters Theme - Main CSS
 * Replicates the React/Tailwind design for educenters.in
 * Optimized for speed - no frameworks, pure CSS
 *
 * @package EduCenters
 * @version 1.0.0
 */

/* ============================================================
   CSS Variables (Design System)
   ============================================================ */
:root {
    --ec-font: 'Inter', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ec-font-bn: 'Hind Siliguri', sans-serif;

    /* Colors - Light Mode */
    --ec-bg: #ffffff;
    --ec-bg-alt: #f9fafb;
    --ec-bg-muted: #f3f4f6;
    --ec-text: #111827;
    --ec-text-secondary: #4b5563;
    --ec-text-muted: #6b7280;
    --ec-text-light: #9ca3af;
    --ec-border: #e5e7eb;
    --ec-border-light: #f3f4f6;

    /* Brand */
    --ec-blue-50: #eff6ff;
    --ec-blue-100: #dbeafe;
    --ec-blue-400: #60a5fa;
    --ec-blue-500: #3b82f6;
    --ec-blue-600: #2563eb;
    --ec-blue-700: #1d4ed8;
    --ec-indigo-600: #4f46e5;
    --ec-indigo-700: #4338ca;
    --ec-indigo-950: #1e1b4b;

    /* Status */
    --ec-green-500: #22c55e;
    --ec-green-600: #16a34a;
    --ec-yellow-50: #fefce8;
    --ec-yellow-200: #fef08a;
    --ec-yellow-400: #facc15;
    --ec-yellow-800: #854d0e;
    --ec-yellow-900: #713f12;
    --ec-red-500: #ef4444;
    --ec-red-600: #dc2626;

    /* Sizing */
    --ec-radius: 0.625rem;
    --ec-radius-lg: 0.75rem;
    --ec-radius-xl: 1rem;
    --ec-radius-2xl: 1.5rem;
    --ec-radius-full: 9999px;

    --ec-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --ec-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --ec-shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --ec-shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);

    --ec-container: 1280px;
    --ec-header-height: 64px;
}

/* Dark Mode */
.dark {
    --ec-bg: #030712;
    --ec-bg-alt: #111827;
    --ec-bg-muted: #1f2937;
    --ec-text: #f9fafb;
    --ec-text-secondary: #d1d5db;
    --ec-text-muted: #9ca3af;
    --ec-text-light: #6b7280;
    --ec-border: #374151;
    --ec-border-light: #1f2937;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--ec-font);
    background-color: var(--ec-bg);
    color: var(--ec-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s, color 0.3s;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

ul, ol {
    list-style: none;
}

/* ============================================================
   Container
   ============================================================ */
.ec-container {
    max-width: var(--ec-container);
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================================
   HEADER
   ============================================================ */
.ec-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--ec-bg);
    box-shadow: var(--ec-shadow);
    transition: background-color 0.3s;
}

/* Top Bar */
.ec-topbar {
    background: linear-gradient(to right, var(--ec-blue-600), var(--ec-indigo-700));
    color: #fff;
}

.ec-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.875rem;
}

.ec-topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ec-topbar-tagline {
    display: none;
}

.ec-topbar-badge {
    display: none;
    padding: 0.25rem 0.75rem;
    background: rgba(255,255,255,0.2);
    border-radius: var(--ec-radius-full);
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
}

.ec-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ec-topbar-location {
    display: none;
}

@media (min-width: 768px) {
    .ec-topbar-tagline { display: inline; }
    .ec-topbar-location { display: inline; }
}

@media (min-width: 1024px) {
    .ec-topbar-badge { display: inline; }
}

/* Theme Toggle */
.ec-theme-toggle {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: background 0.2s;
}

.ec-theme-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.ec-icon-sun { display: none; }
.ec-icon-moon { display: block; }
.dark .ec-icon-sun { display: block; }
.dark .ec-icon-moon { display: none; }

/* Navbar */
.ec-navbar {
    border-bottom: 1px solid var(--ec-border);
}

.ec-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--ec-header-height);
}

/* Logo */
.ec-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
}

.ec-logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--ec-blue-600), var(--ec-indigo-700));
    border-radius: var(--ec-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.ec-logo-site-title {
    font-size: 1.25rem !important;
    font-weight: 700;
    color: var(--ec-text);
    line-height: 1.2;
    margin: 0;
}

.ec-logo-tagline {
    font-size: 0.75rem;
    color: var(--ec-text-muted);
    font-family: var(--ec-font-bn);
    margin: 0;
}

/* Desktop Nav */
.ec-desktop-nav {
    display: none;
}

@media (min-width: 1024px) {
    .ec-desktop-nav {
        display: flex;
        align-items: center;
    }
}

.ec-nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ec-nav-item {
    position: relative;
}

.ec-nav-link {
    color: var(--ec-text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 0;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.ec-nav-link:hover {
    color: var(--ec-blue-600);
}

.ec-dropdown-arrow {
    font-size: 0.625rem;
    transition: transform 0.2s;
}

/* Mega Menu */
.ec-mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    width: 800px;
    background: var(--ec-bg);
    box-shadow: var(--ec-shadow-2xl);
    border-radius: var(--ec-radius-lg);
    border: 1px solid var(--ec-border);
    padding: 1.5rem;
    z-index: 60;
}

.ec-nav-item:hover > .ec-mega-menu {
    display: block;
}

.ec-mega-menu-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.ec-mega-menu-heading {
    font-size: 0.875rem !important;
    font-weight: 600;
    color: var(--ec-text);
    margin-bottom: 0.75rem;
}

.ec-sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ec-sub-menu-item {
    margin-bottom: 0.5rem;
}

.ec-sub-menu-link {
    font-size: 0.875rem;
    color: var(--ec-text-muted);
    transition: color 0.2s;
}

.ec-sub-menu-link:hover {
    color: var(--ec-blue-600);
}

/* Header Search */
.ec-header-search {
    display: none;
}

@media (min-width: 768px) {
    .ec-header-search {
        display: flex;
        align-items: center;
    }
}

.ec-search-form {
    display: flex;
}

.ec-search-input {
    font-family: var(--ec-font);
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
    background: var(--ec-bg-muted);
    color: var(--ec-text);
    width: 12rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.ec-search-input:focus {
    border-color: var(--ec-blue-500);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

@media (min-width: 1024px) {
    .ec-search-input {
        width: 16rem;
    }
}

/* Mobile Toggle */
.ec-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ec-text);
}

@media (min-width: 1024px) {
    .ec-mobile-toggle {
        display: none;
    }
}

.ec-mobile-toggle .ec-icon-close {
    display: none;
}

.ec-mobile-toggle.active .ec-icon-menu {
    display: none;
}

.ec-mobile-toggle.active .ec-icon-close {
    display: block;
}

/* Mobile Menu */
.ec-mobile-menu {
    display: none;
    border-top: 1px solid var(--ec-border);
    padding: 1rem 0;
    background: var(--ec-bg);
}

.ec-mobile-menu.active {
    display: block;
}

@media (min-width: 1024px) {
    .ec-mobile-menu {
        display: none !important;
    }
}

.ec-mobile-search {
    margin-bottom: 0.75rem;
}

.ec-mobile-search .ec-search-input {
    width: 100%;
}

.ec-mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ec-mobile-nav-list li {
    border-bottom: 1px solid var(--ec-border-light);
}

.ec-mobile-nav-list a {
    display: block;
    padding: 0.75rem 0;
    color: var(--ec-text-secondary);
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.ec-mobile-nav-list a:hover {
    color: var(--ec-blue-600);
}

/* Flash Alert */
.ec-flash-alert {
    background: var(--ec-yellow-50);
    border-top: 1px solid var(--ec-yellow-200);
    border-bottom: 1px solid var(--ec-yellow-200);
    overflow: hidden;
}

.dark .ec-flash-alert {
    background: rgba(113,63,18,0.2);
    border-color: var(--ec-yellow-800);
}

.ec-flash-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.ec-flash-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ec-yellow-800);
    white-space: nowrap;
}

.dark .ec-flash-label {
    color: var(--ec-yellow-400);
}

.ec-flash-marquee-wrap {
    overflow: hidden;
    flex: 1;
}

.ec-flash-marquee {
    display: inline-block;
    white-space: nowrap;
    animation: ec-marquee 30s linear infinite;
}

.ec-marquee-text {
    font-size: 0.875rem;
    color: var(--ec-yellow-900);
}

.ec-marquee-text a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.ec-marquee-text a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.dark .ec-marquee-text {
    color: var(--ec-yellow-400);
}

@keyframes ec-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================================
   BADGES
   ============================================================ */
.ec-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--ec-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
    transition: background 0.2s;
}

.ec-badge-primary {
    background: var(--ec-blue-600);
    color: #fff;
}

.ec-badge-primary:hover {
    background: var(--ec-blue-700);
}

.ec-badge-secondary {
    background: var(--ec-bg-muted);
    color: var(--ec-text-secondary);
}

.ec-badge-secondary:hover {
    background: var(--ec-blue-100);
}

.dark .ec-badge-secondary {
    background: var(--ec-bg-muted);
    color: var(--ec-text-muted);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.ec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--ec-radius);
    font-weight: 500;
    font-size: 0.875rem;
    font-family: var(--ec-font);
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.5;
}

.ec-btn-primary {
    background: var(--ec-blue-600);
    color: #fff;
    border-color: var(--ec-blue-600);
}

.ec-btn-primary:hover {
    background: var(--ec-blue-700);
}

.ec-btn-outline {
    background: transparent;
    color: var(--ec-text);
    border-color: var(--ec-border);
}

.ec-btn-outline:hover {
    background: var(--ec-bg-muted);
}

.ec-btn-gradient {
    background: linear-gradient(to right, var(--ec-blue-600), var(--ec-indigo-600));
    color: #fff;
    border: none;
}

.ec-btn-gradient:hover {
    background: linear-gradient(to right, var(--ec-blue-700), var(--ec-indigo-700));
}

.ec-btn-white {
    background: #fff;
    color: var(--ec-blue-600);
    border-color: #fff;
}

.ec-btn-white:hover {
    background: #f3f4f6;
}

.ec-btn-green {
    color: var(--ec-green-600);
    border-color: var(--ec-green-600);
}

.ec-btn-green:hover {
    background: rgba(34,197,94,0.05);
}

.ec-btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.ec-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.ec-btn-full {
    width: 100%;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.ec-hero {
    background: linear-gradient(135deg, var(--ec-blue-50), #eef2ff, #f5f3ff);
    padding: 3rem 0;
}

.dark .ec-hero {
    background: linear-gradient(135deg, var(--ec-bg-alt), #172554, var(--ec-indigo-950));
}

@media (min-width: 768px) {
    .ec-hero { padding: 5rem 0; }
}

.ec-hero-grid {
    display: grid;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .ec-hero-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ec-hero-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ec-hero-title {
    font-size: 2.25rem !important;
    font-weight: 700;
    color: var(--ec-text);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .ec-hero-title { font-size: 3rem !important; }
}

@media (min-width: 1024px) {
    .ec-hero-title { font-size: 3.75rem !important; }
}

.ec-gradient-text {
    background: linear-gradient(to right, var(--ec-blue-600), var(--ec-indigo-600));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ec-hero-subtitle {
    font-size: 1.25rem;
    color: var(--ec-text-secondary);
}

.ec-hero-desc {
    font-size: 1.125rem;
    color: var(--ec-text-muted);
}

.ec-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Search Box */
.ec-hero-search-box {
    background: var(--ec-bg);
    border-radius: var(--ec-radius-2xl);
    box-shadow: var(--ec-shadow-2xl);
    padding: 2rem;
    border: 1px solid var(--ec-border);
}

.ec-search-box-title {
    font-size: 1.5rem !important;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--ec-text);
}

.ec-hero-search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ec-search-input-wrap {
    position: relative;
}

.ec-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ec-text-light);
    pointer-events: none;
}

.ec-search-input-large {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    font-size: 1rem;
    height: 3rem;
}

.ec-popular-tags {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ec-border);
}

.ec-popular-label {
    font-size: 0.875rem;
    color: var(--ec-text-muted);
    margin-bottom: 0.75rem;
}

.ec-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.ec-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.ec-section-title {
    font-size: 1.875rem !important;
    font-weight: 700;
    color: var(--ec-text);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .ec-section-title { font-size: 2.25rem !important; }
}

.ec-section-subtitle {
    font-size: 1.125rem;
    color: var(--ec-text-muted);
}

/* ============================================================
   CATEGORY GRID
   ============================================================ */
.ec-categories {
    padding: 4rem 0;
    background: var(--ec-bg);
}

.ec-category-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .ec-category-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .ec-category-grid { grid-template-columns: repeat(4, 1fr); }
}

.ec-category-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--ec-radius-xl);
    box-shadow: var(--ec-shadow-lg);
    transition: all 0.3s;
    display: block;
}

.ec-category-card:hover {
    box-shadow: var(--ec-shadow-2xl);
    transform: translateY(-0.5rem);
}

.ec-category-image {
    aspect-ratio: 4 / 3;
    position: relative;
    overflow: hidden;
}

.ec-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ec-category-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.ec-category-card:hover .ec-category-overlay {
    opacity: 0.9;
}

/* Color Variants */
.ec-color-blue-cyan .ec-category-overlay { background: linear-gradient(to top, #3b82f6, #06b6d4); }
.ec-color-purple-pink .ec-category-overlay { background: linear-gradient(to top, #a855f7, #ec4899); }
.ec-color-green-emerald .ec-category-overlay { background: linear-gradient(to top, #22c55e, #10b981); }
.ec-color-orange-red .ec-category-overlay { background: linear-gradient(to top, #f97316, #ef4444); }

.ec-category-content {
    position: absolute;
    inset: 0;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
}

.ec-category-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.ec-category-title {
    font-size: 1.25rem !important;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #fff;
}

.ec-category-desc-bn {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.ec-category-desc {
    font-size: 0.875rem;
    opacity: 0.8;
}

.ec-category-explore {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.ec-category-explore svg {
    transition: transform 0.2s;
}

.ec-category-card:hover .ec-category-explore svg {
    transform: translateX(0.25rem);
}

/* ============================================================
   POSTS SECTION (Tabs)
   ============================================================ */
.ec-posts-section {
    padding: 4rem 0;
    background: var(--ec-bg-alt);
}

.ec-posts-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .ec-posts-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* Tabs */
.ec-tabs {
    display: flex;
    background: var(--ec-bg);
    border-radius: var(--ec-radius);
    padding: 0.25rem;
    border: 1px solid var(--ec-border);
}

.ec-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: calc(var(--ec-radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ec-text-muted);
    transition: all 0.2s;
    font-family: var(--ec-font);
}

.ec-tab:hover {
    color: var(--ec-text);
}

.ec-tab-active {
    background: var(--ec-bg-muted);
    color: var(--ec-text);
}

/* Tab Content */
.ec-tab-content {
    display: none;
}

.ec-tab-content-active {
    display: block;
}

/* Posts Grid */
.ec-posts-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .ec-posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .ec-posts-grid { grid-template-columns: repeat(4, 1fr); }
}

.ec-posts-grid-3 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .ec-posts-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .ec-posts-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   POST CARD
   ============================================================ */
.ec-card {
    background: var(--ec-bg);
    border: 2px solid var(--ec-border);
    border-radius: var(--ec-radius-xl);
    overflow: hidden;
    transition: all 0.3s;
}

.ec-card:hover {
    box-shadow: var(--ec-shadow-xl);
    border-color: var(--ec-blue-500);
}

.ec-card-link {
    display: block;
}

.ec-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.ec-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ec-card:hover .ec-card-img {
    transform: scale(1.1);
}

.ec-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: var(--ec-bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ec-text-light);
}

.ec-card-body {
    padding: 1rem;
}

.ec-card-title {
    font-size: 1rem !important;
    font-weight: 600;
    color: var(--ec-text);
    margin: 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
    line-height: 1.4;
}

.ec-card:hover .ec-card-title {
    color: var(--ec-blue-600);
}

.ec-card-excerpt {
    font-size: 0.875rem;
    color: var(--ec-text-muted);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ec-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--ec-text-light);
}

/* ============================================================
   STATS SECTION
   ============================================================ */
.ec-stats {
    padding: 4rem 0;
    background: linear-gradient(to right, var(--ec-blue-600), var(--ec-indigo-700));
    color: #fff;
}

.ec-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .ec-stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.ec-stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .ec-stat-value { font-size: 3rem; }
}

.ec-stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .ec-stat-label { font-size: 1rem; }
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.ec-breadcrumbs {
    background: var(--ec-bg);
    border-bottom: 1px solid var(--ec-border);
    padding: 1rem 0;
    font-size: 0.875rem;
    color: var(--ec-text-muted);
}

.ec-breadcrumbs a {
    color: var(--ec-text-muted);
    transition: color 0.2s;
}

.ec-breadcrumbs a:hover {
    color: var(--ec-blue-600);
}

.ec-breadcrumb-sep {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    color: var(--ec-text-light);
}

.ec-breadcrumbs span:last-child {
    color: var(--ec-text);
}

/* ============================================================
   CATEGORY HEADER (Archive)
   ============================================================ */
.ec-category-header {
    padding: 3rem 0 4rem;
    color: #fff;
}

@media (min-width: 768px) {
    .ec-category-header { padding: 4rem 0 5rem; }
}

.ec-color-blue-cyan .ec-category-header,
.ec-category-header.ec-color-blue-cyan { background: linear-gradient(to right, var(--ec-blue-600), #06b6d4); }
.ec-color-purple-pink .ec-category-header,
.ec-category-header.ec-color-purple-pink { background: linear-gradient(to right, #a855f7, #ec4899); }
.ec-color-green-emerald .ec-category-header,
.ec-category-header.ec-color-green-emerald { background: linear-gradient(to right, #22c55e, #10b981); }
.ec-color-orange-red .ec-category-header,
.ec-category-header.ec-color-orange-red { background: linear-gradient(to right, #f97316, #ef4444); }

.ec-cathead-title {
    font-size: 2.25rem !important;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #fff;
}

@media (min-width: 768px) {
    .ec-cathead-title { font-size: 3rem !important; }
}

.ec-cathead-desc {
    font-size: 1.125rem;
    opacity: 0.85;
    max-width: 42rem;
}

.ec-cathead-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.ec-cathead-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--ec-radius-full);
    font-size: 0.875rem;
    backdrop-filter: blur(4px);
}

/* ============================================================
   ARCHIVE CONTENT
   ============================================================ */
.ec-archive-content {
    padding: 2rem 0 4rem;
    background: var(--ec-bg-alt);
}

/* ============================================================
   SINGLE POST
   ============================================================ */

/* Action Bar */
.ec-action-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--ec-bg);
    border-bottom: 1px solid var(--ec-border);
    box-shadow: var(--ec-shadow);
}

.ec-action-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ec-action-left {
    display: flex;
    gap: 0.75rem;
}

.ec-hide-mobile {
    display: none;
}

@media (min-width: 640px) {
    .ec-hide-mobile { display: inline; }
}

/* Single Layout */
.ec-single-layout {
    padding: 2rem 0;
    background: var(--ec-bg-alt);
}

.ec-single-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .ec-single-grid {
        grid-template-columns: 3fr 6fr 3fr;
    }
}

/* TOC Sidebar */
.ec-toc-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .ec-toc-sidebar { display: block; }
}

.ec-toc-sticky {
    position: sticky;
    top: 6rem;
}

.ec-toc-card {
    padding: 1rem;
}

.ec-toc-heading {
    font-size: 1rem !important;
    font-weight: 600;
    color: var(--ec-text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ec-toc-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--ec-radius-lg);
    font-size: 0.875rem;
    color: var(--ec-text-muted);
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

.ec-toc-nav a:hover {
    background: var(--ec-bg-muted);
}

.ec-toc-nav a.active {
    background: var(--ec-blue-100);
    color: var(--ec-blue-700);
    font-weight: 600;
}

.dark .ec-toc-nav a.active {
    background: rgba(37,99,235,0.2);
    color: var(--ec-blue-400);
}

/* Article */
.ec-article {
    background: var(--ec-bg);
    border: 2px solid var(--ec-border);
    border-radius: var(--ec-radius-xl);
    overflow: hidden;
}

.ec-article-hero {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.ec-article-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ec-article-content {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .ec-article-content { padding: 2rem; }
}

.ec-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ec-meta-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--ec-text-muted);
}

.ec-meta-info span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ec-article-title {
    font-size: 1.875rem !important;
    font-weight: 700;
    color: var(--ec-text);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .ec-article-title { font-size: 2.25rem !important; }
}

/* Post Content Styling */
.ec-post-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--ec-text-secondary);
}

.ec-post-content h2 {
    font-size: 1.5rem !important;
    font-weight: 700;
    color: var(--ec-text);
    margin: 2rem 0 1rem;
    scroll-margin-top: 6rem;
}

.ec-post-content h3 {
    font-size: 1.25rem !important;
    font-weight: 600;
    color: var(--ec-text);
    margin: 1.5rem 0 0.75rem;
}

.ec-post-content p {
    margin-bottom: 1rem;
}

.ec-post-content ul,
.ec-post-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.ec-post-content ul { list-style-type: disc; }
.ec-post-content ol { list-style-type: decimal; }

.ec-post-content li {
    margin-bottom: 0.5rem;
}

.ec-post-content img {
    border-radius: var(--ec-radius-lg);
    margin: 1.5rem 0;
}

.ec-post-content blockquote {
    border-left: 4px solid var(--ec-blue-600);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--ec-bg-alt);
    border-radius: 0 var(--ec-radius) var(--ec-radius) 0;
    font-style: italic;
}

.ec-post-content pre {
    background: var(--ec-bg-muted);
    padding: 1.5rem;
    border-radius: var(--ec-radius-lg);
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--ec-border);
}

.ec-post-content code {
    font-family: 'Courier New', monospace;
    font-size: 0.9375rem;
}

.ec-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.ec-post-content th,
.ec-post-content td {
    border: 1px solid var(--ec-border);
    padding: 0.75rem 1rem;
    text-align: left;
}

.ec-post-content th {
    background: var(--ec-bg-muted);
    font-weight: 600;
}

.ec-post-content a {
    color: var(--ec-blue-600);
    text-decoration: underline;
}

.ec-post-content a:hover {
    color: var(--ec-blue-700);
}

/* Article Tags */
.ec-article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ec-border);
    font-size: 0.875rem;
    color: var(--ec-text-muted);
}

/* Right Sidebar */
.ec-right-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .ec-right-sidebar { display: block; }
}

.ec-sidebar-sticky {
    position: sticky;
    top: 6rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ec-related-card {
    padding: 1rem;
}

.ec-related-heading {
    font-size: 1rem !important;
    font-weight: 600;
    color: var(--ec-text);
    margin-bottom: 1rem;
}

.ec-related-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ec-related-item {
    display: flex;
    gap: 0.75rem;
    transition: opacity 0.2s;
}

.ec-related-item:hover {
    opacity: 0.8;
}

.ec-related-thumb {
    width: 5rem;
    height: 5rem;
    border-radius: var(--ec-radius-lg);
    overflow: hidden;
    flex-shrink: 0;
}

.ec-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ec-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: var(--ec-bg-muted);
}

.ec-related-title {
    font-size: 0.875rem !important;
    font-weight: 500;
    color: var(--ec-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
    line-height: 1.4;
}

.ec-related-item:hover .ec-related-title {
    color: var(--ec-blue-600);
}

/* CTA Card */
.ec-cta-card {
    background: linear-gradient(135deg, var(--ec-blue-600), var(--ec-indigo-700)) !important;
    color: #fff;
    padding: 1.5rem;
    border: none !important;
}

.ec-cta-title {
    font-size: 1rem !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

.ec-cta-text {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

/* Reading Mode */
.ec-single-layout.reading-mode .ec-toc-sidebar,
.ec-single-layout.reading-mode .ec-right-sidebar {
    display: none;
}

.ec-single-layout.reading-mode .ec-single-grid {
    grid-template-columns: 1fr;
    max-width: 56rem;
    margin: 0 auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.ec-footer {
    background: #111827;
    color: #d1d5db;
    padding-top: 3rem;
    padding-bottom: 1.5rem;
}

.ec-footer-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .ec-footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .ec-footer-grid { grid-template-columns: repeat(4, 1fr); }
}

.ec-footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ec-footer-logo .ec-logo-icon {
    flex-shrink: 0;
}

.ec-footer-site-title {
    font-size: 1rem !important;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.ec-footer-tagline {
    font-size: 0.75rem;
    color: #9ca3af;
    font-family: var(--ec-font-bn);
    margin: 0;
}

.ec-footer-desc {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Social Icons */
.ec-social-links {
    display: flex;
    gap: 0.75rem;
}

.ec-social-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    transition: background 0.2s;
}

.ec-social-facebook:hover { background: var(--ec-blue-600); }
.ec-social-youtube:hover { background: var(--ec-red-600); }
.ec-social-instagram:hover { background: #e1306c; }

/* Footer Links */
.ec-footer-heading {
    font-size: 1rem !important;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
}

.ec-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ec-footer-links li {
    margin-bottom: 0.5rem;
}

.ec-footer-links a {
    font-size: 0.875rem;
    color: #d1d5db;
    transition: color 0.2s;
}

.ec-footer-links a:hover {
    color: var(--ec-blue-400);
}

/* Notice Cards */
.ec-notice-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ec-notice-card {
    background: #1f2937;
    border-radius: var(--ec-radius-lg);
    padding: 0.75rem;
}

.ec-notice-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.ec-notice-blue { color: var(--ec-blue-400); }
.ec-notice-green { color: #4ade80; }
.ec-notice-yellow { color: #facc15; }

.ec-notice-text {
    font-size: 0.75rem;
    color: #d1d5db;
}

.ec-notice-text a {
    color: #d1d5db;
    transition: color 0.2s;
}

.ec-notice-text a:hover {
    color: var(--ec-blue-400);
}

/* Contact List */
.ec-contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.ec-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.ec-contact-list svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: var(--ec-blue-400);
}

.ec-contact-list a {
    color: #d1d5db;
    transition: color 0.2s;
}

.ec-contact-list a:hover {
    color: var(--ec-blue-400);
}

/* Help Box */
.ec-help-box {
    padding: 0.75rem;
    background: rgba(37,99,235,0.2);
    border: 1px solid rgba(37,99,235,0.3);
    border-radius: var(--ec-radius-lg);
}

.ec-help-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ec-blue-400);
    margin-bottom: 0.25rem;
}

.ec-help-text {
    font-size: 0.75rem;
}

/* Footer Bottom */
.ec-footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .ec-footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.ec-copyright {
    font-size: 0.875rem;
    color: #9ca3af;
}

.ec-footer-legal {
    display: flex;
    gap: 1.5rem;
}

.ec-footer-legal ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ec-footer-legal li {
    display: inline;
}

.ec-footer-legal a {
    font-size: 0.875rem;
    color: #9ca3af;
    transition: color 0.2s;
}

.ec-footer-legal a:hover {
    color: var(--ec-blue-400);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.ec-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.ec-pagination .nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ec-pagination a,
.ec-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
    font-size: 0.875rem;
    color: var(--ec-text);
    transition: all 0.2s;
    background: var(--ec-bg);
}

.ec-pagination a:hover {
    background: var(--ec-bg-muted);
}

.ec-pagination .current {
    background: var(--ec-blue-600);
    color: #fff;
    border-color: var(--ec-blue-600);
}

/* ============================================================
   404 PAGE
   ============================================================ */
.ec-404 {
    padding: 6rem 0;
    text-align: center;
    background: var(--ec-bg-alt);
}

.ec-404-title {
    font-size: 6rem !important;
    font-weight: 700;
    color: var(--ec-blue-600);
    line-height: 1;
}

.ec-404-subtitle {
    font-size: 2rem !important;
    font-weight: 600;
    margin: 1rem 0;
}

.ec-404-desc {
    color: var(--ec-text-muted);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

/* ============================================================
   COMMENTS
   ============================================================ */
.ec-comments-section {
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--ec-border);
}

.ec-comments-title {
    font-size: 1.25rem !important;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.ec-comment-list {
    list-style: none;
    padding: 0;
}

.ec-comment-list .comment {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--ec-border-light);
}

.ec-comment-list .comment-body {
    display: flex;
    gap: 1rem;
}

.ec-comment-list .comment-author img {
    border-radius: 50%;
}

.ec-comment-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.ec-comment-form input[type="text"],
.ec-comment-form input[type="email"],
.ec-comment-form input[type="url"],
.ec-comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
    background: var(--ec-bg);
    color: var(--ec-text);
    font-family: var(--ec-font);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.ec-comment-form textarea {
    min-height: 8rem;
    resize: vertical;
}

.ec-comment-form input[type="submit"] {
    background: var(--ec-blue-600);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--ec-radius);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: var(--ec-font);
    font-size: 0.9375rem;
}

.ec-comment-form input[type="submit"]:hover {
    background: var(--ec-blue-700);
}

/* ============================================================
   AD SLOTS
   ============================================================ */
.ec-ad-slot {
    margin: 1.5rem 0;
    text-align: center;
    min-height: 1px;
}

.ec-ad-before-content {
    margin-bottom: 2rem;
}

.ec-ad-after-content {
    margin-top: 2rem;
}

/* ============================================================
   NO POSTS
   ============================================================ */
.ec-no-posts {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--ec-text-muted);
    font-size: 1.125rem;
}

.ec-no-results {
    text-align: center;
    padding: 3rem 1rem;
}

.ec-no-results h2 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem;
}

.ec-no-results p {
    color: var(--ec-text-muted);
    margin-bottom: 1rem;
}

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.ec-page-content {
    padding: 2rem 0 4rem;
    background: var(--ec-bg-alt);
}

.ec-page-content .ec-article {
    max-width: 56rem;
    margin: 0 auto;
}

/* ============================================================
   WIDGET STYLES
   ============================================================ */
.ec-widget {
    background: var(--ec-bg);
    border: 2px solid var(--ec-border);
    border-radius: var(--ec-radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.ec-widget-title {
    font-size: 1rem !important;
    font-weight: 600;
    color: var(--ec-text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ec-blue-600);
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* ============================================================
   WordPress Core Alignment
   ============================================================ */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin: 1.5rem auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.8125rem;
    color: var(--ec-text-muted);
    margin-top: 0.5rem;
    text-align: center;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.gallery-item img {
    border-radius: var(--ec-radius);
}

/* ============================================================
   PERFORMANCE: will-change hints
   ============================================================ */
.ec-flash-marquee {
    will-change: transform;
}

.ec-category-card {
    will-change: transform;
}

.ec-card-img {
    will-change: transform;
}
