/*
Theme Name: Hagar Theme
Theme URI: https://hagarhosny.com.co
Author: Hagar Hosny Gad
Author URI: https://hagarhosny.com.co
Description: Personal portfolio theme for WordPress developer, AI & automation specialist. Teal & yellow brand.
Version: 1.0.0
License: GPL v2 or later
Text Domain: hagar-theme
*/

/* ─── Variables ────────────────────────────────────────────────────────────── */
:root {
  --teal:        #0D6B5E;
  --teal-dark:   #094f45;
  --teal-light:  #1a8a7a;
  --yellow:      #FFD200;
  --yellow-dim:  #e6bc00;
  --dark:        #080f0e;
  --card:        #0f1f1c;
  --card-hover:  #162e29;
  --border:      #1e3f39;
  --text:        #e8f0ef;
  --muted:       #7ab3ab;
  --radius:      14px;
  --radius-sm:   8px;
}

/* ─── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--dark); color: var(--text); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--yellow); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ─── Typography ────────────────────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { color: var(--text); line-height: 1.2; }
h1 { font-size: clamp(32px, 5vw, 60px); font-weight: 900; }
h2 { font-size: clamp(24px, 3.5vw, 38px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p  { color: var(--muted); line-height: 1.7; }

/* ─── Layout ────────────────────────────────────────────────────────────────── */
.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section--alt { background: #060e0c; }

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; border: none; transition: opacity .2s, transform .15s; }
.btn:hover { opacity: .85; transform: translateY(-1px); }
.btn-primary { background: var(--yellow); color: var(--teal-dark); }
.btn-teal    { background: var(--teal); color: var(--yellow); }
.btn-ghost   { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-sm      { padding: 7px 16px; font-size: 13px; }

/* ─── Tag / Badge ────────────────────────────────────────────────────────────── */
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--teal-dark); color: var(--yellow); border: 1px solid var(--border); }

/* ─── Section Heading ────────────────────────────────────────────────────────── */
.section-heading        { text-align: center; margin-bottom: 48px; }
.section-heading h2     { margin-bottom: 10px; }
.section-heading .rule  { width: 48px; height: 3px; background: var(--yellow); border-radius: 999px; margin: 0 auto 12px; }
.section-heading p      { font-size: 14px; max-width: 500px; margin: 0 auto; }

/* ─── Card ────────────────────────────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: border-color .2s, transform .2s, box-shadow .2s; display: flex; flex-direction: column; gap: 12px; }
.card:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(13,107,94,.15); }
.card__icon   { width: 44px; height: 44px; border-radius: 10px; background: var(--teal-dark); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.card__title  { font-size: 15px; font-weight: 700; color: var(--text); }
.card__sub    { font-size: 12px; color: var(--teal-light); margin-top: 2px; }
.card__desc   { font-size: 13px; color: var(--muted); line-height: 1.7; flex: 1; }
.card__meta   { font-size: 12px; color: var(--muted); }
.card__tags   { display: flex; flex-wrap: wrap; gap: 6px; }
.card__actions{ display: flex; gap: 8px; margin-top: 4px; }
.card__actions .btn { flex: 1; justify-content: center; }
.card__version{ font-size: 11px; font-family: monospace; padding: 2px 10px; border-radius: 999px; background: var(--teal-dark); color: var(--yellow); }

/* ─── Grid ────────────────────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════════════════════════════ */
#site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; background: rgba(8,15,14,.96); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.site-logo { display: flex; align-items: center; gap: 12px; }
.site-logo__text .name  { font-size: 14px; font-weight: 700; color: var(--text); }
.site-logo__text .role  { font-size: 11px; color: var(--muted); }
#primary-nav { display: flex; align-items: center; gap: 4px; }
#primary-nav a { font-size: 13px; color: var(--muted); padding: 6px 12px; border-radius: var(--radius-sm); transition: color .2s, background .2s; }
#primary-nav a:hover, #primary-nav a.current-menu-item { color: var(--yellow); background: var(--teal-dark); opacity: 1; }
.nav-cv-btn { margin-left: 12px !important; background: var(--yellow) !important; color: var(--teal-dark) !important; font-weight: 700 !important; border-radius: var(--radius-sm) !important; }
.nav-cv-btn:hover { opacity: .85 !important; }

/* ── Get in Touch button ─────────────────────────────────────────────────────── */
a.btn-get-in-touch,
.btn-get-in-touch {
    display: inline-flex !important;
    align-items: center !important;
    margin-left: 10px;
    padding: 9px 20px !important;
    border-radius: var(--radius-sm) !important;
    background: var(--yellow) !important;   /* yellow — same as logo */
    color: #fff !important;                 /* white bold text */
    font-weight: 700 !important;
    font-size: 13px !important;
    letter-spacing: .02em;
    text-shadow: 0 1px 3px rgba(0,0,0,.4);
    border: none !important;
    outline: none !important;
    box-shadow: none;
    transition: background .2s, transform .15s, box-shadow .2s;
    white-space: nowrap;
    text-decoration: none !important;
    opacity: 1 !important;
    cursor: pointer;
}
a.btn-get-in-touch:hover,
.btn-get-in-touch:hover {
    background: var(--yellow-dim) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255,210,0,.3) !important;
    opacity: 1 !important;
    text-decoration: none !important;
}

