/* 
   Investigacion.css - Estilos Premium para Informe Cientifico 
   Victhor Artwell 2025
*/

:root {
    --research-bg: #fdfdfd;
    --card-bg: #ffffff;
    --accent-green-light: #f0f7f0;
    --accent-green-main: #2d6a4f;
    --accent-green-dark: #1b4332;
    --stat-bg: #8AC68A;
    --text-primary: #1a1c1e;
    --text-secondary: #4a4d50;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

body {
    background-color: var(--research-bg);
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* HERO SECTION */
.research-hero {
    background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
    padding: 100px 0 80px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.research-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.research-hero .badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

.research-hero h1 {
    font-family: 'Lora', serif !important;
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 700;
}

.research-summary {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 700px;
    margin-bottom: 40px;
    opacity: 0.95;
    font-weight: 300;
}

/* STAT GRID */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
    backdrop-filter: blur( 4px );
    -webkit-backdrop-filter: blur( 4px );
    border: 1px solid rgba( 255, 255, 255, 0.18 );
    padding: 24px;
    border-radius: var(--radius);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #8AC68A;
}

.stat-label {
    font-size: 0.9rem;
    line-height: 1.3;
    opacity: 0.9;
}

/* META BAR */
.meta-bar {
    display: flex;
    gap: 30px;
    font-size: 0.9rem;
    opacity: 0.8;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* PAGE BODY LAYOUT */
.page-body {
    padding: 60px 0;
}

.page-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 60px;
    align-items: start;
}

/* TOC NAV */
.toc-nav {
    position: sticky;
    top: 100px;
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid #eee;
}

.toc-nav h4 {
    margin: 0 0 16px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.toc-nav a {
    display: block;
    padding: 8px 0;
    font-size: 0.92rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
    border-bottom: 1px solid #f9f9f9;
}

.toc-nav a:last-child {
    border-bottom: none;
}

.toc-nav a:hover {
    color: var(--accent-green-main);
}

/* ARTICLE SECTIONS */
.article-section {
    margin-bottom: 80px;
}

.article-section h2 {
    font-family: 'Lora', serif !important;
    font-size: 2.2rem;
    margin-bottom: 24px;
    color: var(--accent-green-dark);
}

.section-intro {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 30px;
    color: var(--text-primary);
}

/* FINDING CALLOUT */
.finding-callout {
    background-color: var(--accent-green-light);
    border-left: 5px solid var(--accent-green-main);
    padding: 24px;
    font-size: 1.1rem;
    line-height: 1.6;
    font-style: italic;
    color: var(--accent-green-dark);
}

/* INTERSTITIAL ADS */
.interstitial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Fondo oscuro profundo */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
    transition: opacity 0.5s ease;
}

.research-banner {
    background: linear-gradient(135deg, #f0ffed 0%, #ffffff 100%);
    border: 3px solid #8AC68A;
    border-radius: 20px; /* Bordes más redondeados para PopUp */
    padding: 40px;
    max-width: 800px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: visible; /* Para que la X pueda sobresalir si se desea */
    transform: scale(0.9);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.interstitial-overlay.show-active {
    display: flex !important;
    opacity: 1;
}

.interstitial-overlay.show-active .research-banner {
    transform: scale(1);
}

.close-banner {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #1b4332;
    border: 2px solid white;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 10001;
    transition: all 0.2s;
}

.close-banner:hover {
    background: #c62828;
    transform: rotate(90deg) scale(1.1);
}

.research-banner::before {
    content: 'PATROCINADO';
    position: absolute;
    top: 0;
    right: 0;
    background: #8AC68A;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 0 0 0 10px;
    letter-spacing: 1px;
}

.research-banner .banner-content {
    flex: 1;
}

.research-banner h3 {
    color: var(--accent-green-dark);
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-family: 'Lora', serif;
}

.research-banner p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.research-banner .banner-image {
    width: 200px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.research-banner .banner-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

@media (max-width: 768px) {
    .research-banner {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    .research-banner .banner-image {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
}

/* PATHWAY GRID */
.pathway-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.pathway-box {
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.pathway-box:hover {
    transform: translateY(-5px);
}

.pathway-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.pathway-box h4 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.metabolic { background: #E8F5E9; border-top: 4px solid #4CAF50; }
.neural { background: #E3F2FD; border-top: 4px solid #2196F3; }
.immune { background: #FFF3E0; border-top: 4px solid #FF9800; }

/* GLASS PANEL */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    margin: 40px 0;
}

/* RCT TABLES */
.rct-table-wrap {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: var(--radius);
}

.rct-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.rct-table th {
    background-color: #f8f9fa;
    text-align: left;
    padding: 16px;
    border-bottom: 2px solid #eee;
    color: var(--text-primary);
    font-weight: 600;
}

.rct-table td {
    padding: 16px;
    border-bottom: 1px solid #eee;
    line-height: 1.5;
}

.rct-table tr:nth-child(even) {
    background-color: #fafafa;
}

/* BADGES IN TABLES */
.badge-positive { padding: 4px 8px; border-radius: 4px; background: #C8E6C9; color: #2E7D32; font-weight: 500; font-size: 0.8rem; }
.badge-neutral { padding: 4px 8px; border-radius: 4px; background: #FFF9C4; color: #F57F17; font-weight: 500; font-size: 0.8rem; }

/* MECH CARDS */
.mechcards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.info-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid #f0f0f0;
}

/* CHART BOX */
.chart-container {
    height: 350px;
    margin-top: 20px;
}

/* DIET GRID */
.diet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.diet-card {
    padding: 30px;
    border-radius: var(--radius);
    color: white;
}

.diet-accent-1 { background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); }
.diet-accent-2 { background: linear-gradient(135deg, #2d6a4f 0%, #40916c 100%); }
.diet-accent-3 { background: linear-gradient(135deg, #744d95 0%, #9b6bc3 100%); }

.diet-card h4 { margin-bottom: 16px; font-size: 1.3rem; }
.diet-card p { opacity: 0.9; font-size: 0.95rem; line-height: 1.6; }

/* SAFETY BOXES */
.safety-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.safety-box {
    padding: 30px;
    border-radius: var(--radius);
}

.safety-ok { background-color: #f0f7f0; border-top: 4px solid #2d6a4f; }
.safety-warn { background-color: #fff8e1; border-top: 4px solid #ffc107; }

.safety-box h4 { margin-top: 0; margin-bottom: 20px; font-size: 1.1rem; }
.safety-box ul { padding-left: 20px; }
.safety-box li { margin-bottom: 10px; font-size: 0.92rem; }

/* TIPS GRID */
.tips-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tip-box {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: rgba(255,255,255,0.5);
    border-radius: 12px;
}

.tip-icon { font-size: 1.5rem; margin-bottom: 8px; }

/* DISCLAIMER SECTION */
.disclaimer-section {
    background-color: #f8f9fa;
    padding: 60px 0;
    border-top: 1px solid #eee;
}

.disclaimer-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.disclaimer-box {
    background: #fff;
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid #e0e0e0;
}

.disclaimer-box h3 {
    margin-top: 0;
    color: #c62828;
    margin-bottom: 20px;
}

.disclaimer-box p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 14px;
}

/* SOURCES SECTION */
.sources-section {
    padding: 80px 0;
    background-color: #fff;
}

.sources-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.source-item {
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.source-link {
    color: var(--accent-green-main);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-top: 8px;
}

.source-link:hover {
    text-decoration: underline;
}

/* MOBILE RESPONSIVE */
@media (max-width: 992px) {
    .page-layout {
        grid-template-columns: minmax(0, 1fr);
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box;
    }
    .toc-nav {
        display: none; /* Ocultar TOC en tablet/movil para enfoque en lectura */
    }
}

@media (max-width: 768px) {
    .research-hero { padding: 80px 0 60px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .meta-bar { flex-direction: column; gap: 10px; }
    .safety-grid, .tips-grid { grid-template-columns: 1fr; }
    .article-section h2 { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    .page-layout {
        display: block !important;
        width: 100% !important;
    }
    .stat-grid { 
        grid-template-columns: 1fr !important;
        gap: 15px;
        width: 100% !important;
    }
    .rct-table-wrap {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        margin: 20px 0 !important;
        display: block !important;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }
    .rct-table {
        min-width: 500px !important;
        width: 100% !important;
    }
    .article-section h2 { font-size: 1.4rem; line-height: 1.3; word-break: break-word; }
    .finding-callout { font-size: 0.95rem; padding: 16px; margin-left: 0; margin-right: 0; border-radius: 8px; }
    .page-body { padding: 30px 0; }
    .stat-card { padding: 15px; }
    .stat-value { font-size: 1.5rem; }
    .research-hero h1 { font-size: 1.8rem !important; word-break: break-word; }
}
