@font-face {
  font-family: 'Abival';
  src: url('fonts/Abival-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: #0d0d0d;
  color: #fff;
  line-height: 1.6;
}

/* HEADER */
.header {
  position: fixed;
  width: 100%;
  background: rgba(25, 25, 30, 0.45); /* lighter + more transparent */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
}


.nav-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.logo {
  font-family: 'Abival', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 4px;
  color: #cfcfcf;
}

.nav {
  position: relative;
}

/* IMPORTANT FIX */
.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
  position: relative; /* ensures underline positions correctly */
}

.nav-link {
  text-decoration: none;
  color: #aaa;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #fff;
}

.nav-link.active {
  color: #fff;
}

/* RED UNDERLINE */
.underline {
  position: absolute;
  bottom: -6px;
  left: 0;
  height: 3px;
  width: 0;
  background: #e10600;
  transition: all 0.3s ease;
}

/* SECTIONS */
.section {
  min-height: 100vh;
  padding: 120px 20px 60px;
  width: 100%;
}

.container {
  max-width: 1100px;
  margin: auto;
}

.section.dark {
  background: #151515;
}

/* LOGO - Simple SKAM Logo */
@import url('https://fonts.googleapis.com/css2?family=Abival&display=swap');

.logo-text {
  font-family: 'Abival', serif;
  font-size: 6rem;       /* adjust size as needed */
  font-weight: 700;
  color: #cfcfcf;        /* same red as underline, merch-friendly */
  letter-spacing: 4px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center; /* THIS FIXES LEFT ALIGN ISSUE */
  text-align: center;  /* THIS FIXES TEXT POSITION */
  padding: 180px 20px 60px;
  color: white;
  background: url("imgs/SKAM_singing.webp") center top / cover no-repeat fixed;
}

/* Dark overlay */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 0;
}

.hero h1,
.hero p {
  position: relative;
  z-index: 1;
}

.hero-buttons {
  margin-top: 25px;
  display: flex;
  gap: 20px;
  z-index: 1;
  position: relative;
}

.btn {
  padding: 12px 28px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  transition: 0.3s ease;
}

.btn.primary {
  background: #e10600;
  color: white;
}

.btn.primary:hover {
  background: #ff1f1f;
}

.btn.secondary {
  border: 2px solid white;
  color: white;
}

.btn.secondary:hover {
  background: white;
  color: black;
}

/* ABOUT SECTION */
.about-title-row {
  text-align: center;
  margin-bottom: 50px;
}

.about-title-row h1 {
  font-size: 3rem;
  color: #e10600; /* matches red underline */
  letter-spacing: 2px;
}

.about-columns {
  display: flex;
  align-items: flex-start;
  gap: 50px;
  flex-wrap: wrap;
}

.about-left,
.about-right {
  flex: 1 1 400px; /* grow, shrink, min-width 400px */
}

.about-left img {
  width: 110%; /* slightly larger than container */
  max-width: 500px; /* optional max width */
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

.about-right {
  max-height: 600px; /* scrollable height */
  overflow-y: auto;
}

.about-right h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: #cfcfcf;
}

.about-right p {
  margin-bottom: 15px;
  line-height: 1.7;
  color: #ddd;
  text-align: justify; /* justify text */
  text-justify: inter-word;
  padding-right: 5px; /* small padding for scrollbar */
}

/* Add a subtle scrollbar style (optional) */
.about-right::-webkit-scrollbar {
  width: 8px;
}

.about-right::-webkit-scrollbar-thumb {
  background-color: #e10600;
  border-radius: 4px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .about-columns {
    flex-direction: column;
    gap: 30px;
  }

  .about-left img {
    width: 100%;
    max-width: 100%;
  }

  .about-title-row h1 {
    font-size: 2.5rem;
  }

  .about-right h2 {
    font-size: 1.4rem;
  }

  .about-right {
    max-height: unset; /* scrollable box not needed on mobile */
    overflow-y: unset;
  }
}