#hamburger { display: none; background: none; border: none; color: var(--muted); font-size: 22px; }
#mobile-nav { display: none; flex-direction: column; gap: 4px; padding: 12px 20px 20px; background: var(--card); border-bottom: 1px solid var(--border); position: fixed; top: 64px; left: 0; right: 0; z-index: 99; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
#mobile-nav.open { display: flex; }
#mobile-nav a { color: var(--muted); font-size: 14px; padding: 8px 12px; border-radius: var(--radius-sm); }
#mobile-nav a:hover { color: var(--yellow); background: var(--teal-dark); opacity: 1; }
.site-main { padding-top: 64px; }

@media (max-width: 768px) {
  #primary-nav { display: none; }
  #hamburger   { display: block; }
  /* Hide desktop Get in Touch — it appears in mobile nav instead */
  #site-header .btn-get-in-touch { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════════════════════ */
.hero { min-height: calc(100vh - 64px); display: flex; align-items: center; background: radial-gradient(ellipse at 65% 50%, var(--teal-dark) 0%, var(--dark) 70%); position: relative; overflow: hidden; padding: 60px 0; }
.hero__glow-y { position: absolute; top: 8%; right: 4%; width: 300px; height: 300px; border-radius: 50%; background: var(--yellow); opacity: .04; filter: blur(80px); pointer-events: none; }
.hero__glow-t { position: absolute; bottom: 12%; left: 3%; width: 240px; height: 240px; border-radius: 50%; background: var(--teal); opacity: .08; filter: blur(60px); pointer-events: none; }
.hero__inner  { display: flex; align-items: center; gap: 64px; }
.hero__content{ flex: 1; }
.hero__badge  { display: inline-block; margin-bottom: 16px; padding: 4px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--yellow); }
.hero__name   { font-size: clamp(38px, 6vw, 68px); font-weight: 900; color: var(--text); line-height: 1.05; margin-bottom: 14px; }
.hero__name span { color: var(--yellow); }
.hero__subtitle { font-size: 16px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.hero__desc   { font-size: 14px; color: var(--muted); line-height: 1.75; max-width: 420px; margin-bottom: 32px; }
.hero__ctas   { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.hero__stats  { display: flex; gap: 40px; }
.hero__stat-num { font-size: 28px; font-weight: 900; color: var(--yellow); }
.hero__stat-lbl { font-size: 12px; color: var(--muted); }
.hero__logo   { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 20px; }

/* ── Layered logo design matching brand screenshot ────────────────────────── */
.hero__logo-wrap {
    position: relative;
    display: inline-block;
    /* Outer glow: teal soft ring */
    filter: drop-shadow(0 0 28px rgba(13,107,94,.55)) drop-shadow(0 4px 18px rgba(0,0,0,.45));
    animation: logo-float 4s ease-in-out infinite;
}
@keyframes logo-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

/* Outer layer: dark teal rounded border (the green ring in the screenshot) */
.hero__logo-wrap::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 52px;
    background: var(--teal-dark);
    border: 2px solid rgba(26,138,122,.55);
    z-index: 0;
}
/* Middle layer: lighter teal highlight border */
.hero__logo-wrap::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 46px;
    background: transparent;
    border: 2px solid rgba(26,138,122,.35);
    z-index: 0;
}

.hero__logo-wrap img.hagar-logo-img {
    position: relative;
    z-index: 1;
    width: 280px !important;
    height: auto !important;         /* respect logo's natural proportions */
    min-width: 280px !important;
    min-height: unset !important;
    max-width: 280px !important;
    max-height: none !important;     /* override the generic 36px cap */
    border-radius: 40px !important;
    display: block !important;
    object-fit: unset;
}

/* Social links below the logo */
.hero__social { display: flex; gap: 12px; justify-content: center; }
.hero__social a {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--muted);
    transition: background .2s, border-color .2s, color .2s, transform .15s;
    text-decoration: none;
}
.hero__social a:hover {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--yellow);
    transform: translateY(-2px);
    opacity: 1;
}
.hero__social svg { width: 18px; height: 18px; fill: currentColor; }

