/* ============================================
   Yacht Knowledge Hub - Global Styles
   ============================================ */

:root {
  --primary: #0a2540;
  --primary-light: #1a3a5c;
  --accent: #0077b6;
  --accent-light: #00b4d8;
  --gold: #c9a84c;
  --gold-light: #e0c068;
  --text: #1a1a2e;
  --text-light: #555;
  --bg: #ffffff;
  --bg-light: #f8f9fa;
  --bg-dark: #0a2540;
  --border: #e0e0e0;
  --shadow: 0 2px 15px rgba(0,0,0,0.08);
  --shadow-lg: 0 5px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --transition: all 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-light); }

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================
   Header & Navigation
   ============================================ */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

.logo span { color: var(--gold); }

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-menu a {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 0;
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #fff;
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 100px 20px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero h1 span { color: var(--gold); }

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 35px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  text-align: center;
  cursor: pointer;
}

.btn-primary {
  background: var(--gold);
  color: var(--primary);
}

.btn-primary:hover {
  background: var(--gold-light);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.5);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
  transform: translateY(-2px);
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 80px 0;
}

.section-light {
  background: var(--bg-light);
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 15px;
}

.section-title p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

.divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 0 auto;
}

/* ============================================
   Category Grid
   ============================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.category-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.card-img {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  font-size: 3rem;
  padding: 40px;
  text-align: center;
}

.card-body {
  padding: 25px;
}

.card-body h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.card-body h3 a {
  color: var(--primary);
}

.card-body h3 a:hover {
  color: var(--accent);
}

.card-body p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 15px;
  line-height: 1.6;
}

.card-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.card-link:hover {
  color: var(--accent-light);
}

/* ============================================
   Blog Grid (Homepage)
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.blog-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.card-date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.blog-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.blog-card h3 a {
  color: var(--primary);
}

.blog-card h3 a:hover {
  color: var(--accent);
}

.card-excerpt {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.tag {
  background: #e8f4f8;
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.card-footer a {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ============================================
   Breadcrumb Navigation
   ============================================ */
.breadcrumb {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
}

.breadcrumb-list {
  display: flex;
  list-style: none;
  gap: 10px;
  font-size: 0.9rem;
}

.breadcrumb-list li::after {
  content: '>';
  margin-left: 10px;
  color: var(--text-light);
}

.breadcrumb-list li:last-child::after { display: none; }

.breadcrumb-list a { color: var(--accent); }
.breadcrumb-list .current { color: var(--text-light); }

/* ============================================
   Article Page Hero (same as homepage hero)
   ============================================ */
.article-hero {
  /* Inherits all .hero styles */
}

.article-hero .hero-content {
  max-width: 900px;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 25px;
  font-size: 0.95rem;
  opacity: 0.85;
  color: #fff;
}

.article-content {
  max-width: 850px;
  margin: 0 auto;
  padding: 50px 20px;
}

.article-content h2 {
  font-size: 1.8rem;
  color: var(--primary);
  margin: 50px 0 25px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold);
  font-weight: 600;
}

.article-content h3 {
  font-size: 1.4rem;
  color: var(--primary-light);
  margin: 35px 0 18px;
  font-weight: 600;
}

.article-content p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

.article-content ul, .article-content ol {
  margin: 25px 0;
  padding-left: 30px;
}

.article-content li {
  margin-bottom: 12px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-content strong { font-weight: 600; }

/* Info Box */
.article-content .info-box {
  background: linear-gradient(135deg, #e8f4f8 0%, #f0f8ff 100%);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 25px;
  margin: 30px 0;
}

.article-content .info-box h4 {
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.article-content .info-box p {
  margin-bottom: 0;
  color: var(--text-light);
}

/* ============================================
   Article Body (Blog Posts)
   ============================================ */
.article-body {
  max-width: 850px;
  margin: 0 auto;
  padding: 50px 20px;
}

.article-body .lead {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.article-body h2 {
  font-size: 1.8rem;
  color: var(--primary);
  margin: 50px 0 25px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold);
  font-weight: 600;
}

.article-body h3 {
  font-size: 1.4rem;
  color: var(--primary-light);
  margin: 35px 0 18px;
  font-weight: 600;
}

.article-body p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

.article-body ul, .article-body ol {
  margin: 25px 0;
  padding-left: 30px;
}

.article-body li {
  margin-bottom: 12px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-body strong { font-weight: 600; }

/* Table of Contents */
.toc {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  margin: 35px 0;
}

.toc h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--primary);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
}

.toc li {
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.toc a {
  color: var(--accent);
}

.toc a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 15px;
  text-align: left;
  border: 1px solid var(--border);
}

.comparison-table th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.comparison-table tr:nth-child(even) {
  background: var(--bg-light);
}

.comparison-table tr:hover {
  background: #e8f4f8;
}

/* FAQ Section */
.faq-section {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 35px;
  margin: 40px 0;
}

.faq-section h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin: 25px 0 12px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
}

.faq-section h3:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.faq-section p {
  color: var(--text-light);
  line-height: 1.7;
}

/* CTA Box */
.cta-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  padding: 45px 35px;
  border-radius: var(--radius);
  text-align: center;
  margin: 50px 0;
}

.cta-box h3 {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: #fff;
}

.cta-box p {
  opacity: 0.9;
  margin-bottom: 25px;
  color: #fff;
  font-size: 1.05rem;
}

.cta-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Related Articles */
.related-articles {
  margin: 60px 0 40px;
  padding-top: 40px;
  border-top: 2px solid var(--border);
}

.related-articles h3 {
  font-size: 1.5rem;
  margin-bottom: 25px;
  color: var(--primary);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.related-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 25px;
  transition: var(--transition);
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.related-card h4 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--primary);
}

.related-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
  }

  .nav-menu.active { display: flex; }

  .mobile-toggle { display: block; }

  .hero { padding: 60px 20px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .hero-buttons { flex-direction: column; align-items: center; }

  .section { padding: 50px 0; }
  .section-title h2 { font-size: 1.8rem; }

  .category-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }

  .article-hero { padding: 60px 20px; }
  .article-hero h1 { font-size: 1.8rem; }
  .article-meta { flex-direction: column; gap: 10px; }

  .article-content, .article-body { padding: 30px 15px; }
  .article-content h2, .article-body h2 { font-size: 1.5rem; }
  .article-content h3, .article-body h3 { font-size: 1.2rem; }

  .cta-box { padding: 30px 20px; }
  .cta-buttons { flex-direction: column; }

  .related-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}
