/* ============================================================
   PIRATE SAILOR — BLOG THEME (EDITORIAL MARINO PREMIUM)
   ============================================================ */

/* ============================================================
   1. RESET / BASE ESPECIFICO BLOG
   ============================================================ */

#blog,
.blog-page-hero,
.blog-list-grid,
.blog-article,
.blog-card,
.blog-list-item {
  box-sizing: border-box;
}

.blog-page-hero *,
.blog-list-item *,
.blog-card *,
.blog-article * {
  box-sizing: border-box;
}

/* ============================================================
   2. VARIABLES LOCALES (MANTIENE VARIABLES EXISTENTES)
   ============================================================ */

#blog,
.blog-page-hero,
.blog-list-item,
.blog-card,
.blog-article {
  --line: rgba(233, 198, 132, 0.18);
  --panel: #1a2b3c;
  --shadow: 0 16px 38px rgba(3, 10, 20, 0.42);
  --muted: #b8c7d8;
  --gold2: #c6832a;
  --text: #e7edf5;
  --radius: 18px;
  --transition-fast: 220ms cubic-bezier(0.2, 0.65, 0.2, 1);
  --blog-bg-deep: #0d1b2a;
  --blog-bg-mid: #132636;
  --blog-accent-soft: rgba(198, 131, 42, 0.14);
  --blog-serif-title: "Playfair Display", Georgia, "Times New Roman", serif;
  --blog-serif-body: "Source Serif 4", "Georgia", serif;
}

/* ============================================================
   3. HERO + BREADCRUMB + LAYOUT DE ARTICULO
   ============================================================ */

.blog-breadcrumb {
  margin: 14px 0 16px;
  color: var(--muted);
  font-size: 0.93rem;
  letter-spacing: 0.01em;
}

.blog-breadcrumb a {
  color: var(--gold2);
  text-decoration: none;
  font-weight: 600;
}

.blog-breadcrumb a:hover {
  color: #e0a34b;
}

.blog-breadcrumb a + a::before {
  content: " \203a ";
  color: rgba(231, 237, 245, 0.45);
  font-weight: 500;
}

.blog-page-hero {
  background:
    radial-gradient(circle at 12% 18%, rgba(198, 131, 42, 0.22) 0%, rgba(198, 131, 42, 0) 38%),
    linear-gradient(150deg, var(--blog-bg-deep) 0%, var(--blog-bg-mid) 52%, #1a2b3c 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(198, 131, 42, 0.2);
  box-shadow: var(--shadow);
  color: var(--text);
  padding: clamp(26px, 5vw, 50px);
  margin: 26px 0 20px;
  position: relative;
  overflow: hidden;
}

.blog-page-hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -110px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 131, 42, 0.28) 0%, rgba(198, 131, 42, 0) 72%);
  pointer-events: none;
}

.blog-page-hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--blog-serif-title);
  font-size: clamp(2rem, 4vw, 3.05rem);
  line-height: 1.16;
  color: #f7f9fc;
  letter-spacing: 0.01em;
}

.blog-page-hero p {
  margin: 0;
  max-width: 68ch;
  line-height: 1.85;
  color: rgba(231, 237, 245, 0.93);
  font-family: var(--blog-serif-body);
  font-size: clamp(1.02rem, 1.45vw, 1.14rem);
}

.blog-article {
  background: linear-gradient(180deg, #1a2b3c 0%, #152536 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3.2vw, 44px);
  box-shadow: var(--shadow);
  color: var(--text);
}

.blog-article header {
  margin-bottom: 1.2rem;
}

.blog-article h1,
.blog-article h2 {
  font-family: var(--blog-serif-title);
  color: #f6f8fc;
  text-wrap: balance;
}

.blog-article h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 1.16;
}

.blog-article .blog-meta {
  color: rgba(184, 199, 216, 0.96);
  font-size: 0.94rem;
  letter-spacing: 0.02em;
}

.blog-article section {
  margin-top: 0.35rem;
}

.blog-article p {
  margin: 0 0 1.06rem;
  max-width: 68ch;
  line-height: 1.85;
  color: #e5edf6;
  font-family: var(--blog-serif-body);
  font-size: clamp(1.03rem, 1.26vw, 1.14rem);
  letter-spacing: 0.003em;
}

