:root {
  /* Vibrant, light theme inspired palette */
  --bg: #fffaf3;
  /* warm white */
  --surface: #ffffff;
  /* card bg */
  --muted: #5f6c7b;
  /* neutral text */
  --text: #172026;
  /* primary text */
  --brand: #ef4444;
  /* red */
  --brand-2: #dc2626;
  /* deep red */
  --accent: #2563eb;
  /* blue */
  --success: #2a9d8f;
  /* teal */
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 85% -10%, rgba(239, 68, 68, .18), transparent 60%),
    radial-gradient(800px 600px at 10% 10%, rgba(37, 99, 235, .18), transparent 60%),
    conic-gradient(from 180deg at 70% 10%, #fffaf3, #ffffff, #fff6ea, #ffffff, #fffaf3);
  line-height: 1.6;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: static;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

/* Header polish */
.site-header {
  position: static;
}

.header-inner {
  position: relative;
}

.brand {
  position: relative;
}

.brand::after {
  content: "";
  position: absolute;
  left: -6px;
  bottom: -6px;
  width: calc(100% + 12px);
  height: 8px;
  background: linear-gradient(90deg, rgba(239, 68, 68, .25), rgba(37, 99, 235, .25));
  filter: blur(10px);
  border-radius: 999px;
  pointer-events: none;
}

.header-inner::before {
  content: "";
  position: absolute;
  inset: 0 -16px;
  height: 100%;
  background: linear-gradient(90deg, rgba(239, 68, 68, .06), rgba(37, 99, 235, .06));
  z-index: -1;
}

.brand {
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 22px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, rgba(239, 68, 68, 1), rgba(37, 99, 235, 1));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  background: transparent;
  color: var(--text);
  font-size: 22px;
  border: 0;
}

.theme-toggle {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, .1);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  margin-right: 10px;
}

.theme-toggle:hover {
  background: rgba(0, 0, 0, .04);
}

.hero {
  position: relative;
  min-height: 82vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  /* hide bg overscroll during animation */
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1524995997946-a1c2e315a42f?q=80&w=1800&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  filter: saturate(1.1) brightness(.9);
  opacity: .25;
  pointer-events: none;
  z-index: 0;
}

.hero-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  width: 42vw;
  height: 42vw;
  border-radius: 999px;
  filter: blur(60px);
  opacity: .35;
  mix-blend-mode: multiply;
  animation: float 16s ease-in-out infinite;
}

.blob.b1 {
  background: rgb(239, 68, 68);
  top: -12%;
  left: 60%;
  animation-delay: 0s;
}

.blob.b2 {
  background: rgb(37, 99, 235);
  top: -6%;
  left: 10%;
  animation-delay: 4s;
}

.blob.b3 {
  background: rgba(37, 99, 235, .5);
  top: 32%;
  left: 70%;
  animation-delay: 8s;
}

@keyframes float {

  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(-2%, 4%, 0) scale(1.05);
  }
}

.hero-inner {
  position: relative;
  padding: 64px 0;
  z-index: 2;
}

.hero-modern .hero-inner {
  padding: 84px 0;
}

.hero-modern .hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.eyebrow-pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(33, 158, 188, .1);
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.display {
  margin: 10px 0 8px;
  font-family: Merriweather, Georgia, serif;
  font-size: clamp(34px, 5.6vw, 68px);
  line-height: 1.06;
  color: #0b1321;
}

/* Stacked hero title */
.display.stacked {
  display: grid;
  gap: 6px;
  line-height: 1;
}

.display.stacked span {
  display: block;
}

.lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 18px;
}

.kpis {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 12px;
  color: #0b1321;
}

.hero-media {
  position: relative;
  padding-bottom: 32px;
}

.hero-media.reveal {
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transition: transform .7s cubic-bezier(.21, 1, .21, 1), opacity .6s ease, filter .6s ease;
}

.hero-media.reveal.in {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, .12));
}

.hero-media .glass {
  transition: transform .35s ease, box-shadow .35s ease;
}

.hero-media.reveal.in .glass:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 56px rgba(0, 0, 0, .16);
}

