/* ══════════════════════════════════════════════════
   Marine Ropes Support Center — Stylesheet
   Matches marine-ropes.com OpenCart design system
   ══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:      #0D3245;
  --navy-mid:  #0A2836;
  --teal:      #DAB48D;
  --teal-dark: #C49B6F;
  --blue:      #0D3245;
  --blue-btn:  #0D3245;
  --white:     #FFFFFF;
  --off-white: #EFEAE5;
  --gray-bg:   #F7F5F2;
  --text-dark: #0D3245;
  --text-body: #4A5568;
  --text-light:#718096;
  --border:    #D6CFC8;
  --radius:    8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--navy); text-decoration: none; transition: color .2s; }
a:hover { color: var(--teal-dark); }

/* Screen reader only — visually hidden but accessible */
.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;
}

/* ── HEADER ─────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
}
.top-bar {
  background: var(--off-white);
  border-bottom: 1px solid rgba(129,129,120,0.2);
  height: 40px;
  display: flex;
  font-size: 12px; color: #555;
}
.top-bar-inner {
  max-width: 1320px; margin: 0 auto; width: 100%;
  padding: 0 32px;
  display: flex; align-items: stretch; justify-content: space-between;
}
.top-bar-social {
  display: flex; gap: 14px; align-items: center;
  padding: 0 16px;
  border-left: 1px solid rgba(129,129,120,0.3);
  border-right: 1px solid rgba(129,129,120,0.3);
}
.top-bar-social a { color: #555; text-decoration: none; font-size: 14px; transition: color .2s; display: flex; align-items: center; }
.top-bar-social a:hover { color: var(--navy); }
.top-bar-right {
  display: flex; align-items: stretch;
  border-left: 1px solid rgba(129,129,120,0.3);
}
.top-bar-right a {
  color: #555; text-decoration: none; transition: color .2s;
  display: flex; align-items: center; gap: 5px;
  padding: 0 16px;
  border-right: 1px solid rgba(129,129,120,0.3);
}
.top-bar-right a:hover { color: var(--navy); }

.mid-header {
  background: var(--off-white);
  height: 68px;
  display: flex; align-items: center;
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}
.mid-header-inner {
  max-width: 1320px; margin: 0 auto; width: 100%;
  padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.header-logo { display: flex; align-items: center; text-decoration: none; }
.header-logo img { height: 50px; width: auto; }
.header-nav {
  display: flex; gap: 32px; align-items: center;
}
.header-nav a {
  font-size: 14px; font-weight: 600; color: var(--text-dark);
  text-decoration: none; text-transform: uppercase;
  letter-spacing: 0.5px; position: relative;
  padding: 8px 0; transition: color .2s;
}
.header-nav a::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--teal);
  transition: width .3s ease;
}
.header-nav a:hover { color: var(--navy); }
.header-nav a:hover::after { width: 100%; }
.header-nav a.nav-active { color: var(--teal-dark); }
.header-nav a.nav-active::after { width: 100%; background: var(--teal); }

.header-dropdown { position: relative; }
.header-dropdown-trigger { cursor: pointer; }
.header-dropdown-trigger::after { display: none !important; }
.header-dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: #fff;
  min-width: 220px;
  border-radius: 0;
  border-top: 2px solid var(--teal);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  padding: 0;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 200;
}
.header-dropdown:hover .header-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.header-dropdown-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 13px; font-weight: 500;
  color: var(--text-body) !important;
  text-transform: none; letter-spacing: 0;
  transition: background .2s, color .2s;
  border-bottom: 1px solid #eee;
}
.header-dropdown-menu a:last-child { border-bottom: none; }
.header-dropdown-menu a::after { display: none; }
.header-dropdown-menu a:hover {
  background: var(--off-white);
  color: var(--navy) !important;
}
.header-dropdown-products {
  min-width: 440px;
  columns: 2;
  column-gap: 0;
}
.header-dropdown-products a { break-inside: avoid; }

.header-right {
  display: flex; align-items: center; gap: 20px;
}
.header-info-box {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-dark);
}
.header-info-icon { width: 32px; height: 32px; }
.header-info-divider {
  width: 1px; height: 36px;
  background: rgba(129,129,120,0.3);
}
.header-info-box strong { font-size: 12px; font-weight: 700; display: block; letter-spacing: 0.3px; }
.header-info-box p { font-size: 14px; color: var(--text-body); margin: 0; }

/* ── BUTTONS ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; border: none; transition: all .2s;
  font-family: inherit;
}
.btn-blue { background: var(--blue-btn); color: #fff; }
.btn-blue:hover { background: #092838; color: #fff; }
.btn-outline { background: transparent; color: var(--text-dark); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: #aaa; }
.btn-teal { background: var(--teal); color: var(--navy); }
.btn-teal:hover { background: var(--teal-dark); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }

/* ── MAIN CONTENT ───────────────────────────────── */
.main-content {
  margin-top: 108px;
  min-height: calc(100vh - 108px - 200px);
}

