/* =========================================================
   Trung tâm hỗ trợ VNeID - Công an phường Sa Pa
   Bootstrap 4 + custom styles
   ========================================================= */

:root {
  --red: #c62828;
  --red-dark: #8e0000;
  --red-deep: #b71c1c;
  --gold: #ffd54f;
  --gold-dark: #f9a825;
  --gold-bar: #e8b923;
  --ink: #222;
  --muted: #555;
  --nav-h: 64px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  padding-top: 0;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  transition: color .2s ease, opacity .2s ease;
}

/* ---------- Navbar ---------- */
.site-navbar {
  background: rgba(20, 20, 20, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .25s ease, box-shadow .25s ease;
  min-height: var(--nav-h);
  padding-top: .55rem;
  padding-bottom: .55rem;
}

.site-navbar.is-scrolled,
.site-navbar.navbar-open {
  background: rgba(18, 18, 18, .96);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}

.brand-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
}

.brand-text {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.25;
  max-width: 280px;
  white-space: normal;
}

.site-navbar .nav-link {
  color: rgba(255, 255, 255, .92) !important;
  font-weight: 500;
  font-size: .92rem;
  padding: .45rem .7rem !important;
  white-space: nowrap;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-item.active > .nav-link {
  color: var(--gold) !important;
}

.site-navbar .dropdown-menu {
  border: 0;
  border-radius: .35rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  padding: .4rem 0;
  min-width: 260px;
}

.site-navbar .dropdown-item {
  font-size: .9rem;
  padding: .45rem 1rem;
}

.site-navbar .dropdown-item:hover,
.site-navbar .dropdown-item:focus,
.site-navbar .dropdown-item.active {
  background: #f8e9e9;
  color: var(--red);
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, .4);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 420px;
  height: 56vw;
  max-height: 560px;
  margin-top: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(140, 0, 0, .55) 0%, rgba(180, 0, 0, .25) 42%, rgba(180, 0, 0, .15) 100%),
    linear-gradient(0deg, rgba(140, 0, 0, .92) 0%, rgba(180, 0, 0, .35) 42%, transparent 70%);
}

.hero-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero-stars .star {
  position: absolute;
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255, 213, 79, .55);
  line-height: 1;
  opacity: .95;
}

.hero-stars .s1 { left: 4%;  bottom: 18%; font-size: 2.2rem; }
.hero-stars .s2 { left: 10%; bottom: 38%; font-size: 1.4rem; opacity: .8; }
.hero-stars .s3 { left: 18%; bottom: 22%; font-size: 3rem; }
.hero-stars .s4 { right: 8%; top: 28%; font-size: 1.6rem; opacity: .75; }
.hero-stars .s5 { right: 18%; top: 18%; font-size: 1.1rem; opacity: .7; }

.hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: 2.2rem;
  padding-top: 5rem;
}

.hero-slogan {
  text-align: right;
  margin-left: auto;
  max-width: 640px;
}

.slogan-line1 {
  font-size: clamp(1.15rem, 2.6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--gold);
  margin-bottom: .35rem;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

.slogan-line2 {
  font-size: clamp(1.35rem, 3.2vw, 2.35rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: .02em;
  color: var(--gold);
  margin-bottom: 0;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

/* ---------- Hotline bar ---------- */
.hotline-bar {
  background:
    linear-gradient(180deg, #f0c94a 0%, #e0a820 55%, #d49512 100%);
  background-image:
    repeating-linear-gradient(
      60deg,
      rgba(255, 255, 255, .08) 0,
      rgba(255, 255, 255, .08) 2px,
      transparent 2px,
      transparent 14px
    ),
    linear-gradient(180deg, #f0c94a 0%, #e0a820 55%, #d49512 100%);
  color: #1a1a1a;
  padding: 1.1rem 1rem;
  border-top: 3px solid #c62828;
  border-bottom: 3px solid #c62828;
}

.hotline-sub {
  font-size: .95rem;
  font-weight: 500;
}

.hotline-main {
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: .01em;
}

.hotline-main a {
  color: inherit;
  text-decoration: none;
}

.hotline-main a:hover {
  color: var(--red-dark);
  text-decoration: underline;
}

/* ---------- Services ---------- */
.services-section {
  background: #fff;
}

.service-card {
  text-decoration: none;
  color: inherit;
  padding: 1rem .5rem 1.5rem;
  border-radius: .5rem;
  transition: transform .2s ease, box-shadow .2s ease;
}

.service-card:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-4px);
}

.service-icon {
  width: 200px;
  height: 200px;
  max-width: 70vw;
}

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.service-title {
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: underline;
  margin-bottom: .4rem;
}

.service-card:hover .service-title {
  color: var(--red);
}

.service-cta {
  display: block;
  color: var(--muted);
  font-size: .95rem;
}

/* ---------- Featured carousel ---------- */
.featured-section {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(0, 0, 0, .035) 0,
      rgba(0, 0, 0, .035) 8px,
      transparent 8px,
      transparent 18px
    ),
    linear-gradient(180deg, #f2cf55 0%, #e8b52a 100%);
}

.featured-card {
  background: #fff;
  border-radius: .4rem;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
  min-height: 220px;
}

.featured-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.featured-title {
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 800;
  line-height: 1.35;
  color: #111;
}

#homeCarousel .carousel-indicators {
  bottom: -2.2rem;
}

#homeCarousel .carousel-indicators li {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .25);
  border: 0;
}

#homeCarousel .carousel-indicators li.active {
  background: #5c9ead;
}

