/* ==========================================================================
   MASTER BLOG STYLESHEET - ESTÉTICA & BIENESTAR (PREMIUM BEIGE TEXTURED THEME)
   ========================================================================== */

:root {
  --gold-primary: #D4AF37;
  --gold-secondary: #F3E7C9;
  --gold-dark: #8F6E29;
  --bg-beige: #FAF6F0;
  --bg-card: #FFFFFF;
  --text-dark: #2C2621;
  --text-muted: rgba(44, 38, 33, 0.7);
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Montserrat', sans-serif;
  --gold-gradient: linear-gradient(135deg, #F3E7C9 0%, #D4AF37 50%, #9E7A3E 100%);
  --gold-gradient-dark: linear-gradient(135deg, #B8972E 0%, #8F6E29 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-beige);
  /* Elegant, subtle linen/fabric relief texture */
  background-image: 
    linear-gradient(90deg, rgba(44, 38, 33, 0.012) 1px, transparent 1px),
    linear-gradient(rgba(44, 38, 33, 0.012) 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--text-dark);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Bilingual Toggle Logic */
.lang-en .lang-es {
  display: none !important;
}
body:not(.lang-en) .lang-en {
  display: none !important;
}

/* Base Layout & Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-justified {
  text-align: justify;
  text-justify: inter-word;
}

/* Master Header / Navbar (Translucent Beige with Gold Glow underline) */
.blog-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: rgba(250, 246, 240, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.22);
  padding: 16px 0;
  box-shadow: 0 4px 25px rgba(44, 38, 33, 0.05);
  overflow: visible;
}

.blog-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold-gradient);
  box-shadow: 0 2px 10px 1px rgba(212, 175, 55, 0.4), 0 4px 20px 3px rgba(212, 175, 55, 0.2);
  opacity: 0.8;
  z-index: -1;
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-dark);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(143, 110, 41, 0.25);
  padding: 8px 18px;
  border-radius: 20px;
  background: rgba(212, 175, 55, 0.03);
}

.back-link:hover {
  color: #000;
  background: var(--gold-gradient);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  transform: translateX(-4px);
}

.blog-logo {
  max-height: 48px;
  height: auto;
  transition: transform 0.5s ease;
}

.blog-logo:hover {
  transform: scale(1.05);
}

/* ==========================================================================
   Language Switcher Toggle Styles (Identical to Main Landing Page)
   ========================================================================== */
.lang-toggle-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(44, 38, 33, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 4px;
  border-radius: 30px;
  margin-left: 10px;
  overflow: visible;
}

.lang-active-bg {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 0;
  background: var(--gold-gradient);
  border-radius: 20px;
  z-index: 1;
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.25);
  transition: left 0.45s cubic-bezier(0.25, 1.35, 0.35, 1.05),
              width 0.45s cubic-bezier(0.25, 1.35, 0.35, 1.1);
  transform-origin: center center;
}

.lang-btn {
  position: relative;
  z-index: 2;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dark);
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: color 0.35s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-btn.active {
  color: #000000 !important;
}

.lang-btn .flag-img {
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   BLOG INDEX PAGE STYLES
   ========================================================================== */

.blog-hero {
  padding: 80px 0 60px 0;
  text-align: center;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
}

.blog-title {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 400;
  margin-bottom: 15px;
  letter-spacing: 1px;
  background: var(--gold-gradient-dark);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 30px;
  padding: 40px 0 80px 0;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid rgba(143, 110, 41, 0.15);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 25px rgba(44, 38, 33, 0.04);
}

.blog-card:hover {
  transform: translateY(-8px);
  border-color: var(--gold-primary);
  box-shadow: 0 15px 35px rgba(143, 110, 41, 0.12);
}

.card-img-wrapper {
  position: relative;
  height: 220px;
  overflow: hidden;
  background-color: #EFEBE4;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .card-img {
  transform: scale(1.06);
}

.card-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(250, 246, 240, 0.95);
  border: 1px solid var(--gold-primary);
  color: var(--gold-dark);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(44, 38, 33, 0.1);
}

.card-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-family: var(--font-sans);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.4;
  transition: color 0.3s;
}

.blog-card:hover .card-title {
  color: var(--gold-dark);
}

.card-excerpt {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-dark);
}

.card-footer i {
  font-size: 0.75rem;
  transition: transform 0.3s;
}

.blog-card:hover .card-footer i {
  transform: translateX(4px);
}

