/* ================================================================
   Vivo de Viajes — Sistema de diseño
   Basado en el diseño real de vivodeviajes.com
   Fuente: Jost (Google Fonts)
   Paleta: Coral #E22658 · Oscuro #1C252C · Vino #27040E · Gris #545454
   ================================================================ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --color-primary:    #E22658;
  --color-primary-dk: #C01A46;
  --color-primary-lt: rgba(226, 38, 88, 0.08);
  --color-dark:       #27040E;
  --color-dark-mid:   #3D0A1C;
  --color-text:       #1C252C;
  --color-body:       #545454;
  --color-muted:      #888;
  --color-subtle:     #aaa;
  --color-bg:         #ffffff;
  --color-bg-light:   #f8f8f8;
  --color-bg-alt:     #fafafa;
  --color-border:     #eeeeee;
  --color-border-md:  rgba(0,0,0,0.12);

  --font-main:   'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-title:  'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:   'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --header-height: 72px;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  24px;

  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,.09);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.13);

  --container-width: 1140px;
  --container-narrow: 760px;
}

/* ── Google Fonts cargadas vía header.php ───────────────────────── */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-main);
  font-size: 18px;
  line-height: 1.65;
  color: var(--color-body);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* ── Tipografía ─────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--color-text);
  line-height: 1.15;
  font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { line-height: 1.75; }

/* ── Layout ────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 28px;
}

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

/* ── Header ─────────────────────────────────────────────────────── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow .3s;
}

#header.scrolled {
  box-shadow: 0 2px 16px rgba(0,0,0,.1);
}

/* Header transparente sobre hero de imagen */
#header.header-transparent {
  background: transparent;
  border-bottom-color: transparent;
}

#header.header-transparent.scrolled {
  background: var(--color-bg);
  border-bottom-color: var(--color-border);
}

#header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.header-logo img {
  height: 40px;
  width: auto;
}

.header-logo-text {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-logo-text strong {
  color: var(--color-primary);
  font-weight: 600;
}

/* Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: flex-end;
}

.nav-item { position: relative; }

.nav-link {
  display: block;
  padding: 8px 14px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: color .2s;
  white-space: nowrap;
  text-decoration: none;
}

.nav-link:hover { color: var(--color-primary); }
.nav-link.active { color: var(--color-primary); font-weight: 500; }

/* Header transparente: links blancos */
#header.header-transparent .nav-link { color: rgba(255,255,255,.9); }
#header.header-transparent .nav-link:hover { color: #fff; }
#header.header-transparent.scrolled .nav-link { color: var(--color-text); }
#header.header-transparent.scrolled .nav-link:hover { color: var(--color-primary); }

/* CTA botón en nav */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  background: var(--color-primary);
  color: #fff !important;
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: var(--radius-sm);
  transition: background .2s;
  white-space: nowrap;
  margin-left: 10px;
  text-decoration: none;
}

.nav-cta:hover { background: var(--color-primary-dk); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Header transparente: toggle blanco */
#header.header-transparent .nav-toggle span { background: #fff; }
#header.header-transparent.scrolled .nav-toggle span { background: var(--color-text); }

/* Dropdown */
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  z-index: 100;
}

.nav-item:hover .dropdown-menu { display: block; }

.dropdown-menu a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--color-text);
  transition: background .15s, color .15s;
  text-decoration: none;
}

.dropdown-menu a:hover { background: var(--color-bg-light); color: var(--color-primary); }

/* WhatsApp flotante */
.whatsapp-btn {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 999;
  width: 52px; height: 52px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 24px;
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
  transition: transform .2s;
  text-decoration: none;
}
.whatsapp-btn:hover { transform: scale(1.08); }

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 84px; right: 24px;
  z-index: 998;
  width: 40px; height: 40px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: none;
  align-items: center; justify-content: center;
  color: var(--color-text); font-size: 14px;
  box-shadow: var(--shadow-sm);
  transition: background .2s, color .2s;
  text-decoration: none;
}
.back-to-top.show { display: flex; }
.back-to-top:hover { background: var(--color-primary); color: #fff; border-color: transparent; }

/* ── Sections ──────────────────────────────────────────────────── */
.section     { padding: 72px 0; background: var(--color-bg); }
.section-alt { padding: 72px 0; background: var(--color-bg-alt); }
.section-dark { padding: 72px 0; background: var(--color-dark); }

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-label-center { display: block; text-align: center; }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 14px;
  line-height: 1.2;
}

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

