/* Extracted inline styles from index.php and profil.php */

/* Profile dropdown basic styles */
.nav {
  position: relative;
}
.nav > li {
  position: relative;
}
.nav .submenu {
  position: absolute;
  left: 0;
  top: 40px;
  background: rgba(0, 0, 0, 0.85);
  padding: 10px 0;
  min-width: 200px;
  display: none;
  z-index: 9999;
}
.nav .submenu li {
  display: block;
}
.nav .submenu li a {
  color: #fff;
  padding: 8px 18px;
  display: block;
}
.nav > li:hover > .submenu {
  display: block;
}

/* Mobile: show submenu when parent has .open */
@media (max-width: 991px) {
  .nav {
    display: none;
  }
  .nav .submenu {
    position: relative;
    top: 0;
    background: transparent;
    padding: 0;
  }
  .nav .submenu li a {
    color: #fff;
    padding-left: 30px;
  }
  .nav.open {
    display: block !important;
  }
  .nav > li.open > .submenu {
    display: block;
  }
}

/* Selayang Pandang modern styles */
.selayang-section {
  padding: 60px 0;
  background: linear-gradient(180deg, #f6fbff, #ffffff);
}
.selayang-card {
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(12, 40, 80, 0.08);
  border: none;
  box-sizing: border-box;
}
/* Layout helpers to avoid Bootstrap 5 gap classes and ensure equal heights */
.selayang-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin: -12px;
}
.selayang-row > [class*="col-"] {
  padding: 12px;
}
.selayang-cards-row {
  display: flex;
  flex-wrap: wrap;
  margin: -12px;
}
.selayang-cards-row > [class*="col-"] {
  padding: 12px;
}
.selayang-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.selayang-hero {
  background: linear-gradient(135deg, #0ebeff 0%, #0077c8 100%);
  color: #fff;
  padding: 30px;
  border-radius: 12px;
}
.selayang-hero img {
  max-height: 90px;
}
.selayang-item {
  background: #fff;
  padding: 18px;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.selayang-item .icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}
.icon-calendar {
  background: #007bff;
}
.icon-legal {
  background: #6f42c1;
}
.icon-akta {
  background: #20c997;
}
.icon-visi {
  background: #fd7e14;
}
.icon-misi {
  background: #e83e8c;
}
.selayang-item h5 {
  margin: 0 0 6px 0;
  font-size: 16px;
}
.selayang-item p,
.selayang-item li {
  margin: 0;
  color: #33475b;
}
@media (max-width: 767px) {
  .selayang-hero {
    text-align: center;
  }
  .selayang-hero img {
    margin: 0 auto;
    max-width: 80px;
  }
}

/* Small helper used by profil.php */
.page-hero {
  padding: 36px 0;
}

/* Make the hero slightly taller for better visual balance */
.welcome-area.hero-compact {
  padding-top: 80px; /* increased top spacing */
  padding-bottom: 40px;
  min-height: 460px; /* ensure enough vertical space */
  display: flex;
  align-items: center;
}

/* Modernized two-column layout for selayang-pandang */
.selayang-section .left-heading h5 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f2940;
  margin-bottom: 0.5rem;
}
.selayang-section .left-text p {
  color: #33475b;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.selayang-section .list-unstyled {
  padding-left: 0;
  margin: 0;
}
.selayang-section .list-unstyled li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(16, 42, 67, 0.06);
}
.selayang-section .list-unstyled li:last-child {
  border-bottom: none;
}
.selayang-section .list-unstyled li strong {
  min-width: 160px;
  color: #0f2940;
  font-weight: 600;
}
.selayang-section .main-button {
  margin-top: 14px;
  padding: 10px 18px;
  border-radius: 8px;
}

@media (max-width: 991px) {
  .selayang-section {
    padding: 40px 0;
  }
  .selayang-section .list-unstyled li {
    flex-direction: column;
    gap: 6px;
  }
  .selayang-section .list-unstyled li strong {
    min-width: 0;
  }
}

/* Info cards for selayang-pandang */
.info-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 8px;
}
.info-cards li {
  background: #ffffff;
  padding: 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 20px rgba(12, 40, 80, 0.04);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}
