/* ==========================================================================
   PORTAL RASMI BAHAGIAN KHIDMAT PENGURUSAN & SEKSYEN ICT
   PEJABAT SETIAUSAHA KERAJAAN JOHOR (SUKJ)
   Single Screen 100% Fullscreen Viewport (No Scroll) + Clean Admin Drawer
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,400;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Johor State Official Color Palette */
  --johor-blue-dark: #071739;
  --johor-blue-primary: #0B2545;
  --johor-blue-royal: #133E87;
  --johor-blue-light: #1D4ED8;
  --johor-blue-soft: #EEF4FF;

  --johor-red-primary: #C8102E;
  --johor-red-deep: #A50E24;
  --johor-red-accent: #E63946;
  --johor-red-soft: #FDF2F2;

  --johor-gold-primary: #D4AF37;
  --johor-gold-rich: #B8860B;
  --johor-gold-bright: #F59E0B;
  --johor-gold-dark: #A17917;
  --johor-gold-soft: #FEF9C3;

  --neutral-dark: #0F172A;
  --neutral-slate: #334155;
  --neutral-muted: #64748B;
  --neutral-border: #E2E8F0;
  --neutral-bg-alt: #F8FAFC;
  --neutral-white: #FFFFFF;

  /* Fonts */
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-heading: 'Cinzel', 'Plus Jakarta Sans', sans-serif;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Viewport & Body Settings */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
}

body {
  width: 100vw;
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: var(--font-body);
  color: var(--neutral-slate);
  background-color: #F8FAFC;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.font-serif-title {
  font-family: var(--font-serif);
}

.font-heading-cinzel {
  font-family: var(--font-heading);
}

/* -------------------------------------------------------------
   MAIN NAVBAR (JOHOR ROYAL BLUE & GOLD THEME)
   ------------------------------------------------------------- */
.navbar-clean {
  background: #071739;
  border-bottom: 2px solid #D4AF37;
  flex-shrink: 0;
  height: 56px;
  display: flex;
  align-items: center;
  z-index: 40;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.navbar-clean .text-johor-dark {
  color: #FFFFFF !important;
}

.navbar-clean .text-slate-500 {
  color: #D4AF37 !important;
}

/* -------------------------------------------------------------
   HERO SECTION - ELEGANT TRANSLUCENT WHITE OVERLAY (TERANG & LEMBUT)
   ------------------------------------------------------------- */
.hero-cinematic-fullscreen {
  position: relative;
  flex-grow: 1;
  background-color: #F8FAFC;
  background-size: cover;
  background-position: right top !important;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: background-image 0.5s ease-in-out;
}

/* Soft Translucent White Overlay - Transparent over the 2 officers on the right */
.hero-cinematic-fullscreen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(255, 255, 255, 0.82) 32%,
    rgba(255, 255, 255, 0.20) 55%,
    transparent 72%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 768px) {
  .hero-cinematic-fullscreen {
    background-position: 80% top !important;
  }
  .hero-cinematic-fullscreen::before {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.90) 0%,
      rgba(255, 255, 255, 0.70) 50%,
      rgba(255, 255, 255, 0.35) 100%
    );
  }
}

.hero-main-content {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  flex-grow: 1;
  padding: 0.5rem 0;
}

/* Accent Tag */
.hero-tag-accent {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--johor-red-primary);
  font-size: clamp(0.65rem, 0.85vw, 0.72rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-tag-accent::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--johor-gold-primary);
}

/* Serif Majestic Headline - Compact & Refined */
.hero-title-majestic {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.3vw, 2.3rem);
  font-weight: 700;
  line-height: 1.18;
  color: var(--johor-blue-dark);
  letter-spacing: -0.01em;
}

.hero-title-majestic .text-gold-highlight {
  color: var(--johor-gold-rich);
}

.hero-subtext-majestic {
  font-size: clamp(0.75rem, 0.95vw, 0.85rem);
  color: var(--neutral-slate);
  max-width: 440px;
  line-height: 1.45;
  font-weight: 500;
}

/* Red Button */
.btn-johor-rect {
  background-color: var(--johor-red-primary);
  color: #FFFFFF !important;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.65rem 1.3rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: none;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 15px rgba(200, 16, 46, 0.35);
  cursor: pointer;
}

.btn-johor-rect:hover {
  background-color: var(--johor-red-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(200, 16, 46, 0.5);
}

.btn-johor-rect i {
  transition: transform var(--transition-fast);
}

.btn-johor-rect:hover i {
  transform: translateY(3px);
}

/* Location Tag on bottom right of Hero - Hidden to prevent blocking officers */
.hero-location-badge {
  display: none !important;
}

.hero-location-sub {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--neutral-muted);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-weight: 700;
}

.hero-location-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--johor-blue-dark);
}

/* -------------------------------------------------------------
   THE HORIZONTAL SYSTEM STRIP (SINGLE ROW 7-CARDS MOUSEOVER EFFECT)
   ------------------------------------------------------------- */
.system-strip-container {
  position: relative;
  z-index: 20;
  width: 100%;
  flex-shrink: 0;
}