/* ── HERO / SEARCH SECTION ──────────────────────── */
.support-hero {
  background: var(--navy);
  padding: 60px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.support-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(10,40,54,0.95) 0%, rgba(13,50,69,0.85) 100%);
  z-index: 1;
}
.support-hero-inner {
  position: relative; z-index: 2;
  max-width: 680px; margin: 0 auto;
}
.support-hero-label {
  font-size: 13px; font-weight: 600; color: var(--teal);
  letter-spacing: 0.5px; margin-bottom: 12px;
  text-transform: uppercase;
}
.support-hero h1 {
  font-size: 32px; font-weight: 800; color: #fff;
  line-height: 1.2; margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.support-hero p {
  font-size: 15px; color: rgba(255,255,255,0.7);
  margin-bottom: 28px;
}

/* Search */
.search-form {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}
.search-input {
  width: 100%;
  padding: 14px 52px 14px 20px;
  font-size: 15px;
  font-family: inherit;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  color: #fff;
  outline: none;
  transition: border-color .2s, background .2s;
}
.search-input::placeholder { color: rgba(255,255,255,0.45); }
.search-input:focus {
  border-color: var(--teal);
  background: rgba(255,255,255,0.12);
}
.search-btn {
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  background: var(--teal);
  border: none;
  border-radius: 6px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s;
}
.search-btn:hover { background: var(--teal-dark); }
.search-btn svg { width: 18px; height: 18px; color: var(--navy); }

/* ── BREADCRUMBS ────────────────────────────────── */
.breadcrumbs {
  padding: 16px 32px;
  background: var(--gray-bg);
  border-bottom: 1px solid var(--border);
}
.breadcrumbs-inner {
  max-width: 1320px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-light);
}
.breadcrumbs a { color: var(--text-body); font-weight: 500; }
.breadcrumbs a:hover { color: var(--navy); }
.breadcrumbs-sep { color: var(--border); }

/* ── CATEGORY CARDS (Home) ──────────────────────── */
.categories-section {
  padding: 56px 32px;
  background: var(--white);
}
.categories-section-inner {
  max-width: 1320px; margin: 0 auto;
}
.categories-section-header {
  text-align: center; margin-bottom: 40px;
}
.categories-section-header h2 {
  font-size: 24px; font-weight: 700;
  margin-bottom: 8px;
}
.categories-section-header p {
  font-size: 14px; color: var(--text-body);
}
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 24px;
  display: flex; align-items: flex-start; gap: 16px;
  transition: border-color .2s, box-shadow .2s;
  text-decoration: none; color: inherit;
}
.category-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.category-icon {
  min-width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--gray-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal-dark);
}
.category-card h3 {
  font-size: 16px; font-weight: 700;
  margin-bottom: 4px;
}
.category-card p {
  font-size: 13px; color: var(--text-body);
  line-height: 1.6; margin-bottom: 8px;
}
.category-count {
  font-size: 12px; font-weight: 600;
  color: var(--teal-dark);
}

/* ── POPULAR / RECENT ARTICLES (Home) ───────────── */
.articles-section {
  padding: 56px 32px;
  background: var(--gray-bg);
}
.articles-section-inner {
  max-width: 1320px; margin: 0 auto;
}
.articles-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.articles-column h2 {
  font-size: 18px; font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--teal);
  display: inline-block;
}
.article-list { list-style: none; }
.article-list-item {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: padding-left .2s;
}
.article-list-item:hover { padding-left: 8px; }
.article-list-item h4 {
  font-size: 14px; font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-dark);
}
.article-list-item p {
  font-size: 13px; color: var(--text-body);
  line-height: 1.5;
}
.article-list-meta {
  font-size: 11px; color: var(--text-light);
  margin-top: 4px;
}

/* ── HELP CENTER LAYOUT (sidebar + content) ─────── */
.help-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px;
  gap: 32px;
  min-height: 500px;
}

/* Sidebar */
.help-sidebar {
  position: sticky;
  top: 140px;
  align-self: start;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}
