/*
Theme Name: e-Sedan News
Theme URI: https://www.e-sedan.com/
Author: e-Sedan
Author URI: https://www.e-sedan.com/
Description: Fast, responsive automotive news and EV magazine theme built for e-Sedan.com. Includes configurable header styles, homepage hero layouts, editorial sections, ad/widget areas, reading time, related posts and native WordPress Customizer controls.
Version: 1.0.2
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: esedan-news
Tags: news, blog, magazine, custom-logo, custom-menu, featured-images, sticky-post, threaded-comments, translation-ready, two-columns
*/

:root {
  --es-bg: #f5f7f8;
  --es-surface: #ffffff;
  --es-surface-2: #eef2f3;
  --es-ink: #111820;
  --es-muted: #64717d;
  --es-line: #dde3e6;
  --es-dark: #0c1218;
  --es-accent: #18b884;
  --es-accent-dark: #0b8e65;
  --es-max: 1240px;
  --es-radius: 16px;
  --es-shadow: 0 16px 40px rgba(12, 18, 24, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--es-bg);
  color: var(--es-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--es-accent-dark); }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
.container { width: min(calc(100% - 40px), var(--es-max)); margin-inline: auto; }
.screen-reader-text { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Top bar */
.es-topbar { background: var(--es-dark); color: #cbd3d8; font-size: 13px; }
.es-topbar .container { min-height: 36px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.es-topbar a:hover { color:#fff; }
.es-topbar__left, .es-topbar__right { display:flex; align-items:center; gap:16px; }
.es-dot { width:6px; height:6px; background:var(--es-accent); border-radius:50%; display:inline-block; }

/* Header */
.site-header { background:var(--es-surface); border-bottom:1px solid var(--es-line); position:relative; z-index:50; }
.es-header-main .container { min-height:88px; display:grid; grid-template-columns:1fr auto 1fr; gap:24px; align-items:center; }
.es-brand { display:flex; align-items:center; gap:12px; min-width:0; }
.custom-logo { display:block; max-height:54px; width:auto; }
.site-title { margin:0; font-size:30px; font-weight:850; letter-spacing:-1.2px; line-height:1; }
.site-title a { display:inline-flex; align-items:center; }
.site-title a::before { content:"e"; display:grid; place-items:center; width:32px; height:32px; margin-right:7px; border-radius:9px; background:var(--es-accent); color:#fff; font-size:21px; font-weight:900; }
.site-description { margin:5px 0 0; color:var(--es-muted); font-size:12px; text-transform:uppercase; letter-spacing:.08em; font-weight:700; }
.es-header-ad { justify-self:center; width:min(100%, 520px); text-align:center; }
.es-header-actions { justify-self:end; display:flex; align-items:center; gap:10px; }
.es-icon-btn { width:42px; height:42px; display:grid; place-items:center; border:1px solid var(--es-line); background:#fff; border-radius:50%; cursor:pointer; color:var(--es-ink); }
.es-icon-btn:hover { border-color:var(--es-accent); color:var(--es-accent-dark); }
.es-menu-toggle { display:none; }

.es-header--centered .es-header-main .container { grid-template-columns:1fr; text-align:center; padding-block:22px; }
.es-header--centered .es-brand { justify-content:center; }
.es-header--centered .es-header-ad { justify-self:center; }
.es-header--centered .es-header-actions { position:absolute; right:20px; top:24px; }
.es-header--compact .es-header-main .container { min-height:66px; }
.es-header--compact .site-description, .es-header--compact .es-header-ad { display:none; }

/* Navigation */
.es-nav-wrap { background:var(--es-surface); border-top:1px solid var(--es-line); }
.es-nav-wrap.is-sticky { position:sticky; top:0; z-index:45; box-shadow:0 8px 24px rgba(12,18,24,.06); }
.primary-navigation { display:flex; align-items:center; justify-content:space-between; min-height:54px; }
.primary-navigation ul { list-style:none; margin:0; padding:0; display:flex; align-items:center; gap:4px; }
.primary-navigation li { position:relative; }
.primary-navigation a { display:block; padding:15px 13px; font-size:14px; font-weight:750; }
.primary-navigation .current-menu-item > a,
.primary-navigation .current-menu-ancestor > a,
.primary-navigation a:hover { color:var(--es-accent-dark); }
.primary-navigation ul ul { display:none; position:absolute; top:100%; left:0; min-width:220px; padding:8px; background:#fff; border:1px solid var(--es-line); border-radius:12px; box-shadow:var(--es-shadow); }
.primary-navigation ul li:hover > ul { display:block; }
.primary-navigation ul ul a { padding:10px 12px; }
.es-nav-label { display:flex; align-items:center; gap:7px; color:var(--es-muted); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }

/* Search panel */
.es-search-panel { display:none; background:#fff; border-top:1px solid var(--es-line); padding:16px 0; }
.es-search-panel.is-open { display:block; }
.search-form { display:flex; gap:8px; }
.search-field { width:100%; min-height:46px; border:1px solid var(--es-line); border-radius:10px; padding:0 14px; background:#fff; }
.search-submit { border:0; border-radius:10px; padding:0 20px; min-height:46px; background:var(--es-accent); color:#fff; font-weight:800; cursor:pointer; }

/* Trending ticker */
.es-ticker { background:#fff; border-bottom:1px solid var(--es-line); }
.es-ticker .container { min-height:44px; display:flex; align-items:center; gap:16px; overflow:hidden; }
.es-ticker__label { flex:0 0 auto; display:flex; gap:7px; align-items:center; color:var(--es-accent-dark); font-size:12px; font-weight:900; text-transform:uppercase; letter-spacing:.08em; }
.es-ticker__items { display:flex; gap:28px; white-space:nowrap; overflow:hidden; mask-image:linear-gradient(to right,#000 85%,transparent); }
.es-ticker__items a { font-size:13px; font-weight:650; }

/* General section */
.site-main { min-height:60vh; }
.es-home { padding-bottom:60px; }
.es-section { padding-top:46px; }
.es-section-head { display:flex; justify-content:space-between; gap:20px; align-items:end; margin-bottom:20px; }
.es-section-title { margin:0; font-size:27px; letter-spacing:-.6px; line-height:1.1; }
.es-section-title::after { content:""; display:block; width:42px; height:4px; margin-top:9px; border-radius:99px; background:var(--es-accent); }
.es-section-link { color:var(--es-muted); font-size:13px; font-weight:800; }
.es-section-link:hover { color:var(--es-accent-dark); }

/* Hero */
.es-hero { padding-top:28px; }
.es-hero-grid { display:grid; grid-template-columns:minmax(0, 1.55fr) minmax(280px, .8fr); grid-template-rows:repeat(2, minmax(220px, 1fr)); gap:14px; min-height:560px; }
.es-hero-card { position:relative; overflow:hidden; border-radius:var(--es-radius); background:var(--es-dark); color:#fff; min-height:220px; }
.es-hero-card:first-child { grid-row:1 / span 2; }
.es-hero-media { position:absolute; inset:0; }
.es-hero-media img { width:100%; height:100%; object-fit:cover; transition:transform .45s ease; }
.es-hero-card:hover .es-hero-media img { transform:scale(1.035); }
.es-hero-media::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg,rgba(4,9,13,.04) 20%,rgba(4,9,13,.88) 100%); }
.es-placeholder { width:100%; height:100%; background:radial-gradient(circle at 20% 20%, rgba(24,184,132,.42), transparent 34%), linear-gradient(135deg,#1c2832,#081016 70%); }
.es-hero-content { position:absolute; inset:auto 0 0; padding:26px; z-index:2; }
.es-hero-card:first-child .es-hero-content { padding:34px; }
.es-hero-title { margin:9px 0 8px; font-size:25px; letter-spacing:-.5px; line-height:1.12; }
.es-hero-card:first-child .es-hero-title { font-size:42px; letter-spacing:-1.1px; max-width:840px; }
.es-meta { display:flex; flex-wrap:wrap; align-items:center; gap:9px; font-size:12px; color:var(--es-muted); }
.es-hero-card .es-meta { color:#d3d9dc; }
.es-category { display:inline-flex; align-items:center; min-height:24px; padding:0 9px; border-radius:999px; background:var(--es-accent); color:#fff!important; font-size:10px; line-height:24px; text-transform:uppercase; letter-spacing:.06em; font-weight:900; }

.es-hero--split .es-hero-grid { grid-template-columns:1.3fr .7fr; grid-template-rows:repeat(2, 1fr); }
.es-hero--full .es-hero-grid { display:block; min-height:590px; }
.es-hero--full .es-hero-card:not(:first-child) { display:none; }
.es-hero--full .es-hero-card:first-child { min-height:590px; }
.es-hero--full .es-hero-card:first-child .es-hero-title { font-size:52px; max-width:900px; }

/* Ad slot */
.es-ad-slot { margin-top:28px; text-align:center; }
.es-ad-slot:empty { display:none; }

/* Cards */
.es-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.es-card { background:var(--es-surface); border:1px solid var(--es-line); border-radius:var(--es-radius); overflow:hidden; transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.es-card:hover { transform:translateY(-3px); box-shadow:var(--es-shadow); border-color:transparent; }
.es-card-media { display:block; position:relative; aspect-ratio:16/9; overflow:hidden; background:var(--es-dark); }
.es-card-media img { width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.es-card:hover .es-card-media img { transform:scale(1.035); }
.es-card-body { padding:17px 18px 19px; }
.es-card-title { margin:8px 0 8px; font-size:20px; line-height:1.25; letter-spacing:-.3px; }
.es-card-excerpt { margin:10px 0 0; color:var(--es-muted); font-size:14px; }

/* Lists / content with sidebar */
.es-content-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:36px; align-items:start; }
.es-list { display:grid; gap:18px; }
.es-list-item { display:grid; grid-template-columns:240px 1fr; gap:20px; padding:14px; background:#fff; border:1px solid var(--es-line); border-radius:var(--es-radius); }
.es-list-item__media { aspect-ratio:16/10; border-radius:12px; overflow:hidden; background:var(--es-dark); }
.es-list-item__media img { width:100%; height:100%; object-fit:cover; }
.es-list-item h2, .es-list-item h3 { margin:7px 0 8px; line-height:1.18; letter-spacing:-.4px; }
.es-list-item p { color:var(--es-muted); margin:8px 0 0; font-size:14px; }

/* Sidebar */
.widget-area { display:grid; gap:20px; }
.widget { background:#fff; border:1px solid var(--es-line); border-radius:var(--es-radius); padding:20px; }
.widget-title { margin:0 0 14px; font-size:17px; }
.widget ul { list-style:none; margin:0; padding:0; }
.widget li + li { border-top:1px solid var(--es-line); margin-top:10px; padding-top:10px; }
.widget a { font-size:14px; font-weight:650; }
.tagcloud a { display:inline-block; margin:3px; padding:5px 8px; border:1px solid var(--es-line); border-radius:7px; font-size:12px!important; }

/* Newsletter */
.es-newsletter { margin-top:48px; background:var(--es-dark); color:#fff; border-radius:22px; overflow:hidden; }
.es-newsletter__inner { display:grid; grid-template-columns:1.35fr .65fr; gap:32px; align-items:center; padding:38px 42px; background:radial-gradient(circle at 90% 10%, rgba(24,184,132,.28), transparent 32%); }
.es-newsletter h2 { font-size:31px; margin:0 0 7px; }
.es-newsletter p { margin:0; color:#cbd3d8; }
.es-cta { justify-self:end; display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:0 20px; border-radius:10px; background:var(--es-accent); color:#fff!important; font-weight:850; }
.es-cta:hover { background:#20c991; }

/* Archive / search */
.es-page-head { padding:42px 0 22px; }
.es-page-head h1 { margin:0; font-size:40px; letter-spacing:-1px; }
.es-page-head p { color:var(--es-muted); max-width:760px; }
.navigation.pagination { margin:34px 0; }
.nav-links { display:flex; gap:7px; flex-wrap:wrap; }
.page-numbers { min-width:40px; height:40px; display:grid; place-items:center; padding:0 10px; border:1px solid var(--es-line); background:#fff; border-radius:9px; font-weight:700; }
.page-numbers.current { background:var(--es-accent); color:#fff; border-color:var(--es-accent); }

/* Article */
.es-article-wrap { padding:36px 0 64px; }
.es-article-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:24px; justify-content:space-between; align-items:start; }
.es-article { background:#fff; border:1px solid var(--es-line); border-radius:20px; overflow:hidden; }
.es-article-header { padding:38px 42px 26px; }
.es-breadcrumbs { color:var(--es-muted); font-size:12px; margin-bottom:15px; }
.es-article-title { font-size:46px; line-height:1.08; letter-spacing:-1.4px; margin:11px 0 16px; }
.es-article-deck { font-size:18px; color:var(--es-muted); margin:0 0 18px; }
.es-featured-image { margin:0; }
.es-featured-image img { width:100%; display:block; max-height:570px; object-fit:cover; }
.es-article-content { padding:30px 42px 42px; font-family:Georgia,"Times New Roman",serif; font-size:18px; line-height:1.85; }
.es-article-content > *:first-child { margin-top:0; }
.es-article-content h2, .es-article-content h3, .es-article-content h4 { font-family:Inter,ui-sans-serif,system-ui,sans-serif; line-height:1.2; letter-spacing:-.5px; margin-top:1.8em; }
.es-article-content a { color:var(--es-accent-dark); text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; }
.es-article-content blockquote { margin:28px 0; padding:10px 0 10px 24px; border-left:4px solid var(--es-accent); font-size:21px; color:#33404a; }
.es-article-content figure { margin-inline:0; }
.es-article-footer { padding:0 42px 36px; }
.es-share { display:flex; gap:8px; flex-wrap:wrap; border-top:1px solid var(--es-line); padding-top:22px; }
.es-share a { padding:8px 11px; border:1px solid var(--es-line); border-radius:8px; font-size:12px; font-weight:800; }
.es-author-box { margin-top:25px; padding:20px; display:grid; grid-template-columns:64px 1fr; gap:15px; background:var(--es-surface-2); border-radius:14px; }
.es-author-box img { border-radius:50%; }
.es-author-box h3 { margin:0 0 4px; }
.es-author-box p { margin:0; color:var(--es-muted); font-size:14px; }

/* Related */
.es-related { margin-top:30px; }
.es-related .es-grid { grid-template-columns:repeat(3,1fr); }

/* Pages */
.es-page { margin:36px auto 64px; max-width:940px; background:#fff; border:1px solid var(--es-line); border-radius:20px; padding:42px; }
.es-page h1 { margin-top:0; font-size:42px; }
.es-page .entry-content { font-size:17px; }

/* Comments */
.comments-area { padding:30px 42px 42px; border-top:1px solid var(--es-line); }
.comment-list { list-style:none; padding:0; }
.comment-body { padding:16px 0; border-bottom:1px solid var(--es-line); }
.comment-meta { font-size:13px; color:var(--es-muted); }
.comment-form textarea, .comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url] { width:100%; border:1px solid var(--es-line); border-radius:10px; padding:10px 12px; }
.comment-form input[type=submit] { border:0; background:var(--es-accent); color:#fff; border-radius:9px; padding:11px 17px; font-weight:800; }

/* Footer */
.site-footer { background:var(--es-dark); color:#c4cdd2; margin-top:56px; }
.es-footer-main { display:grid; grid-template-columns:1.25fr repeat(3,1fr); gap:38px; padding:48px 0; }
.site-footer h2, .site-footer h3 { color:#fff; }
.es-footer-brand { font-size:28px; font-weight:900; color:#fff; letter-spacing:-.8px; }
.es-footer-about { font-size:14px; max-width:360px; }
.site-footer .widget { padding:0; border:0; border-radius:0; background:none; }
.site-footer .widget-title { color:#fff; }
.site-footer .widget li + li { border-color:#27323a; }
.es-footer-bottom { border-top:1px solid #253039; padding:18px 0; font-size:12px; }
.es-footer-bottom .container { display:flex; justify-content:space-between; gap:20px; align-items:center; }
.es-socials { display:flex; gap:10px; flex-wrap:wrap; }
.es-socials a { color:#c4cdd2; }
.es-socials a:hover { color:#fff; }

/* 404 */
.es-empty { text-align:center; padding:90px 20px; }
.es-empty strong { display:block; font-size:86px; line-height:1; color:var(--es-accent); }
.es-empty h1 { font-size:34px; margin:10px 0; }
.es-empty p { color:var(--es-muted); }

@media (max-width: 1020px) {
  .es-header-main .container { grid-template-columns:1fr auto; }
  .es-header-ad { display:none; }
  .es-content-layout, .es-article-layout { grid-template-columns:1fr; }
  .es-article-layout > .widget-area { display:none; }
  .es-grid { grid-template-columns:repeat(2,1fr); }
  .es-footer-main { grid-template-columns:repeat(2,1fr); }
}

@media (max-width: 760px) {
  .container { width:min(calc(100% - 24px), var(--es-max)); }
  .es-topbar__right { display:none; }
  .es-header-main .container { min-height:68px; }
  .site-title { font-size:24px; }
  .site-title a::before { width:27px; height:27px; font-size:18px; }
  .site-description { display:none; }
  .es-menu-toggle { display:grid; }
  .es-nav-label { display:none; }
  .primary-navigation { min-height:0; display:block; }
  .primary-navigation > div > ul, .primary-navigation > ul { display:none; padding:8px 0 14px; align-items:stretch; flex-direction:column; }
  .primary-navigation.is-open > div > ul, .primary-navigation.is-open > ul { display:flex; }
  .primary-navigation li { width:100%; }
  .primary-navigation a { padding:11px 4px; border-bottom:1px solid var(--es-line); }
  .primary-navigation ul ul { display:block; position:static; border:0; box-shadow:none; padding-left:14px; }
  .es-ticker__items { gap:18px; }
  .es-hero-grid, .es-hero--split .es-hero-grid { display:grid; grid-template-columns:1fr; grid-template-rows:auto; min-height:0; }
  .es-hero-card, .es-hero-card:first-child { grid-row:auto; min-height:280px; }
  .es-hero-card:first-child { min-height:400px; }
  .es-hero-card:first-child .es-hero-title, .es-hero--full .es-hero-card:first-child .es-hero-title { font-size:33px; }
  .es-hero-card:first-child .es-hero-content { padding:24px; }
  .es-grid { grid-template-columns:1fr; }
  .es-list-item { grid-template-columns:110px 1fr; gap:13px; }
  .es-list-item p { display:none; }
  .es-newsletter__inner { grid-template-columns:1fr; padding:30px 24px; }
  .es-cta { justify-self:start; }
  .es-article-header, .es-article-content, .es-article-footer, .comments-area { padding-left:22px; padding-right:22px; }
  .es-article-title { font-size:35px; }
  .es-article-content { font-size:17px; }
  .es-related .es-grid { grid-template-columns:1fr; }
  .es-page { margin:20px 12px 46px; padding:25px 22px; }
  .es-footer-main { grid-template-columns:1fr; gap:24px; }
  .es-footer-bottom .container { align-items:flex-start; flex-direction:column; }
}
