/*
Theme Name: BiohackTub Custom
Theme URI: https://biohacktub.com/
Description: Custom Child Theme for BiohackTub (US Editorial & Affiliate System)
Author: Barrett Cross
Template: flatsome
Version: 1.5
*/

/*************** 1. HEADER CHỐNG TRONG SUỐT & HIỆN LOGO/MENU ***************/
/* Khóa cứng nền trắng đục và đổ bóng nhẹ cho Header */
#header,
.header-wrapper,
#masthead {
  background-color: #ffffff !important;
}

#header {
  position: relative !important;
  z-index: 9999 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
}

/* Ẩn hoàn toàn lớp nền ảo của Flatsome gây đè che mất logo/menu */
.header-bg-container,
.header-bg-color {
  display: none !important;
}

/* Đảm bảo Logo & Menu luôn nổi lên trên, không bị che khuất */
#masthead,
.header-main,
.header-inner {
  position: relative !important;
  z-index: 10 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Chuẩn hóa font, màu chữ và tương phản cho Menu */
.header-nav li > a,
.header-nav .nav-top-link,
.nav > li > a {
  color: #0f172a !important;
  font-weight: 600 !important;
  text-transform: none !important;
}

.header-nav li > a:hover,
.header-nav .nav-top-link:hover {
  color: #0284c7 !important;
}

/*************** 2. FOOTER NỀN TỐI NAVY (HIỆN TIÊU ĐỀ TRẮNG) ***************/
/* Khóa toàn bộ khung chân trang Flatsome sang nền Navy tối */
#footer,
.footer-wrapper,
.biohack-footer-wrap {
  background-color: #0b1120 !important;
  color: #94a3b8 !important;
}

/* Hiện rõ các tiêu đề cột BiohackTub, Recovery Hubs, Company */
.biohack-footer-wrap .footer-col-title {
  color: #ffffff !important;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: block;
}

.biohack-footer-wrap .footer-col-desc {
  color: #94a3b8 !important;
  line-height: 1.6;
}

.biohack-footer-wrap .footer-links a {
  color: #94a3b8 !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.biohack-footer-wrap .footer-links a:hover {
  color: #38bdf8 !important;
}

.biohack-footer-wrap .biohack-footer-grid {
  border-bottom: 1px solid #1e293b !important;
}

.biohack-footer-wrap .footer-disclaimer {
  color: #64748b !important;
}

.biohack-footer-wrap .footer-disclaimer strong {
  color: #94a3b8 !important;
}

/* Thanh chân trang dưới cùng chứa bản quyền */
.absolute-footer,
#footer .absolute-footer {
  background-color: #070c18 !important;
  border-top: 1px solid #1e293b !important;
}

/*************** 3. HOMEPAGE EDITORIAL SYSTEM ***************/
.ergo-home-container,
.ergo-home-container * {
  box-sizing: border-box;
}

.ergo-home-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 15px 60px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1e293b;
}

/* Hero Section */
.ergo-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 65px 30px;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 25px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
}

.ergo-hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 15px;
  line-height: 1.25;
}

.ergo-hero .hero-desc {
  font-size: 1.15rem;
  color: #cbd5e1;
  max-width: 760px;
  margin: 0 auto 25px;
  line-height: 1.6;
}

.ergo-hero strong {
  color: #38bdf8;
}

/* Nút bấm CTA */
.btn-3d {
  display: inline-block;
  background: #0284c7;
  color: #ffffff !important;
  font-weight: 700;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 0 #0369a1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-3d:hover {
  background: #0369a1;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #075985;
}

/* Trust Bar */
.trust-bar-us {
  display: flex;
  justify-content: center;
  gap: 30px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
  text-align: center;
  flex-wrap: wrap;
}

.trust-bar-item::before {
  content: "✔ ";
  color: #0284c7;
}

/* Tiêu đề mục */
.us-section-header {
  text-align: center;
  margin-bottom: 35px;
  color: #64748b;
  font-size: 1.05rem;
  line-height: 1.6;
}

.us-section-header h2, 
.section-title-3d, 
.pledge-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
  line-height: 1.3;
}

.section-subtitle {
  text-align: center;
  color: #64748b;
  font-size: 1rem;
  margin-bottom: 30px;
}

