/* ============================================
   9TH CITY ENTERTAINMENT - Article Page Styles
   Supports Quill.js editor HTML output
   ============================================ */

:root {
    --primary-red: #b10202;
    --primary-black: #000000;
    --primary-white: #FFFFFF;
    --light-gray: #F5F5F5;
    --medium-gray: #999999;
    --dark-gray: #333333;
    --text-gray: #666666;
    --menu-bg: #000000;
    --menu-hover: #C41E3A;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
}

/* ── Reset ─────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Montserrat", sans-serif;
    background-color: var(--primary-white);
    color: var(--dark-gray);
    overflow-x: hidden;
    line-height: 1.7;
}

/* ── Menu button ───────────────────────────── */
.menu-btn {
    position: fixed; top: 30px; right: 30px; z-index: 1000;
    background: transparent; border: none; cursor: pointer;
    padding: 10px; display: flex; flex-direction: column; gap: 6px; transition: all 0.3s;
}
.menu-btn span { width: 30px; height: 3px; background: var(--primary-white); transition: all 0.3s; display: block; }
.menu-btn:hover span { background: var(--primary-red); }
.menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(9px, 9px); }
.menu-btn.active span:nth-child(2) { opacity: 0; }
.menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(9px, -9px); }
body.scrolled .menu-btn span { background: var(--primary-black); }
body.scrolled .menu-btn:hover span { background: var(--primary-red); }

/* ── Side menu ─────────────────────────────── */
.side-menu {
    position: fixed; top: 0; right: -300px; width: 300px; height: 100vh;
    background: var(--menu-bg); z-index: 999;
    transition: right 0.4s cubic-bezier(0.4,0,0.2,1);
    padding: 80px 30px 40px; overflow-y: auto;
}
.side-menu.active { right: 0; box-shadow: -5px 0 20px rgba(0,0,0,0.8); }
.close-btn { position: absolute; top: 30px; left: 30px; background: transparent; border: none; cursor: pointer; padding: 10px; transition: transform 0.3s; }
.close-btn:hover { transform: rotate(90deg); }
.menu-items { list-style: none; padding: 0; margin: 0; }
.menu-items li { margin-bottom: 25px; }
.menu-items li a { color: var(--primary-white); text-decoration: none; font-size: 14px; font-weight: 500; letter-spacing: 0.5px; transition: all 0.3s; display: block; padding: 8px 0; }
.menu-items li a:hover { color: var(--primary-red); padding-left: 10px; }
.menu-items li a.active { color: var(--primary-red); font-weight: 600; }

/* ── News button ───────────────────────────── */
.news-btn {
    position: fixed; top: 0; left: 0;
    background: var(--primary-black); color: var(--primary-white);
    text-decoration: none; padding: 30px 40px;
    font-size: 14px; font-weight: 700; letter-spacing: 2px; z-index: 900; transition: all 0.3s;
}
.news-btn:hover { background: var(--primary-red); padding-left: 50px; }

/* ── Hero ──────────────────────────────────── */
.hero-section {
    position: relative; width: 100%; height: 50vh;
    min-height: 400px; max-height: 600px;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%) contrast(1.1) brightness(0.6); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.7)); z-index: 1; }
.logo-link { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 10; text-align: center; text-decoration: none; transition: all 0.3s; }
.logo-link:hover { transform: translate(-50%,-50%) scale(1.05); }
.hero-logo { width: 160px; height: auto; filter: drop-shadow(0 10px 30px rgba(0,0,0,0.8)); }

/* ── Breadcrumb ────────────────────────────── */
.breadcrumb-container { background: var(--primary-white); padding: 20px 0; border-bottom: 1px solid var(--light-gray); }
.breadcrumb { max-width: 900px; margin: 0 auto; padding: 0 40px; font-size: 13px; color: var(--text-gray); }
.breadcrumb a { color: var(--text-gray); text-decoration: none; transition: color 0.3s; }
.breadcrumb a:hover { color: var(--primary-red); }
.breadcrumb .separator { margin: 0 10px; color: var(--medium-gray); }
.breadcrumb .current { color: var(--primary-red); }

