/* ================================================================
   SARKARI HOMEPAGE — sarkari-style.css
   इस file को child theme folder में डालें
   ================================================================ */

/* Google Fonts — child theme के functions.php से load होगी
   या नीचे @import uncomment करें अगर सीधे CSS use करें */
/* @import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=Noto+Sans+Devanagari:wght@400;600&display=swap'); */

/* ================================================================
   1. CSS VARIABLES — रंग यहाँ से बदलें
   ================================================================ */
:root {
  --se-blue:   #1a3caa;
  --se-blue2:  #2451d6;
  --se-orange: #e65c00;
  --se-green:  #1a7a3c;
  --se-red:    #c0392b;
  --se-yellow: #f5a800;
  --se-purple: #6c2eb9;
  --se-teal:   #0d7a7a;
  --se-bg:     #f0f4ff;
  --se-card:   #ffffff;
  --se-text:   #1a1a2e;
  --se-muted:  #555577;
  --se-border: #d0d8f0;
  --se-radius: 10px;
  --se-shadow: 0 2px 12px rgba(26,60,170,.10);
}

/* ================================================================
   2. TICKER — ऊपर चलने वाली News Strip
   ================================================================ */
.se-ticker {
  background: var(--se-blue);
  color: #fff;
  padding: 7px 0;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}
.se-ticker-track {
  display: inline-block;
  animation: seTickerMove 45s linear infinite;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Noto Sans Devanagari', sans-serif;
}
.se-ticker-track span {
  margin: 0 32px;
}
.se-ticker-track span::before {
  content: "🔔 ";
}
@keyframes seTickerMove {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}

/* ================================================================
   3. QUICK LINKS — रंगीन बटन
   ================================================================ */
.se-quick-links {
  max-width: 1200px;
  margin: 14px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
/* Tablet */
@media (max-width: 900px) {
  .se-quick-links { grid-template-columns: repeat(2, 1fr); }
}
/* Mobile */
@media (max-width: 480px) {
  .se-quick-links { grid-template-columns: repeat(2, 1fr); }
}

.se-ql {
  display: block;
  text-align: center;
  padding: 11px 8px;
  border-radius: var(--se-radius);
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  line-height: 1.35;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  font-family: 'Noto Sans Devanagari', sans-serif;
}
.se-ql:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.20);
  color: #fff;
  text-decoration: none;
}

