/*
Theme Name:  Envoy Pro
Theme URI:   https://dostmarketing.pk/envoy-pro
Author:      Dost Marketing Private Limited
Author URI:  https://dostmarketing.pk
Description: Premium multi-niche WordPress news theme. Google News ready, AI-optimized, stock ticker, breaking news, dark mode — all controlled via Customizer. No coding needed.
Version:     2.0.0
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: envoy-pro
Tags:        news, magazine, blog, dark-mode, custom-colors, custom-logo, featured-images, full-width-template, sticky-post, theme-options, two-columns, three-columns, right-sidebar, left-sidebar
*/

/* ============================================================
   CSS VARIABLES — All colors/fonts pulled from Customizer
   ============================================================ */
:root {
    --ep-primary:        #1a3c5e;
    --ep-primary-dark:   #122a44;
    --ep-primary-light:  #2d5f8a;
    --ep-header-bg:      #0d2137;
    --ep-header-text:    #ffffff;
    --ep-topbar-bg:      #061626;
    --ep-footer-bg:      #0d2137;
    --ep-footer-text:    #cccccc;
    --ep-body-bg:        #f4f6f8;
    --ep-card-bg:        #ffffff;
    --ep-text-primary:   #1a1a2e;
    --ep-text-secondary: #555555;
    --ep-text-light:     #888888;
    --ep-border:         #e8eaed;
    --ep-ticker-label:   #c0392b;
    --ep-ticker-bg:      #ffffff;
    --ep-ticker-speed:   30s;
    --ep-body-font:      'Source Serif 4', Georgia, serif;
    --ep-heading-font:   'Cormorant Garamond', Georgia, serif;
    --ep-ui-font:        'DM Sans', Arial, sans-serif;
    --ep-font-size:      16px;
    --ep-badge-radius:   999px;
    --ep-radius:         6px;
    --ep-shadow:         0 2px 12px rgba(0,0,0,0.08);
    --ep-shadow-md:      0 4px 24px rgba(0,0,0,0.12);
    --ep-transition:     0.2s ease;
}

/* Dark Mode Variables */
body.dark-mode {
    --ep-body-bg:        #0f1419;
    --ep-card-bg:        #1a2332;
    --ep-text-primary:   #e8eaed;
    --ep-text-secondary: #aaaaaa;
    --ep-text-light:     #777777;
    --ep-border:         #2a3a4a;
    --ep-ticker-bg:      #1a2332;
    --ep-shadow:         0 2px 12px rgba(0,0,0,0.3);
    --ep-shadow-md:      0 4px 24px rgba(0,0,0,0.4);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: var(--ep-font-size); scroll-behavior: smooth; }

body {
    font-family: var(--ep-body-font);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ep-text-primary);
    background-color: var(--ep-body-bg);
    transition: background-color var(--ep-transition), color var(--ep-transition);
}

body.has-stock-ticker { padding-bottom: 62px; }

a { color: var(--ep-primary); text-decoration: none; transition: color var(--ep-transition); }
a:hover { color: var(--ep-primary-light); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--ep-heading-font);
    color: var(--ep-text-primary);
    line-height: 1.3;
    font-weight: 700;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.ep-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.ep-container-wide {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

.ep-grid { display: grid; gap: 24px; }
.ep-grid-2 { grid-template-columns: repeat(2, 1fr); }
.ep-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ep-grid-4 { grid-template-columns: repeat(4, 1fr); }

.ep-content-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    padding: 32px 0;
}

.ep-content-wrap.sidebar-left  { grid-template-columns: 300px 1fr; }
.ep-content-wrap.no-sidebar    { grid-template-columns: 1fr; }

/* ============================================================
   TOP BAR
   ============================================================ */
