/**
 * RAMIREZ ADVENTURES — EDITORIAL ENGINE PREMIUM STYLES
 * Scoped strictly to editorial posts (.ra-editorial-*)
 * Mobile-First, Accessible, Zero Conflicts
 */

/* ==========================================================================
   1. CSS VARIABLES & BASE RESET
   ========================================================================== */
:root {
  --ra-navy: #102744;
  --ra-deep-blue: #092A3D;
  --ra-teal: #00858B;
  --ra-teal-dark: #006E7B;
  --ra-teal-light: #E6F4F5;
  --ra-orange: #F58025;
  --ra-bg-soft: #F6FAFC;
  --ra-white: #FFFFFF;
  --ra-text-main: #1E293B;
  --ra-text-muted: #475569;
  --ra-text-light: #94A3B8;
  --ra-border: #E2E8F0;
  --ra-radius-sm: 8px;
  --ra-radius-md: 14px;
  --ra-radius-lg: 20px;
  --ra-radius-xl: 28px;
  --ra-shadow-sm: 0 4px 12px rgba(16, 39, 68, 0.04);
  --ra-shadow-md: 0 10px 25px rgba(16, 39, 68, 0.08);
  --ra-shadow-lg: 0 18px 40px rgba(16, 39, 68, 0.12);
  --ra-font-heading: 'Oswald', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ra-font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ra-font-script: 'Caveat', 'Dancing Script', cursive;
}

.ra-editorial-content-wrapper {
  font-family: var(--ra-font-body);
  color: var(--ra-text-main);
  line-height: 1.75;
  font-size: 17px;
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
  background-color: transparent;
}

/* Palm Fronds Background Watermark */
.ra-editorial-content-wrapper::before {
  content: "";
  position: absolute;
  top: 60px;
  left: -80px;
  width: 320px;
  height: 480px;
  background-image: radial-gradient(circle, rgba(0, 133, 139, 0.04) 10%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Standard Editorial Article Typography (Harmonious fallback for all content) */
.ra-editorial-content-wrapper h1,
.ra-editorial-content-wrapper h2,
.ra-editorial-content-wrapper h3,
.ra-editorial-content-wrapper h4,
.ra-editorial-body-content h1,
.ra-editorial-body-content h2,
.ra-editorial-body-content h3,
.ra-editorial-body-content h4 {
  font-family: var(--ra-font-heading);
  color: var(--ra-navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 44px;
  margin-bottom: 18px;
  line-height: 1.25;
}

.ra-editorial-content-wrapper h2,
.ra-editorial-body-content h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  position: relative;
  padding-bottom: 12px;
}

.ra-editorial-content-wrapper h2::after,
.ra-editorial-body-content h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--ra-teal);
  border-radius: 2px;
}

.ra-editorial-content-wrapper h3,
.ra-editorial-body-content h3 {
  font-size: clamp(20px, 2.4vw, 26px);
}

.ra-editorial-content-wrapper h4,
.ra-editorial-body-content h4 {
  font-size: clamp(17px, 1.8vw, 20px);
}

.ra-editorial-content-wrapper p,
.ra-editorial-body-content p {
  font-family: var(--ra-font-body);
  font-size: 17px;
  line-height: 1.8;
  color: var(--ra-text-main);
  margin-bottom: 22px;
}

.ra-editorial-content-wrapper a,
.ra-editorial-body-content a {
  color: var(--ra-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.ra-editorial-content-wrapper a:hover,
.ra-editorial-body-content a:hover {
  color: var(--ra-orange);
}

.ra-editorial-content-wrapper ul,
.ra-editorial-content-wrapper ol,
.ra-editorial-body-content ul,
.ra-editorial-body-content ol {
  margin: 0 0 24px 24px;
  padding: 0;
  color: var(--ra-text-main);
  line-height: 1.75;
}

.ra-editorial-content-wrapper li,
.ra-editorial-body-content li {
  margin-bottom: 10px;
}

.ra-editorial-content-wrapper blockquote,
.ra-editorial-body-content blockquote {
  border-left: 4px solid var(--ra-teal);
  background: var(--ra-bg-soft);
  padding: 24px 32px;
  margin: 36px 0;
  border-radius: 0 var(--ra-radius-md) var(--ra-radius-md) 0;
  font-style: italic;
  color: var(--ra-navy);
  font-size: 18px;
  line-height: 1.7;
}

.ra-editorial-content-wrapper img,
.ra-editorial-body-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ra-radius-md);
  box-shadow: var(--ra-shadow-md);
  margin: 24px 0;
}

