/*
Theme Name: FastJobUpdate GP Jobs Child (Advanced)
Theme URI: https://fastjobupdate.com
Description: GeneratePress child theme for job sites. Includes: 8 color boxes, 3 homepage sections, admin settings, Job Details metabox, admin columns + quick edit, footer menu location, and GP Jobs-style single post layout.
Author: FastJobUpdate
Template: generatepress
Version: 2.8.2
Text Domain: fastjobupdate-gp-child
*/

:root{
  --fju-green:#1ea67a;
  --fju-green-dark:#177e5c;
  --fju-bg:#f3f6f9;
  --fju-card:#ffffff;
  --fju-border:#e6ebf0;
  --fju-text:#111827;
  --fju-muted:#6b7280;
  --fju-yellow:#ffcc00;
  --fju-accent1:#ff3d71;
  --fju-accent2:#5b8cff;
  --fju-accent3:#20c997;
  --fju-accent4:#ffd43b;
  --fju-footer:#0b1220;
  --fju-footer2:#070b14;
  /* Use GeneratePress container width if available */
  --fju-container: var(--gp-container-width, 1200px);
}

*{ box-sizing:border-box; }
img{ max-width:100%; height:auto; }

body{
  margin:0;
  background:var(--fju-bg);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial;
  color:var(--fju-text);
}

