/* ==========================================
   CSS Custom Properties (Design System)
   ========================================== */
:root {
  /* Brand Colors */
  --primary-color: #B39783;
  --secondary-color: #929392;
  --accent-color: #B39783;
  --text-dark: #545454;
  --text-light: #929392;
  --white: #ffffff;
  --off-white: #FAFAFA;
  --light-gray: #e8e8e8;
  --border-color: #d4d4d4;

  /* Typography */
  --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-heading: 'Georgia', serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
  --spacing-2xl: 6rem;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);

  /* Layout */
  --max-width: 1400px;
  --header-height: 90px;
}

/* ==========================================
   CSS Reset & Base Styles
   ========================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-primary);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--white);
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--secondary-color);
}

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

/* ==========================================
   Utility Classes
   ========================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-2xl) 0;
}

.section-sm {
  padding: var(--spacing-lg) 0;
}

.text-center {
  text-align: center;
}

.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.mt-sm {
  margin-top: var(--spacing-sm);
}

.mt-md {
  margin-top: var(--spacing-md);
}

.mt-lg {
  margin-top: var(--spacing-lg);
}

/* ==========================================
   Header & Navigation
   ========================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: box-shadow var(--transition-normal);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.logo:hover {
  color: var(--secondary-color);
}

.nav {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.nav-link {
  color: var(--text-dark);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--secondary-color);
  background-color: var(--light-gray);
}

.nav-link.active {
  color: var(--secondary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px;
  transition: all var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Contact CTA in Header */
.header-cta {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--accent-color);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ==========================================
   Hero Section
   ========================================== */
/* ==========================================
   Hero Section
   ========================================== */
.hero {
  margin-top: var(--header-height);
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  overflow: hidden;
}

@media (min-width: 1024px) {

  .hero,
  .advertise-hero,
  .yhr-pros-hero,
  .blog-hero {
    margin-top: calc(var(--nav-height) + 140px);
    /* Accommodate Brand Header (140px) + Nav */
  }
}

/* Override for blog hero - remove gradient to show background image */
.blog-hero::before {
  display: none !important;
}

/* Video Background */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 0;
  object-fit: cover;
}

/* Fallback gradient for browsers that don't support video or while loading */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--text-dark) 0%, var(--primary-color) 100%);
  z-index: 0;
}

/* Dark overlay for better text readability */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
  animation: fadeInUp 0.8s ease;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: var(--spacing-md);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.5rem);
  margin: auto;
  margin-bottom: var(--spacing-lg);
  opacity: 0.9;
  max-width: 800px;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: #a08570;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--light-gray);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.btn-outline:hover {
  background-color: var(--white);
  color: var(--primary-color);
}

.btn-lg {
  padding: 1.25rem 3rem;
  font-size: 1.125rem;
}

/* ==========================================
   Content Grid
   ========================================== */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ==========================================
   Cards
   ========================================== */
.card {
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background-color: var(--light-gray);
}

.card-content {
  padding: var(--spacing-md);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--primary-color);
}

.card-excerpt {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--accent-color);
  font-weight: 600;
  transition: gap var(--transition-fast);
}

.card-link:hover {
  gap: var(--spacing-sm);
}

/* ==========================================
   About Section / Publisher's Letter
   ========================================== */
.about-section {
  background: linear-gradient(135deg, #f5f1ed 0%, #e8dfd6 50%, #f5f1ed 100%);
  position: relative;
}

.about-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(179, 151, 131, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(146, 147, 146, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
}

.about-highlight {
  background-color: var(--white);
  padding: var(--spacing-lg);
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow-md);
}

/* Publisher's Letter Layout */
.publishers-letter-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-xl);
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.publishers-letter-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
  text-align: left;
  font-weight: 700;
}

.publishers-letter-sidebar {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: calc(var(--spacing-md) + 3rem);
}

.publisher-headshot {
  text-align: center;
  position: sticky;
  top: calc(var(--header-height) + var(--spacing-md));
}

.publisher-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--spacing-md);
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--white);
  transition: transform var(--transition-normal);
}

.publisher-image:hover {
  transform: scale(1.05);
}

.publisher-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.publisher-title {
  font-size: 1rem;
  color: var(--text-dark);
  font-style: italic;
  margin: 0;
}

/* Responsive adjustments for Publisher's Letter */
@media (max-width: 768px) {
  .publishers-letter-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .publishers-letter-sidebar {
    order: -1;
    /* Move photo to top on mobile */
    padding-top: 0;
  }

  .publisher-headshot {
    position: static;
  }

  .publisher-image {
    width: 150px;
    height: 150px;
  }

  .publishers-letter-title {
    text-align: center;
  }
}

/* ==========================================
   CTA Section
   ========================================== */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--text-dark) 100%);
  color: var(--white);
  text-align: center;
}

.cta-title {
  color: var(--white);
  margin-bottom: var(--spacing-md);
}

.cta-description {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.95;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
  color: var(--white);
  margin-bottom: var(--spacing-md);
  font-size: 1.25rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--spacing-xs);
}

.footer-section a:hover {
  color: var(--white);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--spacing-xs);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: var(--spacing-md);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* Footer Latest Issue */
.footer-latest-issue {
  text-align: center;
}

.footer-magazine-wrapper {
  max-width: 200px;
  margin: 0 auto;
}

.footer-magazine-loading {
  font-size: 0.9rem;
  opacity: 0.7;
  padding: 1rem;
}

.footer-magazine-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.footer-magazine-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 8.5 / 11;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  margin-bottom: var(--spacing-sm);
}

.footer-magazine-link:hover .footer-magazine-cover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.footer-magazine-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.footer-magazine-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.footer-magazine-link:hover .footer-magazine-overlay {
  opacity: 1;
}

.footer-magazine-overlay-text {
  color: white;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.75rem 1.5rem;
  border: 2px solid white;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.footer-magazine-title {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  transition: color 0.3s ease;
}

.footer-magazine-link:hover .footer-magazine-title {
  color: white;
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.6s ease;
}

.fade-in-up {
  animation: fadeInUp 0.8s ease;
}

/* Scroll reveal animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   Loading State
   ========================================== */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


/* ==========================================
   Media Kit Gate Form
   ========================================== */
.media-kit-gate-form-container {
  width: 100%;
  margin: 0 auto;
}

.media-kit-gate-form-container form {
  width: 100%;
}

.media-kit-gate-form-container .input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: 9999px;
  /* Pill shape */
  padding: 6px;
  box-shadow: var(--shadow-md);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.media-kit-gate-form-container .input-group:focus-within {
  box-shadow: var(--shadow-lg);
  border-color: rgba(179, 151, 131, 0.3);
}

.media-kit-gate-form-container input[type="email"] {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  color: var(--text-dark);
  outline: none;
  width: 100%;
}

.media-kit-gate-form-container button[type="submit"] {
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.media-kit-gate-form-container button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.media-kit-gate-form-container button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Responsive adjustments for Media Kit Gate Form */
@media (max-width: 768px) {
  .media-kit-gate-form-container .input-group {
    flex-direction: column;
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    gap: 1rem;
    border-radius: 0;
  }

  .media-kit-gate-form-container input[type="email"] {
    background: var(--white);
    border-radius: 50px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    width: 100%;
  }

  .media-kit-gate-form-container input[type="email"]:focus {
    box-shadow: var(--shadow-lg);
  }

  .media-kit-gate-form-container button[type="submit"] {
    width: 100%;
    padding: 1rem 1.5rem;
    margin-top: 0.5rem;
  }
}