/* ============================================================
   IMMERSIVE HISTORY ARTICLE STYLES
   Things To Do In Quebec City — History Section
   ============================================================ */

/* ---- Base Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
* { font-family: 'Inter', sans-serif; }
html { scroll-behavior: smooth; }
body { background-color: #F5F5F0; color: #1B2A4A; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* ---- Accessibility ---- */
.skip-nav { position: absolute; top: -100%; left: 16px; z-index: 9999; background: #1B2A4A; color: #fff; padding: 12px 24px; border-radius: 0 0 8px 8px; font-weight: 600; transition: top 0.2s; }
.skip-nav:focus { top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid #D4A853; outline-offset: 2px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }

/* ---- Navigation ---- */
.site-nav { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; height: 64px; }
.nav-logo { font-size: 1.5rem; font-weight: 800; color: #1B2A4A; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-link { position: relative; color: #1B2A4A; font-weight: 500; font-size: 0.95rem; transition: color 0.3s; }
.nav-link::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0; background: #D4A853; transition: width 0.3s; }
.nav-link:hover::after { width: 100%; }
.nav-link:hover { color: #E85D3A; }
.nav-cta { display: flex; align-items: center; gap: 16px; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; left: 0; top: 100%; width: 200px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.12); border-radius: 8px; padding: 8px 0; opacity: 0; visibility: hidden; transition: all 0.2s; z-index: 60; }
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; }
.dropdown-menu a { display: block; padding: 10px 20px; font-size: 0.9rem; color: #1B2A4A; }
.dropdown-menu a:hover { background: #F5F5F0; }
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; }
.mobile-menu { display: none; position: fixed; left: 0; top: 64px; width: 100%; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 24px; transform: translateX(-100%); transition: transform 0.3s; z-index: 55; }
.mobile-menu.active { transform: translateX(0); }
.mobile-menu a { display: block; padding: 12px 0; color: #1B2A4A; font-weight: 500; }
@media (max-width: 768px) { .nav-links, .nav-cta { display: none; } .mobile-menu-btn { display: block; } .mobile-menu { display: block; } }
.btn-primary { display: inline-block; background: #E85D3A; color: #fff; padding: 14px 32px; border-radius: 8px; font-weight: 600; font-size: 1rem; transition: background 0.3s, transform 0.3s; border: none; cursor: pointer; }
.btn-primary:hover { background: #d1461f; transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }

/* ---- Hero ---- */
.article-hero { position: relative; height: 70vh; min-height: 500px; overflow: hidden; background: #1B2A4A; }
.article-hero img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.article-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(27,42,74,0.95) 0%, rgba(27,42,74,0.4) 50%, rgba(27,42,74,0.2) 100%); }
.article-hero-content { position: absolute; bottom: 60px; left: 0; right: 0; padding: 0 24px; max-width: 900px; margin: 0 auto; }
.article-hero-content h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.15; margin-bottom: 20px; text-shadow: 0 2px 20px rgba(0,0,0,0.3); }
.article-meta { color: rgba(255,255,255,0.85); font-size: 0.9rem; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.article-meta .category-badge { background: #D4A853; color: #1B2A4A; padding: 5px 14px; border-radius: 20px; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; }
.scroll-indicator { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #D4A853; animation: bounce 2s infinite; text-align: center; font-size: 0.8rem; }
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-8px); } }

/* ---- Section Navigation (Slideshow-style) ---- */
.section-nav { position: sticky; top: 64px; z-index: 40; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.08); border-bottom: 2px solid #F5F5F0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.section-nav::-webkit-scrollbar { height: 3px; }
.section-nav::-webkit-scrollbar-thumb { background: #D4A853; border-radius: 3px; }
.section-nav-inner { max-width: 900px; margin: 0 auto; padding: 0 24px; display: flex; gap: 0; min-width: max-content; }
.section-nav-item { padding: 16px 20px; font-size: 0.85rem; font-weight: 600; color: #6B7280; white-space: nowrap; cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.3s; background: none; border-top: none; border-left: none; border-right: none; }
.section-nav-item:hover { color: #1B2A4A; background: #F5F5F0; }
.section-nav-item.active { color: #1B2A4A; border-bottom-color: #D4A853; }
@media (max-width: 768px) { .section-nav-item { padding: 12px 14px; font-size: 0.8rem; } }

/* ---- Progress Bar ---- */
.progress-bar { position: fixed; top: 64px; left: 0; width: 0; height: 3px; background: linear-gradient(90deg, #D4A853, #E85D3A); z-index: 45; transition: width 0.1s; }

/* ---- Article Container ---- */
.article-container { max-width: 900px; margin: 0 auto; padding: 0 24px 80px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: #E85D3A; font-weight: 600; margin: 32px 0; font-size: 0.95rem; }
.back-link:hover { color: #d1461f; }

/* ---- Article Sections (Slides) ---- */
.article-section { padding: 48px 0; border-bottom: 1px solid #E5E7EB; opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.article-section.visible { opacity: 1; transform: translateY(0); }
.article-section:last-of-type { border-bottom: none; }
.article-section h2 { font-size: 1.8rem; font-weight: 800; color: #1B2A4A; margin-bottom: 8px; }
.section-subtitle { font-size: 1rem; color: #D4A853; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px; }
.section-divider { width: 60px; height: 3px; background: #D4A853; margin-bottom: 28px; border-radius: 2px; }
.article-section p { font-size: 1.05rem; line-height: 1.85; color: #374151; margin-bottom: 20px; }
.article-section blockquote { border-left: 4px solid #D4A853; padding: 20px 28px; margin: 28px 0; background: #fff; border-radius: 0 12px 12px 0; font-style: italic; color: #4B5563; font-size: 1.1rem; line-height: 1.7; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

/* ---- Photo Gallery within sections ---- */
.photo-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0; border-radius: 12px; overflow: hidden; }
.photo-gallery.single { grid-template-columns: 1fr; }
.photo-gallery.triple { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) { .photo-gallery, .photo-gallery.triple { grid-template-columns: 1fr; } }
.photo-item { position: relative; overflow: hidden; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.photo-item img { width: 100%; height: 280px; object-fit: cover; transition: transform 0.5s; }
.photo-item:hover img { transform: scale(1.05); }
.photo-caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(27,42,74,0.9), transparent); padding: 40px 16px 12px; color: #fff; font-size: 0.85rem; font-weight: 500; }
.photo-caption .photo-era { display: inline-block; background: #D4A853; color: #1B2A4A; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }

/* ---- Then vs Now ---- */
.then-now { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 32px 0; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
@media (max-width: 640px) { .then-now { grid-template-columns: 1fr; } }
.then-now-item { position: relative; }
.then-now-item img { width: 100%; height: 300px; object-fit: cover; }
.then-now-label { position: absolute; top: 12px; left: 12px; padding: 6px 14px; border-radius: 6px; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }
.then-now-label.then { background: rgba(27,42,74,0.9); color: #D4A853; }
.then-now-label.now { background: rgba(212,168,83,0.9); color: #1B2A4A; }
.then-now-caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); padding: 30px 14px 10px; color: #fff; font-size: 0.8rem; }

/* ---- Map Embed ---- */
.map-container { margin: 32px 0; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.12); position: relative; }
.map-container iframe { width: 100%; height: 350px; border: 0; display: block; }
.map-caption { background: #1B2A4A; color: #fff; padding: 14px 20px; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; }
.map-caption .map-icon { color: #D4A853; font-size: 1.2rem; }
.map-caption a { color: #D4A853; text-decoration: underline; }

/* ---- Key Facts Box ---- */
.key-facts { background: #1B2A4A; color: #fff; border-radius: 12px; padding: 28px; margin: 32px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.key-fact { text-align: center; }
.key-fact-value { font-size: 1.8rem; font-weight: 800; color: #D4A853; margin-bottom: 4px; }
.key-fact-label { font-size: 0.8rem; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 1px; }

/* ---- Timeline ---- */
.timeline { position: relative; margin: 32px 0; padding-left: 32px; }
.timeline::before { content: ''; position: absolute; left: 12px; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, #D4A853, #E85D3A); }
.timeline-item { position: relative; margin-bottom: 28px; padding-left: 24px; }
.timeline-item::before { content: ''; position: absolute; left: -24px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #D4A853; border: 3px solid #F5F5F0; box-shadow: 0 0 0 2px #D4A853; }
.timeline-date { font-size: 0.85rem; font-weight: 700; color: #D4A853; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.timeline-content { font-size: 0.95rem; line-height: 1.7; color: #374151; }
.timeline-content strong { color: #1B2A4A; }

/* ---- Visit Info Box ---- */
.visit-info { background: #fff; border: 2px solid #D4A853; border-radius: 12px; padding: 28px; margin: 32px 0; }
.visit-info h3 { color: #1B2A4A; font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.visit-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .visit-info-grid { grid-template-columns: 1fr; } }
.visit-info-item { display: flex; gap: 10px; align-items: flex-start; }
.visit-info-item .icon { font-size: 1.3rem; flex-shrink: 0; }
.visit-info-item .label { font-size: 0.85rem; color: #6B7280; }
.visit-info-item .value { font-size: 0.95rem; font-weight: 600; color: #1B2A4A; }

/* ---- Sources ---- */
.sources-section { background: #fff; border-radius: 12px; padding: 32px; margin-top: 48px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.sources-section h2 { font-size: 1.4rem; font-weight: 700; color: #1B2A4A; margin-bottom: 20px; border: none; }
.sources-section ol { font-size: 0.9rem; line-height: 1.7; color: #6B7280; padding-left: 20px; }
.sources-section li { margin-bottom: 10px; }

/* ---- Related Articles ---- */
.related-articles { margin-top: 48px; }
.related-articles h2 { font-size: 1.4rem; font-weight: 700; color: #1B2A4A; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 768px) { .related-grid { grid-template-columns: 1fr; } }
.related-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: transform 0.3s, box-shadow 0.3s; }
.related-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.related-card img { width: 100%; height: 160px; object-fit: cover; }
.related-card-body { padding: 16px; }
.related-card-body h3 { font-size: 0.95rem; font-weight: 700; color: #1B2A4A; margin-bottom: 8px; line-height: 1.3; }
.related-card-body .badge { display: inline-block; background: #D4A853; color: #1B2A4A; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }

/* ---- Footer ---- */
.footer { background: #1B2A4A; color: #fff; padding: 64px 24px 32px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; max-width: 1280px; margin: 0 auto 32px; }
.footer h3 { color: #D4A853; font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.footer p, .footer a { color: #9CA3AF; font-size: 0.875rem; }
.footer a:hover { color: #D4A853; }
.footer ul { list-style: none; padding: 0; }
.footer ul li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid #374151; padding-top: 32px; text-align: center; color: #6B7280; font-size: 0.8rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.social-icons { display: flex; gap: 16px; }
.social-icons a { color: #9CA3AF; transition: color 0.3s; }
.social-icons a:hover { color: #D4A853; }