/* Grid 4 Silo Hubs */
.us-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.us-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  color: #475569;
  line-height: 1.6;
}

.us-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.08);
}

.us-card-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  display: block;
  line-height: 1;
}

.us-grid-4 .us-card:nth-child(1) .us-card-icon::before { content: "🧊"; }
.us-grid-4 .us-card:nth-child(2) .us-card-icon::before { content: "⚙️"; }
.us-grid-4 .us-card:nth-child(3) .us-card-icon::before { content: "♨️"; }
.us-grid-4 .us-card:nth-child(4) .us-card-icon::before { content: "🧪"; }

.us-card h3 {
  font-size: 1.25rem;
  color: #0f172a;
  margin-bottom: 10px;
}

.us-card-link {
  display: inline-block;
  margin-top: 15px;
  color: #0284c7;
  font-weight: 700;
  text-decoration: none;
}

.us-card-link:hover {
  text-decoration: underline;
}

/* E-E-A-T Standards */
.ergo-trust-section {
  background: #f1f5f9;
  border-radius: 16px;
  padding: 45px 25px;
  text-align: center;
  margin-bottom: 50px;
}

.ergo-trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.trust-card {
  background: #ffffff;
  padding: 24px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  text-align: left;
  color: #475569;
  line-height: 1.6;
}

.trust-icon {
  font-size: 2rem;
  display: inline-block;
  margin-bottom: 10px;
}

.trust-card h3 {
  font-size: 1.15rem;
  color: #0f172a;
  margin-bottom: 8px;
}

/* Featured Guides */
.ergo-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.article-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.article-img-placeholder {
  background: #e2e8f0;
  height: 180px;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  overflow: hidden;
}

.article-img-placeholder img {
  width: 100% !important;
  height: 180px !important;
  object-fit: cover !important;
  display: block;
}

.article-content {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  color: #475569;
}

.article-meta {
  display: block;
  color: #0284c7;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.article-card h3 {
  font-size: 1.2rem;
  color: #0f172a;
  margin-bottom: 10px;
  line-height: 1.4;
}

.article-readmore {
  display: inline-block;
  margin-top: 14px;
  color: #0284c7;
  font-weight: 700;
  text-decoration: none;
}

/* FAQ Box */
.us-faq-wrap {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 850px;
  margin: 0 auto 50px;
}

.us-faq-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  color: #475569;
  line-height: 1.6;
}

.us-faq-item h3 {
  font-size: 1.15rem;
  color: #0f172a;
  margin-bottom: 8px;
}

/* Triết lý biên tập */
.ryan-pledge {
  background: #f8fafc;
  border-left: 4px solid #0284c7;
  padding: 30px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 50px;
  line-height: 1.7;
  color: #334155;
}

/* Newsletter Flatsome */
.newsletter-section {
  background: #0f172a;
  color: #ffffff;
  text-align: center;
  padding: 45px 25px;
  border-radius: 16px;
}

.newsletter-title {
  color: #ffffff;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.newsletter-desc {
  color: #94a3b8;
  margin-bottom: 25px;
}

.newsletter-form {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  height: 48px !important;
  padding: 0 16px !important;
  border-radius: 8px !important;
  border: 1px solid #334155 !important;
  background: #1e293b !important;
  color: #ffffff !important;
  margin: 0 !important;
  line-height: 48px !important;
}

.newsletter-form .wpcf7-submit {
  background: #0284c7 !important;
  color: #ffffff !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 26px !important;
  height: 48px !important;
  line-height: 48px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.2s;
}

.newsletter-form .wpcf7-submit:hover {
  background: #0369a1 !important;
}

/*************** 4. MOBILE RESPONSIVE ***************/
@media only screen and (max-width: 48em) {
  .ergo-hero {
    padding: 40px 20px;
  }
  .ergo-hero h1 {
    font-size: 1.75rem;
  }
  .us-section-header h2, 
  .section-title-3d, 
  .pledge-title,
  .newsletter-title {
    font-size: 1.45rem;
  }
  .trust-bar-us {
    flex-direction: column;
    gap: 12px;
    padding: 15px;
  }
  .newsletter-form {
    flex-direction: column;
    gap: 12px;
  }
  .newsletter-input,
  .newsletter-form .wpcf7-submit {
    width: 100% !important;
  }
}