/* ── Main layout ───────────────────────────── */
.article-main { max-width: 1400px; margin: 0 auto; padding: 60px 20px 80px; }
#articleContainer { display: grid; grid-template-columns: 1fr; gap: 60px; opacity: 0; transition: opacity 0.4s ease; }
@media (min-width: 1024px) {
    .article-main { padding: 80px 40px 100px; }
    #articleContainer { grid-template-columns: 1fr 350px; }
}

/* ── Article container ─────────────────────── */
.article-container { max-width: 800px; background: var(--primary-white); }

/* ── Article header ────────────────────────── */
.article-header { margin-bottom: 40px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 25px; font-size: 12px; color: var(--medium-gray); }
.category-badge { background: var(--primary-red); color: var(--primary-white); padding: 6px 14px; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.article-date, .read-time, .author { font-size: 13px; letter-spacing: 0.3px; }
.separator { color: var(--medium-gray); }
.article-title { font-size: 42px; font-weight: 700; line-height: 1.2; color: var(--dark-gray); margin-bottom: 25px; letter-spacing: -0.5px; }
.article-excerpt { font-size: 18px; line-height: 1.7; color: var(--text-gray); font-weight: 400; }

/* ── Featured image ────────────────────────── */
.article-featured-image { margin: 0 0 50px; position: relative; overflow: hidden; }
.article-featured-image img { width: 100%; height: auto; display: block; filter: grayscale(100%) contrast(1.05); transition: filter 0.5s; }
.article-featured-image:hover img { filter: grayscale(0%) contrast(1.05); }
.article-featured-image figcaption { margin-top: 15px; font-size: 13px; color: var(--medium-gray); font-style: italic; text-align: center; }

/* ═══════════════════════════════════════════
   ARTICLE BODY — renders Quill HTML output
   ═══════════════════════════════════════════ */
.article-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--dark-gray);
}

/* Paragraphs */
.article-body p { margin-bottom: 24px; }

/* Headings */
.article-body h1 { font-size: 36px; font-weight: 800; color: var(--dark-gray); margin: 50px 0 20px; letter-spacing: -0.3px; }
.article-body h2 { font-size: 28px; font-weight: 700; color: var(--dark-gray); margin: 50px 0 20px; letter-spacing: -0.3px; }
.article-body h3 { font-size: 22px; font-weight: 600; color: var(--dark-gray); margin: 40px 0 15px; }

/* ── Drop cap ── */
/* Quill adds class="drop-cap" to the <p> element */
.article-body p.drop-cap::first-letter,
.article-body .drop-cap::first-letter {
    font-size: 5em;
    font-weight: 900;
    line-height: 0.72;
    float: left;
    margin: 6px 12px 0 0;
    color: var(--primary-red);
    font-family: 'Montserrat', sans-serif;
}

/* ── Quill text alignment ── */
.article-body .ql-align-center, .article-body [style*="text-align: center"] { text-align: center; }
.article-body .ql-align-right,  .article-body [style*="text-align: right"]  { text-align: right; }
.article-body .ql-align-justify,.article-body [style*="text-align: justify"]{ text-align: justify; }

/* ── Quill inline styles — pass through ──
   Quill outputs inline style="color:...; font-size:...; font-family:..."
   These are inline and render automatically in browsers.
   We just ensure they're not overridden. */
.article-body span[style] { /* inherit — don't override */ }
.article-body strong { font-weight: 700; }
.article-body em     { font-style: italic; }
.article-body u      { text-decoration: underline; }
.article-body s      { text-decoration: line-through; }

/* ── Blockquote — Quill native ── */
.article-body blockquote {
    border-left: 4px solid var(--primary-red);
    margin: 40px 0;
    padding: 20px 30px;
    background: var(--light-gray);
    font-size: 18px;
    font-weight: 500;
    font-style: italic;
    line-height: 1.6;
    color: var(--dark-gray);
    border-radius: 0 4px 4px 0;
}

/* ── Legacy blockquote (seed data) ── */
.article-body .article-quote {
    margin: 40px 0;
    padding: 30px 40px;
    background: var(--light-gray);
    border-left: 4px solid var(--primary-red);
}
.article-body .article-quote p {
    font-size: 20px; font-weight: 500; font-style: italic;
    line-height: 1.6; color: var(--dark-gray); margin-bottom: 15px;
}
.article-body .article-quote cite {
    font-size: 14px; font-weight: 600; font-style: normal; color: var(--text-gray);
}

