/* ============ CSS MEGA FORÇADO - SOBRESCREVE TUDO ============ */

:root {
  --bg: #001f3f;
  --card: #00294d;
  --accent: #00ffff;
  --accent-hover: #ffcc00;
  --text: #ffffff;
  --text-muted: #c0cfea;
}

* {
  box-sizing: border-box !important;
}

body {
  font-family: Arial, sans-serif !important;
  background: #001f3f !important;
  color: #ffffff !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ============ HEADER CORRIGIDO ============ */
header, .site-header, [class*="header"] {
  text-align: center !important;
  padding: 2rem 0 !important;
  background: #001f3f !important;
}

/* Este agora só afeta títulos realmente do site, não todos */
.site-title,
h1.site-title,
h1.page-title {
  font-size: 3rem !important;
  font-weight: bold !important;
  background: linear-gradient(45deg, #00ffff, #ffcc00) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  margin-bottom: 1rem !important;
  display: block !important;
}


.main-nav, nav, [class*="nav"] {
  background: #00294d !important;
  padding: 1rem !important;
  border-radius: 16px !important;
  display: flex !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 1.5rem !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
}

.main-nav a, nav a, [class*="nav"] a {
  color: #00ffff !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  padding: 0.5rem 1rem !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  display: inline-block !important;
}

.main-nav a:hover, nav a:hover, [class*="nav"] a:hover {
  background: rgba(0, 255, 255, 0.1) !important;
  color: #ffcc00 !important;
}

/* ============ LAYOUT FORÇADO ============ */
.wrap, .container, [class*="wrap"], [class*="container"] {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 20px !important;
  display: block !important;
}

.content-grid, [class*="grid"], [class*="content"] {
  display: block !important;
  width: 100% !important;
}

.main-content, [class*="main"] {
  width: 100% !important;
  display: block !important;
  float: none !important;
}

/* ============ ARTIGOS FORÇADOS ============ */
.article-card, article, [class*="article"], [class*="card"] {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto 2rem auto !important;
  background: #00294d !important;
  padding: 2.5rem !important;
  border-radius: 16px !important;
  border: 1px solid rgba(0, 255, 255, 0.2) !important;
  display: block !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
}

.article-card h2, article h2, [class*="article"] h2 {
  color: #ffffff !important;
  font-size: 1.8rem !important;
  margin-bottom: 1rem !important;
}

.article-meta, [class*="meta"] {
  color: #c0cfea !important;
  font-size: 0.9rem !important;
  margin-bottom: 1.5rem !important;
}

.read-more, [class*="read"] {
  display: inline-block !important;
  background: #00ffff !important;
  color: #0a2f5e !important;
  padding: 0.8rem 1.5rem !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  margin-top: 1rem !important;
  transition: all 0.3s ease !important;
}

.read-more:hover, [class*="read"]:hover {
  background: #ffcc00 !important;
  transform: translateY(-2px) !important;
}

/* ============ SIDEBAR FORÇADA ============ */
.sidebar, aside, [class*="sidebar"] {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 2rem auto !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 2rem !important;
  float: none !important;
}

.sidebar-widget, [class*="widget"] {
  background: #00294d !important;
  padding: 2rem !important;
  border-radius: 16px !important;
  border: 1px solid rgba(0, 255, 255, 0.2) !important;
  display: block !important;
}

.sidebar-widget h3, [class*="widget"] h3 {
  color: #ffffff !important;
  margin-top: 0 !important;
  border-bottom: 2px solid #00ffff !important;
  padding-bottom: 0.8rem !important;
  margin-bottom: 1.5rem !important;
}

/* ============ SOBRESCREVER CSS INLINE DOS LINKS ============ */
.sidebar-widget a, [class*="widget"] a {
  color: #00ffff !important;
  text-decoration: none !important;
  padding: 0.8rem !important;
  display: block !important;
  background: rgba(0, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  margin-bottom: 0.8rem !important;
}

.sidebar-widget a:hover, [class*="widget"] a:hover {
  background: rgba(0, 255, 255, 0.2) !important;
  color: #ffcc00 !important;
}

/* ============ CALCULADORA FORÇADA ============ */
.calculator-section, section, [class*="calculator"] {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 3rem auto !important;
  background: rgba(5, 48, 97, 0.8) !important;
  padding: 2.5rem !important;
  border-radius: 16px !important;
  border: 2px solid rgba(0, 255, 255, 0.2) !important;
  display: block !important;
}

/* ============ HERO FORÇADO ============ */
.hero-section, [class*="hero"] {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto 3rem auto !important;
  background: #00294d !important;
  padding: 3rem 2rem !important;
  border-radius: 16px !important;
  border: 2px solid rgba(0, 255, 255, 0.2) !important;
  text-align: center !important;
  display: block !important;
}

/* ============ RESPONSIVO FORÇADO ============ */
@media (max-width: 768px) {
  .sidebar, aside, [class*="sidebar"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  .main-nav, nav, [class*="nav"] {
    flex-direction: column !important;
    gap: 0.8rem !important;
  }
}

/* ============ FOOTER FORÇADO ============ */
footer, [class*="footer"] {
  text-align: center !important;
  padding: 2rem !important;
  background-color: #001f3f !important;
  color: #ffffff !important;
  width: 100% !important;
  margin-top: 3rem !important;
  display: block !important;
}
/* ============ CSS MEGA FORÇADO - FIM ============ */

/* ================== CORREÇÃO IMAGEM ARTIGO ================== */
.article-card .article-image {
  display: block !important;
  width: 100% !important;
  max-width: 1024px !important;
  height: auto !important;
  margin: 20px auto !important;
  border-radius: 12px !important;
}

@media (max-width: 768px) {
  .article-card .flex-layout {
    flex-direction: column;
  }
  .article-card .video-side {
    width: 100%;
    max-width: 100%;
  }
}
/* 🔥 MOBILE FIXES FOR CHRONOCALCULATORS HOMEPAGE */
@media (max-width: 768px) {
    /* Fix articles grid on mobile */
    .articles-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 1rem !important;
    }
    
    /* Fix article cards */
    .article-card {
        width: 100% !important;
        margin: 0 auto 1.5rem auto !important;
        padding: 1.5rem !important;
        min-height: auto !important;
    }
    
    /* Fix images in articles */
    .article-card img {
        width: 100% !important;
        height: auto !important;
        max-height: 200px !important;
        object-fit: cover !important;
    }
    
    /* Fix text overflow */
    .article-card h3 {
        font-size: 1.3rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1rem !important;
        word-wrap: break-word !important;
    }
    
    .article-card p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }
    
    /* Fix buttons */
    .article-card .read-more {
        width: 100% !important;
        text-align: center !important;
        padding: 1rem !important;
        margin-top: 1rem !important;
    }
    
    /* Ensure container doesn't overflow */
    .main-content {
        overflow-x: hidden !important;
        width: 100% !important;
    }
    
    /* Fix any horizontal scrolling */
    body {
        overflow-x: hidden !important;
        width: 100% !important;
    }
}

/* 📱 EXTRA MOBILE PROTECTION */
@media (max-width: 480px) {
    .articles-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0.5rem !important;
    }
    
    .article-card {
        padding: 1rem !important;
        margin: 0 auto 1rem auto !important;
    }
    
    .article-card h3 {
        font-size: 1.2rem !important;
    }
}
/* 🔥 FIX FOR VIDEOS COMING OUT OF SCREEN ON MOBILE */
@media (max-width: 768px) {
    /* Reset any floating elements */
    .article-with-video,
    .video-sidebar,
    .article-media,
    .embedded-video,
    .article-container {
        float: none !important;
        width: 100% !important;
        margin: 0 auto 2rem auto !important;
        display: block !important;
        clear: both !important;
    }
    
    /* Fix video containers specifically */
    .article-video,
    .side-video,
    .video-embed,
    iframe[src*="youtube"],
    iframe[src*="vimeo"] {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        float: none !important;
        margin: 1rem auto !important;
        display: block !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    /* Ensure videos are responsive */
    .video-wrapper {
        position: relative !important;
        width: 100% !important;
        height: 0 !important;
        padding-bottom: 56.25% !important; /* 16:9 aspect ratio */
        margin: 1.5rem auto !important;
    }
    
    .video-wrapper iframe {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Fix text wrapping around videos */
    .article-content,
    .article-text,
    .post-content {
        width: 100% !important;
        float: none !important;
        clear: both !important;
    }
    
    /* Clear any floats */
    .clearfix::after {
        content: "" !important;
        clear: both !important;
        display: table !important;
    }
}

/* 🚨 EMERGENCY FIX - Add this to force mobile layout */
@media (max-width: 768px) {
    .article-card * {
        max-width: 100% !important;
        float: none !important;
    }
    
    /* Force stack layout instead of side-by-side */
    .article-card {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .article-card > * {
        order: 1 !important;
    }
    
    .article-card .video-sidebar {
        order: 2 !important;
        width: 100% !important;
        margin: 1rem 0 !important;
    }
}
/* 🔥 SPECIFIC FIX FOR THREE WHALE ROCK & COSMOLOGICAL ARTICLES */
@media (max-width: 768px) {
    /* Fix the Three Whale Rock article layout */
    #three-whale-rock .article-card > div[style*="display: flex"] {
        display: block !important;
        flex-direction: column !important;
    }
    
    #three-whale-rock .article-card > div[style*="display: flex"] > div {
        width: 100% !important;
        flex: none !important;
    }
    
    /* Fix the video container specifically */
    #three-whale-rock .article-video {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 250px !important;
        margin: 1rem 0 !important;
    }
    
    /* Fix Cosmological Models article */
    #cosmological-models > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        text-align: center !important;
    }
    
    #cosmological-models > div[style*="grid-template-columns"] > div {
        width: 100% !important;
    }
    
    /* Fix the grid inside cosmological article */
    #cosmological-models .age-grid {
        grid-template-columns: 1fr !important;
    }
}