/* ==========================================================================
   INDIVIDUAL ARTICLE STYLES
   ========================================================================== */

.article-hero {
  position: relative;
  height: 440px;
  display: flex;
  align-items: flex-end;
  padding: 60px 0;
  overflow: hidden;
  background-color: #EFEBE4;
}

.article-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Fades into warm beige */
  background: linear-gradient(to top, var(--bg-beige) 0%, rgba(250, 246, 240, 0.4) 60%, transparent 100%),
              rgba(44, 38, 33, 0.25);
  z-index: 2;
}

.article-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  z-index: 1;
}

.article-hero-content {
  position: relative;
  z-index: 3;
  max-width: 850px;
}

.article-meta {
  display: flex;
  gap: 15px;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-dark);
  margin-bottom: 15px;
}

.article-h1 {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-dark);
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
}

.article-container {
  max-width: 850px;
  margin: 0 auto;
  padding: 50px 24px 100px 24px;
}

.article-body h2 {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin: 40px 0 20px 0;
  border-left: 3px solid var(--gold-primary);
  padding-left: 15px;
}

.article-body p {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text-dark);
  margin-bottom: 25px;
}

.article-body ul, .article-body ol {
  margin-bottom: 30px;
  padding-left: 20px;
}

.article-body li {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.article-body blockquote {
  background: rgba(143, 110, 41, 0.04);
  border-left: 4px solid var(--gold-primary);
  padding: 24px 30px;
  margin: 35px 0;
  border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--gold-dark);
  margin-bottom: 0;
}

.article-body blockquote cite {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Custom Callout Box for Contraindications (Crucial Highlight - Soft Red) */
.contra-box {
  background: rgba(210, 77, 77, 0.03);
  border: 1.5px solid rgba(210, 77, 77, 0.22);
  border-radius: 12px;
  padding: 30px;
  margin: 45px 0;
  box-shadow: 0 8px 25px rgba(210, 77, 77, 0.02);
}

.contra-box h3 {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 700;
  color: #c92a2a;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contra-box h3 i {
  font-size: 1.15rem;
}

.contra-box ul {
  margin-bottom: 0;
}

.contra-box li {
  color: var(--text-dark);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* Call to Action Booking Box in Articles */
.article-cta {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, #FFFFFF 100%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  margin: 60px 0 20px 0;
  box-shadow: 0 10px 30px rgba(143, 110, 41, 0.05);
}

.article-cta h3 {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.article-cta p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 24px auto;
}

.article-cta .btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-gradient);
  color: #000;
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 28px;
  border-radius: 25px;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.article-cta .btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

/* ==========================================================================
   BLOG FOOTER (Warm Muted Beige)
   ========================================================================== */

.blog-footer {
  background: #F3EFE9;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  padding: 40px 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.blog-footer p {
  margin-bottom: 8px;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media screen and (max-width: 992px) {
  .blog-title {
    font-size: 2.5rem;
  }
  
  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .article-hero {
    height: 380px;
  }
  
  .article-h1 {
    font-size: 2.3rem;
  }
}

@media screen and (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .article-hero {
    height: 300px;
    padding: 40px 0;
  }
  
  .article-h1 {
    font-size: 1.8rem;
  }
  
  .article-container {
    padding: 30px 20px 80px 20px;
  }
  
  .article-body h2 {
    font-size: 1.3rem;
    margin: 30px 0 15px 0;
  }
  
  .article-body p, .article-body li {
    font-size: 0.95rem;
    line-height: 1.7;
  }
  
  .contra-box {
    padding: 22px;
  }
  
  .article-cta {
    padding: 30px 20px;
  }
}

/* ==========================================================================
   BLOG CATEGORY FILTER BAR & ANIMATIONS
   ========================================================================== */
.blog-filter-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: -10px auto 40px auto;
  padding: 10px 24px;
  max-width: 1200px;
  flex-wrap: wrap;
  z-index: 10;
  position: relative;
}

.filter-btn {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 22px;
  border-radius: 25px;
  cursor: pointer;
  border: 1px solid rgba(143, 110, 41, 0.22);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-dark);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-btn:hover {
  border-color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(143, 110, 41, 0.08);
}

.filter-btn.active {
  background: var(--gold-gradient) !important;
  color: #000 !important;
  border-color: transparent !important;
  box-shadow: 0 5px 18px rgba(212, 175, 55, 0.35) !important;
  transform: translateY(-1px);
}

/* Smooth filtering card animation */
.blog-card {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.blog-card.fade-out {
  opacity: 0;
  transform: scale(0.9);
}

.blog-card.hide {
  display: none !important;
}

@media screen and (max-width: 992px) {
  .blog-filter-bar {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px;
    margin-bottom: 25px;
    gap: 8px;
  }
  
  .blog-filter-bar::-webkit-scrollbar {
    height: 3px;
  }
  
  .blog-filter-bar::-webkit-scrollbar-thumb {
    background-color: rgba(212, 175, 55, 0.3);
    border-radius: 10px;
  }
  
  .filter-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 0.72rem;
  }
}

/* ==========================================================================
   ELEGANT TEXT NAVIGATION HEADER & TRANSLUCENT ARTICLE HEADER
   ========================================================================== */

/* Navigation Container */
.blog-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Elegant Text Navigation Link */
.blog-nav-link {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dark);
  padding: 8px 0;
  position: relative;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: color 0.3s ease;
  cursor: pointer;
}

