/* ── Variables ── */
:root {
  --primary: #1B3A6B;
  --primary-dark: #122a52;
  --accent: #D4201B;
  --light-bg: #F7F8FA;
  --text: #2D3748;
  --text-muted: #718096;
  --border: #E2E8F0;
  --white: #ffffff;
  --section-pad: 80px;
}

/* ── Base ── */
* { box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; color: var(--text); background: var(--white); }
h1,h2,h3,h4,h5,h6 { font-weight: 700; }
.fw-700 { font-weight: 700; }
img { max-width: 100%; }
a { text-decoration: none; }

/* ── Top bar ── */
#topBar {
  background: var(--primary-dark);
  padding: 6px 0;
  font-size: 0.78rem;
}
#topBar a { color: rgba(255,255,255,0.65); transition: color 0.2s; }
#topBar a:hover { color: #fff; }
.top-contact { gap: 1.2rem !important; }
.top-social {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: rgba(255,255,255,0.7);
  transition: all 0.2s;
}
.top-social:hover { background: var(--accent); color: #fff; }

/* ── Navbar ── */
#mainNav {
  background: var(--primary);
  padding: 14px 0;
  transition: all 0.3s;
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
#mainNav .navbar-brand span { font-size: 1.3rem; letter-spacing: -0.3px; }
#mainNav .nav-link { color: rgba(255,255,255,0.85) !important; font-size: 0.9rem; font-weight: 500; padding: 8px 12px !important; border-radius: 6px; transition: all 0.2s; }
#mainNav .nav-link:hover { color: #fff !important; background: rgba(255,255,255,0.1); }
#mainNav .dropdown-menu { border: none; box-shadow: 0 10px 40px rgba(0,0,0,0.12); border-radius: 10px; padding: 8px; margin-top: 8px; }
#mainNav .dropdown-item { border-radius: 6px; padding: 8px 14px; font-size: 0.88rem; font-weight: 500; color: var(--text); transition: all 0.2s; }
#mainNav .dropdown-item:hover { background: var(--light-bg); color: var(--primary); }

/* ── Brand mark ── */
.logo-wrap {
  width: 40px; height: 40px;
  background: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 3px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.2);
}
.logo-wrap img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-size: 1rem; font-weight: 800; letter-spacing: 0.5px; color: #fff; }
.brand-sub { font-size: 0.6rem; font-weight: 500; letter-spacing: 3px; color: rgba(255,255,255,0.55); margin-top: 2px; }

