/*
 AJT CREATIVE ACADEMY v1.0
 Theme: Baskerville 2
 Scope: Site-wide
*/

/* 01 — DESIGN TOKENS */
:root {
  --ajt-bg: #111827;
  --ajt-surface: #1e293b;
  --ajt-raised: #273449;
  --ajt-border: #39475c;
  --ajt-text: #f8fafc;
  --ajt-muted: #c1cbd9;
  --ajt-accent: #f59e0b;
  --ajt-accent-hover: #fbbf24;
  --ajt-radius: 14px;
  --ajt-font: -apple-system, BlinkMacSystemFont,
    "Noto Sans Thai", "Helvetica Neue",
    Arial, sans-serif;
}

/* 02 — GLOBAL */
body {
  background: var(--ajt-bg);
  color: var(--ajt-text);
  font-family: var(--ajt-font);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

body, button, input, textarea, select {
  font-family: var(--ajt-font);
}

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

a {
  color: var(--ajt-accent);
  transition: color .2s ease;
}

a:hover, a:focus {
  color: var(--ajt-accent-hover);
}

:focus-visible {
  outline: 2px solid var(--ajt-accent);
  outline-offset: 3px;
}

/* 03 — HEADER */
.header {
  background-color: var(--ajt-bg);
}

.header .cover {
  background: rgba(10, 15, 25, .55);
}

.header-inner {
  padding-top: 42px;
  padding-bottom: 42px;
}

.site-title,
.site-title a {
  color: #fff;
  font-family: var(--ajt-font);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.15;
}

.site-title a:hover {
  color: var(--ajt-accent);
}

.site-description,
.site-tagline {
  color: #e2e8f0;
  font-weight: 400;
  letter-spacing: .015em;
}

/* 04 — NAVIGATION */
.navigation,
.bg-dark {
  background-color: #0b1220;
}

.navigation a {
  color: #e2e8f0;
}

.navigation a:hover,
.navigation .current-menu-item > a,
.navigation .current_page_item > a {
  color: var(--ajt-accent);
}

.navigation .sub-menu,
.navigation .children {
  background: #172235;
}

/* 05 — MAIN LAYOUT */
.wrapper,
.content {
  color: var(--ajt-text);
}

.section-inner {
  max-width: 1160px;
}

.posts .post,
.posts .type-post,
.posts .type-page {
  background: var(--ajt-surface);
  border: 1px solid var(--ajt-border);
  border-radius: var(--ajt-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
  transition: transform .25s ease,
              box-shadow .25s ease;
}

.posts .post:hover,
.posts .type-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
}

/* 06 — POST CARDS */
.posts .post-header,
.posts .post-content,
.posts .post-excerpt {
  background: var(--ajt-surface);
}

.posts .post-header {
  padding-top: 24px;
  padding-bottom: 12px;
}

.post-header .post-title,
.post-header .post-title a,
.entry-title,
.entry-title a {
  color: var(--ajt-text);
  font-family: var(--ajt-font);
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: -.015em;
}

.posts .post-title,
.posts .entry-title {
  font-size: clamp(19px, 2vw, 25px);
}

.post-title a:hover,
.entry-title a:hover {
  color: var(--ajt-accent);
}

.posts .post-content,
.posts .post-excerpt {
  color: var(--ajt-muted);
  font-size: 15px;
  line-height: 1.85;
}

.post-meta,
.post-meta a,
.post-date,
.post-author {
  color: var(--ajt-muted);
  font-size: 13px;
}

.post-meta a:hover {
  color: var(--ajt-accent);
}

/* 07 — FEATURED IMAGES */
.featured-media img,
.post-thumbnail img,
.wp-post-image {
  display: block;
  max-width: 100%;
  height: auto;
}

.posts .featured-media img,
.posts .post-thumbnail img {
  transition: transform .35s ease;
}

.posts .post:hover .featured-media img,
.posts .post:hover .post-thumbnail img {
  transform: scale(1.025);
}

/* 08 — SINGLE POSTS & PAGES */
.single .post,
.page .post,
.single .type-post,
.page .type-page {
  background: var(--ajt-surface);
  color: var(--ajt-text);
  border-radius: var(--ajt-radius);
  overflow: hidden;
}

.single .post-header,
.page .post-header,
.single .post-content,
.page .post-content {
  background: var(--ajt-surface);
}

.single .post-title,
.page .post-title {
  font-size: clamp(27px, 3.2vw, 42px);
  line-height: 1.35;
}

.post-content,
.entry-content {
  color: var(--ajt-text);
  line-height: 1.95;
  overflow-wrap: break-word;
}

.post-content p,
.entry-content p {
  margin-bottom: 1.4em;
}

.post-content h2,
.post-content h3,
.entry-content h2,
.entry-content h3 {
  color: var(--ajt-text);
  font-weight: 750;
  line-height: 1.4;
}

.post-content h2,
.entry-content h2 {
  border-left: 4px solid var(--ajt-accent);
  padding-left: 16px;
}

.post-content a,
.entry-content a {
  color: var(--ajt-accent);
}

.post-content img,
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.post-content blockquote,
.entry-content blockquote,
.wp-block-quote {
  background: var(--ajt-raised);
  color: var(--ajt-text);
  border-left: 4px solid var(--ajt-accent);
  padding: 20px 24px;
  border-radius: 0 10px 10px 0;
}

/* 09 — SIDEBAR & WIDGETS */
.sidebar .widget,
.widget {
  color: var(--ajt-text);
}

.sidebar .widget {
  background: var(--ajt-surface);
  border: 1px solid var(--ajt-border);
  border-radius: 12px;
  padding: 22px;
}

.widget-title,
.widget h2,
.widget h3 {
  color: var(--ajt-text);
}

.widget a {
  color: var(--ajt-muted);
}

.widget a:hover {
  color: var(--ajt-accent);
}

/* 10 — FORMS & BUTTONS */
button,
input[type="submit"],
.wp-block-button__link,
.post-content .more-link,
.posts .more-link {
  background: var(--ajt-accent);
  color: #111827;
  border: 0;
  border-radius: 9px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s ease,
              transform .2s ease;
}

button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
  background: var(--ajt-accent-hover);
  color: #111827;
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
textarea,
select {
  max-width: 100%;
  background: #101827;
  color: var(--ajt-text);
  border: 1px solid var(--ajt-border);
  border-radius: 8px;
  padding: 12px;
}

input::placeholder,
textarea::placeholder {
  color: #a5b1c3;
}

/* 11 — TABLES & CODE */
.post-content table,
.entry-content table {
  width: 100%;
  border-collapse: collapse;
}

.post-content th,
.post-content td,
.entry-content th,
.entry-content td {
  border: 1px solid var(--ajt-border);
  padding: 10px 14px;
}

.post-content th,
.entry-content th {
  background: var(--ajt-raised);
}

pre,
.wp-block-code {
  background: #0b1220;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 18px;
  overflow-x: auto;
}

/* 12 — FOOTER */
.footer,
.footer-inner,
.credits {
  background: #0b1220;
  color: var(--ajt-muted);
}

.footer .widget-title,
.footer h2,
.footer h3 {
  color: var(--ajt-text);
}

.footer a,
.credits a {
  color: var(--ajt-muted);
}

.footer a:hover,
.credits a:hover {
  color: var(--ajt-accent);
}

/* 13 — PAGINATION */
.page-numbers,
.page-numbers a,
.archive-nav a {
  color: var(--ajt-text);
}

.page-numbers.current {
  color: var(--ajt-accent);
}

/* 14 — RESPONSIVE */
@media (max-width: 900px) {
  .section-inner {
    width: 92%;
  }

  .header-inner {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .posts .post:hover {
    transform: none;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .site-title {
    font-size: 32px;
  }

  .header-inner {
    padding-top: 26px;
    padding-bottom: 26px;
  }

  .posts .post,
  .single .post,
  .page .post {
    border-radius: 10px;
  }

  .single .post-title,
  .page .post-title {
    font-size: 27px;
  }

  .post-content h2,
  .entry-content h2 {
    padding-left: 12px;
  }

  .sidebar .widget {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}