/* ============================================================
   DICT REGION V — SYSTEMS PORTAL
   Official Landing Page Stylesheet
   Clean, professional, government-standard presentation.
   ============================================================ */

:root {
  --gov-navy: #011d42;
  --gov-navy-2: #032c5f;
  --gov-blue: #0353a8;
  --gov-blue-2: #0a64c4;
  --gov-sky: #dceafc;
  --gov-gold: #f6c445;
  --gov-red: #ce1126;
  --gov-flag-blue: #0038a8;
  --ink: #17233a;
  --muted: #5a6a7a;
  --bg-soft: #f4f7fc;
  --line: #e4e9f2;
  --white: #ffffff;
  --radius: 14px;
  --shadow-sm: 0 2px 10px rgba(3, 53, 112, 0.06);
  --shadow-md: 0 14px 34px rgba(3, 53, 112, 0.12);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

section[id] {
  scroll-margin-top: 5rem;
}

::selection {
  background: var(--gov-blue);
  color: #fff;
}

img {
  max-width: 100%;
}

/* ------------------------------------------------------------
   Philippine flag stripe (official government accent)
------------------------------------------------------------ */
.flag-stripe {
  height: 4px;
  background: linear-gradient(90deg,
      var(--gov-flag-blue) 0 33.3%,
      var(--gov-gold) 33.3% 66.6%,
      var(--gov-red) 66.6% 100%);
}

/* ------------------------------------------------------------
   Top government utility bar
------------------------------------------------------------ */
.gov-topbar {
  background: var(--gov-navy);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  padding: 0.55rem 0;
}

.gov-topbar .topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.gov-topbar .topbar-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.gov-topbar .topbar-left i {
  color: var(--gov-gold);
  font-size: 0.85rem;
}

.gov-topbar a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

.gov-topbar a:hover {
  color: var(--gov-gold);
}

/* ------------------------------------------------------------
   Main navigation
------------------------------------------------------------ */
.site-nav {
  background: var(--white);
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease, padding 0.25s ease;
}

.site-nav.scrolled {
  box-shadow: 0 8px 26px rgba(3, 53, 112, 0.1);
  padding: 0.45rem 0;
}

.site-nav .navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
}

.site-nav .brand-logo {
  height: 52px;
  width: 52px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--gov-sky);
}

.site-nav .brand-text {
  line-height: 1.15;
}

.site-nav .brand-text .brand-name {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--gov-navy);
  letter-spacing: 0.5px;
  display: block;
}

.site-nav .brand-text .brand-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gov-blue);
  text-transform: uppercase;
  letter-spacing: 1.6px;
  display: block;
}

.site-nav .nav-link {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.92rem;
  margin: 0 0.15rem;
  padding: 0.55rem 0.85rem !important;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav .nav-link:hover,
.site-nav .nav-link.active {
  color: var(--gov-blue);
  background: var(--gov-sky);
}

.site-nav .navbar-toggler {
  border-color: rgba(3, 53, 112, 0.25);
}

.site-nav .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(3, 83, 168, 0.15);
}