@media (max-width: 768px) {
  .hero__inner { flex-direction: column; text-align: center; }
  .hero__logo  { order: -1; }
  .hero__desc  { margin-left: auto; margin-right: auto; }
  .hero__ctas  { justify-content: center; }
  .hero__stats { justify-content: center; }
  .hero__logo-wrap img.hagar-logo-img { width: 200px !important; height: auto !important; min-width: 200px !important; min-height: unset !important; max-width: 200px !important; max-height: none !important; border-radius: 30px !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SKILLS
═══════════════════════════════════════════════════════════════════════════════ */
.skills-grid .card:hover .card__title { color: var(--yellow); }

/* ═══════════════════════════════════════════════════════════════════════════════
   PROJECTS FILTER (from plugin)
═══════════════════════════════════════════════════════════════════════════════ */
.projects-filter-container  {}
.projects-filter-buttons    { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-btn { padding: 7px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--border); background: transparent; color: var(--muted); transition: all .2s; cursor: pointer; }
.filter-btn:hover, .filter-btn.active { background: var(--teal); color: var(--yellow); border-color: var(--teal); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.project-item  { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, transform .2s, box-shadow .2s; }
.project-item:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(13,107,94,.15); }
.project-thumbnail img { width: 100%; height: 180px; object-fit: cover; }
.project-content { padding: 20px; }
.project-content h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.project-excerpt  { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 8px; }
.project-location { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.project-categories { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.category-badge  { display: inline-block; font-size: 11px; padding: 2px 10px; border-radius: 999px; background: var(--teal-dark); color: var(--yellow); border: 1px solid var(--border); font-weight: 600; }
.view-project { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--yellow); }
.view-project::after { content: ' →'; }

/* ═══════════════════════════════════════════════════════════════════════════════
   SINGLE PROJECT (from plugin template)
═══════════════════════════════════════════════════════════════════════════════ */
.single-project-wrapper { max-width: 1060px; margin: 0 auto; padding: 40px 24px 80px; overflow: hidden; }
.project-hero { margin-bottom: 40px; border-radius: var(--radius); overflow: hidden; }
.project-hero img { width: 100%; max-height: 480px; object-fit: cover; }
.project-header { margin-bottom: 32px; }
.project-title  { font-size: clamp(24px, 4vw, 42px); margin-bottom: 12px; }
.project-meta-categories { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-category   { display: inline-block; font-size: 12px; padding: 4px 12px; border-radius: 999px; background: var(--teal-dark); color: var(--yellow); border: 1px solid var(--border); font-weight: 600; }
.project-content-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.project-description { font-size: 15px; color: var(--muted); line-height: 1.8; }
.project-description p    { margin-bottom: 16px; }
.project-description h2   { color: var(--text); margin-bottom: 12px; margin-top: 28px; }
.gallery-title  { font-size: 20px; margin: 32px 0 16px; }
.project-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gallery-item   { border-radius: var(--radius-sm); overflow: hidden; position: relative; }
.gallery-item img { width: 100%; height: 160px; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay { position: absolute; inset: 0; background: rgba(13,107,94,.6); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-icon    { font-size: 32px; color: var(--yellow); font-weight: 300; }
.project-details-box, .project-share-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.details-title   { font-size: 14px; font-weight: 700; color: var(--yellow); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em; }
.detail-item     { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.detail-item:last-child { border-bottom: none; }
.detail-label    { font-size: 11px; font-weight: 700; color: var(--teal-light); text-transform: uppercase; letter-spacing: .05em; }
.detail-value    { font-size: 13px; color: var(--muted); }
.share-buttons   { display: flex; gap: 10px; }
.share-btn       { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 8px; background: var(--teal-dark); color: var(--yellow); transition: background .2s; }
.share-btn:hover { background: var(--teal); opacity: 1; }
.project-navigation { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); }
.nav-links {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.nav-previous, .nav-next {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    flex: 1;
    min-width: 0;           /* prevent flex children from overflowing */
    transition: border-color .2s;
}
.nav-previous:hover, .nav-next:hover { border-color: var(--teal); opacity: 1; }
.nav-next { justify-content: flex-end; text-align: right; }
.nav-all {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    flex-shrink: 0;
    transition: border-color .2s;
}
.nav-all:hover { border-color: var(--teal); opacity: 1; }
.nav-grid-icon { font-size: 22px; color: var(--teal-light); }
.nav-title     { font-weight: 700; color: var(--text); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.nav-label     { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; display: block; }
.nav-text      { min-width: 0; overflow: hidden; }
.nav-arrow     { font-size: 18px; color: var(--teal-light); flex-shrink: 0; }

@media (max-width: 768px) {
  .project-content-grid { grid-template-columns: 1fr; }
  .project-sidebar { order: -1; }
  /* Stack nav buttons vertically on very small screens */
  .nav-links { flex-direction: column; }
  .nav-next  { justify-content: flex-start; text-align: left; }
  .nav-all   { flex-direction: row; gap: 8px; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PLUGIN SINGLE PAGE
═══════════════════════════════════════════════════════════════════════════════ */
.single-hg-plugin { max-width: 1060px; margin: 0 auto; padding: 40px 24px 80px; }
.plugin-header   { margin-bottom: 32px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.plugin-title-area h1 { margin-bottom: 8px; }
.plugin-meta     { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.plugin-download-hero { flex-shrink: 0; }
.plugin-body     { display: grid; grid-template-columns: 1fr 280px; gap: 36px; align-items: start; }
.plugin-tabs     { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.plugin-tab      { padding: 10px 20px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; background: none; border-top: none; border-left: none; border-right: none; transition: color .2s, border-color .2s; }
.plugin-tab.active, .plugin-tab:hover { color: var(--yellow); border-bottom-color: var(--yellow); }
.plugin-tab-content { display: none; }
.plugin-tab-content.active { display: block; }
.plugin-tab-content p, .plugin-tab-content li { font-size: 14px; color: var(--muted); line-height: 1.75; }
.plugin-tab-content h3 { color: var(--yellow); font-size: 15px; margin-top: 20px; margin-bottom: 8px; }
.plugin-tab-content h4 { color: var(--teal-light); font-size: 13px; margin-top: 14px; margin-bottom: 6px; }
.plugin-tab-content ul { list-style: disc; padding-left: 20px; margin-bottom: 12px; }
.plugin-tab-content ol { list-style: decimal; padding-left: 20px; margin-bottom: 12px; }
.plugin-tab-content code { background: var(--teal-dark); color: var(--yellow); padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.plugin-sidebar-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.plugin-sidebar-box h3 { font-size: 13px; font-weight: 700; color: var(--yellow); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.plugin-detail-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.plugin-detail-row:last-child { border-bottom: none; }
.plugin-detail-row .key   { color: var(--teal-light); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.plugin-detail-row .value { color: var(--muted); }
@media (max-width: 768px) { .plugin-body { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════════════════════════════════
   WORKFLOW SINGLE PAGE
═══════════════════════════════════════════════════════════════════════════════ */
.single-hg-workflow { max-width: 860px; margin: 0 auto; padding: 40px 24px 80px; }
.workflow-header { margin-bottom: 36px; }
.workflow-icon-wrap { width: 64px; height: 64px; border-radius: 16px; background: var(--teal-dark); display: flex; align-items: center; justify-content: center; font-size: 30px; margin-bottom: 20px; border: 1px solid var(--border); }
.workflow-header h1 { margin-bottom: 10px; }
.workflow-meta    { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.workflow-node-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-family: monospace; padding: 4px 12px; border-radius: 8px; background: var(--teal-dark); color: var(--muted); border: 1px solid var(--border); }
.workflow-body    { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 24px; }
.workflow-body h3 { font-size: 14px; font-weight: 700; color: var(--yellow); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; margin-top: 20px; }
.workflow-body h3:first-child { margin-top: 0; }
.workflow-body p, .workflow-body li { font-size: 14px; color: var(--muted); line-height: 1.75; }
.workflow-body ul { list-style: disc; padding-left: 20px; margin-bottom: 12px; }
.workflow-body ol { list-style: decimal; padding-left: 20px; margin-bottom: 12px; }
.workflow-body code { background: var(--teal-dark); color: var(--yellow); padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.workflow-download-box { background: linear-gradient(135deg, var(--teal-dark), var(--dark)); border: 1px solid var(--teal); border-radius: var(--radius); padding: 28px; text-align: center; }
.workflow-download-box h3 { color: var(--text); margin-bottom: 8px; }
.workflow-download-box p  { font-size: 13px; margin-bottom: 20px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   ARCHIVE PAGES
═══════════════════════════════════════════════════════════════════════════════ */
.archive-header { padding: 60px 0 40px; text-align: center; }
.archive-header h1 { margin-bottom: 10px; }
.archive-header .rule { width: 48px; height: 3px; background: var(--yellow); border-radius: 999px; margin: 0 auto 12px; }
.archive-header p { font-size: 14px; }

/* Theme preview placeholder in theme card */
.theme-preview { width: 100%; height: 130px; border-radius: 10px; background: linear-gradient(135deg, var(--teal-dark), var(--dark)); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════════════════════ */
#site-footer { background: var(--teal-dark); border-top: 1px solid var(--border); padding: 56px 28px 28px; }
.footer-inner { max-width: 1060px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand__text .name { font-size: 15px; font-weight: 700; color: var(--text); }
.footer-brand__text .role { font-size: 12px; color: var(--muted); }
.footer-contact { text-align: right; }
.footer-contact > a { display: block; font-size: 13px; margin-bottom: 5px; }
.footer-contact > a:first-child { color: var(--yellow); }

/* ── Footer social icons: always one horizontal row ── */
div.footer-social {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    justify-content: flex-end;
    margin-top: 10px;
    align-items: center;
    width: auto;
}
div.footer-social a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    flex-shrink: 0 !important;
    border-radius: 10px !important;
    background: rgba(255, 210, 0, .12) !important;
    border: 1px solid rgba(255, 210, 0, .35) !important;
    color: var(--yellow) !important;
    margin-bottom: 0 !important;
    transition: background .2s, border-color .2s, transform .15s;
    text-decoration: none !important;
    opacity: 1 !important;
}
.footer-social a:hover {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--teal-dark);
    transform: translateY(-2px);
    opacity: 1 !important;
}
.footer-social svg {
    width: 17px !important;
    height: 17px !important;
    max-width: 17px !important;
    max-height: 17px !important;
    fill: #FFD200 !important;
    display: block;
    flex-shrink: 0;
}
.footer-social a:hover svg { fill: var(--teal-dark) !important; }
.footer-copyright { text-align: center; font-size: 12px; color: rgba(255,255,255,.65); padding-top: 20px; max-width: 1060px; margin: 0 auto; }

/* ─── Animations ────────────────────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.fade-up  { animation: fadeUp .5s ease both; }
.delay-1  { animation-delay: .1s; }
.delay-2  { animation-delay: .2s; }
.delay-3  { animation-delay: .3s; }
.delay-4  { animation-delay: .4s; }

/* ─── WordPress core classes ──────────────────────────────────────────────── */
.wp-block-image img, .aligncenter { max-width: 100%; }
.screen-reader-text { position: absolute; left: -9999px; }

/* ═══════════════════════════════════════════════════════════════════════════
   WOOCOMMERCE — GLOBAL OVERRIDES
═══════════════════════════════════════════════════════════════════════════ */
.woocommerce-page .site-main,
.woocommerce .site-main { padding-top: 64px; }

/* Notices */
.woocommerce-message, .woocommerce-info { background: var(--teal-dark); color: var(--yellow); border-left: 4px solid var(--yellow); padding: 14px 20px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 600; font-size: 14px; }
.woocommerce-error { background: #2d1515; color: #f87171; border-left: 4px solid #ef4444; padding: 14px 20px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.woocommerce-message a.button, .woocommerce-info a.button { background: var(--yellow); color: var(--teal-dark); padding: 6px 16px; border-radius: 6px; font-weight: 700; font-size: 13px; }

/* Form fields */
.woocommerce form .form-row label { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: block; font-weight: 600; }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select { width: 100%; background: var(--card); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; font-family: inherit; transition: border-color .2s; }
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,107,94,.15); }
.woocommerce form .form-row select option { background: var(--card); color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════════════
   CHECKOUT PAGE
═══════════════════════════════════════════════════════════════════════════ */
.hagar-checkout-wrap { max-width: 1060px; margin: 0 auto; padding: 48px 24px 80px; }

/* Progress Steps */
.hagar-checkout-steps { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 32px; }
.hagar-checkout-steps .step { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 80px; }
.hagar-checkout-steps .step-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 18px; transition: background .3s, box-shadow .3s; }
.hagar-checkout-steps .step.completed .step-icon { background: var(--teal); box-shadow: 0 0 0 3px rgba(13,107,94,.2); }
.hagar-checkout-steps .step.active .step-icon { background: var(--yellow); box-shadow: 0 0 0 4px rgba(255,210,0,.25); }
.hagar-checkout-steps .step-label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.hagar-checkout-steps .step.active .step-label { color: var(--yellow); }
.hagar-checkout-steps .step.completed .step-label { color: var(--teal-light); }
.hagar-checkout-steps .step-divider { flex: 1; height: 2px; background: var(--border); max-width: 60px; transition: background .3s; }
.hagar-checkout-steps .step-divider.completed { background: var(--teal); }

/* n8n notice */
.hagar-n8n-notice { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--teal); border-radius: var(--radius-sm); padding: 12px 18px; font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.n8n-icon { font-size: 20px; flex-shrink: 0; }
.hagar-n8n-notice strong { color: var(--yellow); }

/* Grid */
.hagar-checkout-grid { display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: start; }
@media (max-width: 860px) { .hagar-checkout-grid { grid-template-columns: 1fr; } }

/* Sections */
.hagar-checkout-section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.hagar-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.hagar-section-head .section-icon { font-size: 20px; }
.hagar-section-head h3 { font-size: 15px; font-weight: 700; color: var(--text); margin: 0; }

/* Order review table */
.woocommerce-checkout-review-order-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.woocommerce-checkout-review-order-table th { color: var(--yellow); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 0; border-bottom: 1px solid var(--border); font-weight: 700; }
.woocommerce-checkout-review-order-table td { padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.woocommerce-checkout-review-order-table .order-total td { color: var(--yellow); font-size: 16px; font-weight: 800; border-bottom: none; }
.woocommerce-checkout-review-order-table .order-total th { color: var(--yellow); }
.cart-subtotal td, .order-shipping td { font-size: 13px; color: var(--muted); }

/* Payment methods */
.woocommerce-checkout #payment { background: transparent !important; }
.woocommerce-checkout #payment ul.payment_methods { margin: 0 0 16px; padding: 0; }
.woocommerce-checkout #payment ul.payment_methods li { background: var(--dark); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 8px; list-style: none; transition: border-color .2s; }
.woocommerce-checkout #payment ul.payment_methods li:has(input:checked),
.woocommerce-checkout #payment ul.payment_methods li.active-payment { border-color: var(--teal); }
.woocommerce-checkout #payment ul.payment_methods label { color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; }
.woocommerce-checkout #payment div.payment_box { background: var(--teal-dark); border-radius: 6px; padding: 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }

/* Place order button */
.woocommerce-checkout #payment #place_order,
.woocommerce #payment #place_order { width: 100%; padding: 16px; background: var(--yellow); color: var(--teal-dark); border: none; border-radius: var(--radius-sm); font-size: 16px; font-weight: 800; cursor: pointer; transition: opacity .2s, transform .1s; letter-spacing: .02em; }
.woocommerce-checkout #payment #place_order:hover { opacity: .88; transform: translateY(-1px); }

/* Secure badges */
.hagar-secure-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.hagar-secure-badges span { font-size: 11px; color: var(--muted); background: var(--dark); border: 1px solid var(--border); padding: 4px 12px; border-radius: 999px; }

/* ═══════════════════════════════════════════════════════════════════════════
   THANK YOU PAGE
═══════════════════════════════════════════════════════════════════════════ */
.hagar-thankyou-wrap { max-width: 860px; margin: 0 auto; padding: 48px 24px 80px; }
.thankyou-state { text-align: center; }
.thankyou-icon { margin: 0 auto 24px; }
.thankyou-icon.success-icon svg { width: 80px; height: 80px; }
.thankyou-icon.failed-icon { font-size: 64px; }
.thankyou-state h2 { font-size: clamp(22px, 3.5vw, 36px); margin-bottom: 10px; }
.thankyou-sub { font-size: 15px; color: var(--muted); margin-bottom: 28px; }

/* SVG check animation */
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawTick   { to { stroke-dashoffset: 0; } }
.check-circle { stroke-dasharray: 176; stroke-dashoffset: 176; animation: drawCircle .7s ease forwards .2s; }
.check-tick   { stroke-dasharray: 50;  stroke-dashoffset: 50;  animation: drawTick   .5s ease forwards .9s; }

/* n8n automation banner */
.n8n-automation-banner { display: flex; align-items: center; gap: 16px; background: var(--teal-dark); border: 1px solid var(--teal); border-radius: var(--radius); padding: 18px 22px; margin: 0 auto 32px; max-width: 600px; text-align: left; }
.n8n-animation { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }
.n8n-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); animation: dotPulse 1.2s infinite; }
.n8n-dot:nth-child(2) { animation-delay: .2s; }
.n8n-dot:nth-child(3) { animation-delay: .4s; }
@keyframes dotPulse { 0%,100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
.n8n-text { font-size: 13px; color: var(--muted); }
.n8n-text strong { color: var(--yellow); font-size: 14px; display: block; margin-bottom: 3px; }

/* Thankyou steps */
.thankyou-steps { margin: 0 auto 36px; max-width: 540px; }

/* Details grid */
.thankyou-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 32px; text-align: left; }
@media (max-width: 600px) { .thankyou-details-grid { grid-template-columns: 1fr; } }
.thankyou-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.thankyou-card h3 { font-size: 14px; font-weight: 700; color: var(--yellow); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.detail-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.detail-row:last-child { border-bottom: none; }
.detail-row .key { color: var(--teal-light); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.detail-row .val { color: var(--muted); text-align: right; }
.total-highlight { color: var(--yellow) !important; font-weight: 800; font-size: 16px; }
.purchase-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.purchase-item:last-of-type { border-bottom: none; }
.purchase-item-name { color: var(--text); font-weight: 600; }
.purchase-item-qty  { color: var(--muted); font-size: 12px; margin-left: 6px; }
.purchase-item-price { color: var(--yellow); font-weight: 700; }

/* What happens next */
.thankyou-next { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: left; margin-bottom: 32px; }
.thankyou-next h3 { font-size: 15px; font-weight: 700; color: var(--yellow); margin-bottom: 16px; }
.next-steps { display: flex; flex-direction: column; gap: 14px; }
.next-step { display: flex; gap: 14px; align-items: flex-start; }
.next-step-num { width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: var(--yellow); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.next-step-info strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 3px; }
.next-step-info p { font-size: 12px; color: var(--muted); margin: 0; }
.thankyou-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ══════════════════════════════════════════════════════════════════════════════
   ELEMENTOR COMPATIBILITY
   ══════════════════════════════════════════════════════════════════════════════ */

/* Logo image (replaces SVG helper) */
.hagar-logo-img { width: auto; height: auto; max-height: 40px; display: block; border-radius: 8px; }

/* Let Elementor sections span full width */
.elementor-section.elementor-section-stretched { left: 0 !important; width: 100% !important; }

/* Canvas template: no body bg override needed */
body.elementor-template-canvas { background: transparent; }

/* Prevent theme's max-width from clipping Elementor full-width sections */
.elementor-full-width-content .elementor-section-wrap,
.elementor-full-width-content .elementor-section { max-width: 100%; }

/* Elementor editor admin bar offset */
body.elementor-editor-active #site-header { top: 32px; }

/* Fix Elementor Pro popup z-index against theme header */
.elementor-popup-modal { z-index: 99999 !important; }

/* Ensure Elementor icons render correctly (Eicons font) */
.eicon,
[class^="eicon-"],
[class*=" eicon-"] { font-family: eicons !important; }

/* Smooth Elementor section animations with theme's reveal */
.elementor-element { transition: opacity 0.4s ease, transform 0.4s ease; }

/* Elementor Forms: inherit theme button styles */
.elementor-button { background: var(--teal) !important; color: var(--yellow) !important; border-radius: var(--radius) !important; font-weight: 700 !important; }
.elementor-button:hover { background: var(--teal-dark) !important; }

/* Elementor heading color defaults for dark theme */
.elementor-heading-title { color: var(--text); }
.elementor-widget-text-editor p { color: var(--muted); }

/* ─── Logo image fix (replaces SVG) ────────────────────────────────────────── */
.hagar-logo-img { width: auto; height: 36px; max-height: 36px; border-radius: 8px; display: inline-block; object-fit: contain; }
/* Homepage hero logo — size/radius controlled in HERO section above */
/* Footer logo — hard-constrained so it never stretches */
.footer-brand .hagar-logo-img {
    width:  52px !important;
    height: 52px !important;
    max-width:  52px !important;
    max-height: 52px !important;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

/* Fix site-main padding when Elementor canvas is used */
body.elementor-template-canvas .site-main { padding-top: 0; }

/* Elementor editor: prevent dark bg from breaking editor iframe */
.elementor-edit-area { background: #fff !important; }

/* ── Project: View Live CTA ──────────────────────────────────────────────────── */
.project-live-cta { margin-bottom: 24px; }

.btn-live-site {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: var(--yellow);
    color: var(--teal-dark);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: background .2s, transform .15s, box-shadow .2s;
    letter-spacing: .01em;
    box-shadow: 0 4px 18px rgba(255,210,0,.2);
}

.btn-live-site:hover {
    background: var(--yellow-dim);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(255,210,0,.3);
    color: var(--teal-dark);
    opacity: 1;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    flex-shrink: 0;
    animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(13,107,94,.6); }
    50%       { box-shadow: 0 0 0 5px rgba(13,107,94,0); }
}

/* Project card: action row with 2 buttons */
.project-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.project-card-actions .view-project { flex: 1; text-align: center; }

/* ══════════════════════════════════════════════════════════════════════════════
   BRANDED BORDER SYSTEM — Hagar Theme
   All decorative, accent and interactive borders unified here.
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Border variables ────────────────────────────────────────────────────────── */
:root {
  --border-accent:      rgba(13,107,94,.55);   /* teal mid-opacity */
  --border-glow-teal:   0 0 0 1px var(--teal), 0 0 18px rgba(13,107,94,.22);
  --border-glow-yellow: 0 0 0 1px var(--yellow), 0 0 18px rgba(255,210,0,.18);
  --grad-teal-yellow:   linear-gradient(90deg, var(--teal), var(--yellow));
  --grad-yellow-teal:   linear-gradient(90deg, var(--yellow), var(--teal));
  --grad-fade-r:        linear-gradient(90deg, var(--teal) 0%, transparent 100%);
}

/* ── Header: yellow-to-teal gradient top line ─────────────────────────────────── */
#site-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-teal-yellow);
  border-radius: 0;
}
#site-header { position: fixed; }   /* ensure stacking context */

/* Header bottom border upgrade */
#site-header { border-bottom: 1px solid var(--border-accent); }

/* ── Nav active item: yellow bottom underline ────────────────────────────────── */
#primary-nav a.current-menu-item {
  border-bottom: 2px solid var(--yellow);
  border-radius: 0;
  padding-bottom: 4px;
}

/* ── Hero badge: teal glow border ────────────────────────────────────────────── */
.hero__badge {
  border: 1px solid var(--teal);
  box-shadow: 0 0 10px rgba(13,107,94,.25);
}

/* ── Hero logo: layered border handled by .hero__logo-wrap ::before/::after ── */
/* (styles are in the HERO section above) */

/* ── Section heading: yellow rule with fade ends ─────────────────────────────── */
.section-heading .rule {
  width: 56px;
  height: 3px;
  background: var(--grad-teal-yellow);
  border-radius: 999px;
  margin: 0 auto 14px;
  box-shadow: 0 0 8px rgba(255,210,0,.3);
}

/* Full-width decorative section divider */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--teal) 30%, var(--yellow) 60%, transparent 100%);
  margin: 0;
  border: none;
  opacity: .5;
}

/* ── Cards: left teal accent bar + hover teal glow ─────────────────────────────── */
.card {
  border-left: 3px solid var(--teal);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: -1px;
  width: 3px; height: 0;
  background: var(--yellow);
  border-radius: 3px 0 0 3px;
  transition: height .35s ease;
}

.card:hover::before { height: 100%; }

.card:hover {
  border-color: var(--teal);
  box-shadow: var(--border-glow-teal);
}

/* ── Skills card: yellow top line on hover ───────────────────────────────────── */
.skills-grid .card:hover {
  border-top-color: var(--yellow);
  box-shadow: 0 0 0 1px var(--yellow), 0 8px 32px rgba(255,210,0,.08);
}

/* ── Project items: teal left accent ────────────────────────────────────────── */
.project-item {
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
}
.project-item:hover {
  border-color: var(--teal);
  box-shadow: var(--border-glow-teal);
}

/* ── Plugin sidebar & details boxes: yellow top accent ──────────────────────── */
.project-details-box,
.project-share-box,
.plugin-sidebar-box {
  border-top: 2px solid var(--yellow);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ── Plugin tabs: underline indicator ────────────────────────────────────────── */
.plugin-tabs { border-bottom: 2px solid var(--border); }
.plugin-tab.active {
  border-bottom: 2px solid var(--yellow);
  box-shadow: 0 2px 0 var(--yellow);
}

/* ── Workflow cards: teal left bar + node badge border ───────────────────────── */
.workflow-body { border-left: 3px solid var(--teal); }
.workflow-icon-wrap {
  border: 2px solid var(--teal);
  box-shadow: 0 0 12px rgba(13,107,94,.2);
}
.workflow-node-badge { border: 1px solid var(--teal); color: var(--teal-light); }
.workflow-download-box {
  border: 1px solid var(--teal);
  border-top: 2px solid var(--yellow);
  box-shadow: 0 0 24px rgba(13,107,94,.12);
}

/* ── Buttons: refined borders ────────────────────────────────────────────────── */
.btn-ghost {
  border: 1px solid var(--border);
  transition: border-color .2s, color .2s, box-shadow .2s, transform .15s;
}
.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal-light);
  box-shadow: 0 0 0 1px var(--teal);
  opacity: 1;
}
.btn-primary:focus,
.btn-teal:focus {
  outline: none;
  box-shadow: var(--border-glow-yellow);
}

/* ── Tags: teal border with subtle glow ─────────────────────────────────────── */
.tag, .category-badge, .meta-category {
  border: 1px solid rgba(13,107,94,.5);
  box-shadow: inset 0 0 8px rgba(13,107,94,.08);
}

/* ── Form inputs: teal focus border ─────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="search"],
textarea,
select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(13,107,94,.2);
}

/* ── Detail rows: left teal accent on hover ──────────────────────────────────── */
.detail-item  { border-bottom: 1px solid var(--border); transition: border-color .2s, padding-left .2s; }
.detail-item:hover { border-bottom-color: var(--teal); padding-left: 6px; }

/* ── Footer: yellow top border ──────────────────────────────────────────────── */
#site-footer {
  border-top: 2px solid var(--yellow);
  position: relative;
}
#site-footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: var(--grad-teal-yellow);
  opacity: .6;
}
.footer-inner { border-bottom: 1px solid rgba(255,255,255,.06); }

/* ── Section alt divider: subtle top border ──────────────────────────────────── */
.section--alt { border-top: 1px solid var(--border-accent); border-bottom: 1px solid var(--border-accent); }

/* ── Archive header rule ─────────────────────────────────────────────────────── */
.archive-header .rule {
  background: var(--grad-teal-yellow);
  box-shadow: 0 0 8px rgba(255,210,0,.25);
}

/* ── Code blocks: teal left border ──────────────────────────────────────────── */
pre, code {
  border-left: 3px solid var(--teal);
  background: var(--teal-dark);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 2px 8px;
  font-size: 13px;
  color: var(--yellow);
}
pre {
  padding: 16px 20px;
  overflow-x: auto;
}

/* ── Gallery items: teal border on hover ────────────────────────────────────── */
.gallery-item { border: 1px solid transparent; border-radius: var(--radius-sm); transition: border-color .2s, box-shadow .2s; }
.gallery-item:hover { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }

/* ── Mobile nav: gradient left border ───────────────────────────────────────── */
#mobile-nav { border-left: 3px solid var(--teal); border-bottom: 1px solid var(--border-accent); }
#mobile-nav a:hover { border-left: 2px solid var(--yellow); padding-left: 14px; }

/* ── Logo: nav header version ────────────────────────────────────────────────── */
.site-logo {
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  transition: border-color .2s;
}
.site-logo:hover { border-color: var(--border); opacity: 1; }
.site-logo .hagar-logo-img { border-radius: 8px; height: 36px; width: 36px; border: 2px solid var(--teal); }

/* ── Live CTA sidebar: teal border with glow ─────────────────────────────────── */
.project-live-cta { border-radius: var(--radius-sm); overflow: hidden; }
.btn-live-site { border: 1px solid var(--yellow-dim); }


/* ══════════════════════════════════════════════════════════════════════════════
   hg_theme CPT STYLES
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Theme card preview image ────────────────────────────────────────────────── */
.hg-theme-card { padding: 0; overflow: hidden; }
.hg-theme-card > *:not(.hg-theme-preview) { padding-left: 18px; padding-right: 18px; }
.hg-theme-card > .card__actions { padding: 0 18px 18px; }
.hg-theme-card > .card__title   { padding-top: 14px; }

.hg-theme-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--teal-dark);
    border-bottom: 1px solid var(--border);
}

.hg-theme-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.hg-theme-card:hover .hg-theme-preview img { transform: scale(1.04); }

.hg-theme-preview--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, var(--teal-dark), var(--dark));
}

/* Demo hover overlay */
.hg-theme-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13,107,94,.82);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s ease;
    text-decoration: none;
}

.hg-theme-overlay span {
    background: var(--yellow);
    color: var(--teal-dark);
    font-size: 13px;
    font-weight: 800;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
}

.hg-theme-card:hover .hg-theme-overlay { opacity: 1; }

/* ── Price badge ─────────────────────────────────────────────────────────────── */
.hg-theme-price-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-top: 2px;
    margin-bottom: 2px;
}
.hg-theme-price-badge.free    { background: rgba(13,107,94,.2); color: var(--teal-light); border: 1px solid rgba(13,107,94,.4); }
.hg-theme-price-badge.premium { background: rgba(255,210,0,.15); color: var(--yellow); border: 1px solid rgba(255,210,0,.35); }

/* ── Single theme: screenshot ────────────────────────────────────────────────── */
.theme-screenshot-wrap {
    position: relative;
    margin: 0 0 40px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 8px 40px rgba(0,0,0,.35);
}

.theme-screenshot-img { width: 100%; height: auto; display: block; }

.theme-screenshot-demo-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--yellow);
    color: var(--teal-dark);
    font-size: 13px;
    font-weight: 800;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background .2s, transform .15s;
    box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.theme-screenshot-demo-btn:hover { background: var(--yellow-dim); transform: translateY(-2px); color: var(--teal-dark); opacity: 1; }

/* ── Header: theme icon ──────────────────────────────────────────────────────── */
.theme-icon-wrap {
    width: 56px; height: 56px; border-radius: 14px;
    background: var(--teal-dark); border: 2px solid var(--teal);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; flex-shrink: 0;
}

/* Theme header CTAs row */
.theme-header-ctas { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Compatibility strip ─────────────────────────────────────────────────────── */
.theme-compat-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--teal);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-top: 20px;
    font-size: 13px;
}
.theme-compat-label { color: var(--teal-light); font-weight: 700; white-space: nowrap; }
.theme-compat-value { color: var(--muted); }

/* ── Requirements box ────────────────────────────────────────────────────────── */
.theme-req-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-top: 2px solid var(--yellow);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    margin-bottom: 24px;
}
.theme-req-box h3 { font-size: 14px; font-weight: 700; color: var(--yellow); margin-bottom: 8px; }
.theme-req-box p  { font-size: 13px; color: var(--muted); }

/* ── Installation steps ──────────────────────────────────────────────────────── */
.theme-install-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.theme-install-steps li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--teal);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 14px;
    color: var(--muted);
}
.theme-install-steps li strong { color: var(--text); }
.step-num {
    min-width: 28px; height: 28px; border-radius: 50%;
    background: var(--teal); color: var(--yellow);
    font-size: 12px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* ── Theme single body (reuses plugin-body layout) ───────────────────────────── */
.single-hg-theme .plugin-header { margin-bottom: 0; padding-bottom: 24px; border-bottom: 1px solid var(--border); margin-bottom: 28px; }

/* ─── Fix gap between projects/content and footer ──────────────────────────── */
/* Add generous breathing room on ALL pages before footer */
.site-main { padding-bottom: 80px; }
/* Archive pages: ensure space before footer */
.post-type-archive .site-main,
.post-type-archive-project .site-main { padding-bottom: 100px; }
/* Single CPT pages get extra room */
.single-project-page .site-main,
.single-plugin-page .site-main,
.single-workflow-page .site-main,
.single-theme-page .site-main { padding-bottom: 100px; }
/* Front-page: last section needs bottom padding */
#site-footer { margin-top: 0; }
/* Remove accidental double gap */
.single-project-page .project-single-wrap { padding-bottom: 0; }

/* ─── Footer widget area ────────────────────────────────────────────────────── */
.footer-widgets {
    max-width: 1060px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    margin-bottom: 32px;
}
.footer-widget h2.widget-title,
.footer-widget .widgettitle {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--yellow);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.footer-widget ul { list-style: none; }
.footer-widget ul li { padding: 4px 0; }
.footer-widget ul li a { font-size: 13px; color: var(--muted); transition: color .2s; }
.footer-widget ul li a:hover { color: var(--text); }
.footer-widget p { font-size: 13px; color: var(--muted); line-height: 1.65; }
@media (max-width: 768px) {
    .footer-widgets { grid-template-columns: 1fr; gap: 28px; }
}

/* ─── Elementor widget inside footer widget areas ───────────────────────────── */
.footer-widget .elementor-widget-container { color: var(--muted); font-size: 13px; }