.ra-editorial-content-wrapper figure,
.ra-editorial-body-content figure {
  margin: 28px 0;
}

.ra-editorial-content-wrapper figcaption,
.ra-editorial-body-content figcaption {
  font-family: var(--ra-font-body);
  font-size: 13px;
  color: var(--ra-text-muted);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

/* ==========================================================================
   2. HERO EDITORIAL (CINEMATOGRAPHIC)
   ========================================================================== */
.ra-editorial-hero {
  position: relative;
  min-height: 560px;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--ra-navy);
  background-image: linear-gradient(135deg, #092A3D 0%, #00858B 100%);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  margin-bottom: 50px;
}

.ra-editorial-hero::before,
.ra-editorial-hero-overlay {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(246, 250, 252, 0.96) 0%, rgba(246, 250, 252, 0.90) 45%, rgba(246, 250, 252, 0.25) 85%, rgba(246, 250, 252, 0.08) 100%);
  z-index: 1;
  pointer-events: none;
}

.ra-editorial-hero-container {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 80px 24px;
  width: 100%;
}

.ra-editorial-hero-content {
  max-width: 620px;
}

.ra-editorial-eyebrow {
  display: inline-block;
  font-family: var(--ra-font-heading);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--ra-teal);
  margin-bottom: 14px;
}

.ra-editorial-hero-title {
  font-family: var(--ra-font-heading);
  font-size: clamp(38px, 5.2vw, 64px);
  font-weight: 700;
  line-height: 1.08;
  text-transform: uppercase;
  color: var(--ra-navy);
  margin: 0 0 18px 0;
  letter-spacing: 0.5px;
}

.ra-editorial-hero-excerpt {
  font-family: var(--ra-font-body);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.68;
  color: #334155;
  margin: 0 0 24px 0;
}

.ra-editorial-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--ra-text-muted);
  font-weight: 500;
}

.ra-editorial-hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ra-editorial-hero .ra-editorial-hero-credit {
  margin: 14px 0 0;
  font-size: 10.5px;
  color: #66768a;
}

.ra-editorial-hero .ra-editorial-hero-credit a { color: #526579; }

/* ==========================================================================
   3. SECTION 1: TWO-COLUMN EDITORIAL INTRO + TRAVEL COLLAGE
   ========================================================================== */
.ra-editorial-intro {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
  margin: 60px 0 80px 0;
  position: relative;
  z-index: 1;
}

.ra-editorial-intro-text h2 {
  font-family: var(--ra-font-heading);
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ra-navy);
  line-height: 1.15;
  margin: 0 0 22px 0;
  letter-spacing: 0.5px;
}

.ra-editorial-intro-text p {
  font-size: 16.5px;
  line-height: 1.75;
  color: #334155;
  margin-bottom: 18px;
}

.ra-editorial-intro-text p strong {
  color: var(--ra-navy);
  font-weight: 700;
}

/* Travel Photo Collage */
.ra-editorial-collage {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
  position: relative;
  padding: 10px;
}

.ra-editorial-collage-main {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  position: relative;
}

.ra-editorial-collage-main img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--ra-radius-lg);
  box-shadow: var(--ra-shadow-lg);
  border: 4px solid var(--ra-white);
  display: block;
  margin: 0;
}

.ra-editorial-collage-sub-1 img,
.ra-editorial-collage-sub-2 img {
  width: 100%;
  height: 165px;
  object-fit: cover;
  border-radius: var(--ra-radius-md);
  box-shadow: var(--ra-shadow-md);
  border: 3px solid var(--ra-white);
  display: block;
  margin: 0;
}

.ra-editorial-collage .ra-editorial-collage-credit {
  margin: 0;
  padding: 6px 6px 0;
  font-size: 10.5px;
  line-height: 1.35;
  color: #7b8797;
}

