/*
Theme Name: SoftGold Pro
Theme URI: https://example.com/softgold-pro
Author: Ehab Mohamed
Author URI: https://example.com
Description: Premium navy and gold WordPress classic theme for software download, license information, and official program catalog websites.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
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: softgold-pro
Tags: blog, grid-layout, custom-logo, custom-menu, featured-images, two-columns, translation-ready
*/

:root {
  --sg-navy-950: #07111f;
  --sg-navy-900: #0a1628;
  --sg-navy-850: #0d1d34;
  --sg-navy-800: #10243f;
  --sg-navy-700: #172f51;
  --sg-gold-500: #d6a542;
  --sg-gold-400: #f0c66e;
  --sg-gold-300: #ffe09a;
  --sg-text: #e9eef7;
  --sg-muted: #9fb0ca;
  --sg-soft: #132642;
  --sg-card: rgba(15, 32, 56, .82);
  --sg-border: rgba(240, 198, 110, .16);
  --sg-shadow: 0 20px 60px rgba(0, 0, 0, .34);
  --sg-radius-xl: 24px;
  --sg-radius-lg: 18px;
  --sg-radius-md: 14px;
  --sg-container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--sg-text);
  background:
    radial-gradient(circle at top left, rgba(214, 165, 66, .12), transparent 38rem),
    radial-gradient(circle at 80% 10%, rgba(64, 111, 196, .16), transparent 28rem),
    linear-gradient(180deg, var(--sg-navy-950), var(--sg-navy-900));
  line-height: 1.65;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; transition: .2s ease; }
a:hover { color: var(--sg-gold-400); }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; }
.screen-reader-text, .sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed !important;
  top: 12px; left: 12px; z-index: 9999;
  width: auto; height: auto; margin: 0; padding: 12px 16px;
  clip: auto; background: var(--sg-gold-500); color: #07111f;
  border-radius: 10px; font-weight: 800;
}
.sg-container { width: min(var(--sg-container), calc(100% - 32px)); margin-inline: auto; }

.sg-topline {
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(7, 17, 31, .78);
  backdrop-filter: blur(12px);
  font-size: 13px;
  color: var(--sg-muted);
}
.sg-topline__inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sg-topline b { color: var(--sg-gold-400); }

.sg-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 17, 31, .86);
  border-bottom: 1px solid rgba(240, 198, 110, .12);
  backdrop-filter: blur(18px);
}
.admin-bar .sg-header { top: 32px; }
.sg-header__inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.sg-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 190px; }
.sg-brand__mark {
  width: 44px; height: 44px; border-radius: 16px;
  display: grid; place-items: center;
  color: #07111f; font-weight: 950;
  background: linear-gradient(135deg, var(--sg-gold-300), var(--sg-gold-500));
  box-shadow: 0 10px 26px rgba(214, 165, 66, .25);
}
.sg-brand__name { display: grid; gap: 0; }
.sg-brand__title { font-size: 20px; font-weight: 900; letter-spacing: -.04em; }
.sg-brand__tagline { color: var(--sg-muted); font-size: 12px; margin-top: -2px; }
.custom-logo { max-height: 48px; width: auto; }

.sg-nav { display: flex; align-items: center; justify-content: center; flex: 1; }
.sg-menu { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; gap: 6px; }
.sg-menu li { position: relative; }
.sg-menu a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-radius: 999px;
  color: var(--sg-muted); font-weight: 750; font-size: 14px;
}
.sg-menu .current-menu-item > a,
.sg-menu a:hover { color: var(--sg-text); background: rgba(240, 198, 110, .10); }
.sg-menu .sub-menu {
  display: none; list-style: none; padding: 8px; margin: 0;
  position: absolute; top: calc(100% + 10px); left: 0;
  min-width: 220px; border-radius: 18px;
  background: rgba(10, 22, 40, .98);
  border: 1px solid var(--sg-border);
  box-shadow: var(--sg-shadow);
}
.sg-menu li:hover > .sub-menu { display: block; }
.sg-menu .sub-menu a { width: 100%; border-radius: 12px; }

.sg-header__actions { display: flex; align-items: center; gap: 10px; }
.sg-search-mini { position: relative; width: 240px; }
.sg-search-mini input {
  width: 100%; height: 44px; padding: 0 46px 0 16px;
  color: var(--sg-text); background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.08); border-radius: 999px; outline: 0;
}
.sg-search-mini input:focus { border-color: rgba(240, 198, 110, .45); box-shadow: 0 0 0 4px rgba(240, 198, 110, .08); }
.sg-search-mini button {
  position: absolute; right: 5px; top: 5px; width: 34px; height: 34px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--sg-gold-500); color: #07111f; font-weight: 900;
}
.sg-menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 14px;
  border: 1px solid var(--sg-border); background: rgba(255,255,255,.06);
  color: var(--sg-text); cursor: pointer;
}
.sg-menu-toggle span, .sg-menu-toggle:before, .sg-menu-toggle:after {
  content: ''; display: block; width: 18px; height: 2px; margin: 4px auto;
  background: currentColor; border-radius: 99px;
}

