/* ==========================================================================
   DEPED – LDN e-RSPI | Government Portal Design System
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
  --color-primary: #0369a1;
  --color-primary-light: #0ea5e9;
  --color-primary-soft: #e0f2fe;
  --color-accent: #f59e0b;
  --color-accent-soft: #fef3c7;
  --color-surface: #ffffff;
  --color-surface-soft: #f8fafc;
  --color-surface-muted: #f1f5f9;
  --color-surface-strong: #0f172a;
  --color-surface-dark: #1e293b;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-text-subtle: #64748b;
  --color-text-inverse: #f8fafc;
  --color-border: rgba(148, 163, 184, 0.35);
  --color-success: #059669;
  --color-success-soft: #d1fae5;
  --color-warning: #d97706;
  --color-warning-soft: #fef3c7;
  --color-info: #0284c7;
  --container-max: 1120px;
  --container-padding: 1.5rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(148, 163, 184, 0.12);
  --shadow-card-hover: 0 24px 55px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(56, 189, 248, 0.2);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --text-hero: clamp(2rem, 5vw, 3rem);
  --text-section: clamp(1.25rem, 2.5vw, 1.5rem);
  --text-body: 0.875rem;
  --text-small: 0.75rem;
  --text-caption: 0.6875rem;
  --leading-tight: 1.2;
  --leading-relaxed: 1.6;
}

/* --------------------------------------------------------------------------
   2. Base & Layout
   -------------------------------------------------------------------------- */
body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background: var(--color-surface-muted);
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

@media (min-width: 640px) {
  .app-shell { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
  .app-shell { padding-left: 2rem; padding-right: 2rem; }
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
.typography-hero {
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.typography-section-title { font-size: var(--text-section); font-weight: 700; }
.typography-section-label {
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-heading {
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   4. Section Transitions
   -------------------------------------------------------------------------- */
.section-wave {
  position: relative;
  height: 56px;
  margin-top: -1px;
  overflow: hidden;
  line-height: 0;
}

.section-wave svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  fill: var(--color-surface-soft);
}

.section-wave-dark svg { fill: #f1f5f9; }

/* Gradient fade */
.section-fade-bottom {
  mask-image: linear-gradient(to top, black 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, black 75%, transparent 100%);
}

/* --------------------------------------------------------------------------
   5. Section Backgrounds
   -------------------------------------------------------------------------- */
.section-bg-jobs {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #eef2ff 100%);
  position: relative;
}

.section-bg-calendar {
  background: linear-gradient(180deg, #e0f2fe 0%, #f0f9ff 45%, #f8fafc 100%);
  position: relative;
}

.section-bg-about {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  position: relative;
}

.section-bg-contact {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  position: relative;
}

.section-bg-contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), transparent);
  z-index: 1;
}

/* --------------------------------------------------------------------------
   6. Cards
   -------------------------------------------------------------------------- */
.card {
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(56, 189, 248, 0.35);
}

.card-glass {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-lg);
}

.section-card {
  position: relative;
  border-radius: var(--radius-2xl);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  overflow: hidden;
}

.section-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--color-primary-light), var(--color-primary));
  border-radius: var(--radius-2xl) 0 0 var(--radius-2xl);
  opacity: 0.9;
}

@media (min-width: 768px) {
  .section-card { padding: 2.25rem 2.5rem; }
}

/* --------------------------------------------------------------------------
   7. Job Card
   -------------------------------------------------------------------------- */
.job-card {
  position: relative;
  overflow: hidden;
}

.job-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary-light), #38bdf8, var(--color-accent));
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.job-card:hover::before {
  opacity: 1;
  transform: translateY(0);
}

.badge-open {
  background: var(--color-success-soft);
  color: #047857;
  font-weight: 600;
  font-size: var(--text-caption);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
}

.badge-closing-soon {
  background: var(--color-warning-soft);
  color: var(--color-warning);
  font-weight: 600;
  font-size: var(--text-caption);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
}

.badge-upcoming {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 600;
  font-size: var(--text-caption);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
}

/* --------------------------------------------------------------------------
   8. Buttons
   -------------------------------------------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: var(--text-body);
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border: none;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: var(--shadow-lg);
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--color-text-inverse);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-card {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: var(--text-small);
  font-weight: 600;
  color: white;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-card:hover { background: #025a85; }

/* --------------------------------------------------------------------------
   9. Notice Panel
   -------------------------------------------------------------------------- */
.notice-panel {
  position: relative;
  padding: 1rem 1.25rem;
  padding-left: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid;
  box-shadow: var(--shadow-sm);
}

