/*
Theme Name: Social Auto Post Blog
Theme URI: https://www.socialautopost.com/
Author: OpenAI
Author URI: https://www.openai.com/
Description: WordPress blog theme styled to match the Social Auto Post marketing site.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: socialautopost-blog
*/

:root {
  --sap-blue-50: #eff6ff;
  --sap-blue-100: #dbeafe;
  --sap-blue-500: #3b82f6;
  --sap-blue-600: #2563eb;
  --sap-blue-700: #1d4ed8;
  --sap-blue-800: #1e40af;
  --sap-slate-50: #f8fafc;
  --sap-slate-100: #f1f5f9;
  --sap-slate-200: #e2e8f0;
  --sap-slate-300: #cbd5e1;
  --sap-slate-500: #64748b;
  --sap-slate-600: #475569;
  --sap-slate-700: #334155;
  --sap-slate-800: #1f2937;
  --sap-slate-900: #111827;
  --sap-white: #ffffff;
  --sap-radius-sm: 14px;
  --sap-radius-md: 20px;
  --sap-radius-lg: 28px;
  --sap-shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.06);
  --sap-shadow-md: 0 22px 50px rgba(37, 99, 235, 0.12);
  --sap-container: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sap-white);
  color: var(--sap-slate-900);
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

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

a:hover,
a:focus {
  color: var(--sap-blue-800);
}

input,
button,
textarea,
select {
  font: inherit;
}

.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;
}

.screen-reader-text:focus {
  clip: auto;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--sap-white);
  border-radius: 12px;
  left: 1rem;
  top: 1rem;
  z-index: 100000;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sap-container {
  width: min(calc(100% - 2rem), var(--sap-container));
  margin: 0 auto;
}

.site-main {
  flex: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.04);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 84px;
}

.site-branding {
  flex: 0 0 auto;
}

.site-branding img {
  display: block;
  width: auto;
  height: 44px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
  justify-content: center;
}

.site-nav .menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--sap-slate-700);
  font-weight: 600;
}

.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav a:hover,
.site-nav a:focus {
  color: var(--sap-blue-700);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.header-link {
  color: var(--sap-slate-700);
  font-weight: 600;
}

.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sap-slate-200);
  background: var(--sap-white);
  color: var(--sap-slate-900);
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.sap-button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sap-button:hover,
.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
  transform: translateY(-1px);
}

.sap-button--primary,
.wp-block-button__link,
button,
input[type="submit"] {
  background: var(--sap-blue-700);
  color: var(--sap-white);
  box-shadow: var(--sap-shadow-md);
}

.sap-button--primary:hover,
.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--sap-blue-800);
  color: var(--sap-white);
}

.sap-button--secondary {
  background: var(--sap-white);
  color: var(--sap-slate-800);
  border-color: var(--sap-slate-300);
}

.sap-button--secondary:hover {
  background: var(--sap-slate-50);
  color: var(--sap-slate-900);
}

.page-hero,
.archive-hero,
.search-hero,
.error-hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 2.5rem;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.13), transparent 32rem),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.page-hero::after,
.archive-hero::after,
.search-hero::after,
.error-hero::after {
  content: "";
  position: absolute;
  inset: auto -12rem -10rem auto;
  width: 24rem;
  height: 24rem;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 2rem;
  align-items: stretch;
}

.hero-copy h1,
.archive-hero h1,
.search-hero h1,
.error-hero h1,
.entry-title {
  margin: 0 0 1rem;
  color: var(--sap-slate-900);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy h1,
.archive-hero h1,
.search-hero h1,
.error-hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.5rem);
}

.hero-copy p,
.archive-hero p,
.search-hero p,
.error-hero p {
  margin: 0 0 1.75rem;
  font-size: 1.1rem;
  color: var(--sap-slate-600);
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.hero-panel,
.sap-card,
.widget,
.post-card,
.single-content,
.comments-area,
.author-box,
.archive-description,
.search-form,
.error-panel {
  background: var(--sap-white);
  border: 1px solid var(--sap-slate-200);
  border-radius: var(--sap-radius-lg);
  box-shadow: var(--sap-shadow-sm);
}

.hero-panel {
  padding: 1.6rem;
}

.hero-panel__label,
.post-card__eyebrow,
.entry-meta,
.archive-taxonomy,
.comment-metadata {
  color: var(--sap-blue-700);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-panel h2 {
  margin: 0.75rem 0 0.75rem;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  line-height: 1.15;
}

.hero-panel p {
  margin: 0;
  color: var(--sap-slate-600);
}

.content-section {
  padding: 2rem 0 5rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.post-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--sap-blue-100), var(--sap-slate-100));
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
}