.sg-hero { padding: 58px 0 34px; }
.sg-hero__wrap {
  position: relative; overflow: hidden; border-radius: 34px;
  padding: clamp(28px, 5vw, 56px);
  background:
    linear-gradient(135deg, rgba(15, 32, 56, .96), rgba(11, 25, 45, .82)),
    radial-gradient(circle at 82% 20%, rgba(240, 198, 110, .26), transparent 24rem);
  border: 1px solid var(--sg-border); box-shadow: var(--sg-shadow);
}
.sg-hero__wrap:after {
  content: ''; position: absolute; inset: auto -70px -90px auto;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(240, 198, 110, .12); filter: blur(12px);
}
.sg-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  color: var(--sg-gold-300); background: rgba(240, 198, 110, .10);
  border: 1px solid rgba(240, 198, 110, .18);
  font-size: 13px; font-weight: 850;
}
.sg-hero h1 { max-width: 760px; margin: 18px 0 12px; font-size: clamp(32px, 5vw, 58px); line-height: 1.02; letter-spacing: -.06em; }
.sg-hero p { max-width: 680px; color: var(--sg-muted); margin: 0 0 24px; font-size: 17px; }
.sg-hero__search { max-width: 680px; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.sg-hero__search input {
  min-height: 58px; border: 1px solid rgba(255,255,255,.09); border-radius: 18px;
  background: rgba(255,255,255,.07); color: var(--sg-text); padding: 0 18px; outline: 0;
}
.sg-hero__search button, .sg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border: 0; border-radius: 16px; cursor: pointer;
  color: #07111f; background: linear-gradient(135deg, var(--sg-gold-300), var(--sg-gold-500));
  font-weight: 950; box-shadow: 0 14px 30px rgba(214, 165, 66, .22);
}
.sg-btn:hover, .sg-hero__search button:hover { transform: translateY(-1px); color: #07111f; }

.sg-section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 18px 0 18px; }
.sg-section-head h2, .page-title { margin: 0; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.04em; }
.sg-section-head p { margin: 6px 0 0; color: var(--sg-muted); }
.sg-category-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 22px; scrollbar-width: thin; }
.sg-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 9px 13px;
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.08);
  color: var(--sg-muted); font-weight: 800; font-size: 13px;
}
.sg-chip:hover { border-color: rgba(240, 198, 110, .32); background: rgba(240, 198, 110, .09); color: var(--sg-text); }
.sg-chip__count { color: var(--sg-gold-400); }

.sg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; padding-bottom: 56px; }
.sg-content { min-width: 0; }
.sg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.sg-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 100%;
  border-radius: var(--sg-radius-xl); background: var(--sg-card);
  border: 1px solid rgba(255,255,255,.075); box-shadow: 0 12px 35px rgba(0,0,0,.18);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.sg-card:hover { transform: translateY(-4px); border-color: rgba(240, 198, 110, .32); box-shadow: 0 20px 50px rgba(0,0,0,.28); }
.sg-card__media { aspect-ratio: 16 / 10; background: linear-gradient(135deg, rgba(214,165,66,.16), rgba(255,255,255,.04)); overflow: hidden; }
.sg-card__media img { width: 100%; height: 100%; object-fit: cover; }
.sg-card__body { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.sg-card__cat { color: var(--sg-gold-400); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.sg-card__title { margin: 0 0 8px; font-size: 16px; line-height: 1.35; letter-spacing: -.02em; }
.sg-card__excerpt { color: var(--sg-muted); font-size: 13px; line-height: 1.55; margin: 0 0 14px; }
.sg-card__meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--sg-muted); font-size: 12px; }
.sg-card__download {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; min-width: 88px; padding: 0 11px; border-radius: 999px;
  background: rgba(240, 198, 110, .11); color: var(--sg-gold-300); border: 1px solid rgba(240, 198, 110, .18);
  font-size: 12px; font-weight: 900;
}

.sg-sidebar { min-width: 0; }
.sg-widget, .widget {
  margin-bottom: 16px; padding: 20px; border-radius: var(--sg-radius-xl);
  background: rgba(15, 32, 56, .68); border: 1px solid rgba(255,255,255,.075);
  box-shadow: 0 12px 35px rgba(0,0,0,.16);
}
.sg-widget h2, .widget h2, .widget-title { margin: 0 0 14px; font-size: 18px; letter-spacing: -.03em; }
.widget ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.widget li a { color: var(--sg-muted); }
.widget li a:hover { color: var(--sg-gold-400); }

