/*
Theme Name: Gsim Blog
Theme URI: https://gsim.me/blog/
Author: Gsim.me
Author URI: https://gsim.me/
Description: Clean Gsim.me blog theme for travel eSIM articles.
Version: 1.0.6
Text Domain: gsim-blog
*/

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbe4ef;
  --soft: #f6f8fb;
  --card: #ffffff;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--blue-dark);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 78px;
  padding: 0 max(32px, calc((100vw - 1280px) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  display: block;
  width: 172px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--muted);
  font-weight: 700;
}

.site-nav a {
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--blue);
}

.header-action,
.button,
.wp-block-button__link,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-action:hover,
.button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover {
  background: var(--blue-dark);
  color: #fff;
  transform: translateY(-1px);
}

.page-shell {
  width: min(1280px, calc(100% - 112px));
  margin: 0 auto;
  padding: 64px 0 82px;
}

.blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 16px;
  font-weight: 800;
}

.blog-hero h1,
.page-title {
  margin: 0;
  max-width: 760px;
  color: var(--ink);
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-subtitle {
  margin: 18px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.posts-list {
  display: grid;
  gap: 18px;
}

.post-card,
.content-card,
.sidebar-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.post-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.post-card h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 2.7vw, 40px);
  line-height: 1.08;
  letter-spacing: 0;
}

.post-card h2 a {
  color: var(--ink);
}

.post-card h2 a:hover {
  color: var(--blue);
}

.post-meta,
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.post-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.post-card-media {
  display: block;
  border-bottom: 1px solid var(--line);
  background: #eef4ff;
}

.post-card-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.post-card-media-placeholder {
  display: flex;
  align-items: center;
  min-height: 280px;
  justify-content: center;
  color: var(--blue);
  font-size: 22px;
  font-weight: 900;
}

.post-card-body {
  display: grid;
  align-content: center;
  padding: clamp(24px, 3.6vw, 42px);
}

.post-card-footer {
  display: flex;
  margin-top: 22px;
}

.post-card .read-more {
  align-self: start;
  white-space: nowrap;
}

.content-card {
  padding: clamp(24px, 4.5vw, 54px);
}

.entry-header {
  margin-bottom: 28px;
}

.entry-title {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: 0;
}

.entry-content {
  color: #26354d;
  font-size: 20px;
}

.entry-content h2,
.entry-content h3 {
  color: var(--ink);
  line-height: 1.16;
  letter-spacing: 0;
}

.entry-content h2 {
  margin-top: 44px;
  font-size: clamp(28px, 3vw, 40px);
}

.entry-content h3 {
  margin-top: 32px;
  font-size: clamp(22px, 2vw, 30px);
}

.entry-content p,
.entry-content ul,
.entry-content ol {
  margin: 0 0 22px;
}

.entry-content blockquote {
  margin: 30px 0;
  padding: 22px 26px;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #eff6ff;
  color: var(--ink);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.entry-content th,
.entry-content td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.entry-content th {
  background: #eef4ff;
  color: var(--ink);
}

.sidebar {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.sidebar-card {
  padding: 16px 18px;
  border-radius: 8px;
}

.sidebar-card h2,
.sidebar-card h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.2;
}

.sidebar-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.sidebar-card ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-card li a {
  display: block;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.22;
}

.sidebar-card li a:hover {
  color: var(--blue);
}

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

.search-field,
input[type="search"],
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 15px;
}

.search-submit {
  min-height: 42px;
  padding-inline: 14px;
  font-size: 15px;
}

.sidebar-card .button {
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  font-size: 15px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.pagination .current {
  border-color: var(--blue);
  color: var(--blue);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(200px, 280px));
  gap: 46px;
  padding: 48px max(32px, calc((100vw - 1280px) / 2)) 60px;
  border-top: 1px solid rgba(100, 116, 139, 0.22);
  color: var(--muted);
  background: var(--soft);
}

.site-footer p {
  max-width: 560px;
  margin: 14px 0 0;
}

.footer-column {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-column strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 18px;
}

.footer-column a {
  color: var(--muted);
  font-weight: 700;
}

.footer-column a:hover {
  color: var(--blue);
}

.footer-support {
  margin-top: 6px;
  color: var(--blue);
  font-weight: 800;
}

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

@media (max-width: 1020px) {
  .site-header {
    padding-inline: 24px;
  }

  .content-layout,
  .blog-hero {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .site-header {
    min-height: 72px;
    gap: 14px;
  }

  .brand-logo {
    width: 140px;
  }

  .site-nav {
    display: none;
  }

  .header-action {
    min-height: 42px;
    padding: 10px 14px;
    font-size: 15px;
  }

  .page-shell {
    width: min(100% - 28px, 1420px);
    padding-top: 34px;
  }

  .blog-hero h1,
  .page-title,
  .entry-title {
    font-size: 38px;
  }

  .post-card {
    grid-template-columns: 1fr;
  }

  .post-card-media img {
    aspect-ratio: auto;
  }

  .entry-content {
    font-size: 18px;
  }

  .sidebar-card ul {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
    padding: 34px 20px 44px;
  }
}
