/*
Theme Name: Easy Custom Skin Theme
Theme URI: https://nasir.fr/easy-custom-skin-theme
Author: Nasir Mehmood
Author URI: https://nasir.fr
Description: A powerful, feature-rich news and magazine WordPress theme with full RTL support, dark mode, AJAX live search, mobile slide-in menu, typography controls, breaking news ticker, social sharing, reading progress bar, and 38+ customizer options. Designed for Easy Custom Skin Free plugin.
Version: 1.3.2
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: easy-custom-skin-theme
Tags: news, magazine, blog, rtl-language-support, custom-logo, custom-menu, featured-images, theme-options, translation-ready, one-column, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, editor-style, footer-widgets, sticky-post, threaded-comments, accessibility-ready

Easy Custom Skin Theme - A modern WordPress theme by Nasir Mehmood (nasir.fr)
Features: 6 Header Layouts, 4 Footer Layouts, Dark Mode, RTL Support, AJAX Search,
Mobile Drawer Menu, Typography Controls, Breaking News Ticker, Social Sharing,
Reading Progress, Table of Contents, Schema Markup, and much more.
*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    /* Colors */
    --ecst-primary-color: #e53935;
    --ecst-primary-hover: #c62828;
    --ecst-secondary-color: #1976d2;
    --ecst-secondary-hover: #1565c0;
    --ecst-dark-color: #333333;
    --ecst-darker-color: #222222;
    --ecst-text-color: #333333;
    --ecst-text-muted: #6c757d;
    --ecst-white: #ffffff;
    --ecst-black: #000000;
    
    /* Grays */
    --ecst-gray-100: #f8f9fa;
    --ecst-gray-200: #e9ecef;
    --ecst-gray-300: #dee2e6;
    --ecst-gray-400: #ced4da;
    --ecst-gray-500: #adb5bd;
    --ecst-gray-600: #6c757d;
    --ecst-gray-700: #495057;
    --ecst-gray-800: #343a40;
    --ecst-gray-900: #212529;
    
    /* Layout */
    --ecst-container-width: 1200px;
    --ecst-topbar-height: 40px;
    --ecst-header-height: 80px;
    --ecst-border-color: #dee2e6;
    --ecst-border-radius: 4px;
    
    /* Shadows */
    --ecst-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --ecst-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --ecst-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --ecst-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --ecst-transition: all 0.3s ease;
    --ecst-transition-fast: all 0.15s ease;
    
    /* Spacing */
    --ecst-spacing-xs: 0.25rem;
    --ecst-spacing-sm: 0.5rem;
    --ecst-spacing-md: 1rem;
    --ecst-spacing-lg: 1.5rem;
    --ecst-spacing-xl: 2rem;
    --ecst-spacing-2xl: 3rem;
    
    /* Image Aspect Ratio (Customizer will override these) */
    --ecst-image-aspect-ratio: 16 / 9;
    --ecst-image-padding-ratio: 56.25%;
    
    /* Typography - Font Sizes (Customizer will override these) */
    --ecst-font-size-base: 16px;
    --ecst-line-height-base: 1.6;
    --ecst-line-height-content: 1.8;
    --ecst-line-height-heading: 1.3;
    --ecst-line-height-post-title: 1.4;
    --ecst-line-height-excerpt: 1.6;
    --ecst-line-height-widget: 1.4;
    --ecst-font-size-h1: 40px;
    --ecst-font-size-h2: 32px;
    --ecst-font-size-h3: 28px;
    --ecst-font-size-h4: 24px;
    --ecst-font-size-h5: 20px;
    --ecst-font-size-h6: 16px;
    --ecst-font-size-logo: 28px;
    --ecst-font-size-tagline: 12px;
    --ecst-font-size-menu: 15px;
    --ecst-font-size-submenu: 14px;
    --ecst-font-size-topbar: 13px;
    --ecst-font-size-breadcrumb: 14px;
    --ecst-font-size-post-title: 18px;
    --ecst-font-size-single-title: 36px;
    --ecst-font-size-meta: 13px;
    --ecst-font-size-excerpt: 15px;
    --ecst-font-size-category-badge: 12px;
    --ecst-font-size-related-title: 24px;
    --ecst-font-size-widget-title: 18px;
    --ecst-font-size-widget-content: 14px;
    --ecst-font-size-footer-title: 18px;
    --ecst-font-size-footer-text: 14px;
    --ecst-font-size-comments-title: 24px;
    --ecst-font-size-404: 96px;
    --ecst-font-size-ticker: 14px;
    --ecst-font-size-button: 14px;
    --ecst-font-size-input: 15px;
    --ecst-font-size-author-name: 18px;
    --ecst-font-size-author-bio: 14px;
    --ecst-font-size-blockquote: 18px;
    --ecst-font-size-page-title: 36px;
    --ecst-font-size-archive-title: 28px;
    --ecst-font-size-tags: 12px;
    --ecst-font-size-newsletter-title: 24px;
    --ecst-font-size-toc: 15px;
    --ecst-font-size-reading-time: 12px;
    --ecst-font-size-post-nav: 16px;
    --ecst-font-size-pagination: 14px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: var(--ecst-font-size-base);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--ecst-body-font, 'Roboto'), -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, sans-serif;
    font-size: var(--ecst-font-size-base);
    font-weight: 400;
    line-height: var(--ecst-line-height-base);
    color: var(--ecst-text-color);
    background-color: var(--ecst-white);
    overflow-x: hidden;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--ecst-spacing-md);
    font-family: var(--ecst-heading-font, 'Roboto'), -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: var(--ecst-heading-weight, 700);
    line-height: var(--ecst-line-height-heading);
    color: var(--ecst-dark-color);
}

h1 { font-size: var(--ecst-font-size-h1); }
h2 { font-size: var(--ecst-font-size-h2); }
h3 { font-size: var(--ecst-font-size-h3); }
h4 { font-size: var(--ecst-font-size-h4); }
h5 { font-size: var(--ecst-font-size-h5); }
h6 { font-size: var(--ecst-font-size-h6); }

p {
    margin: 0 0 var(--ecst-spacing-md);
}

a {
    color: var(--ecst-primary-color);
    text-decoration: none;
    transition: var(--ecst-transition-fast);
}

a:hover {
    color: var(--ecst-primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

ul, ol {
    margin: 0 0 var(--ecst-spacing-md);
    padding-left: var(--ecst-spacing-lg);
}

blockquote {
    margin: var(--ecst-spacing-lg) 0;
    padding: var(--ecst-spacing-md) var(--ecst-spacing-lg);
    border-left: 4px solid var(--ecst-primary-color);
    background-color: var(--ecst-gray-100);
    font-size: var(--ecst-font-size-blockquote);
    font-style: italic;
    color: var(--ecst-text-color);
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.ecst-container {
    width: 100%;
    max-width: var(--ecst-container-width);
    margin: 0 auto;
    padding: 0 var(--ecst-spacing-md);
}

.ecst-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(var(--ecst-spacing-md) * -1);
}

.ecst-col {
    padding: 0 var(--ecst-spacing-md);
}

/* ==========================================================================
   Header - Common Styles
   ========================================================================== */
.ecst-site-header {
    position: relative;
    z-index: 1000;
}

/* Sticky Header - All Headers */
.ecst-site-header.ecst-header-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.ecst-site-header.ecst-header-sticky.is-sticky {
    box-shadow: var(--ecst-shadow-md);
}

/* ==========================================================================
   Top Bar
   ========================================================================== */
.ecst-topbar {
    background-color: var(--ecst-darker-color);
    color: var(--ecst-white);
    height: var(--ecst-topbar-height);
    font-size: var(--ecst-font-size-topbar);
}

.ecst-topbar .ecst-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.ecst-topbar-left,
.ecst-topbar-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--ecst-spacing-md);
}

.ecst-topbar-menu {
    display: flex;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.ecst-topbar-menu li {
    position: relative;
}

.ecst-topbar-menu li:not(:last-child)::after {
    content: '|';
    color: var(--ecst-gray-600);
    margin: 0 var(--ecst-spacing-sm);
}

.ecst-topbar-menu a {
    color: var(--ecst-gray-300);
    font-size: var(--ecst-font-size-topbar);
    transition: var(--ecst-transition-fast);
}

.ecst-topbar-menu a:hover,
.ecst-topbar-menu .current-menu-item a {
    color: var(--ecst-white);
}

.ecst-topbar-date,
.ecst-topbar-info {
    color: var(--ecst-gray-400);
    font-size: var(--ecst-font-size-topbar);
}

.ecst-topbar-social {
    display: flex;
    flex-direction: row;
    gap: var(--ecst-spacing-sm);
}

.ecst-topbar-social a {
    color: var(--ecst-gray-400);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--ecst-transition-fast);
}

.ecst-topbar-social a:hover {
    color: var(--ecst-white);
    background-color: var(--ecst-primary-color);
}

/* ==========================================================================
   Header Main / Logo Area
   ========================================================================== */
.ecst-header-main {
    background-color: var(--ecst-white);
    padding: var(--ecst-spacing-md) 0;
    border-bottom: 1px solid var(--ecst-border-color);
}

.ecst-header-main .ecst-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--ecst-spacing-lg);
}

/* Logo */
.ecst-logo {
    flex-shrink: 0;
}

.ecst-logo a {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--ecst-spacing-sm);
}

.ecst-logo img {
    max-height: 60px;
    width: auto;
}

.ecst-logo-text {
    font-size: var(--ecst-font-size-logo);
    font-weight: 700;
    color: var(--ecst-dark-color);
    line-height: 1;
}

.ecst-logo-tagline {
    font-size: var(--ecst-font-size-tagline);
    color: var(--ecst-text-muted);
    margin-top: 2px;
}

/* ==========================================================================
   Header Search
   ========================================================================== */
.ecst-header-search {
    flex: 1;
    max-width: 500px;
}

.ecst-search-form {
    display: flex;
    flex-direction: row;
    position: relative;
}

.ecst-search-form input[type="search"] {
    flex: 1;
    padding: 10px 50px 10px 15px;
    border: 1px solid var(--ecst-border-color);
    border-radius: var(--ecst-border-radius);
    font-size: var(--ecst-font-size-input);
    outline: none;
    transition: var(--ecst-transition-fast);
    width: 100%;
}

.ecst-search-form input[type="search"]:focus {
    border-color: var(--ecst-primary-color);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.ecst-search-form button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 45px;
    background-color: var(--ecst-primary-color);
    border: none;
    border-radius: 0 var(--ecst-border-radius) var(--ecst-border-radius) 0;
    color: var(--ecst-white);
    cursor: pointer;
    transition: var(--ecst-transition-fast);
}

.ecst-search-form button:hover {
    background-color: var(--ecst-primary-hover);
}

/* Header Ad / Banner */
.ecst-header-ad {
    flex-shrink: 0;
}

.ecst-header-ad img {
    max-height: 90px;
    width: auto;
}

/* ==========================================================================
   Main Navigation - RTL FRIENDLY (No floats, explicit flex-direction)
   ========================================================================== */
.ecst-main-nav {
    background-color: var(--ecst-gray-200);
    border-bottom: 1px solid var(--ecst-border-color);
}

.ecst-main-nav .ecst-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}

.ecst-main-nav .ecst-header-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-left: auto;
}

/* Primary Menu - MUST use explicit flex-direction: row for RTL support */
.ecst-primary-menu,
ul.ecst-primary-menu,
#primary-menu {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ecst-primary-menu > li {
    position: relative;
    float: none; /* NO FLOAT - Important for RTL */
}

.ecst-primary-menu > li > a {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 15px 20px;
    color: var(--ecst-dark-color);
    font-weight: 500;
    font-size: var(--ecst-font-size-menu);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: var(--ecst-transition-fast);
}

.ecst-primary-menu > li > a:hover,
.ecst-primary-menu > li.current-menu-item > a,
.ecst-primary-menu > li.current-menu-parent > a {
    background-color: var(--ecst-primary-color);
    color: var(--ecst-white);
}

/* Dropdown Menu */
.ecst-primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    min-width: 220px;
    background-color: var(--ecst-white);
    box-shadow: var(--ecst-shadow-lg);
    list-style: none;
    margin: 0;
    padding: var(--ecst-spacing-sm) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--ecst-transition);
    z-index: 100;
}

.ecst-primary-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ecst-primary-menu .sub-menu li {
    float: none;
}

.ecst-primary-menu .sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--ecst-text-color);
    font-size: var(--ecst-font-size-submenu);
    border-left: 3px solid transparent;
    border-right: none;
    transition: var(--ecst-transition-fast);
}

.ecst-primary-menu .sub-menu li a:hover {
    background-color: var(--ecst-gray-100);
    border-left-color: var(--ecst-primary-color);
    color: var(--ecst-primary-color);
}

/* Nested Submenu */
.ecst-primary-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    right: auto;
}

/* Dropdown Indicator */
.ecst-primary-menu > li.menu-item-has-children > a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 8px;
    margin-right: 0;
}

/* ==========================================================================
   Mega Menu
   ========================================================================== */
.ecst-mega-menu-item {
    position: static !important;
}

.ecst-mega-menu-item > a .ecst-mega-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 8px;
    margin-right: 0;
    vertical-align: middle;
}

.ecst-mega-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--ecst-white);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-top: 3px solid var(--ecst-primary-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0;
}

.ecst-mega-menu-item:hover > .ecst-mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ecst-mega-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0;
    max-width: var(--ecst-site-width, 1200px);
    margin: 0 auto;
    padding: 25px 20px;
}

.ecst-mega-column {
    padding: 0 15px;
    border-right: 1px solid var(--ecst-border-color);
}

.ecst-mega-column:last-child {
    border-right: none;
}

.ecst-mega-column-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--ecst-font-size-menu);
    font-weight: 700;
    color: var(--ecst-dark-color);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--ecst-primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.ecst-mega-column-title:hover {
    color: var(--ecst-primary-color);
}

.ecst-mega-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: var(--ecst-primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 11px;
    line-height: 1;
}

/* Mega Menu Posts */
.ecst-mega-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ecst-mega-post-item {
    margin-bottom: 10px;
}

.ecst-mega-post-item:last-child {
    margin-bottom: 0;
}

.ecst-mega-post-item > a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.ecst-mega-post-item > a:hover {
    background: var(--ecst-gray-100);
}

.ecst-mega-post-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 45px;
    border-radius: 4px;
    overflow: hidden;
}

.ecst-mega-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ecst-mega-post-info {
    flex: 1;
    min-width: 0;
}

.ecst-mega-post-title {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ecst-text-color);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ecst-mega-post-item > a:hover .ecst-mega-post-title {
    color: var(--ecst-primary-color);
}

.ecst-mega-post-date {
    display: block;
    font-size: 11px;
    color: var(--ecst-gray-200);
    margin-top: 3px;
}

/* Mega Menu - hide default submenu arrow for mega items */
.ecst-mega-menu-item.menu-item-has-children > a::after {
    display: none;
}

/* Mega Menu Dark Mode */
body.ecst-dark-mode .ecst-mega-dropdown {
    background: var(--ecst-dark-card, #16213e);
    border-top-color: var(--ecst-primary-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

body.ecst-dark-mode .ecst-mega-column {
    border-right-color: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-mega-column-title {
    color: var(--ecst-dark-text, #e5e5e5);
    border-bottom-color: var(--ecst-primary-color);
}

body.ecst-dark-mode .ecst-mega-post-title {
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-mega-post-date {
    color: rgba(229, 229, 229, 0.5);
}

body.ecst-dark-mode .ecst-mega-post-item > a:hover {
    background: var(--ecst-dark-surface, #1f2937);
}

/* Mega Menu Responsive - collapse on mobile */
@media (max-width: 992px) {
    .ecst-mega-dropdown {
        display: none !important;
    }
}

/* Mobile Menu Toggle */
.ecst-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: var(--ecst-spacing-sm);
    cursor: pointer;
    z-index: 100;
}

.ecst-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--ecst-dark-color);
    margin: 6px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.ecst-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.ecst-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.ecst-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -7px);
}

/* ==========================================================================
   Mobile Menu Drawer
   ========================================================================== */
.ecst-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ecst-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ecst-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: var(--ecst-white);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
}

.ecst-mobile-menu.active {
    transform: translateX(0);
}

.ecst-mobile-menu-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Mobile Menu Header */
.ecst-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ecst-spacing-md) var(--ecst-spacing-lg);
    border-bottom: 1px solid var(--ecst-border-color);
    flex-shrink: 0;
}

.ecst-mobile-logo {
    flex: 1;
    min-width: 0;
}

.ecst-mobile-logo a {
    font-size: 18px;
    font-weight: 700;
    color: var(--ecst-dark-color);
    text-decoration: none;
}

.ecst-mobile-logo img {
    max-height: 40px;
    width: auto;
}

.ecst-mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--ecst-gray-100);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--ecst-transition);
    flex-shrink: 0;
    margin-left: var(--ecst-spacing-md);
}

.ecst-mobile-close:hover {
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
}

.ecst-mobile-close svg {
    width: 20px;
    height: 20px;
}

/* Mobile Search */
.ecst-mobile-search {
    padding: var(--ecst-spacing-md) var(--ecst-spacing-lg);
    border-bottom: 1px solid var(--ecst-border-color);
    flex-shrink: 0;
}

.ecst-mobile-search form {
    display: flex;
    align-items: center;
    background: var(--ecst-gray-100);
    border-radius: calc(var(--ecst-border-radius) * 2);
    overflow: hidden;
}

.ecst-mobile-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    color: var(--ecst-dark-color);
}

.ecst-mobile-search-input::placeholder {
    color: var(--ecst-text-muted);
}

.ecst-mobile-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--ecst-primary-color);
    border: none;
    color: var(--ecst-white);
    cursor: pointer;
    transition: var(--ecst-transition);
}

.ecst-mobile-search-btn:hover {
    background: var(--ecst-primary-dark);
}

/* Mobile Navigation */
.ecst-mobile-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--ecst-spacing-sm) 0;
}

.ecst-mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ecst-mobile-nav-menu li {
    border-bottom: 1px solid var(--ecst-border-color);
}

.ecst-mobile-nav-menu li:last-child {
    border-bottom: none;
}

.ecst-mobile-nav-menu > li > a,
.ecst-mobile-item-wrap > a {
    display: block;
    padding: 14px var(--ecst-spacing-lg);
    color: var(--ecst-dark-color);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--ecst-transition);
}

.ecst-mobile-nav-menu > li > a:hover,
.ecst-mobile-item-wrap > a:hover {
    color: var(--ecst-primary-color);
    background: var(--ecst-gray-50);
}

.ecst-mobile-item-wrap {
    display: flex;
    align-items: center;
}

.ecst-mobile-item-wrap > a {
    flex: 1;
}

.ecst-mobile-submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    border-left: 1px solid var(--ecst-border-color);
    cursor: pointer;
    transition: var(--ecst-transition);
    color: var(--ecst-text-muted);
}

.ecst-mobile-submenu-toggle:hover {
    background: var(--ecst-gray-100);
    color: var(--ecst-primary-color);
}

.ecst-mobile-submenu-toggle svg {
    transition: transform 0.3s ease;
}

.ecst-mobile-submenu-toggle.active svg {
    transform: rotate(180deg);
}

/* Mobile Submenu */
.ecst-mobile-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--ecst-gray-50);
}

.ecst-mobile-submenu li {
    border-bottom: 1px solid var(--ecst-border-color);
}

.ecst-mobile-submenu li:last-child {
    border-bottom: none;
}

.ecst-mobile-submenu a {
    display: block;
    padding: 12px var(--ecst-spacing-lg) 12px calc(var(--ecst-spacing-lg) + 16px);
    color: var(--ecst-text-color);
    font-size: 14px;
    text-decoration: none;
    transition: var(--ecst-transition);
    position: relative;
}

.ecst-mobile-submenu a::before {
    content: '';
    position: absolute;
    left: var(--ecst-spacing-lg);
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ecst-border-color);
    transition: var(--ecst-transition);
}