.sg-pagination { margin-top: 26px; }
.sg-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-pagination .page-numbers {
  display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px;
  border-radius: 14px; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.055); color: var(--sg-muted); font-weight: 850;
}
.sg-pagination .current, .sg-pagination a:hover { background: var(--sg-gold-500); color: #07111f; }

.sg-single { padding: 46px 0 62px; }
.sg-single__hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start;
}
.sg-single__main, .sg-download-panel, .comments-area {
  border-radius: 28px; background: rgba(15, 32, 56, .76);
  border: 1px solid rgba(255,255,255,.075); box-shadow: var(--sg-shadow);
}
.sg-single__main { overflow: hidden; }
.sg-single__image { aspect-ratio: 16 / 8; overflow: hidden; background: rgba(255,255,255,.05); }
.sg-single__image img { width: 100%; height: 100%; object-fit: cover; }
.sg-single__content { padding: clamp(20px, 4vw, 34px); }
.sg-single h1 { margin: 0 0 12px; font-size: clamp(30px, 5vw, 50px); line-height: 1.08; letter-spacing: -.06em; }
.sg-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--sg-muted); font-size: 13px; margin-bottom: 18px; }
.sg-entry-content { color: #dce5f4; }
.sg-entry-content a { color: var(--sg-gold-400); text-decoration: underline; text-underline-offset: 4px; }
.sg-entry-content h2, .sg-entry-content h3 { letter-spacing: -.04em; }
.sg-entry-content pre { overflow: auto; padding: 16px; border-radius: 16px; background: #06101d; border: 1px solid rgba(255,255,255,.08); }
.sg-download-panel { padding: 20px; position: sticky; top: 112px; }
.admin-bar .sg-download-panel { top: 144px; }
.sg-download-panel h2 { margin: 0 0 14px; font-size: 20px; }
.sg-info-list { display: grid; gap: 10px; margin: 0 0 16px; }
.sg-info-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.07); color: var(--sg-muted); font-size: 14px; }
.sg-info-row strong { color: var(--sg-text); }
.sg-download-panel .sg-btn { width: 100%; min-height: 52px; }
.sg-note { margin: 14px 0 0; color: var(--sg-muted); font-size: 12px; }

.sg-footer { border-top: 1px solid rgba(255,255,255,.07); background: rgba(5, 12, 22, .7); padding: 36px 0 22px; color: var(--sg-muted); }
.sg-footer__grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 22px; }
.sg-footer h3 { margin: 0 0 12px; color: var(--sg-text); }
.sg-footer a { color: var(--sg-muted); }
.sg-footer a:hover { color: var(--sg-gold-400); }
.sg-footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; margin-top: 24px; border-top: 1px solid rgba(255,255,255,.07); font-size: 13px; }

.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-field { width: 100%; min-height: 44px; border: 1px solid rgba(255,255,255,.10); border-radius: 14px; background: rgba(255,255,255,.06); color: var(--sg-text); padding: 0 12px; }
.search-submit { border: 0; border-radius: 14px; background: var(--sg-gold-500); color: #07111f; font-weight: 900; padding: 0 14px; cursor: pointer; }

@media (max-width: 980px) {
  .admin-bar .sg-header { top: 0; }
  .sg-menu-toggle { display: inline-block; }
  .sg-nav {
    display: none; position: absolute; left: 16px; right: 16px; top: calc(100% + 10px);
    border: 1px solid var(--sg-border); border-radius: 22px; background: rgba(7,17,31,.98);
    box-shadow: var(--sg-shadow); padding: 12px;
  }
  .sg-nav.is-open { display: block; }
  .sg-menu { flex-direction: column; align-items: stretch; }
  .sg-menu a { width: 100%; justify-content: space-between; }
  .sg-menu .sub-menu { position: static; display: block; min-width: 0; background: transparent; border: 0; box-shadow: none; padding: 0 0 0 14px; }
  .sg-search-mini { display: none; }
  .sg-layout, .sg-single__hero, .sg-footer__grid { grid-template-columns: 1fr; }
  .sg-download-panel { position: static; }
}
@media (max-width: 620px) {
  .sg-topline { display: none; }
  .sg-header__inner { min-height: 70px; }
  .sg-brand__tagline { display: none; }
  .sg-hero { padding-top: 28px; }
  .sg-hero__search { grid-template-columns: 1fr; }
  .sg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .sg-card__body { padding: 12px; }
  .sg-card__excerpt { display: none; }
  .sg-footer__bottom { flex-direction: column; align-items: start; }
}
@media (max-width: 390px) {
  .sg-grid { grid-template-columns: 1fr; }
}
