/*
Theme Name: RoadFlex Content Hub
Theme URI: https://roadflex.com
Author: RoadFlex
Author URI: https://roadflex.com
Description: A branded content hub for RoadFlex featuring Blogs, Videos, Case Studies, and Podcast.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: roadflex-hub
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --rf-navy:      #0a0f1e;
  --rf-charcoal:  #141929;
  --rf-card:      #1a2035;
  --rf-border:    #252d45;
  --rf-orange:    #f97316;
  --rf-orange-h:  #ea6a0a;
  --rf-white:     #ffffff;
  --rf-muted:     #8b95b0;
  --rf-light:     #c8d0e7;
  --rf-radius:    10px;
  --rf-radius-lg: 16px;
  --rf-shadow:    0 4px 24px rgba(0,0,0,0.35);
  --rf-font:      'Inter', 'Segoe UI', system-ui, sans-serif;
  --rf-transition: 0.2s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--rf-font);
  background: var(--rf-navy);
  color: var(--rf-white);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--rf-orange); text-decoration: none; transition: color var(--rf-transition); }
a:hover { color: var(--rf-orange-h); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--rf-white);
}

p { color: var(--rf-light); margin-bottom: 1rem; }

ul { list-style: none; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.rf-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.rf-section {
  padding: 80px 0;
}

.rf-section--alt {
  background: var(--rf-charcoal);
}

.rf-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.rf-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.rf-flex { display: flex; align-items: center; }
.rf-flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ============================================================
   BUTTONS
   ============================================================ */
.rf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--rf-radius);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all var(--rf-transition);
  text-decoration: none;
}

.rf-btn--primary {
  background: var(--rf-orange);
  color: #fff;
}
.rf-btn--primary:hover {
  background: var(--rf-orange-h);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(249,115,22,0.35);
}

.rf-btn--outline {
  background: transparent;
  color: var(--rf-white);
  border: 1px solid var(--rf-border);
}
.rf-btn--outline:hover {
  border-color: var(--rf-orange);
  color: var(--rf-orange);
}

.rf-btn--sm {
  padding: 8px 18px;
  font-size: 13px;
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.rf-section-header {
  margin-bottom: 48px;
}

.rf-section-header--center {
  text-align: center;
}

.rf-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rf-orange);
  margin-bottom: 12px;
}

.rf-section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 16px;
}

.rf-section-header p {
  font-size: 17px;
  color: var(--rf-muted);
  max-width: 560px;
}

.rf-section-header--center p {
  margin: 0 auto;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
#rf-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10,15,30,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rf-border);
}

.rf-nav {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rf-logo img {
  height: 32px;
  width: auto;
}

.rf-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--rf-white);
  letter-spacing: -0.5px;
}

.rf-logo-text span { color: var(--rf-orange); }

.rf-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rf-nav-links a {
  color: var(--rf-light);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all var(--rf-transition);
}

.rf-nav-links a:hover,
.rf-nav-links a.active {
  color: var(--rf-white);
  background: var(--rf-card);
}

.rf-nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Mobile menu toggle */
.rf-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.rf-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--rf-white);
  border-radius: 2px;
  transition: all var(--rf-transition);
}

/* ============================================================
   HERO
   ============================================================ */
.rf-hero {
  padding: 100px 0 80px;
  background: var(--rf-navy);
  position: relative;
  overflow: hidden;
}

.rf-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249,115,22,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.rf-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.rf-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(249,115,22,0.12);
  border: 1px solid rgba(249,115,22,0.3);
  color: var(--rf-orange);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.rf-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.1;
  margin-bottom: 20px;
}

.rf-hero h1 span { color: var(--rf-orange); }

.rf-hero p {
  font-size: 18px;
  color: var(--rf-muted);
  margin-bottom: 36px;
  max-width: 480px;
}

.rf-hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.rf-hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.rf-hero-card {
  background: var(--rf-card);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-radius-lg);
  padding: 20px;
  transition: transform var(--rf-transition);
}

.rf-hero-card:hover { transform: translateY(-4px); }

.rf-hero-card--wide {
  grid-column: span 2;
}

.rf-hero-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(249,115,22,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 18px;
}

.rf-hero-card h4 {
  font-size: 15px;
  margin-bottom: 4px;
}