.blog-article a {
  color: #e2a246;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

.blog-article a:hover {
  color: #f0be70;
}

.blog-article h2 {
  margin: 2.15rem 0 0.92rem;
  font-size: clamp(1.5rem, 2.7vw, 2.02rem);
  line-height: 1.24;
}

.blog-article h3 {
  margin: 1.3rem 0 0.62rem;
  font-size: clamp(1.08rem, 1.85vw, 1.3rem);
  font-family: var(--blog-serif-title);
  color: #f1f6fd;
}

/* ============================================================
   4. CARDS DEL LISTADO (HOME + INDICE BLOG)
   ============================================================ */

#blog .blog-grid--cards,
.blog-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 28px);
  margin-top: 1rem;
}

.blog-card,
.blog-list-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(23, 40, 57, 0.98) 0%, rgba(20, 35, 50, 0.98) 100%);
  box-shadow: 0 20px 36px rgba(6, 12, 22, 0.42);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.blog-card:hover,
.blog-list-item:hover {
  transform: translateY(-4px);
  border-color: var(--gold2);
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.52);
}

.blog-card__image {
  display: block;
  aspect-ratio: 16 / 9;
  background: #20384d;
}

.blog-card__image img,
.blog-list-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-list-item img {
  height: 250px;
}

.blog-card__body,
.blog-list-item__content {
  padding: 1.08rem 1.12rem 1.24rem;
  display: grid;
  gap: 0.72rem;
}

.card-img {
  display: block;
  aspect-ratio: 16 / 9;
  background: #20384d;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 1.08rem 1.12rem 1.24rem;
  display: grid;
  gap: 0.72rem;
}

.card-title {
  margin: 0;
  font-family: var(--blog-serif-title);
  color: #f3f7fd;
  font-size: clamp(1.12rem, 2vw, 1.34rem);
  line-height: 1.34;
}

.card-desc {
  margin: 0;
  color: #ccdae8;
  line-height: 1.75;
  font-family: var(--blog-serif-body);
}

.card-cta {
  display: inline-block;
  color: #f1bc6a;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.blog-card:hover .card-cta {
  color: #ffd28a;
}

.blog-card__body h3,
.blog-list-item h2 {
  margin: 0;
  font-family: var(--blog-serif-title);
  color: #f3f7fd;
  line-height: 1.34;
}

.blog-card__body h3 {
  font-size: clamp(1.12rem, 2vw, 1.34rem);
}

.blog-list-item h2 {
  font-size: clamp(1.24rem, 2.2vw, 1.55rem);
}

.blog-card__body h3 a,
.blog-list-item h2 a {
  color: inherit;
  text-decoration: none;
}

.blog-card__body h3 a:hover,
.blog-list-item h2 a:hover {
  color: #f1bc6a;
}

.blog-card__body p,
.blog-list-item p {
  margin: 0;
  color: #ccdae8;
  line-height: 1.75;
  font-family: var(--blog-serif-body);
}

.blog-cta-wrap {
  margin: 1.5rem 0 0;
}

/* ============================================================
   5. COMPONENTES INTERNOS (FIGURE / FAQ / CTA)
   ============================================================ */

.blog-article figure {
  margin: 1.55rem 0;
  position: relative;
}

.blog-article figure img {
  width: 100%;
  border-radius: 16px;
  display: block;
  border: 1px solid rgba(198, 131, 42, 0.24);
  box-shadow: 0 18px 30px rgba(2, 8, 16, 0.48);
}

.blog-article figure::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 34px;
  height: 35%;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(to top, rgba(6, 14, 24, 0.5) 0%, rgba(6, 14, 24, 0) 100%);
  pointer-events: none;
}

.blog-article figcaption {
  margin-top: 0.58rem;
  color: rgba(206, 220, 236, 0.92);
  font-size: 0.92rem;
  line-height: 1.62;
  font-style: italic;
  font-family: var(--blog-serif-body);
}

.affiliate-banner {
  margin: 1.55rem 0;
  border: 1px solid rgba(198, 131, 42, 0.32);
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(198, 131, 42, 0.18) 0%, rgba(16, 28, 40, 0.92) 58%, rgba(15, 25, 36, 0.98) 100%);
  box-shadow: 0 14px 28px rgba(2, 8, 16, 0.42);
  overflow: hidden;
  display: grid;
  justify-items: center;
  padding: 0.85rem;
}