#homeCarousel .carousel-control-prev,
#homeCarousel .carousel-control-next {
  width: 8%;
  opacity: .7;
}

#homeCarousel {
  padding-bottom: 2.5rem;
}

/* ---------- Article ---------- */
.article-section {
  background: #fff;
}

.article-heading {
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 1.5rem;
  color: #111;
}

.article-section p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.15rem;
  text-align: justify;
}

.article-highlight {
  font-weight: 700;
  font-style: italic;
  color: var(--red-dark);
  border-left: 4px solid var(--gold-dark);
  padding-left: 1rem;
}

.article-figure {
  margin: 1.75rem 0;
}

.article-figure img {
  width: 100%;
  border-radius: .25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
}

.article-figure figcaption {
  margin-top: .65rem;
  font-size: .92rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, #8e0000 0%, #6d0000 100%);
  color: #fff;
}

.footer-hotline {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 700;
  margin-bottom: .5rem;
}

.footer-hotline a {
  color: var(--gold);
  text-decoration: none;
}

.footer-hotline a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-copy {
  font-size: .85rem;
  opacity: .85;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .brand-text {
    max-width: 200px;
    font-size: .85rem;
  }

  .site-navbar .navbar-collapse {
    background: rgba(18, 18, 18, .98);
    margin: .5rem -.75rem -.55rem;
    padding: .75rem 1rem 1rem;
    border-radius: 0 0 .35rem .35rem;
  }

  .site-navbar .nav-link {
    white-space: normal;
    padding: .55rem 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .site-navbar .dropdown-menu {
    background: transparent;
    box-shadow: none;
    border-left: 2px solid var(--gold);
    border-radius: 0;
    margin-left: .5rem;
  }

  .site-navbar .dropdown-item {
    color: rgba(255, 255, 255, .9);
  }

  .site-navbar .dropdown-item:hover,
  .site-navbar .dropdown-item.active {
    background: rgba(255, 255, 255, .08);
    color: var(--gold);
  }
}

@media (max-width: 767.98px) {
  .hero {
    min-height: 320px;
    height: 70vw;
    max-height: 420px;
  }

  .hero-slogan {
    text-align: center;
    max-width: 100%;
  }

  .hero-stars .s1 { left: 6%;  bottom: 12%; font-size: 1.6rem; }
  .hero-stars .s3 { left: 14%; bottom: 16%; font-size: 2.1rem; }
  .hero-stars .s4,
  .hero-stars .s5 { display: none; }

  .hero-content {
    padding-bottom: 1.5rem;
  }

  .hotline-sub {
    font-size: .85rem;
  }

  .service-icon {
    width: 160px;
    height: 160px;
  }

  .featured-img {
    height: 200px;
  }

  .article-section p {
    text-align: left;
    font-size: 1rem;
  }
}

@media (max-width: 575.98px) {
  .brand-text {
    max-width: 160px;
    font-size: .78rem;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }
}

/* ---------- Inner page: Đăng ký cư trú ---------- */
.hero-inner {
  min-height: 360px;
  max-height: 480px;
}

.page-intro-bar {
  background: #f5ecd0;
  padding: 1.1rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.page-intro-title {
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.4;
}

.guide-grid-gold {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(0, 0, 0, .03) 0,
      rgba(0, 0, 0, .03) 8px,
      transparent 8px,
      transparent 18px
    ),
    linear-gradient(180deg, #f2cf55 0%, #e8b52a 100%);
}

.guide-grid-red {
  position: relative;
  overflow: hidden;
  color: #fff;
}

.guide-grid-red-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.45);
}

.guide-grid-red::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(160, 0, 0, .72);
  z-index: 0;
}