.section-sub {
  font-size: 17px;
  color: var(--color-body);
  max-width: 580px;
  line-height: 1.75;
}

.section-sub-center {
  text-align: center;
  margin: 0 auto 48px;
}

/* ── Botones ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  border: 1.5px solid transparent;
  text-decoration: none;
  line-height: 1;
}

.btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-primary:hover { background: var(--color-primary-dk); border-color: var(--color-primary-dk); }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }

.btn-dark {
  background: var(--color-dark);
  color: #fff;
  border-color: var(--color-dark);
}
.btn-dark:hover { background: var(--color-dark-mid); }

.btn-white {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
}
.btn-white:hover { background: rgba(255,255,255,.9); }

.btn-full { display: flex; width: 100%; justify-content: center; }

.btn-lg { padding: 14px 36px; font-size: 15px; }
.btn-sm { padding: 8px 18px; font-size: 12px; }

/* ── Hero de página ─────────────────────────────────────────────── */
.page-hero {
  margin-top: var(--header-height);
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-dark);
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .45;
}

.page-hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 64px 0;
}

/* Hero de home — sin margin-top (header transparente) */
.home-hero {
  min-height: 100vh;
  margin-top: 0;
  display: flex;
  align-items: center;
}

/* ── Breadcrumb ─────────────────────────────────────────────────── */
.breadcrumb {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb a { color: rgba(255,255,255,.6); transition: color .15s; }
.breadcrumb a:hover { color: #fff; }

/* ── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

/* ── Post cards (blog listing) ──────────────────────────────────── */
.post-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

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

.post-card-img-wrap {
  position: relative;
  height: 210px;
  background: var(--color-bg-light);
  overflow: hidden;
  flex-shrink: 0;
}

.post-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tag coral en esquina superior derecha (como el diseño real) */
.post-card-tag {
  position: absolute;
  top: 14px;
  right: 0;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 5px 12px;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.post-card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }

.post-card-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 10px;
  line-height: 1.3;
  transition: color .15s;
}

.post-card:hover .post-card-title { color: var(--color-primary); }

.post-card-desc {
  font-size: 15px;
  color: var(--color-body);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 18px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
}

.post-card-read {
  color: var(--color-primary);
  font-weight: 500;
  font-size: 13px;
}

/* Blog grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── Stats bar ──────────────────────────────────────────────────── */
.stats-bar {
  background: var(--color-dark);
  padding: 28px 0;
}

.stats-bar-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 56px;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }
.stat-num  { font-size: 22px; font-weight: 600; color: #fff; font-family: var(--font-title); }
.stat-label{ font-size: 12px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }

.stats-sep {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.12);
}

/* ── Forms ──────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-body);
  margin-bottom: 7px;
  letter-spacing: .01em;
}

.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color .2s, box-shadow .2s;
  line-height: 1.5;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(226,38,88,.1);
}

.form-control::placeholder { color: #bbb; }

textarea.form-control { resize: vertical; min-height: 110px; }
select.form-control { appearance: none; cursor: pointer; }

/* ── Footer ─────────────────────────────────────────────────────── */
#footer {
  background: var(--color-dark);
  color: rgba(255,255,255,.65);
}

.footer-top { padding: 60px 0 48px; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer-brand-name {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 400;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .1em;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 14px;
}

.footer-brand-name strong { color: var(--color-primary); }

.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,.45);
  line-height: 1.65;
  margin-bottom: 24px;
}

.footer-col-title {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 18px;
}

.footer-links { display: flex; flex-direction: column; gap: 11px; }

.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,.6);
  transition: color .15s;
  text-decoration: none;
}

.footer-links a:hover { color: #fff; }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,.6);
  margin-bottom: 10px;
}