.sidebar-nav { list-style: none; }
.sidebar-category {
  margin-bottom: 4px;
}
.sidebar-category-title {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  font-size: 13px; font-weight: 600;
  color: var(--text-dark);
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
}
.sidebar-category-title:hover {
  background: var(--gray-bg);
  color: var(--text-dark);
}
.sidebar-category-title.active {
  background: var(--gray-bg);
  color: var(--teal-dark);
}
.sidebar-category-title svg {
  width: 16px; height: 16px; flex-shrink: 0;
  opacity: 0.6;
}
.sidebar-articles {
  list-style: none;
  padding-left: 38px;
  display: none;
}
.sidebar-category.open .sidebar-articles {
  display: block;
}
.sidebar-article-link {
  display: block;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-body);
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: all .2s;
  text-decoration: none;
}
.sidebar-article-link:hover {
  color: var(--text-dark);
  background: var(--gray-bg);
}
.sidebar-article-link.active {
  color: var(--teal-dark);
  border-left-color: var(--teal);
  background: rgba(218,180,141,0.08);
  font-weight: 500;
}

/* ── ARTICLE CONTENT ────────────────────────────── */
.article-content-area {
  min-width: 0;
}
.article-header {
  margin-bottom: 32px;
}
.article-header h1 {
  font-size: 28px; font-weight: 800;
  line-height: 1.3; letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.article-meta {
  display: flex; align-items: center; gap: 16px;
  font-size: 13px; color: var(--text-light);
}
.article-meta span { display: flex; align-items: center; gap: 4px; }

.article-body {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.8;
}
.article-body h2 {
  font-size: 22px; font-weight: 700;
  color: var(--text-dark);
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.article-body h3 {
  font-size: 18px; font-weight: 600;
  color: var(--text-dark);
  margin: 28px 0 12px;
}
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol {
  margin: 0 0 16px 24px;
}
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text-dark); }
.article-body a { color: var(--teal-dark); font-weight: 500; }
.article-body a:hover { text-decoration: underline; }
.article-body blockquote {
  border-left: 3px solid var(--teal);
  padding: 12px 20px;
  margin: 16px 0;
  background: var(--gray-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-body);
}
.article-body code {
  background: var(--gray-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}
.article-body pre {
  background: var(--navy);
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 16px 0;
}
.article-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.article-body th, .article-body td {
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--border);
  font-size: 14px;
}
.article-body th {
  background: var(--gray-bg);
  font-weight: 600;
  color: var(--text-dark);
}
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 16px 0;
}

/* Table of Contents (right) */
.article-with-toc {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 40px;
}
.article-toc {
  position: sticky;
  top: 140px;
  align-self: start;
}
.article-toc h4 {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 12px;
}
.article-toc ul { list-style: none; }
.article-toc li { margin-bottom: 6px; }
.article-toc a {
  font-size: 12px;
  color: var(--text-light);
  transition: color .2s;
  display: block;
  padding: 2px 0;
}
.article-toc a:hover { color: var(--text-dark); }
.article-toc .toc-h3 { padding-left: 12px; }

/* Article feedback */
.article-feedback {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.article-feedback p {
  font-size: 14px; font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-dark);
}
.feedback-btns { display: flex; gap: 10px; justify-content: center; }
.feedback-btn {
  padding: 8px 20px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: #fff;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  color: var(--text-body);
}
.feedback-btn:hover { border-color: var(--teal); color: var(--teal-dark); }
.feedback-btn.selected { background: var(--teal); border-color: var(--teal); color: var(--navy); }
.feedback-thanks {
  display: none;
  font-size: 14px;
  color: var(--teal-dark);
  font-weight: 500;
}

/* Related articles */
.related-articles {
  margin-top: 40px;
  padding: 24px;
  background: var(--gray-bg);
  border-radius: var(--radius);
}
.related-articles h3 {
  font-size: 15px; font-weight: 700;
  margin-bottom: 14px;
}
.related-articles ul { list-style: none; }
.related-articles li { margin-bottom: 8px; }
.related-articles a {
  font-size: 14px; color: var(--text-body);
  font-weight: 500;
}
.related-articles a:hover { color: var(--teal-dark); }

/* ── CATEGORY LISTING PAGE ──────────────────────── */
.category-header {
  margin-bottom: 32px;
}
.category-header h1 {
  font-size: 26px; font-weight: 800;
  margin-bottom: 8px;
}
.category-header p {
  font-size: 14px; color: var(--text-body);
}
.articles-grid {
  display: flex; flex-direction: column; gap: 12px;
}
.article-card {
  display: block;
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none; color: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.article-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-sm);
  color: inherit;
}
.article-card h3 {
  font-size: 15px; font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dark);
}
.article-card p {
  font-size: 13px; color: var(--text-body);
  line-height: 1.6;
}