/* ===============================
   MUSIC PLAYER SECTION
   =============================== */
.music-player-section {
  padding: 120px 20px 80px;
  background: #060607;
  color: #fff;
}

.music-player-header {
  text-align: center;
  margin-bottom: 60px;
}

.music-player-header h1 {
  font-size: 3rem;
  color: #cfcfcf;
}

.music-player-header h2 {
  font-size: 1.3rem;
  color: #aaa;
}

.music-player-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
}

.music-player-left img {
  width: 100%;
  border-radius: 12px;
}

/* ===============================
   PLAYER STYLES
   =============================== */
.right-column .player {
  background: #c99a03;
  border-radius: 12px;
  padding: 25px;
  color: #fff;
  overflow: visible;
  max-width: 500px;
  margin: 0 auto;
}

.player-top {
  display: flex;
  align-items: center;
  position: relative;
  gap: 15px;
}

/* ICONS */
.icon-btn {
  width: 40px;
  text-align: center;
  cursor: pointer;
  font-size: 1.2rem;
}

/* SCREEN */
.screen {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  background: #050505;
  padding: 8px 12px;
  border-radius: 6px;
}

.scroll-text {
  display: inline-block;
  padding-left: 100%;
  animation: scroll 10s linear infinite;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.tracklist {
  background: rgba(247, 209, 139, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.65s ease;
}

.tracklist.open {
  max-height: 800px;
}

.track {
  padding: 10px;
  cursor: pointer;
}

.track:hover {
  background: #ccc5c5;
}

/* PROGRESS BAR */
.progress-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
}

#progressBar {
  flex: 1;
}

/* CONTROLS */
.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.control-btn {
  background: transparent; /* removes the circle */
  border: none;
  color: #fff;
  width: auto; /* lets the icon size define button size */
  height: auto;
  cursor: pointer;
  font-size: 1.5rem; /* adjust so icon is visible */
  transition: transform 0.2s ease; /* keep hover scaling */
  padding: 0; /* remove padding so icon is centered */
}

.control-btn:hover {
  transform: scale(1.2); /* hover scale effect */
  color: #cf2323; /* subtle highlight, no red */
}

.control-btn.active {
  color: #e10600 !important;
}

.main-play {
  font-size: 1.5rem;
}

/* HEART BUTTON */
.heart {
  color: red;
  transition: 0.3s;
}

.heart.glow {
  color: #fff;
  text-shadow: 0 0 8px #fff;
}

.heart:hover {
  animation: heartPulse 0.5s ease;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.icon-wrapper {
  position: relative;
}

/* BUY BUTTONS */
.buy-buttons {
  display: flex;
  gap: 10px;
  margin: 20px 0 0 0; /* ensures space above */
  flex-wrap: wrap;
  justify-content: center; /* centers under player */
}

.buy-btn {
  text-decoration: none;
  background-color: #1DB954;
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.25s ease;
}

.buy-btn:hover {
  background-color: #14833b;
}

/* VOLUME ICON (MUTE/UNMUTE) */
.icon-btn#volumeBtn i {
  cursor: pointer;
}

/* ===============================
   RESPONSIVE
   =============================== */
@media(max-width: 900px) {
  .music-player-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
@media(max-width:768px){
  .music-section{
    flex-direction:column;
  }
}

/* ================= CONTACT SECTION ================= */

/* Top row title */
.contact-title-row {
  text-align: center;
  margin-bottom: 40px;
}

.contact-title-row h1 {
  font-size: 2.8rem;
  color: #e10600;
}

/* Inner content: two columns */
.contact-inner {
  display: flex;
  gap: 60px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap; /* ensures stacking on small screens */
}

/* Left column: form */
.contact-left {
  flex: 1;
  min-width: 280px;
  max-width: 500px;
}

.contact-left h2 {
  font-size: 1.8rem;
  color: #cfcfcf;
  margin-bottom: 20px;
}


/* Contact form styling */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: none;
  border-radius: 4px;
  background: #222;
  color: #fff;
  font-size: 1rem;
}

