/*
Theme Name: Dijon Marketing (Photo-First)
Theme URI: https://www.dijonmarketing.com
Author: Dijon Marketing
Author URI: https://www.dijonmarketing.com
Description: A high-performance, photograph-driven WordPress theme engineered specifically for Dijon Marketing. Features full custom logo & registered trademark support, permanent home links, CSS aspect-ratio locks, zero third-party plugin dependencies, seamless mobile rendering, and photo-first related articles carousel.
Version: 1.1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dijon-marketing
Tags: photo-first, blog, featured-images, clean, modern, custom-logo, related-posts, mobile-menu
*/

:root {
  --primary-color: #c58d19;
  --primary-dark: #a86f13;
  --dark-color: #0f172a;
  --text-main: #334155;
  --text-muted: #64748b;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --container-max: 1200px;
  --card-aspect: 16 / 9;
  --logo-height: 38px;
  --theme-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Minimalist CSS Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--theme-font);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}
a:hover {
  color: var(--primary-dark);
}

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

.site-container {
  width: 92%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}

/* Header & Logo Navigation */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  position: relative;
}

/* Brand Logo Container & Permanent Home Link */
.site-branding {
  display: flex;
  align-items: center;
}
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.custom-logo-link:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.site-logo {
  height: var(--logo-height);
  width: auto;
  max-width: 260px;
  object-fit: contain;
  display: block;
}

/* Desktop Navigation */
.site-navigation ul {
  display: flex;
  list-style: none;
  gap: 1.8rem;
  align-items: center;
  margin: 0;
  padding: 0;
}
.site-navigation a {
  font-weight: 600;
  font-size: 0.95rem;
  color: #475569;
  transition: color 0.2s ease;
}
.site-navigation a:hover {
  color: var(--primary-color);
}

/* ============================================================
   MOBILE NAVIGATION (Hamburger & Slide-Down Drawer)
   ============================================================ */
.menu-toggle-btn {
  display: none;
  background: none;
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--dark-color);
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.menu-toggle-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.menu-toggle-icon {
  width: 22px;
  height: 22px;
  display: block;
}

@media (max-width: 768px) {
  .header-inner {
    height: 64px;
  }
  .site-logo {
    height: calc(var(--logo-height) * 0.85);
    max-width: 190px;
  }

  /* Show mobile toggle */
  .menu-toggle-btn {
    display: inline-flex;
  }

  /* Transform navigation to mobile dropdown panel */
  .site-navigation {
    position: absolute;
    top: 64px;
    left: -4%;
    right: -4%;
    width: 108%;
    background: #ffffff;
    border-bottom: 2px solid #e2e8f0;
    box-shadow: 0 15px 25px -5px rgba(15, 23, 42, 0.12);
    display: none;
    padding: 1.25rem 1.5rem 1.5rem;
    animation: menuFadeIn 0.2s ease-out forwards;
  }

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

  .site-navigation ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }

  .site-navigation li {
    width: 100%;
    border-bottom: 1px solid #f1f5f9;
  }
  .site-navigation li:last-child {
    border-bottom: none;
  }

  .site-navigation a {
    display: block;
    width: 100%;
    padding: 0.85rem 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark-color);
  }
  .site-navigation a:hover {
    color: var(--primary-color);
    padding-left: 4px;
  }
}

@keyframes menuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   HERO FEATURED POST SHOWCASE (Latest Post Front & Center)
   ============================================================ */
.featured-hero-section {
  padding: 3rem 0 2rem;
}
.hero-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
@media (min-width: 900px) {
  .hero-card.split-style {
    grid-template-columns: 1.25fr 1fr;
  }
}
.hero-card:hover {
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
}

.hero-thumbnail-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}
.hero-thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-card:hover .hero-thumbnail-wrapper img {
  transform: scale(1.03);
}

.hero-content {
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}
.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--dark-color);
  margin-bottom: 0.9rem;
}
.hero-title a {
  color: var(--dark-color);
}
.hero-title a:hover {
  color: var(--primary-color);
}
.hero-excerpt {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================================
   PHOTO-FIRST CARD GRID (Aspect-Ratio Enforced)
   ============================================================ */
.section-divider-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 3rem 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}
.section-divider-title h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--dark-color);
  text-transform: uppercase;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 30px -10px rgba(15, 23, 42, 0.09);
}

/* Image container: NEVER warps or cuts off titles */
.post-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: var(--card-aspect);
  background: #0f172a;
  overflow: hidden;
}
.post-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.post-card:hover .post-card-thumb-wrap img {
  transform: scale(1.05);
}

.category-tag-pill {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  z-index: 2;
}

.post-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.post-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}
.post-title a {
  color: var(--dark-color);
}
.post-title a:hover {
  color: var(--primary-color);
}
.post-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  flex: 1;
}
.post-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.85rem;
}
.read-more-link {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ============================================================
   SINGLE POST IMMERSIVE HERO
   ============================================================ */
.single-post-hero {
  position: relative;
  width: 100%;
  max-height: 520px;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border-radius: 18px;
  margin: 2.5rem 0 2.5rem;
  box-shadow: 0 15px 35px -10px rgba(15, 23, 42, 0.15);
}
.single-post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.single-header {
  max-width: 860px;
  margin: 0 auto 2rem;
  text-align: center;
}
.single-header h1 {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--dark-color);
  margin-bottom: 1rem;
}
.single-article-body {
  max-width: 780px;
  margin: 0 auto 4rem;
  font-size: 1.15rem;
  line-height: 1.85;
  color: #334155;
}
.single-article-body p {
  margin-bottom: 1.8rem;
}
.single-article-body h2 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--dark-color);
  margin: 2.8rem 0 1rem;
}

/* Footer */
.site-footer {
  background: #0b1120;
  color: #94a3b8;
  padding: 3.5rem 0;
  margin-top: 5rem;
  border-top: 1px solid #1e293b;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* ============================================================
   RELATED ARTICLES PHOTO-CAROUSEL (Category Matched)
   ============================================================ */
.related-articles-section {
  margin: 5rem auto 3rem;
  padding-top: 3rem;
  border-top: 2px solid #e2e8f0;
  max-width: 1140px;
}
.related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.8rem;
}
.related-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--dark-color);
  text-transform: uppercase;
}
.carousel-nav-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.carousel-arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}
.carousel-arrow-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}
.related-carousel-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0.25rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.related-carousel-track::-webkit-scrollbar {
  height: 6px;
}
.related-carousel-track::-webkit-scrollbar-track {
  background: transparent;
}
.related-carousel-track::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
.related-carousel-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.related-carousel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 24px -6px rgba(15, 23, 42, 0.1);
}
.related-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: var(--card-aspect);
  background: #0f172a;
  overflow: hidden;
}
.related-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.related-carousel-card:hover .related-card-thumb-wrap img {
  transform: scale(1.05);
}
.related-card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.related-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.related-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}
.related-card-title a {
  color: var(--dark-color);
}
.related-card-title a:hover {
  color: var(--primary-color);
}