/* ------------------------------------------------------------
   Buttons
------------------------------------------------------------ */
.btn-gov {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.btn-gov:hover {
  transform: translateY(-2px);
}

.btn-gov--blue {
  background: var(--gov-blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(3, 83, 168, 0.28);
}

.btn-gov--blue:hover {
  background: var(--gov-blue-2);
  color: #fff;
  box-shadow: 0 14px 28px rgba(3, 83, 168, 0.34);
}

.btn-gov--gold {
  background: var(--gov-gold);
  color: var(--gov-navy);
  box-shadow: 0 10px 22px rgba(246, 196, 69, 0.3);
}

.btn-gov--gold:hover {
  background: #ffd25e;
  color: var(--gov-navy);
}

.btn-gov--outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-gov--outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: #fff;
}

.btn-gov--outline {
  background: transparent;
  color: var(--gov-blue);
  border-color: var(--gov-blue);
}

.btn-gov--outline:hover {
  background: var(--gov-blue);
  color: #fff;
}

.btn-gov--sm {
  padding: 0.5rem 1.15rem;
  font-size: 0.85rem;
}

/* ------------------------------------------------------------
   Hero section
------------------------------------------------------------ */
.hero {
  position: relative;
  background:
    linear-gradient(115deg, rgba(1, 29, 66, 0.96) 0%, rgba(3, 83, 168, 0.92) 60%, rgba(10, 100, 196, 0.88) 100%),
    url('../img/indexbg.png') center / cover no-repeat;
  color: #fff;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-inner {
  padding: 5.5rem 0 6.5rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.6rem;
  backdrop-filter: blur(4px);
}

.hero-eyebrow i {
  color: var(--gov-gold);
  font-size: 0.9rem;
}

.hero-title {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 1.25rem;
}

.hero-title .accent {
  color: var(--gov-gold);
}

.hero-sub {
  font-size: 1.02rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.88);
  max-width: 34rem;
  margin-bottom: 2.2rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 2.6rem;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
}

.hero-trust i {
  color: var(--gov-gold);
}

/* Hero media — floating logo card */
.hero-media {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-media .media-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  padding: 2.2rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 70px rgba(1, 29, 66, 0.45);
  animation: float 6s ease-in-out infinite;
}

.hero-media .media-card img {
  width: min(340px, 70vw);
  border-radius: 16px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 1;
  pointer-events: none;
}

/* ------------------------------------------------------------
   Stats band
------------------------------------------------------------ */
.stat-bar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  margin-top: -3.4rem;
  position: relative;
  z-index: 3;
  border-radius: 16px;
  overflow: hidden;
}

.stat {
  text-align: center;
  padding: 1.8rem 1rem;
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat .stat-num {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--gov-blue);
  line-height: 1;
}

.stat .stat-label {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ------------------------------------------------------------
   Section scaffolding
------------------------------------------------------------ */
.section {
  padding: 5.5rem 0;
}

.section--soft {
  background: var(--bg-soft);
}

.section-head {
  text-align: center;
  max-width: 44rem;
  margin: 0 auto 3.2rem;
}

.section-head .sec-eyebrow {
  color: var(--gov-blue);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.4px;
  margin-bottom: 0.6rem;
}

.section-head .sec-title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--gov-navy);
  margin-bottom: 0.9rem;
}

.section-head .sec-line {
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gov-blue), var(--gov-gold));
  margin: 0 auto 1.1rem;
}

.section-head .sec-sub {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* ------------------------------------------------------------
   Application cards
------------------------------------------------------------ */
.app-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.app-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(3, 83, 168, 0.35);
  color: inherit;
}

.app-card__media {
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f7f9fd, #eef3fb);
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  position: relative;
}

.app-card__media img {
  max-height: 92px;
  max-width: 82%;
  object-fit: contain;
}

.app-card__body {
  padding: 1.15rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.app-card__tag {
  align-self: flex-start;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--gov-blue);
  background: var(--gov-sky);
  border-radius: 100px;
  padding: 0.22rem 0.7rem;
  margin-bottom: 0.7rem;
}

.app-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gov-navy);
  line-height: 1.35;
  margin-bottom: 0.45rem;
}

.app-card__desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.app-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gov-blue);
  margin-top: 0.9rem;
  transition: gap 0.2s ease;
}

.app-card:hover .app-card__link {
  gap: 0.65rem;
}

/* ------------------------------------------------------------
   Downloadable forms — category cards
------------------------------------------------------------ */
.dl-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dl-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.dl-card__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px dashed var(--line);
}

.dl-card__icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--gov-sky);
  color: var(--gov-blue);
  font-size: 1.3rem;
}

.dl-card__title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--gov-navy);
  margin: 0;
}

.dl-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dl-list li {
  margin-bottom: 0.4rem;
}

.dl-list li:last-child {
  margin-bottom: 0;
}