/* ── SEARCH RESULTS ─────────────────────────────── */
.search-results {
  padding: 40px 32px;
}
.search-results-inner {
  max-width: 800px; margin: 0 auto;
}
.search-results h1 {
  font-size: 22px; font-weight: 700;
  margin-bottom: 24px;
}
.search-results .result-count {
  font-size: 14px; color: var(--text-light);
  margin-bottom: 24px;
}
.search-result-item {
  display: block;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
}
.search-result-item:hover h3 { color: var(--teal-dark); }
.search-result-item h3 {
  font-size: 16px; font-weight: 600;
  margin-bottom: 6px;
  transition: color .2s;
}
.search-result-item p {
  font-size: 14px; color: var(--text-body);
  line-height: 1.6;
}
.search-result-category {
  font-size: 12px; font-weight: 600;
  color: var(--teal-dark);
  margin-bottom: 4px;
}
.no-results {
  text-align: center;
  padding: 60px 20px;
}
.no-results h2 {
  font-size: 20px; font-weight: 700;
  margin-bottom: 12px;
}
.no-results p {
  font-size: 14px; color: var(--text-body);
}

/* ── FOOTER ─────────────────────────────────────── */
footer {
  background: var(--navy);
  padding: 20px 0 0;
  color: rgba(255,255,255,0.65);
}
.footer-main {
  display: grid; grid-template-columns: 3fr 2fr 2fr 2fr 2fr;
  gap: 16px; max-width: 1320px; margin: 0 auto;
  padding: 40px 32px;
  justify-items: end;
}
.footer-main > :first-child { justify-self: start; }
.footer-brand-logo { margin-bottom: 16px; text-align: center; }
.footer-brand-logo img { max-width: 160px; height: auto; }
.footer-brand-text {
  font-size: 14px; color: rgba(255,255,255,0.85);
  line-height: 2; margin-bottom: 20px; text-align: center; font-weight: 600;
}
.footer-subscribe-heading {
  font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.85);
  margin-bottom: 12px;
}
.footer-heading {
  font-size: 14px; font-weight: 600; text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px; padding-bottom: 10px;
}
.footer-menu { list-style: none; }
.footer-menu li { margin-bottom: 8px; }
.footer-menu a { font-size: 14px; color: rgba(255,255,255,0.55); text-decoration: none; transition: color .2s; }
.footer-menu a:hover { color: #fff; }
.footer-social { display: flex; gap: 10px; }
.social-btn {
  width: 32px; height: 32px; border-radius: 6px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6); text-decoration: none;
  font-size: 13px; font-weight: 700;
  transition: background .2s;
}
.social-btn:hover { background: rgba(218,180,141,0.2); color: var(--teal); }
.footer-divider {
  height: 1px; background: rgba(255,255,255,0.1);
  max-width: 1320px; margin: 0 auto;
}
.footer-bottom {
  max-width: 1320px; margin: 0 auto;
  padding: 20px 32px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
}

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 1024px) {
  .top-bar { display: none; }
  .header-nav { display: none; }
  .header-info-box { display: none; }
  .main-content { margin-top: 68px; }
  .help-layout {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .help-sidebar {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
  .article-with-toc {
    grid-template-columns: 1fr;
  }
  .article-toc { display: none; }
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .footer-main {
    grid-template-columns: 1fr 1fr 1fr;
    justify-items: start;
  }
  .footer-brand-col {
    grid-column: 1 / -1; text-align: center;
  }
}

@media (max-width: 640px) {
  .mid-header-inner { padding: 0 16px; }
  .header-logo img { height: 36px; }
  .support-hero { padding: 40px 16px; }
  .support-hero h1 { font-size: 24px; }
  .categories-section { padding: 36px 16px; }
  .categories-grid { grid-template-columns: 1fr; }
  .articles-section { padding: 36px 16px; }
  .articles-columns { grid-template-columns: 1fr; gap: 32px; }
  .help-layout { padding: 16px; gap: 20px; }
  .article-header h1 { font-size: 22px; }
  .search-results { padding: 24px 16px; }
  .footer-main {
    grid-template-columns: 1fr !important;
    gap: 28px; padding: 30px 16px;
    justify-items: start !important;
  }
  .footer-brand-col { grid-column: auto; text-align: center; width: 100%; }
  .footer-bottom {
    flex-direction: column; gap: 10px;
    text-align: center; padding: 16px;
    font-size: 12px;
  }
}
