/* ============================================================
   OptionTradingTips.com — Main Stylesheet
   Design: Classic editorial / timeless financial
   Fonts: DM Serif Display (headings) + DM Sans (body)
   ============================================================ */

/* ------------------------------------------------------------
   1. GOOGLE FONTS
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,400;9..40,500&display=swap');


/* ------------------------------------------------------------
   2. CSS VARIABLES — edit these to retheme the whole site
   ------------------------------------------------------------ */
:root {
  /* Colours */
  --navy:        #185FA5;
  --navy-dark:   #0C447C;
  --navy-light:  #E6F1FB;
  --navy-mid:    #B5D4F4;
  --text:        #1a1a1a;
  --text-muted:  #6b6b6b;
  --text-light:  #9a9a9a;
  --border:      rgba(0,0,0,0.10);
  --border-mid:  rgba(0,0,0,0.18);
  --bg:          #ffffff;
  --bg-soft:     #f7f6f3;
  --bg-warm:     #f2f0eb;

  /* Typography */
  --font-serif:  'DM Serif Display', Georgia, serif;
  --font-sans:   'DM Sans', Helvetica, Arial, sans-serif;

  /* Spacing */
  --gap-xs:   0.5rem;
  --gap-sm:   1rem;
  --gap-md:   1.5rem;
  --gap-lg:   2.5rem;
  --gap-xl:   4rem;

  /* Layout */
  --max-width:       900px;
  --content-width:   740px;
  --radius-sm:       4px;
  --radius-md:       8px;
  --radius-lg:       12px;
}


/* ------------------------------------------------------------
   3. RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { padding-left: 1.5rem; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--gap-lg) 0;
}


/* ------------------------------------------------------------
   4. TYPOGRAPHY
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: var(--gap-md); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: var(--gap-sm); }
h3 { font-size: 1.35rem; margin-bottom: var(--gap-xs); }
h4 { font-size: 1.1rem; font-family: var(--font-sans); font-weight: 500; margin-bottom: var(--gap-xs); }

p { margin-bottom: var(--gap-sm); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--navy);
  display: block;
  margin-bottom: var(--gap-xs);
}

.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.65;
}

blockquote {
  border-left: 3px solid var(--navy);
  padding: var(--gap-sm) var(--gap-md);
  margin: var(--gap-md) 0;
  background: var(--bg-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

blockquote p { color: var(--text-muted); font-style: italic; }

code, pre {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
}

code { padding: 2px 6px; }

pre {
  padding: var(--gap-sm);
  overflow-x: auto;
  margin-bottom: var(--gap-sm);
}


/* ------------------------------------------------------------
   5. LAYOUT — containers, grid, sections
   ------------------------------------------------------------ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap-md);
}

.container--narrow {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--gap-md);
}

.section {
  padding: var(--gap-xl) 0;
}

.section--tight {
  padding: var(--gap-lg) 0;
}

.section--soft {
  background: var(--bg-soft);
  padding: var(--gap-xl) 0;
}

.section--warm {
  background: var(--bg-warm);
  padding: var(--gap-xl) 0;
}

/* Grid system */
.grid {
  display: grid;
  gap: var(--gap-md);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Hero split */
.grid--hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--gap-xl);
  align-items: center;
}

/* Flex utilities */
.flex { display: flex; }
.flex--center { align-items: center; }
.flex--between { justify-content: space-between; }
.flex--gap-sm { gap: var(--gap-xs); }
.flex--gap-md { gap: var(--gap-sm); }
.flex--wrap { flex-wrap: wrap; }


/* ------------------------------------------------------------
   6. NAVIGATION
   ------------------------------------------------------------ */
.nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap-md);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
}

.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav__logo:hover { text-decoration: none; }

.nav__links {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: var(--gap-md);
}

.nav__links a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav__links a:hover { color: var(--text); }

.nav__cta {
  background: var(--navy);
  color: #fff !important;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s;
}

.nav__cta:hover { background: var(--navy-dark); }

/* Mobile hamburger */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text);
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 4px 0;
  transition: all 0.2s;
}


/* ------------------------------------------------------------
   7. BUTTONS
   ------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1.4;
}

.btn--primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.btn--primary:hover {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  text-decoration: none;
  color: #fff;
}

.btn--secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-mid);
}

.btn--secondary:hover {
  background: var(--bg-soft);
  text-decoration: none;
  color: var(--text);
}

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
}

.btn--ghost:hover { text-decoration: underline; color: var(--navy-dark); }

.btn--lg { font-size: 16px; padding: 13px 28px; }
.btn--sm { font-size: 13px; padding: 7px 14px; }

.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}


/* ------------------------------------------------------------
   8. CARDS
   ------------------------------------------------------------ */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--gap-md);
  transition: border-color 0.15s;
}

