/*
Theme Name: GetMD Blog
Theme URI: https://getmd.ai
Author: MO Agency
Author URI: https://moagency.co
Description: Marketing site + blog theme for www.getmd.ai - built for getmd.ai brand identity.
Version: 1.10.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: getmd-blog
*/

/* ===================================================================
   RESET & BASE
   =================================================================== */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.625;
  color: #F7F8FB;
  background: #0A0F1B;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul, ol {
  list-style: none;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #16202D; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #242D3A; }

/* ===================================================================
   LAYOUT
   =================================================================== */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 1024px) {
  .container {
    padding: 0 32px;
  }
}

/* ===================================================================
   TYPOGRAPHY
   =================================================================== */

h1, h2, h3, h4, h5, h6 {
  color: #F7F8FB;
  line-height: 1.2;
}

h1 { font-size: 48px; font-weight: 800; }
h2 { font-size: 30px; font-weight: 700; }
h3 { font-size: 24px; font-weight: 600; }
h4 { font-size: 20px; font-weight: 600; }

@media (min-width: 768px) {
  h1 { font-size: 64px; }
}

p {
  color: #A9AFB8;
}

/* ===================================================================
   HEADER
   =================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(10, 15, 27, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 200ms, box-shadow 200ms;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  border-bottom-color: #2A3447;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 41, 0.08);
}

.site-header .container {
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
}

.site-logo img,
.site-logo svg {
  height: 32px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-nav a {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background 150ms, color 150ms;
  color: #A9AFB8;
  white-space: nowrap;
}

.header-nav a:hover {
  background: #1A202E;
  color: #F7F8FB;
}

.header-nav a.active {
  color: #F7F8FB;
}

.header-nav .btn-primary {
  background: #F47820;
  color: #FFFFFF;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  transition: background 150ms;
  margin-left: 4px;
}

.header-nav .btn-primary:hover {
  background: rgba(244, 120, 32, 0.9);
}

/* Mobile nav */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #F7F8FB;
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 767px) {
  .header-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 15, 27, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid #2A3447;
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
  }

  .header-nav.open {
    display: flex;
  }

  .header-nav a {
    width: 100%;
    text-align: left;
  }

  .header-nav .btn-primary {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
  }

  .mobile-menu-toggle {
    display: block;
  }
}

/* ===================================================================
   HERO SECTION
   =================================================================== */

.blog-hero {
  padding: 96px 0 48px;
  text-align: center;
}

.blog-hero .label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F47820;
  margin-bottom: 16px;
}

.blog-hero h1 {
  background: linear-gradient(to right, #F47820, #B41E85);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.blog-hero p {
  font-size: 18px;
  max-width: 576px;
  margin: 0 auto;
  color: #A9AFB8;
}

/* ===================================================================
   CATEGORY FILTER BAR
   =================================================================== */

.category-filter {
  padding: 0 0 48px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.category-filter::-webkit-scrollbar {
  display: none;
}

.category-filter .container {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.category-filter a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #A9AFB8;
  border: 1px solid #2A3447;
  border-radius: 9999px;
  transition: all 150ms;
  white-space: nowrap;
}

.category-filter a:hover {
  border-color: #F47820;
  color: #F7F8FB;
  background: rgba(244, 120, 32, 0.1);
}

.category-filter a.active {
  background: #F47820;
  border-color: #F47820;
  color: #FFFFFF;
}

.category-filter .count {
  font-size: 12px;
  font-weight: 600;
  background: rgba(247, 248, 251, 0.1);
  padding: 2px 8px;
  border-radius: 9999px;
}

.category-filter a.active .count {
  background: rgba(255, 255, 255, 0.2);
}

/* ===================================================================
   POST GRID
   =================================================================== */

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 96px;
}

@media (min-width: 640px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Featured post - first post spans full width */
.post-card.featured {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .post-card.featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
    flex-direction: unset;
  }
}

/* ===================================================================
   POST CARD
   =================================================================== */

.post-card {
  display: flex;
  flex-direction: column;
  background: #0F1729;
  border: 1px solid #2A3447;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 200ms, box-shadow 200ms;
}

.post-card:hover {
  border-color: rgba(244, 120, 32, 0.4);
  box-shadow: 0 4px 24px -4px rgba(244, 120, 32, 0.12);
}

.post-card__image {
  display: block;
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #1A202E;
  flex-shrink: 0;
}

.post-card__image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms;
}

.post-card:hover .post-card__image img {
  transform: scale(1.03);
}