.footer-contact-item i { flex-shrink: 0; color: var(--color-primary); margin-top: 3px; }
.footer-contact-item a { color: inherit; transition: color .15s; }
.footer-contact-item a:hover { color: #fff; }

.footer-social { display: flex; flex-direction: column; gap: 12px; }

.footer-social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255,255,255,.6);
  transition: color .15s;
  text-decoration: none;
}

.footer-social-link:hover { color: #fff; }

.fs-icon {
  width: 32px; height: 32px;
  background: rgba(255,255,255,.07);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  transition: background .15s;
  flex-shrink: 0;
}

.footer-social-link:hover .fs-icon { background: rgba(255,255,255,.14); }

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,.07);
  margin: 0;
}

.footer-bottom {
  padding: 20px 0;
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255,255,255,.3);
  text-align: center;
}

.footer-bottom a {
  color: rgba(255,255,255,.4);
  text-decoration: none;
  transition: color .15s;
}

.footer-bottom a:hover { color: rgba(255,255,255,.7); }

/* ── Post content ───────────────────────────────────────────────── */
.post-content {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--color-body);
}

.post-content h2 {
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 44px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
}

.post-content h3 { font-size: 1.25rem; font-weight: 600; color: var(--color-text); margin: 32px 0 14px; }
.post-content h4 { font-size: 1.05rem; font-weight: 600; margin: 24px 0 10px; }
.post-content p  { margin-bottom: 22px; }
.post-content ul { margin: 0 0 22px 24px; list-style-type: disc; }
.post-content ol { margin: 0 0 22px 24px; }
.post-content li { margin-bottom: 8px; }

.post-content blockquote {
  border-left: 3px solid var(--color-primary);
  margin: 28px 0;
  padding: 18px 24px;
  background: var(--color-primary-lt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-body);
}

.post-content pre {
  background: #1a1a1a;
  color: #e0e0e0;
  padding: 22px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: 22px;
  font-size: .88rem;
  line-height: 1.6;
}

.post-content code {
  background: var(--color-bg-light);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: .875em;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.post-content pre code { background: none; padding: 0; }
.post-content img { max-width: 100%; border-radius: var(--radius-sm); margin: 28px 0; }
.post-content a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }
.post-content a:hover { color: var(--color-primary-dk); }
.post-content strong { font-weight: 600; color: var(--color-text); }

/* ── Badges ─────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 4px 11px;
  border-radius: var(--radius-lg);
}

.badge-primary { background: var(--color-primary); color: #fff; }
.badge-primary-lt { background: var(--color-primary-lt); color: var(--color-primary); }
.badge-dark  { background: var(--color-dark); color: #fff; }
.badge-light { background: var(--color-bg-light); color: var(--color-body); border: 1px solid var(--color-border); }

/* ── Utilities ──────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-muted   { color: var(--color-muted); }
.text-white   { color: #fff; }

/* ── Fade-in on scroll ──────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s ease, transform .55s ease;
}
.fade-in.visible { opacity: 1; transform: none; }
/* Fallback: sin JS o movimiento reducido → siempre visible */
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; }
  .blog-grid   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-height: 60px; }

  .nav-toggle { display: flex; }

  .header-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    border-top: 1px solid var(--color-border);
  }

  .header-nav.open { display: flex; }

  .nav-link { width: 100%; color: var(--color-text) !important; }
  .nav-cta  { margin: 8px 0 4px; width: 100%; justify-content: center; }

  .dropdown-menu {
    position: static;
    transform: none;
    display: none;
    box-shadow: none;
    border: none;
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    margin-top: 4px;
  }

  .nav-item.open .dropdown-menu { display: block; }
  .dropdown-menu a { color: var(--color-text) !important; padding: 8px 14px; }
  .dropdown-menu a:hover { color: var(--color-primary) !important; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }

  .section, .section-alt, .section-dark { padding: 52px 0; }

  .stats-bar-inner { gap: 28px; }
  .stats-sep { display: none; }

  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  .container, .container-narrow { padding: 0 20px; }
}

@media (max-width: 540px) {
  .section, .section-alt { padding: 40px 0; }
}