.card:hover { border-color: var(--border-mid); }

.card--soft {
  background: var(--bg-soft);
  border-color: transparent;
}

.card--featured {
  border-color: var(--navy-mid);
  background: var(--navy-light);
}

.card__badge {
  display: inline-block;
  background: var(--navy-mid);
  color: var(--navy-dark);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--gap-sm);
  letter-spacing: 0.3px;
}

.card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--navy-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--gap-sm);
  color: var(--navy);
  font-size: 20px;
}

.card__meta {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: var(--gap-xs);
}


/* ------------------------------------------------------------
   9. FORMS
   ------------------------------------------------------------ */
.form-group { margin-bottom: var(--gap-sm); }

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  -webkit-appearance: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.12);
}

textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.form-inline {
  display: flex;
  gap: 8px;
}

.form-inline input { flex: 1; }


/* ------------------------------------------------------------
   10. STATS BAR
   ------------------------------------------------------------ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stats-bar__item {
  padding: var(--gap-md);
  text-align: center;
  border-right: 1px solid var(--border);
}

.stats-bar__item:last-child { border-right: none; }

.stats-bar__num {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  color: var(--text);
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}

.stats-bar__label {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}


/* ------------------------------------------------------------
   11. FEATURE LIST
   ------------------------------------------------------------ */
.feature-list {
  list-style: none;
  padding: 0;
  margin: var(--gap-sm) 0;
}

.feature-list li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 5px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.feature-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--navy);
  flex-shrink: 0;
  margin-top: 8px;
}


/* ------------------------------------------------------------
   12. TABLE
   ------------------------------------------------------------ */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-light);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-mid);
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-soft); }
.table--striped tr:nth-child(even) td { background: var(--bg-soft); }


/* ------------------------------------------------------------
   13. PAGINATION
   ------------------------------------------------------------ */
.pagination {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: var(--gap-lg) 0 0;
  justify-content: center;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  font-size: 14px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
}

.pagination a:hover { border-color: var(--navy); color: var(--navy); }
.pagination .active span { background: var(--navy); border-color: var(--navy); color: #fff; }


/* ------------------------------------------------------------
   14. BREADCRUMB
   ------------------------------------------------------------ */
.breadcrumb {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: var(--gap-sm) 0;
  font-size: 13px;
  color: var(--text-light);
  flex-wrap: wrap;
}

.breadcrumb li + li::before { content: '/'; margin-right: 6px; color: var(--border-mid); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--navy); }


/* ------------------------------------------------------------
   15. SIDENAV — for pages with snav=1
   ------------------------------------------------------------ */
.sidenav {
  /* position: sticky removed — causes overflow issues */
  min-width: 0;
}

.sidenav ul {
  list-style: none;
  padding: 0 !important;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sidenav li {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidenav li a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s, color 0.15s;
}

.sidenav li a:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.sidenav li:last-child a { border-bottom: none; }

.sidenav .sidenav__heading {
  display: block;
  padding: 10px 16px 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-light);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

/* Responsive — stack on tablet */
@media (max-width: 768px) {
  .sidenav {
    position: static;
  }
}


/* ------------------------------------------------------------
   16. ARTICLE / CONTENT PAGE
   ------------------------------------------------------------ */
.article-header {
  padding: var(--gap-xl) 0 var(--gap-lg);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--gap-lg);
}

.article-header h1 { margin-bottom: var(--gap-xs); }

.article-meta {
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  gap: var(--gap-sm);
  flex-wrap: wrap;
  margin-top: var(--gap-xs);
}

.article-body h2 { margin-top: var(--gap-lg); }
.article-body h3 { margin-top: var(--gap-md); }
.article-body ul, .article-body ol { margin-bottom: var(--gap-sm); }
.article-body li { margin-bottom: 4px; }

.article-body img {
  border-radius: var(--radius-md);
  margin: var(--gap-md) 0;
  border: 1px solid var(--border);
}


/* ------------------------------------------------------------
   17. FOOTER
   ------------------------------------------------------------ */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: var(--gap-xl) 0 var(--gap-lg);
  margin-top: var(--gap-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--gap-lg);
  margin-bottom: var(--gap-lg);
}

.footer__brand { font-family: var(--font-serif); font-size: 1.1rem; margin-bottom: var(--gap-sm); }
.footer__tagline { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

.footer__heading {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: var(--gap-sm);
}

.footer__links {
  list-style: none;
  padding: 0;
}

.footer__links li { margin-bottom: 8px; }

.footer__links a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}