.info-cards li:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(12, 40, 80, 0.08);
}
.info-cards .meta {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(12, 40, 80, 0.06);
}
.info-cards .content {
  flex: 1;
}
.info-cards .label {
  font-weight: 700;
  color: #0f2940;
}
.info-cards .value {
  margin-top: 6px;
  color: #33475b;
  line-height: 1.5;
}
.info-cards li:nth-child(1) .meta {
  background: linear-gradient(135deg, #0ebeff, #0077c8);
}
.info-cards li:nth-child(2) .meta {
  background: linear-gradient(135deg, #6f42c1, #5b2fa3);
}
.info-cards li:nth-child(3) .meta {
  background: linear-gradient(135deg, #20c997, #17a589);
}
.info-cards li:nth-child(4) .meta {
  background: linear-gradient(135deg, #fd7e14, #e76409);
}

@media (min-width: 768px) {
  .info-cards {
    grid-template-columns: 1fr 1fr;
  }
}

/* Organization chart styles */
.org-chart {
  margin-top: 18px;
  text-align: center;
}
.org-level {
  display: flex;
  justify-content: center;
  gap: 20px;
  position: relative;
  padding: 18px 0;
}
.org-level:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 2px;
  height: 18px;
  background: rgba(16, 42, 67, 0.08);
}
.org-node {
  background: #163a57;
  color: #fff;
  padding: 12px 18px;
  border-radius: 6px;
  min-width: 160px;
  box-shadow: 0 8px 20px rgba(12, 40, 80, 0.06);
  position: relative;
}
.org-node.big {
  padding: 14px 26px;
  font-weight: 700;
  min-width: 320px;
}
.org-node.small {
  min-width: 140px;
  background: #0f2940;
}
.coord-row {
  align-items: flex-start;
}
.coord-row::before {
  /* horizontal connector line */
  content: "";
  position: absolute;
  top: 8px;
  left: 6%;
  right: 6%;
  height: 2px;
  background: rgba(16, 42, 67, 0.08);
}
.coord-row .org-node::before {
  /* short vertical connector from horizontal line down to node */
  content: "";
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 18px;
  background: rgba(16, 42, 67, 0.08);
}
.org-node .node-title {
  font-weight: 700;
  font-size: 0.95rem;
}
.org-node .node-sub {
  margin-top: 6px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.2;
}

@media (max-width: 767px) {
  .org-level {
    flex-direction: column;
    gap: 12px;
  }
  .coord-row::before {
    display: none;
  }
  .coord-row .org-node::before {
    display: none;
  }
  .org-node {
    min-width: auto;
    width: 100%;
  }
  .org-node.big {
    min-width: auto;
  }
}

/* SVG wrapper styles */
.svg-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0 36px;
}
.org-svg {
  width: 100%;
  max-width: 1100px;
  height: auto;
  display: block;
}

/* Sebaran Anggota chart styles */
.chart-card {
  padding: 18px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(12, 40, 80, 0.04);
}
.chart-card canvas {
  width: 100% !important;
  height: 320px !important;
}
.section-heading h2 {
  color: #e65f00;
  text-align: center;
  margin-bottom: 18px;
  font-weight: 700;
}

/* Roadmap styles */
.roadmap-wrap {
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 8px 24px rgba(12, 40, 80, 0.04);
}
.roadmap-svg {
  min-height: 420px;
  width: 100%;
  height: 420px;
  display: block;
  overflow: visible;
  font-size: 16px;
  fill: #e65f00;
}
.roadmap-wrap .label {
  font-size: 16px;
  fill: #e65f00;
}
.roadmap-wrap .sub {
  font-size: 13px;
  fill: #666;
}
.roadmap-wrap .marker {
  fill: #133a5a;
  stroke: #e6e3da;
  stroke-width: 5;
}
.roadmap-wrap .pin {
  fill: #d9534f;
  stroke: #d9534f;
}
.roadmap-wrap .num {
  font-size: 11px;
  font-weight: 700;
}

/* Per-marker colors */
.roadmap-wrap .marker-1 {
  fill: #0ebeff;
  stroke: #cfeffb;
}
.roadmap-wrap .pin-2 {
  fill: #ef6f6f;
  stroke: #ef6f6f;
}
.roadmap-wrap .marker-3 {
  fill: #6f42c1;
  stroke: #e6e3da;
}
.roadmap-wrap .pin-4 {
  fill: #ff8a65;
  stroke: #ff8a65;
}
.roadmap-wrap .marker-5 {
  fill: #20c997;
  stroke: #d6f3e6;
}
.roadmap-wrap .marker-inner,
.roadmap-wrap .pin-inner {
  fill: #ffffff;
  stroke: #e6e3da;
}

/* Make year text darker and more visible */
.roadmap-wrap .sub {
  font-size: 13px;
  fill: #163a57;
  font-weight: 700;
}

/* Hero action buttons */
.hero-actions {
  padding: 18px 0 28px;
}
.action-btn {
  width: 160px;
  height: 88px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 8px 26px rgba(12, 40, 80, 0.04);
}
.action-label {
  font-weight: 700;
  color: #e65f00;
  font-size: 14px;
  margin-top: 4px;
}

.hero-actions {
  padding: 28px 0 36px;
}
.hero-actions .container {
  max-width: 1150px;
}
.action-btn {
  width: 200px;
  height: 100px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), #ffffff);
  border: 1px solid rgba(18, 40, 60, 0.06);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
  box-shadow: 0 8px 30px rgba(12, 40, 80, 0.04);
  color: #0f2940;
}
/* control spacing for the action row so gaps are consistent and not huge */
.hero-actions .d-flex {
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.icon-svg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px; /* give inner breathing room for the glyph */
  box-shadow: 0 8px 20px rgba(12, 40, 80, 0.08);
  background-size: cover;
}
.action-icon {
  width: 28px;
  height: 28px;
  display: block;
}
.action-label {
  font-weight: 700;
  color: #0f2940;
  font-size: 15px;
  margin-top: 2px;
}
.action-btn .icon-svg svg {
  width: 28px;
  height: 28px;
  display: block;
}

/* Font Awesome icon sizing inside circular background */
.action-btn .icon-svg i.fa {
  color: #ffffff !important;
  font-size: 20px;
  width: 28px;
  height: 28px;
  display: inline-block;
  line-height: 28px;
  text-align: center;
}
.action-btn:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(12, 40, 80, 0.12);
}