.glass {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(0, 0, 0, .06);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .12);
}

.mock-card {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.mock-header {
  font-weight: 800;
  color: #0b1321;
}

.mock-content {
  color: #1f2937;
  font-style: italic;
}

.mock-meta {
  color: var(--muted);
  font-size: 12px;
}

.badge-float {
  position: absolute;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  color: #0b1321;
  pointer-events: none;
  z-index: 10;
}

.badge-float.b1 {
  top: -15px;
  right: -40px;
  z-index: 10;
}

.badge-float.b2 {
  bottom: 5px;
  left: -30px;
}

@media (max-width: 960px) {
  .hero-modern .hero-grid {
    grid-template-columns: 1fr;
  }
}

.eyebrow {
  text-transform: uppercase;
  color: var(--brand);
  letter-spacing: .22em;
  font-weight: 700;
  font-size: 12px;
  margin: 0 0 10px;
}

.hero-title {
  margin: 0 0 10px;
  display: grid;
  gap: 6px;
  font-family: Merriweather, Georgia, serif;
  line-height: 1;
}

.hero-title span {
  font-size: clamp(48px, 8.5vw, 120px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.hero-title span:nth-child(1) {
  color: #0b1321;
}

.hero-title span:nth-child(2) {
  color: var(--brand-2);
}

.hero-title span:nth-child(3) {
  color: var(--accent);
}

.hero-sub {
  margin: 14px 0 24px;
  color: var(--muted);
  font-size: 18px;
  max-width: 680px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  color: #172026;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.btn.primary {
  background: linear-gradient(135deg, rgba(239, 68, 68, 1), rgba(220, 38, 38, 1));
  color: #1b1b1b;
  border: 0;
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(0, 0, 0, .12);
}

.btn.small {
  padding: 8px 12px;
  font-size: 14px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .08);
  transition: all .25s ease;
}

/* Hero button animations */
.btn-hero {
  position: relative;
  isolation: isolate;
}

.btn-primary-anim {
  background: linear-gradient(90deg, rgba(239, 68, 68, 1), rgba(220, 38, 38, 1), rgba(37, 99, 235, 1));
  background-size: 200% 100%;
  animation: grad-pan 6s linear infinite;
  color: #051014;
}

.btn-hero::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(60% 60% at 10% 10%, rgba(255, 255, 255, .35), transparent 40%);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}

.btn-hero:hover::after {
  opacity: 1;
}

.btn-hero::before {
  content: "";
  position: absolute;
  top: -120%;
  left: -20%;
  width: 40%;
  height: 320%;
  transform: rotate(25deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  opacity: 0;
  transition: opacity .25s;
}

.btn-hero:hover::before {
  opacity: .9;
  animation: shine 1.2s ease;
}

.btn-ghost-anim {
  border-color: rgba(0, 0, 0, .16);
}

.btn-ghost-anim:hover {
  box-shadow: 0 10px 24px rgba(33, 158, 188, .18);
  color: #0b1321;
  border-color: var(--accent);
  background: rgba(33, 158, 188, .06);
}

@keyframes grad-pan {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

@keyframes shine {
  from {
    transform: translateX(-120%) rotate(25deg);
  }

  to {
    transform: translateX(320%) rotate(25deg);
  }
}

.section {
  padding: 72px 0;
}

.section h2 {
  font-family: Merriweather, Georgia, serif;
  font-size: clamp(28px, 3.6vw, 44px);
  margin: 0 0 14px;
}

.section p {
  margin: 0 0 14px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 14px;
}

.xsmall {
  font-size: 12px;
}

.intro .stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.intro .stats>div {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .06);
}

.intro .stats strong {
  display: block;
  font-size: 18px;
}

.intro .stats span {
  color: var(--muted);
  font-size: 14px;
}

/* Intro modern */
.intro.modern .intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 28px;
}

.intro.modern .title {
  margin: 0 0 8px;
}

.intro.modern .subtitle {
  margin: 0 0 12px;
}

.bullets {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.bullets li {
  color: var(--text);
}

.badges {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.badge {
  background: rgba(33, 158, 188, .08);
  border: 1px solid rgba(33, 158, 188, .18);
  color: var(--accent);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.intro-media .stack {
  position: relative;
  height: 320px;
  perspective: 1000px;
}

.card-img {
  position: absolute;
  width: 65%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .12);
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), box-shadow .4s ease, filter .4s ease, opacity .6s ease;
}

.card-img.c1 {
  left: 0;
  top: 18px;
  transform: translate3d(calc(var(--dx, 0) + var(--tx, 0)), calc(var(--dy, 0) + var(--ty, 0)), 0) rotate(-4deg) scale(calc(var(--scale, 1) * var(--s, 1)));
}

.card-img.c2 {
  right: 0;
  top: 0;
  transform: translate3d(calc(var(--dx, 0) + var(--tx, 0)), calc(var(--dy, 0) + var(--ty, 0)), 0) rotate(3deg) scale(calc(var(--scale, 1) * var(--s, 1)));
}

.card-img.c3 {
  left: 18%;
  bottom: -8px;
  transform: translate3d(calc(var(--dx, 0) + var(--tx, 0)), calc(var(--dy, 0) + var(--ty, 0)), 0) rotate(-1deg) scale(calc(var(--scale, 1) * var(--s, 1)));
}

.intro-media .stack:hover .card-img {
  --scale: 1.02;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .16);
}

@keyframes appearIn {
  from {
    opacity: 0;
    filter: blur(8px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

/* Fly-in initial offsets */
.intro-media .stack.init .card-img {
  opacity: 0;
  --s: .96;
}

.intro-media .stack.init .card-img.c1 {
  --tx: -160px;
  --ty: 30px;
}

.intro-media .stack.init .card-img.c2 {
  --tx: 180px;
  --ty: 20px;
}

.intro-media .stack.init .card-img.c3 {
  --tx: 0px;
  --ty: 180px;
}

.intro-media .stack .card-img.in {
  opacity: 1;
  --tx: 0px;
  --ty: 0px;
  --s: 1;
}

@media (max-width: 960px) {
  .intro.modern .intro-grid {
    grid-template-columns: 1fr;
  }

  .intro-media .stack {
    height: 260px;
  }
}

/* Stories section */
.stories .cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.stories .card {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
  display: grid;
  gap: 10px;
  cursor: pointer;
}

.stories .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.stories .meta .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  display: inline-block;
}

.stories .title {
  font-weight: 800;
  color: #0b1321;
}

.stories .content {
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow: hidden;
  display: -webkit-box;
  line-clamp: 6;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
}

.stories .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stories .tag {
  font-size: 12px;
  background: rgba(33, 158, 188, .08);
  color: var(--accent);
  border: 1px solid rgba(33, 158, 188, .18);
  padding: 4px 8px;
  border-radius: 999px;

  white-space: nowrap;
  /* không xuống dòng */
}


/* Infinite marquee loop for stories */
.stories.loop .container {
  overflow: hidden;
}

.stories.loop .cards {
  display: inline-flex !important;
  gap: 16px;
  margin-top: 14px;
  white-space: nowrap;
  will-change: transform;
}

.stories.loop .card {
  flex: 0 0 320px;
  white-space: normal;
}

.stories.loop .cards.marquee-running {
  animation: marqueeScroll var(--marquee-duration, 40s) linear infinite;
}

.stories.loop .container:hover .cards.marquee-running {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(2px);
}

.modal-dialog {
  position: relative;
  z-index: 2;
  width: min(720px, 92%);
  margin: 6vh auto;
  background: #fff;
  color: var(--text);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
  display: grid;
  gap: 12px;
  padding: 18px;
  max-height: 88vh;
  overflow: auto;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: #4b5563;
}

.modal-header {
  display: grid;
  gap: 8px;
}

.modal-title {
  margin: 0;
  font-family: Merriweather, Georgia, serif;
  font-size: 22px;
}

.modal-body {
  white-space: pre-wrap;
  word-wrap: break-word;
  color: #111827;
}

.modal-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.form-native {
  margin-top: 10px;
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  gap: 8px;
}

.form-row.inline {
  align-items: center;
}

.form-row label {
  font-weight: 700;
  color: #0b1321;
}

.form-row .req {
  color: #d7263d;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: #fff;
  color: var(--text);
  font: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.form-row textarea {
  resize: vertical;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 3px solid rgba(33, 158, 188, .15);
  border-color: var(--accent);
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
}

.checkbox {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

.form-status {
  margin-left: 12px;
  font-size: 14px;
  color: var(--muted);
}

.form-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

/* Carousel modern */
.stories.modern .cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
}

.stories.modern .cards::-webkit-scrollbar {
  height: 8px;
}

.stories.modern .cards::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .12);
  border-radius: 999px;
}

.stories.modern .card {
  scroll-snap-align: start;
}

.stories .section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.stories .title {
  margin: 0;
}

.stories .subtitle {
  margin: 0;
}

/* Glass card */
.glass-card {
  background: rgba(255, 255, 255, .5);
  backdrop-filter: blur(8px) saturate(140%);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.col-span-2 {
  grid-column: span 2;
}

.btn.lg {
  padding: 14px 18px;
  font-size: 16px;
}

.gallery .grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.gallery figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .06);
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .06);
}