.notice-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.notice-panel-warning {
  border-color: #fcd34d;
  background: #fffbeb;
}

.notice-panel-warning::before { background: var(--color-accent); }

.notice-panel-info {
  border-color: #7dd3fc;
  background: var(--color-primary-soft);
}

.notice-panel-info::before { background: var(--color-primary); }

.notice-panel-neutral {
  border-color: var(--color-border);
  background: var(--color-surface-soft);
}

.notice-panel-neutral::before { background: var(--color-text-muted); }

.notice-panel-title {
  font-weight: 600;
  font-size: var(--text-body);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notice-panel-body {
  margin-top: 0.375rem;
  font-size: var(--text-small);
  line-height: var(--leading-relaxed);
}

/* --------------------------------------------------------------------------
   10. Hero
   -------------------------------------------------------------------------- */
.hero-wrapper {
  position: relative;
  min-height: min(100vh, 920px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-bg {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
  background-image: url("../assets/images/hero-2.jpg");
  background-size: cover;
  background-position: center;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    165deg,
    rgba(15, 23, 42, 0.88) 0%,
    rgba(15, 23, 42, 0.55) 45%,
    rgba(15, 23, 42, 0.35) 100%
  );
  pointer-events: none;
}

.hero-content-area {
  flex: 1;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  padding-bottom: 3rem;
  position: relative;
  z-index: 2;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero-shape-1 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
  top: -60px;
  right: -60px;
}

.hero-shape-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  bottom: 25%;
  left: -40px;
}

.hero-shape-3 {
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, transparent 70%);
  top: 45%;
  right: 20%;
}

.hero-illustration {
  position: relative;
  isolation: isolate;
}

.hero-image-placeholder {
  position: relative;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.hero-image-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/images/hero-2.jpg") center/cover;
  opacity: 0.25;
  mix-blend-mode: overlay;
}

.hero-image-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85), transparent);
}

.hero-blob {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.15), transparent 50%);
  filter: blur(24px);
  opacity: 0.8;
  z-index: -1;
}

/* Header over hero */
.header-over-hero {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.65) 0%, rgba(15, 23, 42, 0.15) 75%, transparent 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.header-over-hero.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-md);
}

.header-over-hero .nav-link { color: rgba(255, 255, 255, 0.92); }
.header-over-hero .nav-link:hover { color: #7dd3fc; }
.header-over-hero .brand-sub { color: rgba(255, 255, 255, 0.75); }
.header-over-hero .brand-title { color: #fff; }
.header-over-hero .brand-accent { color: #7dd3fc; }
.header-over-hero .header-logo-wrap {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.header-over-hero.scrolled .nav-link { color: var(--color-text-muted); }
.header-over-hero.scrolled .nav-link:hover { color: var(--color-primary); }
.header-over-hero.scrolled .brand-sub { color: var(--color-text-subtle); }
.header-over-hero.scrolled .brand-title { color: var(--color-text); }
.header-over-hero.scrolled .brand-accent { color: var(--color-primary); }
.header-over-hero.scrolled .header-logo-wrap {
  background: #fff;
  border: 1px solid var(--color-border);
}

.header-over-hero.scrolled #mobile-menu {
  background: rgba(255, 255, 255, 0.98);
  border-top-color: var(--color-border);
}

.header-over-hero.scrolled #mobile-menu .nav-link { color: var(--color-text-muted); }
.header-over-hero.scrolled #mobile-menu .nav-link:hover { background: var(--color-surface-soft); }

/* --------------------------------------------------------------------------
   11. Calendar Event
   -------------------------------------------------------------------------- */
.calendar-event {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.calendar-event:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(14, 165, 233, 0.25);
}

.calendar-event-date {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: var(--text-small);
  font-weight: 600;
}

.calendar-event-date span { font-size: var(--text-caption); font-weight: 500; opacity: 0.9; }

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: #020617;
  color: #94a3b8;
  font-size: var(--text-small);
  border-top: 1px solid rgba(51, 65, 85, 0.8);
}

.footer a:hover { color: #7dd3fc; }
.footer-brand { font-weight: 600; color: #e2e8f0; }
.footer-copyright {
  font-size: 0.6875rem;
  color: #64748b;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
}

/* --------------------------------------------------------------------------
   13. Animations
   -------------------------------------------------------------------------- */
.fade-in-up {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.5s ease forwards;
}

.fade-in-up-delay {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.6s ease 0.1s forwards;
}

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

.icon-sm { width: 1rem; height: 1rem; }
.icon-md { width: 1.25rem; height: 1.25rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