/* 🚨 NUCLEAR OPTION - FORCE MOBILE LAYOUT */
@media (max-width: 768px) {

    
    /* Force videos to be responsive */
    .article-card video,
    .article-card iframe {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 200px !important;
    }
    
    /* Remove any fixed positioning */
    .article-card * {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
    }
}
/* Stop horizontal scrolling */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Ensure container doesn't overflow */
.wrap {
    max-width: 100%;
    overflow-x: hidden;
}
.full-article-content {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.full-article-content h3 {
    color: #00ffff;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.full-article-content h4 {
    color: #ffcc00;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.full-article-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.full-article-content li {
    margin-bottom: 0.5rem;
}



.article-card {
    background: #053061;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}

.article-card h2 {
    text-align: center;
    margin: 15px 0;
    color: white;
}

.article-image-container {
    text-align: center;
    margin: 20px 0;
}

.article-image {
    max-width: 100%;
    height: 200px;
    background: #2a4d8a;
    border-radius: 10px;
}

.buy-now-container {
    text-align: center;
    margin: 20px 0;
}

.buy-now-btn {
    display: inline-block;
    background: #ff9900;
    color: black;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    margin: 10px 0;
}

.read-more {
    display: block;
    width: 100%;
    background: #00ffff;
    color: #0a2f5e;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 20px;
    cursor: pointer;
}

footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 50px;
}

.site-header {
    text-align: center;
}

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

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

.article-card h1,
.article-card h2 {
    text-align: center;
}
/* CENTRALIZAR TÍTULOS */
.article-card h1,
.article-card h2 {
    text-align: center !important;
}

/* Centralizar a seção hero */
.article-card:first-child {
    text-align: center;
}

/* Centralizar os category tags */
.article-card:first-child div {
    justify-content: center;
    display: flex;
}

.article-card h1,
.article-card h2 {
    text-align: center;
}

.article-card:first-child {
    text-align: center;
}

.article-card:first-child > div {
    justify-content: center;
}

/* CENTRALIZAR TÍTULOS DO INÍCIO */
.site-header,
.site-title, 
.site-tagline,
.article-card h1 {
    text-align: center;
}

/* Centralizar os category tags */
.article-card:first-child > div {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
/* Evitar flickering */
* {
  -webkit-backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
/* Mobile styles */
@media screen and (max-width: 768px) {
  
  /* Containers para ocupar 100% da tela */
  .container {
    width: 95%;
    padding: 0 10px;
  }

  /* Menu responsivo */
  .nav ul {
    display: none; /* escondido por padrão no mobile */
    flex-direction: column;
    gap: 10px;
  }

  .mobile-menu-toggle {
    display: block;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
  }

  /* Mostrar menu quando ativo */
  .nav.active ul {
    display: flex;
  }

  /* Hero Section */
  .hero h2 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  /* Features / sections */
  .feature {
    padding: 15px 0;
  }
}
.calculator-container {
    position: relative; /* garante que absolutos filhos fiquem dentro */
    overflow: hidden;   /* evita que conteúdo extra pule */
}
/* 🔥 MOBILE FIXES FOR CHRONOCALCULATORS HOMEPAGE */
@media (max-width: 768px) {
    /* Ensure container doesn't overflow */
    .main-content {
        overflow-x: hidden !important;
        width: 100% !important;
    }

    /* Stop horizontal scrolling */
    body, html {
        overflow-x: hidden !important;
        width: 100% !important;
    }

    /* Calculadora */
    .calculator-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
        overflow: hidden !important;
    }

    .calculator-container iframe,
    .calculator-container table,
    .calculator-container img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }
}
/* ================== CSS SIMPLES E EFICAZ PARA ADS ================== */
.ad-container {
    width: 100% !important;
    min-height: 280px !important;
    margin: 2rem 0 !important;
    padding: 1rem !important;
    text-align: center !important;
    display: block !important;
    background: transparent !important;
    border: none !important;
}

.ad-container ins {
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
    min-height: 250px !important;
}

/* Remove qualquer borda ou fundo dos placeholders */
.ad-container iframe {
    border: none !important;
    background: transparent !important;
}

/* Mobile */
@media (max-width: 768px) {
    .ad-container {
        min-height: 250px !important;
        padding: 0.5rem !important;
        margin: 1.5rem 0 !important;
    }
    
    .ad-container ins {
        min-height: 200px !important;
    }
}

@media (max-width: 480px) {
    .ad-container {
        min-height: 200px !important;
        margin: 1rem 0 !important;
    }
    
    .ad-container ins {
        min-height: 150px !important;
    }
}

/* AD CONTAINER - FULL WIDTH & PROPERLY CENTERED */
.ad-container { 
  background: rgba(255,255,255,0.05); 
  border-radius: 15px; 
  padding: 25px; 
  margin: 3rem 0; 
  text-align: center; 
  width: 100%;
  display: block;
  position: relative;
}

.ad-container ins {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  text-align: center;
}

/* Ensure the ad script container takes full width */
.ad-container script {
  display: none; /* Hide the script tags */
}

/* RESPONSIVE */
@media(max-width:768px){
  .ad-container { 
    padding: 20px; 
    margin: 2.5rem 0;
    border-radius: 12px;
  }
}

@media(max-width:480px){
  .ad-container { 
    padding: 15px; 
    margin: 2rem 0;
    border-radius: 10px;
  }
}
/* ARTICLE CARDS - MOBILE OPTIMIZED */
.article-card {
  background: var(--card); 
  padding: 2rem; /* Reduced from 2.5rem */
  border-radius: 16px; 
  margin-bottom: 1.5rem; /* Reduced from 2rem */
  box-shadow: 0 8px 24px var(--shadow); 
  transition: all 0.3s ease; 
  border-left: 4px solid transparent;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px){
  .article-card { 
    padding: 1.25rem; /* Reduced from 1.5rem */
    margin-bottom: 1.25rem;
  }
  
  .article-card h2 {
    font-size: 1.5rem; /* Slightly smaller headings on mobile */
    line-height: 1.2;
  }
  
  .article-excerpt {
    font-size: 1rem; /* Standard size for better readability */
    line-height: 1.6;
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px){
  .article-card { 
    padding: 1rem; /* Minimal padding on small screens */
    margin-bottom: 1rem;
    border-radius: 12px;
  }
  
  .article-card h2 {
    font-size: 1.3rem;
  }
}