/*
Theme Name: AL-HARMAIN
Theme URI: https://al-harmain.com
Author: AL-HARMAIN
Description: Gulf Job Portal Theme — clean, fast, Elementor-ready.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: alharmain
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --ah-navy:       #061A42;
  --ah-blue:       #0A2E6E;
  --ah-mid:        #1346A3;
  --ah-accent:     #1E6FD9;
  --ah-accent-h:   #155EC0;
  --ah-gold:       #C9A84C;
  --ah-gold-h:     #B8943E;
  --ah-white:      #FFFFFF;
  --ah-off:        #F5F7FC;
  --ah-bg:         #EEF3FB;
  --ah-border:     #D8E2F5;
  --ah-text:       #1A1F2E;
  --ah-muted:      #5A6478;
  --ah-light:      #8A93A8;
  --ah-success:    #0F9058;
  --ah-warning:    #E07B00;
  --ah-danger:     #D63031;

  --ah-font:       'DM Sans', 'Segoe UI', sans-serif;
  --ah-heading:    'Playfair Display', Georgia, serif;

  --ah-r-sm:   4px;
  --ah-r-md:   8px;
  --ah-r-lg:   12px;
  --ah-r-xl:   18px;
  --ah-r-pill: 999px;

  --ah-shadow-sm:  0 1px 4px rgba(10,46,110,.07);
  --ah-shadow-md:  0 4px 20px rgba(10,46,110,.11);
  --ah-shadow-lg:  0 12px 40px rgba(10,46,110,.15);

  --ah-t:  .22s ease;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html                    { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body                    { font-family: var(--ah-font); font-size: 1rem; line-height: 1.65; color: var(--ah-text); background: var(--ah-white); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video              { max-width: 100%; height: auto; display: block; }
a                       { color: var(--ah-accent); text-decoration: none; transition: color var(--ah-t); }
a:hover                 { color: var(--ah-blue); }
ul, ol                  { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4, h5, h6 { font-family: var(--ah-heading); font-weight: 700; line-height: 1.22; color: var(--ah-navy); }

/* ============================================================
   LAYOUT
   ============================================================ */
.ah-container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ============================================================
   SKIP LINK
   ============================================================ */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--ah-blue); color: #fff;
  padding: 8px 16px; border-radius: var(--ah-r-md);
  z-index: 10000; transition: top var(--ah-t);
}
.skip-link:focus { top: 16px; }

/* ============================================================
   TOPBAR
   ============================================================ */
.ah-topbar {
  background: var(--ah-navy);
  padding: 7px 0;
  font-size: .78rem;
  color: rgba(255,255,255,.65);
}
.ah-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ah-topbar-left { display: flex; align-items: center; gap: 22px; }
.ah-topbar a {
  color: rgba(255,255,255,.65);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color var(--ah-t);
}
.ah-topbar a:hover { color: #fff; }

/* ============================================================
   HEADER
   ============================================================ */
#ah-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--ah-white);
  border-bottom: 1px solid var(--ah-border);
  box-shadow: var(--ah-shadow-sm);
  transition: box-shadow var(--ah-t);
}
#ah-header.scrolled { box-shadow: var(--ah-shadow-md); }

.ah-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

/* ── Logo ── */
.ah-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.ah-logo-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--ah-blue), var(--ah-accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--ah-heading); font-weight: 800; font-size: 1rem;
}
.ah-logo-name { font-family: var(--ah-heading); font-size: 1.2rem; font-weight: 700; color: var(--ah-blue); letter-spacing: -.02em; display: block; line-height: 1.1; }
.ah-logo-tag  { font-size: .58rem; font-weight: 600; color: var(--ah-gold); letter-spacing: .12em; text-transform: uppercase; display: block; }

/* ── Primary Nav ── */
.ah-nav { display: flex; align-items: center; gap: 2px; }
.ah-nav a {
  font-size: .875rem; font-weight: 500; color: var(--ah-text);
  padding: 7px 13px; border-radius: var(--ah-r-md);
  transition: all var(--ah-t); white-space: nowrap;
}
.ah-nav a:hover,
.ah-nav a.active { color: var(--ah-accent); background: var(--ah-bg); }

/* Dropdown */
.ah-dropdown { position: relative; }
.ah-dropdown > a::after { content: '▾'; margin-left: 3px; font-size: .65rem; }
.ah-drop-menu {
  display: none;
  position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--ah-white);
  border: 1px solid var(--ah-border);
  border-radius: var(--ah-r-lg);
  box-shadow: var(--ah-shadow-lg);
  min-width: 196px; overflow: hidden; z-index: 200;
}
.ah-dropdown:hover .ah-drop-menu { display: block; }
.ah-drop-menu a {
  display: block; padding: 9px 18px;
  font-size: .84rem; color: var(--ah-text);
  border-bottom: 1px solid var(--ah-border);
  transition: all var(--ah-t);
  border-radius: 0;
}
.ah-drop-menu a:last-child { border-bottom: none; }
.ah-drop-menu a:hover    { background: var(--ah-bg); color: var(--ah-accent); }