.contact-form button {
  padding: 12px;
  background: #e10600;
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.3s ease;
}

.contact-form button:hover {
  background: #ff1f1f;
}

/* Right column: description */
.contact-right {
  flex: 1;
  min-width: 280px;
  max-width: 500px;
  color: #aaa;
  font-size: 1rem;
  line-height: 1.6;
  text-align: justify;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .contact-inner {
    flex-direction: column;
    gap: 30px;
  }

  .contact-title-row h1 {
    font-size: 2.2rem;
  }
}

/* ================= CONTACT FIXES ================= */

/* 1) Move the entire section content up */
.section.contact {
  padding-top: 80px; /* previously 120px, now closer to top */
}

.contact-title-row {
  margin-top: 0; /* remove extra space at top */
  margin-bottom: 30px; /* preserve spacing below */
}

/* 2) Swap H1 and H2 colors with high specificity to override previous rules */
.section.contact .contact-title-row h1 {
  color: #cfcfcf !important; /* light grey instead of red */
}

.section.contact .contact-left h2 {
  color: #e10600 !important; /* red instead of light grey */
}



/* FOOTER */
.footer {
  text-align: center;
  padding: 40px 20px;
  background: #310000;
  color: #fff;
}

.footer p {
  margin-bottom: 15px;
  font-size: 1rem;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-socials a {
  position: relative;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.3s ease, color 0.3s ease;
}

.footer-socials a svg {
  width: 24px;
  height: 24px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-socials a::after {
  content: attr(data-name);
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, 10px);
  font-size: 0.9rem;
  font-weight: 700;
  color: #78d3f7;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-socials a:hover svg {
  opacity: 0;
  transform: translateY(-10%);
}

.footer-socials a:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.footer-socials a:hover {
  transform: scale(1.2);
}

/* ANIMATIONS */
.fade-in {
  opacity:0;
  transform:translateY(40px);
  transition:0.8s ease;
}

.fade-in.show {
  opacity:1;
  transform:translateY(0);
}

@keyframes heroFade {
  from { opacity:0; }
  to { opacity:1; }
}

@keyframes slideUp {
  from { opacity:0; transform:translateY(20px); }
  to { opacity:1; transform:translateY(0); }
}

/* MOBILE */
@media(max-width:768px) {
  .hero-title { font-size:2.6rem; }
  .tour-list li { flex-direction:column; gap:10px; }
}

/* ===== HARD SEPARATION FIX: SUBSCRIBE → FOOTER ===== */
#subscribe {
  margin-bottom: 120px;
}

