/* =========================================================
   Daman Game – Global Styles (Logo: red + white, no 3rd party)
   ========================================================= */
:root {
  --daman-red: #c41e3a;
  --daman-red-dark: #a01830;
  --daman-red-soft: rgba(196, 30, 58, 0.12);
  --white: #ffffff;
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-muted: #4a4a4a;
  --card-bg: #f8f8f8;
  --border-soft: #e8e8e8;
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.06);
  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Focus visible - Accessibility & Best Practices */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--daman-red);
  outline-offset: 2px;
}

.nav-links a:focus-visible,
.logo-wrap:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 2px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

p {
  margin: 0 0 1rem;
}

h1, h2, h3, h4 {
  margin: 0 0 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.35rem); }

a {
  color: var(--daman-red);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
  padding: 0 0.5rem;
}

.section {
  padding: clamp(0.5rem, 2vw, 1rem) 0;
}

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

.section-head {
  text-align: center;
  margin-bottom: 1.75rem;
}

/* ===== Buttons ===== */
.btn-primary,
.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.35rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  background: var(--daman-red);
  color: var(--white);
  transition: background 0.25s ease, transform 0.2s ease;
}

.btn-primary:hover,
.btn-nav:hover {
  background: var(--daman-red-dark);
  text-decoration: none;
}

.cta-center {
  text-align: center;
  width: 100%;
}

.cta-center .btn-primary {
  display: inline-block;
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--daman-red);
  border-bottom: 2px solid var(--daman-red-dark);
}

.navbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.logo-wrap:hover {
  color: var(--white);
  text-decoration: none;
  opacity: 0.95;
}

.logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand {
  font-weight: 700;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--white);
  padding: 0.4rem 0.6rem;
  font-weight: 500;
  border-radius: var(--radius-md);
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

.nav-links a.active {
  background: rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  border: 2px solid var(--white);
  background: transparent;
  color: var(--white);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-banner {
  display: block;
  width: 75%;
  max-height: 480px;
  margin: 0 auto;
  object-fit: cover;
  object-position: center top;
  border-radius: 0;
}

.hero-bg {
  display: none;
}

.hero-bg__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(60, 20, 80, 0.55) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 1;
}

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

.hero-content {
  max-width: 720px;
}

.hero-content {
  text-align: center;
  padding: 1.25rem 1rem 1.5rem;
}

.hero-content h1,
.hero-content p {
  color: #000;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-actions .btn-primary {
  background: var(--daman-red);
  color: #fff;
}

.hero-actions .btn-primary:hover {
  background: var(--daman-red-dark);
  color: #fff;
}

/* ===== Cards ===== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card-body {
  padding: clamp(0.75rem, 2vw, 1.25rem);
}

/* ===== Content blocks ===== */
.content-block {
  margin-bottom: 2rem;
}