.footer__links a:hover { color: var(--text); }

.footer__bottom {
  padding-top: var(--gap-md);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  font-size: 13px;
  color: var(--text-light);
}

.footer__social {
  display: flex;
  gap: var(--gap-sm);
}

.footer__social a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.footer__social a:hover { color: var(--navy); }


/* ------------------------------------------------------------
   18. MODAL
   ------------------------------------------------------------ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: var(--gap-md);
}

.modal-overlay.is-open { display: flex; }

.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  padding: var(--gap-lg);
  position: relative;
}

.modal__close {
  position: absolute;
  top: var(--gap-sm);
  right: var(--gap-sm);
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px 8px;
}

.modal__close:hover { color: var(--text); }


/* ------------------------------------------------------------
   19. UTILITY CLASSES
   ------------------------------------------------------------ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-small  { font-size: 13px; }
.text-navy   { color: var(--navy); }
.text-serif  { font-family: var(--font-serif); }
.img-fluid   { max-width: 100%; height: auto; display: block; }

.mt-xs { margin-top: var(--gap-xs); }
.mt-sm { margin-top: var(--gap-sm); }
.mt-md { margin-top: var(--gap-md); }
.mt-lg { margin-top: var(--gap-lg); }
.mt-xl { margin-top: var(--gap-xl); }

.mb-xs { margin-bottom: var(--gap-xs); }
.mb-sm { margin-bottom: var(--gap-sm); }
.mb-md { margin-bottom: var(--gap-md); }
.mb-lg { margin-bottom: var(--gap-lg); }
.mb-xl { margin-bottom: var(--gap-xl); }

.hidden { display: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}


/* ------------------------------------------------------------
   20. RESPONSIVE BREAKPOINTS
   ------------------------------------------------------------ */

/* Tablet — 600px and below */
@media (max-width: 600px) {
  :root {
    --gap-xl: 2.5rem;
    --gap-lg: 2rem;
  }

  .grid--2,
  .grid--3,
  .grid--4,
  .grid--hero { grid-template-columns: 1fr; }

  /* Subnav layout stacks on tablet */
  div[style*="grid-template-columns:220px"] {
    display: block !important;
  }

  .nav__links { display: none; }
  .nav__toggle { display: block; }

  .nav__links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: var(--gap-sm) var(--gap-md);
    gap: var(--gap-sm);
    z-index: 99;
  }

  .stats-bar { grid-template-columns: 1fr; }
  .stats-bar__item { border-right: none; border-bottom: 1px solid var(--border); }
  .stats-bar__item:last-child { border-bottom: none; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
}

/* Mobile — 480px and below */
@media (max-width: 480px) {
  .container { padding: 0 var(--gap-sm); }
  .form-inline { flex-direction: column; }
  .btn-group { flex-direction: column; align-items: flex-start; }
  .footer__grid { grid-template-columns: 1fr; }
  .nav__cta { display: none; }
}
/* ------------------------------------------------------------
   20. RESPONSIVE BREAKPOINTS
   ------------------------------------------------------------ */

/* Tablet — 768px and below */
@media (max-width: 768px) {
  :root {
    --gap-xl: 2.5rem;
    --gap-lg: 2rem;
  }

  .grid--2,
  .grid--3,
  .grid--4,
  .grid--hero { grid-template-columns: 1fr; }

  .nav__links { display: none; }
  .nav__toggle { display: block; }

  .nav__links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: var(--gap-sm) var(--gap-md);
    gap: var(--gap-sm);
    z-index: 99;
  }

  .stats-bar { grid-template-columns: 1fr; }
  .stats-bar__item { border-right: none; border-bottom: 1px solid var(--border); }
  .stats-bar__item:last-child { border-bottom: none; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
}

/* Sidenav — only stacks on mobile, stays visible on tablet */
@media (max-width: 600px) {
  div[style*="grid-template-columns:220px"] {
    display: block !important;
  }
}

/* Mobile — 480px and below */
@media (max-width: 480px) {
  .container { padding: 0 var(--gap-sm); }
  .form-inline { flex-direction: column; }
  .btn-group { flex-direction: column; align-items: flex-start; }
  .footer__grid { grid-template-columns: 1fr; }
  .nav__cta { display: none; }
}
/* ------------------------------------------------------------
   21. GREEK GRAPHS
   ------------------------------------------------------------ */
.greek-graphs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-sm);
  margin-bottom: var(--gap-md);
}

.greek-graphs img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

@media (max-width: 600px) {
  .greek-graphs { grid-template-columns: 1fr; }
}