/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--light);
  color: #222;
  font-family: var(--font-sans);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* iPhone safe area */
  padding-bottom: env(safe-area-inset-bottom);
}

/* =============================================
   HEADER & NAV
   ============================================= */
header {
  background: var(--white);
  padding: 20px 1%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 999;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo img {
  width: 70px;
}

.logo h1 {
  color: var(--navy);
  font-size: 28px;
  font-family: var(--font-sans);
}

.logo p {
  color: #666;
  font-size: 14px;
  font-family: var(--font-sans);
}

.nav-links {
  display: flex;
  gap: 25px;
  align-items: center;
}

.nav-links a {
   padding: 5px 2px 5px 2px;
  text-decoration:none;
  color:#222;
  font-size:17px;
  transition:.3s;
  font-weight:bold;
  font-family: var(--font-sans);
}

.nav-links a:hover {
  color: var(--blue);
}

.nav-links a.active-page {
  color: var(--blue);
}

.login-btn{
  padding:5px 10px 5px 10px;
  color: var(--white) !important;
  background:var(--blue);
  border:none;
  font-size:15px;
  font-family: var(--font-sans);
  border-radius: var(--radius-full);
  cursor:pointer;
  transition:.3s;
}

.login-btn:hover {
  background: var(--navy) !important;
}

/* hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--navy);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

/* =============================================
   PAGE WRAPPER
   ============================================= */
.lm-layout {
  display: grid;
  /* RTL: column 1 = rightmost → sidebar; column 2 = leftmost → content */
  grid-template-columns: 260px 1fr;
  align-items: start;
  gap: 30px;
  flex: 1;
  max-width: 1300px;
  margin: 0 auto;
  padding: 50px 30px;
  width: 100%;
}

/* =============================================
   SIDEBAR (RIGHT in RTL)
   ============================================= */
.lm-sidebar {
  position: sticky;
  top: 85px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 28px 18px;
  overflow: hidden;
}

.lm-sidebar h3 {
  color: var(--navy);
  font-size: 15px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.lm-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 5px;
  border-radius: 9px;
  text-decoration: none;
  color: #444;
  font-size: 15px;
  font-weight: bold;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border-right: 3px solid transparent;
  min-height: 44px; /* iOS tap target */
}

.lm-sidebar a i {
  color: var(--blue);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.lm-sidebar a:hover {
  background: var(--light);
  color: var(--navy);
}

.lm-sidebar a.active {
  background: #e8f0fb;
  color: var(--navy);
  border-right-color: var(--blue);
}

/* =============================================
   CONTENT AREA
   ============================================= */
.lm-content {
  min-width: 0;
}

.lm-section {
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding: 45px 40px;
  margin-bottom: 35px;
  scroll-margin-top: 95px;
}

.lm-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--light);
}

.lm-section-header i {
  font-size: 24px;
  color: var(--blue);
  background: #e8f0fb;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
}

.lm-section-header h2 {
  color: var(--navy);
  font-size: 26px;
}

/* ── ABOUT ── */
.lm-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 30px;
}

.lm-about-grid img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.lm-about-grid p {
  line-height: 2.2;
  color: #555;
  font-size: 16px;
}

.lm-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.lm-stat {
  background: var(--light);
  border-top: 4px solid var(--blue);
  border-radius: 10px;
  padding: 22px 15px;
  text-align: center;
}

.lm-stat i {
  font-size: 26px;
  color: var(--blue);
  margin-bottom: 8px;
  display: block;
}

.lm-stat h4 {
  font-size: 24px;
  color: var(--navy);
}

.lm-stat p {
  color: #666;
  font-size: 13px;
  margin-top: 4px;
}

