/*
Theme Name: INT092
Theme URI:
Author: INT092
Description: A clean, modern car blog theme.
Version: 1.0.0
Text Domain: int092
*/

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

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

:root {
  --color-bg: #f7f7f5;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #6b6b6b;
  --color-accent: #c0392b;
  --color-accent-hover: #a93226;
  --color-border: #e5e5e3;
  --color-nav-bg: #1a1a1a;
  --color-nav-text: #ffffff;
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --content-width: 1200px;
  --content-narrow: 720px;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition: 0.2s ease;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
}

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

figure {
  max-width: 100%;
}

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

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

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

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: var(--content-narrow);
}

.site-main {
  flex: 1;
  padding: 48px 0;
}

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

.site-header {
  background: var(--color-nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-nav-text);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.site-logo span {
  color: var(--color-accent);
}

/* ========================================
   PRIMARY NAVIGATION (2-level)
   ======================================== */

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 0;
}

.primary-nav > ul > li {
  position: relative;
}

.primary-nav > ul > li > a {
  display: block;
  padding: 20px 16px;
  color: var(--color-nav-text);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.primary-nav > ul > li > a:hover,
.primary-nav > ul > li.current-menu-item > a,
.primary-nav > ul > li.current-menu-parent > a,
.primary-nav > ul > li.current-cat > a,
.primary-nav > ul > li.current-cat-parent > a {
  color: var(--color-accent);
}

/* Dropdown */
.primary-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-nav-bg);
  min-width: 200px;
  border-top: 2px solid var(--color-accent);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 200;
}

.primary-nav > ul > li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-nav .sub-menu li a {
  display: block;
  padding: 10px 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  transition: all var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.primary-nav .sub-menu li:last-child a {
  border-bottom: none;
}

.primary-nav .sub-menu li a:hover {
  color: #ffffff;
  padding-left: 24px;
  background: rgba(255, 255, 255, 0.04);
}

/* Dropdown arrow for parent items */
.primary-nav > ul > li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
}

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-nav-text);
  margin: 5px 0;
  transition: var(--transition);
}

/* ========================================
   HERO POST (Latest post on homepage)
   ======================================== */

.hero-post {
  margin-bottom: 48px;
}

.hero-post a {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition);
}

.hero-post a:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.hero-post__image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.hero-post__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-post a:hover .hero-post__image img {
  transform: scale(1.03);
}

.hero-post__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
}

.hero-post__category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.hero-post__title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--color-text);
}

.hero-post__excerpt {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.hero-post__meta {
  font-size: 0.78rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

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

.section-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-card__link {
  display: block;
}

.post-card__image {
  aspect-ratio: 3/2;
  overflow: hidden;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.post-card__image--placeholder {
  background: linear-gradient(135deg, #e0e0e0, #c0c0c0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card__body {
  padding: 20px;
}

.post-card__category {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.post-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: 8px;
}

.post-card__meta {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ========================================
   ARCHIVE / CATEGORY HEADER
   ======================================== */

.archive-header {
  margin-bottom: 40px;
}

.archive-header__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.archive-header__title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.archive-header__description {
  margin-top: 8px;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

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

.single-hero {
  position: relative;
  width: 100%;
  max-height: 520px;
  overflow: hidden;
  background: var(--color-nav-bg);
}

.single-hero img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  opacity: 0.85;
}

.single-content {
  padding: 48px 0 64px;
}

.single-meta {
  margin-bottom: 32px;
}

.single-meta__category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.single-meta__category a {
  color: var(--color-accent);
  transition: color var(--transition);
}

.single-meta__category a:hover {
  color: var(--color-accent-hover);
}

.single-meta__title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.single-meta__date {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* Post content (the_content) */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #333;
}

.entry-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-top: 48px;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.entry-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.entry-content h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 10px;
}

.entry-content p {
  margin-bottom: 1.5em;
}

.entry-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry-content a:hover {
  color: var(--color-accent-hover);
}

.entry-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 4px 0 4px 24px;
  margin: 2em 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

.entry-content img {
  border-radius: var(--radius);
  margin: 2em 0;
}

.entry-content ul,
.entry-content ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

.entry-content li {
  margin-bottom: 0.5em;
}

.entry-content strong,
.entry-content b {
  font-weight: 700;
}

.entry-content em,
.entry-content i {
  font-style: italic;
}

/* ========================================
   POST NAVIGATION (prev/next)
   ======================================== */

.post-navigation {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.post-navigation__link {
  display: block;
  padding: 16px 0;
}

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

.post-navigation__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.post-navigation__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  transition: color var(--transition);
}

.post-navigation__link:hover .post-navigation__title {
  color: var(--color-accent);
}

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

.pagination {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: all var(--transition);
}

.pagination .page-numbers:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.pagination .page-numbers.current {
  background: var(--color-text);
  color: #ffffff;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.site-footer {
  background: var(--color-nav-bg);
  color: rgba(255, 255, 255, 0.5);
  padding: 32px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.footer-inner a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition);
}

.footer-inner a:hover {
  color: #ffffff;
}

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

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

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

  .hero-post__content {
    padding: 28px;
  }

  .hero-post__title {
    font-size: 1.5rem;
  }

  .single-meta__title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  /* Mobile nav */
  .nav-toggle {
    display: block;
  }

  .primary-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-nav-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .primary-nav ul {
    flex-direction: column;
  }

  .primary-nav > ul > li > a {
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .primary-nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border-top: none;
    background: rgba(255, 255, 255, 0.03);
  }

  .primary-nav .sub-menu li a {
    padding-left: 40px;
  }

  .site-main {
    padding: 32px 0;
  }

  .hero-post__content {
    padding: 24px;
  }

  .hero-post__title {
    font-size: 1.3rem;
  }
}

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

  .single-meta__title {
    font-size: 1.6rem;
  }

  .single-hero img {
    height: 300px;
  }

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

  .post-navigation__link--next {
    text-align: left;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ========================================
   WORDPRESS ADMIN BAR FIX
   ======================================== */

.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}