.footer {
  margin-top: 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {

  .nav-links {
    gap: 15px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {

  .nav-links {
    gap: 15px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
}

/* HAMBURGER */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  position: relative;
  z-index: 1100;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: #fff;
  transition: 0.3s;
}

/* Animate to X */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* MOBILE MENU */
@media (max-width: 768px) {

  .nav-links {
    position: absolute;
    top: 70px;
    right: 0;
    background: rgba(13,13,13,0.95);
    flex-direction: column;
    width: 220px;
    padding: 20px;
    gap: 20px;
    transform: translateY(-200%);
    transition: transform 0.3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .hamburger {
    display: flex;
  }

  .underline {
    display: none;
  }
}


/* ABOUT SECTION COLOR TWEAK */
.about-title-row h1 {
  color: #cfcfcf; /* swapped with h2 color */
}

.about-right h2 {
  color: #e10600; /* swapped with h1 color */
}

/* Control About image height directly */
.about-left img {
  height: 480px;     /* adjust this number until it feels right */
  width: auto;       /* keeps proportions natural */
  max-width: 100%;   /* prevents overflow on smaller screens */
  display: block;
  margin: 0 auto;
}


/* Reduce scrollable bio height */
.about-right {
  max-height: 450px; /* previously 600px, now shorter */
  overflow-y: auto;
}


/* ===== Volume Button & Slider ===== */
.wp-volume-wrapper {
  position: relative;
  display: inline-block;
}

/* Hide slider behind icon */
.wp-volume-wrapper {
  position: relative;
  display: inline-block;
}

.wp-volume-slider {
  position: absolute;
  bottom: 100%; /* slide up from behind icon */
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 100px; /* slider length */
  display: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  z-index: 10;
}

/* When active, slide out */
.wp-volume-wrapper.active .wp-volume-slider {
  display: block;
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.news-section {
  padding: 100px 20px;
  background: #0f0f0f;
  color: #fff;
}

.news-header {
  text-align: center;
  margin-bottom: 60px;
}

.news-header h2 {
  font-size: 2.8rem;
  color: #aaa;
  margin-bottom: 10px;
}

.news-header p {
  font-size: 1.1rem;
  color: #e10600;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.news-card {
  background: #151515;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.news-card img {
  width: 100%;
  aspect-ratio: 1 / 1;   /* Clean square layout */
  object-fit: cover;
  object-position: center top; /* Keeps face visible */
}

.news-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-content h3 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 10px;
}

.news-content p {
  font-size: 0.95rem;
  color: #ccc;
  flex-grow: 1;
  margin-bottom: 15px;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(255, 16, 0, 0.3);
}

.news-card .btn.primary {
  align-self: flex-start;
  font-size: 0.9rem;
  padding: 8px 16px;
}

.merch-section {
  background: #111111;
  color: #fff;
  padding: 100px 20px;
}

.merch-header {
  text-align: center;
  margin-bottom: 60px;
}

.merch-header h2 {
  font-size: 2.8rem;
  color: #aaa;
  margin-bottom: 10px;
}

.merch-header p {
  font-size: 1.1rem;
  color: #e10600;
}

.merch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.merch-card {
  background: #151515;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}

.merch-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.merch-info {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.merch-info h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #fff;
}

.merch-info p {
  font-size: 1rem;
  margin-bottom: 15px;
  color: #ccc;
}

.merch-info button.btn.primary {
  align-self: flex-start;
  font-size: 0.9rem;
  padding: 10px 18px;
  cursor: pointer;
}

.merch-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(255,16,0,0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .merch-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}


/* ================= CLEAN MUSIC PLAYER ================= */

.music-player-section {
  padding: 120px 20px 80px;
  background: #060607;
}

.music-player-header {
  text-align: center;
  margin-bottom: 60px;
}

.music-player-header h1 {
  font-size: 3rem;
  color: #cfcfcf;
}

.music-player-header h2 {
  font-size: 1.3rem;
  color: #e10600;
}

.music-player-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
}

.music-player-left img {
  width: 100%;
  border-radius: 12px;
}

.music-player-right {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* PLAYER BOX */
.custom-player {
  background: #1a1a1f;
  border-radius: 12px;
  padding: 25px;
  overflow: hidden;
  transition: all 0.4s ease;
}

/* TOP BAR */
.player-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}

/* SCREEN */
.player-screen {
  flex: 1;
  background: #111;
  padding: 8px 12px;
  border-radius: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.screen-text {
  display: inline-block;
}

/* TRACKLIST */
.wp-tracklist {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;

  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease;
}

.wp-tracklist.open {
  max-height: 500px;
}

.wp-tracklist li {
  padding: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.wp-tracklist li:hover {
  background: #fd5e5e;
}

.wp-tracklist li.active {
  background: #e10600;
}

/* PROGRESS */
.progress-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.progress-bar {
  flex: 1;
}

/* CONTROLS */
.player-controls {
  display: flex;
  justify-content: center;
  gap: 18px;
}


/* VOLUME */
.volume-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-control {
  width: 90px;
}

/* STREAMING BUTTONS */
.sounds-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  transition: transform 0.45s ease;
}

.sounds-buttons a {
  padding: 10px 18px;
  background: #ffffff;
  color: #000;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  transition: 0.3s ease;
}

.sounds-buttons a:hover {
  background: #bb2a2a;
}

/* Responsive */
@media (max-width: 900px) {
  .music-player-grid {
    grid-template-columns: 1fr;
  }
}

/* Smooth movement for buy buttons */
#buyButtons {
  transition: margin-top 0.4s ease, transform 0.4s ease;
  margin-top: 40px; /* extra spacing from player */
  display: flex;
  justify-content: center;
  gap: 15px;
}

.icon-wrapper {
  position: relative;
}

.bubble {
  position: absolute;
  bottom: 45px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.bubble.open {
  opacity: 1;
  pointer-events: auto; /* needed so share icons can be clicked */
}

.share-menu i {
  cursor: pointer;
  margin: 0 6px;
  transition: transform 0.2s ease;
}

.share-menu i:hover {
  transform: scale(1.2);
  color: #e10600;
}

.news-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  z-index: 9999;
  padding: 20px;
}

.news-modal.show {
  display: block;
}

/* Centered modal container */
.news-modal-content {
  background: #111;
  color: #fff;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;            /* Enables vertical scroll */
  overflow-y: auto;            /* Scroll inside modal */
  margin: 5vh auto;            /* Center vertically */
  padding: 40px;
  border-radius: 8px;
  position: relative;
}

/* Scrollbar styling */
.news-modal-content::-webkit-scrollbar {
  width: 6px;
}

.news-modal-content::-webkit-scrollbar-thumb {
  background: #e10600;
  border-radius: 3px;
}

.news-modal-content {
  background: #111;
  color: #fff;
  max-width: 600px;
  width: 100%;
  padding: 40px;
  border-radius: 8px;
  position: relative;
}

.news-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
}

/* Hide checkbox */
#toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Show dialog when checked */
#toggle:checked ~ dialog {
  display: block;
}

/* Trigger button styling */
label[for="toggle"] {
  display: inline-block;
  background: #e10600;
  color: #ffffff;
  padding: 0.5em 1em;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

label[for="toggle"]:hover {
  background: #e10600;
}

/* Dialog base styling */
dialog {
  display: none;
  position: fixed;              /* Take full control */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border: none;
  border-radius: 8px;
  padding: 2rem;
  background: #111;
  color: #fff;
  animation: appear 350ms ease-in;
  z-index: 9999;
}

/* Center dialog */
dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

/* Animation */
@keyframes appear {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.news-card dialog {
  position: fixed !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: min(50vw, 500px);   /* Half viewport width, capped */
  height: 50vh;              /* Half viewport height */

  max-height: 50vh;
  overflow-y: auto;

  padding: 2rem;
  border: none;
  border-radius: 12px;
  background: #111;
  color: #fff;
  z-index: 9999;
}

/* Force dialog to ignore transformed parents */
.news-card dialog {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

@media (max-width: 768px) {
  .news-card dialog {
    width: 90%;
    height: 70vh;
    max-height: 70vh;
  }
}

/* Prevent hover shift while open */
#toggle:checked ~ dialog,
#toggle:checked ~ dialog * {
  pointer-events: auto;
}

#toggle:checked ~ dialog {
  display: block;
}

/* Freeze parent card hover movement */
.news-card:has(#toggle:checked) {
  transform: none !important;
}

/* Custom Scrollbar — WebKit Browsers */
.news-card dialog::-webkit-scrollbar {
  width: 6px;
}

.news-card dialog::-webkit-scrollbar-track {
  background: transparent;
}

.news-card dialog::-webkit-scrollbar-thumb {
  background: #e10600;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.news-card dialog::-webkit-scrollbar-thumb:hover {
  background: #ff2a2a;
}

/* Firefox */
.news-card dialog {
  scrollbar-width: thin;
  scrollbar-color: #e10600 transparent;
}

#shareMenu {
  position: absolute;
  bottom: 45px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  gap: 10px;

  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

#shareMenu.open {
  opacity: 1;
  pointer-events: auto;
}