.system-strip-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: #FFFFFF;
  box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.1);
  border-top: 2px solid var(--johor-gold-primary);
  width: 100%;
}

@media (max-width: 768px) {
  .system-strip-grid {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .system-strip-grid::-webkit-scrollbar {
    display: none;
  }
  .system-strip-card {
    min-width: 110px;
    flex: 1 0 110px;
  }
}

/* System Strip Card (Default: Clean White, On-Hover: Deep Navy Blue) */
.system-strip-card {
  position: relative;
  background: #FFFFFF;
  color: var(--neutral-slate);
  padding: 0.65rem 0.65rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--neutral-border);
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition-normal);
  min-height: 80px;
}

.system-strip-card:last-child {
  border-right: none;
}

/* Gold Top Accent Line that animates on Hover */
.system-strip-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--johor-gold-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

/* Number in top right (01, 02, 03, ...) */
.strip-card-number {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: #CBD5E1;
  line-height: 1;
  transition: all var(--transition-normal);
  user-select: none;
}

/* Icon Container */
.strip-card-icon {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(200, 16, 46, 0.25);
  background: #FFF5F5;
  color: var(--johor-red-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
  border-radius: 5px;
  transition: all var(--transition-normal);
}

.strip-card-title {
  font-family: var(--font-heading);
  font-size: clamp(0.72rem, 0.78vw, 0.8rem);
  font-weight: 800;
  color: var(--johor-blue-primary);
  letter-spacing: 0.01em;
  margin-bottom: 0.08rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition-normal);
}

.strip-card-subtitle {
  font-size: clamp(0.6rem, 0.66vw, 0.65rem);
  color: var(--neutral-muted);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition-normal);
}

/* Arrow in bottom right */
.strip-card-arrow {
  position: absolute;
  bottom: 0.45rem;
  right: 0.55rem;
  color: var(--johor-red-primary);
  font-size: 0.65rem;
  transition: all var(--transition-normal);
}

/* =============================================================
   🔥 THE MOUSE OVER (HOVER) EFFECT & ACTIVE STATE
   ============================================================= */
.system-strip-card:hover,
.system-strip-card.is-active {
  background: var(--johor-blue-dark) !important;
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(7, 23, 57, 0.4);
  z-index: 5;
}

.system-strip-card:hover::before,
.system-strip-card.is-active::before {
  transform: scaleX(1);
}

.system-strip-card:hover .strip-card-number,
.system-strip-card.is-active .strip-card-number {
  color: #FFFFFF;
  transform: scale(1.08);
}

.system-strip-card:hover .strip-card-icon,
.system-strip-card.is-active .strip-card-icon {
  background: rgba(212, 175, 55, 0.15) !important;
  border-color: var(--johor-gold-primary);
  color: var(--johor-gold-primary) !important;
  transform: rotate(6deg) scale(1.05);
}

.system-strip-card:hover .strip-card-title,
.system-strip-card.is-active .strip-card-title {
  color: #FFFFFF !important;
}

.system-strip-card:hover .strip-card-subtitle,
.system-strip-card.is-active .strip-card-subtitle {
  color: #94A3B8 !important;
}

.system-strip-card:hover .strip-card-arrow,
.system-strip-card.is-active .strip-card-arrow {
  color: var(--johor-gold-primary) !important;
  transform: translate(3px, -3px);
}

/* -------------------------------------------------------------
   LOWER MINI FOOTER (SLIM 1-LINE FOOTER)
   ------------------------------------------------------------- */
.bottom-mini-footer {
  background: #FFFFFF;
  color: var(--neutral-muted);
  font-size: 0.6875rem;
  padding: 0.5rem 1.5rem;
  border-top: 1px solid var(--neutral-border);
  flex-shrink: 0;
  height: 32px;
  display: flex;
  align-items: center;
}

/* =============================================================
   ADMIN INLINE EDITING & WYSIWYG STYLING
   ============================================================= */
.editable-highlight {
  outline: 2px dashed rgba(212, 175, 55, 0.7) !important;
  outline-offset: 4px;
  cursor: text !important;
  position: relative;
  transition: outline-color var(--transition-fast);
}

.editable-highlight:hover {
  outline-color: #F59E0B !important;
  background-color: rgba(212, 175, 55, 0.1);
}

.editable-highlight:focus {
  outline: 2px solid #22C55E !important;
  background-color: rgba(34, 197, 94, 0.1);
}

/* Floating WYSIWYG Toolbar */
#wysiwygToolbar {
  position: absolute;
  z-index: 100;
  background: #0B2545;
  border: 1px solid #D4AF37;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  padding: 4px 6px;
  display: none;
  align-items: center;
  gap: 4px;
}

#wysiwygToolbar button {
  background: transparent;
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  transition: background var(--transition-fast);
}

#wysiwygToolbar button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FDE047;
}

/* =============================================================
   ADMIN SLIDE-OUT DRAWER (CLEAN & NON-INTRUSIVE)
   ============================================================= */
.admin-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 23, 57, 0.6);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.admin-drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.admin-drawer-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: #FFFFFF;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.25);
  z-index: 95;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.admin-drawer-overlay.is-open .admin-drawer-sidebar {
  transform: translateX(0);
}