/* ── Lists ── */
.article-body ul,
.article-body ol,
.article-body .article-list {
    margin: 20px 0 24px 0;
    padding-left: 30px;
}
.article-body li { margin-bottom: 10px; line-height: 1.7; }
/* Quill list classes */
.article-body .ql-indent-1 { padding-left: 3em; }
.article-body .ql-indent-2 { padding-left: 6em; }

/* ── Code block ── */
.article-body pre,
.article-body .ql-code-block-container {
    background: #1a1a2e;
    color: #e2e8f0;
    border-radius: 6px;
    padding: 20px 24px;
    font-size: 13px;
    overflow-x: auto;
    margin: 24px 0;
    font-family: 'Courier New', monospace;
}
.article-body code { font-family: 'Courier New', monospace; font-size: 0.9em; background: rgba(0,0,0,0.07); padding: 2px 5px; border-radius: 3px; }

/* ── Images inside body ── */
.article-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 24px 0;
    border-radius: 4px;
}

/* ── Links ── */
.article-body a {
    color: var(--primary-red);
    text-decoration: underline;
    transition: color 0.2s;
}
.article-body a:hover { color: #8f0101; }

/* ══════════════════════════════════════════════
   INLINE BUTTON — inserted via editor ▶ ⬛ BTN
   Quill saves: <div class="article-btn-block">
     <a href="..." style="...">Label</a>
   </div>
   ══════════════════════════════════════════════ */
.article-body .article-btn-block {
    margin: 30px 0;
    /* text-align is set inline by the editor for left/center/right positioning */
}
/* Primary style (inline style from blot) */
.article-body .article-btn-block a {
    display: inline-block;
    text-decoration: none;
    transition: filter 0.2s, transform 0.2s;
    border-radius: 4px;
}
.article-body .article-btn-block a:hover {
    filter: brightness(0.85);
    transform: translateY(-1px);
}

/* ══════════════════════════════════════════════
   YOUTUBE THUMBNAIL — inserted via editor ▶ VID
   Quill saves: <div class="yt-thumb-wrapper">
     <img src="...thumbnail...">
     <a class="yt-play-btn" href="...">
   </div>
   ══════════════════════════════════════════════ */
.article-body .yt-thumb-wrapper {
    position: relative;
    display: block;
    margin: 30px 0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    transition: transform 0.3s, box-shadow 0.3s;
}
.article-body .yt-thumb-wrapper:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}
.article-body .yt-thumb-wrapper img {
    width: 100%;
    display: block;
    margin: 0;
    border-radius: 0;
    transition: opacity 0.3s;
}
.article-body .yt-thumb-wrapper:hover img { opacity: 0.85; }

.article-body .yt-play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 72px; height: 50px;
    background: rgba(177,2,2,0.92);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
}
.article-body .yt-thumb-wrapper:hover .yt-play-btn {
    background: var(--primary-red);
    transform: translate(-50%, -50%) scale(1.08);
}
.article-body .yt-play-btn::after {
    content: '';
    border-left: 22px solid #fff;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    margin-left: 5px;
}

/* ══════════════════════════════════════════════
   YOUTUBE EMBED — inserted via editor as iframe
   ══════════════════════════════════════════════ */
.article-body .yt-embed-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin: 30px 0;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.article-body .yt-embed-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* ── Sidebar YouTube video box (legacy) ── */
.youtube-video-box {
    cursor: pointer; position: relative; border-radius: 12px;
    overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.3); transition: all 0.3s;
}
.youtube-video-box:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.4); }
.youtube-thumbnail { width: 100%; height: auto; display: block; }
.youtube-play-overlay {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 80px; height: 80px; background: rgba(177,2,2,0.9); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; transition: all 0.3s; pointer-events: none;
}
.youtube-video-box:hover .youtube-play-overlay { background: rgba(196,30,58,0.95); transform: translate(-50%,-50%) scale(1.1); }
.youtube-play-icon { width: 0; height: 0; border-style: solid; border-width: 15px 0 15px 26px; border-color: transparent transparent transparent white; margin-left: 6px; }
.youtube-video-label { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); color: white; font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }

/* ── Article media (stream button area) ── */
.article-media { margin: 50px 0; }
.article-cta { margin: 50px 0; text-align: center; }
.cta-button {
    display: inline-flex; align-items: center; gap: 12px;
    background: var(--primary-red); color: var(--primary-white);
    padding: 18px 40px; text-decoration: none;
    font-size: 15px; font-weight: 600; letter-spacing: 0.5px;
    transition: all 0.3s; border: none; cursor: pointer;
}
.cta-button:hover { background: var(--primary-black); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(177,2,2,0.3); }
.cta-icon { font-size: 20px; }

/* ── Quill output safety rules ─────────────── */
/* Bare <div> children that weren't converted to <p> still get spacing */
.article-body > div:not(.article-btn-block):not(.yt-block):not(.yt-thumb-wrapper):not(.yt-embed-wrapper) {
    margin-bottom: 24px;
    line-height: 1.8;
    color: var(--dark-gray);
}

/* Quill alignment classes on any element */
.article-body .ql-align-center { text-align: center; }
.article-body .ql-align-right  { text-align: right; }
.article-body .ql-align-justify{ text-align: justify; }

/* Quill direction */
.article-body .ql-direction-rtl { direction: rtl; text-align: inherit; }

/* Button block — flex wrapper for left/center/right alignment */
/* The editor sets display:flex and justify-content inline. Ensure it renders. */
.article-body .article-btn-block[style*="flex"] {
    display: flex !important;
}

/* Pass-through for Quill inline line-height — already set inline, just don't block it */
.article-body p[style],
.article-body div[style] {
    /* Let inline styles from Quill take effect */
    line-height: inherit;
}

/* Ensure no element inside article body is accidentally hidden */
.article-body > * {
    visibility: visible !important;
    overflow: visible;
}

/* ── Article footer ────────────────────────── */
.article-footer { margin-top: 60px; padding-top: 40px; border-top: 2px solid var(--light-gray); }
.article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 30px; }
.tag-label { font-size: 13px; font-weight: 600; color: var(--dark-gray); }
.tag { display: inline-block; padding: 6px 14px; background: var(--light-gray); color: var(--dark-gray); text-decoration: none; font-size: 12px; font-weight: 500; border-radius: 4px; transition: all 0.3s; }
.tag:hover { background: var(--primary-red); color: var(--primary-white); }
.article-share { display: flex; align-items: center; gap: 15px; }
.share-label { font-size: 13px; font-weight: 600; color: var(--dark-gray); }
.share-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: var(--light-gray); color: var(--dark-gray); border-radius: 50%; text-decoration: none; transition: all 0.3s; }
.share-btn:hover { transform: translateY(-3px); }
.share-btn.twitter:hover  { background: #000; color: var(--primary-white); }
.share-btn.facebook:hover { background: #1877F2; color: var(--primary-white); }
.share-btn.copy:hover     { background: var(--primary-red); color: var(--primary-white); }

/* ── Sidebar ───────────────────────────────── */
.article-sidebar { position: relative; }
@media (min-width: 1024px) { .article-sidebar { position: static; align-self: start; } }
.sidebar-section { margin-bottom: 40px; padding: 30px; background: var(--light-gray); }
.sidebar-title { font-size: 16px; font-weight: 700; letter-spacing: 1px; margin-bottom: 25px; text-transform: uppercase; }
.related-articles { display: flex; flex-direction: column; gap: 20px; }
.related-article { background: var(--primary-white); transition: all 0.3s; }
.related-article:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.related-link { display: flex; gap: 15px; text-decoration: none; color: inherit; }
.related-image { width: 80px; height: 80px; object-fit: cover; flex-shrink: 0; filter: grayscale(100%); transition: filter 0.3s; }
.related-article:hover .related-image { filter: grayscale(0%); }
.related-content { flex: 1; }
.related-category { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 1px; color: var(--primary-red); margin-bottom: 6px; text-transform: uppercase; }
.related-title { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--dark-gray); margin-bottom: 6px; }
.related-date { font-size: 11px; color: var(--medium-gray); }
.newsletter-box { background: var(--primary-white); padding: 25px; }
.newsletter-text { font-size: 14px; color: var(--text-gray); margin-bottom: 20px; line-height: 1.6; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-input { padding: 12px 15px; border: 2px solid var(--light-gray); font-size: 14px; font-family: inherit; transition: border-color 0.3s; }
.newsletter-input:focus { outline: none; border-color: var(--primary-red); }
.newsletter-btn { padding: 12px 20px; background: var(--primary-black); color: var(--primary-white); border: none; font-size: 13px; font-weight: 600; letter-spacing: 0.5px; cursor: pointer; transition: background 0.3s; font-family: inherit; }
.newsletter-btn:hover { background: var(--primary-red); }
.sidebar-social { display: flex; gap: 12px; }
.social-link { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: var(--primary-white); color: var(--dark-gray); border-radius: 50%; text-decoration: none; transition: all 0.3s; }
.social-link:hover { transform: translateY(-3px); }
.social-link.instagram:hover { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); color: var(--primary-white); }
.social-link.twitter:hover  { background: #000; color: var(--primary-white); }

/* ── Back / footer ─────────────────────────── */
.back-to-latest { max-width: 1400px; margin: 0 auto; padding: 0 40px 40px; }
.back-btn { display: inline-flex; align-items: center; gap: 10px; color: var(--text-gray); text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.3s; }
.back-btn:hover { color: var(--primary-red); gap: 15px; }
.footer { background: var(--primary-black); color: var(--primary-white); padding: 50px 40px 30px; text-align: center; }
.social-icons { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; }
.social-icons a { color: var(--primary-white); text-decoration: none; font-size: 18px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.1); border-radius: 50%; transition: all 0.3s; }
.social-icons a:hover { background: var(--primary-red); transform: translateY(-3px); }
.footer-content .copyright { font-size: 11px; color: rgba(255,255,255,0.7); margin-bottom: 15px; }
.footer-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 11px; }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.3s; }
.footer-links a:hover { color: var(--primary-red); }
.footer-links span { color: rgba(255,255,255,0.5); }