.ecst-mobile-submenu a:hover {
    color: var(--ecst-primary-color);
    background: var(--ecst-gray-100);
}

.ecst-mobile-submenu a:hover::before {
    background: var(--ecst-primary-color);
}

/* Nested Submenu */
.ecst-mobile-submenu .ecst-mobile-submenu {
    background: var(--ecst-gray-100);
}

.ecst-mobile-submenu .ecst-mobile-submenu a {
    padding-left: calc(var(--ecst-spacing-lg) + 32px);
}

.ecst-mobile-submenu .ecst-mobile-submenu a::before {
    left: calc(var(--ecst-spacing-lg) + 16px);
}

/* Mobile Menu Footer */
.ecst-mobile-menu-footer {
    padding: var(--ecst-spacing-lg);
    border-top: 1px solid var(--ecst-border-color);
    flex-shrink: 0;
    background: var(--ecst-gray-50);
}

.ecst-mobile-dark-mode {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ecst-spacing-sm) 0;
    margin-bottom: var(--ecst-spacing-md);
}

.ecst-mobile-dark-mode span {
    font-size: 14px;
    font-weight: 500;
    color: var(--ecst-dark-color);
}

.ecst-mobile-dark-toggle {
    width: 50px;
    height: 28px;
    background: var(--ecst-gray-300);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    transition: var(--ecst-transition);
}

.ecst-mobile-dark-toggle::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: var(--ecst-white);
    border-radius: 50%;
    transition: var(--ecst-transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

body.ecst-dark-mode .ecst-mobile-dark-toggle {
    background: var(--ecst-primary-color);
}

body.ecst-dark-mode .ecst-mobile-dark-toggle::before {
    transform: translateX(22px);
}

.ecst-mobile-dark-toggle .ecst-dark-mode-icon-sun,
.ecst-mobile-dark-toggle .ecst-dark-mode-icon-moon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.ecst-mobile-dark-toggle .ecst-dark-mode-icon-sun {
    left: 6px;
    color: var(--ecst-white);
    opacity: 0;
}

.ecst-mobile-dark-toggle .ecst-dark-mode-icon-moon {
    right: 6px;
    color: var(--ecst-text-muted);
}

body.ecst-dark-mode .ecst-mobile-dark-toggle .ecst-dark-mode-icon-sun {
    opacity: 1;
}

body.ecst-dark-mode .ecst-mobile-dark-toggle .ecst-dark-mode-icon-moon {
    opacity: 0;
}

/* Mobile Social Links */
.ecst-mobile-social {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ecst-spacing-sm);
    justify-content: center;
}

.ecst-mobile-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--ecst-white);
    border-radius: 50%;
    color: var(--ecst-text-muted);
    transition: var(--ecst-transition);
}

.ecst-mobile-social a:hover {
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
}

/* Body scroll lock when menu is open */
body.ecst-mobile-menu-open {
    overflow: hidden;
}

/* ==========================================================================
   Mobile Menu Dark Mode
   ========================================================================== */
body.ecst-dark-mode .ecst-mobile-menu {
    background: #1a1a2e;
}

body.ecst-dark-mode .ecst-mobile-menu-header {
    border-color: #2d2d44;
}

body.ecst-dark-mode .ecst-mobile-logo a {
    color: #f5f5f5;
}

body.ecst-dark-mode .ecst-mobile-close {
    background: #2d2d44;
    color: #f5f5f5;
}

body.ecst-dark-mode .ecst-mobile-close:hover {
    background: var(--ecst-primary-color);
}

body.ecst-dark-mode .ecst-mobile-search {
    border-color: #2d2d44;
}

body.ecst-dark-mode .ecst-mobile-search form {
    background: #2d2d44;
}

body.ecst-dark-mode .ecst-mobile-search-input {
    color: #f5f5f5;
}

body.ecst-dark-mode .ecst-mobile-nav-menu li {
    border-color: #2d2d44;
}

body.ecst-dark-mode .ecst-mobile-nav-menu > li > a,
body.ecst-dark-mode .ecst-mobile-item-wrap > a {
    color: #f5f5f5;
}

body.ecst-dark-mode .ecst-mobile-nav-menu > li > a:hover,
body.ecst-dark-mode .ecst-mobile-item-wrap > a:hover {
    background: #2d2d44;
}

body.ecst-dark-mode .ecst-mobile-submenu-toggle {
    border-color: #2d2d44;
    color: #888;
}

body.ecst-dark-mode .ecst-mobile-submenu-toggle:hover {
    background: #2d2d44;
}

body.ecst-dark-mode .ecst-mobile-submenu {
    background: #151525;
}

body.ecst-dark-mode .ecst-mobile-submenu li {
    border-color: #2d2d44;
}

body.ecst-dark-mode .ecst-mobile-submenu a {
    color: #ccc;
}

body.ecst-dark-mode .ecst-mobile-submenu a:hover {
    background: #2d2d44;
}

body.ecst-dark-mode .ecst-mobile-submenu a::before {
    background: #444;
}

body.ecst-dark-mode .ecst-mobile-submenu .ecst-mobile-submenu {
    background: var(--ecst-dark-deep, #0f0f1a);
}

body.ecst-dark-mode .ecst-mobile-menu-footer {
    background: #151525;
    border-color: #2d2d44;
}

body.ecst-dark-mode .ecst-mobile-dark-mode span {
    color: #f5f5f5;
}

body.ecst-dark-mode .ecst-mobile-social a {
    background: #2d2d44;
    color: #888;
}

body.ecst-dark-mode .ecst-mobile-social a:hover {
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
}

/* ==========================================================================
   Header Layout 1 - News Style
   ========================================================================== */
.ecst-header-1 .ecst-topbar {
    background-color: var(--ecst-darker-color);
}

.ecst-header-1 .ecst-header-main {
    background-color: var(--ecst-white);
}

.ecst-header-1 .ecst-main-nav {
    background-color: var(--ecst-gray-200);
}

/* ==========================================================================
   Header Layout 2 - Centered Logo
   ========================================================================== */
.ecst-header-2 .ecst-header-main .ecst-container {
    flex-direction: column;
    text-align: center;
}

.ecst-header-2 .ecst-logo {
    margin-bottom: var(--ecst-spacing-md);
}

.ecst-header-2 .ecst-main-nav .ecst-container {
    justify-content: center;
}

.ecst-header-2 .ecst-primary-menu {
    justify-content: center;
}

/* ==========================================================================
   Header Layout 3 - Minimal
   ========================================================================== */
.ecst-header-3 {
    background-color: var(--ecst-white);
    border-bottom: 1px solid var(--ecst-border-color);
}

.ecst-header-3 .ecst-header-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: var(--ecst-spacing-md) 0;
}

.ecst-header-3 .ecst-header-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--ecst-spacing-md);
}

/* ==========================================================================
   Header Layout 4 - Dark Theme
   ========================================================================== */
.ecst-header-4 .ecst-topbar {
    background-color: var(--ecst-black);
}

.ecst-header-4 .ecst-header-main {
    background-color: var(--ecst-darker-color);
    border-bottom-color: var(--ecst-gray-800);
}

.ecst-header-4 .ecst-logo-text {
    color: var(--ecst-white);
}

.ecst-header-4 .ecst-search-form input[type="search"] {
    background-color: var(--ecst-gray-800);
    border-color: var(--ecst-gray-700);
    color: var(--ecst-white);
}

.ecst-header-4 .ecst-search-form input[type="search"]::placeholder {
    color: var(--ecst-gray-500);
}

.ecst-header-4 .ecst-main-nav {
    background-color: var(--ecst-gray-900);
    border-bottom-color: var(--ecst-gray-800);
}

.ecst-header-4 .ecst-primary-menu > li > a {
    color: var(--ecst-gray-300);
}

.ecst-header-4 .ecst-primary-menu > li > a:hover,
.ecst-header-4 .ecst-primary-menu > li.current-menu-item > a {
    background-color: var(--ecst-primary-color);
    color: var(--ecst-white);
}

.ecst-header-4 .ecst-menu-toggle span {
    background-color: var(--ecst-white);
}

/* Header 4 - Dark Mode Overrides */
body.ecst-dark-mode .ecst-header-4 .ecst-logo-text {
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-header-4 .ecst-search-form input[type="search"] {
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-header-4 .ecst-primary-menu > li > a {
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-header-4 .ecst-primary-menu > li > a:hover,
body.ecst-dark-mode .ecst-header-4 .ecst-primary-menu > li.current-menu-item > a {
    color: #ffffff;
}

body.ecst-dark-mode .ecst-header-4 .ecst-menu-toggle span {
    background-color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-header-4 .ecst-dark-mode-toggle {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--ecst-dark-text, #e5e5e5);
}

/* ==========================================================================
   Header Layout 5 - Business
   ========================================================================== */
.ecst-header-5 .ecst-header-main .ecst-container {
    justify-content: space-between;
}

.ecst-header-5 .ecst-header-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--ecst-spacing-md);
}

.ecst-header-5 .ecst-cta-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--ecst-primary-color);
    color: var(--ecst-white);
    border-radius: var(--ecst-border-radius);
    font-weight: 500;
    transition: var(--ecst-transition-fast);
}

.ecst-header-5 .ecst-cta-button:hover {
    background-color: var(--ecst-primary-hover);
    color: var(--ecst-white);
}

/* ==========================================================================
   Header Layout 6 - Transparent
   ========================================================================== */
.ecst-header-6 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    z-index: 1000;
}

.ecst-header-6.ecst-header-scrolled {
    position: fixed;
    background-color: var(--ecst-white);
    box-shadow: var(--ecst-shadow-md);
}

.ecst-header-6 .ecst-header-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: var(--ecst-spacing-lg) 0;
}

.ecst-header-6 .ecst-logo-text {
    color: var(--ecst-white);
}

.ecst-header-6.ecst-header-scrolled .ecst-logo-text {
    color: var(--ecst-dark-color);
}

.ecst-header-6 .ecst-primary-menu > li > a {
    color: var(--ecst-white);
}

.ecst-header-6.ecst-header-scrolled .ecst-primary-menu > li > a {
    color: var(--ecst-dark-color);
}

.ecst-header-6 .ecst-header-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--ecst-spacing-md);
}

/* Header 6 - Search toggle white on transparent */
.ecst-header-6 .ecst-search-toggle {
    background: rgba(255, 255, 255, 0.2);
    color: var(--ecst-white);
}

.ecst-header-6 .ecst-search-toggle:hover {
    background: var(--ecst-white);
    color: var(--ecst-dark-color);
}

.ecst-header-6.ecst-header-scrolled .ecst-search-toggle,
.ecst-header-6.ecst-header-sticky.is-sticky .ecst-search-toggle {
    background: var(--ecst-gray-100);
    color: var(--ecst-dark-color);
}

.ecst-header-6.ecst-header-scrolled .ecst-search-toggle:hover,
.ecst-header-6.ecst-header-sticky.is-sticky .ecst-search-toggle:hover {
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
}

