/* ============================================================
   HIJ- NAMESPACED STYLES — Scoped strictly to #hij-wrapper
   Light / Warm Ivory & Sage theme
   ============================================================ */

#hij-wrapper {
  all: initial;
  display: block;
  font-family: 'Georgia', 'Times New Roman', serif;
  background: linear-gradient(160deg, #f0f7f2 0%, #e8f3ec 50%, #eef6f0 100%);
  color: #1a3326;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

#hij-wrapper *, #hij-wrapper *::before, #hij-wrapper *::after {
  box-sizing: border-box;
}

/* ---------- Layout ---------- */
.hij-main-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.hij-hero {
  text-align: center;
  padding: 48px 16px 36px;
  position: relative;
}

.hij-hero::before {
  content: '☽';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 36px;
  opacity: 0.12;
  color: #006633;
  line-height: 1;
}

.hij-hero-title {
  font-family: 'Palatino Linotype', 'Palatino', 'Book Antiqua', serif;
  font-size: clamp(26px, 5vw, 48px);
  font-weight: 700;
  color: #0d2b1a;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.hij-hero-title span {
  color: #006633;
}

.hij-hero-subtitle {
  font-size: clamp(14px, 2.5vw, 18px);
  color: #3d7a58;
  margin: 0;
  font-style: italic;
  opacity: 0.9;
}

/* ---------- Glass Cards ---------- */
.hij-glass {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 102, 51, 0.14);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(0, 80, 40, 0.09), inset 0 1px 0 rgba(255,255,255,0.9);
}

.hij-section-title {
  font-family: 'Palatino Linotype', 'Palatino', serif;
  font-size: clamp(18px, 3vw, 26px);
  color: #006633;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 102, 51, 0.15);
  letter-spacing: 0.3px;
}

/* ---------- Calendar Section ---------- */
.hij-calendar-wrap {
  padding: 28px;
  margin-bottom: 24px;
}

.hij-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.hij-cal-title {
  text-align: center;
  flex: 1;
}

.hij-cal-month-name {
  font-family: 'Palatino Linotype', 'Palatino', serif;
  font-size: clamp(18px, 3.5vw, 28px);
  font-weight: 700;
  color: #0d2b1a;
  margin: 0;
  line-height: 1.2;
}

.hij-cal-year-name {
  font-size: 13px;
  color: #3d7a58;
  margin: 2px 0 0;
  font-style: italic;
}

.hij-btn {
  background: #ffffff;
  border: 1.5px solid rgba(0, 102, 51, 0.3);
  color: #006633;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  font-weight: 600;
}

.hij-btn:hover {
  background: #006633;
  color: #ffffff;
  border-color: #006633;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(0,102,51,0.25);
}

.hij-btn:active { transform: translateY(0); }

.hij-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.hij-weekday-label {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #3d7a58;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 6px 2px;
}

.hij-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.hij-cal-day {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: default;
  transition: all 0.15s ease;
  min-height: 42px;
  min-width: 0;
}

.hij-cal-day.hij-has-date {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 102, 51, 0.1);
}

.hij-cal-day.hij-has-date:hover {
  background: rgba(0, 102, 51, 0.08);
  border-color: rgba(0, 102, 51, 0.25);
}

.hij-cal-day.hij-today {
  background: #006633 !important;
  border: 1.5px solid #004d26 !important;
  box-shadow: 0 3px 14px rgba(0, 102, 51, 0.35);
}

.hij-day-greg {
  font-size: clamp(12px, 2vw, 15px);
  font-weight: 600;
  color: #1a3326;
  line-height: 1;
}

.hij-day-hijri {
  font-size: clamp(9px, 1.5vw, 11px);
  color: #5a9e78;
  margin-top: 2px;
  line-height: 1;
}