.dl-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0.32rem 0.45rem;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.dl-list a i {
  color: var(--gov-gold);
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.dl-list a:hover {
  color: var(--gov-blue);
  background: var(--bg-soft);
  transform: translateX(3px);
}

.dl-list a:hover i {
  transform: translateX(2px);
}

/* ------------------------------------------------------------
   Contact band
------------------------------------------------------------ */
.contact-band {
  background: linear-gradient(115deg, var(--gov-navy) 0%, var(--gov-navy-2) 55%, var(--gov-blue) 100%);
  color: #fff;
  padding: 3.4rem 0;
}

.contact-band .cb-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.contact-band .cb-sub {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
  margin: 0;
}

.contact-band .cb-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ------------------------------------------------------------
   Footer
------------------------------------------------------------ */
.site-footer {
  background: var(--gov-navy);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
  line-height: 1.8;
}

.site-footer .footer-top {
  padding: 4rem 0 2.5rem;
}

.site-footer h6 {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 0.8rem;
  margin-bottom: 1.1rem;
}

.site-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}

.site-footer .footer-brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: contain;
}

.site-footer .footer-brand .fname {
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.site-footer .footer-brand .fsub {
  font-size: 0.74rem;
  color: var(--gov-gold);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.site-footer .footer-about {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.62);
}

.site-footer ul.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer ul.footer-links li {
  margin-bottom: 0.45rem;
}

.site-footer ul.footer-links a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.site-footer ul.footer-links a:hover {
  color: var(--gov-gold);
  padding-left: 4px;
}

.site-footer .footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer .footer-contact li {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
  align-items: flex-start;
}

.site-footer .footer-contact i {
  color: var(--gov-gold);
  margin-top: 0.3rem;
  flex: none;
}

.site-footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.3rem 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

.site-footer .footer-bottom a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.site-footer .footer-bottom a:hover {
  color: var(--gov-gold);
}

/* ------------------------------------------------------------
   Back to top
------------------------------------------------------------ */
.back-to-top {
  position: fixed;
  right: 1.6rem;
  bottom: 1.6rem;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gov-blue);
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 10px 22px rgba(3, 83, 168, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 999;
  text-decoration: none;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--gov-blue-2);
  color: #fff;
}

/* ------------------------------------------------------------
   Login modal
------------------------------------------------------------ */
.login-modal .modal-content {
  border: none;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.login-modal .modal-header {
  background: linear-gradient(115deg, var(--gov-navy) 0%, var(--gov-blue) 100%);
  color: #fff;
  border: none;
  padding: 1.4rem 1.6rem;
}

.login-modal .modal-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
}

.login-modal .modal-title i {
  color: var(--gov-gold);
}

.login-modal .modal-body {
  padding: 1.8rem 1.8rem 2rem;
}

.login-modal .form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gov-navy);
}

.login-modal .form-control {
  border-radius: 10px;
  border-color: var(--line);
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
}

.login-modal .form-control:focus {
  border-color: var(--gov-blue);
  box-shadow: 0 0 0 0.2rem rgba(3, 83, 168, 0.12);
}

.login-modal .btn-login {
  background: var(--gov-blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

.login-modal .btn-login:hover {
  background: var(--gov-blue-2);
  color: #fff;
}

.login-modal .modal-note {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 1rem;
}

/* ------------------------------------------------------------
   Reveal on scroll
------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------------------------
   Responsive tweaks
------------------------------------------------------------ */
@media (max-width: 991.98px) {
  .hero-inner {
    padding: 4rem 0 6rem;
  }

  .hero-media {
    margin-top: 2.5rem;
  }

  .stat + .stat {
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .contact-band .cb-actions {
    justify-content: flex-start;
    margin-top: 1.2rem;
  }
}

@media (max-width: 575.98px) {
  .section {
    padding: 3.8rem 0;
  }

  .site-nav .navbar-brand .brand-name {
    font-size: 0.9rem;
  }

  .hero-trust {
    flex-wrap: wrap;
  }
}