.gallery img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 4/3;
  filter: saturate(1.05) contrast(1.02);
}

/* Dark mode theme tokens and surfaces */
html.dark {
  --bg: #0b0f14;
  --surface: #0f141b;
  --muted: #a6adbb;
  --text: #e5e7eb;
  --brand: #ef4444;
  --brand-2: #dc2626;
  --accent: #3b82f6;
}

html.dark body {
  background:
    radial-gradient(1000px 700px at 80% -10%, rgba(239, 68, 68, .12), transparent 60%),
    radial-gradient(700px 500px at 10% 10%, rgba(59, 130, 246, .12), transparent 60%),
    linear-gradient(180deg, #0b0f14 0%, #0f141b 100%);
}

html.dark .site-header {
  background: rgba(15, 20, 27, .8);
  border-bottom-color: rgba(255, 255, 255, .06);
}

html.dark .brand::after {
  background: linear-gradient(90deg, rgba(239, 68, 68, .2), rgba(59, 130, 246, .2));
}

html.dark .btn {
  background: #0f141b;
  color: var(--text);
  border-color: rgba(255, 255, 255, .08);
}

html.dark .glass-card {
  background: rgba(15, 20, 27, .6);
  border-color: rgba(255, 255, 255, .06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

html.dark .stories .card {
  background: #0f141b;
  border-color: rgba(255, 255, 255, .06);
}

/* Dark mode contrast improvements */
html.dark .display,
html.dark .title,
html.dark .brand {
  color: var(--text);
}

html.dark .lead,
html.dark .hero-sub {
  color: #cbd5e1;
}

html.dark .site-nav a:hover {
  color: #93c5fd;
}

html.dark .btn.primary {
  color: #fff;
}

html.dark .btn.ghost {
  color: #93c5fd;
  border-color: rgba(147, 197, 253, .35);
  background: rgba(59, 130, 246, .06);
}

html.dark .btn.ghost:hover {
  background: rgba(59, 130, 246, .12);
}

html.dark input,
html.dark select,
html.dark textarea {
  background: #111827;
  border-color: rgba(255, 255, 255, .12);
  color: var(--text);
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #94a3b8;
}

html.dark .field-hint,
html.dark .form-status {
  color: #a6adbb;
}

html.dark .form-row label {
  color: #e5e7eb;
}

html.dark .checkbox {
  color: #cbd5e1;
}

html.dark .modal-dialog {
  background: #0f141b;
  color: var(--text);
  border-color: rgba(255, 255, 255, .08);
}

html.dark .modal-close {
  color: #e5e7eb;
}

html.dark .stories .tag {
  background: rgba(59, 130, 246, .12);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, .28);
}

html.dark .chip {
  background: rgba(59, 130, 246, .08);
  border-color: rgba(59, 130, 246, .2);
  color: #e5e7eb;
}

html.dark .badge-float {
  background: rgba(15, 23, 42, .92);
  /* slate-900 with opacity */
  color: #f1f5f9;
  /* slate-50 */
  border-color: rgba(147, 197, 253, .35);
  /* light blue border for contrast */
  box-shadow: 0 10px 28px rgba(0, 0, 0, .55);
}

html.dark .theme-toggle {
  border-color: rgba(255, 255, 255, .12);
}

html.dark .theme-toggle:hover {
  background: rgba(255, 255, 255, .06);
}

.site-footer {
  border-top: 1px solid rgba(0, 0, 0, .06);
  background: rgba(255, 255, 255, .8);
}

html.dark .site-footer {
  background: rgba(15, 20, 27, .9);
  border-top-color: rgba(255, 255, 255, .08);
}

html.dark .footer-links a {
  color: #a6adbb;
}

html.dark .footer-links a:hover {
  color: #93c5fd;
}

html.dark .footer-brand .brand {
  color: var(--text);
}


html.dark .mock-meta {
  color: rebeccapurple;
}

html.dark #submitBtn {
  background-color: rgb(211, 54, 54);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr .8fr .8fr;
  gap: 20px;
  padding: 24px 0;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

@media (max-width: 960px) {
  .site-nav {
    display: none;
    position: absolute;
    right: 4%;
    top: 56px;
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 12px;
    padding: 10px;
    flex-direction: column;
    gap: 10px;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .intro .stats {
    grid-template-columns: 1fr;
  }

  .gallery .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 961px) and (max-width: 1280px) {
  .gallery .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Reveal iframe when a valid src is present via JS */
.iframe-ratio.ready iframe {
  display: block;
}

.iframe-ratio.ready .iframe-placeholder {
  display: none;
}

/* Section divider */
.section-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 120px;
  color: #fff;
  opacity: .9;
  pointer-events: none;
  z-index: 1;
}

.section-divider svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: all .6s cubic-bezier(.21, 1, .21, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.lead {
  margin-bottom: 0px;
}

html.dark .modal-body {
  color: white;
}


html.dark #name {
  color: rgb(0, 0, 0);
}

html.dark #name::placeholder {
  color: rgb(190, 175, 123);
}

html.dark #email {
  color: black;
}

html.dark #email::placeholder {
  color: rgb(190, 175, 123);
}