.ep-topbar {
    background: var(--ep-topbar-bg);
    color: var(--ep-header-text);
    font-family: var(--ep-ui-font);
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ep-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ep-topbar-date { opacity: 0.75; }
.ep-topbar-date i { margin-right: 5px; }

.ep-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ep-topbar-social a {
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    margin-left: 8px;
    transition: color var(--ep-transition);
}
.ep-topbar-social a:hover { color: #ffffff; }

.ep-newsletter-btn {
    background: var(--ep-primary);
    color: #ffffff !important;
    padding: 4px 12px;
    border-radius: var(--ep-radius);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.ep-newsletter-btn:hover { background: var(--ep-primary-light) !important; }

/* ============================================================
   BREAKING NEWS TICKER
   ============================================================ */
.ep-ticker {
    background: var(--ep-ticker-bg);
    border-bottom: 1px solid var(--ep-border);
    height: 36px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

body.dark-mode .ep-ticker { border-bottom-color: var(--ep-border); }

.ep-ticker-label {
    background: var(--ep-ticker-label);
    color: #ffffff;
    font-family: var(--ep-ui-font);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 14px;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
    gap: 6px;
}

.ep-ticker-dot {
    width: 6px; height: 6px;
    background: #ffffff;
    border-radius: 50%;
    animation: ep-blink 1s infinite;
}

@keyframes ep-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

.ep-ticker-track-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.ep-ticker-track {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: ep-scroll var(--ep-ticker-speed) linear infinite;
}

.ep-ticker-track:hover { animation-play-state: paused; }

@keyframes ep-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ep-ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 24px 0 0;
    font-family: var(--ep-ui-font);
    font-size: 13px;
    color: var(--ep-text-primary);
    gap: 8px;
}

.ep-ticker-item::before {
    content: '//';
    color: var(--ep-ticker-label);
    font-weight: 700;
    margin-right: 4px;
}

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

/* ============================================================
   HEADER
   ============================================================ */
.ep-header {
    background: var(--ep-header-bg);
    position: relative;
    z-index: 100;
}

.ep-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 20px;
}

/* Logo */
.ep-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.ep-logo img { height: 52px; width: auto; }
.ep-logo-text { display: flex; flex-direction: column; }
.ep-logo-name {
    font-family: var(--ep-heading-font);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ep-header-text);
    line-height: 1.1;
    letter-spacing: -0.5px;
}
.ep-logo-tagline {
    font-family: var(--ep-ui-font);
    font-size: 10px;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Header Ad Zone */
.ep-header-ad {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ep-ad-placeholder {
    background: rgba(255,255,255,0.06);
    border: 1px dashed rgba(255,255,255,0.15);
    border-radius: var(--ep-radius);
    padding: 12px 24px;
    color: rgba(255,255,255,0.4);
    font-family: var(--ep-ui-font);
    font-size: 11px;
    text-align: center;
    min-width: 200px;
}

/* Header Actions */
.ep-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.ep-header-search-btn, .ep-dark-toggle {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--ep-header-text);
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--ep-transition);
}
.ep-header-search-btn:hover, .ep-dark-toggle:hover {
    background: rgba(255,255,255,0.18);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.ep-nav {
    background: var(--ep-primary);
    position: relative;
    z-index: 99;
}

.ep-nav.sticky {
    position: sticky;
    top: 0;
    box-shadow: var(--ep-shadow-md);
}

.ep-nav-inner {
    display: flex;
    align-items: center;
}

.ep-nav ul { display: flex; flex-wrap: wrap; }

.ep-nav ul li { position: relative; }

.ep-nav ul li a {
    display: block;
    color: rgba(255,255,255,0.9);
    font-family: var(--ep-ui-font);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    transition: all var(--ep-transition);
    white-space: nowrap;
}

.ep-nav ul li a:hover,
.ep-nav ul li.current-menu-item > a {
    color: #ffffff;
    background: rgba(0,0,0,0.2);
}

/* Dropdown */
.ep-nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--ep-card-bg);
    min-width: 200px;
    box-shadow: var(--ep-shadow-md);
    border-radius: 0 0 var(--ep-radius) var(--ep-radius);
    border-top: 3px solid var(--ep-primary);
    z-index: 999;
    flex-direction: column;
}

.ep-nav ul li:hover > ul { display: flex; }

.ep-nav ul li ul li a {
    color: var(--ep-text-primary);
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    padding: 10px 16px;
    border-bottom: 1px solid var(--ep-border);
}
.ep-nav ul li ul li:last-child a { border-bottom: none; }
.ep-nav ul li ul li a:hover {
    background: var(--ep-body-bg);
    color: var(--ep-primary);
}

/* Mobile hamburger */
.ep-hamburger {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    padding: 14px 0;
    margin-left: auto;
}

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.ep-progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background: var(--ep-primary);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.ep-hero {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: 32px;
}

.ep-hero-large {
    height: 520px;
}

.ep-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ep-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

.ep-hero-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 40px;
}

.ep-hero-content .ep-cat-badge { margin-bottom: 12px; }

