/*
Theme Name: Chennai Guru Job Portal
Theme URI: https://docs.fasterthemes.com/job-portal-wordpress-theme/
Author: fasterthemes.com
Author URI: https://fasterthemes.com
Description: Job Portal is a free yet premium quality WordPress theme for creating impressive Job Portal websites, customized for Chennai Guru (Tamil Nadu).
Version: 1.2
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Text Domain: job-portal
Tags: two-columns, right-sidebar, left-sidebar, full-width-template, flexible-header, custom-header, custom-menu, custom-logo, featured-images, footer-widgets, featured-image-header, theme-options, threaded-comments, translation-ready, blog
*/

/* Force root font-size to 16px. The old Bootstrap-based theme
   sets a different base (commonly 62.5%) for its own rem system,
   which makes every Tailwind rem-based size (text-4xl, gap-8,
   max-w-6xl, etc.) shrink site-wide. !important overrides that. */
html{
  font-size: 16px !important;
}

:root{
  --navy: #12305A;
  --navy-2: #1B4380;
  --gold: #F5A623;
  --gold-soft: #FFC85C;
  --paper: #F4F8FD;
  --ink: #1B1F27;
  --slate: #5B6472;
  --line: #DCE5F0;
  --blue: #1A6FE0;
  --blue-deep: #1257B8;
  --green: #14804A;
}
*{box-sizing:border-box;}
body{
  background:var(--paper);
  color:var(--ink);
  font-family:'Inter',sans-serif;
}
.font-display{ font-family:'Space Grotesk', sans-serif; }
.font-mono{ font-family:'JetBrains Mono', monospace; }

.grain-nav{
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy) 100%);
}

.stamp-border{ position:relative; }
.stamp-border::before{
  content:"";
  position:absolute; inset:0;
  border:1px dashed rgba(255,255,255,0.35);
  border-radius:14px;
  pointer-events:none;
  margin: 10px;
}

.ticket-row{
  border-left: 3px solid var(--line);
  transition: border-color .15s ease;
}
.ticket-row:hover{
  border-left-color: var(--gold);
  background: #FFFEFB;
}

.flag-bar{ height:4px; width:34px; border-radius:2px; }

.country-chip{
  border:1px solid var(--line);
  transition: all .15s ease;
}
.country-chip:hover{
  border-color: var(--navy);
  transform: translateY(-2px);
}