html.dark #category {
  background-color: white;
  color: rgb(190, 175, 123);
}

html.dark #category option {
  color: #000000;
}

html.dark #title::placeholder {
  color: rgb(190, 175, 123);
}

html.dark #title {
  color: rgb(0, 0, 0);
}

html.dark #story::placeholder {
  color: rgb(190, 175, 123);
  background-color: white;
}

html.dark #story {
  color: black;
  background-color: white;
}

.btn-hero {
  margin-top: 30px;
}


@media screen and (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: center;
    margin: 60px auto;
  }

  .b2 {
    margin-left: 15px;
  }

  .b1 {
    margin-right: 20px;
  }

  .c3 {
    position: relative;
    width: auto;
    height: 250px;
    top: 40px;
  }


}

#popupOverlay {
  display: none;
}

/* Mặc định: ẩn mobile */
.mobile-only {
  display: none;
}

/* Mặc định: hiện desktop */
.desktop-only {
  display: block;
}


/* Mobile */
@media screen and (max-width: 768px) {

  html,
  body {
    overflow-x: hidden;
  }

  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }

  .cards.desktop-only.marquee-running {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .mobile-only h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--accent);
  }

  .mobile-stories {
    list-style: none;
    padding: 0;
    margin: 12px 0;
  }

  .mobile-stories li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .mobile-stories strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
  }

  .mobile-stories .muted {
    font-size: 12px;
    color: #666;
  }

  .more {
    margin-top: 12px;
    font-size: 14px;
    color: var(--accent);
  }

  #cau-chuyen {
    padding-top: 20px;
    padding-bottom: 0px;
  }

  .c3 {
    width: 60%;
    height: auto;
    position: relative;
    top: 150px;
    left: 150px;
  }

  .li-stories-mobile {
    margin-bottom: 15px;
    border: solid 1px rgb(178, 131, 131);
    border-top-left-radius: 20px;
    /* góc trên bên trái */
    border-top-right-radius: 20px;
    /* góc trên bên phải */
  }

  .li-title-stories-mobile {
    padding-left: 20px;
  }

  .sp-li-stories {
    padding-left: 20px;
  }

  .cover-more {
    text-decoration: none;
  }

  .more {
    font-size: 12px;
  }



  .mobile-only {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
  }

  .mobile-stories {
    list-style: none;
    padding: 0;
  }

  .li-stories-mobile {
    background: #f5f5f5;
    margin: 10px 0;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
  }

  .li-stories-mobile:hover {
    background: #e0e0e0;
  }

  .li-title-stories-mobile {
    color: #333;
    font-size: 16px;
  }

  .muted {
    color: #666;
    font-size: 14px;
  }

  .cover-more {
    display: block;
    margin-top: 20px;
    text-decoration: none;
  }

  .more {
    background: #007bff;
    color: white;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    margin: 0;
  }

  /* Popup styles */
  .popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
  }

  .popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 12px;
    max-width: 90%;
    width: 500px;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }

  .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
  }

  .popup-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0;
  }

  .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
  }

  .close-btn:hover {
    background-color: #f0f0f0;
    color: #333;
  }

  .popup-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
  }

  .popup-story-content {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
  }

  /* Mobile responsive */
  @media (max-width: 600px) {
    .popup-content {
      width: 95%;
      margin: 10px;
      padding: 20px;
    }
  }

  .title.in {
    padding-top: 20px;
    border-top: solid 2px black;
    text-align: center;
  }

  .muted.in {
    text-align: center;
    margin-bottom: 0px;
  }

  .section.submit {
    padding-top: 10px;
  }

  html.dark .title.in {
    border-top: solid 2px rgb(255, 255, 255);
  }

  #gui-chuyen h2 {
    text-align: center;
  }

  html.dark .li-stories-mobile {
    background-color: #ddcfcf;
  }

  .popup-content {
    margin: 0px;
  }

  .cover-more .more {
    display: flex;
    font-size: 11px;
    text-align: center;
  }
}