.hij-today .hij-day-greg { color: #ffffff; }
.hij-today .hij-day-hijri { color: #a8dfc0; }

.hij-today-badge {
  position: absolute;
  top: 3px;
  right: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 5px rgba(255,255,255,0.8);
}

/* ---------- Adjustment Row ---------- */
.hij-adj-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.hij-adj-label {
  font-size: 13px;
  color: #3d7a58;
}

.hij-adj-select {
  background: #ffffff;
  border: 1.5px solid rgba(0, 102, 51, 0.25);
  color: #1a3326;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

.hij-adj-select:focus {
  border-color: #006633;
}

.hij-adj-select option { background: #ffffff; color: #1a3326; }

/* ---------- Today Banner ---------- */
.hij-today-banner {
  text-align: center;
  padding: 18px 16px;
  margin-bottom: 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #006633 0%, #007a3d 100%);
  border: none;
  box-shadow: 0 4px 20px rgba(0,102,51,0.25);
}

.hij-today-greg-display {
  font-size: clamp(13px, 2vw, 15px);
  color: #a8dfc0;
  margin: 0 0 4px;
}

.hij-today-hijri-display {
  font-family: 'Palatino Linotype', 'Palatino', serif;
  font-size: clamp(18px, 3.5vw, 28px);
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

/* ---------- Converter Section ---------- */
.hij-converter-wrap {
  padding: 28px;
  margin-bottom: 24px;
}

.hij-conv-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: #f0f7f2;
  border-radius: 12px;
  padding: 5px;
  border: 1px solid rgba(0,102,51,0.1);
}

.hij-tab-btn {
  flex: 1;
  padding: 10px 8px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #3d7a58;
  font-size: clamp(12px, 2vw, 14px);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  font-weight: 600;
  text-align: center;
}

.hij-tab-btn.hij-active {
  background: #006633;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0,102,51,0.3);
}

.hij-tab-panel { display: none; }
.hij-tab-panel.hij-active { display: block; }

.hij-form-group {
  margin-bottom: 16px;
}

.hij-form-label {
  display: block;
  font-size: 12px;
  color: #3d7a58;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 700;
}

.hij-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.hij-input, .hij-select-field {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid rgba(0, 102, 51, 0.2);
  color: #1a3326;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.hij-input:focus, .hij-select-field:focus {
  border-color: #006633;
  box-shadow: 0 0 0 3px rgba(0,102,51,0.1);
}

.hij-select-field option { background: #ffffff; color: #1a3326; }

.hij-convert-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #006633, #007a3d);
  border: none;
  color: #ffffff;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.3px;
  transition: all 0.2s;
  margin-top: 4px;
  box-shadow: 0 3px 12px rgba(0,102,51,0.3);
}

.hij-convert-btn:hover {
  background: linear-gradient(135deg, #004d26, #006633);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 102, 51, 0.4);
}

.hij-result-box {
  margin-top: 18px;
  padding: 20px;
  background: linear-gradient(135deg, #edf7f1, #f5fdf8);
  border: 1.5px solid rgba(0, 102, 51, 0.2);
  border-radius: 14px;
  text-align: center;
  display: none;
}

.hij-result-box.hij-show { display: block; }

.hij-result-label {
  font-size: 12px;
  color: #3d7a58;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 6px;
  font-weight: 700;
}

.hij-result-value {
  font-family: 'Palatino Linotype', 'Palatino', serif;
  font-size: clamp(18px, 4vw, 26px);
  font-weight: 700;
  color: #006633;
  margin: 0;
}

.hij-result-sub {
  font-size: 13px;
  color: #5a9e78;
  margin: 6px 0 0;
  font-style: italic;
}

/* ---------- Internal Links ---------- */
.hij-tools-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.hij-tool-card {
  display: block;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid rgba(0, 102, 51, 0.12);
  text-decoration: none;
  transition: all 0.2s;
  color: inherit;
  box-shadow: 0 2px 10px rgba(0,80,40,0.07);
}

.hij-tool-card:hover {
  background: #ffffff;
  border-color: rgba(0, 102, 51, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,80,40,0.14);
}

.hij-tool-icon {
  font-size: 24px;
  margin-bottom: 8px;
  display: block;
}

.hij-tool-name {
  font-size: 14px;
  font-weight: 700;
  color: #0d2b1a;
  margin: 0 0 4px;
}

.hij-tool-desc {
  font-size: 12px;
  color: #3d7a58;
  margin: 0;
}

/* ---------- Article Section ---------- */
.hij-article {
  padding: 36px 32px;
  margin-bottom: 24px;
  line-height: 1.8;
}

.hij-article h1 {
  font-family: 'Palatino Linotype', 'Palatino', serif;
  font-size: clamp(22px, 4vw, 36px);
  color: #0d2b1a;
  margin: 0 0 8px;
  line-height: 1.3;
}

.hij-article .hij-article-meta {
  font-size: 13px;
  color: #3d7a58;
  margin: 0 0 28px;
  font-style: italic;
}

.hij-article h2 {
  font-family: 'Palatino Linotype', 'Palatino', serif;
  font-size: clamp(17px, 3vw, 24px);
  color: #006633;
  margin: 36px 0 14px;
  padding-left: 14px;
  border-left: 3px solid #006633;
  line-height: 1.3;
}

.hij-article h3 {
  font-size: clamp(15px, 2.5vw, 18px);
  color: #1a5c38;
  margin: 22px 0 10px;
  font-weight: 700;
}

.hij-article p {
  font-size: clamp(14px, 2vw, 16px);
  color: #2a4a38;
  margin: 0 0 16px;
}

.hij-article strong {
  color: #0d2b1a;
  font-weight: 700;
}

.hij-article a {
  color: #006633;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hij-article a:hover { color: #004d26; }

/* Months Table */
.hij-months-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: clamp(12px, 2vw, 14px);
  border-radius: 10px;
  overflow: hidden;
}

.hij-months-table th {
  background: #006633;
  color: #e8f5e9;
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.hij-months-table td {
  padding: 9px 14px;
  color: #2a4a38;
  border-bottom: 1px solid rgba(0,102,51,0.08);
  vertical-align: top;
}

.hij-months-table tr:last-child td { border-bottom: none; }

.hij-months-table tr:nth-child(even) td {
  background: rgba(0, 102, 51, 0.04);
}

/* Important Dates */
.hij-dates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}

.hij-date-card {
  padding: 14px 16px;
  background: linear-gradient(135deg, #f2fbf6, #edf7f1);
  border: 1.5px solid rgba(0, 102, 51, 0.14);
  border-radius: 12px;
}

.hij-date-card .hij-dc-event {
  font-size: 13px;
  font-weight: 700;
  color: #0d2b1a;
  margin: 0 0 4px;
}

.hij-date-card .hij-dc-date {
  font-size: 12px;
  color: #3d7a58;
  margin: 0;
}

/* FAQ */
.hij-faq-item {
  border: 1.5px solid rgba(0, 102, 51, 0.12);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.65);
}

.hij-faq-q {
  padding: 15px 18px;
  font-size: clamp(13px, 2vw, 15px);
  font-weight: 600;
  color: #0d2b1a;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
  list-style: none;
}

.hij-faq-q::-webkit-details-marker { display: none; }
.hij-faq-q::marker { display: none; }

details[open] .hij-faq-q { color: #006633; }

.hij-faq-chevron {
  font-size: 12px;
  color: #3d7a58;
  transition: transform 0.2s;
  flex-shrink: 0;
}

details[open] .hij-faq-chevron { transform: rotate(180deg); }

.hij-faq-a {
  padding: 0 18px 15px;
  font-size: clamp(13px, 2vw, 15px);
  color: #2a4a38;
  line-height: 1.7;
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .hij-article { padding: 24px 18px; }
  .hij-calendar-wrap, .hij-converter-wrap { padding: 20px 16px; }
  .hij-cal-day { border-radius: 7px; }
  .hij-weekday-label { font-size: 9px; letter-spacing: 0; }
  .hij-months-table th, .hij-months-table td { padding: 8px 10px; }
}

@media (max-width: 360px) {
  .hij-cal-grid { gap: 2px; }
  .hij-weekdays { gap: 2px; }
  .hij-cal-day { min-height: 36px; border-radius: 6px; }
  .hij-day-greg { font-size: 11px; }
  .hij-day-hijri { font-size: 8px; }
}