/* ── ORG CHART ── */
.lm-org {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lm-org-level {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 10px 0;
}

.lm-org-card {
  background: var(--white);
  border: 2px solid #dce8f7;
  border-radius: 12px;
  padding: 18px 22px;
  text-align: center;
  min-width: 130px;
  transition: box-shadow 0.2s;
}

.lm-org-card:hover {
  box-shadow: 0 6px 20px rgba(8, 43, 92, 0.12);
}

.lm-org-card.top {
  border-color: var(--blue);
  background: #e8f0fb;
}

.lm-org-card img {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  border: 3px solid var(--blue);
}

.lm-org-card h4 {
  color: var(--navy);
  font-size: 14px;
  margin-bottom: 4px;
}

.lm-org-card p {
  color: var(--gray);
  font-size: 12px;
}

.lm-org-connector {
  width: 2px;
  height: 28px;
  background: #c0d4ee;
  margin: 0 auto;
}

.lm-org-connector-h {
  height: 2px;
  background: #c0d4ee;
  width: 55%;
  margin: 0 auto;
}

/* ── ACHIEVEMENTS ── */
.lm-achievements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.lm-achievement-card {
  background: var(--light);
  border-radius: 10px;
  padding: 22px 20px;
  border-right: 4px solid var(--blue);
  transition: transform 0.2s, box-shadow 0.2s;
}

.lm-achievement-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.lm-achievement-card i {
  font-size: 22px;
  color: var(--blue);
  margin-bottom: 10px;
  display: block;
}

.lm-achievement-card h3 {
  color: var(--navy);
  margin-bottom: 6px;
  font-size: 16px;
}

.lm-achievement-card p {
  color: #666;
  font-size: 13px;
  line-height: 1.8;
}

/* ── GOALS ── */
.lm-goals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.lm-goal-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--light);
  border-radius: 10px;
  padding: 20px;
}

.lm-goal-item > i {
  font-size: 20px;
  color: var(--blue);
  margin-top: 3px;
  flex-shrink: 0;
}

.lm-goal-item h4 {
  color: var(--navy);
  margin-bottom: 5px;
  font-size: 15px;
}

.lm-goal-item p {
  color: #666;
  font-size: 13px;
  line-height: 1.8;
}

/* ── SEMESTERS ── */
.lm-semesters {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lm-semester-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  align-items: start;
}

.lm-semester-num {
  width: 58px;
  height: 58px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  flex-shrink: 0;
}

.lm-semester-body {
  background: var(--light);
  border-radius: 10px;
  padding: 18px 22px;
}

.lm-semester-body h4 {
  color: var(--navy);
  font-size: 16px;
  margin-bottom: 7px;
}

.lm-semester-body p {
  color: #666;
  font-size: 14px;
  line-height: 1.9;
}

/* ── TIMELINE (history) ── */
.lm-timeline {
  position: relative;
  padding-right: 30px;
}

.lm-timeline::before {
  content: '';
  position: absolute;
  right: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #c0d4ee;
}

.lm-timeline-item {
  position: relative;
  margin-bottom: 30px;
}

.lm-timeline-item::before {
  content: '';
  position: absolute;
  right: -26px;
  top: 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--blue);
}