.content-block h2 {
  color: var(--daman-red);
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.content-block h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.content-block ul, .content-block ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.content-block li {
  margin-bottom: 0.35rem;
}

.content-img-wrap {
  margin: 1rem 0 1.25rem;
  text-align: center;
}

.content-img-wrap img {
  max-width: 280px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* Content left, image right (Download / Login sections) */
.content-left-img-right {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  margin: 1rem 0 1.5rem;
}

.content-left-img-right__text {
  min-width: 0;
}

.content-left-img-right__img {
  margin: 0;
  text-align: center;
}

.content-left-img-right__img picture {
  display: block;
}

.content-left-img-right__img img {
  max-width: 360px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.content-left-img-right.download-section {
  align-items: center;
}

.content-left-img-right.download-section .content-left-img-right__img {
  align-self: center;
}

.content-left-img-right.download-section .content-left-img-right__img img {
  max-width: 380px;
}

@media (max-width: 768px) {
  .content-left-img-right {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin: 1rem 0 1.25rem;
  }

  .content-left-img-right__img {
    text-align: center;
  }

  .content-left-img-right__img img {
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 400px) {
  .content-left-img-right__img img {
    max-width: 100%;
  }
}

/* Image left, content right (Register section) */
.img-left-content-right {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
  margin: 1rem 0 1.5rem;
}

.img-left-content-right__img {
  margin: 0;
  text-align: center;
}

.img-left-content-right__img picture {
  display: block;
}

.img-left-content-right__img img {
  max-width: 360px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.info-media-section .img-left-content-right__img,
.info-media-section .content-left-img-right__img {
  align-self: stretch;
  display: flex;
  align-items: center;
}

.info-media-section .img-left-content-right__img img,
.info-media-section .content-left-img-right__img img {
  width: 220px;
  max-width: 220px;
  height: 100%;
  max-height: 320px;
  object-fit: contain;
  object-position: center;
}

.img-left-content-right__text {
  min-width: 0;
}

@media (max-width: 768px) {
  .img-left-content-right {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin: 1rem 0 1.25rem;
  }

  .img-left-content-right__img {
    text-align: center;
  }

  .img-left-content-right__img img {
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 400px) {
  .img-left-content-right__img img {
    max-width: 100%;
  }
}

/* ===== Table ===== */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.spec-table th,
.spec-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}

.spec-table th {
  background: var(--daman-red);
  color: var(--white);
  font-weight: 600;
}

.spec-table tr:last-child td {
  border-bottom: 0;
}

.spec-table tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

/* ===== Footer ===== */
.site-footer {
  border-top: 2px solid var(--daman-red);
  background: var(--daman-red);
  color: var(--white);
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1.5rem;
  padding: 2rem 0 1.5rem;
}

.footer-col h3 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: var(--white);
}

.footer-about p {
  max-width: 42ch;
  opacity: 0.9;
  font-size: 0.95rem;
}

.footer-logo {
  margin-bottom: 0.5rem;
}

.footer-logo,
.footer-links a {
  color: var(--white);
}

.footer-links a:hover {
  text-decoration: underline;
  opacity: 0.9;
}

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

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1rem 0;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ===== Page hero (inner pages) ===== */
.page-hero {
  background: var(--daman-red);
  color: var(--white);
  padding: 2.5rem 1rem;
  text-align: center;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.page-hero p {
  margin: 0;
  opacity: 0.95;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Contact ===== */
.contact-info-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.contact-info-card h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

/* ===== Forms ===== */
.site-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.site-form input,
.site-form textarea {
  width: 100%;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  font: inherit;
  margin-bottom: 0.75rem;
}

.site-form input:focus,
.site-form textarea:focus {
  outline: none;
  border-color: var(--daman-red);
  box-shadow: 0 0 0 3px var(--daman-red-soft);
}

.form-feedback {
  min-height: 1.5rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.form-feedback.error { color: #b91c1c; }
.form-feedback.success { color: #047857; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===== FAQ ===== */
.faq-item {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
}

.faq-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.faq-list {
  margin-top: 1rem;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item[open] summary {
  margin-bottom: 0.85rem;
}

.faq-item p {
  margin-bottom: 0;
}

.faq-arrow {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--daman-red);
  border-bottom: 2px solid var(--daman-red);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex: 0 0 auto;
}

.faq-item[open] .faq-arrow {
  transform: rotate(-135deg);
}

/* ===== Game Cards ===== */
.game-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.game-card {
  padding: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #fff7f8 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.game-card h3 {
  margin-bottom: 0.5rem;
  color: var(--daman-red);
}

.game-card p {
  margin-bottom: 0;
}

.game-card__media {
  min-height: 220px;
  margin-bottom: 0.9rem;
  border: 1px solid rgba(196, 30, 58, 0.18);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.game-card__media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .container {
    padding: 0 1rem;
  }

  .navbar {
    flex-wrap: wrap;
    padding: 0.6rem 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0 0;
  }

  .nav-links.open {
    display: flex;
  }

  .hero-banner {
    width: 90%;
    max-height: 300px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding-top: 1.5rem;
    gap: 1.25rem;
  }

  .spec-table {
    font-size: 0.9rem;
  }

  .spec-table th,
  .spec-table td {
    padding: 0.5rem 0.6rem;
  }

  .content-img-wrap img {
    max-width: 240px;
  }

  .game-card__media {
    min-height: 200px;
  }

  .game-card__media img {
    height: 200px;
  }

  .game-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .container {
    width: 100%;
    padding: 0 1rem;
  }

  .hero-banner {
    width: 100%;
    max-height: 220px;
    border-radius: 0;
  }

  .content-left-img-right__text h2,
  .img-left-content-right__text h2,
  .content-block h2 {
    font-size: 1.25rem;
  }

  .spec-table {
    display: block;
  }

  .spec-table thead {
    display: none;
  }

  .spec-table tr {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
  }

  .spec-table th,
  .spec-table td {
    display: block;
    padding: 0.5rem 0.75rem;
    border: none;
  }

  .spec-table td {
    border-bottom: 1px solid var(--border-soft);
  }

  .spec-table td:last-child {
    border-bottom: none;
  }

  .spec-table th {
    background: var(--daman-red-soft);
    color: var(--text);
    font-weight: 600;
  }

  .game-cards {
    grid-template-columns: 1fr;
  }
}

/* ===== Blog (API-driven) ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.blog-card {
  margin: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.blog-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.blog-card__link:hover {
  text-decoration: none;
}

.blog-card__media {
  width: 100%;
  overflow: hidden;
  background: var(--border-soft);
}

.blog-card__media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.blog-card__title {
  color: var(--daman-red);
  font-size: 1.15rem;
  margin: 0 0 0.45rem;
  line-height: 1.3;
}

.blog-card__excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 0.65rem;
  flex: 1;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.blog-card__date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  font-weight: 500;
}

.blog-card__author {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.65rem;
  margin-bottom: 0.65rem;
  border-top: 1px solid var(--border-soft);
}

.blog-card__author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-soft);
}

.blog-card__author-text {
  min-width: 0;
  flex: 1;
}

.blog-card__author-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.blog-card__author-bio {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.blog-card__read {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--daman-red);
}

.blog-status {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--card-bg);
}

.blog-status[hidden] {
  display: none;
}

.blog-status--loading {
  border-color: var(--daman-red-soft);
}

.blog-status--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.blog-status--empty {
  color: var(--text-muted);
}

.blog-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.blog-pagination__label {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.blog-pagination__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ===== Blog skeleton loaders ===== */
@keyframes blog-skel-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.blog-skel-block {
  background: linear-gradient(
    90deg,
    var(--card-bg) 0%,
    #ebebeb 45%,
    #f5f5f5 50%,
    #ebebeb 55%,
    var(--card-bg) 100%
  );
  background-size: 220% 100%;
  animation: blog-skel-shimmer 1.35s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .blog-skel-block {
    animation: none;
    background: var(--border-soft);
  }
}

.blog-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.blog-skeleton-grid[hidden] {
  display: none !important;
}

.blog-skeleton-card {
  margin: 0;
  overflow: hidden;
}

.blog-skeleton-card__media {
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--border-soft);
}

.blog-skeleton-card__body {
  padding: clamp(1rem, 3vw, 1.35rem);
}

.blog-skel-line {
  height: 0.85rem;
  border-radius: 6px;
  margin-bottom: 0.55rem;
  max-width: 100%;
}

.blog-skel-line:last-child {
  margin-bottom: 0;
}

.blog-skel-line--short {
  max-width: 72%;
}

.blog-skel-line--medium {
  max-width: 88%;
}

.blog-skel-line--tiny {
  height: 0.65rem;
  max-width: 40%;
}

.blog-skel-line--h1 {
  height: 1.35rem;
  max-width: 90%;
  margin-bottom: 0.75rem;
}

.blog-skel-line--meta {
  height: 0.75rem;
  max-width: 8rem;
  margin-bottom: 0.75rem;
}

/* ----- Blog article (detail page) ----- */
.back-to-blog {
  margin: 0 0 1rem;
}

@media (max-width: 760px) {
  .back-to-blog {
    margin-top: 1rem;
  }
}

.blog-article {
  overflow: hidden;
}

.blog-article__top {
  --blog-article-pad-x: clamp(1rem, 3vw, 1.5rem);
  padding: clamp(1rem, 3vw, 1.35rem) var(--blog-article-pad-x) 0;
}

.blog-article__top .blog-article__hero {
  display: block;
  width: calc(100% + 2 * var(--blog-article-pad-x));
  max-width: none;
  margin: 0.85rem calc(-1 * var(--blog-article-pad-x)) 0;
  overflow: hidden;
  background: var(--border-soft);
  line-height: 0;
  border-radius: var(--radius-md);
}

.blog-article__hero img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

.blog-article__inner {
  max-width: 760px;
  margin: 0 auto;
}

.blog-article__meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.blog-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.5rem;
  align-items: start;
}

#blog-detail-layout[hidden] {
  display: none !important;
}

.blog-detail-main {
  min-width: 0;
}

.blog-detail-sidebar {
  min-width: 0;
}

/* Sidebar cards stack; scrolls with the page (no sticky / no inner scroll box) */
.blog-detail-sidebar-inner {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 961px) {
  .blog-detail-main {
    padding-bottom: clamp(2rem, 5vh, 4rem);
  }
}

.blog-sidebar-card .card-body {
  padding: 1rem 1.1rem;
}

.blog-sidebar__heading {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--daman-red);
}

.blog-sidebar-search {
  margin: 0 0 0.75rem;
}

.blog-sidebar-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  font-size: 0.88rem;
  font-family: inherit;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text);
}

.blog-sidebar-search-input::placeholder {
  color: var(--text-muted);
}

.blog-sidebar-search-input:focus {
  outline: none;
  border-color: var(--daman-red);
  box-shadow: 0 0 0 3px var(--daman-red-soft);
}

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

.blog-sidebar-item {
  margin-bottom: 0.65rem;
}

.blog-sidebar-item:last-child {
  margin-bottom: 0;
}

.blog-sidebar-item__link {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
}

.blog-sidebar-item__link:hover {
  text-decoration: none;
}

.blog-sidebar-item__link:hover .blog-sidebar-item__title {
  text-decoration: underline;
  color: var(--daman-red);
}

.blog-sidebar-item__thumb {
  width: 72px;
  height: 52px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--border-soft);
}

.blog-sidebar-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-sidebar-item__thumb--empty {
  background: var(--daman-red-soft);
}

.blog-sidebar-item__info {
  min-width: 0;
  flex: 1;
}

.blog-sidebar-item__title {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.blog-sidebar-item__date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.blog-sidebar-empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.blog-author-card {
  margin-top: 1.25rem;
}

.blog-detail-sidebar .blog-sidebar-author.blog-author-card,
.blog-detail-sidebar .blog-sidebar-author {
  margin-top: 0;
}

.blog-sidebar-author .blog-author-card__body > .blog-sidebar__heading {
  margin-bottom: 0.65rem;
}

.blog-sidebar-author .blog-author-card__body {
  padding-top: 0.35rem;
}

/* Narrow sidebar: stack avatar + text so copy doesn’t wrap awkwardly beside the image */
.blog-sidebar-author .blog-author-card__row {
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.blog-sidebar-author .blog-author-card__media:has(> img[hidden]),
.blog-sidebar-author .blog-author-card__media:empty {
  display: none;
}

.blog-sidebar-author .blog-author-card__media {
  flex-shrink: 0;
  line-height: 0;
}

.blog-sidebar-author .blog-author-card__avatar {
  width: 80px;
  height: 80px;
}

.blog-sidebar-author .blog-author-card__text {
  width: 100%;
  align-self: stretch;
  text-align: left;
}

.blog-sidebar-author .blog-author-card__name {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  line-height: 1.35;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.blog-sidebar-author .blog-author-card__bio {
  font-size: 0.9rem;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.blog-author-card__body {
  padding: clamp(1rem, 3vw, 1.35rem);
}

.blog-author-card__title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--daman-red);
}

.blog-author-card__row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.blog-author-card__media {
  flex-shrink: 0;
}

.blog-author-card__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--border-soft);
}

.blog-author-card__text {
  min-width: 0;
  flex: 1;
}

.blog-author-card__name {
  margin: 0 0 0.4rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.blog-author-card__name:empty {
  display: none;
}

.blog-author-card__bio {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.blog-author-card__bio:empty {
  display: none;
}

.blog-article__title {
  color: var(--daman-red);
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0;
  line-height: 1.25;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.blog-article-body {
  font-size: 1.05rem;
}

.blog-article-body h2,
.blog-article-body h3 {
  color: var(--daman-red);
  margin-top: 1.5rem;
}

.blog-article-body img {
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

.blog-article-body a {
  text-decoration: underline;
}

@media (max-width: 960px) {
  .blog-detail-layout {
    grid-template-columns: 1fr;
  }
}

/* Detail page skeleton */
.blog-detail-skeleton-wrap {
  margin-top: 0.5rem;
}

.blog-detail-skeleton-wrap[hidden] {
  display: none !important;
}

.blog-detail-skeleton__layout {
  align-items: start;
}

.blog-skeleton-article__top {
  padding: clamp(1rem, 3vw, 1.35rem) var(--blog-article-pad-x, clamp(1rem, 3vw, 1.5rem)) 0;
}

.blog-skeleton-detail-hero {
  margin: 0.85rem calc(-1 * var(--blog-article-pad-x, clamp(1rem, 3vw, 1.5rem))) 0;
  width: calc(100% + 2 * var(--blog-article-pad-x, clamp(1rem, 3vw, 1.5rem)));
  max-width: none;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  border-radius: var(--radius-md);
}

.blog-skeleton-body {
  padding-top: 0.25rem;
}

.blog-skeleton-body .blog-skel-line {
  margin-bottom: 0.65rem;
}

.blog-skeleton-side-item {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  align-items: flex-start;
}

.blog-skeleton-side-item:last-child {
  margin-bottom: 0;
}

.blog-skeleton-thumb {
  width: 72px;
  height: 52px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.blog-skeleton-side-text {
  flex: 1;
  min-width: 0;
  padding-top: 0.1rem;
}

.blog-skeleton-side-text .blog-skel-line {
  margin-bottom: 0.4rem;
}

.blog-skeleton-side-text .blog-skel-line:last-child {
  margin-bottom: 0;
}