/* ── Video modal ───────────────────────────── */
.video-modal.hidden { display: none; }
.video-modal.active { display: flex; }
.video-modal { position: fixed; inset: 0; z-index: 9999; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.85); }
.modal-content { position: relative; width: 90%; max-width: 900px; aspect-ratio: 16/9; background: #000; border-radius: 8px; overflow: hidden; }
.modal-close { position: absolute; top: -40px; right: 0; background: none; border: none; color: white; font-size: 36px; cursor: pointer; z-index: 10; line-height: 1; }
.video-wrapper { width: 100%; height: 100%; }

/* ── Animations ────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.article-container { animation: fadeInUp 0.8s ease-out; }
.article-sidebar   { animation: fadeInUp 0.8s ease-out 0.2s both; }

/* ── Responsive ────────────────────────────── */
@media (max-width: 992px) {
    .article-title   { font-size: 36px; }
    .article-excerpt { font-size: 16px; }
    .article-body h2 { font-size: 24px; }
}
@media (max-width: 768px) {
    .menu-btn { top: 20px; right: 20px; }
    .news-btn { padding: 20px 25px; font-size: 12px; }
    .side-menu { width: 250px; right: -250px; padding: 60px 20px 30px; }
    .hero-section { height: 40vh; min-height: 300px; }
    .hero-logo { width: 120px; }
    .breadcrumb { padding: 0 20px; font-size: 12px; }
    .article-main { padding: 40px 20px 60px; }
    .article-title   { font-size: 28px; }
    .article-excerpt { font-size: 15px; }
    .article-body h2 { font-size: 22px; }
    .article-body p.drop-cap::first-letter,
    .article-body .drop-cap::first-letter { font-size: 3.5em; }
    .article-body blockquote { padding: 16px 20px; font-size: 16px; }
    .sidebar-section { padding: 20px; }
    .back-to-latest  { padding: 0 20px 30px; }
    .footer { padding: 40px 20px 20px; }
    .footer-links { flex-direction: column; gap: 8px; }
    .footer-links span { display: none; }
}