.guide-grid-red > .container {
  z-index: 1;
}

.guide-card {
  display: block;
  text-align: center;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: transform .2s ease;
}

.guide-card:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-4px);
}

.guide-card-img {
  background: #fff;
  border-radius: .5rem;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
  margin-bottom: .85rem;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.guide-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guide-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: underline;
  margin-bottom: .35rem;
  line-height: 1.35;
}

.guide-card:hover .guide-card-title {
  color: var(--red-dark);
}

.guide-card-light .guide-card-title {
  color: #fff;
  font-size: .98rem;
}

.guide-card-light:hover .guide-card-title {
  color: var(--gold);
}

.guide-card-hint {
  display: block;
  font-size: .88rem;
  color: #444;
}

.officer-section {
  background: #fff;
}

.officer-banner-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.officer-photo {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}

.officer-name {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  margin-bottom: .25rem;
}

.officer-role {
  font-size: 1.1rem;
  color: var(--muted);
}

.officer-phone {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
}

.officer-phone a {
  color: var(--ink);
  text-decoration: none;
}

.officer-phone a:hover {
  color: var(--red);
}

@media (max-width: 767.98px) {
  .hero-inner {
    min-height: 280px;
    max-height: 360px;
  }

  .officer-photo {
    width: 140px;
    height: 140px;
  }

  .guide-card-title {
    font-size: .95rem;
  }
}

/* ---------- Inner page: Cấp căn cước ---------- */
.hero-page-title {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: .75rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}

.guide-grid-white {
  background: #fff;
}

.guide-card-img-round {
  border-radius: 50%;
  padding: .65rem;
}

/* ---------- Liên hệ Cảnh sát khu vực ---------- */
.site-navbar-solid {
  background: rgba(18, 18, 18, .96) !important;
}

.cskv-banner {
  margin-top: var(--nav-h);
  width: 100%;
  overflow: hidden;
  background: #eee;
}

.cskv-banner-img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
}

.cskv-section {
  background: #fff;
}

.cskv-heading {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800;
  color: #111;
}

.cskv-photo {
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: .25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}

.cskv-name {
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  font-weight: 800;
  margin-bottom: .4rem;
}

.cskv-phone {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 600;
}

.cskv-phone a {
  color: var(--ink);
  text-decoration: none;
}

.cskv-phone a:hover {
  color: var(--red);
  text-decoration: underline;
}

.cskv-area {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--muted);
}

@media (max-width: 575.98px) {
  .cskv-photo {
    max-width: 220px;
    margin: 0 auto;
    display: block;
  }

  .cskv-card {
    text-align: center;
  }

  .cskv-heading {
    text-align: center !important;
  }
}

/* ---------- Tài liệu / hướng dẫn ---------- */
.doc-hero .hero-page-title {
  text-align: left;
  margin-bottom: .5rem;
}

.doc-intro {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, .04) 0,
      rgba(255, 255, 255, .04) 8px,
      transparent 8px,
      transparent 18px
    ),
    linear-gradient(180deg, #8e0000 0%, #6d0000 100%);
  color: #fff;
  padding: 2rem 0;
}

.doc-intro-title {
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--gold);
}

.doc-intro-text {
  font-size: 1.02rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.doc-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: .4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  background: #111;
}

.doc-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.doc-cta {
  display: inline-block;
  background: #fff;
  color: #111 !important;
  font-weight: 700;
  padding: .75rem 1.25rem;
  border-radius: .35rem;
  text-decoration: none !important;
  transition: transform .15s ease, box-shadow .15s ease;
}

.doc-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
  color: var(--red) !important;
}

.doc-body {
  background: #fff;
  padding: 2.5rem 0 3rem;
}

.doc-body h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 800;
  margin: 2rem 0 1rem;
  color: #111;
  border-left: 4px solid var(--red);
  padding-left: .75rem;
}

.doc-body h2:first-child {
  margin-top: 0;
}

.doc-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.25rem 0 .5rem;
}

.doc-body p,
.doc-body li {
  font-size: 1.02rem;
  line-height: 1.7;
  color: #333;
}

.doc-body ul,
.doc-body ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.doc-step {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.doc-step:last-child {
  border-bottom: 0;
}

.doc-step-img {
  max-width: 320px;
  width: 100%;
  border-radius: .35rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
  margin: .75rem 0;
}

.doc-note {
  background: #fff8e1;
  border-left: 4px solid var(--gold-dark);
  padding: 1rem 1.15rem;
  border-radius: 0 .35rem .35rem 0;
  margin: 1.25rem 0;
}

.doc-note ul {
  margin-bottom: 0;
}




