/*
  Theme: Inkwell Ledger
  Visual DNA: Transferred from TemplateMo 555 Upright

  Color Codes
  ===========
  Primary blue:     #006699
  Hover blue:       #068ccf
  Teal secondary:   #009999
  Gray text:        #666666
  Light gray bg:    #F2F2F2
  Border gray:      #CCCCCC
  Dark accent:      #1a1a2e
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #666666;
  line-height: 1.8;
  font-size: 16px;
  background: #fff;
}

a {
  color: #006699;
  text-decoration: none;
  transition: all 0.3s ease;
}
a:hover { color: #068ccf; }

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

h1, h2, h3, h4, h5, h6 {
  color: #1a1a2e;
  font-weight: 600;
  line-height: 1.3;
}

p { margin-bottom: 1em; }

hr {
  border: none;
  border-top: 4px solid #ccc;
  margin: 0 0 2rem 0;
}

.hr-short {
  border-top: 1px solid #006699;
  width: 200px;
}

/* ===== LAYOUT: SIDEBAR + MAIN ===== */
.site-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Fixed Sidebar */
.site-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  background: #fff;
  z-index: 1000;
  padding: 40px 0 30px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-right: 1px solid #eee;
}
.site-sidebar::-webkit-scrollbar { width: 0; height: 0; }