/* Distinct icon gradients */
.action-btn:nth-child(1) .fa {
  background: linear-gradient(135deg, #0ebeff, #0077c8);
}
.action-btn:nth-child(2) .fa {
  background: linear-gradient(135deg, #6f42c1, #5b2fa3);
}
.action-btn:nth-child(3) .fa {
  background: linear-gradient(135deg, #20c997, #17a589);
}

/* fourth action: Visi & Misi (orange) */
.action-btn:nth-child(4) .fa,
.action-btn:nth-child(4) .icon-svg {
  background: linear-gradient(135deg, #ff9f43, #ff6b00);
}

/* Responsive: stack on small screens */
@media (max-width: 767px) {
  .hero-actions .d-flex {
    gap: 12px;
    flex-wrap: wrap;
  }
  .action-btn {
    width: 48%;
    height: 94px;
  }
}

/* Make icon container a full circle on small screens */
@media (max-width: 767px) {
  .action-btn {
    height: 110px; /* give a bit more vertical room for larger circle */
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .action-btn .icon-svg {
    width: 64px;
    height: 64px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(12, 40, 80, 0.08);
  }
  .action-btn .icon-svg i.fa {
    width: 64px;
    height: 64px;
    line-height: 64px;
    font-size: 22px;
  }
  .action-label {
    font-size: 14px;
  }
}

/* Modal SVG responsiveness */
.modal-body svg {
  max-width: 100%;
  height: auto;
  display: block;
}
.modal-body canvas {
  width: 100% !important;
  height: 360px !important;
}

/* Modal SVG responsiveness */
.modal-body svg {
  max-width: 100%;
  height: auto;
  display: block;
}
.modal-body canvas {
  width: 100% !important;
  height: 360px !important;
}

@media (max-width: 767px) {
  .roadmap-wrap .label {
    font-size: 14px;
  }
  .roadmap-wrap .sub {
    font-size: 12px;
  }
}

/* Modern Visi & Misi modal styling */
.modal .selayang-card {
  padding: 20px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 14px 40px rgba(12, 40, 80, 0.06);
}
.modal .selayang-card .vm-grid {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.modal .vm-vision {
  flex: 0 0 320px;
  background: linear-gradient(135deg, #0ebeff, #0077c8);
  color: #fff;
  padding: 22px;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(14, 40, 72, 0.18);
}
.modal .vm-vision .meta {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 12px;
}
.modal .vm-vision h5 {
  margin: 0 0 10px 0;
  color: #fff;
}
.modal .vm-vision p {
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.5;
}
.modal .vm-mission {
  flex: 1 1 auto;
}
.modal .vm-mission h5 {
  color: #0f2940;
  margin-bottom: 8px;
}
.modal .vm-mission ol {
  padding-left: 0;
  margin: 0;
  list-style: none;
}
.modal .vm-mission li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.modal .vm-number {
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e65f00;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(230, 95, 0, 0.18);
}
.modal .vm-text {
  color: #33475b;
  line-height: 1.5;
}

@media (max-width: 767px) {
  .modal .selayang-card .vm-grid {
    flex-direction: column;
  }
  .modal .vm-vision {
    flex: none;
    width: 100%;
  }
}