.blog-nav-link i {
  font-size: 0.9rem;
  color: var(--gold-dark);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Slide-in Gold Underline Animation */
.blog-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-gradient);
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.blog-nav-link:hover {
  color: var(--gold-dark);
}

.blog-nav-link:hover i {
  transform: scale(1.15) translateY(-1px);
}

.blog-nav-link:hover::after,
.blog-nav-link.active::after {
  width: 100%;
}

.blog-nav-link.active {
  color: var(--gold-dark);
}

/* Logo Hover Effect */
.blog-logo-link {
  display: inline-flex;
  align-items: center;
}

.blog-logo-link:hover .blog-logo {
  transform: translateY(-1px) scale(1.02);
}

/* Overrides when inside an individual article (.article-page body class) */
.article-page .blog-header {
  background: rgba(20, 16, 12, 0.88) !important; /* Slightly darker glassmorphism for enhanced contrast over hero banner */
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
  border-bottom-color: rgba(212, 175, 55, 0.15) !important;
}

.article-page .blog-header::after {
  opacity: 0.95;
  height: 2px;
}

/* Text Links inside dark article header */
.article-page .blog-header .blog-nav-link {
  color: rgba(250, 246, 240, 0.78) !important;
}

.article-page .blog-header .blog-nav-link i {
  color: var(--gold-primary);
}

.article-page .blog-header .blog-nav-link:hover {
  color: var(--gold-secondary) !important;
}

.article-page .blog-header .blog-nav-link.active {
  color: var(--gold-primary) !important;
}

/* Dark language selector toggles override */
.article-page .blog-header .lang-btn {
  color: var(--gold-secondary) !important;
}

.article-page .blog-header .lang-btn.active {
  color: #000000 !important;
}

.article-page .blog-header .lang-toggle-wrapper {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(212, 175, 55, 0.25) !important;
}

.article-page .blog-header .blog-logo {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

/* Responsive adjustments for headers */
@media screen and (max-width: 768px) {
  .blog-nav {
    gap: 16px;
  }
  .blog-nav-link {
    font-size: 0.72rem;
    gap: 6px;
  }
  .blog-logo {
    max-height: 38px !important;
  }
}

/* Narrow screens (<480px): Wrap logo gracefully to the top, keep nav/lang selector on a single row underneath */
@media screen and (max-width: 480px) {
  .header-wrapper {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    row-gap: 12px;
  }
  
  .blog-logo-link {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 2px;
  }
  
  .blog-nav {
    gap: 14px;
  }
  
  .blog-nav-link {
    font-size: 0.68rem;
    padding: 4px 0;
    gap: 4px;
  }
  
  .blog-logo {
    max-height: 34px !important;
  }
  
  .lang-toggle-wrapper {
    transform: scale(0.85);
    transform-origin: right center;
  }
}

/* Elegant Floating Inline Images inside Articles */
.article-inline-img {
  float: right;
  max-width: 280px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  margin: 10px 0 20px 24px;
  box-shadow: 0 4px 15px rgba(44, 38, 33, 0.06);
}

@media screen and (max-width: 768px) {
  .article-inline-img {
    float: none;
    margin: 20px auto;
    display: block;
    max-width: 100%;
  }
}


/* Elegant Card Metadata (Publication Date) */
.card-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold-dark);
  margin-bottom: 12px;
}

.card-meta i {
  font-size: 0.8rem;
  opacity: 0.85;
}



