
/*
Theme Name: HmaDa
Description: RTL news theme with responsive header, elegant icons, restored options, real mega menu, and coded homepage prototype.
Version: 4.1.0
Text Domain: hmada
*/
:root{
  --hm-bg:#f6f4fb;
  --hm-card:#ffffff;
  --hm-text:#1f2937;
  --hm-muted:#6b7280;
  --hm-border:#e6ddf5;
  --hm-row1:#16111f;
  --hm-row2:#ffffff;
  --hm-row3:#171717;
  --hm-primary:#7b2cbf;
  --hm-accent:#fb8c00;
  --hm-red:#e53935;
}
html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}
body{margin:0;font-family:Tahoma,Arial,sans-serif;background:var(--hm-bg);color:var(--hm-text);direction:rtl;text-align:right}
body.hm-dark-mode{--hm-bg:#111827;--hm-card:#1f2937;--hm-text:#f9fafb;--hm-muted:#cbd5e1;--hm-border:#334155;--hm-row1:#0f172a;--hm-row2:#111827;--hm-row3:#0b0f16}
a{text-decoration:none;color:inherit}img{max-width:100%;height:auto;display:block}
.hm-container{width:min(1240px,calc(100% - 32px));margin-inline:auto}
.hm-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.hm-header{position:relative;z-index:1000}.hm-header.hm-sticky{position:sticky;top:0}
.hm-row1{background:var(--hm-row1);color:#fff;font-size:14px}
.hm-row1-inner{display:grid;grid-template-columns:auto 1fr auto auto;gap:18px;align-items:center;padding:10px 0}
.hm-top-links ul,.hm-social{margin:0;padding:0;list-style:none;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.hm-top-links a{color:#fff;opacity:.95}
.hm-top-links a:hover{opacity:1;text-decoration:underline}
.hm-social a{width:36px;height:36px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,.1);color:#fff;transition:.2s ease;border:1px solid rgba(255,255,255,.08)}
.hm-social a:hover{background:rgba(255,255,255,.22);transform:translateY(-1px)}
.hm-social svg{width:16px;height:16px;fill:currentColor}
.hm-ticker{min-width:0;overflow:hidden;white-space:nowrap}
.hm-ticker-label{display:inline-block;background:rgba(255,255,255,.12);padding:6px 10px;border-radius:999px;margin-left:8px;font-weight:700}
.hm-ticker-items{display:inline-block;animation:hmTicker 28s linear infinite}
.hm-ticker-items a{color:#fff;margin-left:22px}
@keyframes hmTicker{from{transform:translateX(0)}to{transform:translateX(35%)}}
.hm-date-time{white-space:nowrap;font-weight:700}

.hm-row2{background:var(--hm-row2);border-bottom:1px solid var(--hm-border)}
.hm-row2-inner{display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:center;padding:18px 0}
.hm-logo-wrap.logo-left{justify-self:start}.hm-logo-wrap.logo-center{justify-self:center}.hm-logo-wrap.logo-right{justify-self:end}
.hm-logo-wrap img{max-height:70px;width:auto}
.hm-logo-text{font-size:34px;font-weight:800;color:var(--hm-primary)}
.hm-actions{display:flex;gap:10px;align-items:center;justify-self:start}
.hm-menu-toggle{display:none}
.hm-icon-btn{width:44px;height:44px;border-radius:999px;border:1px solid var(--hm-border);background:#fff;color:var(--hm-text);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:.2s ease}
.hm-icon-btn:hover{background:#f3ecfb;border-color:#d7c3f3;color:var(--hm-primary)}
.hm-icon-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.hm-search-box{display:none;padding:0 0 16px}.hm-search-box.is-open{display:block}
.hm-search-box form{display:flex;gap:8px}
.hm-search-box input[type=search]{flex:1;border:1px solid var(--hm-border);border-radius:999px;padding:12px 16px;font:inherit}
.hm-search-box button,.search-submit{border:none;border-radius:999px;padding:12px 18px;color:#fff;background:linear-gradient(135deg,#7b2cbf,#5a189a);cursor:pointer}

.hm-row3{background:var(--hm-row3);color:#fff;border-top:1px solid rgba(255,255,255,.05);border-bottom:1px solid rgba(255,255,255,.05)}
.hm-menu-root{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;align-items:stretch}
.hm-menu-root>li{position:relative}
.hm-menu-root>li>a{display:flex;align-items:center;justify-content:center;min-height:58px;padding:0 22px;color:#fff;font-weight:700;border-left:1px solid rgba(255,255,255,.05);transition:background .2s ease}
.hm-menu-root>li.menu-red:hover>a,.hm-menu-root>li.menu-red.current-menu-item>a,.hm-menu-root>li.menu-red.current-menu-ancestor>a{background:#e53935}
.hm-menu-root>li.menu-orange:hover>a,.hm-menu-root>li.menu-orange.current-menu-item>a,.hm-menu-root>li.menu-orange.current-menu-ancestor>a{background:#fb8c00}
.hm-menu-root>li.menu-pink:hover>a,.hm-menu-root>li.menu-pink.current-menu-item>a,.hm-menu-root>li.menu-pink.current-menu-ancestor>a{background:#d81b60}
.hm-menu-root>li.menu-blue:hover>a,.hm-menu-root>li.menu-blue.current-menu-item>a,.hm-menu-root>li.menu-blue.current-menu-ancestor>a{background:#1e88e5}
.hm-menu-root>li.menu-green:hover>a,.hm-menu-root>li.menu-green.current-menu-item>a,.hm-menu-root>li.menu-green.current-menu-ancestor>a{background:#43a047}
.hm-menu-root>li.menu-purple:hover>a,.hm-menu-root>li.menu-purple.current-menu-item>a,.hm-menu-root>li.menu-purple.current-menu-ancestor>a{background:#8e24aa}
.hm-menu-root>li:not(.menu-red):not(.menu-orange):not(.menu-pink):not(.menu-blue):not(.menu-green):not(.menu-purple):hover>a,.hm-menu-root>li:not(.menu-red):not(.menu-orange):not(.menu-pink):not(.menu-blue):not(.menu-green):not(.menu-purple).current-menu-item>a,.hm-menu-root>li:not(.menu-red):not(.menu-orange):not(.menu-pink):not(.menu-blue):not(.menu-green):not(.menu-purple).current-menu-ancestor>a{background:var(--hm-primary)}
.hm-submenu{display:none;position:absolute;top:100%;right:0;min-width:220px;margin:0;padding:8px 0;list-style:none;background:#202020;border-radius:0 0 12px 12px;box-shadow:0 16px 28px rgba(0,0,0,.18);z-index:60}.hm-submenu li a{display:block;padding:10px 14px;color:#fff}.hm-submenu li a:hover{background:rgba(255,255,255,.08)}.hm-menu-root>li:hover>.hm-submenu{display:block}
.hm-mega{display:none;position:absolute;top:100%;right:0;left:0;background:#232323;color:#fff;padding:24px;border-top:1px solid rgba(255,255,255,.06);box-shadow:0 18px 34px rgba(0,0,0,.2);z-index:55}.hm-menu-root>li.hm-has-mega:hover>.hm-mega{display:block}.hm-mega-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.hm-mega-post{display:block;color:#fff}.hm-mega-post img{width:100%;height:190px;object-fit:cover;border-radius:8px;background:#333}.hm-mega-post h4{margin:12px 0 0;font-size:17px;line-height:1.5}.hm-mega-post:hover h4{text-decoration:underline}

.hm-page{padding:20px 0 40px}
.hm-card{background:var(--hm-card);border:1px solid var(--hm-border);border-radius:18px;box-shadow:0 8px 22px rgba(31,41,55,.05);padding:20px}
.hm-loop{display:grid;gap:16px}.hm-post{background:#fff;border:1px solid var(--hm-border);border-radius:18px;padding:18px}.hm-post img{border-radius:14px;margin-bottom:14px}.hm-post h2{margin:0 0 10px}.hm-meta{color:var(--hm-muted);font-size:14px;margin-bottom:10px}

.hm-home-section{margin-bottom:24px}
.hm-section-shell{background:#fff;border:1px solid var(--hm-border);border-radius:20px;padding:18px 18px 22px;box-shadow:0 8px 22px rgba(31,41,55,.05)}
.hm-section-title{display:flex;align-items:center;justify-content:flex-start;gap:10px;margin:0 0 18px;font-size:22px;font-weight:800}
.hm-section-title:before{content:"\2190";font-size:28px;line-height:1;color:#111}
.hm-section-title span{position:relative;padding-bottom:8px}
.hm-section-title span:after{content:"";position:absolute;right:0;bottom:0;width:100%;height:3px;background:var(--hm-red);border-radius:999px}

.hm-overlay-card{position:relative;overflow:hidden;border-radius:10px;min-height:220px;background:#222}
.hm-overlay-card img{width:100%;height:100%;min-height:220px;object-fit:cover}
.hm-overlay-card:after{content:"";position:absolute;inset:0;background:linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.25) 45%, rgba(0,0,0,.1))}
.hm-overlay-content{position:absolute;right:0;left:0;bottom:0;padding:18px;color:#fff;z-index:2}
.hm-overlay-content h3,.hm-overlay-content h2,.hm-overlay-content h4{margin:0 0 10px;line-height:1.45}
.hm-overlay-content p{margin:0;color:rgba(255,255,255,.88);line-height:1.8;font-size:15px}
.hm-overlay-meta{margin-top:8px;font-size:14px;color:rgba(255,255,255,.85)}

.hm-slider{position:relative;background:#8b6d89;border-radius:0 0 16px 16px;overflow:hidden}
.hm-slider-main{position:relative;min-height:520px}
.hm-slide{display:none;position:relative;height:520px}
.hm-slide.is-active{display:block}
.hm-slide img{width:100%;height:520px;object-fit:cover}
.hm-slide:after{content:"";position:absolute;inset:0;background:linear-gradient(to top, rgba(132,101,128,.92), rgba(0,0,0,.18) 55%, rgba(0,0,0,.04))}
.hm-slide-badge{position:absolute;top:28px;left:28px;background:#fff;color:#e000c2;padding:12px 18px;border-radius:10px;font-weight:800;z-index:2}
.hm-slide-caption{position:absolute;right:36px;left:36px;bottom:145px;color:#fff;z-index:2}
.hm-slide-caption h2{font-size:clamp(30px,4vw,62px);margin:0;line-height:1.2}
.hm-slider-thumbs{position:absolute;right:24px;left:24px;bottom:22px;overflow:hidden;z-index:3}
.hm-slider-thumbs-track{display:flex;gap:18px;width:max-content;animation:hmThumbTicker 28s linear infinite}
.hm-slider-thumbs:hover .hm-slider-thumbs-track{animation-play-state:paused}
.hm-thumb-card{display:grid;grid-template-columns:110px 1fr;gap:12px;background:#fff;border-radius:26px;padding:0;overflow:hidden;min-height:96px;align-items:center;min-width:370px;max-width:370px}
.hm-thumb-card img{width:110px;height:96px;object-fit:cover}
.hm-thumb-body{padding:14px 16px;font-size:16px;line-height:1.45;color:#6f5068}
@keyframes hmThumbTicker{from{transform:translateX(0)}to{transform:translateX(35%)}}
.hm-slider-dots{display:flex;justify-content:center;gap:16px;padding:18px 0 6px}
.hm-slider-dot{width:8px;height:8px;border-radius:999px;background:#c7bfcb}
.hm-slider-dot.is-active{width:18px;height:18px;background:#e100ff;box-shadow:0 0 0 4px rgba(225,0,255,.15)}

.hm-grid-world{display:grid;grid-template-columns:1.05fr 1fr;gap:24px}
.hm-grid-world-left{display:grid;grid-template-rows:auto auto;gap:18px}
.hm-grid-world-small{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.hm-simple-card img{width:100%;height:200px;object-fit:cover;border-radius:10px}
.hm-simple-card h3{font-size:22px;margin:14px 0 10px;line-height:1.45}
.hm-simple-card .hm-meta,.hm-list-card .hm-meta{font-size:14px}
.hm-simple-card.large h3{font-size:28px}
.hm-simple-card.large p{font-size:16px;line-height:1.85;color:#666}

.hm-sports{position:relative;overflow:hidden;border-radius:20px;padding:26px;background:linear-gradient(180deg, rgba(46,106,175,.92), rgba(76,144,84,.58))}
.hm-sports:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at top, rgba(255,255,255,.22), transparent 40%)}
.hm-sports>*{position:relative;z-index:1}
.hm-sports .hm-section-title{color:#fff}.hm-sports .hm-section-title:before{color:#fff}
.hm-sports-grid-top{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-bottom:22px}
.hm-sports-grid-bottom{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.hm-overlay-card.short{min-height:170px}.hm-overlay-card.short img{min-height:170px}

.hm-saudi{display:grid;grid-template-columns:1fr 1.15fr;gap:22px}
.hm-saudi-left{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-content:start}
.hm-saudi-right .hm-simple-card img{height:430px}

.hm-egypt{display:grid;grid-template-columns:.8fr 1.5fr .8fr;gap:18px}
.hm-egypt-col{display:grid;gap:18px;align-content:start}
.hm-egypt-center .hm-overlay-card{min-height:100%;height:100%}
.hm-egypt-center .hm-overlay-card img{height:100%;min-height:580px}
.hm-list-card{display:grid;grid-template-columns:140px 1fr;gap:14px;align-items:start}
.hm-list-card img{width:140px;height:120px;object-fit:cover;border-radius:8px}
.hm-list-card h4{margin:0 0 8px;line-height:1.45;font-size:18px}

.hm-three-cols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.hm-mini-section{background:#fff;border:1px solid var(--hm-border);border-radius:14px;padding:18px}
.hm-mini-section .hm-section-title{font-size:18px;margin-bottom:14px}
.hm-mini-section .hm-section-title:before{font-size:22px}
.hm-mini-hero{margin-bottom:16px}
.hm-mini-hero .hm-overlay-card{min-height:300px}
.hm-mini-hero .hm-overlay-card img{min-height:300px}
.hm-mini-list{display:grid;gap:12px}
.hm-mini-item{display:grid;grid-template-columns:88px 1fr;gap:12px;align-items:start}
.hm-mini-item img{width:88px;height:88px;object-fit:cover;border-radius:8px}
.hm-mini-item h5{margin:0;line-height:1.5;font-size:17px}

.hm-footer{background:#181021;color:#fff;padding:28px 0 18px;margin-top:24px}.hm-footer p{margin:0;text-align:center;color:rgba(255,255,255,.85)}

@media(max-width:991px){
  .hm-row1-inner{grid-template-columns:1fr;gap:12px;text-align:center}
  .hm-top-links ul,.hm-social{justify-content:center}
  .hm-ticker{white-space:normal;overflow:visible}
  .hm-ticker-items{display:flex;flex-wrap:wrap;gap:8px;animation:none;justify-content:center}
  .hm-ticker-items a{margin:0;padding:4px 8px;background:rgba(255,255,255,.08);border-radius:999px}
  .hm-row2-inner{grid-template-columns:auto 1fr auto;align-items:center}
  .hm-logo-wrap{justify-self:center !important}
  .hm-logo-wrap img{max-height:56px}
  .hm-menu-toggle{display:inline-flex}
  .hm-row3{display:none}
  .hm-row3.is-open{display:block}
  .hm-menu-root{display:block}
  .hm-menu-root>li{border-top:1px solid rgba(255,255,255,.06)}
  .hm-menu-root>li>a{justify-content:flex-start;min-height:52px;padding:0 16px}
  .hm-submenu{position:static;display:none;box-shadow:none;border-radius:0;background:#202020}
  .hm-menu-root>li:hover>.hm-submenu{display:block}
  .hm-mega{display:none !important}
  .hm-menu-root>li.hm-has-mega:hover>.hm-mega{display:none !important}
  .hm-mega-grid{display:none !important}

  .hm-slide,.hm-slide img,.hm-slider-main{height:420px;min-height:420px}
  .hm-slide-caption{bottom:175px;right:18px;left:18px}
  .hm-slide-caption h2{font-size:32px}
  .hm-slide-badge{top:18px;left:18px;padding:10px 14px}
  .hm-slider-thumbs{right:12px;left:12px;bottom:14px}
  .hm-slider-thumbs-track{gap:10px;animation:none;display:grid;grid-template-columns:1fr}
  .hm-thumb-card{grid-template-columns:84px 1fr;min-height:76px;border-radius:16px;min-width:100%;max-width:none}
  .hm-thumb-card img{width:84px;height:76px}
  .hm-thumb-body{padding:10px 12px;font-size:14px}

  .hm-grid-world,
  .hm-sports-grid-top,
  .hm-sports-grid-bottom,
  .hm-saudi,
  .hm-egypt,
  .hm-three-cols,
  .hm-grid-world-small,
  .hm-saudi-left{grid-template-columns:1fr}
  .hm-egypt-center .hm-overlay-card img{min-height:360px}
  .hm-list-card{grid-template-columns:100px 1fr}
  .hm-list-card img{width:100px;height:86px}
}


/* HmaDa image tuning v4.3.1 */
.hm-simple-card img{
  height:180px;
  object-fit:cover;
}
.hm-simple-card.large img{
  height:360px;
}
.hm-grid-world-small .hm-simple-card img{
  height:150px;
}
.hm-overlay-card img{
  object-fit:cover;
}
.hm-overlay-card.short img{
  height:160px;
}
.hm-saudi-right .hm-simple-card img{
  height:340px;
}
.hm-list-card img{
  width:120px;
  height:90px;
  object-fit:cover;
  flex-shrink:0;
}
.hm-mini-hero .hm-overlay-card img{
  height:230px;
  min-height:230px;
}
.hm-mini-item img{
  width:72px;
  height:72px;
  object-fit:cover;
  flex-shrink:0;
}
.hm-thumb-card img{
  width:90px;
  height:82px;
  object-fit:cover;
}

@media(max-width:991px){
  .hm-simple-card img{height:170px}
  .hm-simple-card.large img{height:240px}
  .hm-grid-world-small .hm-simple-card img{height:140px}
  .hm-overlay-card.short img{height:140px}
  .hm-saudi-right .hm-simple-card img{height:240px}
  .hm-list-card img{width:90px;height:72px}
  .hm-mini-hero .hm-overlay-card img{height:200px;min-height:200px}
  .hm-mini-item img{width:64px;height:64px}
  .hm-thumb-card img{width:84px;height:76px}
}


/* HmaDa layout width tuning v4.3.2 */
.hm-container{
  width:min(1120px,calc(100% - 32px));
}

.hm-page{
  padding-top:24px;
}

.hm-three-cols{
  gap:14px;
}

.hm-grid-world,
.hm-saudi,
.hm-egypt,
.hm-sports-grid-top{
  gap:18px;
}

.hm-sports-grid-bottom{
  gap:14px;
}

@media(min-width:1280px){
  .hm-container{
    width:min(1080px,calc(100% - 40px));
  }
}

@media(max-width:991px){
  .hm-container{
    width:min(100%,calc(100% - 20px));
  }
}