/* ── Buttons ── */
.btn-accent { background: var(--accent); color: #fff; font-weight: 600; border: none; border-radius: 8px; padding: 10px 24px; transition: all 0.2s; }
.btn-accent:hover { background: #b81a15; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(212,32,27,0.35); }
.btn-primary-solid { background: var(--primary); color: #fff; font-weight: 600; border: none; border-radius: 8px; padding: 12px 30px; transition: all 0.2s; }
.btn-primary-solid:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-outline-light-custom { border: 2px solid rgba(255,255,255,0.6); color: #fff; font-weight: 600; border-radius: 8px; padding: 10px 24px; transition: all 0.2s; }
.btn-outline-light-custom:hover { background: #fff; color: var(--primary); }
.text-accent { color: var(--accent) !important; }

/* ── Section ── */
.section { padding: var(--section-pad) 0; }
.section-light { background: var(--light-bg); }
.section-dark { background: var(--primary); color: #fff; }
.section-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--text); margin-bottom: 0.5rem; }
.section-title-white { color: #fff; }
.section-subtitle { color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* ── Hero ── */
.hero-carousel { position: relative; }
.hero-slide {
  min-height: 90vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  position: relative;
}
.hero-slide::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(27,58,107,0.85) 0%, rgba(27,58,107,0.5) 100%);
}
.hero-content { position: relative; z-index: 2; }
.hero-heading { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; color: #fff; line-height: 1.15; }
.hero-sub { font-size: clamp(1rem, 2vw, 1.2rem); color: rgba(255,255,255,0.85); max-width: 560px; }
.hero-placeholder { min-height: 90vh; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); display: flex; align-items: center; }

/* ── Stats / Achievements ── */
.stat-card { text-align: center; padding: 2rem 1rem; }
.stat-icon { width: 56px; height: 56px; background: rgba(27,58,107,0.08); border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem; font-size: 1.4rem; color: var(--primary); }
.stat-value { font-size: 2.4rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-label { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ── Service Cards ── */
.service-card { border: none; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.07); transition: all 0.3s; height: 100%; }
.service-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.service-card-icon { width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 1.25rem; }
.service-card-icon.student { background: rgba(27,58,107,0.1); color: var(--primary); }
.service-card-icon.worker { background: rgba(212,32,27,0.1); color: var(--accent); }

/* ── Process Steps ── */
.step-item { display: flex; gap: 1.5rem; align-items: flex-start; }
.step-number { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.step-connector { width: 2px; background: var(--border); height: 40px; margin: 0 auto; }

/* ── Partner Logos ── */
.partner-logo-card { border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; display: flex; align-items: center; justify-content: center; transition: all 0.2s; background: #fff; }
.partner-logo-card:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(27,58,107,0.1); }
.partner-logo-card img { max-height: 60px; object-fit: contain; filter: grayscale(30%); transition: filter 0.2s; }
.partner-logo-card:hover img { filter: grayscale(0); }
.partner-name-fallback { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); text-align: center; }

/* ── Testimonials ── */
.testimonial-card { background: #fff; border-radius: 16px; padding: 2rem; box-shadow: 0 4px 24px rgba(0,0,0,0.07); height: 100%; }
.testimonial-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.testimonial-avatar-placeholder { width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; }
.quote-icon { color: var(--accent); font-size: 2rem; line-height: 1; }

/* ── Notice Cards ── */
.notice-badge { font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; }
.badge-announcement { background: rgba(27,58,107,0.1); color: var(--primary); }
.badge-deadline { background: rgba(212,32,27,0.1); color: var(--accent); }
.badge-intake { background: rgba(16,185,129,0.1); color: #059669; }
.badge-campaign { background: rgba(245,158,11,0.1); color: #d97706; }
.notice-card { border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; transition: all 0.2s; background: #fff; }
.notice-card:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(27,58,107,0.1); }

/* ── Profile Cards (public students / candidates) ── */
.profile-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 1.75rem 1rem; transition: all 0.25s; }
.profile-card:hover { border-color: var(--primary); box-shadow: 0 8px 28px rgba(27,58,107,0.1); transform: translateY(-3px); }
.profile-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border); }
.profile-avatar-placeholder { width: 88px; height: 88px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #2a5298); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700; }
.jlpt-badge { display: inline-block; background: rgba(27,58,107,0.08); color: var(--primary); font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; letter-spacing: 0.5px; }
.candidate-title { display: block; font-size: 0.78rem; color: var(--text-muted); font-weight: 500; line-height: 1.3; margin-top: 2px; }

/* ── Team Cards ── */
.team-card { padding: 1.5rem 1rem; }
.team-photo-wrap { width: 110px; height: 110px; border-radius: 50%; overflow: hidden; border: 3px solid var(--border); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.team-photo { width: 100%; height: 100%; object-fit: cover; }

/* ── Rich text content ── */
.rich-content p { margin-bottom: 0.75rem; }
.rich-content ul, .rich-content ol { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.rich-content li { margin-bottom: 0.25rem; }
.rich-content strong { color: var(--text); }

/* ── CTA Section ── */
.cta-section { background: linear-gradient(135deg, var(--primary) 0%, #2a5298 100%); padding: var(--section-pad) 0; position: relative; overflow: hidden; }
.cta-section::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }

/* ── Gallery ── */
.gallery-img { border-radius: 10px; object-fit: cover; width: 100%; height: 220px; transition: transform 0.3s; cursor: pointer; }
.gallery-img:hover { transform: scale(1.02); }

/* ── Detail pages ── */
.detail-cover { height: 380px; object-fit: cover; border-radius: 16px; width: 100%; }
.info-item { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.info-item:last-child { border-bottom: none; }
.info-icon { color: var(--primary); width: 20px; flex-shrink: 0; margin-top: 2px; }

/* ── Page Hero ── */
.page-hero { background: linear-gradient(135deg, var(--primary) 0%, #2a5298 100%); padding: 60px 0 50px; color: #fff; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.breadcrumb-item, .breadcrumb-item a { color: rgba(255,255,255,0.7); font-size: 0.85rem; }
.breadcrumb-item.active { color: #fff; }
.breadcrumb-divider { color: rgba(255,255,255,0.4); }

/* ── Footer ── */
.footer { background: #0f1f3d; }
.footer-top { border-bottom: 1px solid rgba(255,255,255,0.06); }
.footer-heading { color: rgba(255,255,255,0.9); font-weight: 600; font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a, .footer-links li { color: rgba(255,255,255,0.5); font-size: 0.87rem; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-bottom { background: rgba(0,0,0,0.2); }
.text-muted-light { color: rgba(255,255,255,0.45) !important; }
.social-link { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); display: flex; align-items: center; justify-content: center; transition: all 0.2s; font-size: 0.85rem; }
.social-link:hover { background: var(--accent); color: #fff; }

/* ── Sidebar ── */
.sticky-sidebar { position: sticky; top: 90px; }
.mb-col-block { margin-bottom: 3.5rem; }
.col-divider { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }

.sidebar-panel { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.sidebar-panel-header { background: var(--primary); color: #fff; padding: .9rem 1.25rem; font-size: .9rem; }
.sidebar-filter-bar { padding: .6rem 1rem; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .35rem; background: #fafbfc; }
.sidebar-filter-btn { font-size: .7rem; font-weight: 600; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--border); background: #fff; cursor: pointer; color: #666; transition: all .15s; line-height: 1.6; }
.sidebar-filter-btn.active, .sidebar-filter-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.sidebar-panel-footer { padding: .85rem 1rem; border-top: 1px solid var(--border); background: #fafbfc; }

/* Notice sidebar items */
.sidebar-notices-list { max-height: 480px; overflow-y: auto; }
.sidebar-notice-item { display: block; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); transition: background .15s; }
.sidebar-notice-item:last-child { border-bottom: none; }
.sidebar-notice-item:hover { background: #f5f7fa; }
.sidebar-notice-title { font-size: .88rem; font-weight: 600; color: var(--text-dark); line-height: 1.35; margin-top: .2rem; }

/* Service link sidebar items */
.sidebar-links-list { max-height: 520px; overflow-y: auto; }
.sidebar-link-item { display: block; padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); transition: background .15s; }
.sidebar-link-item:last-child { border-bottom: none; }
.sidebar-link-item:hover { background: #f5f7fa; }
.sidebar-link-icon { color: var(--primary); font-size: .95rem; width: 18px; flex-shrink: 0; margin-top: 2px; }
.sidebar-link-title { font-size: .88rem; font-weight: 600; color: var(--text-dark); line-height: 1.35; }
.sidebar-link-desc { font-size: .78rem; color: #888; margin-top: 2px; line-height: 1.4; }

/* Extra notice badges for link types */
.notice-badge.badge-policy { background: #e8f0fe; color: #1b3a6b; }
.notice-badge.badge-news { background: #e6f4ea; color: #2d6a4f; }
.notice-badge.badge-video { background: #fce8e6; color: #c5221f; }
.notice-badge.badge-other { background: #f1f3f4; color: #5f6368; }

/* ── Responsive ── */
@media (max-width: 768px) {
  :root { --section-pad: 50px; }
  .hero-slide { min-height: 65vh; }
  .hero-placeholder { min-height: 65vh; }
  .sticky-sidebar { position: static; }
}
