/*
Theme Name: Ien
Theme URI: https://example.com/massdar
Author: Massdar Team
Author URI: https://example.com
Description: قالب إخباري خفيف وسريع، متجاوب بالكامل، جاهز للعربية وRTL، مع أقسام رئيسية مناسبة لموقع أخبار شامل.
Version: 1.0.5
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: massdar
Tags: news, blog, one-column, two-columns, rtl-language-support, custom-logo, custom-menu, featured-images, editor-style, translation-ready
*/

/* Base Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif; line-height: 1.75; color: #111; background: #fff; font-size: var(--fs-body); font-weight: var(--fw-body); }
img, video { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
p { margin: 0 0 1rem; }
h1,h2,h3,h4 { line-height: 1.3; margin: 0 0 .75rem; }
ul,ol { padding: 0; margin: 0; }
button, input, select, textarea { font: inherit; }

/* CSS Variables */
:root{
  --container: 1180px;
  --gap: 18px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.06);
  --border: 1px solid rgba(0,0,0,.08);
  --muted: rgba(0,0,0,.62);
  --bg-soft: rgba(0,0,0,.03);
  --accent: #0b5cff; /* can be overridden by Customizer inline CSS */

  /* Typography scale */
  /* Hero main title (close to single post title size as requested) */
  --fs-title-xl: clamp(24px, 2.5vw, 34px);
  --fs-title-lg: clamp(18px, 1.85vw, 26px); /* Cards titles */
  --fs-title-md: 16px; /* Links */
  --fs-body: 16px;
  --fs-section: 22px;
  --fs-list-title: 18px;
  --fs-list-meta: 13px;

/* Typography controls (Customizer) */
--fw-body: 400;
--fs-nav: 15px;
--fw-nav: 500;

--fw-section: 800;

--fs-hero-main-title: 28px; /* max size */
--fw-hero-main-title: 500;

--fs-hero-item-title: 16px;
--fw-hero-item-title: 500;

--fs-post-title: 28px; /* max size */
--fw-post-title: 600;

--fs-post-content: 17px;
--fw-post-content: 400;

--fs-footer-links: 14px;
--fw-footer-links: 500;

--fs-widget-title: 16px;
--fw-widget-title: 800;
}

/* Layout */
.container{ width: min(var(--container), calc(100% - 28px)); margin-inline: auto; }
.site{ min-height: 100vh; display:flex; flex-direction:column; }
.site-main{ flex: 1; padding: 22px 0 40px; }
.grid{ display:grid; gap: var(--gap); }
.grid-2{ grid-template-columns: 1.2fr .8fr; }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px){
  .grid-2, .grid-3{ grid-template-columns: 1fr; }
}

