/* ============================================
   Market Ralph — shared site styles
   Used by every page: reset, fonts, colors,
   header/nav, mobile menu, footer, buttons,
   and the scroll-reveal animation.
   Page-specific layout stays in each page's
   own <style> block.
   ============================================ */

:root {
  --navy: #001029;
  --blue: #3576a8;
  --accent: #D9641C;
  --footer-navy: #1a2a3a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Roboto', Arial, sans-serif; color: #1a1a1a; line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* Header */
header { display: flex; align-items: center; justify-content: space-between; padding: 20px 40px; position: relative; }
.logo img { width: 64px; height: 64px; border-radius: 50%; }
nav { display: flex; gap: 32px; }
nav a { font-size: 15px; color: #1a1a1a; }
nav a.active { text-decoration: underline; text-underline-offset: 6px; }

/* Mobile menu */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; z-index: 60; position: relative; }
.menu-toggle span { display: block; width: 24px; height: 2.5px; background: #1a1a1a; margin: 5px 0; border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 10px 40px 20px; box-shadow: 0 12px 24px rgba(0,0,0,0.1); z-index: 55; }
.mobile-nav a { padding: 14px 0; font-size: 16px; border-bottom: 1px solid #eee; }
.mobile-nav a.active { font-weight: 700; }
.mobile-nav.open { display: flex; }

/* Buttons */
.btn { display: inline-block; background: var(--blue); color: #fff; padding: 14px 28px; border-radius: 30px; font-size: 15px; font-weight: 600; line-height: 1.2; margin-top: 14px; border: none; cursor: pointer; transition: filter 0.15s ease; }
.btn:hover { filter: brightness(0.88); }

/* Footer */
footer { background: var(--footer-navy); color: #fff; padding: 50px 40px 30px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; }
footer h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
footer p { font-size: 14px; color: #b7c2cd; margin-bottom: 14px; }
.social { display: flex; gap: 12px; margin-bottom: 20px; }
.social a { width: 34px; height: 34px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--footer-navy); font-size: 14px; }
.copyright { font-size: 13px; color: #8a97a3; margin-bottom: 0; }
.contact p { margin-bottom: 4px; }

/* Scroll-reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Shared mobile breakpoint */
@media (max-width: 800px) {
  nav { display: none; }
  .menu-toggle { display: block; }
  .footer-inner { gap: 12px; }
}

/* Cookie consent banner + preference modal */
.mr-cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; background: var(--navy); color: #fff; padding: 20px 40px; z-index: 200; box-shadow: 0 -6px 20px rgba(0,0,0,0.2); }
.mr-cookie-banner-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.mr-cookie-banner p { font-size: 14px; color: #dbe4ee; margin: 0; max-width: 640px; line-height: 1.5; }
.mr-cookie-banner a { color: #fff; text-decoration: underline; }
.mr-cookie-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mr-btn-outline { background: transparent; border: 1px solid #fff; color: #fff; padding: 12px 20px; border-radius: 30px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: filter 0.15s ease; }
.mr-btn-outline:hover { filter: brightness(0.88); }
.mr-cookie-banner .btn { margin-top: 0; white-space: nowrap; }

.mr-cookie-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 210; display: flex; align-items: center; justify-content: center; padding: 20px; }
.mr-cookie-modal { background: #fff; color: #1a1a1a; border-radius: 10px; padding: 30px; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; }
.mr-cookie-modal h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; color: #001029; }
.mr-cookie-modal > p { font-size: 14px; color: #555; margin-bottom: 20px; line-height: 1.5; }
.mr-cookie-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid #eee; }
.mr-cookie-row strong { font-size: 15px; display: block; margin-bottom: 3px; }
.mr-cookie-row p { font-size: 13px; color: #666; margin: 0; }
.mr-cookie-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.mr-cookie-modal-actions .btn { margin-top: 0; }

.mr-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.mr-switch input { opacity: 0; width: 0; height: 0; }
.mr-slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 24px; transition: 0.2s; }
.mr-slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.mr-switch input:checked + .mr-slider { background: var(--blue); }
.mr-switch input:checked + .mr-slider::before { transform: translateX(18px); }
.mr-switch-disabled { opacity: 0.6; }
.mr-switch-disabled .mr-slider { cursor: not-allowed; }

@media (max-width: 800px) {
  .mr-cookie-banner { padding: 16px 20px; }
  .mr-cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .mr-cookie-banner-actions { justify-content: stretch; }
  .mr-cookie-banner-actions button { flex: 1; }
}

/* Related reading — a plain closing block inside the article, not a separate boxed section */
.related-para { font-size: 17px; color: #262626; margin-top: 4px; margin-bottom: 8px; }
.related-list-plain { list-style: none; margin: 0 0 18px; padding: 0; }
.related-list-plain li { font-size: 17px; margin: 0 0 8px; padding-left: 16px; position: relative; }
.related-list-plain li::before { content: "\2022"; position: absolute; left: 0; color: #3576a8; }
.related-list-plain a { color: #3576a8; font-weight: 400; text-decoration: none; }
.related-list-plain a:hover { color: #245a80; text-decoration: underline; }