/* Quick Link Colors */
.se-ql.ql-blue   { background: var(--se-blue); }
.se-ql.ql-orange { background: var(--se-orange); }
.se-ql.ql-green  { background: var(--se-green); }
.se-ql.ql-red    { background: var(--se-red); }
.se-ql.ql-yellow { background: var(--se-yellow); color: #222; }
.se-ql.ql-purple { background: var(--se-purple); }
.se-ql.ql-teal   { background: var(--se-teal); }
.se-ql.ql-yellow:hover { color: #222; }

/* ================================================================
   4. MAIN GRID — Category Cards का Grid
   Desktop: 3 columns | Tablet (900px): 2 columns | Mobile (500px): 1 column
   ================================================================ */
.se-grid {
  max-width: 1200px;
  margin: 0 auto 24px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
/* Tablet — 2 columns */
@media (max-width: 900px) {
  .se-grid { grid-template-columns: repeat(2, 1fr); }
}
/* Mobile — 1 column */
@media (max-width: 500px) {
  .se-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   5. CARD — हर Category Box
   ================================================================ */
.se-card {
  background: var(--se-card);
  border-radius: var(--se-radius);
  box-shadow: var(--se-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s;
}
.se-card:hover {
  box-shadow: 0 6px 24px rgba(26,60,170,.15);
}

/* Card Header — रंगीन Title bar */
.se-card-head {
  padding: 12px 16px;
  font-family: 'Baloo 2', cursive;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Header Colors */
.se-card-head.ch-blue   { background: var(--se-blue); }
.se-card-head.ch-orange { background: var(--se-orange); }
.se-card-head.ch-green  { background: var(--se-green); }
.se-card-head.ch-red    { background: var(--se-red); }
.se-card-head.ch-yellow { background: var(--se-yellow); color: #222; }
.se-card-head.ch-purple { background: var(--se-purple); }
.se-card-head.ch-teal   { background: var(--se-teal); }

/* Card Body — Links की list */
.se-card-body {
  padding: 6px 14px;
  flex: 1;
}
.se-card-body ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.se-card-body li {
  border-bottom: 1px solid var(--se-border);
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  font-family: 'Noto Sans Devanagari', sans-serif;
}
.se-card-body li:last-child {
  border-bottom: none;
}
.se-card-body li a {
  color: var(--se-blue2);
  flex: 1;
  text-decoration: none;
}
.se-card-body li a:hover {
  text-decoration: underline;
  color: var(--se-orange);
}

/* Card Footer — View More Button */
.se-card-foot {
  text-align: right;
  padding: 8px 14px 12px;
}
.se-view-more {
  display: inline-block;
  background: var(--se-blue);
  color: #fff;
  padding: 5px 16px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s;
}
.se-view-more:hover {
  background: var(--se-blue2);
  color: #fff;
  text-decoration: none;
}

/* ================================================================
   6. NEW BADGE — लाल रंग का New Tag
   ================================================================ */
.se-new {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 4px;
  flex-shrink: 0;
}

/* ================================================================
   7. SEO TEXT BOX — Page के नीचे Content
   ================================================================ */
.se-seo-section {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 16px;
}
.se-seo-box {
  background: #fff;
  border-radius: var(--se-radius);
  box-shadow: var(--se-shadow);
  padding: 24px 28px;
}
.se-seo-box h1 {
  font-family: 'Baloo 2', cursive;
  font-size: 22px;
  font-weight: 800;
  color: var(--se-blue);
  margin-bottom: 10px;
}
.se-seo-box h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 16px;
  color: var(--se-blue);
  margin: 16px 0 6px;
}
.se-seo-box p {
  color: var(--se-muted);
  font-size: 13.5px;
  margin-bottom: 8px;
  font-family: 'Noto Sans Devanagari', sans-serif;
}
.se-seo-box ul {
  padding-left: 18px;
}
.se-seo-box ul li {
  list-style: disc;
  color: var(--se-muted);
  font-size: 13.5px;
  margin-bottom: 4px;
  font-family: 'Noto Sans Devanagari', sans-serif;
}

/* ================================================================
   8. EDIT MODE — Admin Edit Panel (सिर्फ तब दिखे जब edit ON हो)
   ================================================================ */

/* Edit toolbar — नीचे दाएं Fixed button */
#se-edit-toolbar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
#se-toggle-edit-btn {
  background: var(--se-blue);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(26,60,170,.4);
  transition: background .2s, transform .15s;
  font-family: 'Noto Sans Devanagari', sans-serif;
}
#se-toggle-edit-btn:hover  { background: var(--se-blue2); transform: scale(1.04); }
#se-toggle-edit-btn.active { background: #27ae60; }

#se-save-btn {
  background: #27ae60;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(39,174,96,.4);
  display: none;
  transition: background .2s;
  font-family: 'Noto Sans Devanagari', sans-serif;
}
#se-save-btn:hover { background: #1e8449; }

/* Edit Mode — card पर outline दिखे */
.se-edit-mode .se-card {
  outline: 2px dashed transparent;
  transition: outline .2s;
}
.se-edit-mode .se-card:hover {
  outline: 2px dashed var(--se-blue2);
}

/* Edit Mode — link text को editable बनाएं */
.se-edit-mode [contenteditable="true"] {
  background: rgba(255,255,200,.6);
  border-radius: 3px;
  outline: 1px dashed #f5a800;
  cursor: text;
}

/* Edit Mode — delete button दिखाएं */
.se-item-actions { display: none; }
.se-edit-mode .se-card-body li .se-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.se-del-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Edit Mode — "नई लिंक जोड़ें" button */
.se-add-item-btn {
  display: none;
  width: 100%;
  margin-top: 6px;
  margin-bottom: 6px;
  background: transparent;
  border: 1px dashed var(--se-blue);
  color: var(--se-blue);
  padding: 6px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background .15s;
  font-family: 'Noto Sans Devanagari', sans-serif;
}
.se-add-item-btn:hover { background: #e8eeff; }
.se-edit-mode .se-add-item-btn { display: block; }

/* Card header edit button */
.se-edit-head-btn {
  background: rgba(255,255,255,.25);
  border: none;
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  display: none;
  font-family: 'Noto Sans Devanagari', sans-serif;
}
.se-edit-mode .se-edit-head-btn { display: inline-block; }
.se-edit-head-btn:hover { background: rgba(255,255,255,.45); }

/* ================================================================
   9. MODAL — Popup Windows
   ================================================================ */
.se-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.5);
  align-items: center;
  justify-content: center;
}
.se-modal.open { display: flex; }
.se-modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: min(480px, 95vw);
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
}
.se-modal-box h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 18px;
  color: var(--se-blue);
  margin-bottom: 16px;
}
.se-modal-box label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--se-muted);
  font-family: 'Noto Sans Devanagari', sans-serif;
}
.se-modal-box input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--se-border);
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 14px;
  outline: none;
  transition: border .15s;
}
.se-modal-box input:focus { border-color: var(--se-blue); }
.se-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}
.se-btn-save {
  background: var(--se-blue);
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
  font-family: 'Noto Sans Devanagari', sans-serif;
}
.se-btn-cancel {
  background: #eee;
  color: var(--se-text);
  border: none;
  padding: 9px 18px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Noto Sans Devanagari', sans-serif;
}

/* Color Swatches */
.se-color-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.se-color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border .15s, transform .1s;
}
.se-color-swatch.selected,
.se-color-swatch:hover {
  border-color: #333;
  transform: scale(1.12);
}

/* Checkbox row */
.se-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.se-checkbox-row input[type="checkbox"] {
  width: auto;
  margin: 0;
}
.se-checkbox-row label {
  margin: 0;
  font-size: 13px;
}

/* ================================================================
   10. TOAST — Success message
   ================================================================ */
#se-toast {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 9999;
  background: #27ae60;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  font-family: 'Noto Sans Devanagari', sans-serif;
}
#se-toast.show {
  opacity: 1;
  transform: translateY(0);
}