/* Header 6 - Sticky Mode Override */
.ecst-header-6.ecst-header-sticky {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    background-color: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Header 6 - Dark Mode Overrides */
body.ecst-dark-mode .ecst-header-6 .ecst-search-toggle {
    background: rgba(255, 255, 255, 0.15);
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-header-6 .ecst-search-toggle:hover {
    background: var(--ecst-primary-color);
    color: #ffffff;
}

body.ecst-dark-mode .ecst-header-6 .ecst-logo-text {
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-header-6 .ecst-primary-menu > li > a {
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-header-6 .ecst-header-actions,
body.ecst-dark-mode .ecst-header-6 .ecst-header-actions svg {
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-header-6 .ecst-dark-mode-toggle {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-header-6 .ecst-dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--ecst-primary-color);
}

body.ecst-dark-mode .ecst-header-6.ecst-header-scrolled,
body.ecst-dark-mode .ecst-header-6.ecst-header-sticky.is-sticky {
    background-color: var(--ecst-gray-900, #212529);
}

body.ecst-dark-mode .ecst-header-6.ecst-header-scrolled .ecst-search-toggle,
body.ecst-dark-mode .ecst-header-6.ecst-header-sticky.is-sticky .ecst-search-toggle {
    background: var(--ecst-gray-200);
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-header-6.ecst-header-scrolled .ecst-search-toggle:hover,
body.ecst-dark-mode .ecst-header-6.ecst-header-sticky.is-sticky .ecst-search-toggle:hover {
    background: var(--ecst-primary-color);
    color: #ffffff;
}

.ecst-header-6.ecst-header-sticky.is-sticky {
    background-color: var(--ecst-white);
    box-shadow: var(--ecst-shadow-md);
}

.ecst-header-6.ecst-header-sticky.is-sticky .ecst-logo-text {
    color: var(--ecst-dark-color);
}

.ecst-header-6.ecst-header-sticky.is-sticky .ecst-primary-menu > li > a {
    color: var(--ecst-dark-color);
}

.ecst-header-6.ecst-header-sticky.is-sticky .ecst-header-actions,
.ecst-header-6.ecst-header-sticky.is-sticky .ecst-header-actions svg {
    color: var(--ecst-dark-color);
}

[data-theme="dark"] .ecst-header-6.ecst-header-sticky.is-sticky {
    background-color: var(--ecst-gray-900);
}

[data-theme="dark"] .ecst-header-6.ecst-header-sticky.is-sticky .ecst-logo-text,
[data-theme="dark"] .ecst-header-6.ecst-header-sticky.is-sticky .ecst-primary-menu > li > a,
[data-theme="dark"] .ecst-header-6.ecst-header-sticky.is-sticky .ecst-header-actions,
[data-theme="dark"] .ecst-header-6.ecst-header-sticky.is-sticky .ecst-header-actions svg {
    color: var(--ecst-gray-100);
}

/* ==========================================================================
   Content Area
   ========================================================================== */
.ecst-site-content {
    padding: var(--ecst-spacing-xl) 0;
}

.ecst-content-sidebar {
    display: grid;
    grid-template-columns: 1fr var(--ecst-sidebar-width, 300px);
    gap: var(--ecst-spacing-xl);
}

.ecst-content-area {
    min-width: 0;
}

.ecst-posts-area {
    min-width: 0;
    overflow: hidden;
}

/* ==========================================================================
   Page Header (Archive, Category, Search)
   ========================================================================== */
.ecst-page-header {
    background-color: var(--ph-bg-color, #f8f9fa);
    padding: var(--ph-padding-top, 30px) var(--ph-padding-x, 20px) var(--ph-padding-bottom, 30px);
    margin-bottom: var(--ph-margin-bottom, 30px);
    border-radius: var(--ph-border-radius, 8px);
}

.ecst-page-header-inner {
    max-width: var(--ecst-container-width, 1200px);
    margin: 0 auto;
}

/* Alignment */
.ecst-page-header-align-left {
    text-align: left;
}

.ecst-page-header-align-center {
    text-align: center;
}

.ecst-page-header-align-right {
    text-align: right;
}

/* Title */
.ecst-page-header .ecst-page-title {
    font-size: var(--ph-title-size, clamp(20px, 3vw, 32px));
    font-weight: var(--ph-title-weight, 700);
    color: var(--ph-title-color, #212529);
    margin: 0 0 5px 0;
    line-height: var(--ecst-line-height-heading);
}

/* Post Count */
.ecst-page-header-count {
    display: inline-block;
    font-size: 14px;
    color: var(--ph-desc-color, #6c757d);
    margin-bottom: 10px;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
}

/* Description */
.ecst-page-header .ecst-archive-description {
    color: var(--ph-desc-color, #6c757d);
    font-size: 16px;
    line-height: var(--ecst-line-height-excerpt);
    margin-top: 10px;
}

.ecst-page-header .ecst-archive-description p {
    margin: 0;
}

/* Breadcrumb */
.ecst-page-header-breadcrumb {
    font-size: 14px;
    color: var(--ph-desc-color, #6c757d);
    margin-bottom: 10px;
}

.ecst-page-header-breadcrumb a {
    color: var(--ph-desc-color, #6c757d);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ecst-page-header-breadcrumb a:hover {
    color: var(--ph-title-color, #212529);
}

.ecst-breadcrumb-sep {
    margin: 0 8px;
    opacity: 0.5;
}

.ecst-breadcrumb-current {
    color: var(--ph-title-color, #212529);
}

/* Style 1 - Simple (default) */
.ecst-page-header-style-1 {
    background-color: transparent;
    border-bottom: 1px solid var(--ph-border-color, #dee2e6);
    border-radius: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Style 2 - Bordered */
.ecst-page-header-style-2 {
    background-color: var(--ph-bg-color, #f8f9fa);
    border: 2px solid var(--ph-border-color, #dee2e6);
}

/* Style 3 - Background Fill */
.ecst-page-header-style-3 {
    background-color: var(--ph-bg-color, #f8f9fa);
    border: none;
}

/* Style 4 - Gradient */
.ecst-page-header-style-4 {
    background: linear-gradient(135deg, var(--ph-bg-color, #f8f9fa) 0%, var(--ph-gradient-color, #e9ecef) 100%);
    border: none;
}

/* Style 5 - Left Border */
.ecst-page-header-style-5 {
    background-color: var(--ph-bg-color, #f8f9fa);
    border-left: 4px solid var(--ph-accent-color, #0d6efd);
    border-radius: 0 var(--ph-border-radius, 8px) var(--ph-border-radius, 8px) 0;
}

/* RTL Support */
.rtl .ecst-page-header-style-5 {
    border-left: none;
    border-right: 4px solid var(--ph-accent-color, #0d6efd);
    border-radius: var(--ph-border-radius, 8px) 0 0 var(--ph-border-radius, 8px);
}

/* Dark Mode */
[data-theme="dark"] .ecst-page-header {
    background-color: var(--ecst-gray-800);
}

[data-theme="dark"] .ecst-page-header .ecst-page-title {
    color: var(--ecst-gray-100);
}

[data-theme="dark"] .ecst-page-header .ecst-archive-description,
[data-theme="dark"] .ecst-page-header-count,
[data-theme="dark"] .ecst-page-header-breadcrumb {
    color: var(--ecst-gray-400);
}

[data-theme="dark"] .ecst-page-header-breadcrumb a {
    color: var(--ecst-gray-400);
}

[data-theme="dark"] .ecst-page-header-breadcrumb a:hover,
[data-theme="dark"] .ecst-breadcrumb-current {
    color: var(--ecst-gray-100);
}

[data-theme="dark"] .ecst-page-header-count {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .ecst-page-header-style-1 {
    border-bottom-color: var(--ecst-gray-700);
}

[data-theme="dark"] .ecst-page-header-style-2 {
    border-color: var(--ecst-gray-700);
}

[data-theme="dark"] .ecst-page-header-style-4 {
    background: linear-gradient(135deg, var(--ecst-gray-800) 0%, var(--ecst-gray-900) 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .ecst-page-header {
        padding: calc(var(--ph-padding-top, 30px) * 0.7) calc(var(--ph-padding-x, 20px) * 0.7) calc(var(--ph-padding-bottom, 30px) * 0.7);
        margin-bottom: calc(var(--ph-margin-bottom, 30px) * 0.7);
    }
}

/* No Results Section */
.ecst-no-results {
    text-align: center;
    padding: 60px 20px;
}

.ecst-no-results-inner {
    max-width: 500px;
    margin: 0 auto;
}

.ecst-no-results-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--ecst-text-color, #333);
    margin: 0 0 20px 0;
}

.ecst-no-results .ecst-page-content {
    color: var(--ecst-text-muted, #6c757d);
}

.ecst-no-results .ecst-page-content p {
    margin-bottom: 20px;
}

.ecst-no-results .ecst-search-form {
    max-width: 400px;
    margin: 0 auto;
}

[data-theme="dark"] .ecst-no-results-title {
    color: var(--ecst-gray-100);
}

[data-theme="dark"] .ecst-no-results .ecst-page-content {
    color: var(--ecst-gray-400);
}

/* Posts Area - Prevent Overflow */
.ecst-posts-area {
    min-width: 0;
    overflow: hidden;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.ecst-sidebar {
    padding-left: var(--ecst-spacing-xl);
    border-left: 1px solid var(--ecst-border-color);
}

/* Sidebar Left Position */
.ecst-sidebar-left .ecst-content-sidebar {
    grid-template-columns: var(--ecst-sidebar-width, 300px) 1fr;
}

.ecst-sidebar-left .ecst-posts-area {
    order: 2;
}

.ecst-sidebar-left .ecst-sidebar {
    order: 1;
    padding-left: 0;
    padding-right: var(--ecst-spacing-xl);
    border-left: none;
    border-right: 1px solid var(--ecst-border-color);
}

.ecst-widget {
    margin-bottom: var(--ecst-spacing-xl);
}

.ecst-widget:last-child {
    margin-bottom: 0;
}

.ecst-widget-title {
    font-size: var(--ecst-font-size-widget-title);
    font-weight: 700;
    margin-bottom: var(--ecst-spacing-md);
    padding-bottom: var(--ecst-spacing-sm);
    border-bottom: 2px solid var(--ecst-primary-color);
}

.ecst-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ecst-widget ul li {
    padding: var(--ecst-spacing-sm) 0;
    border-bottom: 1px solid var(--ecst-border-color);
}

.ecst-widget ul li:last-child {
    border-bottom: none;
}

/* ==========================================================================
   Posts / Articles
   ========================================================================== */
.ecst-post {
    margin-bottom: var(--ecst-spacing-xl);
    padding-bottom: var(--ecst-spacing-xl);
    border-bottom: 1px solid var(--ecst-border-color);
}

.ecst-post:last-child {
    border-bottom: none;
}

/* Post Content Wrapper - for all layouts */
.ecst-post-content {
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* ==========================================================================
   List Compact Layout - Thumbnail Left, Content Right
   ========================================================================== */
.ecst-list-compact .ecst-post {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 1.5rem;
    align-items: flex-start;
    padding-bottom: 1.25rem !important;
    margin-bottom: 1.25rem !important;
}

.ecst-list-compact .ecst-post:last-child {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-bottom: none !important;
}

.ecst-list-compact .ecst-post-thumbnail {
    flex: 0 0 280px !important;
    width: 280px !important;
    max-width: 280px !important;
    margin-bottom: 0 !important;
    border-radius: var(--ecst-border-radius);
    overflow: hidden;
    position: static !important;
    padding-bottom: 0 !important;
}

.ecst-list-compact .ecst-post-thumbnail img {
    position: static !important;
    width: 100%;
    aspect-ratio: var(--ecst-image-aspect-ratio);
    object-fit: cover;
    display: block;
    transition: var(--ecst-transition);
}

.ecst-list-compact .ecst-post:hover .ecst-post-thumbnail img {
    transform: scale(1.03);
}

.ecst-list-compact .ecst-post-content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
}

.ecst-list-compact .ecst-entry-header {
    margin-bottom: 0.5rem;
}

.ecst-list-compact .ecst-category-badge {
    display: inline-block;
    margin-bottom: 0.5rem;
}

.ecst-list-compact .ecst-post-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: var(--ecst-line-height-post-title);
}

.ecst-list-compact .ecst-post-title a {
    color: var(--ecst-dark-color);
}

.ecst-list-compact .ecst-post-title a:hover {
    color: var(--ecst-primary-color);
}

.ecst-list-compact .ecst-post-meta {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--ecst-text-muted);
}

.ecst-list-compact .ecst-post-meta > span,
.ecst-list-compact .ecst-post-meta > a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.ecst-list-compact .ecst-post-excerpt {
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    color: var(--ecst-text-muted);
    line-height: var(--ecst-line-height-excerpt);
}

.ecst-list-compact .ecst-post-excerpt p {
    margin: 0;
}

.ecst-list-compact .ecst-entry-footer {
    margin-top: 0.5rem;
}

.ecst-list-compact .ecst-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    color: var(--ecst-primary-color);
}

@media (max-width: 768px) {
    .ecst-list-compact .ecst-post {
        flex-direction: column !important;
    }
    
    .ecst-list-compact .ecst-post-thumbnail {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    .ecst-list-compact .ecst-post-thumbnail img {
        height: auto;
    }
}

/* ==========================================================================
   List Alternating Layout - Card Style with Image Switching Sides
   ========================================================================== */
.ecst-list-alt .ecst-post {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 2rem;
    align-items: stretch;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    background: var(--ecst-white);
    border-radius: var(--ecst-border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-bottom: none !important;
    transition: var(--ecst-transition);
}

.ecst-list-alt .ecst-post:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.ecst-list-alt .ecst-post:nth-child(even) {
    flex-direction: row-reverse !important;
}

.ecst-list-alt .ecst-post-thumbnail {
    flex: 0 0 40% !important;
    width: 40% !important;
    max-width: 40% !important;
    margin-bottom: 0 !important;
    border-radius: var(--ecst-border-radius);
    overflow: hidden;
    position: static !important;
    padding-bottom: 0 !important;
}

.ecst-list-alt .ecst-post-thumbnail img {
    position: static !important;
    width: 100%;
    height: 100%;
    aspect-ratio: var(--ecst-image-aspect-ratio);
    object-fit: cover;
    display: block;
    transition: var(--ecst-transition);
}

.ecst-list-alt .ecst-post:hover .ecst-post-thumbnail img {
    transform: scale(1.05);
}

.ecst-list-alt .ecst-post-content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem 0;
}

.ecst-list-alt .ecst-entry-header {
    margin-bottom: 0.5rem;
}

.ecst-list-alt .ecst-category-badge {
    display: inline-block;
    margin-bottom: 0.5rem;
}

.ecst-list-alt .ecst-post-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: var(--ecst-line-height-post-title);
}

.ecst-list-alt .ecst-post-title a {
    color: var(--ecst-dark-color);
}

.ecst-list-alt .ecst-post-title a:hover {
    color: var(--ecst-primary-color);
}

.ecst-list-alt .ecst-post-meta {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--ecst-text-muted);
}

.ecst-list-alt .ecst-post-meta > span,
.ecst-list-alt .ecst-post-meta > a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.ecst-list-alt .ecst-post-excerpt {
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    color: var(--ecst-text-muted);
    line-height: var(--ecst-line-height-excerpt);
}

.ecst-list-alt .ecst-post-excerpt p {
    margin: 0;
}

.ecst-list-alt .ecst-entry-footer {
    margin-top: auto;
}

.ecst-list-alt .ecst-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    color: var(--ecst-primary-color);
}

@media (max-width: 768px) {
    .ecst-list-alt .ecst-post,
    .ecst-list-alt .ecst-post:nth-child(even) {
        flex-direction: column !important;
        padding: 0;
        padding-bottom: 1.5rem;
        background: transparent;
        box-shadow: none;
        border-bottom: 1px solid var(--ecst-border-color) !important;
        border-radius: 0;
    }
    
    .ecst-list-alt .ecst-post:hover {
        transform: none;
        box-shadow: none;
    }
    
    .ecst-list-alt .ecst-post-thumbnail {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    .ecst-list-alt .ecst-post-thumbnail img {
        min-height: auto;
        height: auto;
    }
    
    .ecst-list-alt .ecst-post-content {
        padding: 0;
    }
}

/* Grid Layout */
.ecst-posts-grid {
    display: grid;
    gap: var(--ecst-spacing-xl);
}

.ecst-posts-grid.ecst-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ecst-posts-grid.ecst-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ecst-posts-grid.ecst-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.ecst-posts-grid .ecst-post {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    background: var(--ecst-white);
    border-radius: var(--ecst-border-radius);
    overflow: hidden;
    box-shadow: var(--ecst-shadow-sm);
    transition: var(--ecst-transition);
}

.ecst-posts-grid .ecst-post:hover {
    box-shadow: var(--ecst-shadow-md);
    transform: translateY(-3px);
}

.ecst-posts-grid .ecst-post-thumbnail {
    display: block;
    margin-bottom: 0;
    border-radius: 0;
    position: relative;
    padding-bottom: var(--ecst-image-padding-ratio); /* Uses CSS variable for aspect ratio */
    overflow: hidden;
}

.ecst-posts-grid .ecst-post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ecst-posts-grid .ecst-entry-header,
.ecst-posts-grid .ecst-post-excerpt,
.ecst-posts-grid .ecst-entry-footer {
    padding: 0 var(--ecst-spacing-md);
}

.ecst-posts-grid .ecst-entry-header {
    padding-top: var(--ecst-spacing-md);
}

.ecst-posts-grid .ecst-entry-footer {
    padding-bottom: var(--ecst-spacing-md);
}

.ecst-posts-grid .ecst-post-title {
    font-size: var(--ecst-font-size-post-title);
    line-height: var(--ecst-line-height-post-title);
}

.ecst-posts-grid .ecst-post-meta {
    font-size: var(--ecst-font-size-meta);
}

.ecst-posts-grid .ecst-post-excerpt {
    font-size: var(--ecst-font-size-excerpt);
}

@media (max-width: 1024px) {
    .ecst-posts-grid.ecst-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .ecst-posts-grid.ecst-grid-2,
    .ecst-posts-grid.ecst-grid-3,
    .ecst-posts-grid.ecst-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ecst-posts-grid.ecst-grid-2,
    .ecst-posts-grid.ecst-grid-3,
    .ecst-posts-grid.ecst-grid-4 {
        grid-template-columns: 1fr;
    }
}

.ecst-post-thumbnail {
    display: block;
    margin-bottom: var(--ecst-spacing-md);
    border-radius: var(--ecst-border-radius);
    overflow: hidden;
}

.ecst-post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--ecst-transition);
}

.ecst-post-thumbnail:hover img {
    transform: scale(1.05);
}

.ecst-post-title {
    font-size: var(--ecst-font-size-post-title);
    margin-bottom: var(--ecst-spacing-sm);
}

.ecst-post-title a {
    color: var(--ecst-dark-color);
}

.ecst-post-title a:hover {
    color: var(--ecst-primary-color);
}

.ecst-post-meta {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--ecst-spacing-md);
    margin-bottom: var(--ecst-spacing-md);
    font-size: var(--ecst-font-size-meta);
    color: var(--ecst-text-muted);
}

.ecst-post-meta span {
    display: inline-flex;
    align-items: center;
    gap: var(--ecst-spacing-xs);
}

.ecst-post-meta a {
    color: var(--ecst-text-muted);
}

.ecst-post-meta a:hover {
    color: var(--ecst-primary-color);
}

.ecst-post-excerpt {
    margin-bottom: var(--ecst-spacing-md);
    color: var(--ecst-text-color);
}

.ecst-read-more {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: var(--ecst-spacing-xs);
    color: var(--ecst-primary-color);
    font-weight: 500;
}

.ecst-read-more:hover {
    color: var(--ecst-primary-hover);
}

.ecst-read-more svg {
    width: 16px;
    height: 16px;
    transition: var(--ecst-transition-fast);
}

.ecst-read-more:hover svg {
    transform: translateX(3px);
}

/* Category Badge */
.ecst-category-badge {
    display: inline-block;
    padding: 4px 10px;
    background-color: var(--ecst-primary-color);
    color: var(--ecst-white);
    font-size: var(--ecst-font-size-category-badge);
    font-weight: 500;
    text-transform: uppercase;
    border-radius: var(--ecst-border-radius);
    margin-bottom: var(--ecst-spacing-sm);
}

/* ==========================================================================
   Single Post
   ========================================================================== */
.ecst-single-post {
    max-width: 100%;
    overflow: hidden;
}

.ecst-single-post .ecst-entry-header {
    margin-bottom: var(--ecst-spacing-lg);
}

.ecst-single-post .ecst-entry-title {
    font-size: var(--ecst-font-size-h1);
    margin-bottom: var(--ecst-spacing-md);
}

.ecst-single-post .ecst-entry-content {
    font-size: var(--ecst-font-size-base);
    line-height: var(--ecst-line-height-content);
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
    overflow: hidden;
}

.ecst-single-post .ecst-entry-content p {
    margin-bottom: var(--ecst-spacing-lg);
}

/* Images and Media - Prevent Overflow */
.ecst-entry-content img {
    max-width: 100% !important;
    width: auto !important;
    height: auto;
    box-sizing: border-box;
}

/* WordPress Caption - Override inline width style */
.ecst-entry-content .wp-caption {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    margin: var(--ecst-spacing-lg) auto;
    box-sizing: border-box;
    padding: 0 !important;
}

/* Override any inline style width on caption */
.ecst-entry-content .wp-caption[style*="width"] {
    width: auto !important;
    max-width: 100% !important;
}

.ecst-entry-content figure,
.ecst-entry-content [class*="wp-image"],
.ecst-entry-content .attachment-full {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    margin: var(--ecst-spacing-lg) 0;
    box-sizing: border-box;
}

.ecst-entry-content .wp-caption img,
.ecst-entry-content figure img,
.ecst-entry-content a > img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block;
    box-sizing: border-box;
}

/* Override images with inline width/height attributes */
.ecst-entry-content img[width],
.ecst-entry-content img[height] {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
}

/* Responsive image class added via filter */
.ecst-entry-content .ecst-responsive-img {
    max-width: 100% !important;
    height: auto !important;
}

.ecst-entry-content .wp-caption-text,
.ecst-entry-content figcaption {
    font-size: var(--ecst-font-size-meta);
    color: var(--ecst-text-muted);
    text-align: center;
    padding: var(--ecst-spacing-sm) 0;
    line-height: 1.5;
}

/* WordPress Alignment Classes */
.ecst-entry-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    max-width: 100% !important;
}

.ecst-entry-content .alignleft {
    float: left;
    margin: 0 var(--ecst-spacing-lg) var(--ecst-spacing-md) 0;
    max-width: 50%;
}

.ecst-entry-content .alignright {
    float: right;
    margin: 0 0 var(--ecst-spacing-md) var(--ecst-spacing-lg);
    max-width: 50%;
}

.ecst-entry-content .alignnone {
    max-width: 100% !important;
    width: auto !important;
    height: auto;
}

/* Embedded Media (iframes, videos, embeds) */
.ecst-entry-content iframe,
.ecst-entry-content video,
.ecst-entry-content embed,
.ecst-entry-content object {
    max-width: 100%;
}

/* WordPress Block Editor */
.ecst-entry-content .wp-block-image {
    max-width: 100%;
    margin: var(--ecst-spacing-lg) 0;
}

.ecst-entry-content .wp-block-image img {
    max-width: 100%;
    height: auto;
}

.ecst-entry-content .wp-block-image.aligncenter {
    text-align: center;
}

.ecst-entry-content .wp-block-image figcaption {
    font-size: var(--ecst-font-size-meta);
    color: var(--ecst-text-muted);
    text-align: center;
    margin-top: var(--ecst-spacing-sm);
}

/* Clear floats after aligned content */
.ecst-entry-content::after {
    content: "";
    display: table;
    clear: both;
}

/* ==========================================================================
   Post Tags
   ========================================================================== */
.ecst-post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 0;
    margin: 20px 0;
    border-top: 1px solid var(--ecst-border-color, #e9ecef);
    border-bottom: 1px solid var(--ecst-border-color, #e9ecef);
}

.ecst-post-tags-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ecst-text-color, #333);
    white-space: nowrap;
}

.ecst-post-tags-label svg {
    color: var(--tags-hover-bg, var(--ecst-primary-color, #e53935));
}

.ecst-post-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ecst-post-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: var(--tags-font-size, 13px);
    font-weight: 500;
    color: var(--tags-text, #333);
    background-color: var(--tags-bg, #f8f9fa);
    border: 1px solid var(--tags-border, #e9ecef);
    border-radius: var(--tags-radius, 20px);
    text-decoration: none;
    transition: all 0.2s ease;
}

.ecst-post-tag:hover {
    color: var(--tags-hover-text, #fff);
    background-color: var(--tags-hover-bg, #e53935);
    border-color: var(--tags-hover-bg, #e53935);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Post Tags Style 2 - Hashtag Style */
.ecst-post-tags-style-2 .ecst-post-tag {
    background-color: transparent;
    border: none;
    padding: 4px 8px;
    color: var(--tags-hover-bg, #e53935);
    font-weight: 600;
}

.ecst-post-tags-style-2 .ecst-post-tag::before {
    content: '#';
}

.ecst-post-tags-style-2 .ecst-post-tag:hover {
    background-color: var(--tags-hover-bg, #e53935);
    color: var(--tags-hover-text, #fff);
    border-radius: 4px;
    transform: none;
    box-shadow: none;
}

/* Post Tags Style 3 - Filled */
.ecst-post-tags-style-3 .ecst-post-tag {
    background-color: var(--tags-hover-bg, #e53935);
    color: var(--tags-hover-text, #fff);
    border-color: var(--tags-hover-bg, #e53935);
}

.ecst-post-tags-style-3 .ecst-post-tag:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

/* Post Tags Style 4 - Outlined */
.ecst-post-tags-style-4 .ecst-post-tag {
    background-color: transparent;
    color: var(--tags-hover-bg, #e53935);
    border: 2px solid var(--tags-hover-bg, #e53935);
}

.ecst-post-tags-style-4 .ecst-post-tag:hover {
    background-color: var(--tags-hover-bg, #e53935);
    color: var(--tags-hover-text, #fff);
}

/* Post Tags Style 5 - Minimal */
.ecst-post-tags-style-5 {
    border: none;
    padding: 0;
    margin: 30px 0;
}

.ecst-post-tags-style-5 .ecst-post-tag {
    background-color: transparent;
    border: none;
    padding: 4px 0;
    color: var(--ecst-text-muted, #6c757d);
    font-size: var(--tags-font-size, 14px);
    border-radius: 0;
}

.ecst-post-tags-style-5 .ecst-post-tags-list {
    gap: 4px;
}

.ecst-post-tags-style-5 .ecst-post-tag::after {
    content: ',';
    margin-left: 2px;
}

.ecst-post-tags-style-5 .ecst-post-tag:last-child::after {
    content: '';
}

.ecst-post-tags-style-5 .ecst-post-tag:hover {
    color: var(--tags-hover-bg, #e53935);
    background-color: transparent;
    transform: none;
    box-shadow: none;
}

/* Dark Mode */
[data-theme="dark"] .ecst-post-tags {
    border-color: var(--ecst-gray-700);
}

[data-theme="dark"] .ecst-post-tags-label {
    color: var(--ecst-gray-100);
}

[data-theme="dark"] .ecst-post-tags-style-1 .ecst-post-tag {
    color: var(--ecst-gray-200);
    background-color: var(--ecst-gray-800);
    border-color: var(--ecst-gray-700);
}

[data-theme="dark"] .ecst-post-tags-style-1 .ecst-post-tag:hover {
    color: var(--tags-hover-text, #fff);
    background-color: var(--tags-hover-bg, #e53935);
    border-color: var(--tags-hover-bg, #e53935);
}

[data-theme="dark"] .ecst-post-tags-style-2 .ecst-post-tag {
    background-color: transparent;
}

[data-theme="dark"] .ecst-post-tags-style-5 .ecst-post-tag {
    color: var(--ecst-gray-400);
}

[data-theme="dark"] .ecst-post-tags-style-5 .ecst-post-tag:hover {
    color: var(--tags-hover-bg, #e53935);
}

/* Responsive */
@media (max-width: 576px) {
    .ecst-post-tags {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ecst-post-tag {
        padding: 5px 12px;
    }
}

/* Author Bio */
.ecst-author-bio {
    display: flex;
    flex-direction: row;
    gap: var(--ecst-spacing-lg);
    padding: var(--ecst-spacing-lg);
    background-color: var(--ecst-gray-100);
    border-radius: var(--ecst-border-radius);
    margin: var(--ecst-spacing-xl) 0;
}

.ecst-author-avatar {
    flex-shrink: 0;
}

.ecst-author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.ecst-author-info h4 {
    margin-bottom: var(--ecst-spacing-xs);
}

/* Post Navigation - Modern with Thumbnails */
.ecst-post-navigation {
    margin: var(--ecst-spacing-xl) 0;
    padding: var(--ecst-spacing-xl) 0;
    border-top: 2px solid var(--ecst-border-color);
    border-bottom: 2px solid var(--ecst-border-color);
}

.ecst-nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ecst-spacing-xl);
}

.ecst-nav-previous,
.ecst-nav-next {
    display: flex;
    align-items: center;
    gap: var(--ecst-spacing-lg);
    padding: var(--ecst-spacing-lg);
    background: var(--ecst-white);
    border: 1px solid var(--ecst-border-color);
    border-radius: calc(var(--ecst-border-radius) * 2);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ecst-nav-previous::before,
.ecst-nav-next::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--ecst-primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.ecst-nav-next::before {
    left: auto;
    right: 0;
}

.ecst-nav-previous:hover,
.ecst-nav-next:hover {
    border-color: var(--ecst-primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.ecst-nav-previous:hover::before,
.ecst-nav-next:hover::before {
    transform: scaleY(1);
}

.ecst-nav-next {
    flex-direction: row-reverse;
    text-align: right;
}

.ecst-nav-thumbnail {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: calc(var(--ecst-border-radius) * 1.5);
    overflow: hidden;
    background: var(--ecst-gray-100);
    position: relative;
}

.ecst-nav-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ecst-nav-previous:hover .ecst-nav-thumbnail::after,
.ecst-nav-next:hover .ecst-nav-thumbnail::after {
    opacity: 1;
}

.ecst-nav-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ecst-nav-previous:hover .ecst-nav-thumbnail img,
.ecst-nav-next:hover .ecst-nav-thumbnail img {
    transform: scale(1.1);
}

.ecst-nav-no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ecst-text-muted);
    background: linear-gradient(135deg, var(--ecst-gray-100) 0%, var(--ecst-gray-200) 100%);
}

.ecst-nav-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--ecst-spacing-sm);
}

.ecst-nav-label {
    display: inline-flex;
    align-items: center;
    gap: var(--ecst-spacing-xs);
    font-size: 11px;
    color: var(--ecst-primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ecst-nav-label svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.ecst-nav-previous:hover .ecst-nav-label svg {
    transform: translateX(-3px);
}

.ecst-nav-next:hover .ecst-nav-label svg {
    transform: translateX(3px);
}

.ecst-nav-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ecst-dark-color);
    line-height: var(--ecst-line-height-post-title);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.ecst-nav-previous:hover .ecst-nav-title,
.ecst-nav-next:hover .ecst-nav-title {
    color: var(--ecst-primary-color);
}

.ecst-nav-empty {
    background: transparent;
    border: 1px dashed var(--ecst-border-color);
    pointer-events: none;
}

.ecst-nav-empty::before {
    display: none;
}

@media (max-width: 768px) {
    .ecst-nav-links {
        grid-template-columns: 1fr;
        gap: var(--ecst-spacing-md);
    }
    
    .ecst-nav-previous,
    .ecst-nav-next {
        padding: var(--ecst-spacing-md);
    }
    
    .ecst-nav-next {
        flex-direction: row;
        text-align: left;
    }
    
    .ecst-nav-next::before {
        left: 0;
        right: auto;
    }
    
    .ecst-nav-thumbnail {
        width: 80px;
        height: 80px;
    }
    
    .ecst-nav-title {
        font-size: 14px;
    }
}
    
    .ecst-nav-next {
        flex-direction: row;
        text-align: left;
    }
    
    .ecst-nav-thumbnail {
        width: 70px;
        height: 70px;
    }
}

/* ==========================================================================
   Related Posts
   ========================================================================== */
.ecst-related-posts {
    margin: var(--ecst-spacing-2xl) 0;
    padding: var(--ecst-spacing-xl) 0;
    border-top: 1px solid var(--ecst-border-color);
}

.ecst-related-posts-title {
    font-size: var(--ecst-font-size-related-title);
    margin-bottom: var(--ecst-spacing-lg);
    padding-bottom: var(--ecst-spacing-sm);
    border-bottom: 3px solid var(--ecst-primary-color);
    display: inline-block;
}

.ecst-related-posts-grid {
    display: grid;
    gap: var(--ecst-spacing-lg);
}

.ecst-related-posts-grid.ecst-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ecst-related-posts-grid.ecst-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ecst-related-posts-grid.ecst-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.ecst-related-post {
    background: var(--ecst-white);
    border-radius: var(--ecst-border-radius);
    overflow: hidden;
    box-shadow: var(--ecst-shadow-sm);
    transition: var(--ecst-transition);
}

.ecst-related-post:hover {
    box-shadow: var(--ecst-shadow-md);
    transform: translateY(-3px);
}

.ecst-related-post-thumbnail {
    display: block;
    position: relative;
    padding-bottom: 60%;
    overflow: hidden;
    background: var(--ecst-gray-100);
}

.ecst-related-post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--ecst-transition);
}

.ecst-related-post:hover .ecst-related-post-thumbnail img {
    transform: scale(1.05);
}

.ecst-related-post-content {
    padding: var(--ecst-spacing-md);
}

.ecst-related-post-title {
    font-size: var(--ecst-font-size-post-title);
    line-height: var(--ecst-line-height-post-title);
    margin-bottom: var(--ecst-spacing-xs);
}

.ecst-related-post-title a {
    color: var(--ecst-dark-color);
}

.ecst-related-post-title a:hover {
    color: var(--ecst-primary-color);
}

.ecst-related-post-date {
    font-size: var(--ecst-font-size-meta);
    color: var(--ecst-text-muted);
}

.ecst-related-post-no-thumb {
    position: relative;
    background: var(--ecst-gray-100);
}

.ecst-related-post-no-thumb svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--ecst-text-muted);
}

@media (max-width: 768px) {
    .ecst-related-posts-grid.ecst-cols-3,
    .ecst-related-posts-grid.ecst-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ecst-related-posts-grid.ecst-cols-2,
    .ecst-related-posts-grid.ecst-cols-3,
    .ecst-related-posts-grid.ecst-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Comments
   ========================================================================== */
.ecst-comments-area {
    margin-top: var(--ecst-spacing-xl);
}

.ecst-comments-title {
    font-size: var(--ecst-font-size-comments-title);
    margin-bottom: var(--ecst-spacing-lg);
}

.ecst-comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ecst-comment {
    margin-bottom: var(--ecst-spacing-lg);
    padding-bottom: var(--ecst-spacing-lg);
    border-bottom: 1px solid var(--ecst-border-color);
}

.ecst-comment-body {
    display: flex;
    flex-direction: row;
    gap: var(--ecst-spacing-md);
}

.ecst-comment-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.ecst-comment-content {
    flex: 1;
}

.ecst-comment-meta {
    display: flex;
    flex-direction: row;
    gap: var(--ecst-spacing-md);
    margin-bottom: var(--ecst-spacing-sm);
    font-size: var(--ecst-font-size-widget-content);
}

.ecst-comment-author {
    font-weight: 600;
}

.ecst-comment-list .children {
    margin-top: var(--ecst-spacing-lg);
    padding-left: var(--ecst-spacing-xl);
    border-left: 2px solid var(--ecst-border-color);
}

/* Comment Form */
.ecst-comment-form {
    margin-top: var(--ecst-spacing-xl);
}

.ecst-comment-form label {
    display: block;
    margin-bottom: var(--ecst-spacing-xs);
    font-weight: 500;
}

.ecst-comment-form input[type="text"],
.ecst-comment-form input[type="email"],
.ecst-comment-form input[type="url"],
.ecst-comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--ecst-border-color);
    border-radius: var(--ecst-border-radius);
    font-size: var(--ecst-font-size-base);
    margin-bottom: var(--ecst-spacing-md);
    transition: var(--ecst-transition-fast);
}

.ecst-comment-form input:focus,
.ecst-comment-form textarea:focus {
    border-color: var(--ecst-primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.ecst-comment-form .submit {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--ecst-primary-color);
    color: var(--ecst-white);
    border: none;
    border-radius: var(--ecst-border-radius);
    font-size: var(--ecst-font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: var(--ecst-transition-fast);
}

.ecst-comment-form .submit:hover {
    background-color: var(--ecst-primary-hover);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.ecst-pagination {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: var(--ecst-spacing-xs);
    margin-top: var(--ecst-spacing-xl);
}

.ecst-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background-color: var(--ecst-gray-100);
    color: var(--ecst-text-color);
    border-radius: var(--ecst-border-radius);
    font-size: var(--ecst-font-size-pagination);
    transition: var(--ecst-transition-fast);
}

.ecst-pagination .page-numbers:hover,
.ecst-pagination .page-numbers.current {
    background-color: var(--ecst-primary-color);
    color: var(--ecst-white);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.ecst-site-footer {
    background-color: var(--ecst-darker-color);
    color: var(--ecst-gray-300);
}

.ecst-footer-widgets {
    padding: var(--ecst-spacing-2xl) 0;
}

.ecst-footer-widgets .ecst-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--ecst-spacing-xl);
}

.ecst-footer-widget {
    color: var(--ecst-gray-300);
}

.ecst-footer-widget-title {
    font-size: var(--ecst-font-size-footer-title);
    color: var(--ecst-white);
    margin-bottom: var(--ecst-spacing-md);
    padding-bottom: var(--ecst-spacing-sm);
    border-bottom: 2px solid var(--ecst-primary-color);
}

.ecst-footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ecst-footer-widget ul li {
    padding: var(--ecst-spacing-sm) 0;
    border-bottom: 1px solid var(--ecst-gray-800);
}

.ecst-footer-widget ul li:last-child {
    border-bottom: none;
}

.ecst-footer-widget a {
    color: var(--ecst-gray-400);
}

.ecst-footer-widget a:hover {
    color: var(--ecst-white);
}

/* Footer Bottom */
.ecst-footer-bottom {
    padding: var(--ecst-spacing-lg) 0;
    border-top: 1px solid var(--ecst-gray-800);
}

.ecst-footer-bottom .ecst-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--ecst-spacing-lg);
}

.ecst-copyright {
    color: var(--ecst-gray-500);
    font-size: var(--ecst-font-size-footer-text);
}

.ecst-footer-menu {
    display: flex;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--ecst-spacing-lg);
}

.ecst-footer-menu a {
    color: var(--ecst-gray-400);
    font-size: var(--ecst-font-size-footer-text);
}

.ecst-footer-menu a:hover {
    color: var(--ecst-white);
}

.ecst-footer-social {
    display: flex;
    flex-direction: row;
    gap: var(--ecst-spacing-sm);
}

.ecst-footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--ecst-gray-800);
    color: var(--ecst-gray-400);
    border-radius: 50%;
    transition: var(--ecst-transition-fast);
}

.ecst-footer-social a:hover {
    background-color: var(--ecst-primary-color);
    color: var(--ecst-white);
}

/* ==========================================================================
   Footer Layout 2 - Large First Column
   ========================================================================== */
.ecst-footer-2 .ecst-footer-widgets .ecst-container {
    grid-template-columns: 2fr 1fr 1fr;
}

.ecst-footer-2 .ecst-footer-about {
    padding-right: var(--ecst-spacing-xl);
}

.ecst-footer-2 .ecst-footer-logo {
    margin-bottom: var(--ecst-spacing-md);
}

.ecst-footer-2 .ecst-footer-logo img {
    max-height: 50px;
}

.ecst-footer-2 .ecst-footer-description {
    margin-bottom: var(--ecst-spacing-md);
    line-height: var(--ecst-line-height-excerpt);
}

/* ==========================================================================
   Footer Layout 3 - Minimal
   ========================================================================== */
.ecst-footer-3 {
    padding: var(--ecst-spacing-xl) 0;
}

.ecst-footer-3 .ecst-footer-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--ecst-spacing-lg);
}

.ecst-footer-3 .ecst-copyright {
    margin-top: var(--ecst-spacing-lg);
    text-align: center;
    padding-top: var(--ecst-spacing-lg);
    border-top: 1px solid var(--ecst-gray-800);
}

/* ==========================================================================
   Footer Layout 4 - Newsletter
   ========================================================================== */
.ecst-footer-4 .ecst-footer-newsletter {
    padding: var(--ecst-spacing-2xl) 0;
    text-align: center;
    border-bottom: 1px solid var(--ecst-gray-800);
}

.ecst-footer-4 .ecst-newsletter-title {
    font-size: var(--ecst-font-size-newsletter-title);
    color: var(--ecst-white);
    margin-bottom: var(--ecst-spacing-sm);
}

.ecst-footer-4 .ecst-newsletter-desc {
    margin-bottom: var(--ecst-spacing-lg);
    color: var(--ecst-gray-400);
}

.ecst-footer-4 .ecst-newsletter-form {
    display: flex;
    flex-direction: row;
    max-width: 500px;
    margin: 0 auto;
}

.ecst-footer-4 .ecst-newsletter-form input[type="email"] {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: var(--ecst-border-radius) 0 0 var(--ecst-border-radius);
    font-size: var(--ecst-font-size-base);
}

.ecst-footer-4 .ecst-newsletter-form button {
    padding: 12px 25px;
    background-color: var(--ecst-primary-color);
    color: var(--ecst-white);
    border: none;
    border-radius: 0 var(--ecst-border-radius) var(--ecst-border-radius) 0;
    font-weight: 500;
    cursor: pointer;
    transition: var(--ecst-transition-fast);
}

.ecst-footer-4 .ecst-newsletter-form button:hover {
    background-color: var(--ecst-primary-hover);
}

/* ==========================================================================
   Back to Top
   ========================================================================== */
.ecst-back-to-top {
    position: fixed;
    bottom: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--ecst-primary-color);
    color: var(--ecst-white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--ecst-transition);
    z-index: 999;
}

/* Position - Right (default) */
.ecst-back-to-top.ecst-back-to-top-right {
    right: 30px;
    left: auto;
}

/* Position - Left */
.ecst-back-to-top.ecst-back-to-top-left {
    left: 30px;
    right: auto;
}

.ecst-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ecst-back-to-top:hover {
    background-color: var(--ecst-primary-hover);
}

/* ==========================================================================
   Social Share Buttons
   ========================================================================== */
.ecst-social-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ecst-spacing-md);
    padding: var(--ecst-spacing-md) 0;
    margin: var(--ecst-spacing-lg) 0;
    border-top: 1px solid var(--ecst-border-color);
    border-bottom: 1px solid var(--ecst-border-color);
}

.ecst-share-label {
    font-weight: 600;
    color: var(--ecst-dark-color);
    font-size: var(--ecst-font-size-excerpt);
}

.ecst-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ecst-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--share-color, var(--ecst-gray-200));
    color: var(--ecst-white);
    border: none;
    cursor: pointer;
    transition: var(--ecst-transition);
}

.ecst-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ecst-share-btn svg {
    width: 18px;
    height: 18px;
}

/* Floating Share */
.ecst-social-share-floating {
    position: fixed;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
    padding: var(--ecst-spacing-sm);
    margin: 0;
    background: var(--ecst-white);
    border: 1px solid var(--ecst-border-color);
    border-radius: var(--ecst-border-radius);
    box-shadow: var(--ecst-shadow-md);
    z-index: 100;
}

.ecst-social-share-floating .ecst-share-buttons {
    flex-direction: column;
}

.ecst-social-share-floating .ecst-share-label {
    display: none;
}

/* ==========================================================================
   Dark Mode Toggle
   ========================================================================== */
.ecst-dark-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid var(--ecst-border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--ecst-transition);
    position: relative;
    margin-left: var(--ecst-spacing-sm);
}

.ecst-dark-mode-toggle:hover {
    background: var(--ecst-gray-100);
    border-color: var(--ecst-primary-color);
}

.ecst-dark-mode-toggle .ecst-icon-sun,
.ecst-dark-mode-toggle .ecst-icon-moon {
    position: absolute;
    display: flex;
    transition: var(--ecst-transition);
}

.ecst-dark-mode-toggle .ecst-icon-moon {
    opacity: 0;
    transform: rotate(-90deg);
}

/* Dark Mode Active State */
body.ecst-dark-mode .ecst-dark-mode-toggle .ecst-icon-sun {
    opacity: 0;
    transform: rotate(90deg);
}

body.ecst-dark-mode .ecst-dark-mode-toggle .ecst-icon-moon {
    opacity: 1;
    transform: rotate(0);
}

/* ==========================================================================
   Dark Mode Styles
   ========================================================================== */
body.ecst-dark-mode {
    --ecst-body-bg: var(--ecst-dark-bg, #1a1a2e);
    --ecst-text-color: var(--ecst-dark-text, #e5e5e5);
    --ecst-dark-color: #ffffff;
    --ecst-white: var(--ecst-dark-card, #16213e);
    --ecst-gray-100: var(--ecst-dark-surface, #1f2937);
    --ecst-gray-200: var(--ecst-dark-border, #374151);
    --ecst-border-color: var(--ecst-dark-border, #374151);
    background-color: var(--ecst-body-bg);
    color: var(--ecst-text-color);
}

body.ecst-dark-mode .ecst-site-header,
body.ecst-dark-mode .ecst-header-main {
    background: var(--ecst-dark-card, #16213e);
    border-color: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-main-nav {
    background: var(--ecst-dark-surface, #1f2937);
}

body.ecst-dark-mode .ecst-primary-menu > li > a {
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-topbar {
    background: var(--ecst-dark-deep, #0f0f1a);
}

body.ecst-dark-mode .ecst-post,
body.ecst-dark-mode .ecst-sidebar .widget,
body.ecst-dark-mode .ecst-related-post,
body.ecst-dark-mode .ecst-posts-grid .ecst-post,
body.ecst-dark-mode .ecst-list-alt .ecst-post {
    background: var(--ecst-dark-card, #16213e);
    border-color: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-single-post {
    padding: 10px;
    border-radius: var(--ecst-border-radius);
}

body.ecst-dark-mode .ecst-single-post .ecst-post-thumbnail {
    margin-left: -10px;
    margin-right: -10px;
    width: calc(100% + 20px);
    max-width: none;
}

body.ecst-dark-mode .ecst-post-title a,
body.ecst-dark-mode .ecst-entry-title,
body.ecst-dark-mode h1, body.ecst-dark-mode h2, 
body.ecst-dark-mode h3, body.ecst-dark-mode h4 {
    color: #ffffff;
}

body.ecst-dark-mode .ecst-site-footer {
    background: var(--ecst-dark-deep, #0f0f1a);
}

body.ecst-dark-mode .ecst-social-share {
    background: transparent;
    border-color: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-share-label {
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode input,
body.ecst-dark-mode textarea,
body.ecst-dark-mode select {
    background: var(--ecst-dark-surface, #1f2937);
    border-color: var(--ecst-dark-border, #374151);
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-breaking-news {
    background: var(--ecst-dark-card, #16213e);
    border-color: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-ticker-item a {
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-recent-post-title a,
body.ecst-dark-mode .ecst-popular-post-title a,
body.ecst-dark-mode .ecst-author-name {
    color: #ffffff;
}

body.ecst-dark-mode .ecst-no-thumb {
    background: var(--ecst-dark-surface, #1f2937);
}

body.ecst-dark-mode .ecst-author-info-box {
    background: var(--ecst-dark-card, #16213e);
    border-radius: var(--ecst-border-radius);
}

/* ==========================================================================
   Post Views Counter
   ========================================================================== */
.ecst-post-views {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--ecst-text-muted);
    font-size: var(--ecst-font-size-widget-content);
}

.ecst-post-views svg {
    opacity: 0.7;
}

/* ==========================================================================
   Table of Contents
   ========================================================================== */
.ecst-toc {
    background: var(--ecst-gray-100);
    border: 1px solid var(--ecst-border-color);
    border-radius: var(--ecst-border-radius);
    padding: var(--ecst-spacing-md);
    margin-bottom: var(--ecst-spacing-xl);
}

.ecst-toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--ecst-spacing-sm);
}

.ecst-toc-title {
    margin: 0;
    font-size: var(--ecst-font-size-base);
    font-weight: 600;
}

.ecst-toc-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--ecst-text-muted);
    transition: var(--ecst-transition);
}

.ecst-toc-toggle:hover {
    color: var(--ecst-primary-color);
}

.ecst-toc-toggle[aria-expanded="false"] svg {
    transform: rotate(-90deg);
}

.ecst-toc-content {
    transition: max-height 0.3s ease;
    overflow: hidden;
}

.ecst-toc.collapsed .ecst-toc-content {
    max-height: 0 !important;
}

.ecst-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ecst-toc-item {
    padding: var(--ecst-spacing-xs) 0;
    border-bottom: 1px dashed var(--ecst-border-color);
}

.ecst-toc-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ecst-toc-item a {
    color: var(--ecst-dark-color);
    font-size: var(--ecst-font-size-toc);
    display: block;
}

.ecst-toc-item a:hover {
    color: var(--ecst-primary-color);
}

.ecst-toc-h3 {
    padding-left: var(--ecst-spacing-md);
}

.ecst-toc-h4 {
    padding-left: var(--ecst-spacing-xl);
}

/* ==========================================================================
   Advertisement Spots
   ========================================================================== */
.ecst-ad {
    text-align: center;
    margin: var(--ecst-spacing-lg) 0;
    clear: both;
}

.ecst-ad-header {
    background: var(--ecst-gray-100);
    padding: var(--ecst-spacing-sm) 0;
    margin: 0;
}

.ecst-ad-before-content,
.ecst-ad-after-content {
    padding: var(--ecst-spacing-md);
    background: var(--ecst-gray-100);
    border-radius: var(--ecst-border-radius);
}

.ecst-ad-in-article {
    margin: var(--ecst-spacing-xl) auto;
    padding: var(--ecst-spacing-md);
    background: var(--ecst-gray-100);
    border-radius: var(--ecst-border-radius);
    max-width: 100%;
}

/* Shortcode Spots */
.ecst-shortcode-spot {
    margin: var(--ecst-spacing-lg) 0;
    clear: both;
}

.ecst-shortcode-after-title {
    margin-top: var(--ecst-spacing-lg);
    margin-bottom: var(--ecst-spacing-md);
}

.ecst-shortcode-after-content {
    margin-top: var(--ecst-spacing-lg);
    margin-bottom: var(--ecst-spacing-md);
}

/* ==========================================================================
   Preloader
   ========================================================================== */
.ecst-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ecst-preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.ecst-preloader-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Spinner */
.ecst-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--ecst-gray-200);
    border-top-color: var(--ecst-primary-color);
    border-radius: 50%;
    animation: ecst-spin 0.8s linear infinite;
}

@keyframes ecst-spin {
    to { transform: rotate(360deg); }
}

/* Bouncing Dots */
.ecst-dots {
    display: flex;
    gap: 0.5rem;
}

.ecst-dots span {
    width: 12px;
    height: 12px;
    background: var(--ecst-primary-color);
    border-radius: 50%;
    animation: ecst-bounce 0.6s ease-in-out infinite;
}

.ecst-dots span:nth-child(2) {
    animation-delay: 0.1s;
}

.ecst-dots span:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes ecst-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Pulse */
.ecst-pulse {
    width: 50px;
    height: 50px;
    background: var(--ecst-primary-color);
    border-radius: 50%;
    animation: ecst-pulse-anim 1s ease-in-out infinite;
}

@keyframes ecst-pulse-anim {
    0% { transform: scale(0.8); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(0.8); opacity: 1; }
}

/* Loading Bars */
.ecst-bars {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 40px;
}

.ecst-bars span {
    width: 6px;
    background: var(--ecst-primary-color);
    animation: ecst-bars-anim 1s ease-in-out infinite;
}

.ecst-bars span:nth-child(1) { height: 20px; animation-delay: 0s; }
.ecst-bars span:nth-child(2) { height: 30px; animation-delay: 0.1s; }
.ecst-bars span:nth-child(3) { height: 25px; animation-delay: 0.2s; }
.ecst-bars span:nth-child(4) { height: 35px; animation-delay: 0.3s; }

@keyframes ecst-bars-anim {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.5); }
}

/* ==========================================================================
   Cookie Notice
   ========================================================================== */
.ecst-cookie-notice {
    position: fixed;
    z-index: 9998;
    background: var(--ecst-dark-color);
    color: var(--ecst-white);
    padding: var(--ecst-spacing-md);
    box-shadow: var(--ecst-shadow-lg);
    display: none;
}

.ecst-cookie-notice.active {
    display: block;
}

.ecst-cookie-bottom {
    bottom: 0;
    left: 0;
    right: 0;
}

.ecst-cookie-bottom-left {
    bottom: var(--ecst-spacing-lg);
    left: var(--ecst-spacing-lg);
    max-width: 400px;
    border-radius: var(--ecst-border-radius);
}

.ecst-cookie-bottom-right {
    bottom: var(--ecst-spacing-lg);
    right: var(--ecst-spacing-lg);
    max-width: 400px;
    border-radius: var(--ecst-border-radius);
}

.ecst-cookie-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--ecst-spacing-md);
}

.ecst-cookie-bottom .ecst-cookie-content {
    max-width: var(--ecst-container-width);
    margin: 0 auto;
}

.ecst-cookie-message {
    margin: 0;
    font-size: var(--ecst-font-size-excerpt);
    flex: 1;
    min-width: 200px;
}

.ecst-cookie-privacy-link {
    color: var(--ecst-primary-color);
    text-decoration: underline;
}

.ecst-cookie-accept {
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
    border: none;
    padding: var(--ecst-spacing-xs) var(--ecst-spacing-lg);
    border-radius: var(--ecst-border-radius);
    cursor: pointer;
    font-weight: 500;
    font-size: var(--ecst-font-size-excerpt);
    transition: var(--ecst-transition);
    white-space: nowrap;
}

.ecst-cookie-accept:hover {
    background: var(--ecst-primary-hover);
}

/* ==========================================================================
   AJAX Live Search Overlay
   ========================================================================== */
.ecst-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    overflow-y: auto;
}

.ecst-search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ecst-search-overlay-inner {
    width: 100%;
    max-width: 700px;
    padding: 0 var(--ecst-spacing-lg);
    position: relative;
}

/* Close Button */
.ecst-search-close {
    position: absolute;
    top: -50px;
    right: var(--ecst-spacing-lg);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--ecst-white);
    cursor: pointer;
    transition: var(--ecst-transition);
}

.ecst-search-close:hover {
    background: var(--ecst-primary-color);
    transform: rotate(90deg);
}

/* Search Form */
.ecst-search-overlay-form {
    margin-bottom: var(--ecst-spacing-lg);
}

.ecst-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--ecst-white);
    border-radius: calc(var(--ecst-border-radius) * 2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.ecst-search-input-wrap .ecst-search-icon {
    position: absolute;
    left: 20px;
    color: var(--ecst-text-muted);
    pointer-events: none;
}

.ecst-search-overlay-input {
    width: 100%;
    padding: 20px 100px 20px 60px;
    border: none;
    background: transparent;
    font-size: 18px;
    color: var(--ecst-dark-color);
    outline: none;
}

.ecst-search-overlay-input::placeholder {
    color: var(--ecst-text-muted);
}

.ecst-search-loader {
    position: absolute;
    right: 70px;
    color: var(--ecst-primary-color);
    display: flex;
    align-items: center;
}

.ecst-search-shortcut {
    position: absolute;
    right: 16px;
    padding: 6px 10px;
    background: var(--ecst-gray-100);
    border-radius: var(--ecst-border-radius);
    font-size: 11px;
    font-weight: 600;
    color: var(--ecst-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Search Results */
.ecst-search-results {
    background: var(--ecst-white);
    border-radius: calc(var(--ecst-border-radius) * 2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.ecst-search-results::-webkit-scrollbar {
    width: 6px;
}

.ecst-search-results::-webkit-scrollbar-track {
    background: var(--ecst-gray-100);
}

.ecst-search-results::-webkit-scrollbar-thumb {
    background: var(--ecst-gray-300);
    border-radius: 3px;
}

/* Initial State */
.ecst-search-initial {
    padding: var(--ecst-spacing-2xl);
    text-align: center;
    color: var(--ecst-text-muted);
}

.ecst-search-initial-icon {
    margin-bottom: var(--ecst-spacing-md);
    opacity: 0.3;
}

.ecst-search-initial p {
    margin: 0;
    font-size: 16px;
}

/* No Results */
.ecst-search-no-results {
    padding: var(--ecst-spacing-2xl);
    text-align: center;
}

.ecst-search-no-results-icon {
    margin-bottom: var(--ecst-spacing-md);
    color: var(--ecst-text-muted);
    opacity: 0.5;
}

.ecst-search-no-results h4 {
    margin: 0 0 var(--ecst-spacing-xs);
    color: var(--ecst-dark-color);
}

.ecst-search-no-results p {
    margin: 0;
    color: var(--ecst-text-muted);
    font-size: 14px;
}

/* Results Header */
.ecst-search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ecst-spacing-md) var(--ecst-spacing-lg);
    border-bottom: 1px solid var(--ecst-border-color);
    background: var(--ecst-gray-50);
}

.ecst-search-results-count {
    font-size: 13px;
    color: var(--ecst-text-muted);
}

.ecst-search-results-count strong {
    color: var(--ecst-dark-color);
}

.ecst-search-view-all {
    font-size: 13px;
    color: var(--ecst-primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ecst-search-view-all:hover {
    text-decoration: underline;
}

/* Results List */
.ecst-search-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ecst-search-result-item {
    border-bottom: 1px solid var(--ecst-border-color);
}

.ecst-search-result-item:last-child {
    border-bottom: none;
}

.ecst-search-result-link {
    display: flex;
    align-items: center;
    gap: var(--ecst-spacing-md);
    padding: var(--ecst-spacing-md) var(--ecst-spacing-lg);
    text-decoration: none;
    transition: var(--ecst-transition);
}

.ecst-search-result-link:hover,
.ecst-search-result-link.ecst-focused {
    background: var(--ecst-gray-50);
}

.ecst-search-result-link.ecst-focused {
    background: var(--ecst-primary-color);
}

.ecst-search-result-link.ecst-focused .ecst-search-result-title,
.ecst-search-result-link.ecst-focused .ecst-search-result-excerpt,
.ecst-search-result-link.ecst-focused .ecst-search-result-meta {
    color: var(--ecst-white);
}

.ecst-search-result-link.ecst-focused .ecst-search-result-category {
    background: rgba(255, 255, 255, 0.2);
    color: var(--ecst-white);
}

/* Result Thumbnail */
.ecst-search-result-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: var(--ecst-border-radius);
    overflow: hidden;
    background: var(--ecst-gray-100);
}

.ecst-search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ecst-search-result-no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ecst-text-muted);
    background: linear-gradient(135deg, var(--ecst-gray-100) 0%, var(--ecst-gray-200) 100%);
}

/* Result Content */
.ecst-search-result-content {
    flex: 1;
    min-width: 0;
}

.ecst-search-result-category {
    display: inline-block;
    padding: 2px 8px;
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
    margin-bottom: 6px;
}

.ecst-search-result-type-page {
    background: var(--ecst-secondary-color);
}

.ecst-search-result-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ecst-dark-color);
    margin-bottom: 4px;
    line-height: var(--ecst-line-height-post-title);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ecst-search-result-excerpt {
    font-size: 13px;
    color: var(--ecst-text-muted);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ecst-search-result-meta {
    font-size: 12px;
    color: var(--ecst-text-muted);
    display: flex;
    align-items: center;
    gap: var(--ecst-spacing-sm);
}

.ecst-search-result-meta svg {
    width: 12px;
    height: 12px;
}

/* Keyboard Hints */
.ecst-search-hints {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ecst-spacing-lg);
    padding: var(--ecst-spacing-md) 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.ecst-search-hints kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-family: inherit;
    font-size: 11px;
    margin-right: 4px;
}

/* Search Toggle Button */
.ecst-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--ecst-gray-100);
    border: none;
    border-radius: 50%;
    color: var(--ecst-dark-color);
    cursor: pointer;
    transition: var(--ecst-transition);
}

.ecst-search-toggle:hover {
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
}

/* Body scroll lock */
body.ecst-search-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .ecst-search-overlay {
        padding-top: 5vh;
    }
    
    .ecst-search-close {
        top: -45px;
        right: var(--ecst-spacing-md);
    }
    
    .ecst-search-overlay-input {
        padding: 16px 80px 16px 50px;
        font-size: 16px;
    }
    
    .ecst-search-input-wrap .ecst-search-icon {
        left: 16px;
        width: 20px;
        height: 20px;
    }
    
    .ecst-search-shortcut {
        display: none;
    }
    
    .ecst-search-result-link {
        padding: var(--ecst-spacing-sm) var(--ecst-spacing-md);
    }
    
    .ecst-search-result-thumb {
        width: 60px;
        height: 60px;
    }
    
    .ecst-search-result-title {
        font-size: 14px;
    }
    
    .ecst-search-result-excerpt {
        display: none;
    }
    
    .ecst-search-hints {
        display: none;
    }
}

/* ==========================================================================
   Ajax Load More
   ========================================================================== */
.ecst-load-more-wrap {
    text-align: center;
    padding: var(--ecst-spacing-xl) 0;
}

.ecst-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--ecst-spacing-sm) var(--ecst-spacing-xl);
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
    border: none;
    border-radius: var(--ecst-border-radius);
    font-size: var(--ecst-font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: var(--ecst-transition);
    min-width: 150px;
}

.ecst-load-more-btn:hover {
    background: var(--ecst-primary-hover);
}

.ecst-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ecst-load-more-btn .ecst-spin {
    animation: ecst-spin 1s linear infinite;
}

.ecst-infinite-scroll-trigger {
    height: 50px;
}

/* No More Posts */
.ecst-no-more-posts {
    text-align: center;
    padding: var(--ecst-spacing-md);
    color: var(--ecst-text-muted);
    font-size: var(--ecst-font-size-excerpt);
}

/* ==========================================================================
   Dark Mode - New Features
   ========================================================================== */
body.ecst-dark-mode .ecst-toc {
    background: var(--ecst-dark-card, #16213e);
    border-color: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-toc-item a {
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-ad-header,
body.ecst-dark-mode .ecst-ad-before-content,
body.ecst-dark-mode .ecst-ad-after-content,
body.ecst-dark-mode .ecst-ad-in-article {
    background: var(--ecst-dark-card, #16213e);
}

body.ecst-dark-mode .ecst-cookie-notice {
    background: var(--ecst-dark-card, #16213e);
}

/* Search Overlay Dark Mode */
body.ecst-dark-mode .ecst-search-input-wrap {
    background: var(--ecst-dark-surface, #1f2937);
}

body.ecst-dark-mode .ecst-search-overlay-input {
    color: #f5f5f5;
}

body.ecst-dark-mode .ecst-search-shortcut {
    background: var(--ecst-dark-border, #374151);
    color: #9ca3af;
}

body.ecst-dark-mode .ecst-search-results {
    background: var(--ecst-dark-surface, #1f2937);
}

body.ecst-dark-mode .ecst-search-results::-webkit-scrollbar-track {
    background: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-search-results::-webkit-scrollbar-thumb {
    background: #4b5563;
}

body.ecst-dark-mode .ecst-search-initial {
    color: #9ca3af;
}

body.ecst-dark-mode .ecst-search-results-header {
    background: #111827;
    border-color: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-search-results-count strong {
    color: #f5f5f5;
}

body.ecst-dark-mode .ecst-search-result-item {
    border-color: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-search-result-link:hover {
    background: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-search-result-thumb {
    background: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-search-result-no-thumb {
    background: linear-gradient(135deg, var(--ecst-dark-border, #374151) 0%, var(--ecst-dark-surface, #1f2937) 100%);
}

body.ecst-dark-mode .ecst-search-result-title {
    color: #f5f5f5;
}

body.ecst-dark-mode .ecst-search-result-excerpt,
body.ecst-dark-mode .ecst-search-result-meta {
    color: #9ca3af;
}

body.ecst-dark-mode .ecst-search-no-results h4 {
    color: #f5f5f5;
}

/* ==========================================================================
   Responsive - New Features
   ========================================================================== */
@media (max-width: 768px) {
    .ecst-cookie-bottom-left,
    .ecst-cookie-bottom-right {
        left: var(--ecst-spacing-sm);
        right: var(--ecst-spacing-sm);
        bottom: var(--ecst-spacing-sm);
        max-width: none;
    }
    
    .ecst-cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .ecst-toc-h3 {
        padding-left: var(--ecst-spacing-sm);
    }
    
    .ecst-toc-h4 {
        padding-left: var(--ecst-spacing-md);
    }
}

/* ==========================================================================
   Announcement Bar
   ========================================================================== */
.ecst-announcement-bar {
    position: relative;
    padding: var(--ecst-spacing-xs) 0;
    text-align: center;
    font-size: var(--ecst-font-size-excerpt);
    z-index: 1001;
}

.ecst-announcement-bar .ecst-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ecst-spacing-md);
}

.ecst-announcement-content {
    flex: 1;
}

.ecst-announcement-content a {
    text-decoration: underline;
}

.ecst-announcement-content a:hover {
    opacity: 0.8;
}

.ecst-announcement-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.7;
    transition: var(--ecst-transition);
    color: inherit;
}

.ecst-announcement-close:hover {
    opacity: 1;
}

/* ==========================================================================
   Post Reactions (Likes)
   ========================================================================== */
.ecst-post-reaction {
    display: inline-flex;
    margin: var(--ecst-spacing-sm) 0;
}

.ecst-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--ecst-spacing-xs) var(--ecst-spacing-md);
    background: var(--ecst-gray-100);
    border: 1px solid var(--ecst-border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--ecst-transition);
    font-size: var(--ecst-font-size-excerpt);
    color: var(--ecst-text-color);
}

.ecst-reaction-btn:hover {
    background: var(--ecst-gray-200);
    border-color: var(--ecst-primary-color);
}

.ecst-post-reaction.ecst-liked .ecst-reaction-btn {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

.ecst-reaction-icon {
    display: flex;
}

.ecst-reaction-count {
    font-weight: 600;
}

/* Animation for like */
@keyframes ecst-like-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.ecst-post-reaction.ecst-animating .ecst-reaction-icon {
    animation: ecst-like-pop 0.3s ease;
}

/* ==========================================================================
   Accessibility Controls
   ========================================================================== */
.ecst-accessibility-controls {
    position: fixed;
    right: var(--ecst-spacing-md);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
    background: var(--ecst-white);
    padding: var(--ecst-spacing-sm);
    border-radius: var(--ecst-border-radius);
    box-shadow: var(--ecst-shadow-md);
    border: 1px solid var(--ecst-border-color);
}

.ecst-font-controls {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ecst-font-controls button,
.ecst-high-contrast-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ecst-gray-100);
    border: 1px solid var(--ecst-border-color);
    border-radius: var(--ecst-border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: var(--ecst-font-size-widget-content);
    transition: var(--ecst-transition);
}

.ecst-font-controls button:hover,
.ecst-high-contrast-toggle:hover {
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
    border-color: var(--ecst-primary-color);
}

/* High Contrast Mode */
body.ecst-high-contrast {
    --ecst-text-color: #000000;
    --ecst-dark-color: #000000;
    --ecst-white: #ffffff;
    --ecst-gray-100: #f0f0f0;
    --ecst-gray-200: #d0d0d0;
    --ecst-border-color: #000000;
    background-color: #ffffff !important;
    color: #000000 !important;
}

body.ecst-high-contrast a {
    color: #0000cc !important;
    text-decoration: underline !important;
}

body.ecst-high-contrast .ecst-post,
body.ecst-high-contrast .ecst-sidebar .widget {
    border: 2px solid #000000;
}

body.ecst-high-contrast img {
    filter: contrast(1.1);
}

body.ecst-high-contrast button,
body.ecst-high-contrast .ecst-primary-menu > li > a {
    border: 1px solid #000000 !important;
}

body.ecst-dark-mode.ecst-high-contrast {
    --ecst-text-color: #ffffff;
    --ecst-dark-color: #ffffff;
    --ecst-white: #000000;
    --ecst-border-color: #ffffff;
    background-color: #000000 !important;
    color: #ffffff !important;
}

body.ecst-dark-mode.ecst-high-contrast a {
    color: #6699ff !important;
    text-decoration: underline !important;
}

body.ecst-dark-mode.ecst-high-contrast .ecst-post,
body.ecst-dark-mode.ecst-high-contrast .ecst-sidebar .widget {
    border: 2px solid #ffffff;
    background: #111111;
}

body.ecst-dark-mode.ecst-high-contrast button,
body.ecst-dark-mode.ecst-high-contrast .ecst-primary-menu > li > a {
    border: 1px solid #ffffff !important;
    color: #ffffff !important;
}

/* Font Size Classes - Scale all typography via CSS variable overrides */
body.ecst-font-small {
    --ecst-font-size-base: 14px;
    --ecst-font-size-h1: 34px;
    --ecst-font-size-h2: 28px;
    --ecst-font-size-h3: 24px;
    --ecst-font-size-h4: 20px;
    --ecst-font-size-h5: 17px;
    --ecst-font-size-h6: 14px;
    --ecst-font-size-post-title: 16px;
    --ecst-font-size-single-title: 30px;
    --ecst-font-size-excerpt: 13px;
    --ecst-font-size-meta: 11px;
    --ecst-font-size-widget-title: 16px;
    --ecst-font-size-widget-content: 12px;
}

body.ecst-font-large {
    --ecst-font-size-base: 18px;
    --ecst-font-size-h1: 46px;
    --ecst-font-size-h2: 36px;
    --ecst-font-size-h3: 32px;
    --ecst-font-size-h4: 28px;
    --ecst-font-size-h5: 23px;
    --ecst-font-size-h6: 18px;
    --ecst-font-size-post-title: 20px;
    --ecst-font-size-single-title: 42px;
    --ecst-font-size-excerpt: 17px;
    --ecst-font-size-meta: 15px;
    --ecst-font-size-widget-title: 20px;
    --ecst-font-size-widget-content: 16px;
}

body.ecst-font-xlarge {
    --ecst-font-size-base: 20px;
    --ecst-font-size-h1: 52px;
    --ecst-font-size-h2: 42px;
    --ecst-font-size-h3: 36px;
    --ecst-font-size-h4: 30px;
    --ecst-font-size-h5: 26px;
    --ecst-font-size-h6: 20px;
    --ecst-font-size-post-title: 22px;
    --ecst-font-size-single-title: 48px;
    --ecst-font-size-excerpt: 19px;
    --ecst-font-size-meta: 16px;
    --ecst-font-size-widget-title: 22px;
    --ecst-font-size-widget-content: 18px;
}

/* ==========================================================================
   Dark Mode - New Features
   ========================================================================== */
body.ecst-dark-mode .ecst-announcement-bar {
    border-bottom: 1px solid var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-reaction-btn {
    background: var(--ecst-dark-surface, #1f2937);
    border-color: var(--ecst-dark-border, #374151);
    color: var(--ecst-dark-text, #e5e5e5);
}

body.ecst-dark-mode .ecst-reaction-btn:hover {
    background: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-accessibility-controls {
    background: var(--ecst-dark-card, #16213e);
    border-color: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-font-controls button,
body.ecst-dark-mode .ecst-high-contrast-toggle {
    background: var(--ecst-dark-surface, #1f2937);
    border-color: var(--ecst-dark-border, #374151);
    color: var(--ecst-dark-text, #e5e5e5);
}

/* ==========================================================================
   Responsive - New Features
   ========================================================================== */
@media (max-width: 768px) {
    .ecst-accessibility-controls {
        right: var(--ecst-spacing-xs);
        padding: var(--ecst-spacing-xs);
    }
    
    .ecst-font-controls button,
    .ecst-high-contrast-toggle {
        width: 32px;
        height: 32px;
        font-size: var(--ecst-font-size-category-badge);
    }
}

/* ==========================================================================
   Reading Time
   ========================================================================== */
.ecst-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--ecst-text-muted);
    font-size: var(--ecst-font-size-widget-content);
}

.ecst-reading-time svg {
    opacity: 0.7;
}

/* ==========================================================================
   Enhanced Author Box
   ========================================================================== */
.ecst-author-box {
    background: var(--ecst-gray-100);
    border-radius: var(--ecst-border-radius);
    padding: var(--ecst-spacing-lg);
    margin: var(--ecst-spacing-xl) 0;
    display: flex;
    gap: var(--ecst-spacing-lg);
    align-items: flex-start;
}

.ecst-author-avatar img {
    border-radius: 50%;
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.ecst-author-info {
    flex: 1;
}

.ecst-author-name {
    margin: 0 0 0.25rem;
    font-size: var(--ecst-font-size-author-name);
}

.ecst-author-name a {
    color: var(--ecst-dark-color);
}

.ecst-author-name a:hover {
    color: var(--ecst-primary-color);
}

.ecst-author-posts-count {
    display: inline-block;
    font-size: var(--ecst-font-size-meta);
    color: var(--ecst-text-muted);
    margin-bottom: var(--ecst-spacing-sm);
}

.ecst-author-bio {
    margin: 0 0 var(--ecst-spacing-sm);
    color: var(--ecst-text-color);
    line-height: var(--ecst-line-height-excerpt);
    font-size: var(--ecst-font-size-author-bio);
}

.ecst-author-social {
    display: flex;
    gap: 0.5rem;
    margin-bottom: var(--ecst-spacing-sm);
}

.ecst-author-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--ecst-white);
    border-radius: 50%;
    color: var(--ecst-text-muted);
    transition: var(--ecst-transition);
}

.ecst-author-social a:hover {
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
}

.ecst-author-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--ecst-font-size-excerpt);
    font-weight: 500;
    color: var(--ecst-primary-color);
}

.ecst-author-view-all:hover {
    color: var(--ecst-primary-hover);
}

/* Centered Style */
.ecst-author-box-centered {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ecst-author-box-centered .ecst-author-social {
    justify-content: center;
}

/* Card Style */
.ecst-author-box-card {
    background: var(--ecst-white);
    border: 1px solid var(--ecst-border-color);
    box-shadow: var(--ecst-shadow-sm);
}

/* ==========================================================================
   Enhanced 404 Page
   ========================================================================== */
.ecst-404-content {
    text-align: center;
    padding: var(--ecst-spacing-xxl) var(--ecst-spacing-md);
    max-width: 600px;
    margin: 0 auto;
}

.ecst-404-icon {
    color: var(--ecst-primary-color);
    margin-bottom: var(--ecst-spacing-md);
    opacity: 0.8;
}

.ecst-404-title {
    font-size: var(--ecst-font-size-404);
    font-weight: 700;
    margin: 0;
    line-height: 1;
    color: var(--ecst-primary-color);
    text-shadow: 2px 2px 0 var(--ecst-gray-200);
}

.ecst-404-subtitle {
    font-size: var(--ecst-font-size-archive-title);
    margin: var(--ecst-spacing-sm) 0;
    color: var(--ecst-dark-color);
}

.ecst-404-message {
    color: var(--ecst-text-muted);
    margin-bottom: var(--ecst-spacing-lg);
    line-height: var(--ecst-line-height-excerpt);
}

.ecst-404-search {
    max-width: 400px;
    margin: 0 auto var(--ecst-spacing-lg);
}

.ecst-404-home {
    margin: var(--ecst-spacing-lg) 0;
}

.ecst-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--ecst-spacing-sm) var(--ecst-spacing-lg);
    border-radius: var(--ecst-border-radius);
    font-size: var(--ecst-font-size-button);
    font-weight: 500;
    transition: var(--ecst-transition);
    text-decoration: none;
}

.ecst-btn-primary {
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
}

.ecst-btn-primary:hover {
    background: var(--ecst-primary-hover);
    color: var(--ecst-white);
}

.ecst-404-recent {
    margin-top: var(--ecst-spacing-xxl);
    padding-top: var(--ecst-spacing-xl);
    border-top: 1px solid var(--ecst-border-color);
}

.ecst-404-recent h3 {
    margin-bottom: var(--ecst-spacing-md);
    font-size: var(--ecst-font-size-widget-title);
}

.ecst-404-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ecst-404-recent-list li {
    padding: var(--ecst-spacing-xs) 0;
    border-bottom: 1px dashed var(--ecst-border-color);
}

.ecst-404-recent-list li:last-child {
    border-bottom: none;
}

.ecst-404-recent-list a {
    color: var(--ecst-text-color);
}

.ecst-404-recent-list a:hover {
    color: var(--ecst-primary-color);
}

/* ==========================================================================
   Enhanced Back to Top
   ========================================================================== */
.ecst-back-to-top {
    position: fixed;
    bottom: var(--ecst-spacing-lg);
    right: var(--ecst-spacing-lg);
    width: 46px;
    height: 46px;
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--ecst-transition);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--ecst-shadow-md);
}

.ecst-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.ecst-back-to-top:hover {
    background: var(--ecst-primary-hover);
    transform: translateY(-3px);
}

/* Square Style */
.ecst-back-to-top-square {
    border-radius: var(--ecst-border-radius);
}

/* Progress Style */
.ecst-back-to-top-progress {
    background: var(--ecst-white);
    color: var(--ecst-primary-color);
    position: relative;
}

.ecst-back-to-top-progress:hover {
    background: var(--ecst-gray-100);
}

.ecst-progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.ecst-progress-ring-circle {
    stroke-dasharray: 125.66;
    stroke-dashoffset: 125.66;
    transition: stroke-dashoffset 0.1s linear;
}

.ecst-back-to-top-icon {
    position: relative;
    z-index: 1;
    display: flex;
}

/* ==========================================================================
   Dark Mode - New Features
   ========================================================================== */
body.ecst-dark-mode .ecst-author-box {
    background: var(--ecst-dark-card, #16213e);
}

body.ecst-dark-mode .ecst-author-box-card {
    background: #1a1a2e;
    border-color: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-author-name a {
    color: #ffffff;
}

body.ecst-dark-mode .ecst-author-social a {
    background: var(--ecst-dark-surface, #1f2937);
}

body.ecst-dark-mode .ecst-404-title {
    text-shadow: 2px 2px 0 var(--ecst-dark-surface, #1f2937);
}

body.ecst-dark-mode .ecst-404-subtitle {
    color: #ffffff;
}

body.ecst-dark-mode .ecst-back-to-top-progress {
    background: var(--ecst-dark-surface, #1f2937);
}

body.ecst-dark-mode .ecst-progress-ring-bg {
    stroke: var(--ecst-dark-border, #374151);
}

/* Post Navigation Dark Mode */
body.ecst-dark-mode .ecst-nav-previous,
body.ecst-dark-mode .ecst-nav-next {
    background: var(--ecst-dark-surface, #1f2937);
    border-color: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-nav-previous:hover,
body.ecst-dark-mode .ecst-nav-next:hover {
    background: #111827;
    border-color: var(--ecst-primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

body.ecst-dark-mode .ecst-nav-title {
    color: #f9fafb;
}

body.ecst-dark-mode .ecst-nav-previous:hover .ecst-nav-title,
body.ecst-dark-mode .ecst-nav-next:hover .ecst-nav-title {
    color: var(--ecst-primary-color);
}

body.ecst-dark-mode .ecst-nav-thumbnail {
    background: var(--ecst-dark-border, #374151);
}

body.ecst-dark-mode .ecst-nav-no-thumb {
    background: linear-gradient(135deg, var(--ecst-dark-border, #374151) 0%, var(--ecst-dark-surface, #1f2937) 100%);
    color: #6b7280;
}

body.ecst-dark-mode .ecst-nav-empty {
    background: transparent;
    border-color: var(--ecst-dark-border, #374151);
}

/* ==========================================================================
   Responsive - New Features
   ========================================================================== */
@media (max-width: 768px) {
    .ecst-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .ecst-author-social {
        justify-content: center;
    }
    
    .ecst-404-title {
        font-size: calc(var(--ecst-font-size-404) * 0.65);
    }
    
    .ecst-404-subtitle {
        font-size: var(--ecst-font-size-related-title);
    }
    
    .ecst-back-to-top {
        bottom: var(--ecst-spacing-md);
        right: var(--ecst-spacing-md);
    }
}

/* ==========================================================================
   Breaking News Ticker
   ========================================================================== */
.ecst-breaking-news {
    padding: 0;
    border-bottom: 1px solid var(--ecst-border-color);
}

.ecst-breaking-news.ecst-ticker-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    border-bottom: none;
    border-top: 1px solid var(--ecst-border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
}

body.ecst-has-bottom-ticker {
    padding-bottom: 50px;
}

body.ecst-has-bottom-ticker .ecst-back-to-top {
    bottom: 60px;
}

.ecst-ticker-wrapper {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 45px;
    background: var(--ecst-darker-color);
}

.ecst-ticker-label {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ecst-ticker-dot {
    width: 8px;
    height: 8px;
    background: var(--ecst-white);
    border-radius: 50%;
    animation: ecst-pulse 1.5s infinite;
}

@keyframes ecst-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.ecst-ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 1rem;
    color: var(--ecst-white);
}

.ecst-ticker-list {
    display: flex;
    flex-direction: row;
    animation: ecst-ticker-scroll var(--ticker-speed, 20s) linear infinite;
    white-space: nowrap;
}

.ecst-breaking-news:hover .ecst-ticker-list {
    animation-play-state: paused;
}

.ecst-ticker-item {
    padding: 0 0.5rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Remove old ::after separator - now using inline separators */
.ecst-ticker-item::after {
    display: none;
}

.ecst-ticker-item a {
    color: var(--ecst-white);
    font-size: var(--ecst-font-size-ticker);
}

.ecst-ticker-item a:hover {
    color: var(--ecst-primary-color);
}

/* ==========================================================================
   Ticker Separator Styles
   ========================================================================== */
.ecst-ticker-separator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 1rem;
    flex-shrink: 0;
}

/* Dot Separator */
.ecst-separator-dot {
    font-size: 18px;
    line-height: 1;
}

/* Line Separator */
.ecst-separator-line {
    width: 2px;
    height: 16px;
    border-radius: 1px;
}

/* Star Separator */
.ecst-separator-star {
    font-size: 14px;
    line-height: 1;
}

/* Space Separator (none) */
.ecst-separator-space {
    width: 2rem;
}

/* Logo Separator */
.ecst-separator-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ecst-separator-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ==========================================================================
   3D CUBE LOGO ANIMATION
   ========================================================================== */

/* Scene - Perspective container */
.ecst-logo-cube-scene {
    perspective: 200px;
    perspective-origin: center center;
}

/* Cube - Transform container */
.ecst-logo-cube {
    width: var(--cube-size, 24px);
    height: var(--cube-size, 24px);
    position: relative;
    transform-style: preserve-3d;
    animation: ecst-cube-rotate 8s linear infinite;
}

/* Each face of the cube */
.ecst-cube-face {
    position: absolute;
    width: var(--cube-size, 24px);
    height: var(--cube-size, 24px);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(255, 200, 0, 0.3);
    backface-visibility: visible;
}

/* Position each face */
.ecst-cube-front {
    transform: rotateY(0deg) translateZ(var(--cube-half, 12px));
}

.ecst-cube-back {
    transform: rotateY(180deg) translateZ(var(--cube-half, 12px));
}

.ecst-cube-right {
    transform: rotateY(90deg) translateZ(var(--cube-half, 12px));
}

.ecst-cube-left {
    transform: rotateY(-90deg) translateZ(var(--cube-half, 12px));
}

.ecst-cube-top {
    transform: rotateX(90deg) translateZ(var(--cube-half, 12px));
}

.ecst-cube-bottom {
    transform: rotateX(-90deg) translateZ(var(--cube-half, 12px));
}

/* Default: Full 3D Cube Rotation (X and Y) */
@keyframes ecst-cube-rotate {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

/* Cube style - Same as default */
.ecst-breaking-news[data-3d-style="cube"] .ecst-logo-cube {
    animation: ecst-cube-rotate 8s linear infinite;
}

/* TV style - Y-axis only with glow */
.ecst-breaking-news[data-3d-style="tv"] .ecst-logo-cube {
    animation: ecst-cube-tv 4s linear infinite;
}

.ecst-breaking-news[data-3d-style="tv"] .ecst-cube-face {
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

@keyframes ecst-cube-tv {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

/* Flip style - X-axis only */
.ecst-breaking-news[data-3d-style="flip"] .ecst-logo-cube {
    animation: ecst-cube-flip 3s linear infinite;
}

@keyframes ecst-cube-flip {
    0% {
        transform: rotateX(0deg);
    }
    100% {
        transform: rotateX(360deg);
    }
}

/* Wobble style - Diagonal rotation */
.ecst-breaking-news[data-3d-style="wobble"] .ecst-logo-cube {
    animation: ecst-cube-wobble 6s ease-in-out infinite;
}

@keyframes ecst-cube-wobble {
    0%, 100% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    25% {
        transform: rotateX(90deg) rotateY(45deg) rotateZ(15deg);
    }
    50% {
        transform: rotateX(180deg) rotateY(90deg) rotateZ(0deg);
    }
    75% {
        transform: rotateX(270deg) rotateY(135deg) rotateZ(-15deg);
    }
}

/* Pause animation on hover */
.ecst-breaking-news:hover .ecst-logo-cube {
    animation-play-state: paused;
}

@keyframes ecst-ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ecst-ticker-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    padding: 0 0.5rem;
}

.ecst-ticker-prev,
.ecst-ticker-next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--ecst-border-radius);
    cursor: pointer;
    transition: var(--ecst-transition);
    color: var(--ecst-white);
}

.ecst-ticker-prev:hover,
.ecst-ticker-next:hover {
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
    border-color: var(--ecst-primary-color);
}

@media (max-width: 768px) {
    .ecst-ticker-label {
        padding: 0 0.75rem;
        font-size: var(--ecst-font-size-category-badge);
    }
    
    .ecst-ticker-nav {
        display: none;
    }
    
    .ecst-social-share-floating {
        display: none;
    }
}

/* ==========================================================================
   Reading Progress Bar
   ========================================================================== */
.ecst-reading-progress {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    pointer-events: none;
}

.ecst-progress-top {
    top: 0;
}

.ecst-progress-bottom {
    bottom: 0;
}

.ecst-reading-progress-bar {
    height: 100%;
    width: 0%;
    transition: width 0.1s ease-out;
}

/* ==========================================================================
   Sticky Sidebar
   ========================================================================== */
.ecst-sticky-sidebar-enabled .ecst-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: var(--ecst-sticky-offset, 20px);
    align-self: start;
    max-height: calc(100vh - var(--ecst-sticky-offset, 20px) - 20px);
    overflow-y: auto;
}

/* Smooth scrollbar for sidebar */
.ecst-sticky-sidebar-enabled .ecst-sidebar::-webkit-scrollbar {
    width: 5px;
}

.ecst-sticky-sidebar-enabled .ecst-sidebar::-webkit-scrollbar-track {
    background: var(--ecst-gray-100);
}

.ecst-sticky-sidebar-enabled .ecst-sidebar::-webkit-scrollbar-thumb {
    background: var(--ecst-gray-300);
    border-radius: 3px;
}

.ecst-sticky-sidebar-enabled .ecst-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--ecst-gray-400);
}

@media (max-width: 991px) {
    .ecst-sticky-sidebar-enabled .ecst-sidebar {
        position: static;
        max-height: none;
    }
}

/* ==========================================================================
   Custom Widgets
   ========================================================================== */

/* Recent & Popular Posts Widget */
.ecst-recent-posts-list,
.ecst-popular-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ecst-recent-post-item,
.ecst-popular-post-item {
    display: flex;
    gap: var(--ecst-spacing-sm);
    padding: var(--ecst-spacing-sm) 0;
    border-bottom: 1px solid var(--ecst-border-color);
    align-items: flex-start;
}

.ecst-recent-post-item:last-child,
.ecst-popular-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ecst-recent-post-item:first-child,
.ecst-popular-post-item:first-child {
    padding-top: 0;
}

.ecst-recent-post-thumb,
.ecst-popular-post-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: var(--ecst-border-radius);
    overflow: hidden;
}

.ecst-recent-post-thumb img,
.ecst-popular-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ecst-no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ecst-gray-100);
    color: var(--ecst-gray-400);
}

.ecst-recent-post-content,
.ecst-popular-post-content {
    flex: 1;
    min-width: 0;
}

.ecst-recent-post-title,
.ecst-popular-post-title {
    font-size: var(--ecst-font-size-excerpt);
    font-weight: 600;
    line-height: var(--ecst-line-height-widget);
    margin: 0 0 var(--ecst-spacing-xs);
}

.ecst-recent-post-title a,
.ecst-popular-post-title a {
    color: var(--ecst-dark-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ecst-recent-post-title a:hover,
.ecst-popular-post-title a:hover {
    color: var(--ecst-primary-color);
}

.ecst-recent-post-date,
.ecst-popular-post-comments {
    font-size: var(--ecst-font-size-meta);
    color: var(--ecst-text-muted);
}

/* Popular Posts Number */
.ecst-popular-post-number {
    width: 28px;
    height: 28px;
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--ecst-font-size-meta);
    font-weight: 700;
    flex-shrink: 0;
}

/* ==========================================================================
   Widget Layouts — Grid, Large First, Overlay (shared by both widgets)
   ========================================================================== */

/* --- Layout 2: Grid --- */
.ecst-widget-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ecst-spacing-sm);
}

.ecst-wg-card {
    border: 1px solid var(--ecst-border-color);
    border-radius: var(--ecst-border-radius);
    overflow: hidden;
    transition: var(--ecst-transition);
}

.ecst-wg-card:hover {
    box-shadow: var(--ecst-shadow-md);
}

.ecst-wg-card-thumb {
    display: block;
    position: relative;
    padding-bottom: 65%;
    overflow: hidden;
}

.ecst-wg-card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ecst-wg-card:hover .ecst-wg-card-thumb img {
    transform: scale(1.05);
}

.ecst-wg-card-thumb .ecst-no-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ecst-wg-card-thumb .ecst-popular-post-number {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 24px;
    height: 24px;
    font-size: 11px;
}

.ecst-wg-card-content {
    padding: var(--ecst-spacing-sm);
}

.ecst-wg-card-content .ecst-recent-post-title,
.ecst-wg-card-content .ecst-popular-post-title {
    font-size: 13px;
    margin: 0 0 4px;
    -webkit-line-clamp: 2;
}

/* --- Layout 3: Large First --- */
.ecst-wg-featured-post {
    margin-bottom: var(--ecst-spacing-md);
    border-bottom: 1px solid var(--ecst-border-color);
    padding-bottom: var(--ecst-spacing-md);
}

.ecst-wg-featured-thumb {
    display: block;
    position: relative;
    padding-bottom: var(--ecst-image-padding-ratio);
    border-radius: var(--ecst-border-radius);
    overflow: hidden;
    margin-bottom: var(--ecst-spacing-sm);
}

.ecst-wg-featured-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ecst-wg-featured-post:hover .ecst-wg-featured-thumb img {
    transform: scale(1.03);
}

.ecst-wg-featured-thumb .ecst-no-thumb-lg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ecst-wg-featured-thumb .ecst-popular-post-number-lg {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    width: 32px;
    height: 32px;
    font-size: var(--ecst-font-size-excerpt);
}

.ecst-wg-featured-title {
    font-size: var(--ecst-font-size-post-title) !important;
    -webkit-line-clamp: 3 !important;
}

.ecst-wg-cat-badge {
    display: inline-block;
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.ecst-wg-compact-item {
    display: flex;
    gap: var(--ecst-spacing-sm);
    padding: var(--ecst-spacing-sm) 0;
    border-bottom: 1px solid var(--ecst-border-color);
    align-items: flex-start;
}

.ecst-wg-compact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* --- Layout 4: Overlay --- */
.ecst-widget-layout-overlay {
    display: flex;
    flex-direction: column;
    gap: var(--ecst-spacing-sm);
}

.ecst-wg-overlay-item {
    display: block;
    position: relative;
    border-radius: var(--ecst-border-radius);
    overflow: hidden;
    min-height: 120px;
    text-decoration: none;
}

.ecst-wg-overlay-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ecst-wg-overlay-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ecst-wg-overlay-item:hover .ecst-wg-overlay-img img {
    transform: scale(1.05);
}

.ecst-wg-overlay-img .ecst-no-thumb-overlay {
    width: 100%;
    height: 100%;
    background: var(--ecst-gray-800);
}

.ecst-wg-overlay-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 120px;
    padding: var(--ecst-spacing-sm) var(--ecst-spacing-md);
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}

.ecst-wg-overlay-content .ecst-recent-post-title,
.ecst-wg-overlay-content .ecst-popular-post-title {
    color: var(--ecst-white);
    font-size: var(--ecst-font-size-excerpt);
    margin: 0 0 2px;
}

.ecst-wg-overlay-content .ecst-recent-post-title a,
.ecst-wg-overlay-content .ecst-popular-post-title a {
    color: var(--ecst-white);
}

/* Overlay: popular posts get number + text side by side */
.ecst-wg-overlay-content > .ecst-popular-post-number {
    position: absolute;
    top: var(--ecst-spacing-sm);
    left: var(--ecst-spacing-md);
    width: 24px;
    height: 24px;
    font-size: 11px;
}

.ecst-wg-overlay-content .ecst-recent-post-date,
.ecst-wg-overlay-content .ecst-popular-post-comments {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.ecst-wg-overlay-content .ecst-wg-cat-badge {
    align-self: flex-start;
    margin-bottom: 4px;
}

/* --- Dark Mode: Widget Layouts --- */
body.ecst-dark-mode .ecst-wg-card {
    border-color: rgba(255, 255, 255, 0.1);
    background: var(--ecst-dark-card);
}

body.ecst-dark-mode .ecst-wg-featured-post {
    border-color: rgba(255, 255, 255, 0.1);
}

body.ecst-dark-mode .ecst-wg-compact-item {
    border-color: rgba(255, 255, 255, 0.1);
}

body.ecst-dark-mode .ecst-wg-overlay-img .ecst-no-thumb-overlay {
    background: var(--ecst-dark-card);
}

/* Social Icons Widget */
.ecst-social-icons-widget {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ecst-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--social-color, var(--ecst-gray-200));
    color: var(--ecst-white);
    transition: var(--ecst-transition);
}

.ecst-social-icon svg {
    width: 18px;
    height: 18px;
}

.ecst-social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ecst-social-style-rounded .ecst-social-icon {
    border-radius: var(--ecst-border-radius);
}

.ecst-social-style-circle .ecst-social-icon {
    border-radius: 50%;
}

.ecst-social-style-square .ecst-social-icon {
    border-radius: 0;
}

/* Author Info Widget */
.ecst-author-info-box {
    text-align: center;
    padding: var(--ecst-spacing-md);
}

.ecst-author-avatar {
    margin-bottom: var(--ecst-spacing-md);
}

.ecst-author-avatar img {
    border-radius: 50%;
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.ecst-author-name {
    font-size: var(--ecst-font-size-author-name);
    margin-bottom: var(--ecst-spacing-sm);
}

.ecst-author-bio {
    font-size: var(--ecst-font-size-author-bio);
    color: var(--ecst-text-muted);
    margin-bottom: var(--ecst-spacing-md);
    line-height: var(--ecst-line-height-excerpt);
}

.ecst-author-posts-count {
    font-size: var(--ecst-font-size-meta);
    color: var(--ecst-text-muted);
    margin-bottom: var(--ecst-spacing-md);
}

.ecst-author-link {
    display: inline-block;
    padding: var(--ecst-spacing-xs) var(--ecst-spacing-md);
    background: var(--ecst-primary-color);
    color: var(--ecst-white);
    border-radius: var(--ecst-border-radius);
    font-size: var(--ecst-font-size-button);
    font-weight: 500;
}

.ecst-author-link:hover {
    background: var(--ecst-primary-hover);
    color: var(--ecst-white);
}

/* ==========================================================================
   404 Page
   ========================================================================== */
.ecst-404-content {
    text-align: center;
    padding: var(--ecst-spacing-2xl) 0;
}

.ecst-404-title {
    font-size: var(--ecst-font-size-404);
    font-weight: 700;
    color: var(--ecst-primary-color);
    line-height: 1;
    margin-bottom: var(--ecst-spacing-md);
}

.ecst-404-subtitle {
    font-size: var(--ecst-font-size-related-title);
    margin-bottom: var(--ecst-spacing-lg);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.ecst-breadcrumbs {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--ecst-spacing-sm);
    padding: var(--ecst-spacing-md) 0;
    font-size: var(--ecst-font-size-breadcrumb);
    color: var(--ecst-text-muted);
}

.ecst-breadcrumbs a {
    color: var(--ecst-text-muted);
}

.ecst-breadcrumbs a:hover {
    color: var(--ecst-primary-color);
}

.ecst-breadcrumbs .separator {
    color: var(--ecst-gray-400);
}

/* ==========================================================================
   Responsive - Tablet
   ========================================================================== */
@media (max-width: 1024px) {
    .ecst-content-sidebar {
        grid-template-columns: 1fr;
    }
    
    /* Reset sidebar-left on tablet/mobile */
    .ecst-sidebar-left .ecst-content-sidebar {
        grid-template-columns: 1fr;
    }
    
    .ecst-sidebar-left .ecst-posts-area {
        order: 1;
    }
    
    .ecst-sidebar-left .ecst-sidebar {
        order: 2;
        padding-right: 0;
        border-right: none;
    }
    
    .ecst-sidebar {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--ecst-border-color);
        padding-top: var(--ecst-spacing-xl);
        margin-top: var(--ecst-spacing-xl);
        width: 100%;
    }
    
    /* Disable sticky sidebar on tablet/mobile */
    .ecst-sticky-sidebar-enabled .ecst-sidebar {
        position: static !important;
        top: auto !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    .ecst-footer-widgets .ecst-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ecst-footer-2 .ecst-footer-widgets .ecst-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .ecst-footer-2 .ecst-footer-about {
        grid-column: span 2;
        padding-right: 0;
        margin-bottom: var(--ecst-spacing-lg);
    }
}

/* ==========================================================================
   Responsive - Mobile
   ========================================================================== */
@media (max-width: 768px) {
    h1 { font-size: calc(var(--ecst-font-size-h1) * 0.8); }
    h2 { font-size: var(--ecst-font-size-archive-title); }
    h3 { font-size: var(--ecst-font-size-related-title); }
    
    .ecst-topbar .ecst-container {
        flex-direction: column;
        height: auto;
        padding: var(--ecst-spacing-sm) var(--ecst-spacing-md);
        gap: var(--ecst-spacing-sm);
    }
    
    .ecst-topbar-left,
    .ecst-topbar-right {
        width: 100%;
        justify-content: center;
    }
    
    .ecst-header-main .ecst-container {
        flex-direction: column;
        gap: var(--ecst-spacing-md);
    }
    
    .ecst-header-search {
        width: 100%;
        max-width: none;
    }
    
    .ecst-menu-toggle {
        display: block;
    }
    
    .ecst-main-nav .ecst-container {
        flex-wrap: wrap;
    }
    
    /* Hide old primary menu - use mobile drawer instead */
    .ecst-primary-menu {
        display: none !important;
    }
    
    /* Ensure content-sidebar is single column on mobile */
    .ecst-content-sidebar,
    .ecst-sidebar-left .ecst-content-sidebar {
        display: block !important;
        grid-template-columns: none !important;
    }
    
    .ecst-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        position: static !important;
        margin-top: var(--ecst-spacing-xl);
        padding-top: var(--ecst-spacing-xl);
        padding-left: 0 !important;
        padding-right: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-top: 1px solid var(--ecst-border-color);
    }
    
    .ecst-posts-area {
        width: 100%;
    }
    
    .ecst-footer-widgets .ecst-container {
        grid-template-columns: 1fr;
    }
    
    .ecst-footer-bottom .ecst-container {
        flex-direction: column;
        text-align: center;
        gap: var(--ecst-spacing-md);
    }
    
    .ecst-footer-menu {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .ecst-footer-social {
        justify-content: center;
    }
    
    .ecst-footer-2 .ecst-footer-about {
        grid-column: auto;
    }
    
    .ecst-footer-3 .ecst-footer-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .ecst-footer-4 .ecst-newsletter-form {
        flex-direction: column;
    }
    
    .ecst-footer-4 .ecst-newsletter-form input[type="email"] {
        border-radius: var(--ecst-border-radius);
        margin-bottom: var(--ecst-spacing-sm);
    }
    
    .ecst-footer-4 .ecst-newsletter-form button {
        border-radius: var(--ecst-border-radius);
    }
    
    .ecst-post-navigation {
        flex-direction: column;
    }
    
    .ecst-nav-next {
        text-align: left;
    }
    
    .ecst-author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .ecst-comment-body {
        flex-direction: column;
    }
    
    .ecst-404-title {
        font-size: calc(var(--ecst-font-size-404) * 0.5);
    }
    
    .ecst-back-to-top {
        bottom: 20px;
    }
    
    .ecst-back-to-top.ecst-back-to-top-right {
        right: 20px;
    }
    
    .ecst-back-to-top.ecst-back-to-top-left {
        left: 20px;
    }
}

/* ==========================================================================
   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;
}

.screen-reader-text:focus {
    background-color: var(--ecst-gray-100);
    clip: auto !important;
    clip-path: none;
    color: var(--ecst-dark-color);
    display: block;
    font-size: var(--ecst-font-size-widget-content);
    font-weight: 600;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--ecst-primary-color);
    color: var(--ecst-white);
    padding: 10px 20px;
    z-index: 100000;
    transition: var(--ecst-transition-fast);
}

.skip-link:focus {
    top: 10px;
    color: var(--ecst-white);
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--ecst-primary-color);
    outline-offset: 2px;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .ecst-site-header,
    .ecst-sidebar,
    .ecst-site-footer,
    .ecst-back-to-top,
    .ecst-post-navigation,
    .ecst-comments-area {
        display: none !important;
    }
    
    .ecst-content-sidebar {
        display: block;
    }
    
    .ecst-content-area {
        width: 100%;
    }
    
    a {
        color: var(--ecst-dark-color);
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* ==========================================================================
   TV BREAKING NEWS WIDGET
   ========================================================================== */
.ecst-tv-breaking-news {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-family: var(--ecst-font-family);
    background: var(--tv-bn-content-bg, #1a237e);
}

/* Header Bar — 3D Glossy with Flash */
.ecst-tv-bn-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 4px;
    /* Fallback for browsers without color-mix */
    background: linear-gradient(100deg, #e8453a 0%, #e53935 25%, #6b1a30 55%, #2a1028 80%, #0d1117 100%);
    /* 3D gradient: crimson left → deep red center → dark navy right */
    background:
        linear-gradient(
            100deg,
            color-mix(in srgb, var(--tv-bn-header-bg, #e53935) 90%, #ff6f61) 0%,
            var(--tv-bn-header-bg, #e53935) 25%,
            color-mix(in srgb, var(--tv-bn-header-bg, #e53935) 85%, #1a1a2e) 55%,
            color-mix(in srgb, var(--tv-bn-header-bg, #e53935) 40%, #0a0a1a) 80%,
            #0d1117 100%
        );
    color: var(--tv-bn-header-text, #ffffff);
    /* 3D depth: top highlight + bottom shadow */
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 0 rgba(0, 0, 0, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* Top glossy sheen — curved highlight */
.ecst-tv-bn-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.04) 50%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Sweeping flash/light reflection */
.ecst-tv-bn-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 255, 255, 0.05) 35%,
        rgba(255, 255, 255, 0.15) 48%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.15) 52%,
        rgba(255, 255, 255, 0.05) 65%,
        transparent 80%
    );
    pointer-events: none;
    z-index: 2;
    animation: ecst-tv-bn-header-flash 4s ease-in-out infinite;
}

@keyframes ecst-tv-bn-header-flash {
    0% { left: -120%; }
    40% { left: 160%; }
    100% { left: 160%; }
}

.ecst-tv-bn-live-dot {
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-radius: 50%;
    flex-shrink: 0;
    animation: ecst-tv-bn-pulse 1s ease-in-out infinite;
    position: relative;
    z-index: 3;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

@keyframes ecst-tv-bn-pulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 6px rgba(255, 255, 255, 0.6); }
    50% { opacity: 0.5; transform: scale(0.8); box-shadow: 0 0 2px rgba(255, 255, 255, 0.3); }
}

.ecst-tv-bn-title {
    font-family: var(--tv-bn-header-font, inherit);
    font-size: var(--tv-bn-header-font-size, clamp(12px, 2.5vw, 18px));
    font-weight: var(--tv-bn-header-font-weight, 800);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Content Area */
.ecst-tv-bn-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 45px; /* Space for ticker */
    display: flex;
    flex-direction: row;
}

/* Image Right (default) - 35% width */
.ecst-tv-bn-content.ecst-tv-bn-image-right {
    flex-direction: row;
}

/* Image Left - 35% width */
.ecst-tv-bn-content.ecst-tv-bn-image-left {
    flex-direction: row-reverse;
}

/* Image Wrapper - 35% */
.ecst-tv-bn-image-wrap {
    width: 35%;
    height: 100%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.ecst-tv-bn-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.5s ease;
    animation: ecst-tv-bn-image-zoom 20s ease-in-out infinite alternate;
}

@keyframes ecst-tv-bn-image-zoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

.ecst-tv-bn-image-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.3) 0%, transparent 50%);
    pointer-events: none;
}

.ecst-tv-bn-image-left .ecst-tv-bn-image-wrap::after {
    background: linear-gradient(-90deg, rgba(0,0,0,0.3) 0%, transparent 50%);
}

/* Text Wrapper - 65% */
.ecst-tv-bn-text-wrap {
    width: 65%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 45px 20px 20px;
    /* Fallback */
    background: linear-gradient(135deg, #1e2a8a 0%, #1a237e 30%, #0f1445 70%, #0a0e2e 100%);
    /* 3D gradient using content-bg color */
    background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--tv-bn-content-bg, #1a237e) 90%, #4a5aff) 0%,
            var(--tv-bn-content-bg, #1a237e) 30%,
            color-mix(in srgb, var(--tv-bn-content-bg, #1a237e) 70%, #0a0a1a) 70%,
            color-mix(in srgb, var(--tv-bn-content-bg, #1a237e) 40%, #000000) 100%
        );
    position: relative;
    perspective: 800px;
    overflow: hidden;
    /* 3D depth inner edges */
    box-shadow:
        inset 1px 0 0 0 rgba(255, 255, 255, 0.06),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.04),
        inset 0 -1px 0 0 rgba(0, 0, 0, 0.3);
}

/* Subtle glossy sheen on text-wrap */
.ecst-tv-bn-text-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.02) 40%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* 3D Headline Cube Container */
.ecst-tv-bn-headline-cube {
    width: 100%;
    position: relative;
    z-index: 2;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

/* News Headline */
.ecst-tv-bn-headline {
    font-family: var(--tv-bn-headline-font, inherit);
    font-size: var(--tv-bn-headline-size, clamp(14px, 3vw, 28px));
    font-weight: var(--tv-bn-headline-weight, 700);
    line-height: var(--tv-bn-headline-line-height, 1.3);
    color: var(--tv-bn-content-text, #ffffff);
    text-decoration: none;
    display: block;
    text-align: center;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    backface-visibility: visible;
    padding: 0 10px;
}

.ecst-tv-bn-headline:hover {
    color: var(--tv-bn-header-bg, #e53935);
}

/* 3D Cube Flash Animation - X axis (flip-x) */
.ecst-tv-bn-headline.ecst-tv-bn-anim-flip-x {
    animation: ecst-tv-bn-flip-x 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes ecst-tv-bn-flip-x {
    0% {
        transform: perspective(800px) rotateX(0deg) scale(1);
        text-shadow: 0 0 0 transparent;
    }
    25% {
        transform: perspective(800px) rotateX(90deg) scale(1.05);
        text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }
    50% {
        transform: perspective(800px) rotateX(180deg) scale(1);
        text-shadow: 0 0 20px rgba(255,255,255,0.3);
    }
    75% {
        transform: perspective(800px) rotateX(270deg) scale(1.05);
        text-shadow: 0 -10px 30px rgba(0,0,0,0.5);
    }
    100% {
        transform: perspective(800px) rotateX(360deg) scale(1);
        text-shadow: 0 0 0 transparent;
    }
}

/* Y-axis rotation (flip-y) */
.ecst-tv-bn-headline.ecst-tv-bn-anim-flip-y {
    animation: ecst-tv-bn-flip-y 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes ecst-tv-bn-flip-y {
    0% {
        transform: perspective(800px) rotateY(0deg) scale(1);
    }
    25% {
        transform: perspective(800px) rotateY(90deg) scale(1.05);
    }
    50% {
        transform: perspective(800px) rotateY(180deg) scale(1);
    }
    75% {
        transform: perspective(800px) rotateY(270deg) scale(1.05);
    }
    100% {
        transform: perspective(800px) rotateY(360deg) scale(1);
    }
}

/* XY-axis rotation (flip-xy) */
.ecst-tv-bn-headline.ecst-tv-bn-anim-flip-xy {
    animation: ecst-tv-bn-flip-xy 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes ecst-tv-bn-flip-xy {
    0% {
        transform: perspective(800px) rotateX(0deg) rotateY(0deg) scale(1);
    }
    25% {
        transform: perspective(800px) rotateX(90deg) rotateY(90deg) scale(1.05);
    }
    50% {
        transform: perspective(800px) rotateX(180deg) rotateY(180deg) scale(1);
    }
    75% {
        transform: perspective(800px) rotateX(270deg) rotateY(270deg) scale(1.05);
    }
    100% {
        transform: perspective(800px) rotateX(360deg) rotateY(360deg) scale(1);
    }
}

/* Glow pulse effect */
.ecst-tv-bn-headline.ecst-tv-bn-anim-glow {
    animation: ecst-tv-bn-glow 0.8s ease-in-out;
}

@keyframes ecst-tv-bn-glow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(255,255,255,0.3);
    }
    50% {
        text-shadow: 0 0 30px rgba(255,255,255,0.8), 0 0 60px rgba(255,255,255,0.4), 0 0 90px rgba(255,255,255,0.2);
    }
}

/* Scale Bounce */
.ecst-tv-bn-headline.ecst-tv-bn-anim-scale {
    animation: ecst-tv-bn-scale 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes ecst-tv-bn-scale {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.15);
    }
    50% {
        transform: scale(0.95);
    }
    75% {
        transform: scale(1.08);
    }
}

/* Shake */
.ecst-tv-bn-headline.ecst-tv-bn-anim-shake {
    animation: ecst-tv-bn-shake 0.6s ease-in-out;
}

@keyframes ecst-tv-bn-shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px);
    }
}

/* Swing */
.ecst-tv-bn-headline.ecst-tv-bn-anim-swing {
    animation: ecst-tv-bn-swing 0.8s ease-in-out;
    transform-origin: top center;
}

@keyframes ecst-tv-bn-swing {
    0%, 100% {
        transform: rotate(0deg);
    }
    20% {
        transform: rotate(15deg);
    }
    40% {
        transform: rotate(-10deg);
    }
    60% {
        transform: rotate(5deg);
    }
    80% {
        transform: rotate(-5deg);
    }
}

/* Rubber Band */
.ecst-tv-bn-headline.ecst-tv-bn-anim-rubber {
    animation: ecst-tv-bn-rubber 0.8s ease-in-out;
}

@keyframes ecst-tv-bn-rubber {
    0%, 100% {
        transform: scaleX(1) scaleY(1);
    }
    30% {
        transform: scaleX(1.25) scaleY(0.75);
    }
    40% {
        transform: scaleX(0.75) scaleY(1.25);
    }
    50% {
        transform: scaleX(1.15) scaleY(0.85);
    }
    65% {
        transform: scaleX(0.95) scaleY(1.05);
    }
    75% {
        transform: scaleX(1.05) scaleY(0.95);
    }
}

/* Flash Opacity */
.ecst-tv-bn-headline.ecst-tv-bn-anim-flash {
    animation: ecst-tv-bn-flash 0.6s ease-in-out;
}

@keyframes ecst-tv-bn-flash {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0;
    }
}

/* Heartbeat */
.ecst-tv-bn-headline.ecst-tv-bn-anim-heartbeat {
    animation: ecst-tv-bn-heartbeat 1s ease-in-out;
}

@keyframes ecst-tv-bn-heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.15);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.15);
    }
    70% {
        transform: scale(1);
    }
}

/* Legacy classes for backwards compatibility */
.ecst-tv-bn-headline.ecst-tv-bn-3d-flash {
    animation: ecst-tv-bn-flip-x 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ecst-tv-bn-headline.ecst-tv-bn-3d-flash-y {
    animation: ecst-tv-bn-flip-y 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ecst-tv-bn-headline.ecst-tv-bn-glow {
    animation: ecst-tv-bn-glow 0.8s ease-in-out;
}

/* News Counter */
.ecst-tv-bn-counter {
    position: absolute;
    bottom: 10px;
    right: 15px;
    z-index: 2;
    font-size: clamp(10px, 1.5vw, 14px);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.ecst-tv-bn-counter:hover {
    background: rgba(0, 0, 0, 0.6);
}

.ecst-tv-bn-image-left .ecst-tv-bn-counter {
    right: auto;
    left: 15px;
}

/* 3D Logo */
.ecst-tv-bn-logo {
    position: absolute;
    z-index: 20;
    perspective: 300px;
}

.ecst-tv-bn-logo-left-top {
    left: var(--tv-bn-logo-margin-left, 10px);
    top: var(--tv-bn-logo-margin-top, 50px);
}

.ecst-tv-bn-logo-left-bottom {
    left: var(--tv-bn-logo-margin-left, 10px);
    bottom: var(--tv-bn-logo-margin-bottom, 55px);
}

.ecst-tv-bn-logo-right-top {
    right: var(--tv-bn-logo-margin-right, 10px);
    top: var(--tv-bn-logo-margin-top, 50px);
}

.ecst-tv-bn-logo-right-bottom {
    right: var(--tv-bn-logo-margin-right, 10px);
    bottom: var(--tv-bn-logo-margin-bottom, 55px);
}

.ecst-tv-bn-logo-cube {
    width: var(--tv-bn-logo-size, 60px);
    height: var(--tv-bn-logo-size, 60px);
    position: relative;
    transform-style: preserve-3d;
}

/* Logo Animation: Rotate XY (Both Axes) - Default */
.ecst-tv-bn-logo-cube.ecst-tv-bn-logo-anim-rotate-xy {
    animation: ecst-tv-bn-logo-rotate-xy var(--tv-bn-logo-animation-speed, 8s) linear infinite;
}

@keyframes ecst-tv-bn-logo-rotate-xy {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* Logo Animation: Rotate X (Vertical) */
.ecst-tv-bn-logo-cube.ecst-tv-bn-logo-anim-rotate-x {
    animation: ecst-tv-bn-logo-rotate-x var(--tv-bn-logo-animation-speed, 8s) linear infinite;
}

@keyframes ecst-tv-bn-logo-rotate-x {
    0% { transform: rotateX(0deg); }
    100% { transform: rotateX(360deg); }
}

/* Logo Animation: Rotate Y (Horizontal) */
.ecst-tv-bn-logo-cube.ecst-tv-bn-logo-anim-rotate-y {
    animation: ecst-tv-bn-logo-rotate-y var(--tv-bn-logo-animation-speed, 8s) linear infinite;
}

@keyframes ecst-tv-bn-logo-rotate-y {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* Logo Animation: Rotate Z (Spin) */
.ecst-tv-bn-logo-cube.ecst-tv-bn-logo-anim-rotate-z {
    animation: ecst-tv-bn-logo-rotate-z var(--tv-bn-logo-animation-speed, 8s) linear infinite;
}

@keyframes ecst-tv-bn-logo-rotate-z {
    0% { transform: rotateZ(0deg); }
    100% { transform: rotateZ(360deg); }
}

/* Logo Animation: Bounce */
.ecst-tv-bn-logo-cube.ecst-tv-bn-logo-anim-bounce {
    animation: ecst-tv-bn-logo-bounce calc(var(--tv-bn-logo-animation-speed, 8s) / 4) ease-in-out infinite;
}

@keyframes ecst-tv-bn-logo-bounce {
    0%, 100% { transform: translateY(0) rotateY(0deg); }
    25% { transform: translateY(-15px) rotateY(90deg); }
    50% { transform: translateY(0) rotateY(180deg); }
    75% { transform: translateY(-10px) rotateY(270deg); }
}

/* Logo Animation: Pulse */
.ecst-tv-bn-logo-cube.ecst-tv-bn-logo-anim-pulse {
    animation: ecst-tv-bn-logo-pulse calc(var(--tv-bn-logo-animation-speed, 8s) / 4) ease-in-out infinite;
}

@keyframes ecst-tv-bn-logo-pulse {
    0%, 100% { transform: scale(1) rotateY(0deg); }
    50% { transform: scale(1.15) rotateY(180deg); }
}

/* Logo Animation: Swing */
.ecst-tv-bn-logo-cube.ecst-tv-bn-logo-anim-swing {
    animation: ecst-tv-bn-logo-swing calc(var(--tv-bn-logo-animation-speed, 8s) / 2) ease-in-out infinite;
    transform-origin: top center;
}

@keyframes ecst-tv-bn-logo-swing {
    0%, 100% { transform: rotate3d(0, 0, 1, 0deg); }
    20% { transform: rotate3d(0, 0, 1, 15deg) rotateY(45deg); }
    40% { transform: rotate3d(0, 0, 1, -10deg) rotateY(90deg); }
    60% { transform: rotate3d(0, 0, 1, 5deg) rotateY(135deg); }
    80% { transform: rotate3d(0, 0, 1, -5deg) rotateY(180deg); }
}

/* Logo Animation: Flip */
.ecst-tv-bn-logo-cube.ecst-tv-bn-logo-anim-flip {
    animation: ecst-tv-bn-logo-flip calc(var(--tv-bn-logo-animation-speed, 8s) / 2) ease-in-out infinite;
}

@keyframes ecst-tv-bn-logo-flip {
    0% { transform: perspective(400px) rotateY(0); }
    40% { transform: perspective(400px) rotateY(170deg); }
    50% { transform: perspective(400px) rotateY(190deg) scale(1.1); }
    80% { transform: perspective(400px) rotateY(360deg) scale(0.95); }
    100% { transform: perspective(400px) rotateY(360deg); }
}

/* Logo Animation: Wobble */
.ecst-tv-bn-logo-cube.ecst-tv-bn-logo-anim-wobble {
    animation: ecst-tv-bn-logo-wobble calc(var(--tv-bn-logo-animation-speed, 8s) / 4) ease-in-out infinite;
}

@keyframes ecst-tv-bn-logo-wobble {
    0%, 100% { transform: translateX(0) rotateY(0deg); }
    15% { transform: translateX(-10px) rotateY(-5deg) rotateX(5deg); }
    30% { transform: translateX(8px) rotateY(5deg) rotateX(-5deg); }
    45% { transform: translateX(-6px) rotateY(-3deg) rotateX(3deg); }
    60% { transform: translateX(4px) rotateY(2deg) rotateX(-2deg); }
    75% { transform: translateX(-2px) rotateY(-1deg) rotateX(1deg); }
}

/* Logo Animation: None (Static) */
.ecst-tv-bn-logo-cube.ecst-tv-bn-logo-anim-none {
    animation: none;
}

.ecst-tv-bn-cube-face {
    position: absolute;
    width: var(--tv-bn-logo-size, 60px);
    height: var(--tv-bn-logo-size, 60px);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(255, 200, 0, 0.4);
    backface-visibility: visible;
}

.ecst-tv-bn-cube-front {
    transform: rotateY(0deg) translateZ(calc(var(--tv-bn-logo-size, 60px) / 2));
}

.ecst-tv-bn-cube-back {
    transform: rotateY(180deg) translateZ(calc(var(--tv-bn-logo-size, 60px) / 2));
}

.ecst-tv-bn-cube-right {
    transform: rotateY(90deg) translateZ(calc(var(--tv-bn-logo-size, 60px) / 2));
}

.ecst-tv-bn-cube-left {
    transform: rotateY(-90deg) translateZ(calc(var(--tv-bn-logo-size, 60px) / 2));
}

.ecst-tv-bn-cube-top {
    transform: rotateX(90deg) translateZ(calc(var(--tv-bn-logo-size, 60px) / 2));
}

.ecst-tv-bn-cube-bottom {
    transform: rotateX(-90deg) translateZ(calc(var(--tv-bn-logo-size, 60px) / 2));
}

/* ==========================================================================
   BOTTOM NEWS TICKER
   ========================================================================== */
.ecst-tv-bn-ticker {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45px;
    display: flex;
    align-items: stretch;
    background: var(--tv-bn-ticker-bg, #000000);
    z-index: 15;
}

.ecst-tv-bn-ticker-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: var(--tv-bn-header-bg, #e53935);
    color: var(--tv-bn-header-text, #ffffff);
    font-size: clamp(10px, 1.5vw, 12px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ecst-tv-bn-ticker-label-dot {
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
    animation: ecst-tv-bn-pulse 1s ease-in-out infinite;
}

.ecst-tv-bn-ticker-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #111 0%, #222 50%, #111 100%);
}

.ecst-tv-bn-ticker-track {
    display: flex;
    animation: ecst-tv-bn-ticker-scroll var(--tv-bn-ticker-speed, 30s) linear infinite;
    white-space: nowrap;
}

.ecst-tv-bn-ticker:hover .ecst-tv-bn-ticker-track {
    animation-play-state: paused;
}

.ecst-tv-bn-ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    color: #ffffff;
    font-size: clamp(11px, 1.5vw, 14px);
    font-weight: 500;
}

.ecst-tv-bn-ticker-item a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ecst-tv-bn-ticker-item a:hover {
    color: var(--tv-bn-header-bg, #e53935);
}

.ecst-tv-bn-ticker-separator {
    color: var(--tv-bn-header-bg, #e53935);
    font-size: 14px;
    margin: 0 5px;
    flex-shrink: 0;
}

@keyframes ecst-tv-bn-ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Progress bar on top of ticker */
.ecst-tv-bn-progress-bar {
    position: absolute;
    bottom: 45px;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.3);
    z-index: 16;
}

.ecst-tv-bn-progress {
    height: 100%;
    width: 0;
    background: var(--tv-bn-header-bg, #e53935);
    transition: width 0.1s linear;
}

/* Slide Transition */
.ecst-tv-bn-slide-out {
    animation: ecst-tv-bn-slide-out 0.5s ease-in-out forwards;
}

.ecst-tv-bn-slide-in {
    animation: ecst-tv-bn-slide-in 0.5s ease-in-out forwards;
}

@keyframes ecst-tv-bn-slide-out {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-100%); opacity: 0; }
}

@keyframes ecst-tv-bn-slide-in {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

/* RTL Support */
.ecst-tv-bn-rtl .ecst-tv-bn-header {
    flex-direction: row-reverse;
    background:
        linear-gradient(
            260deg,
            color-mix(in srgb, var(--tv-bn-header-bg, #e53935) 90%, #ff6f61) 0%,
            var(--tv-bn-header-bg, #e53935) 25%,
            color-mix(in srgb, var(--tv-bn-header-bg, #e53935) 85%, #1a1a2e) 55%,
            color-mix(in srgb, var(--tv-bn-header-bg, #e53935) 40%, #0a0a1a) 80%,
            #0d1117 100%
        );
}

.ecst-tv-bn-rtl .ecst-tv-bn-header::after {
    animation-name: ecst-tv-bn-header-flash-rtl;
}

@keyframes ecst-tv-bn-header-flash-rtl {
    0% { left: 160%; }
    40% { left: -120%; }
    100% { left: -120%; }
}

.ecst-tv-bn-rtl .ecst-tv-bn-text-wrap {
    text-align: right;
}

.ecst-tv-bn-rtl .ecst-tv-bn-headline {
    text-align: right;
}

.ecst-tv-bn-rtl .ecst-tv-bn-counter {
    right: auto;
    left: 15px;
}

.ecst-tv-bn-rtl.ecst-tv-bn-image-right .ecst-tv-bn-counter {
    left: auto;
    right: 15px;
}

.ecst-tv-bn-rtl .ecst-tv-bn-logo-left-top {
    left: auto;
    right: var(--tv-bn-logo-margin-right, 10px);
}

.ecst-tv-bn-rtl .ecst-tv-bn-logo-left-bottom {
    left: auto;
    right: var(--tv-bn-logo-margin-right, 10px);
}

.ecst-tv-bn-rtl .ecst-tv-bn-logo-right-top {
    right: auto;
    left: var(--tv-bn-logo-margin-left, 10px);
}

.ecst-tv-bn-rtl .ecst-tv-bn-logo-right-bottom {
    right: auto;
    left: var(--tv-bn-logo-margin-left, 10px);
}

/* RTL Ticker */
.ecst-tv-bn-rtl .ecst-tv-bn-ticker {
    flex-direction: row-reverse;
}

.ecst-tv-bn-rtl .ecst-tv-bn-ticker-label {
    flex-direction: row-reverse;
}

.ecst-tv-bn-rtl .ecst-tv-bn-ticker-label-dot {
    margin-right: 0;
    margin-left: 6px;
}

.ecst-tv-bn-rtl .ecst-tv-bn-ticker-track {
    animation-name: ecst-tv-bn-ticker-scroll-rtl;
}

@keyframes ecst-tv-bn-ticker-scroll-rtl {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

@keyframes ecst-tv-bn-slide-out-rtl {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

@keyframes ecst-tv-bn-slide-in-rtl {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.ecst-tv-bn-rtl .ecst-tv-bn-slide-out {
    animation-name: ecst-tv-bn-slide-out-rtl;
}

.ecst-tv-bn-rtl .ecst-tv-bn-slide-in {
    animation-name: ecst-tv-bn-slide-in-rtl;
}

/* Responsive - KEEP SAME LAYOUT AS DESKTOP (like TV) */
@media (max-width: 768px) {
    .ecst-tv-breaking-news {
        /* Keep 16:9 ratio on mobile too */
        aspect-ratio: 16 / 9;
        min-height: 180px;
    }
    
    /* NO LAYOUT CHANGES - keep same as desktop */
    .ecst-tv-bn-content {
        flex-direction: row !important;
    }
    
    .ecst-tv-bn-content.ecst-tv-bn-image-left {
        flex-direction: row-reverse !important;
    }
    
    /* Keep 35% / 65% split */
    .ecst-tv-bn-image-wrap {
        width: 35%;
    }
    
    .ecst-tv-bn-text-wrap {
        width: 65%;
        padding: 40px 10px 10px;
    }
    
    /* Smaller ticker on mobile */
    .ecst-tv-bn-ticker {
        height: 35px;
    }
    
    .ecst-tv-bn-content {
        bottom: 35px;
    }
    
    .ecst-tv-bn-progress-bar {
        bottom: 35px;
    }
}

@media (max-width: 480px) {
    .ecst-tv-breaking-news {
        min-height: 150px;
    }
    
    .ecst-tv-bn-header {
        padding: 6px 10px;
        gap: 6px;
    }
    
    .ecst-tv-bn-live-dot {
        width: 8px;
        height: 8px;
    }
    
    .ecst-tv-bn-text-wrap {
        padding: 35px 8px 8px;
    }
    
    .ecst-tv-bn-ticker {
        height: 30px;
    }
    
    .ecst-tv-bn-content {
        bottom: 30px;
    }
    
    .ecst-tv-bn-progress-bar {
        bottom: 30px;
    }
    
    .ecst-tv-bn-ticker-label {
        padding: 0 8px;
    }
    
    .ecst-tv-bn-ticker-label-dot {
        width: 5px;
        height: 5px;
        margin-right: 4px;
    }
}