.ep-hero-title {
    font-family: var(--ep-heading-font);
    font-size: 2.4rem;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.ep-hero-title a { color: #ffffff; }
.ep-hero-title a:hover { color: rgba(255,255,255,0.85); }

.ep-hero-meta {
    font-family: var(--ep-ui-font);
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Hero Split Style */
.ep-hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

/* ============================================================
   POST CARDS
   ============================================================ */
.ep-card {
    background: var(--ep-card-bg);
    border-radius: var(--ep-radius);
    overflow: hidden;
    box-shadow: var(--ep-shadow);
    transition: transform var(--ep-transition), box-shadow var(--ep-transition);
}

.ep-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ep-shadow-md);
}

.ep-card-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.ep-card-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ep-card:hover .ep-card-img-wrap img { transform: scale(1.04); }

.ep-card-body { padding: 16px; }

.ep-card-cats { margin-bottom: 8px; display: flex; gap: 6px; flex-wrap: wrap; }

.ep-card-title {
    font-family: var(--ep-heading-font);
    font-size: 1.15rem;
    line-height: 1.35;
    margin-bottom: 10px;
}

.ep-card-title a { color: var(--ep-text-primary); }
.ep-card-title a:hover { color: var(--ep-primary); }

.ep-card-excerpt {
    font-size: 0.875rem;
    color: var(--ep-text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ep-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--ep-ui-font);
    font-size: 12px;
    color: var(--ep-text-light);
    border-top: 1px solid var(--ep-border);
    padding-top: 10px;
}

.ep-card-meta i { font-size: 11px; }

/* Category Badge */
.ep-cat-badge {
    display: inline-block;
    font-family: var(--ep-ui-font);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 10px;
    border-radius: var(--ep-badge-radius);
    background: var(--ep-primary);
    color: #ffffff;
    transition: opacity var(--ep-transition);
}
.ep-cat-badge:hover { opacity: 0.85; color: #ffffff; }

/* List style card */
.ep-card-list {
    display: flex;
    gap: 14px;
    background: var(--ep-card-bg);
    border-radius: var(--ep-radius);
    padding: 12px;
    box-shadow: var(--ep-shadow);
    margin-bottom: 12px;
}

.ep-card-list-img {
    width: 90px; height: 70px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.ep-card-list-img img { width: 100%; height: 100%; object-fit: cover; }

.ep-card-list-body { flex: 1; }

.ep-card-list-title {
    font-family: var(--ep-heading-font);
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 6px;
}
.ep-card-list-title a { color: var(--ep-text-primary); }
.ep-card-list-title a:hover { color: var(--ep-primary); }

.ep-card-list-meta {
    font-family: var(--ep-ui-font);
    font-size: 11px;
    color: var(--ep-text-light);
}

/* ============================================================
   SECTION HEADING
   ============================================================ */
.ep-section-title {
    font-family: var(--ep-ui-font);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ep-text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ep-border);
}

.ep-section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 18px;
    background: var(--ep-primary);
    border-radius: 2px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.ep-sidebar { display: flex; flex-direction: column; gap: 28px; }

.ep-widget {
    background: var(--ep-card-bg);
    border-radius: var(--ep-radius);
    padding: 20px;
    box-shadow: var(--ep-shadow);
}

.ep-widget-title {
    font-family: var(--ep-ui-font);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ep-text-primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ep-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Ad zone in sidebar */
.ep-ad-sidebar {
    background: var(--ep-card-bg);
    border-radius: var(--ep-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    box-shadow: var(--ep-shadow);
}

/* Newsletter Widget */
.ep-newsletter-widget input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    font-family: var(--ep-ui-font);
    font-size: 13px;
    margin-bottom: 10px;
    background: var(--ep-body-bg);
    color: var(--ep-text-primary);
}

.ep-newsletter-widget button {
    width: 100%;
    padding: 10px;
    background: var(--ep-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--ep-radius);
    font-family: var(--ep-ui-font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--ep-transition);
}
.ep-newsletter-widget button:hover { background: var(--ep-primary-light); }

/* ============================================================
   SINGLE ARTICLE
   ============================================================ */
.ep-article-header { margin-bottom: 28px; }

.ep-article-title {
    font-family: var(--ep-heading-font);
    font-size: 2.2rem;
    line-height: 1.25;
    margin-bottom: 16px;
    color: var(--ep-text-primary);
}

.ep-article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-family: var(--ep-ui-font);
    font-size: 13px;
    color: var(--ep-text-light);
    padding: 14px 0;
    border-top: 1px solid var(--ep-border);
    border-bottom: 1px solid var(--ep-border);
    margin-bottom: 20px;
}

.ep-article-meta a { color: var(--ep-text-secondary); }
.ep-article-meta a:hover { color: var(--ep-primary); }

.ep-article-featured-img {
    border-radius: var(--ep-radius);
    overflow: hidden;
    margin-bottom: 28px;
}

.ep-article-featured-img img { width: 100%; height: auto; }

.ep-article-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--ep-text-primary);
}