.post-card h2,
.post-card h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
}

.post-card p {
  margin: 0;
  color: var(--sap-slate-600);
}

.post-card__footer {
  margin-top: auto;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
}

.single-content,
.page-content {
  padding: 2rem;
}

.entry-header {
  margin-bottom: 1.5rem;
}

.entry-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.entry-meta span,
.entry-meta a {
  color: var(--sap-slate-500);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}

.entry-thumbnail {
  margin: 0 0 1.75rem;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sap-blue-100), var(--sap-slate-100));
}

.entry-thumbnail img {
  width: 100%;
  display: block;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--sap-slate-900);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.entry-content p,
.entry-content li,
.entry-content blockquote,
.entry-content td,
.entry-content th {
  color: var(--sap-slate-700);
}

.entry-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem;
  border-left: 4px solid var(--sap-blue-600);
  background: var(--sap-blue-50);
  border-radius: 0 20px 20px 0;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.3rem;
}

.entry-content pre,
.entry-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.entry-content pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--sap-slate-900);
  color: var(--sap-white);
  border-radius: 18px;
}

.entry-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sap-slate-200);
}

.entry-taxonomy,
.tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.entry-taxonomy a,
.tag-links a,
.archive-taxonomy a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--sap-blue-50);
  color: var(--sap-blue-700);
  font-size: 0.92rem;
  font-weight: 700;
}

.sidebar {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.widget {
  padding: 1.4rem;
}

.widget-title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--sap-slate-900);
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget li + li {
  margin-top: 0.8rem;
}

.widget a,
.wp-block-latest-posts a {
  color: var(--sap-slate-700);
  font-weight: 600;
}

.widget a:hover,
.wp-block-latest-posts a:hover {
  color: var(--sap-blue-700);
}

.search-form {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
}

.search-form label {
  flex: 1;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="search"],
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--sap-slate-300);
  border-radius: 16px;
  background: var(--sap-white);
  color: var(--sap-slate-900);
}

textarea {
  min-height: 160px;
  resize: vertical;
}

.pagination,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2.5rem;
}

.page-numbers,
.post-page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--sap-slate-200);
  background: var(--sap-white);
  color: var(--sap-slate-700);
  font-weight: 700;
}

.page-numbers.current,
.post-page-numbers.current {
  background: var(--sap-blue-700);
  border-color: var(--sap-blue-700);
  color: var(--sap-white);
}

.archive-description,
.error-panel {
  padding: 1.5rem;
  margin-top: 1.5rem;
  color: var(--sap-slate-600);
}

.site-footer {
  margin-top: 4rem;
  background: var(--sap-slate-900);
  color: var(--sap-white);
  padding: 4rem 0 2.25rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.site-footer__brand img {
  height: 50px;
  width: auto;
}

.site-footer p,
.site-footer li,
.site-footer a {
  color: rgba(226, 232, 240, 0.84);
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--sap-white);
}

.footer-socials,
.footer-menu {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.footer-socials li + li,
.footer-menu li + li {
  margin-top: 0.8rem;
}

.site-footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-legal {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.no-posts {
  padding: 2rem;
  text-align: center;
}

.alignwide,
.alignfull {
  width: 100%;
}

@media (max-width: 1100px) {
  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .hero-grid,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    justify-content: flex-end;
  }
}

@media (max-width: 840px) {
  .site-header__bar {
    min-height: 74px;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.75rem);
    padding: 1rem;
    border-radius: 24px;
    border: 1px solid var(--sap-slate-200);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--sap-shadow-sm);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav .menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .header-actions {
    display: none;
  }
}

@media (max-width: 680px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .archive-hero,
  .search-hero,
  .error-hero,
  .content-section {
    padding-top: 2.5rem;
  }

  .single-content,
  .page-content,
  .hero-panel {
    padding: 1.35rem;
  }

  .search-form {
    flex-direction: column;
  }
}
