/*
Theme Name: Helal Auto
Theme URI: https://helal.elzohary.com
Author: Elzohary
Description: Arabic automotive news theme for Helal Auto.
Version: 1.0.1
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.2
Text Domain: helal-auto
*/
:root{--ink:#142224;--muted:#667579;--line:#dbe4e3;--brand:#006d77;--brand-dark:#073b4c;--brand-soft:#e6f3f2;--accent:#ef8354;--gold:#f3c969;--page:#f4f7f7;--panel:#fff}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--page);color:var(--ink);font-family:Tajawal,Arial,sans-serif;line-height:1.7;direction:rtl}a{color:inherit;text-decoration:none}img{max-width:100%;height:auto;display:block}.container{width:min(1200px,calc(100% - 32px));margin-inline:auto}.topbar{background:var(--brand-dark);color:#f8fbfb;font-size:13px}.topbar .container{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 0}.ticker{display:flex;align-items:center;gap:10px;min-width:0}.ticker strong{background:var(--accent);color:#111;padding:3px 9px;border-radius:3px;white-space:nowrap;font-weight:800}.ticker span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.top-links{display:flex;align-items:center;gap:12px;white-space:nowrap;color:#cde3e5}.top-links a{color:#cde3e5}.site-header{background:var(--panel);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:50;box-shadow:0 8px 24px rgba(7,59,76,.06)}.header-main{display:grid;grid-template-columns:300px 1fr;align-items:center;gap:26px;padding:18px 0}.brand{display:flex;align-items:center;gap:12px}.logo-mark{width:58px;height:58px;background:linear-gradient(135deg,var(--brand),var(--brand-dark));color:#fff;display:grid;place-items:center;font-weight:800;font-size:25px;border-radius:8px}.brand-text strong{display:block;font-size:31px;line-height:1.1;color:var(--brand-dark)}.brand-text span{display:block;color:var(--muted);font-size:13px;margin-top:4px}.nav-wrap{background:linear-gradient(90deg,var(--brand-dark),var(--brand));border-top:1px solid rgba(255,255,255,.1)}.nav-row{display:grid;grid-template-columns:1fr 240px;align-items:center;gap:14px}.nav{display:flex;align-items:center;gap:2px;font-weight:800;font-size:15px;overflow:auto}.nav a{color:#fff;padding:13px 10px;white-space:nowrap;border-radius:6px}.nav a:hover{background:rgba(255,255,255,.13)}.search-form{display:flex;align-items:center;background:#fff;height:39px;border-radius:6px;overflow:hidden}.search-form input{border:0;background:transparent;padding:0 12px;min-width:0;width:100%;font-family:inherit}.search-form button{border:0;background:var(--accent);color:#111;height:100%;padding:0 15px;font-family:inherit;font-weight:800;cursor:pointer}.ad-slot{border:1px dashed #b7c9c8;background:linear-gradient(135deg,#f8fbfb,#edf5f4);min-height:250px;margin-bottom:18px;display:grid;place-items:center;color:#7c8b8f;font-weight:800;text-align:center;border-radius:8px}.ad-slot-wide{min-height:82px;margin:12px 0}.ad-widget,.ad-widget img{max-width:100%}.hero{background:linear-gradient(180deg,#e9f3f2,#f4f7f7);border-bottom:1px solid var(--line);padding:24px 0 18px}.hero-grid{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:20px;direction:ltr}.hero-grid>*{direction:rtl}.lead-card,.stack-card,.post-card{background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:0 12px 28px rgba(7,59,76,.08)}.lead-card{position:relative;min-height:450px;display:flex;align-items:flex-end;overflow:hidden}.lead-card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .25s ease}.lead-card:hover img{transform:scale(1.025)}.lead-card:after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,rgba(5,31,39,.9),rgba(5,31,39,.16) 62%)}.lead-content{position:relative;z-index:1;color:#fff;padding:30px;max-width:760px}.cat{display:inline-flex;background:var(--accent);color:#111;padding:4px 10px;border-radius:4px;font-size:12px;font-weight:800}.lead-content h1{font-size:34px;line-height:1.28;margin:12px 0 10px}.meta{color:#8a9a9e;font-size:13px}.lead-card .meta{color:#e9f3f2}.side-stack{display:grid;gap:12px}.stack-card{display:grid;grid-template-columns:128px 1fr;gap:12px;padding:10px;min-height:118px;align-items:center}.stack-card img{width:128px;height:94px;object-fit:cover;border-radius:6px}.stack-card h3{font-size:16px;line-height:1.45;margin:0 0 8px}.section{padding:28px 0}.section-compact{padding-top:10px}.section-head{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid var(--brand);margin-bottom:18px}.section-head h2{background:var(--brand);color:#fff;font-size:18px;margin:0;padding:9px 16px;border-radius:6px 6px 0 0}.section-head a{color:var(--brand);font-weight:800}.home-layout,.layout{display:grid;grid-template-columns:minmax(0,1fr) 315px;gap:24px;align-items:start}.posts-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.posts-grid-2{grid-template-columns:1fr 1fr}.post-card{overflow:hidden}.post-card img{width:100%;aspect-ratio:16/10;object-fit:cover;background:#d9e6e5}.post-card-horizontal{display:grid;grid-template-columns:185px 1fr;min-height:156px}.post-card-horizontal img{height:100%;min-height:156px;aspect-ratio:auto}.post-card-body{padding:14px}.post-card h3{font-size:18px;line-height:1.48;margin:8px 0}.post-card p{color:var(--muted);font-size:14px;margin:0}.article{padding:34px 0}.article h1{font-size:42px;line-height:1.25;margin:10px 0 12px;color:var(--brand-dark)}.article-content{font-size:19px}.article-content p{margin:0 0 18px}.sidebar-box{border:1px solid var(--line);padding:16px;margin-bottom:18px;background:#fff;border-radius:8px;box-shadow:0 10px 24px rgba(7,59,76,.06)}.sidebar-box h3{margin:0 0 14px;color:var(--brand-dark);border-bottom:3px solid var(--accent);display:inline-block}.mini-list{display:grid;gap:12px}.mini-list a{display:grid;grid-template-columns:82px 1fr;gap:10px;align-items:center;font-weight:700}.mini-list img{width:82px;height:58px;object-fit:cover;border-radius:6px}.site-footer{background:var(--brand-dark);color:#d8e7e8;padding:30px 0;margin-top:40px}.site-footer .container{display:flex;align-items:center;justify-content:space-between;gap:16px}.archive-title{font-size:32px;margin:28px 0 16px;color:var(--brand-dark)}.pagination{margin-top:24px}.pagination .page-numbers{display:inline-flex;border:1px solid var(--line);padding:6px 11px;margin-inline:2px;border-radius:6px;background:#fff}.pagination .current{background:var(--brand);color:#fff;border-color:var(--brand)}@media (max-width:980px){.header-main,.nav-row,.hero-grid,.home-layout,.layout{grid-template-columns:1fr}.nav-row{padding-bottom:12px}.ad-slot-wide{width:100%}.posts-grid,.posts-grid-2{grid-template-columns:repeat(2,1fr)}.lead-card{min-height:380px}.lead-content h1,.article h1{font-size:29px}.site-footer .container{align-items:flex-start;flex-direction:column}}@media (max-width:560px){.container{width:min(100% - 22px,1200px)}.topbar .container,.top-links{align-items:flex-start;flex-direction:column}.brand-text strong{font-size:24px}.logo-mark{width:50px;height:50px}.posts-grid,.posts-grid-2{grid-template-columns:1fr}.post-card-horizontal{grid-template-columns:1fr}.post-card-horizontal img{height:auto;min-height:auto;aspect-ratio:16/10}.stack-card{grid-template-columns:108px 1fr}.stack-card img{width:108px;height:82px}.lead-card{min-height:330px}.lead-content{padding:20px}.lead-content h1,.article h1{font-size:25px}}

/* Helal Auto refreshed homepage */
.logo-image-wrap{width:74px;height:74px;background:#fff;border:1px solid var(--line);padding:4px;border-radius:14px;box-shadow:0 8px 20px rgba(7,59,76,.10)}
.logo-image-wrap img{width:100%;height:100%;object-fit:cover;border-radius:10px}
.header-main{grid-template-columns:360px 1fr;padding:14px 0}
.brand-text strong{font-size:28px}
.ad-slot-wide{min-height:74px}
.top-news{padding-top:22px}
.section-kicker{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;border-bottom:2px solid var(--brand)}
.section-kicker span{background:var(--brand-dark);color:#fff;font-weight:800;padding:8px 15px;border-radius:8px 8px 0 0}
.section-kicker a{color:var(--brand);font-weight:800}
.hero-grid{grid-template-columns:minmax(0,1fr) 380px;align-items:stretch}
.lead-card{min-height:380px}
.lead-content{padding:24px}
.lead-content h1{font-size:30px;max-width:720px}
.side-stack{background:#fff;border:1px solid var(--line);border-radius:10px;padding:14px;box-shadow:0 12px 28px rgba(7,59,76,.08)}
.side-stack h2{font-size:18px;margin:0 0 10px;color:var(--brand-dark);border-bottom:3px solid var(--accent);padding-bottom:6px}
.stack-card{box-shadow:none;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:9px 0;min-height:88px;grid-template-columns:106px 1fr}
.stack-card:last-child{border-bottom:0}
.stack-card img{width:106px;height:74px}
.stack-card h3{font-size:15px;margin-bottom:4px}
.latest-grid{grid-template-columns:repeat(3,1fr)}
.latest-grid .post-card{box-shadow:0 10px 22px rgba(7,59,76,.07)}
.latest-grid .post-card img{aspect-ratio:16/9}
.latest-grid .post-card-body{padding:12px}
.latest-grid .post-card h3{font-size:16px;margin:7px 0 4px}
.home-topic-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.topic-box{background:#fff;border:1px solid var(--line);border-radius:10px;padding:14px;box-shadow:0 10px 24px rgba(7,59,76,.07)}
.topic-head{border-bottom:2px solid var(--brand);margin-bottom:10px}
.topic-head h2{font-size:18px;display:inline-block;background:var(--brand);color:#fff;margin:0;padding:7px 12px;border-radius:7px 7px 0 0}
.topic-item{display:grid;grid-template-columns:92px 1fr;gap:10px;padding:10px 0;border-bottom:1px solid var(--line);align-items:center}
.topic-item:last-child{border-bottom:0}
.topic-item img{width:92px;height:64px;object-fit:cover;border-radius:7px}
.topic-item h3{font-size:15px;line-height:1.45;margin:0 0 4px}
@media (max-width:980px){.header-main{grid-template-columns:1fr}.hero-grid,.home-topic-grid{grid-template-columns:1fr}.latest-grid{grid-template-columns:repeat(2,1fr)}.lead-card{min-height:340px}.side-stack{padding:12px}}
@media (max-width:560px){.logo-image-wrap{width:58px;height:58px}.latest-grid{grid-template-columns:1fr}.lead-content h1{font-size:24px}.topic-item{grid-template-columns:88px 1fr}}

/* Hero height refinement */
.hero-grid{align-items:start}
.lead-card{height:380px;min-height:380px}
@media (max-width:980px){.lead-card{height:340px;min-height:340px}}
@media (max-width:560px){.lead-card{height:320px;min-height:320px}}

/* Extra homepage news blocks */
.section-more-news{padding-top:8px}
.more-news-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.more-news-card{background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden;box-shadow:0 10px 22px rgba(7,59,76,.07)}
.more-news-card img{width:100%;aspect-ratio:16/10;object-fit:cover;background:#d9e6e5}
.more-news-card>div{padding:12px}
.more-news-card h3{font-size:16px;line-height:1.45;margin:8px 0 5px}
.visual-strip{padding-top:6px}
.visual-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.visual-card{position:relative;min-height:220px;overflow:hidden;border-radius:10px;box-shadow:0 12px 28px rgba(7,59,76,.10);background:#123}
.visual-card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .25s ease}
.visual-card:hover img{transform:scale(1.03)}
.visual-card:after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,rgba(5,31,39,.88),rgba(5,31,39,.12) 68%)}
.visual-card>div{position:absolute;z-index:1;inset:auto 0 0 0;padding:16px;color:#fff}
.visual-card h3{font-size:19px;line-height:1.45;margin:8px 0 0}
@media (max-width:980px){.more-news-grid{grid-template-columns:repeat(2,1fr)}.visual-grid{grid-template-columns:1fr}.visual-card{min-height:240px}}
@media (max-width:560px){.more-news-grid{grid-template-columns:1fr}.visual-card{min-height:210px}}

/* Mobile polish */
html,body{max-width:100%;overflow-x:hidden}
@media (max-width:560px){
  .site-header{position:relative}
  .header-main{gap:12px;padding:14px 0}
  .brand{width:100%}
  .nav-row{gap:10px;padding:10px 0}
  .nav{width:100%;padding-bottom:4px;scrollbar-width:thin}
  .nav a{padding:11px 10px;font-size:14px}
  .search-form{width:100%}
  .ad-slot-wide{min-height:64px}
  .section{padding:22px 0}
  .home-layout{gap:18px}
}

/* Real ad creatives */
.ad-slot{background:transparent;border:0;min-height:auto;padding:0;box-shadow:none}
.ad-slot-wide{min-height:90px}
.ad-image-link{display:flex;align-items:center;justify-content:center;width:100%;line-height:0}
.ad-image-link img{display:block;max-width:100%;height:auto;border:1px solid #cfe0df;border-radius:8px;background:#eef7f7}
aside .ad-slot{margin-bottom:18px}
aside .ad-image-link img{width:300px;max-width:100%}
.header-main .ad-image-link img,.container>.ad-slot-wide .ad-image-link img{width:728px;max-width:100%}
@media (max-width:560px){.ad-slot-wide{min-height:auto}.ad-image-link img{border-radius:7px}}

/* Tighten vertical rhythm around ads and news sections */
.container>.ad-slot-wide{margin:10px auto 14px}
.section{padding:20px 0}
.section-more-news{padding-top:0}
.visual-strip{padding-top:0}
.home-infeed-ad,.ad-slot-wide + .section{margin-top:0}
.home-layout{gap:20px}
.latest-grid{align-items:start}
.more-news-grid,.visual-grid{margin-top:0}
@media (max-width:560px){.container>.ad-slot-wide{margin:8px auto 12px}.section{padding:18px 0}.section-head{margin-bottom:14px}}

/* Balance homepage columns to remove empty vertical gaps */
.hero{padding-bottom:10px}
.hero-grid{align-items:start}
.side-stack{gap:8px}
.stack-card{min-height:78px;padding:8px 0;grid-template-columns:96px 1fr}
.stack-card img{width:96px;height:66px}
.stack-card h3{font-size:14px;line-height:1.42}
.lead-card{height:360px;min-height:360px}
.home-layout{align-items:start}
.sidebar-box{padding:14px;margin-bottom:14px}
.mini-list{gap:8px}
.mini-list a{grid-template-columns:74px 1fr;gap:9px;font-size:14px}
.mini-list img{width:74px;height:52px}
.infeed-ad-wrap{margin:10px 0 0}
.section-more-news{padding-top:14px}
@media (max-width:980px){.lead-card{height:330px;min-height:330px}.stack-card{grid-template-columns:106px 1fr}.stack-card img{width:106px;height:74px}.section-more-news{padding-top:10px}}
@media (max-width:560px){.lead-card{height:310px;min-height:310px}.stack-card{grid-template-columns:92px 1fr}.stack-card img{width:92px;height:64px}.section-more-news{padding-top:8px}}

/* Motion and car prices band */
@keyframes helalFadeUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
@keyframes helalTicker{0%,100%{transform:translateX(0)}50%{transform:translateX(-4px)}}
.hero,.section,.ad-slot{animation:helalFadeUp .55s ease both}
.post-card,.stack-card,.more-news-card,.visual-card,.price-card,.sidebar-box{transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}
.post-card:hover,.more-news-card:hover,.price-card:hover,.sidebar-box:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(7,59,76,.12)}
.stack-card:hover{transform:translateX(-3px)}
.ticker strong{animation:helalTicker 2.2s ease-in-out infinite}
.car-prices-band{padding-top:14px;padding-bottom:16px}
.price-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.price-card{background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden;box-shadow:0 10px 22px rgba(7,59,76,.07)}
.price-image{display:block;overflow:hidden;background:#d9e6e5}
.price-image img{width:100%;aspect-ratio:16/10;object-fit:cover;transition:transform .25s ease}
.price-card:hover .price-image img{transform:scale(1.035)}
.price-content{padding:12px}
.draft-badge{display:inline-flex;background:var(--brand-soft);color:var(--brand-dark);border:1px solid #c7dddc;border-radius:999px;padding:2px 9px;font-size:12px;font-weight:800;margin-bottom:7px}
.price-content h3{font-size:17px;line-height:1.35;margin:0 0 7px;color:var(--brand-dark)}
.price-content strong{display:block;font-size:18px;color:var(--accent);line-height:1.25;margin-bottom:4px}
.price-content p{margin:0;color:var(--muted);font-size:13px}
@media (max-width:980px){.price-grid{grid-template-columns:repeat(2,1fr)}.car-prices-band{padding-top:10px}}
@media (max-width:560px){.hero,.section,.ad-slot{animation-duration:.35s}.price-grid{grid-template-columns:1fr}.price-content h3{font-size:16px}.price-content strong{font-size:17px}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* Price cards as automotive price units */
.car-prices-band{background:linear-gradient(180deg,#f4f9f8,#edf5f4);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.price-card{position:relative}
.price-card:before{content:"";position:absolute;inset:0 0 auto 0;height:4px;background:linear-gradient(90deg,var(--brand),var(--accent));z-index:1}
.price-image img{aspect-ratio:16/11;filter:saturate(1.05) contrast(1.03)}
.price-content{display:grid;gap:5px}
.price-content h3{font-size:18px}
.price-content strong{background:var(--brand-soft);color:var(--brand-dark);border-radius:7px;padding:7px 9px;width:max-content;max-width:100%}
.price-link{margin-top:4px;display:inline-flex;width:max-content;background:var(--brand);color:#fff;border-radius:999px;padding:5px 11px;font-size:13px;font-weight:800}

/* Lower homepage news with compact car prices rail */
.lower-news-area{padding-top:18px}
.lower-home-layout{display:grid;grid-template-columns:292px minmax(0,1fr);gap:22px;align-items:start;direction:ltr}
.lower-home-layout>*{direction:rtl}
.lower-main{min-width:0;order:2}
.mini-price-panel{order:1;background:#fff;border:1px solid var(--line);border-radius:10px;padding:14px;box-shadow:0 12px 26px rgba(7,59,76,.08);position:sticky;top:116px}
.mini-price-head{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid var(--brand);margin-bottom:12px;gap:10px}
.mini-price-head h2{font-size:17px;line-height:1.3;margin:0;background:var(--brand);color:#fff;padding:8px 11px;border-radius:7px 7px 0 0}
.mini-price-head a{font-weight:800;color:var(--brand);font-size:13px;white-space:nowrap}
.mini-price-list{display:grid;gap:10px}
.mini-price-card{display:grid;grid-template-columns:88px 1fr;gap:10px;align-items:center;border:1px solid var(--line);border-radius:9px;padding:8px;background:linear-gradient(180deg,#fff,#f7fbfa);transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}
.mini-price-card:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(7,59,76,.10);border-color:#bfd8d6}
.mini-price-card img{width:88px;height:62px;object-fit:cover;border-radius:7px;background:#d9e6e5}
.mini-price-card span{display:grid;gap:1px;min-width:0}
.mini-price-card strong{font-size:14px;line-height:1.25;color:var(--brand-dark);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mini-price-card small{font-size:12px;color:var(--muted);line-height:1.35}
.mini-price-card b{font-size:13px;color:var(--accent);line-height:1.35}
.lower-main .more-news-grid,.lower-main .visual-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.lower-main .visual-head{margin-top:22px}
.lower-main .visual-card{min-height:205px}
.lower-main .visual-card h3{font-size:17px}
@media (max-width:1100px){
  .lower-home-layout{grid-template-columns:260px minmax(0,1fr);gap:18px}
  .mini-price-card{grid-template-columns:78px 1fr}
  .mini-price-card img{width:78px;height:58px}
  .lower-main .more-news-grid,.lower-main .visual-grid{gap:14px}
}
@media (max-width:980px){
  .lower-home-layout{display:grid;grid-template-columns:1fr;direction:rtl}
  .lower-main{order:1}
  .mini-price-panel{order:2;position:static}
  .mini-price-list{grid-template-columns:repeat(2,1fr)}
  .lower-main .more-news-grid,.lower-main .visual-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lower-main .visual-card{min-height:220px}
}
@media (max-width:560px){
  .lower-news-area{padding-top:12px}
  .mini-price-panel{padding:12px}
  .mini-price-list{grid-template-columns:1fr}
  .mini-price-card{grid-template-columns:92px 1fr}
  .mini-price-card img{width:92px;height:64px}
  .lower-main .more-news-grid,.lower-main .visual-grid{grid-template-columns:1fr;gap:14px}
  .lower-main .visual-head{margin-top:18px}
  .lower-main .visual-card{min-height:215px}
}