/* Signature Script Badge */
.ra-editorial-badge {
  position: absolute;
  bottom: -24px;
  right: -20px;
  background: var(--ra-white);
  border-radius: var(--ra-radius-lg);
  padding: 22px 28px;
  box-shadow: 0 16px 36px rgba(16, 39, 68, 0.14);
  border: 1px solid rgba(0, 133, 139, 0.15);
  text-align: center;
  z-index: 3;
  backdrop-filter: blur(8px);
}

.ra-editorial-badge-icon {
  width: 38px;
  height: 38px;
  margin: 0 auto 8px auto;
  color: var(--ra-teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ra-editorial-badge-icon svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.ra-editorial-badge-title {
  font-family: var(--ra-font-script);
  font-size: 34px;
  line-height: 1.1;
  color: var(--ra-teal);
  margin: 0;
  font-weight: 700;
}

.ra-editorial-badge-sub {
  font-family: var(--ra-font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--ra-navy);
  margin-top: 6px;
}

/* ==========================================================================
   4. SECTION 2: 4-COLUMN FEATURE & BENEFIT CARDS
   ========================================================================== */
.ra-editorial-section {
  margin: 80px 0;
}

.ra-editorial-section-header {
  margin-bottom: 34px;
}

.ra-editorial-section-header h2 {
  font-family: var(--ra-font-heading);
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ra-navy);
  line-height: 1.2;
  margin: 0 0 12px 0;
  letter-spacing: 0.5px;
}

.ra-editorial-section-header p {
  font-size: 16px;
  color: var(--ra-text-muted);
  max-width: 780px;
  margin: 0;
}

.ra-editorial-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.ra-editorial-card {
  background: var(--ra-white);
  border-radius: var(--ra-radius-lg);
  border: 1px solid var(--ra-border);
  box-shadow: var(--ra-shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.ra-editorial-card-content {
  padding: 24px 20px 18px 20px;
}

.ra-editorial-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.ra-editorial-card-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: var(--ra-teal);
  color: var(--ra-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ra-editorial-card-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.ra-editorial-card-title {
  font-family: var(--ra-font-heading);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.25;
  color: var(--ra-navy);
  letter-spacing: 0.5px;
}

.ra-editorial-card-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

.ra-editorial-content-wrapper .ra-editorial-card-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

.ra-editorial-card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  border-radius: 0;
  margin: 0;
  box-shadow: none;
}

.ra-editorial-content-wrapper .ra-editorial-card-image {
  height: 160px;
  border-radius: 0;
  margin: 0;
  box-shadow: none;
}

/* ==========================================================================
   5. SECTION 3: PRACTICAL TIPS & DRIVING GUIDES
   ========================================================================== */
.ra-editorial-tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ra-editorial-tip-card {
  background: var(--ra-white);
  border-radius: var(--ra-radius-lg);
  border: 1px solid var(--ra-border);
  box-shadow: var(--ra-shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.ra-editorial-tip-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--ra-shadow-md);
}

.ra-editorial-tip-top {
  padding: 22px 22px 14px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.ra-editorial-tip-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: var(--ra-navy);
  color: var(--ra-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ra-editorial-tip-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.ra-editorial-tip-title {
  font-family: var(--ra-font-heading);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ra-navy);
  letter-spacing: 0.5px;
}

.ra-editorial-tip-body {
  padding: 0 22px 18px 22px;
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
  flex-grow: 1;
}

.ra-editorial-content-wrapper .ra-editorial-tip-body p {
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

.ra-editorial-tip-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  margin: 0;
  box-shadow: none;
}

.ra-editorial-content-wrapper .ra-editorial-tip-image {
  height: 150px;
  border-radius: 0;
  margin: 0;
  box-shadow: none;
}

.ra-editorial-card-media {
  margin-top: auto;
  background: var(--ra-white);
}

.ra-editorial-card-media .ra-editorial-card-credit {
  margin: 0;
  padding: 7px 12px 9px;
  font-size: 10.5px;
  line-height: 1.35;
  color: #7b8797;
  background: var(--ra-white);
}

/* ==========================================================================
   6. SECTION 4: HIGH-CONVERTING COMMERCIAL CTA
   ========================================================================== */
.ra-editorial-cta {
  background: linear-gradient(135deg, var(--ra-navy) 0%, #083c53 50%, var(--ra-teal) 100%);
  border-radius: var(--ra-radius-xl);
  padding: 56px 48px;
  color: var(--ra-white);
  margin: 80px 0 40px 0;
  box-shadow: var(--ra-shadow-lg);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.ra-editorial-cta::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.ra-editorial-cta-kicker {
  font-family: var(--ra-font-heading);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: #ffd880;
  margin-bottom: 12px;
}

.ra-editorial-cta-title {
  font-family: var(--ra-font-heading);
  font-size: clamp(30px, 3.5vw, 46px);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ra-white);
  line-height: 1.15;
  margin: 0 0 16px 0;
}

.ra-editorial-content-wrapper .ra-editorial-cta-title {
  color: var(--ra-white);
  padding-bottom: 0;
}

.ra-editorial-content-wrapper .ra-editorial-cta-title::after { display: none; }

.ra-editorial-cta-desc {
  font-size: 17px;
  line-height: 1.65;
  color: #E2E8F0;
  max-width: 680px;
  margin: 0 auto 32px auto;
}

.ra-editorial-content-wrapper .ra-editorial-cta-desc { color: #E2E8F0; }

.ra-editorial-cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 28px;
}

.ra-editorial-btn-primary {
  background: var(--ra-orange);
  color: var(--ra-white) !important;
  font-family: var(--ra-font-heading);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 36px;
  border-radius: 30px;
  text-decoration: none !important;
  box-shadow: 0 6px 18px rgba(245, 128, 37, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-block;
}

.ra-editorial-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(245, 128, 37, 0.45);
}

.ra-editorial-btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ra-white) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  font-family: var(--ra-font-heading);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 32px;
  border-radius: 30px;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.2s ease;
  display: inline-block;
  backdrop-filter: blur(4px);
}

.ra-editorial-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.ra-editorial-cta-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 13px;
  color: #CBD5E1;
}

.ra-editorial-cta-badges span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   7. IMAGE CREDITS & ATTRIBUTION (SECTION 5 COMPLIANCE)
   ========================================================================== */
.ra-editorial-credit {
  font-family: var(--ra-font-body);
  font-size: 11px;
  color: var(--ra-text-light);
  line-height: 1.4;
  margin-top: 6px;
  margin-bottom: 16px;
  text-align: left;
  font-style: normal;
  display: block;
}

.ra-editorial-credit a {
  color: var(--ra-text-muted);
  text-decoration: underline;
  transition: color 0.2s;
}

.ra-editorial-credit a:hover {
  color: var(--ra-teal);
}

/* ==========================================================================
   8. RESPONSIVE MEDIA QUERIES (DESKTOP, TABLET, MOBILE)
   ========================================================================== */
@media (max-width: 1024px) {
  .ra-editorial-hero {
    min-height: 500px;
  }
  .ra-editorial-intro {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .ra-editorial-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .ra-editorial-tips-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .ra-editorial-hero {
    min-height: 400px;
    margin-bottom: 24px;
  }
  .ra-editorial-hero-overlay {
    background: linear-gradient(180deg, rgba(246, 250, 252, 0.96) 0%, rgba(246, 250, 252, 0.90) 70%, rgba(246, 250, 252, 0.7) 100%);
  }
  .ra-editorial-hero-container {
    padding: 40px 18px;
  }
  .ra-editorial-hero-title {
    font-size: 30px;
  }
  .ra-editorial-intro {
    margin: 20px 0 36px 0;
  }
  .ra-editorial-intro-text h2 {
    font-size: 24px;
  }
  .ra-editorial-collage {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ra-editorial-collage-main img {
    min-height: 0;
    height: 220px;
    max-height: 220px;
  }
  .ra-editorial-collage-sub-1 img,
  .ra-editorial-collage-sub-2 img {
    height: 140px;
  }
  .ra-editorial-badge {
    position: static;
    margin-top: 14px;
    padding: 14px 18px;
  }
  .ra-editorial-cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .ra-editorial-tips-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .ra-editorial-cta {
    padding: 40px 20px;
    border-radius: var(--ra-radius-lg);
  }
  .ra-editorial-cta-title {
    font-size: 26px;
  }
  .ra-editorial-cta-buttons {
    flex-direction: column;
    width: 100%;
  }
  .ra-editorial-btn-primary,
  .ra-editorial-btn-secondary {
    width: 100%;
    text-align: center;
  }
}