.post-card__body {
  padding: 24px;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.post-card__category {
  font-size: 12px;
  font-weight: 600;
  color: #F47820;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-card__date {
  font-size: 12px;
  font-weight: 500;
  color: #A9AFB8;
}

.post-card__title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: #F7F8FB;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__excerpt {
  font-size: 14px;
  color: #A9AFB8;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.post-card__link {
  font-size: 14px;
  font-weight: 500;
  color: #F47820;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 200ms;
}

.post-card__link:hover {
  gap: 10px;
}

.post-card__link svg {
  width: 16px;
  height: 16px;
}

/* Featured card adjustments */
.post-card.featured .post-card__image {
  height: auto;
  min-height: 300px;
}

.post-card.featured .post-card__title {
  font-size: 28px;
  -webkit-line-clamp: 3;
}

.post-card.featured .post-card__excerpt {
  -webkit-line-clamp: 4;
}

/* ===================================================================
   PAGINATION
   =================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding-bottom: 96px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: #A9AFB8;
  background: #0F1729;
  border: 1px solid #2A3447;
  border-radius: 6px;
  transition: all 150ms;
}

.pagination a:hover {
  border-color: #F47820;
  color: #F7F8FB;
}

.pagination .current {
  background: #F47820;
  border-color: #F47820;
  color: #FFFFFF;
}

/* ===================================================================
   SINGLE POST
   =================================================================== */

.single-hero {
  padding: 64px 0 48px;
  max-width: 768px;
  margin: 0 auto;
}

.single-hero .post-card__meta {
  margin-bottom: 20px;
}

.single-hero h1 {
  font-size: 40px;
  line-height: 1.15;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .single-hero h1 {
    font-size: 48px;
  }
}

.single-hero .excerpt {
  font-size: 18px;
  color: #A9AFB8;
  line-height: 1.6;
}

.single-featured-image {
  max-width: 1024px;
  margin: 0 auto 48px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #2A3447;
}

.single-featured-image img {
  width: 100%;
  height: auto;
}

/* Post content */
.post-content {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 96px;
}

.post-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
}

.post-content h3 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
}

.post-content h4 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
}

.post-content p {
  margin-bottom: 20px;
  color: #A9AFB8;
  line-height: 1.75;
}

.post-content a {
  color: #F47820;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 150ms;
}

.post-content a:hover {
  color: #F7F8FB;
}

.post-content ul,
.post-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
  color: #A9AFB8;
}

.post-content ul {
  list-style: disc;
}

.post-content ol {
  list-style: decimal;
}

.post-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.post-content blockquote {
  border-left: 3px solid #F47820;
  padding: 16px 24px;
  margin: 32px 0;
  background: #0F1729;
  border-radius: 0 8px 8px 0;
}

.post-content blockquote p {
  color: #F7F8FB;
  font-size: 18px;
  font-style: italic;
  margin-bottom: 0;
}

.post-content pre {
  background: #0F1729;
  border: 1px solid #2A3447;
  border-radius: 8px;
  padding: 24px;
  margin: 32px 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.6;
  color: #F7F8FB;
}

.post-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  background: #1A202E;
  padding: 2px 6px;
  border-radius: 4px;
  color: #F47820;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.post-content img {
  border-radius: 8px;
  margin: 32px 0;
}

.post-content figure {
  margin: 32px 0;
}

.post-content figcaption {
  font-size: 14px;
  color: #A9AFB8;
  text-align: center;
  margin-top: 8px;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
}

.post-content th,
.post-content td {
  padding: 12px 16px;
  border: 1px solid #2A3447;
  text-align: left;
  font-size: 14px;
}

.post-content th {
  background: #0F1729;
  font-weight: 600;
  color: #F7F8FB;
}

.post-content td {
  color: #A9AFB8;
}

.post-content hr {
  border: none;
  border-top: 1px solid #2A3447;
  margin: 48px 0;
}

/* ===================================================================
   POST NAVIGATION (PREV / NEXT)
   =================================================================== */