.form-row {
  margin-bottom: 20px;
}

.form-row label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

/* Hide default file input */
.form-row input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Custom file input wrapper */
.file-input-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

/* Custom file input styling */
.file-input-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 3px dashed #667eea;
  border-radius: 16px;
  background: rgba(102, 126, 234, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 120px;
}

.file-input-custom:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: #764ba2;
  transform: translateY(-2px);
}

.file-input-content {
  text-align: center;
  pointer-events: none;
}

.file-icon {
  font-size: 40px;
  color: #667eea;
  margin-bottom: 12px;
  display: block;
}

.file-text {
  color: #333;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 8px;
}

.file-hint {
  color: #666;
  font-size: 14px;
  margin-bottom: 6px;
}

.file-types {
  color: #888;
  font-size: 12px;
}

/* Selected file state */
.file-selected {
  background: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
  border-style: solid;
}

.file-selected .file-icon {
  color: #28a745;
}

.file-selected .file-text {
  color: #28a745;
}

/* Drag over state */
.file-dragover {
  background: rgba(102, 126, 234, 0.15);
  border-color: #764ba2;
  border-style: solid;
}

/* File info display */
.file-info {
  margin-top: 15px;
  padding: 15px;
  background: rgba(40, 167, 69, 0.1);
  border-radius: 12px;
  border-left: 4px solid #28a745;
  display: none;
}

.file-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.file-size {
  color: #666;
  font-size: 14px;
}

/* Demo styles */
h1 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
  font-size: 2em;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 768px) {
  .container {
    padding: 30px 20px;
  }

  .file-input-custom {
    min-height: 100px;
    padding: 15px;
  }

  .file-icon {
    font-size: 32px;
  }

  .file-text {
    font-size: 16px;
  }
}