.ep-article-content p { margin-bottom: 20px; }
.ep-article-content h2 { font-size: 1.6rem; margin: 32px 0 16px; }
.ep-article-content h3 { font-size: 1.3rem; margin: 28px 0 14px; }
.ep-article-content blockquote {
    border-left: 4px solid var(--ep-primary);
    padding: 16px 20px;
    background: var(--ep-body-bg);
    border-radius: 0 var(--ep-radius) var(--ep-radius) 0;
    margin: 24px 0;
    font-style: italic;
    color: var(--ep-text-secondary);
}
.ep-article-content ul, .ep-article-content ol {
    padding-left: 24px;
    margin-bottom: 20px;
}
.ep-article-content ul { list-style: disc; }
.ep-article-content ol { list-style: decimal; }
.ep-article-content li { margin-bottom: 8px; }

/* In-article ad */
.ep-ad-article {
    margin: 28px 0;
    text-align: center;
}

/* Social Share */
.ep-share {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 28px 0;
    padding: 20px;
    background: var(--ep-body-bg);
    border-radius: var(--ep-radius);
}

.ep-share-label {
    font-family: var(--ep-ui-font);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ep-text-light);
}

.ep-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--ep-radius);
    font-family: var(--ep-ui-font);
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    transition: opacity var(--ep-transition);
}
.ep-share-btn:hover { opacity: 0.88; color: #ffffff; }
.ep-share-btn.facebook  { background: #1877f2; }
.ep-share-btn.twitter   { background: #1da1f2; }
.ep-share-btn.whatsapp  { background: #25d366; }
.ep-share-btn.linkedin  { background: #0a66c2; }

/* Floating Share */
.ep-share-float {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 888;
}

.ep-share-float a {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #ffffff;
    font-size: 14px;
    transition: transform var(--ep-transition), opacity var(--ep-transition);
}
.ep-share-float a:hover { transform: scale(1.15); color: #ffffff; }

/* Author Box */
.ep-author-box {
    display: flex;
    gap: 20px;
    background: var(--ep-card-bg);
    border-radius: var(--ep-radius);
    padding: 24px;
    box-shadow: var(--ep-shadow);
    margin: 32px 0;
    border-left: 4px solid var(--ep-primary);
}

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

.ep-author-name {
    font-family: var(--ep-heading-font);
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.ep-author-bio {
    font-size: 0.875rem;
    color: var(--ep-text-secondary);
    line-height: 1.65;
}

/* Related Posts */
.ep-related { margin-top: 40px; }

/* ============================================================
   LOAD MORE BUTTON
   ============================================================ */
.ep-load-more-wrap { text-align: center; margin: 32px 0; }

.ep-load-more {
    background: var(--ep-primary);
    color: #ffffff;
    border: none;
    padding: 12px 32px;
    border-radius: var(--ep-radius);
    font-family: var(--ep-ui-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--ep-transition), transform var(--ep-transition);
}
.ep-load-more:hover { background: var(--ep-primary-light); transform: translateY(-1px); }
.ep-load-more:disabled { opacity: 0.6; cursor: not-allowed; }

/* ============================================================
   FOOTER
   ============================================================ */
.ep-footer {
    background: var(--ep-footer-bg);
    color: var(--ep-footer-text);
    margin-top: 48px;
}

.ep-footer-top {
    padding: 48px 0 32px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ep-footer-grid {
    display: grid;
    gap: 32px;
}

.ep-footer-grid-2 { grid-template-columns: repeat(2, 1fr); }
.ep-footer-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ep-footer-grid-4 { grid-template-columns: repeat(4, 1fr); }

.ep-footer-logo { margin-bottom: 14px; }
.ep-footer-logo img { height: 44px; width: auto; }

.ep-footer-about {
    font-size: 0.875rem;
    line-height: 1.7;
    opacity: 0.7;
    margin-bottom: 16px;
}

.ep-footer-social { display: flex; gap: 10px; }
.ep-footer-social a {
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    transition: all var(--ep-transition);
}
.ep-footer-social a:hover {
    background: var(--ep-primary);
    color: #ffffff;
}

.ep-footer-widget-title {
    font-family: var(--ep-ui-font);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffffff;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.ep-footer-links li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ep-footer-links li:last-child { border: none; }
.ep-footer-links a {
    color: var(--ep-footer-text);
    font-size: 13px;
    opacity: 0.75;
    transition: all var(--ep-transition);
}
.ep-footer-links a:hover { opacity: 1; color: #ffffff; padding-left: 4px; }

.ep-footer-bottom {
    padding: 16px 0;
    text-align: center;
    font-family: var(--ep-ui-font);
    font-size: 12px;
    color: rgba(255,255,255,0.45);
}

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.ep-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9998;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
}

.ep-search-overlay.active { display: flex; }

.ep-search-box {
    width: 100%;
    max-width: 640px;
    padding: 0 20px;
}

.ep-search-box form {
    display: flex;
    gap: 0;
    background: #ffffff;
    border-radius: var(--ep-radius);
    overflow: hidden;
}

.ep-search-box input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    font-size: 1.1rem;
    font-family: var(--ep-ui-font);
    outline: none;
}

.ep-search-box button {
    padding: 16px 24px;
    background: var(--ep-primary);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.ep-search-close {
    position: absolute;
    top: 24px; right: 24px;
    background: none; border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.7;
}
.ep-search-close:hover { opacity: 1; }

/* ============================================================
   AD ZONES
   ============================================================ */
.ep-ad { text-align: center; }
.ep-ad-header { padding: 8px 0; }
.ep-ad-before-footer { padding: 24px 0; background: var(--ep-body-bg); }

/* ============================================================
   PAGINATION
   ============================================================ */
.ep-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.ep-pagination a, .ep-pagination span {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border-radius: var(--ep-radius);
    font-family: var(--ep-ui-font);
    font-size: 13px;
    font-weight: 600;
    background: var(--ep-card-bg);
    color: var(--ep-text-primary);
    box-shadow: var(--ep-shadow);
    transition: all var(--ep-transition);
}

.ep-pagination a:hover, .ep-pagination .current {
    background: var(--ep-primary);
    color: #ffffff;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.ep-404 {
    text-align: center;
    padding: 80px 20px;
}
.ep-404-code { font-size: 6rem; font-weight: 900; color: var(--ep-primary); opacity: 0.15; line-height: 1; }
.ep-404-title { font-size: 2rem; margin-bottom: 12px; }
.ep-404-text { color: var(--ep-text-secondary); margin-bottom: 24px; }

/* ============================================================
   UTILITIES
   ============================================================ */
.ep-badge-pill   { border-radius: 999px; }
.ep-badge-square { border-radius: 4px; }
.ep-badge-line   { background: transparent !important; color: var(--ep-primary) !important; border-bottom: 2px solid; border-radius: 0; padding: 0 0 2px; }

.ep-hidden { display: none !important; }
.ep-text-center { text-align: center; }

.ep-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--ep-ui-font);
    font-size: 12px;
    color: var(--ep-text-light);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .ep-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .ep-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .ep-content-wrap { grid-template-columns: 1fr; }
    .ep-content-wrap.sidebar-left { grid-template-columns: 1fr; }
    .ep-footer-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .ep-share-float { display: none; }
}

@media (max-width: 768px) {
    :root { --ep-font-size: 15px; }
    .ep-grid-2, .ep-grid-3, .ep-grid-4 { grid-template-columns: 1fr; }
    .ep-hero-large { height: 320px; }
    .ep-hero-title { font-size: 1.5rem; }
    .ep-hero-content { padding: 20px; }
    .ep-article-title { font-size: 1.6rem; }
    .ep-footer-grid-4, .ep-footer-grid-3, .ep-footer-grid-2 { grid-template-columns: 1fr; }
    .ep-topbar-date { display: none; }
    .ep-hamburger { display: flex; align-items: center; }
    .ep-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--ep-primary-dark);
    }
    .ep-nav ul.open { display: flex; }
    .ep-nav ul li ul { position: static; box-shadow: none; border: none; background: rgba(0,0,0,0.2); }
    .ep-hero-split { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .ep-header-inner { flex-wrap: wrap; }
    .ep-header-ad { order: 3; width: 100%; justify-content: center; }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .ep-topbar, .ep-nav, .ep-ticker, .ep-sidebar,
    .ep-share, .ep-share-float, #envoy-stock-ticker,
    .ep-footer, .ep-header-actions { display: none !important; }
    .ep-content-wrap { grid-template-columns: 1fr; }
    body { background: white; color: black; }
}