.post-nav {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.post-nav a {
  display: block;
  padding: 24px;
  background: #0F1729;
  border: 1px solid #2A3447;
  border-radius: 8px;
  transition: border-color 200ms;
}

.post-nav a:hover {
  border-color: rgba(244, 120, 32, 0.4);
}

.post-nav .label {
  font-size: 12px;
  font-weight: 500;
  color: #A9AFB8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.post-nav .title {
  font-size: 16px;
  font-weight: 600;
  color: #F7F8FB;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-nav .next {
  text-align: right;
}

/* ===================================================================
   AUTHOR BOX
   =================================================================== */

.author-box {
  max-width: 720px;
  margin: 0 auto 48px;
  padding: 32px;
  background: #0F1729;
  border: 1px solid #2A3447;
  border-radius: 8px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.author-box__avatar {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  flex-shrink: 0;
  overflow: hidden;
  background: #1A202E;
}

.author-box__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-box__name {
  font-size: 16px;
  font-weight: 600;
  color: #F7F8FB;
  margin-bottom: 4px;
}

.author-box__bio {
  font-size: 14px;
  color: #A9AFB8;
  line-height: 1.5;
}

/* ===================================================================
   SEARCH
   =================================================================== */

.search-hero {
  padding: 96px 0 48px;
  text-align: center;
}

.search-hero h1 {
  font-size: 36px;
  margin-bottom: 24px;
}

.search-form {
  display: flex;
  max-width: 576px;
  margin: 0 auto;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 12px 16px;
  font-size: 16px;
  font-family: inherit;
  background: #0F1729;
  border: 1px solid #2A3447;
  border-radius: 6px 0 0 6px;
  color: #F7F8FB;
  outline: none;
  transition: border-color 150ms;
}

.search-form input[type="search"]:focus {
  border-color: #F47820;
}

.search-form input[type="search"]::placeholder {
  color: #A9AFB8;
}

.search-form button {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  background: #F47820;
  color: #FFFFFF;
  border: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  transition: background 150ms;
}

.search-form button:hover {
  background: rgba(244, 120, 32, 0.9);
}

/* ===================================================================
   404
   =================================================================== */

.error-404 {
  padding: 128px 0;
  text-align: center;
}

.error-404 .error-code {
  font-size: 120px;
  font-weight: 800;
  background: linear-gradient(to right, #F47820, #B41E85);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
}

.error-404 h1 {
  font-size: 30px;
  margin-bottom: 12px;
}

.error-404 p {
  font-size: 16px;
  color: #A9AFB8;
  margin-bottom: 32px;
}

.error-404 .btn-primary {
  display: inline-block;
  background: #F47820;
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background 150ms;
}

.error-404 .btn-primary:hover {
  background: rgba(244, 120, 32, 0.9);
}

/* ===================================================================
   FOOTER
   =================================================================== */

.site-footer {
  border-top: 1px solid #2A3447;
  background: #0A0F1B;
}

.footer-grid {
  padding: 48px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .footer-brand {
    grid-column: auto;
  }
}

.footer-brand img {
  height: 32px;
  width: auto;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  color: #A9AFB8;
  line-height: 1.6;
  max-width: 300px;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  color: #A9AFB8;
  transition: color 150ms;
}

.footer-social a:hover {
  color: #F7F8FB;
}

.footer-social svg {
  width: 16px;
  height: 16px;
}

.footer-column h3 {
  font-size: 14px;
  font-weight: 600;
  color: #F7F8FB;
  margin-bottom: 12px;
}

.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-column a {
  font-size: 14px;
  color: #A9AFB8;
  transition: color 150ms;
}

.footer-column a:hover {
  color: #F7F8FB;
}

.footer-bottom {
  margin-top: 40px;
  padding: 24px 0;
  border-top: 1px solid #2A3447;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom p {
  font-size: 12px;
  color: #A9AFB8;
}

/* ===================================================================
   UTILITIES
   =================================================================== */

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

/* No results state */
.no-results {
  text-align: center;
  padding: 96px 0;
}

.no-results h2 {
  margin-bottom: 12px;
}

.no-results p {
  margin-bottom: 32px;
}

/* Fade-in animation */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fade-in 0.3s ease-out;
}

/* Staggered grid animation */
.post-card {
  animation: fade-in 0.4s ease-out both;
}

.post-card:nth-child(1) { animation-delay: 0s; }
.post-card:nth-child(2) { animation-delay: 0.05s; }
.post-card:nth-child(3) { animation-delay: 0.1s; }
.post-card:nth-child(4) { animation-delay: 0.15s; }
.post-card:nth-child(5) { animation-delay: 0.2s; }
.post-card:nth-child(6) { animation-delay: 0.25s; }
.post-card:nth-child(7) { animation-delay: 0.3s; }
.post-card:nth-child(8) { animation-delay: 0.35s; }
.post-card:nth-child(9) { animation-delay: 0.4s; }

/* WordPress alignment classes */
.alignleft {
  float: left;
  margin: 0 24px 16px 0;
}

.alignright {
  float: right;
  margin: 0 0 16px 24px;
}

.aligncenter {
  display: block;
  margin: 32px auto;
}

.alignwide {
  max-width: 1024px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  width: 100vw;
}

/* WordPress captions */
.wp-caption {
  max-width: 100%;
  margin: 32px 0;
}

.wp-caption-text {
  font-size: 14px;
  color: #A9AFB8;
  text-align: center;
  margin-top: 8px;
}

/* WordPress galleries */
.wp-block-gallery {
  display: grid;
  gap: 16px;
  margin: 32px 0;
}

/* Screen reader text (WordPress) */
.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-width: 0;
}