.lm-timeline-year {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-size: 14px;
  font-weight: bold;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.lm-timeline-body {
  background: var(--light);
  border-radius: 10px;
  padding: 18px 22px;
}

.lm-timeline-body h4 {
  color: var(--navy);
  font-size: 16px;
  margin-bottom: 6px;
}

.lm-timeline-body p {
  color: #666;
  font-size: 14px;
  line-height: 1.9;
}

/* ── STRATEGIC PLAN ── */
.lm-strategy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.lm-strategy-card {
  background: var(--light);
  border-radius: 10px;
  padding: 22px 20px;
  border-right: 4px solid var(--blue);
}

.lm-strategy-card.full {
  grid-column: 1 / -1;
}

.lm-strategy-card h4 {
  color: var(--navy);
  font-size: 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lm-strategy-card h4 i {
  color: var(--blue);
  font-size: 16px;
}

.lm-strategy-card p {
  color: #555;
  font-size: 14px;
  line-height: 1.9;
}

.lm-values {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.lm-value-tag {
  background: var(--white);
  border: 2px solid var(--blue);
  color: var(--navy);
  border-radius: 20px;
  padding: 6px 18px;
  font-size: 14px;
  font-weight: bold;
}

.lm-slogan-box {
  background: var(--navy);
  color: var(--white);
  border-radius: 12px;
  padding: 22px 28px;
  text-align: center;
  margin-top: 4px;
}

.lm-slogan-box p {
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* ── PROJECTS ── */
.lm-projects-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.lm-project-group {
  background: var(--light);
  border-radius: 12px;
  padding: 24px 20px;
}

.lm-project-group h3 {
  color: var(--navy);
  font-size: 17px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #dce8f7;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lm-project-group h3 i {
  color: var(--blue);
}

.lm-project-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--white);
  border-radius: 8px;
  margin-bottom: 8px;
}

.lm-project-item i {
  color: var(--blue);
  font-size: 14px;
  flex-shrink: 0;
}

.lm-project-item span {
  color: var(--navy);
  font-size: 14px;
  font-weight: bold;
}

.lm-project-item .lm-badge {
  margin-right: auto;
  background: #e8f0fb;
  color: var(--blue);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 10px;
}

.lm-general-sub {
  margin-top: 14px;
}

.lm-general-sub h4 {
  color: #555;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  margin-top: 12px;
  padding-right: 4px;
}

.lm-project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lm-project-tag {
  background: var(--white);
  border: 1px solid #c0d4ee;
  color: var(--navy);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
}

/* ── ACCORDION ── */
.lm-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lm-acc-group {
  border: 2px solid #dce8f7;
  border-radius: 12px;
  overflow: hidden;
}

.lm-acc-group-header {
  background: var(--navy);
  color: var(--white);
  padding: 16px 22px;
  font-size: 17px;
  font-weight: bold;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 10px;
}

.lm-acc-group-header i { font-size: 16px; }

.lm-acc-items { padding: 12px; background: var(--light); }

/* each accordion item */
.lm-acc-item {
  background: var(--white);
  border-radius: 9px;
  margin-bottom: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.lm-acc-item:last-child { margin-bottom: 0; }

.lm-acc-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: right;
  font-family: var(--font-sans);
  transition: background 0.2s;
  min-height: 52px;
}

.lm-acc-trigger:hover { background: #f0f5fc; }

.lm-acc-trigger.open { background: #e8f0fb; }

.lm-acc-trigger i.acc-icon {
  color: var(--blue);
  font-size: 16px;
  flex-shrink: 0;
}

.lm-acc-trigger .acc-title {
  flex: 1;
  color: var(--navy);
  font-size: 15px;
  font-weight: bold;
}

.lm-acc-trigger .acc-badge {
  background: #e8f0fb;
  color: var(--blue);
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 12px;
  white-space: nowrap;
}

.lm-acc-trigger .acc-arrow {
  color: var(--gray);
  font-size: 13px;
  transition: transform 0.25s;
  margin-right: auto;
  flex-shrink: 0;
}

[dir="rtl"] .lm-acc-trigger .acc-arrow { margin-right: 0; margin-left: auto; }

.lm-acc-trigger.open .acc-arrow { transform: rotate(180deg); }

.lm-acc-body {
  display: none;
  padding: 18px 20px 20px;
  border-top: 1px solid #e8f0fb;
  font-family: var(--font-sans);
  color: #555;
  font-size: 14px;
  line-height: 1.9;
}

.lm-acc-body.open { display: block; }

.lm-acc-body p { margin-bottom: 10px; }
.lm-acc-body p:last-child { margin-bottom: 0; }

/* tags inside accordion body */
.lm-acc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.lm-acc-tag {
  background: var(--light);
  border: 1px solid #c0d4ee;
  color: var(--navy);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
}

/* ── ACHIEVEMENT ENTRIES (icon-row cards inside accordion bodies) ── */
.lm-ach-list { display: flex; flex-direction: column; gap: 12px; }

.lm-ach-entry {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--white);
  border-radius: 10px;
  padding: 16px 18px;
  border-right: 4px solid var(--blue);
  transition: transform 0.2s, box-shadow 0.2s;
}

.lm-ach-entry:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.lm-ach-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--light);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.lm-ach-content { flex: 1; min-width: 0; }

.lm-ach-content h5 {
  color: var(--navy);
  font-size: 15px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.lm-ach-content p {
  color: #666;
  font-size: 13.5px;
  line-height: 1.85;
  margin: 0;
}

.lm-ach-stat {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-size: 11px;
  font-weight: bold;
  padding: 3px 11px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── ACHIEVEMENTS PLACEHOLDER ── */
.lm-ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.lm-ach-card {
  background: var(--light);
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  border-top: 4px solid var(--blue);
  transition: transform 0.2s, box-shadow 0.2s;
}

.lm-ach-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.lm-ach-card i {
  font-size: 30px;
  color: var(--blue);
  margin-bottom: 12px;
  display: block;
}

.lm-ach-card h3 {
  color: var(--navy);
  font-size: 15px;
  margin-bottom: 6px;
}

.lm-ach-card p {
  color: #999;
  font-size: 12px;
  font-style: italic;
}

/* =============================================
   FOOTER
   ============================================= */
.main-footer {
  background: #061b38;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 7%;
  height: 70px;
  margin-top: auto;
  /* iPhone safe area */
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}

.footer-center {
  display: flex;
  gap: 12px;
}

.footer-center a {
  width: 40px;
  height: 40px;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 17px;
  border-radius: 12px;
  transition: background 0.2s, transform 0.2s;
}

.footer-center a:hover {
  background: var(--navy);
  transform: translateY(-3px);
}

.footer-right p {
  font-size: 13px;
}

/* =============================================
   MOBILE — tablet (≤900px)
   ============================================= */
@media (max-width: 900px) {
  .lm-layout {
    grid-template-columns: 1fr;
    padding: 20px 18px;
    gap: 0;
  }

  /* sidebar becomes horizontal tab strip at top */
  .lm-sidebar {
    position: static;
    border-radius: 12px;
    margin-bottom: 22px;
    padding: 14px 14px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  }

  .lm-sidebar h3 {
    width: 100%;
    margin-bottom: 8px;
    padding-bottom: 8px;
    font-size: 14px;
  }

  .lm-sidebar a {
    margin-bottom: 0;
    font-size: 13px;
    padding: 9px 13px;
    border-right: none;
    border-bottom: 2px solid transparent;
    border-radius: 8px;
    flex: 0 1 auto;
  }

  .lm-sidebar a.active {
    border-bottom-color: var(--blue);
    border-right: none;
  }

  .lm-about-grid {
    grid-template-columns: 1fr;
  }

  .lm-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .lm-goals {
    grid-template-columns: 1fr;
  }

  .lm-section {
    padding: 30px 22px;
  }
}

/* =============================================
   MOBILE — iPhone (≤480px)
   ============================================= */
@media (max-width: 480px) {
  /* header */
  header {
    padding: 12px 4%;
    padding-right: calc(4% + env(safe-area-inset-right));
    padding-left: calc(4% + env(safe-area-inset-left));
  }

  .logo img { width: 48px; height: 48px; }
  .logo h1  { font-size: 20px; }
  .logo p   { font-size: 11px; }

  .nav-links { display: none; }
  .hamburger { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 74px;
    right: 0;
    left: 0;
    background: var(--white);
    border-bottom: 2px solid var(--light);
    padding: 16px 5%;
    gap: 4px;
    z-index: 998;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  }

  .nav-links.open a {
    padding: 12px 10px;
    font-size: 16px;
    border-bottom: 1px solid var(--light);
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  /* layout */
  .lm-layout {
    padding: 14px 12px;
    padding-left: calc(12px + env(safe-area-inset-left));
    padding-right: calc(12px + env(safe-area-inset-right));
  }

  .lm-sidebar {
    padding: 12px 10px 8px;
    gap: 6px;
    border-radius: 10px;
  }

  .lm-sidebar a {
    font-size: 12px;
    padding: 8px 10px;
    gap: 6px;
  }

  .lm-sidebar a i { font-size: 13px; }

  .lm-section {
    padding: 22px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
  }

  .lm-section-header h2 { font-size: 20px; }
  .lm-section-header i  { width: 44px; height: 44px; font-size: 20px; }

  /* about */
  .lm-stats { grid-template-columns: 1fr; gap: 12px; }
  .lm-stat h4 { font-size: 20px; }

  /* org chart — stack on mobile */
  .lm-org-level { flex-direction: column; align-items: center; gap: 14px; }
  .lm-org-connector-h { display: none; }
  .lm-org-card { min-width: 200px; }

  /* strategy & projects */
  .lm-strategy-grid   { grid-template-columns: 1fr; }
  .lm-projects-split  { grid-template-columns: 1fr; }

  /* achievements */
  .lm-achievements { grid-template-columns: 1fr; }
  .lm-ach-grid     { grid-template-columns: repeat(2, 1fr); }

  /* goals */
  .lm-goals { grid-template-columns: 1fr; }

  /* semesters */
  .lm-semester-item { grid-template-columns: 48px 1fr; gap: 12px; }
  .lm-semester-num  { width: 48px; height: 48px; font-size: 17px; }

  /* footer */
  .main-footer {
    flex-direction: column;
    height: auto;
    gap: 10px;
    padding: 14px 5%;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    text-align: center;
  }
}