/* Header */
.site-header{ position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: var(--border); }
.header-row{ display:flex; align-items:center; justify-content:flex-start; gap: 10px; padding: 12px 0; }
.brand{ display:flex; align-items:center; gap: 10px; min-width: 140px; margin-inline-end:auto; }
.brand{ display:flex; align-items:center; gap: 10px; min-width: 140px; }
.brand img{ width: auto; height: 46px; max-width: 220px; object-fit: contain; border-radius: 0; }
.brand-logo{ display:flex; align-items:center; }
.brand-logo .custom-logo-link{ display:flex; align-items:center; }
.brand-logo .custom-logo{ height: 46px; width: auto; max-width: 220px; }
@media (max-width: 680px){
  .brand img, .brand-logo .custom-logo{ height: 40px; max-width: 180px; }
}
.brand .title{ font-weight: 800; letter-spacing: .2px; }
.brand .tagline{ font-size: 12px; color: var(--muted); line-height: 1.2; }
.nav-toggle{ display:none; border: var(--border); background:#fff; border-radius: 12px; padding: 10px 12px; }
.nav-toggle:focus{ outline: 2px solid rgba(11,92,255,.25); outline-offset: 2px; }

.primary-nav{ display:flex; align-items:center; gap: 14px; }
.primary-nav ul{ list-style: none; display:flex; align-items:center; gap: 12px; }
.primary-nav li{ list-style: none; margin:0; }
.primary-nav a{ display:inline-flex; align-items:center; padding: 10px 10px; border-radius: 10px; font-size: var(--fs-nav); font-weight: var(--fw-nav); color: #111; text-decoration: none; }
.primary-nav a:hover{ background: var(--bg-soft); text-decoration: none; }
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a{ background: rgba(11,92,255,.10); color: var(--accent); }

.header-actions{ display:flex; align-items:center; gap: 10px; }
.search-btn{ border: var(--border); background:#fff; border-radius: 12px; padding: 9px 12px; display:inline-flex; gap: 8px; align-items:center; }
.search-btn:hover{ background: var(--bg-soft); text-decoration:none; }
.badge{ display:inline-flex; align-items:center; gap:8px; padding: 6px 10px; border-radius: 999px; background: rgba(255,0,0,.08); color:#b00020; font-weight:800; font-size: 12px; }
.badge .dot{ width: 8px; height: 8px; border-radius: 50%; background:#b00020; }

@media (max-width: 980px){
  .nav-toggle{ display:inline-flex; }
  .primary-nav{ position: absolute; inset-inline: 0; top: 64px; background:#fff; border-bottom: var(--border); display:none; padding: 10px 0; }
  .primary-nav.is-open{ display:block; }
  .primary-nav ul{ flex-direction: column; align-items: stretch; padding: 0 14px; }
  .primary-nav a{ display:inline-flex; align-items:center; padding: 10px 10px; border-radius: 10px; font-size: var(--fs-nav); font-weight: var(--fw-nav); color: #111; text-decoration: none; }
}

/* Breaking bar */
.breaking{ border-top: var(--border); background: #fff; }
.breaking-row{ display:flex; align-items:center; gap: 12px; padding: 10px 0; }
.breaking-label{ flex: 0 0 auto; font-weight: 900; color: #b00020; }
.breaking-items{ flex: 1; overflow:hidden; white-space: nowrap; }
.breaking-items a{ display:inline-block; padding-inline: 10px; color: var(--muted); }
.breaking-items a:hover{ color: #c51d34; text-decoration:none; }
@media (max-width: 680px){
  .breaking{ display:none; }
}

/* Cards */
.card{ background:#fff; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow:hidden; }
.card .pad{ padding: 16px; }
.kicker{ font-size: 12px; color: var(--muted); display:flex; gap: 8px; align-items:center; }
.kicker a{ color: var(--accent); font-weight: 800; }
.meta{ font-size: 13px; color: var(--muted); display:flex; gap: 10px; flex-wrap:wrap; }
.meta span{ display:inline-flex; align-items:center; gap: 6px; }
.post-title{ font-weight: 900; margin: 10px 0 8px; }
.post-title a:hover{ text-decoration:none; color: #c51d34; }
.excerpt{ color: var(--muted); margin: 0; }
.thumb{ width:100%; aspect-ratio: 16/9; object-fit: cover; background: var(--bg-soft); display:block; }

/* Stream list (category/archive) - matches hero minimal style */
.stream{ background:#fff; }
.stream-item{ display:grid; grid-template-columns: 180px 1fr; gap: 14px; padding: 16px 0; border-bottom: var(--border); align-items:start; }
.stream-item:last-child{ border-bottom: 0; }
.stream-item .thumb{ border-radius: 12px; aspect-ratio: 16/9; }
.stream-item .st-title{ font-size: 22px; font-weight: 950; margin: 0 0 8px; line-height: 1.35; }
.stream-item .st-title a:hover{ color: #c51d34; text-decoration:none; }
.stream-item .st-excerpt{ margin: 0; color: var(--muted); }
.stream-item .kicker{ margin-bottom: 6px; }
@media (max-width: 680px){
  .stream-item{ grid-template-columns: 1fr; }
}


/* Home sections */
.section-head{ display:flex; align-items:baseline; justify-content:space-between; gap: 12px; margin: 18px 0 10px; }
.section-head h2{ font-size: var(--fs-section); margin: 0; font-weight: 900; }
.section-head a{ font-size: 13px; color: var(--accent); font-weight: 800; }
.split{ display:grid; gap: var(--gap); grid-template-columns: 1.3fr .7fr; }
@media (max-width: 980px){ .split{ grid-template-columns: 1fr; } }

/* Magazine-style hero (3 columns like newsrooms) */
.hero-mag{ display:grid; gap: var(--gap); grid-template-columns: 2.2fr 1.2fr 1fr; align-items:start; }
@media (max-width: 980px){ .hero-mag{ grid-template-columns: 1fr; } }

.hero-panel{ background:#fff; }
.col-head{ border-top: 2px solid rgba(0,0,0,.85); padding-top: 10px; margin-bottom: 12px; display:flex; align-items:baseline; justify-content:space-between; gap: 10px; }
.col-head h2{ font-size: var(--fs-section); font-weight: var(--fw-section); margin: 0; }
.col-head a{ font-size: 13px; color: var(--accent); font-weight: 500; text-decoration:none; }

/* View-all links inside section heads */
.col-head a.panel-more{ color: #c51d34; }
.col-head a.panel-more:hover{ color: var(--muted); }

.hero-main-title{ font-size: clamp(calc(var(--fs-hero-main-title) * 0.72), 2.2vw, var(--fs-hero-main-title)); font-weight: var(--fw-hero-main-title); margin: 10px 0 14px; letter-spacing: .1px; }
.hero-main-excerpt{ font-size: var(--fs-body); color: var(--muted); margin-top: 12px; }
.hero-main-thumb{ width:100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; background: var(--bg-soft); display:block; }

.lined-list{ list-style:none; }
.lined-list li{ display:grid; grid-template-columns: 86px 1fr; gap: 12px; padding: 12px 0; border-bottom: var(--border); align-items:center; }
.lined-list li:last-child{ border-bottom: 0; }
.lined-list img{ width: 86px; height: 64px; object-fit: cover; border-radius: 12px; background: var(--bg-soft); }
.lined-list .t{ font-weight: 500; font-size: var(--fs-list-title); margin: 0 0 4px; }
.lined-list .m{ font-size: var(--fs-list-meta); color: var(--muted); margin:0; }

/* Hero lists (middle column without thumbnails) */
.hero-links{ list-style:none; }
.hero-links li{ padding: 14px 0; border-bottom: var(--border); }
.hero-links li:last-child{ border-bottom: 0; }
.hero-links a{ display:block; font-weight: var(--fw-hero-item-title); font-size: var(--fs-hero-item-title); line-height: 1.45; }
.hero-links a:hover{ color: #c51d34; text-decoration:none; }
.hero-links .m{ display:block; font-size: var(--fs-list-meta); color: var(--muted); margin-top: 6px; font-weight: 400; }

/* Slightly smaller hero list titles (as requested) */
.hero-panel .hero-links a,
.hero-panel .lined-list .t,
.hero-panel .small-item .t{ font-size: 17px; }


.op-feature{ margin-bottom: 12px; }
.op-feature .thumb{ border-radius: 12px; }
.op-feature .op-title{ font-size: 18px; font-weight: 500; margin: 10px 0 6px; }
.op-links{ list-style:none; display:grid; }
.op-links li{ padding: 10px 0; border-top: var(--border); }
.op-links li:first-child{ border-top: 0; }
.op-links a{ font-weight: 500; }

/* Only section names (col-head) stay bold inside hero panels */
.hero-panel .col-head h2{ font-weight: var(--fw-section); }
.op-links .d{ display:block; font-size: 12px; color: var(--muted); margin-top: 4px; }

.hero-title{ font-size: clamp(20px, 2.3vw, 30px); }
.small-list{ list-style:none; display:grid; gap: 12px; }
.small-item{ display:grid; grid-template-columns: 86px 1fr; gap: 12px; align-items:center; }
.small-item img{ width: 86px; height: 64px; object-fit: cover; border-radius: 12px; background: var(--bg-soft); }
.small-item .t{ font-weight: 500; margin: 0 0 4px; font-size: var(--fs-list-title); line-height: 1.45; }
.small-item .m{ font-size: var(--fs-list-meta); color: var(--muted); margin:0; }

/* Article (aligned with hero / homepage panels) */
.article{ background:#fff; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
.article .post-head{ margin-bottom: 12px; }
.article h1{ font-size: clamp(24px, 2.5vw, 34px); margin: 0 0 10px; }
.article .meta{ padding-bottom: 10px; border-bottom: var(--border); margin-bottom: 14px; }
.article .content{ margin-top: 14px; }
.article .content > *{ max-width: 760px; }
.article .content img{ border-radius: 16px; }
.article .content a{ color: var(--accent); text-decoration: underline; }
.article .content blockquote{ margin: 1rem 0; padding: 10px 14px; background: var(--bg-soft); border-inline-start: 4px solid var(--accent); border-radius: 12px; }

/* Breadcrumb */
.breadcrumb{ font-size: 12px; color: var(--muted); margin-bottom: 10px; display:flex; gap: 8px; flex-wrap:wrap; }
.breadcrumb a{ color: var(--muted); }
.breadcrumb a:hover{ color: #c51d34; text-decoration:none; }
.breadcrumb .sep{ opacity: .4; }

/* Sidebar widgets */
.widget{ background:#fff; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.widget-title{ font-size: var(--fs-widget-title); font-weight: var(--fw-widget-title); margin: 0 0 10px; }
.widget ul{ list-style:none; display:grid; gap: 8px; }
.widget a:hover{ color: #c51d34; text-decoration:none; }

/* Footer (matches hero / homepage style) */
.site-footer{ border-top: var(--border); background: #f7f7f7; color: #111; }
.footer-top{ padding: 24px 0; }
.footer-grid{ display:grid; gap: var(--gap); grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px){ .footer-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .footer-grid{ grid-template-columns: 1fr; } }
.site-footer a{ font-size: var(--fs-footer-links); font-weight: var(--fw-footer-links); color: inherit; text-decoration: none; }
.site-footer a:hover{ color: #c51d34; text-decoration: none; }
.footer-widget{ background: transparent; border: 0; border-top: 2px solid rgba(0,0,0,.85); border-radius: 0; box-shadow: none; padding: 10px 0 0; }
.site-footer .widget-title{ font-size: var(--fs-section); font-weight: var(--fw-section); margin: 0 0 10px; }
.site-footer .footer-widget ul{ list-style: none; display:flex; flex-wrap:wrap; gap: 10px 14px; }
.site-footer .footer-widget li{ padding: 0; border: 0; }

.footer-bottom{ border-top: var(--border); padding: 14px 0; font-size: 12px; color: var(--muted); display:flex; justify-content:space-between; gap: 10px; flex-wrap:wrap; }
.footer-bottom ul{ list-style: none; display:flex; gap: 10px; flex-wrap:wrap; margin: 0; padding: 0; }
.footer-bottom a{ color: var(--muted); }
.footer-bottom a:hover{ color: #c51d34; }

/* Utilities */
.btn{ display:inline-flex; align-items:center; justify-content:center; padding: 10px 14px; border-radius: 12px; border: var(--border); background:#fff; font-weight: 900; }
.btn-primary{ background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover{ filter: brightness(.98); text-decoration:none; }
hr.sep{ border: 0; border-top: var(--border); margin: 16px 0; }
.notice{ background: rgba(11,92,255,.06); border: 1px solid rgba(11,92,255,.14); padding: 12px 14px; border-radius: 14px; color: rgba(0,0,0,.8); }

/* WordPress core alignments */
.alignwide{ max-width: 1060px; }
.alignfull{ width: 100vw; margin-inline: calc(50% - 50vw); max-width: 100vw; }
.wp-caption{ max-width:100%; }


/* === Massdar tweaks (Jan 2026) === */
/* Hover: color only (no underline) */
a:hover, a:focus{ text-decoration: none; }

/* Hero main title link hover */
.hero-main-title a{ color: inherit; text-decoration: none; }
.hero-main-title a:hover,
.hero-main-title a:focus{ color: #c51d34; text-decoration: none; }

/* "View all" links */
.panel-more,
.col-head > a{
  color: #c51d34;
  text-decoration: none;
}
.panel-more:hover,
.panel-more:focus,
.col-head > a:hover,
.col-head > a:focus{
  color: var(--muted);
  text-decoration: none;
}

/* Category description (no box) */
.term-desc{ margin: 10px 0 14px; color: var(--muted); line-height: 1.8; }

/* Sidebar narrower + flat widgets */
.grid-2{ grid-template-columns: 1.35fr .65fr; }
.sidebar .widget{
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 0;
  border-radius: 0;
}
.sidebar .widget-title{
  border-top: 3px solid rgba(0,0,0,.08);
  padding-top: 10px;
  margin-top: 14px;
}
.sidebar .widget:first-child .widget-title{ margin-top: 0; }


/* Widgets: Massdar recent/popular */
.massdar-widget-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.massdar-widget-item{display:flex;gap:10px;align-items:flex-start}
.massdar-widget-thumb{flex:0 0 auto;display:block}
.massdar-widget-thumb img{width:56px;height:56px;object-fit:cover;border-radius:10px}
.massdar-widget-meta{min-width:0;display:flex;flex-direction:column;gap:4px}
.massdar-widget-link{display:block;font-weight:500;line-height:1.35}
.massdar-widget-date{font-size:12px;opacity:.7}
.massdar-empty{margin:0}