.sidebar-brand {
  width: 200px;
  height: 120px;
  background: #006699;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 60px;
}
.sidebar-brand img {
  max-height: 60px;
  max-width: 160px;
}
.sidebar-brand-text {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.sidebar-brand-text:hover { color: #fff; }

/* Sidebar Navigation */
.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { margin: 8px 0; }

.sidebar-nav a {
  position: relative;
  display: block;
  color: #006699;
  font-size: 1.15rem;
  padding: 12px 20px 12px 10px;
  transition: all 0.3s ease;
}

.sidebar-nav a .nav-arrow {
  position: absolute;
  top: 7px;
  left: -36px;
  width: 0;
  height: 0;
  border-top: 18px solid transparent;
  border-left: 16px solid #006699;
  border-bottom: 18px solid transparent;
  opacity: 0;
  transition: all 0.3s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.current {
  background: #F2F2F2;
  padding-left: 26px;
  color: #006699;
}

.sidebar-nav a:hover .nav-arrow,
.sidebar-nav a.current .nav-arrow {
  opacity: 1;
}

.sidebar-footer {
  font-size: 0.85rem;
  color: #999;
  margin-top: 60px;
}

/* Mobile hamburger */
.hamburger-btn {
  display: none;
  position: fixed;
  left: 0;
  top: 36px;
  z-index: 10001;
  background: rgba(0, 102, 153, 0.85);
  color: #fff;
  border: none;
  padding: 10px 14px;
  font-size: 1.3rem;
  cursor: pointer;
  border-radius: 0 4px 4px 0;
  transition: all 0.3s ease;
  line-height: 1;
}
.hamburger-btn:focus { outline: 2px solid #068ccf; }

/* Accent strip — parallax-inspired decorative column */
.accent-strip {
  position: fixed;
  top: 0;
  left: 260px;
  bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, #006699 0%, #009999 50%, #006699 100%);
  z-index: 999;
}

/* Main content area */
.site-main {
  flex: 1;
  margin-left: 266px;
  min-width: 0;
}

/* ===== SECTIONS ===== */
.section {
  padding: 60px 70px 80px 50px;
  position: relative;
}

.section + .section {
  border-top: 1px solid #eee;
}

.section-title {
  color: #006699;
  font-size: 1.7rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section-title + hr {
  margin-bottom: 2.5rem;
}

/* ===== HERO ===== */
.hero-section {
  min-height: 80vh;
  display: flex;
  align-items: stretch;
  padding: 0;
  border-bottom: 4px solid #006699;
}

.hero-content {
  flex: 1;
  padding: 80px 70px 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-title {
  font-size: 2.4rem;
  color: #006699;
  margin-bottom: 1.2rem;
  line-height: 1.2;
  max-width: 700px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #666;
  line-height: 1.9;
  max-width: 600px;
  margin-bottom: 2rem;
}
.hero-subtitle p { margin-bottom: 0.8em; }

.hero-cta {
  display: inline-block;
  padding: 14px 52px;
  background: #006699;
  color: #fff;
  font-size: 1.1rem;
  border: none;
  border-radius: 0;
  transition: all 0.3s ease;
  text-decoration: none;
}
.hero-cta:hover {
  background: #068ccf;
  color: #fff;
}

.hero-aside {
  width: 280px;
  min-height: 100%;
  background: #F2F2F2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 30px;
  border-left: 1px solid #eee;
}

.hero-aside-icon {
  width: 100px;
  height: 100px;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.hero-aside-icon svg {
  width: 48px;
  height: 48px;
  stroke: #006699;
  fill: none;
  stroke-width: 1.5;
}

.hero-aside-text {
  text-align: center;
  font-size: 0.92rem;
  color: #888;
  line-height: 1.7;
}

/* ===== TOPICS ===== */
.topics-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.topic-item {
  flex: 1 1 calc(50% - 1px);
  min-width: 280px;
  padding: 30px 30px 30px 0;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.topic-item:nth-child(odd) {
  padding-right: 40px;
  border-right: 1px solid #eee;
}

.topic-item:nth-child(even) {
  padding-left: 40px;
  padding-right: 0;
}

.topic-icon {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topic-icon svg {
  width: 32px;
  height: 32px;
  stroke: #006699;
  fill: none;
  stroke-width: 1.5;
}

.topic-name {
  font-size: 1.15rem;
  color: #006699;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.topic-desc {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #666;
}
.topic-desc p { margin-bottom: 0.5em; }
.topic-desc p:last-child { margin-bottom: 0; }

/* ===== LATEST POSTS ===== */
.posts-list { list-style: none; padding: 0; margin: 0; }

.post-entry {
  display: flex;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid #eee;
  align-items: flex-start;
}
.post-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.post-entry-icon {
  flex-shrink: 0;
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}

.post-entry-icon svg {
  width: 44px;
  height: 44px;
  stroke: #006699;
  fill: none;
  stroke-width: 1.5;
  margin-bottom: 6px;
}

.post-date-badge {
  font-size: 0.78rem;
  color: #006699;
  text-align: center;
  line-height: 1.3;
}

.post-entry-body { flex: 1; min-width: 0; }

.post-entry-title {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.post-entry-title a {
  color: #006699;
  text-decoration: none;
}
.post-entry-title a:hover { color: #068ccf; }

.post-entry-excerpt {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #666;
}
.post-entry-excerpt p { margin-bottom: 0.3em; }
.post-entry-excerpt p:last-child { margin-bottom: 0; }

.post-entry-cover {
  flex-shrink: 0;
  width: 200px;
  height: 140px;
  overflow: hidden;
  background: #3085a3;
  position: relative;
}

.post-entry-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.35s ease;
}
.post-entry:hover .post-entry-cover img { opacity: 0.7; }

.post-entry-cover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: #006699;
  transform: translateY(5px);
  transition: transform 0.35s ease;
}
.post-entry:hover .post-entry-cover::after {
  transform: translateY(0);
}

/* Featured post (first in list) */
.post-featured {
  flex-direction: column;
  gap: 0;
  margin-bottom: 40px;
  padding-bottom: 40px;
}

.post-featured .post-entry-cover {
  width: 100%;
  height: 280px;
  margin-bottom: 20px;
}

.post-featured .post-entry-icon { display: none; }

.post-featured .post-entry-body {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.post-featured .post-entry-title {
  font-size: 1.4rem;
}

.post-featured .post-date-inline {
  display: block;
  font-size: 0.82rem;
  color: #006699;
  margin-bottom: 0.5rem;
}

/* ===== FAQ ===== */
.faq-list { list-style: none; padding: 0; margin: 0; }

.faq-item {
  margin-bottom: 0;
  border-bottom: 1px solid #eee;
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  user-select: none;
}

.faq-question-marker {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.faq-question-marker svg {
  width: 16px;
  height: 16px;
  stroke: #006699;
  fill: none;
  stroke-width: 2;
  transition: transform 0.3s ease;
}

.faq-question-text {
  flex: 1;
  font-size: 1.05rem;
  color: #1a1a2e;
  font-weight: 600;
}

.faq-item.open .faq-question-marker {
  background: #006699;
  border-color: #006699;
}
.faq-item.open .faq-question-marker svg {
  stroke: #fff;
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 0 0 52px;
}

.faq-item.open .faq-answer {
  max-height: 600px;
  padding-bottom: 24px;
}

.faq-answer-inner {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #666;
}
.faq-answer-inner p { margin-bottom: 0.6em; }
.faq-answer-inner p:last-child { margin-bottom: 0; }

/* ===== BLOG INDEX ===== */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.blog-card {
  padding: 30px;
  border-bottom: 1px solid #eee;
  transition: background 0.3s ease;
}
.blog-card:nth-child(odd) { border-right: 1px solid #eee; }
.blog-card:hover { background: #fafcfd; }

.blog-card-cover {
  width: 100%;
  height: 180px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #3085a3;
  position: relative;
}

.blog-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.35s;
}
.blog-card:hover .blog-card-cover img { opacity: 0.7; }

.blog-card-cover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: #006699;
  transform: translateY(5px);
  transition: transform 0.35s;
}
.blog-card:hover .blog-card-cover::after { transform: translateY(0); }

.blog-card-date {
  font-size: 0.82rem;
  color: #006699;
  margin-bottom: 0.4rem;
}

.blog-card-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.blog-card-title a { color: #1a1a2e; }
.blog-card-title a:hover { color: #006699; }

.blog-card-excerpt {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #666;
}
.blog-card-excerpt p { margin-bottom: 0.3em; }

/* Pagination */
.pagination-wrap {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 40px 30px;
  flex-wrap: wrap;
}

.pagination-link {
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #999;
  border: 1px solid #eee;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.pagination-link:hover,
.pagination-link.active {
  background: #006699;
  color: #fff;
  border-color: #006699;
}

.pagination-prev,
.pagination-next {
  width: auto;
  padding: 0 18px;
  font-size: 0.9rem;
}

/* ===== POST PAGE ===== */
.post-header {
  padding: 60px 70px 0 50px;
  border-bottom: none;
}

.post-cover-full {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  margin-bottom: 0;
}
.post-cover-full img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.5rem;
}

.post-meta-date {
  font-size: 0.9rem;
  color: #006699;
}

.post-content {
  padding: 40px 70px 80px 50px;
}

.post-content h1 { font-size: 1.9rem; margin: 2rem 0 1rem; }
.post-content h2 { font-size: 1.6rem; margin: 1.8rem 0 0.8rem; color: #006699; }
.post-content h3 { font-size: 1.3rem; margin: 1.5rem 0 0.7rem; }
.post-content p { margin-bottom: 1.2em; line-height: 1.9; }
.post-content ul, .post-content ol { margin: 1em 0; padding-left: 1.5em; }
.post-content li { margin-bottom: 0.4em; line-height: 1.8; }
.post-content blockquote {
  border-left: 4px solid #006699;
  padding: 1em 1.5em;
  margin: 1.5em 0;
  background: #fafcfd;
  color: #555;
  font-style: italic;
}
.post-content img { margin: 1.5em 0; }
.post-content a { color: #006699; text-decoration: underline; }
.post-content a:hover { color: #068ccf; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.post-content th, .post-content td {
  padding: 10px 14px;
  border: 1px solid #ddd;
  text-align: left;
}
.post-content th { background: #F2F2F2; font-weight: 600; color: #1a1a2e; }

/* Page content shares post styling */
.page-content { padding: 40px 70px 80px 50px; }
.page-content h1 { font-size: 1.9rem; margin: 2rem 0 1rem; }
.page-content h2 { font-size: 1.6rem; margin: 1.8rem 0 0.8rem; color: #006699; }
.page-content h3 { font-size: 1.3rem; margin: 1.5rem 0 0.7rem; }
.page-content p { margin-bottom: 1.2em; line-height: 1.9; }
.page-content ul, .page-content ol { margin: 1em 0; padding-left: 1.5em; }
.page-content li { margin-bottom: 0.4em; line-height: 1.8; }
.page-content blockquote {
  border-left: 4px solid #006699;
  padding: 1em 1.5em;
  margin: 1.5em 0;
  background: #fafcfd;
}
.page-content a { color: #006699; text-decoration: underline; }
.page-content a:hover { color: #068ccf; }

/* ===== FOOTER ===== */
.site-footer {
  padding: 50px 70px 30px 50px;
  border-top: 4px solid #ccc;
  background: #fafafa;
}

.footer-inner {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.footer-col { flex: 1; min-width: 200px; }

.footer-brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: #006699;
  margin-bottom: 0.6rem;
}

.footer-tagline {
  font-size: 0.9rem;
  color: #888;
  line-height: 1.6;
}

.footer-heading {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #006699;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li { margin-bottom: 8px; }
.footer-nav a {
  color: #666;
  font-size: 0.92rem;
}
.footer-nav a:hover { color: #006699; }

.footer-contact-link {
  color: #666;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-contact-link:hover { color: #006699; }
.footer-contact-link svg {
  width: 16px; height: 16px;
  stroke: #006699;
  fill: none;
  stroke-width: 1.5;
}

.footer-bottom {
  border-top: 1px solid #ddd;
  padding-top: 20px;
  text-align: right;
  font-size: 0.85rem;
  color: #999;
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 1200px) {
  .section { padding: 50px 40px 60px 40px; }
  .hero-content { padding: 60px 40px 50px 40px; }
  .hero-aside { width: 220px; padding: 30px 20px; }
  .post-content, .page-content { padding: 30px 40px 60px 40px; }
  .post-header { padding: 50px 40px 0 40px; }
  .site-footer { padding: 40px 40px 24px 40px; }

  .topic-item { flex: 1 1 100%; }
  .topic-item:nth-child(odd) {
    border-right: none;
    padding-right: 0;
  }
  .topic-item:nth-child(even) {
    padding-left: 0;
  }
}

/* Hide sidebar */
@media (max-width: 991px) {
  .site-sidebar {
    left: -260px;
    transition: all 0.3s ease;
  }
  .site-sidebar.show { left: 0; }
  .site-sidebar.show + .hamburger-btn { left: 260px; }

  .hamburger-btn { display: block; }
  .hamburger-btn.shifted { left: 260px; }

  .accent-strip { display: none; }

  .site-main { margin-left: 0; }

  .hero-aside { display: none; }
}

/* Mobile */
@media (max-width: 700px) {
  .section { padding: 36px 20px 44px 20px; }
  .hero-content { padding: 50px 20px 40px 20px; }
  .hero-title { font-size: 1.7rem; }
  .section-title { font-size: 1.4rem; }

  .post-entry { flex-direction: column; }
  .post-entry-cover { width: 100%; height: 180px; }
  .post-entry-icon { flex-direction: row; gap: 12px; width: auto; }

  .post-featured .post-entry-body { flex-direction: column; }
  .post-featured .post-entry-cover { height: 200px; }

  .blog-grid { grid-template-columns: 1fr; }
  .blog-card:nth-child(odd) { border-right: none; }

  .post-content, .page-content { padding: 24px 20px 44px 20px; }
  .post-header { padding: 36px 20px 0 20px; }
  .site-footer { padding: 30px 20px 20px 20px; }

  .footer-inner { flex-direction: column; gap: 30px; }
  .footer-bottom { text-align: left; }

  .pagination-wrap { justify-content: center; }

  .faq-question { padding: 16px 0; }
  .faq-answer { padding-left: 0; }
  .faq-item.open .faq-answer { padding-left: 0; }
}

/* Skip nav */
.skip-nav {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 8px 16px;
  background: #006699;
  color: #fff;
  font-size: 0.9rem;
}
.skip-nav:focus {
  left: 0;
  color: #fff;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #068ccf;
  outline-offset: 2px;
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