.rf-hero-card p {
  font-size: 13px;
  color: var(--rf-muted);
  margin: 0;
}

/* ============================================================
   CONTENT CARDS
   ============================================================ */
.rf-card {
  background: var(--rf-card);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-radius-lg);
  overflow: hidden;
  transition: all var(--rf-transition);
  display: flex;
  flex-direction: column;
}

.rf-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249,115,22,0.3);
  box-shadow: var(--rf-shadow);
}

.rf-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--rf-charcoal);
}

.rf-card-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--rf-charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--rf-border);
}

.rf-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.rf-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.rf-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(249,115,22,0.15);
  color: var(--rf-orange);
}

.rf-tag--video { background: rgba(99,102,241,0.15); color: #818cf8; }
.rf-tag--written { background: rgba(34,197,94,0.15); color: #4ade80; }
.rf-tag--podcast { background: rgba(168,85,247,0.15); color: #c084fc; }

.rf-card-date {
  font-size: 12px;
  color: var(--rf-muted);
}

.rf-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.rf-card h3 a { color: var(--rf-white); }
.rf-card h3 a:hover { color: var(--rf-orange); }

.rf-card p {
  font-size: 14px;
  color: var(--rf-muted);
  flex: 1;
  margin-bottom: 20px;
}

.rf-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--rf-border);
}

.rf-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--rf-muted);
}

.rf-card-author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* ============================================================
   VIDEO CARD (embed)
   ============================================================ */
.rf-video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.rf-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.rf-video-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: pointer;
}

.rf-video-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.rf-video-thumb-wrap:hover img { transform: scale(1.04); }

.rf-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
}

.rf-play-btn svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  transition: transform var(--rf-transition);
}

.rf-video-thumb-wrap:hover .rf-play-btn svg { transform: scale(1.1); }

/* ============================================================
   CASE STUDY CARD
   ============================================================ */
.rf-cs-card {
  background: var(--rf-card);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-radius-lg);
  overflow: hidden;
  transition: all var(--rf-transition);
  display: flex;
  flex-direction: column;
}

.rf-cs-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249,115,22,0.3);
  box-shadow: var(--rf-shadow);
}

.rf-cs-industry {
  font-size: 12px;
  font-weight: 600;
  color: var(--rf-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rf-cs-company {
  font-size: 20px;
  font-weight: 700;
  margin: 6px 0 10px;
}

.rf-cs-stat {
  display: flex;
  gap: 24px;
  padding: 16px 24px;
  background: rgba(249,115,22,0.06);
  border-top: 1px solid var(--rf-border);
}

.rf-cs-stat-item {
  display: flex;
  flex-direction: column;
}

.rf-cs-stat-item strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--rf-orange);
}

.rf-cs-stat-item span {
  font-size: 12px;
  color: var(--rf-muted);
}

/* ============================================================
   PODCAST PAGE
   ============================================================ */
.rf-podcast-platforms {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.rf-platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--rf-card);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-radius);
  color: var(--rf-white);
  font-weight: 600;
  font-size: 14px;
  transition: all var(--rf-transition);
  text-decoration: none;
}

.rf-platform-btn:hover {
  border-color: var(--rf-orange);
  color: var(--rf-orange);
  transform: translateY(-2px);
}

.rf-platform-btn svg,
.rf-platform-btn img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.rf-podcast-episodes {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rf-episode-card {
  background: var(--rf-card);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-radius-lg);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all var(--rf-transition);
}

.rf-episode-card:hover {
  border-color: rgba(249,115,22,0.3);
  transform: translateX(4px);
}

.rf-episode-art {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--rf-charcoal);
}

.rf-episode-content { flex: 1; }

.rf-episode-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.rf-episode-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--rf-orange);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rf-episode-date,
.rf-episode-duration {
  font-size: 12px;
  color: var(--rf-muted);
}

.rf-episode-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--rf-white);
  margin-bottom: 8px;
  line-height: 1.3;
}

.rf-episode-desc {
  font-size: 14px;
  color: var(--rf-muted);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rf-episode-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rf-podcast-loading,
.rf-podcast-error {
  text-align: center;
  padding: 60px 24px;
  color: var(--rf-muted);
}

.rf-podcast-error { color: #f87171; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.rf-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.rf-filter-btn {
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--rf-border);
  background: transparent;
  color: var(--rf-muted);
  transition: all var(--rf-transition);
}