/* Keep header/menu/content perfectly aligned */
.grid-container,
.inside-header, .inside-navigation, .inside-top-bar, .inside-site-info, .inside-footer-widgets,
.site-content,
.site-content.grid-container,
.site-content .content-area,
.site-content .site-main{
  max-width: var(--fju-container) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.site-content,
.site-content.grid-container{
  width: 100%;
  padding-left: 14px;
  padding-right: 14px;
}

/* Header */
.site-header{ background: linear-gradient(135deg, var(--fju-green), var(--fju-green-dark)); }
.main-title a{ color:#fff !important; font-weight:800; letter-spacing:.2px; }
.site-description{ color:#e9fff7 !important; }

/* Menu */
.main-navigation{ background:#ffffff; border-bottom:1px solid var(--fju-border); }
.main-navigation a{ color:#111 !important; font-weight:700; }
.main-navigation .current-menu-item > a, .main-navigation a:hover{ color:var(--fju-green) !important; }

/* Search */
.fju-search-wrap{ padding:14px 12px; background:#ffffff; border-bottom:1px solid var(--fju-border); }
.job-search-form{ display:flex; gap:10px; max-width:760px; margin:0 auto; width:100%; }
.job-search-form input{ flex:1; min-width:0; padding:12px 14px; border:1px solid var(--fju-border); border-radius:10px; outline:none; background:#fff; }
.job-search-form button{ background:var(--fju-green); color:#fff; border:none; border-radius:10px; padding:12px 18px; font-weight:800; cursor:pointer; white-space:nowrap; }
.job-search-form button:hover{ background:var(--fju-green-dark); }

/* Top color boxes */
.fju-colorboxes{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:14px; margin:18px 0 8px; }
.fju-colorbox{ border-radius:14px; padding:16px 14px; min-height:72px; display:flex; align-items:center; justify-content:center; text-align:center; box-shadow:0 10px 22px rgba(15,23,42,.08); }
.fju-colorbox a{ color:#fff; text-decoration:none; font-weight:900; font-size:14px; line-height:1.25; }
.fju-colorbox a:hover{ text-decoration:underline; }

/* 3 sections */
.fju-sections{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:22px; margin:18px 0 10px; }
.fju-section{ background:#fff; border:1px solid var(--fju-border); border-radius:14px; box-shadow:0 10px 22px rgba(15,23,42,.06); overflow:hidden; }
.fju-section-head{ background:var(--fju-green); color:#fff; font-weight:900; text-align:center; padding:14px 10px; letter-spacing:.5px; }
.fju-section-body{ padding:14px 14px 12px; }
.fju-item{ border:2px solid rgba(30,166,122,.35); border-radius:10px; padding:12px 12px 10px; margin:12px 0; }
.fju-item h3{ margin:0 0 8px; font-size:15px; line-height:1.35; }
.fju-item h3 a{ color:#111; text-decoration:none; }
.fju-item h3 a:hover{ color:var(--fju-green); }
.fju-meta{ font-size:12.5px; color:var(--fju-muted); display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.fju-badge{ display:inline-flex; gap:6px; align-items:center; font-weight:800; }

.read-more{ display:block; margin:14px 14px 16px; text-align:center; background:var(--fju-green); color:#fff; padding:12px; border-radius:12px; text-decoration:none; font-weight:900; }
.read-more:hover{ background:var(--fju-green-dark); color:#fff; }

/* Footer menu */
.fju-footer-menu{ max-width:1160px; margin:0 auto; padding:12px 16px; text-align:center; }
.fju-footer-menu ul{ list-style:none; margin:0; padding:0; display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.site-footer .fju-footer-menu a{ color:var(--fju-footer-menu-link, #e2e8f0) !important; text-decoration:none; font-weight:800; }
.site-footer .fju-footer-menu a:hover{ color:var(--fju-footer-menu-hover, var(--fju-yellow)) !important; }

/* ===== Single Post Layout (GP Jobs style) =====
   Patch: enforce true 70/30 (content/sidebar) and remove GP float/width constraints
================================================== */

/* Ensure single post uses full container width similar to home */
.single .site-content{
  max-width:1160px;
  margin-left:auto;
  margin-right:auto;
  padding-left:14px;
  padding-right:14px;
}

/* 70/30 grid */
.fju-post-wrap{
  display:grid;
  grid-template-columns:minmax(0, 7fr) minmax(280px, 3fr);
  gap:22px;
  margin-top:18px;
  width:100%;
}

/* Override GeneratePress default floats/widths inside our grid */
.single .fju-post-wrap #primary,
.single .fju-post-wrap #secondary{
  float:none !important;
  width:auto !important;
  max-width:none !important;
}
.fju-post-title{ font-size:28px; line-height:1.2; margin:6px 0 8px; }

/* === Colorful post headings + subheadings (attractive) === */
.fju-post-title{
  font-weight: 1000;
  letter-spacing: -0.3px;
  background: linear-gradient(90deg, var(--fju-accent2), var(--fju-accent1), var(--fju-accent4), var(--fju-accent3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fju-post-title::after{
  content:"";
  display:block;
  height:4px;
  width: min(240px, 70%);
  margin-top:10px;
  border-radius:999px;
  background: linear-gradient(90deg, var(--fju-accent2), var(--fju-accent1), var(--fju-accent4), var(--fju-accent3));
  opacity:.95;
}

/* Content subheadings (H2/H3/H4) inside the post content card */
.fju-entry h2,
.fju-entry h3,
.fju-entry h4{
  margin: 18px 0 10px;
  line-height: 1.25;
  font-weight: 1000;
  position: relative;
  padding: 10px 12px 10px 16px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(91,140,255,.12), rgba(255,61,113,.10), rgba(255,212,59,.12));
  border: 1px solid rgba(17,24,39,.06);
}
.fju-entry h2::before,
.fju-entry h3::before,
.fju-entry h4::before{
  content:"";
  position:absolute;
  left:10px;
  top:10px;
  bottom:10px;
  width:4px;
  border-radius:999px;
  background: linear-gradient(180deg, var(--fju-accent2), var(--fju-accent1), var(--fju-accent4), var(--fju-accent3));
}
.fju-entry h2{ font-size: 22px; }
.fju-entry h3{ font-size: 18px; }
.fju-entry h4{ font-size: 16px; }

/* === Tables: auto-style header row even if user does not add <thead> === */
.fju-entry table{
  overflow: hidden;
  border-radius: 14px;
}
.fju-entry table thead th{
  font-weight: 1000;
  color:#0b1220;
  background: linear-gradient(90deg, rgba(91,140,255,.25), rgba(255,61,113,.22), rgba(255,212,59,.28), rgba(32,201,151,.20));
}
.fju-entry table th{
  font-weight:1000;
}
.fju-entry table tr:first-child td{
  font-weight: 1000;
  color:#0b1220;
  background: linear-gradient(90deg, rgba(91,140,255,.25), rgba(255,61,113,.22), rgba(255,212,59,.28), rgba(32,201,151,.20));
}
.fju-entry table tr:nth-child(even) td{
  background: rgba(243,246,249,.65);
}

/* Better table scrolling on mobile */
.fju-entry .wp-block-table{
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
}

.fju-post-meta{ display:flex; gap:14px; flex-wrap:wrap; align-items:center; color:var(--fju-muted); font-size:13px; margin-bottom:12px; }
.fju-hero{ border-radius:16px; overflow:hidden; background: linear-gradient(135deg, var(--fju-green), #2fc092); padding:44px 28px; color:#fff; box-shadow:0 12px 28px rgba(15,23,42,.10); }
.fju-hero h2{ margin:0; font-size:34px; line-height:1.1; }

.fju-links{ display:flex; gap:10px; flex-wrap:wrap; margin:14px 0; }
.fju-btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:10px 14px; border-radius:12px; text-decoration:none; font-weight:900; border:1px solid transparent; }
.fju-btn-primary{ background:var(--fju-green); color:#fff; }
.fju-btn-primary:hover{ background:var(--fju-green-dark); color:#fff; }
.fju-btn-outline{ background:#fff; color:var(--fju-green); border-color:rgba(30,166,122,.35); }
.fju-btn-outline:hover{ background:#f2fffa; color:var(--fju-green-dark); }

.fju-details{ background:#fff; border:1px solid var(--fju-border); border-radius:16px; box-shadow:0 10px 22px rgba(15,23,42,.06); margin:14px 0; overflow:hidden; }
.fju-details-head{ background:var(--fju-green); color:#fff; font-weight:900; padding:12px 14px; }
.fju-details-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:14px; }
.fju-detail{ border:1px solid rgba(30,166,122,.25); border-radius:12px; padding:12px; }
.fju-detail small{ color:var(--fju-muted); font-weight:800; display:block; margin-bottom:6px; }
.fju-detail strong{ font-size:14px; }

.fju-widget{ background:#fff; border:1px solid var(--fju-border); border-radius:14px; overflow:hidden; box-shadow:0 10px 22px rgba(15,23,42,.06); margin-bottom:16px; }
.fju-widget-title{ background:var(--fju-green); color:#fff; font-weight:900; padding:10px 12px; }
.fju-widget-body{ padding:12px; }
.fju-widget-item{ border:1px solid rgba(30,166,122,.35); border-radius:10px; padding:10px; margin:10px 0; }
.fju-widget-item a{ text-decoration:none; color:#111; font-weight:800; font-size:13px; }
.fju-widget-item a:hover{ color:var(--fju-green); }
.fju-widget-meta{ color:var(--fju-muted); font-size:12px; margin-top:6px; display:flex; gap:10px; flex-wrap:wrap; }

.fju-entry{ background:#fff; border:1px solid var(--fju-border); border-radius:16px; box-shadow:0 10px 22px rgba(15,23,42,.06); padding:16px; }
.fju-entry table{ width:100%; border-collapse:collapse; }
.fju-entry table td, .fju-entry table th{ border:1px solid var(--fju-border); padding:8px; }
.fju-entry .wp-block-table{ overflow-x:auto; }

@media (max-width: 1100px){
  /* Slightly smaller min sidebar on medium screens */
  .fju-post-wrap{ grid-template-columns:minmax(0, 7fr) minmax(260px, 3fr); }
}
@media (max-width: 980px){
  .fju-colorboxes{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .fju-sections{ grid-template-columns:1fr; }
  .fju-post-wrap{ grid-template-columns:1fr; }
  .fju-details-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  /* Mobile/Tablet: stack content then sidebar cleanly */
  .fju-post-wrap{ gap:16px; }
  .single .fju-post-wrap #primary{ grid-column:1; grid-row:1; width:100% !important; max-width:100% !important; }
  .single .fju-post-wrap #secondary{ grid-column:1; grid-row:2; width:100% !important; max-width:100% !important; }

}

@media (max-width: 600px){
  .fju-details-grid{ grid-template-columns:1fr; }
  .fju-hero{ padding:34px 18px; }
  .fju-hero h2{ font-size:26px; }
  .fju-btn{ width:100%; }
}

/* ==================================================
   HOME CENTER + SIDEBAR BALANCE (FreeJobAlert style)
   Safe patch – does NOT break existing design
================================================== */
.home .site-content{
  max-width:1160px;
  margin-left:auto;
  margin-right:auto;
  padding-left:14px;
  padding-right:14px;
}
.home .content-area,
.home .site-main{
  margin-left:auto;
  margin-right:auto;
}
@media (min-width: 992px){
  .home #primary{
    width:calc(100% - 340px);
    float:left;
    padding-right:22px;
  }
  .home #secondary{
    width:320px;
    float:right;
  }
}
@media (max-width: 991px){
  .home #primary,
  .home #secondary{
    width:100%;
    float:none;
  }
  .home #secondary{
    margin-top:18px;
  }
}
.home .fju-colorboxes,
.home .fju-sections{
  margin-left:auto;
  margin-right:auto;
}
.home .inside-article,
.home .inside-page{
  max-width:100%;
}

/* FINAL: do NOT shrink homepage main content (keep full width like header/menu) */
.home #primary,
.home #secondary{
  float: none !important;
  width: 100% !important;
  max-width: none !important;
}

/* ==================================================
   FORCE SINGLE POST 70/30 (HARD OVERRIDE)
   If user custom CSS or GP widths block grid, this will still work.
   Applies ONLY on single posts.
================================================== */

@media (min-width: 992px){
  body.single-post #content .fju-post-wrap,
  body.single #content .fju-post-wrap{
    display:flex !important;
    align-items:flex-start;
    gap:22px;
    width:100%;
  }
  body.single-post #content .fju-post-wrap > #primary,
  body.single #content .fju-post-wrap > #primary{
    flex:0 0 70% !important;
    max-width:70% !important;
    width:70% !important;
    float:none !important;
  }
  body.single-post #content .fju-post-wrap > #secondary,
  body.single #content .fju-post-wrap > #secondary{
    flex:0 0 30% !important;
    max-width:30% !important;
    width:30% !important;
    float:none !important;
  }
}

@media (max-width: 991px){
  body.single-post #content .fju-post-wrap,
  body.single #content .fju-post-wrap{
    display:block !important;
  }
  body.single-post #content .fju-post-wrap > #primary,
  body.single-post #content .fju-post-wrap > #secondary,
  body.single #content .fju-post-wrap > #primary,
  body.single #content .fju-post-wrap > #secondary{
    width:100% !important;
    max-width:100% !important;
  }
}


/* ===============================
   RELATED POSTS (Single Post)
================================ */
.fju-related{
  margin-top: 22px;
  border-top: 1px solid #e7e7e7;
  padding-top: 16px;
}
.fju-related-head{
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}
.fju-related-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.fju-related-card{
  display: flex;
  gap: 12px;
  border: 1px solid #efefef;
  border-radius: 10px;
  padding: 10px;
  text-decoration: none;
  background: #fff;
}
.fju-related-card:hover{
  border-color:#d9d9d9;
}
.fju-related-thumb{
  width: 96px;
  min-width: 96px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background:#f6f6f6;
  display:flex;
  align-items:center;
  justify-content:center;
}
.fju-related-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}
.fju-related-placeholder{
  font-size: 12px;
  font-weight: 700;
  opacity: .7;
}
.fju-related-title{
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 6px;
}
.fju-related-meta{
  font-size: 12px;
  opacity: .8;
  display:flex;
  gap: 6px;
  flex-wrap: wrap;
}
@media (max-width: 768px){
  .fju-related-grid{
    grid-template-columns: 1fr;
  }
  .fju-related-thumb{
    width: 110px;
    min-width: 110px;
    height: 78px;
  }
}


/* ===== Related Posts RED BG + WHITE TEXT (Fix v2) ===== */
.fju-related,
.fju-related-card{
  background:#d32f2f !important;
}
.fju-related-head{
  background:#b71c1c !important;
  color:#ffffff !important;
  padding:10px 12px !important;
  border-radius:10px !important;
}
.fju-related-card{
  border-color: rgba(255,255,255,0.25) !important;
}
.fju-related-card,
.fju-related-card *{
  color:#ffffff !important;
}
.fju-related-card:hover{
  background:#c62828 !important;
  border-color: rgba(255,255,255,0.45) !important;
}


/* =========================
   Homepage Info Sections (Red)
========================= */
.fju-info-sections{
  width:100%;
  max-width:1200px;
  margin:40px auto;
  padding:0 15px;
}
.fju-info-box{
  margin-bottom:30px;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 4px 12px rgba(0,0,0,.08);
}
.fju-info-title{
  background:#d32f2f;
  color:#fff;
  text-align:center;
  font-size:22px;
  font-weight:700;
  padding:14px 10px;
}
.fju-info-content{
  padding:20px;
  font-size:15px;
  line-height:1.7;
  color:#333;
  border:1px solid #d32f2f;
  border-top:none;
  border-radius:0 0 10px 10px;
}
@media(max-width:768px){
  .fju-info-title{font-size:18px;}
  .fju-info-content{font-size:14px;padding:15px;}
}


/* ===== Category / Archive Layout (with Featured Image) ===== */
.fju-archive-wrap{ margin:18px 0 26px; }

.fju-archive-hero{
  background:#fff;
  border:1px solid var(--fju-border);
  border-radius:14px;
  padding:16px 16px 14px;
  box-shadow:0 10px 22px rgba(15,23,42,.06);
  margin: 0 0 16px;
}
.fju-archive-title{ margin:0 0 6px; font-size:24px; line-height:1.2; font-weight:1000; }
.fju-archive-desc{ color:var(--fju-muted); font-size:14px; line-height:1.6; }

.fju-archive-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:18px;
}

.fju-job-card{
  background:#fff;
  border:1px solid var(--fju-border);
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 10px 22px rgba(15,23,42,.06);
  display:flex;
  flex-direction:column;
}

.fju-job-thumb img{
  width:100%;
  height:auto;
  display:block;
}

.fju-job-body{ padding:14px 14px 16px; display:flex; flex-direction:column; gap:10px; }

.fju-job-title{ margin:0; font-size:16px; line-height:1.35; font-weight:1000; }
.fju-job-title a{ text-decoration:none; color:var(--fju-text); }
.fju-job-title a:hover{ color:var(--fju-green); }

.fju-job-meta{ display:flex; gap:10px; flex-wrap:wrap; }

.fju-badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  border:1px solid rgba(17,24,39,.08);
  background:#f8fafc;
}
.fju-badge-status{ background:rgba(30,166,122,.10); border-color:rgba(30,166,122,.25); }
.fju-badge-date{ background:rgba(255,61,113,.08); border-color:rgba(255,61,113,.18); }

.fju-job-excerpt{ color:var(--fju-muted); font-size:13.5px; line-height:1.6; }

.fju-job-btn{
  margin-top:auto;
  display:inline-block;
  text-align:center;
  background:var(--fju-green);
  color:#fff !important;
  font-weight:1000;
  text-decoration:none;
  padding:12px 12px;
  border-radius:12px;
}
.fju-job-btn:hover{ background:var(--fju-green-dark); }

.fju-archive-pagination{
  grid-column: 1 / -1;
  background:#fff;
  border:1px solid var(--fju-border);
  border-radius:14px;
  padding:14px;
  box-shadow:0 10px 22px rgba(15,23,42,.06);
}

.fju-archive-empty{
  grid-column: 1 / -1;
  background:#fff;
  border:1px solid var(--fju-border);
  border-radius:14px;
  padding:14px;
}

/* Responsive */
@media (max-width: 880px){
  .fju-archive-grid{ grid-template-columns: 1fr; }
}