/* ── Header Buttons ── */
.ah-header-btns { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Mobile Toggle ── */
.ah-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; flex-direction: column; gap: 5px;
}
.ah-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--ah-blue); border-radius: 2px;
  transition: all var(--ah-t);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.ah-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 20px; font-size: .875rem; font-weight: 700;
  border-radius: var(--ah-r-md); border: 2px solid transparent;
  cursor: pointer; transition: all var(--ah-t);
  text-decoration: none; white-space: nowrap; line-height: 1;
  font-family: var(--ah-font);
}
.ah-btn-primary  { background: var(--ah-accent); color: #fff; border-color: var(--ah-accent); }
.ah-btn-primary:hover  { background: var(--ah-accent-h); border-color: var(--ah-accent-h); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(30,111,217,.28); }
.ah-btn-outline  { background: transparent; color: var(--ah-blue); border-color: var(--ah-blue); }
.ah-btn-outline:hover  { background: var(--ah-blue); color: #fff; transform: translateY(-1px); }
.ah-btn-gold     { background: var(--ah-gold); color: #fff; border-color: var(--ah-gold); }
.ah-btn-gold:hover     { background: var(--ah-gold-h); border-color: var(--ah-gold-h); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(201,168,76,.3); }
.ah-btn-ghost    { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.ah-btn-ghost:hover    { background: rgba(255,255,255,.1); color: #fff; transform: translateY(-1px); }
.ah-btn-sm  { padding: 7px 16px; font-size: .8rem; }
.ah-btn-lg  { padding: 13px 32px; font-size: 1rem; border-radius: 10px; }
.ah-btn-xl  { padding: 16px 44px; font-size: 1.05rem; border-radius: 11px; }

/* ============================================================
   PAGE HERO BANNER (inner pages)
   ============================================================ */
.ah-page-hero {
  background: linear-gradient(135deg, var(--ah-navy) 0%, var(--ah-blue) 55%, var(--ah-mid) 100%);
  padding: 48px 0 58px;
  position: relative; overflow: hidden;
}
.ah-page-hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(30,111,217,.18) 0%, transparent 55%),
    radial-gradient(circle at 85% 20%, rgba(201,168,76,.1) 0%, transparent 45%);
  pointer-events: none;
}
.ah-page-hero::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 44px; background: var(--ah-off);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.ah-page-hero-inner { position: relative; z-index: 1; }
.ah-page-hero h1 {
  font-family: var(--ah-heading);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800; color: #fff;
  margin-bottom: 8px; line-height: 1.18;
}
.ah-page-hero h1 em  { color: var(--ah-gold); font-style: normal; }
.ah-page-hero p      { color: rgba(255,255,255,.72); font-size: .95rem; max-width: 540px; }
.ah-page-hero-row    { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ah-page-hero-actions{ display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }

/* Breadcrumb */
.ah-crumb { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: rgba(255,255,255,.55); margin-bottom: 13px; }
.ah-crumb a { color: rgba(255,255,255,.75); }
.ah-crumb a:hover { color: #fff; }
.ah-crumb span { color: rgba(255,255,255,.35); }

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.ah-sec-head { text-align: center; max-width: 580px; margin-inline: auto; margin-bottom: 48px; }
.ah-sec-label { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ah-accent); margin-bottom: 9px; }
.ah-sec-title { font-family: var(--ah-heading); font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--ah-navy); margin-bottom: 13px; line-height: 1.2; }
.ah-sec-desc  { font-size: .97rem; color: var(--ah-muted); line-height: 1.72; }

/* White variants */
.ah-sec-head.white .ah-sec-label { color: var(--ah-gold); }
.ah-sec-head.white .ah-sec-title { color: #fff; }
.ah-sec-head.white .ah-sec-desc  { color: rgba(255,255,255,.68); }

/* ============================================================
   FOOTER
   ============================================================ */
#ah-footer { background: var(--ah-navy); color: rgba(255,255,255,.7); }

.ah-footer-top  { padding: 68px 0 44px; border-bottom: 1px solid rgba(255,255,255,.1); }
.ah-footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1.3fr; gap: 44px; }

.ah-footer-logo-name { color: #fff !important; }
.ah-footer-desc { font-size: .875rem; line-height: 1.72; margin-top: 14px; max-width: 280px; color: rgba(255,255,255,.58); }

.ah-footer-head  { font-size: .78rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 17px; }
.ah-footer-links { display: flex; flex-direction: column; gap: 10px; }
.ah-footer-links a { font-size: .875rem; color: rgba(255,255,255,.58); transition: color var(--ah-t); }
.ah-footer-links a:hover { color: #fff; }

.ah-social-row { display: flex; gap: 8px; margin-top: 17px; }
.ah-social-btn {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6); font-size: .82rem;
  transition: all var(--ah-t); text-decoration: none;
}
.ah-social-btn:hover { background: var(--ah-accent); border-color: var(--ah-accent); color: #fff; transform: translateY(-2px); }

.ah-contact-item { display: flex; gap: 9px; font-size: .875rem; color: rgba(255,255,255,.58); margin-bottom: 10px; align-items: flex-start; }
.ah-contact-item svg { color: var(--ah-accent); flex-shrink: 0; margin-top: 2px; }
.ah-contact-item a { color: rgba(255,255,255,.58); }
.ah-contact-item a:hover { color: #fff; }

.ah-footer-bottom { padding: 18px 0; display: flex; align-items: center; justify-content: space-between; font-size: .78rem; color: rgba(255,255,255,.38); flex-wrap: wrap; gap: 10px; }
.ah-footer-bottom a { color: rgba(255,255,255,.45); }
.ah-footer-bottom a:hover { color: #fff; }
.ah-footer-btm-links { display: flex; gap: 18px; }

/* ============================================================
   WHATSAPP FAB
   ============================================================ */
.ah-wa-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  transition: all var(--ah-t); text-decoration: none;
}
.ah-wa-fab:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,.55); color: #fff; }

/* ============================================================
   FORMS
   ============================================================ */
.ah-form-group { margin-bottom: 18px; }
.ah-label { display: block; font-size: .84rem; font-weight: 600; color: var(--ah-text); margin-bottom: 6px; }
.ah-label .req { color: var(--ah-accent); }
.ah-input, .ah-select, .ah-textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--ah-border); border-radius: var(--ah-r-md);
  font-size: .88rem; color: var(--ah-text);
  background: #fff; outline: none;
  font-family: var(--ah-font);
  transition: border-color var(--ah-t), box-shadow var(--ah-t);
}
.ah-input:focus, .ah-select:focus, .ah-textarea:focus {
  border-color: var(--ah-accent);
  box-shadow: 0 0 0 3px rgba(30,111,217,.1);
}
.ah-input::placeholder { color: var(--ah-light); }
.ah-textarea { resize: vertical; min-height: 120px; }

/* ============================================================
   ALERTS
   ============================================================ */
.ah-alert { padding: 12px 16px; border-radius: var(--ah-r-md); font-size: .88rem; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px; }
.ah-alert-success { background: #F0FFF8; color: var(--ah-success); border-left: 3px solid var(--ah-success); }
.ah-alert-warning { background: #FFF4E5; color: var(--ah-warning); border-left: 3px solid var(--ah-warning); }
.ah-alert-danger  { background: #FFEEEE; color: var(--ah-danger);  border-left: 3px solid var(--ah-danger); }
.ah-alert-info    { background: #EEF5FF; color: var(--ah-accent);  border-left: 3px solid var(--ah-accent); }

/* ============================================================
   PAGINATION
   ============================================================ */
.ah-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.ah-page-btn {
  min-width: 36px; height: 36px; padding: 0 8px;
  border-radius: var(--ah-r-md); border: 1.5px solid var(--ah-border);
  background: #fff; font-size: .84rem; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--ah-t); font-family: var(--ah-font);
}
.ah-page-btn:hover,
.ah-page-btn.active { background: var(--ah-accent); border-color: var(--ah-accent); color: #fff; }

/* ============================================================
   WP CORE COMPAT
   ============================================================ */
.alignleft  { float: left; margin-right: 24px; }
.alignright { float: right; margin-left: 24px; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption  { max-width: 100%; }
.screen-reader-text { clip: rect(1px,1px,1px,1px); position: absolute !important; height: 1px; width: 1px; overflow: hidden; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .ah-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .ah-nav { display: none; }
  .ah-nav.open {
    display: flex; flex-direction: column;
    position: fixed; inset: 68px 0 0 0;
    background: #fff; padding: 16px; z-index: 999;
    overflow-y: auto; box-shadow: var(--ah-shadow-lg);
    gap: 2px;
  }
  .ah-nav.open a { padding: 12px 14px; border-bottom: 1px solid var(--ah-border); font-size: .95rem; border-radius: 0; }
  .ah-toggle { display: flex; }
  .ah-header-btns .ah-btn-outline { display: none; }
  .ah-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .ah-footer-bottom { flex-direction: column; text-align: center; }
  .ah-footer-btm-links { flex-wrap: wrap; justify-content: center; }
  .ah-page-hero-row { flex-direction: column; }
}

@media (max-width: 480px) {
  .ah-container { padding-inline: 16px; }
}