.dept-box{
  border:1px solid var(--line);
  position:relative;
  overflow:hidden;
}
.dept-box::after{
  content:"";
  position:absolute;
  top:0; right:0;
  width:0; height:0;
  border-style: solid;
  border-width: 0 22px 22px 0;
  border-color: transparent var(--paper-corner,#EFE9DA) transparent transparent;
}

::selection{ background: var(--gold-soft); color: var(--navy); }

/* Nav menu — targets the default wp_nav_menu() <ul><li><a> output
   directly, no custom PHP walker class required. */
.chennaiguru-nav ul{ list-style:none; margin:0; padding:0; }
.chennaiguru-nav li{ list-style:none; }
.chennaiguru-nav a{
  color: inherit;
  text-decoration: none;
  transition: color .15s ease;
}
.chennaiguru-nav a:hover{ color:#fff; }

/* --- Legacy element cleanup ---
   Your old category-box / browse-all-btn styles (from home-page.php)
   used the old pink #ec1561 accent. Once the new header is live,
   swap those accent colors below so category/archive pages don't
   clash with the new navy/gold palette. */
.category-box:hover{
  border-color: var(--gold);
}
.browse-all-btn{
  color: var(--slate);
  border-color: var(--line);
}

/* ===== MOBILE OPTIMIZATIONS ===== */

/* ENABLE ZOOM ON ALL DEVICES */
html, body {
  -webkit-user-scalable: yes !important;
  user-scalable: yes !important;
  zoom: 1;
}

/* MOBILE TEXT SIZING */
@media (max-width: 768px) {
  html {
    font-size: 18px !important; /* Increase base size for mobile */
  }

  body {
    font-size: 18px;
    line-height: 1.6;
  }

  /* Hero section — bigger on mobile */
  .grain-nav {
    padding: 24px 16px !important;
  }

  .grain-nav h1 {
    font-size: 28px !important;
    line-height: 1.2 !important;
    margin-bottom: 16px !important;
  }

  .grain-nav p {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }

  /* Search form — bigger on mobile */
  form input,
  form button {
    font-size: 18px !important;
    padding: 16px 12px !important;
    min-height: 48px !important; /* Thumb-friendly button size */
  }

  /* Country/Department cards */
  .country-chip,
  .dept-box {
    padding: 20px !important;
  }

  .country-chip p,
  .dept-box p {
    font-size: 16px !important;
  }

  /* Job listing titles */
  .ticket-row p:first-child {
    font-size: 16px !important;
    font-weight: 600;
  }

  /* Section headings */
  h2 {
    font-size: 24px !important;
    margin-bottom: 16px !important;
  }

  /* Buttons */
  button,
  a.cg-btn {
    font-size: 16px !important;
    padding: 14px 16px !important;
    min-height: 48px !important;
  }

  /* Remove horizontal scrolling */
  * {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Spacing adjustments */
  section {
    padding: 24px 16px !important;
  }

  .max-w-6xl {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* EXTRA SMALL PHONES (320px - 480px) */
@media (max-width: 480px) {
  html {
    font-size: 18px !important;
  }

  .grain-nav h1 {
    font-size: 24px !important;
  }

  h2 {
    font-size: 20px !important;
  }

  form {
    flex-direction: column !important;
  }

  form input,
  form button {
    width: 100% !important;
    font-size: 18px !important;
  }
}

/* ENSURE FULL VIEWPORT WIDTH */
@media (max-width: 768px) {
  body, html {
    width: 100vw;
    overflow-x: hidden;
  }

  .grain-nav,
  section,
  .max-w-6xl {
    width: 100%;
    max-width: 100%;
  }

  .container {
    width: 100% !important;
    padding: 0 16px !important;
  }
}

/* ===== CHENNAI GURU — JOB BOARD COMPONENTS ===== */

.cg-btn{
  display:inline-block;
  padding:10px 20px;
  border-radius:6px;
  font-size:14px;
  font-weight:500;
  text-decoration:none;
  cursor:pointer;
  border:1px solid transparent;
  text-align:center;
}
.cg-btn-primary{ background:var(--blue); color:#fff; border-color:var(--blue); }
.cg-btn-primary:hover{ background:var(--blue-deep); }
.cg-btn-outline{ background:#fff; color:var(--blue); border-color:var(--blue); }
.cg-btn-outline:hover{ background:#F3F6FC; }

.cg-tag{
  display:inline-block;
  font-size:11px;
  padding:3px 10px;
  border-radius:999px;
  background:#F1EFEA;
  color:var(--ink);
  border:1px solid var(--line);
}
.cg-tag-gold{ background:#FBF1DE; color:#8A6415; border-color:#EFDBAA; }
.cg-tag-green{ background:#EAF6EE; color:var(--green); border-color:#CBE9D5; }

.cg-form-row{ margin-bottom:16px; }
.cg-form-row label{ display:block; font-size:13px; font-weight:600; margin-bottom:6px; color:var(--ink); }
.cg-form-row input,
.cg-form-row select,
.cg-form-row textarea{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:6px;
  font-size:14px;
  background:#fff;
  color:var(--ink);
}
.cg-form-row input:focus,
.cg-form-row select:focus,
.cg-form-row textarea:focus{
  outline:none;
  border-color:var(--blue);
}

.cg-apply-form{ max-width:520px; }

#cg-mobile-menu.hidden{ display:none; }

.prose p{ margin-bottom:1em; }
.prose ul, .prose ol{ margin:1em 0; padding-left:1.5em; }
.prose ul{ list-style:disc; }
.prose ol{ list-style:decimal; }
.prose h2, .prose h3{ font-family:'Space Grotesk', sans-serif; font-weight:600; margin:1.4em 0 0.6em; }
.prose a{ color:var(--blue); }

@media (max-width: 768px) {
  .cg-tag{ font-size:12px; }
}

/* ===== CV BUILDER ===== */

.cvb-wrap{ display:flex; gap:32px; align-items:flex-start; flex-wrap:wrap; }
.cvb-form-panel{ flex:1 1 420px; min-width:320px; }
.cvb-preview-panel{ flex:1 1 480px; min-width:320px; position:sticky; top:90px; }

.cvb-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  padding:20px;
  margin-bottom:18px;
}
.cvb-card h2{ font-family:'Space Grotesk', sans-serif; font-size:16px; font-weight:600; margin-bottom:14px; }

.cvb-grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:0 14px; }
@media (max-width: 600px){ .cvb-grid-2{ grid-template-columns:1fr; } }

.cvb-hint{ font-size:12px; color:var(--slate); margin-bottom:10px; }

.cvb-photo-row{ display:flex; align-items:center; gap:16px; margin-bottom:16px; }
.cvb-photo-preview{
  width:72px; height:72px; border-radius:6px; background:#F1EFEA;
  border:1px dashed var(--line); display:flex; align-items:center; justify-content:center;
  font-size:11px; color:var(--slate); background-size:cover; background-position:center; flex-shrink:0;
}

.cvb-repeat-row{
  border:1px solid var(--line);
  border-radius:6px;
  padding:14px;
  margin-bottom:12px;
  background:var(--paper);
}
.cvb-remove-btn{
  background:none; border:none; color:#B3413E; font-size:12px; cursor:pointer; padding:0; text-decoration:underline;
}
.cvb-add-btn{ width:100%; margin-top:4px; }

.cvb-checkbox-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px 16px; font-size:13px; }
.cvb-checkbox-grid label{ display:flex; align-items:center; gap:6px; font-weight:400; }
.cvb-checkbox-grid input{ width:auto; }

.cvb-lang-grid{ display:grid; grid-template-columns:repeat(5, 1fr); gap:8px; margin:10px 0; }
.cvb-lang-grid label{ font-size:11px; font-weight:600; color:var(--slate); display:block; margin-bottom:4px; }
@media (max-width: 700px){ .cvb-lang-grid{ grid-template-columns:1fr 1fr; } }

.cvb-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:8px; }

/* PREVIEW SHEET (approximates an A4 page on screen and in print) */
.cvb-preview-sheet{
  background:#fff;
  border:1px solid var(--line);
  box-shadow:0 10px 30px -12px rgba(0,0,0,0.15);
  display:flex;
  min-height:1000px;
  font-size:12.5px;
  color:var(--ink);
  overflow:hidden;
}
.cvb-preview-sidebar{
  width:34%;
  background:#F1EFEA;
  padding:24px 18px;
}
.cvb-preview-photo{
  width:100px; height:100px; border-radius:6px; background:#DCD7CB;
  display:flex; align-items:center; justify-content:center; font-size:11px; color:var(--slate);
  background-size:cover; background-position:center; margin-bottom:18px;
}
.cvb-preview-block{ margin-bottom:16px; }
.cvb-preview-block h4{ font-size:10px; text-transform:uppercase; letter-spacing:0.06em; color:var(--slate); margin-bottom:4px; }
.cvb-preview-block p{ font-size:12px; word-break:break-word; }

.cvb-preview-main{ flex:1; padding:28px 26px; }
.cvb-preview-main h1{ font-family:'Space Grotesk', sans-serif; font-size:22px; font-weight:700; margin-bottom:2px; }
.cvb-preview-headline{ color:var(--blue); font-size:13px; margin-bottom:18px; }
.cvb-preview-section{ margin-bottom:20px; }
.cvb-preview-section h3{
  font-family:'Space Grotesk', sans-serif; font-size:13px; font-weight:600;
  border-bottom:2px solid var(--gold); padding-bottom:4px; margin-bottom:10px; display:inline-block;
}
.cvb-preview-entry{ margin-bottom:12px; }
.cvb-preview-entry-head{ display:flex; justify-content:space-between; font-size:12.5px; gap:10px; }
.cvb-preview-entry-sub{ font-size:11.5px; color:var(--slate); margin-bottom:3px; }

.cvb-lang-table{ width:100%; border-collapse:collapse; font-size:11px; }
.cvb-lang-table th, .cvb-lang-table td{ border:1px solid var(--line); padding:5px 6px; text-align:center; }
.cvb-lang-table th{ background:#F1EFEA; font-weight:600; }
.cvb-lang-table td:first-child, .cvb-lang-table th:first-child{ text-align:left; }

/* PRINT — only the CV sheet is shown, at real A4 size */
@media print {
  .no-print, header, footer { display:none !important; }
  body { background:#fff !important; }
  .cvb-preview-panel{ position:static; width:100%; }
  .cvb-preview-sheet{
    box-shadow:none; border:none;
    width:210mm; min-height:297mm; margin:0 auto;
  }
  section { padding:0 !important; margin:0 !important; }
}

/* PREVENT BOOTSTRAP FROM SETTING SMALL FONT-SIZE */
@media (max-width: 768px) {
  html {
    font-size: 18px !important;
  }

  body {
    font-size: 18px !important;
  }

  p {
    font-size: 16px !important;
    line-height: 1.6 !important;
  }

  input, button, textarea, select {
    font-size: 18px !important; /* Prevents iOS zoom on input focus */
  }
}


.cg-job-logo,
.cg-job-logo-fallback {
	width: 48px;
	height: 48px;
	border-radius: 6px;
	object-fit: contain;
}
.cg-job-logo-img {
	width: 48px;
	height: 48px;
	border-radius: 6px;
	object-fit: contain;
	border: 1px solid var(--line);
	background: #fff;
}
.cg-job-logo-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f3f3f3;
	color: var(--slate);
	font-weight: 700;
	font-size: 18px;
}


.cg-job-logo {
	width: 48px;
	height: 48px;
	border-radius: 6px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
.cg-job-logo-img {
	width: 48px !important;
	height: 48px !important;
	max-width: 48px;
	max-height: 48px;
	border-radius: 6px;
	object-fit: contain;
	border: 1px solid var(--line);
	background: #fff;
	padding: 4px;
	box-sizing: border-box;
}
.cg-job-logo-fallback {
	width: 48px;
	height: 48px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f3f3f3;
	color: var(--slate);
	font-weight: 700;
	font-size: 18px;
}

/* ===== CHENNAI GURU — Tamil Nadu portal additions ===== */
.cg-nav ul{list-style:none;margin:0;padding:0}
.cg-nav li{position:relative}
.cg-nav li>ul.sub-menu{display:none;position:absolute;left:0;top:100%;min-width:210px;background:#fff;border:1px solid var(--line);border-radius:8px;padding:6px;box-shadow:0 14px 30px -12px rgba(18,48,90,.35);z-index:60;flex-direction:column;gap:0}
.cg-nav li:hover>ul.sub-menu,.cg-nav li:focus-within>ul.sub-menu{display:flex}
.cg-nav li>ul.sub-menu a{color:var(--ink);display:block;padding:8px 12px;border-radius:6px;white-space:nowrap}
.cg-nav li>ul.sub-menu a:hover{background:var(--paper);color:var(--blue)}
.cg-card{background:#fff;border:1px solid var(--line);border-radius:12px;transition:box-shadow .15s,transform .15s}
.cg-card:hover{box-shadow:0 10px 26px -14px rgba(18,48,90,.4);transform:translateY(-1px)}
.cg-chip{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:999px;background:#fff;border:1px solid var(--line);font-size:13px;color:var(--ink);text-decoration:none}
.cg-chip:hover{border-color:var(--blue);color:var(--blue)}
.cg-badge-govt{background:#E8F3FF;color:#0F4C9A;border-color:#BBD8F8}
.cg-badge-private{background:#EAF6EE;color:var(--green);border-color:#CBE9D5}
.cg-badge-new{background:#FFF1D6;color:#9A5B00;border-color:#F6D79A}
.cg-badge-urgent{background:#FDE8E8;color:#B42318;border-color:#F6BDB8}
.cg-edu-tile{display:flex;flex-direction:column;align-items:center;gap:10px;padding:22px 12px;text-align:center;text-decoration:none;color:var(--ink)}
.cg-edu-ico{width:54px;height:54px;border-radius:14px;background:var(--paper);display:flex;align-items:center;justify-content:center;font-size:26px}
.cg-faq details{border:1px solid var(--line);border-radius:10px;background:#fff;padding:14px 18px;margin-bottom:10px}
.cg-faq summary{cursor:pointer;font-weight:600;font-size:15px}
.cg-faq details p{margin-top:10px;font-size:14px;color:var(--slate)}
.cg-mobile-bar{display:none}
@media(max-width:767px){.cg-mobile-bar{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:70;background:#fff;border-top:1px solid var(--line)}
.cg-mobile-bar a{flex:1;text-align:center;font-size:11px;padding:8px 2px;color:var(--ink);text-decoration:none}
body{padding-bottom:56px}}
