/* css/news-detail.css */

/*──────────────────────────────────────────────────────────────────────────────
  0. VARIABLES
──────────────────────────────────────────────────────────────────────────────*/
:root {
  --color-primary: #007bff;
  --color-secondary: #555;
  --color-text: #333;
  --color-bg: #f9f9f9;
  --color-card-bg: #ffffff;
  --color-border: #e0e0e0;
  --font-base: 1.35rem;     /* Change this line */
  --font-lg: 1.25rem;
  --font-xl: 1.5rem;
  --radius: 8px;
  --spacing: 1rem;
  --shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/*──────────────────────────────────────────────────────────────────────────────
  1. GLOBAL RESET & BASE
──────────────────────────────────────────────────────────────────────────────*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Inter', sans-serif;
  font-size: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  width: 100%;
}


/*──────────────────────────────────────────────────────────────────────────────
  2. BACK BUTTON
──────────────────────────────────────────────────────────────────────────────*/
.back-button {
  padding: var(--spacing);
}
.btn-back {
  display: inline-block;
  background: #c00;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease;
}
.btn-back:hover {
  background: black;
  color: white;
}

/*──────────────────────────────────────────────────────────────────────────────
  3. LAYOUT
──────────────────────────────────────────────────────────────────────────────*/
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 2.5fr 1fr;
  gap: var(--spacing);
  width: 100%;
  margin: 0 auto;
  padding: var(--spacing);
  box-sizing: border-box;
}


/*──────────────────────────────────────────────────────────────────────────────
  4. SIDEBARS
──────────────────────────────────────────────────────────────────────────────*/
.sidebar-other-news,
.sidebar-empty {
  background: var(--color-card-bg);
  border-radius: var(--radius);
  padding: var(--spacing);
  box-shadow: var(--shadow);
}

/* Other News */
.sidebar-other-news h3 {
  font-size: var(--font-lg);
  margin-bottom: 0.75rem;
  color: #c00;
}
.sidebar-other-news ul {
  list-style: none;
}
.sidebar-other-news li + li {
  margin-top: 0.75rem;
}
.sidebar-other-news a {
  text-decoration: none;
  color: var(--color-text);
  transition: color 0.2s;
}
.sidebar-other-news a:hover {
  color: var(--color-primary);
}

/*──────────────────────────────────────────────────────────────────────────────
  5. MAIN ARTICLE
──────────────────────────────────────────────────────────────────────────────*/
.news-detail-content {
  background: var(--color-card-bg);
  border-radius: var(--radius);
  padding: var(--spacing);
  box-shadow: var(--shadow);
}
.news-detail-content h1 {
  font-size: var(--font-xl);
  margin-bottom: 0.5rem;
}
.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}
.news-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.detail-image img {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.detail-content {
  color: var(--color-text);
  line-height: 1.8;
}

/*──────────────────────────────────────────────────────────────────────────────
  6. RESPONSIVE
──────────────────────────────────────────────────────────────────────────────*/
/* Collapse right sidebar first */
@media (max-width: 1024px) {
  .detail-layout {
    grid-template-columns: 1fr 2fr;
  }
  .sidebar-empty {
    display: none;
  }
}

/* Stack into single column on tablets and below */
@media (max-width: 768px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-other-news {
    margin-bottom: var(--spacing);
  }
}

/* Tweak typography on small screens */
@media (max-width: 480px) {
  .btn-back {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
  .news-detail-content h1 {
    font-size: 1.3rem;
  }
  .news-meta {
    font-size: 0.8rem;
  }
  .sidebar-other-news h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .sidebar-other-news {
    display: none !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   ADS SIDEBAR (no link)
──────────────────────────────────────────────────────────────────────────────*/
.sidebar-ads {
  background: var(--color-card-bg);
  border-radius: var(--radius);
  padding: var(--spacing);
  box-shadow: var(--shadow);
  text-align: center;
}
.sidebar-ads .ad-thumb {
  max-width: 100%;
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: var(--spacing);
  transition: transform 0.2s ease;
}
.sidebar-ads .ad-thumb:hover {
  transform: scale(1.03);
}


/* ──────────────────────────────────────────────────────────────────────────
   8. MODAL POPUP
──────────────────────────────────────────────────────────────────────────────*/
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: var(--spacing);
}
.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}
.modal-content img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.modal-close {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #fff;
  color: #333;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.2s;
}
.modal-close:hover {
  background: #eee;
}