.rf-filter-btn:hover,
.rf-filter-btn.active {
  background: var(--rf-orange);
  border-color: var(--rf-orange);
  color: #fff;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.rf-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 60px;
}

.rf-pagination a,
.rf-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--rf-border);
  color: var(--rf-muted);
  transition: all var(--rf-transition);
}

.rf-pagination a:hover,
.rf-pagination .current {
  background: var(--rf-orange);
  border-color: var(--rf-orange);
  color: #fff;
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.rf-single-hero {
  padding: 60px 0 0;
  background: var(--rf-charcoal);
  border-bottom: 1px solid var(--rf-border);
}

.rf-single-hero-content {
  max-width: 800px;
  padding-bottom: 48px;
}

.rf-single-hero h1 {
  font-size: clamp(28px, 4vw, 46px);
  margin-bottom: 20px;
}

.rf-single-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--rf-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.rf-single-featured {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--rf-radius-lg);
  margin-top: -1px;
}

.rf-single-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
}

.rf-single-content h2,
.rf-single-content h3,
.rf-single-content h4 {
  margin: 2rem 0 1rem;
}

.rf-single-content p { margin-bottom: 1.25rem; }

.rf-single-content ul,
.rf-single-content ol {
  list-style: initial;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--rf-light);
}

.rf-single-content blockquote {
  border-left: 3px solid var(--rf-orange);
  padding-left: 20px;
  margin: 2rem 0;
  font-size: 18px;
  font-style: italic;
  color: var(--rf-light);
}

/* ============================================================
   FOOTER
   ============================================================ */
#rf-footer {
  background: var(--rf-charcoal);
  border-top: 1px solid var(--rf-border);
  padding: 60px 0 30px;
}

.rf-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.rf-footer-brand p {
  font-size: 14px;
  color: var(--rf-muted);
  margin-top: 16px;
  max-width: 280px;
}

.rf-footer-col h5 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rf-muted);
  margin-bottom: 16px;
}

.rf-footer-col ul li {
  margin-bottom: 10px;
}

.rf-footer-col ul li a {
  font-size: 14px;
  color: var(--rf-light);
}

.rf-footer-col ul li a:hover { color: var(--rf-orange); }

.rf-footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--rf-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.rf-footer-bottom p {
  font-size: 13px;
  color: var(--rf-muted);
  margin: 0;
}

/* ============================================================
   SEARCH BAR
   ============================================================ */
.rf-search-form {
  position: relative;
  max-width: 480px;
  margin-bottom: 40px;
}

.rf-search-form input {
  width: 100%;
  padding: 14px 48px 14px 20px;
  background: var(--rf-card);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-radius);
  color: var(--rf-white);
  font-size: 15px;
  outline: none;
  transition: border-color var(--rf-transition);
}

.rf-search-form input::placeholder { color: var(--rf-muted); }

.rf-search-form input:focus { border-color: var(--rf-orange); }

.rf-search-form button {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--rf-muted);
  cursor: pointer;
  font-size: 18px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.rf-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--rf-muted);
}

.rf-empty-icon { font-size: 48px; margin-bottom: 16px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .rf-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .rf-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .rf-hero-inner { grid-template-columns: 1fr; }
  .rf-hero-visual { display: none; }
}

@media (max-width: 768px) {
  .rf-grid-3,
  .rf-grid-2 { grid-template-columns: 1fr; }

  .rf-nav-links,
  .rf-nav-cta { display: none; }

  .rf-menu-toggle { display: flex; }

  .rf-nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--rf-navy);
    padding: 24px;
    gap: 4px;
    overflow-y: auto;
    z-index: 999;
  }

  .rf-nav-links.open a {
    font-size: 17px;
    padding: 14px 16px;
  }

  .rf-footer-grid { grid-template-columns: 1fr; gap: 28px; }

  .rf-episode-card { flex-direction: column; }
  .rf-episode-art { width: 64px; height: 64px; }

  .rf-podcast-platforms { gap: 10px; }

  .rf-cs-stat { gap: 16px; }
}