.affiliate-banner a {
  width: 300px;
  max-width: 100%;
  display: block;
}

.affiliate-banner iframe {
  display: none;
  max-width: 100%;
  border: 0;
  border-radius: 10px;
  background: #fff;
}

.affiliate-banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  background: #fff;
}

.affiliate-fallback {
  display: block;
  margin-top: 0;
  font-size: 0.82rem;
  color: #d6e4f1;
  text-align: center;
}

.affiliate-fallback a {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  color: #ffe4b3;
  text-decoration: none;
  font-weight: 700;
}

.affiliate-fallback img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.affiliate-fallback a:hover {
  color: #fff2d5;
}

.blog-faq {
  border-top: 1px solid var(--line);
  margin-top: 2.35rem;
  padding-top: 1.05rem;
}

.blog-faq details {
  border: 1px solid rgba(198, 131, 42, 0.22);
  border-radius: 12px;
  margin-bottom: 0.72rem;
  background: rgba(16, 28, 40, 0.92);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.blog-faq details[open] {
  border-color: rgba(198, 131, 42, 0.5);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.32);
}

.blog-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: #f3f7fd;
  padding: 0.88rem 1rem;
  font-family: var(--blog-serif-body);
  list-style: none;
}

.blog-faq summary::-webkit-details-marker {
  display: none;
}

.blog-faq summary::after {
  content: "+";
  float: right;
  color: var(--gold2);
  font-weight: 700;
  transition: transform var(--transition-fast);
}

.blog-faq details[open] summary::after {
  transform: rotate(45deg);
}

.blog-faq details p {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  padding: 0 1rem;
  transition: max-height 320ms ease, opacity 240ms ease, padding 240ms ease;
  color: #dbe6f3;
}

.blog-faq details[open] p {
  max-height: 260px;
  opacity: 1;
  padding: 0 1rem 0.95rem;
}

.blog-cta {
  margin-top: 2.25rem;
  padding: 1.1rem 1.18rem;
  border: 1px solid rgba(198, 131, 42, 0.38);
  border-left: 5px solid var(--gold2);
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(198, 131, 42, 0.2) 0%, rgba(198, 131, 42, 0.07) 38%, rgba(23, 37, 53, 0.85) 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.blog-cta h2,
.blog-cta p {
  max-width: 68ch;
}

.foot-socials {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(15, 34, 51, 0.2);
  color: #1a3b59;
  background: #fff;
  transition: var(--transition-fast);
}

.social-link:hover {
  background: #f3f7fb;
  border-color: #1a3b59;
  color: #0f2233;
}

.social-link svg {
  width: 16px;
  height: 16px;
}

/* ============================================================
   6. BOTONES EN CONTEXTO BLOG
   ============================================================ */

.blog-card .btn,
.blog-list-item .btn,
.blog-cta .btn,
.blog-cta-wrap .btn {
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.blog-card .btn:hover,
.blog-list-item .btn:hover,
.blog-cta .btn:hover,
.blog-cta-wrap .btn:hover {
  transform: translateY(-2px);
}

/* ============================================================
   7. RESPONSIVE
   ============================================================ */

@media (max-width: 980px) {
  #blog .blog-grid--cards,
  .blog-list-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .blog-page-hero {
    padding: clamp(20px, 5vw, 30px);
  }

  .blog-article {
    padding: clamp(18px, 3.2vw, 28px);
  }

  .blog-list-item img {
    height: 230px;
  }
}

@media (max-width: 640px) {
  .blog-breadcrumb {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .blog-page-hero h1,
  .blog-article h1 {
    text-wrap: pretty;
  }

  .blog-article p,
  .blog-page-hero p,
  .blog-card__body p,
  .blog-list-item p {
    max-width: none;
    font-size: 1.01rem;
    line-height: 1.8;
  }

  .blog-list-item img {
    height: 198px;
  }

  .blog-faq details[open] p {
    max-height: 340px;
  }

  .foot-bar {
    justify-content: center;
  }

  .foot-socials {
    justify-content: center;
  }
}

/* ============================================================
   8. GOOGLE FONTS (AÑADIR EN <head> DE LAS PAGINAS DE BLOG)
   ============================================================
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&display=swap" rel="stylesheet">
*/
