/*
Theme Name: MedicalTrends
Description: Tema personalizado para plataforma de formación médica
Version: 2.0.0
Author: Sasori (GarayWebs)
Text Domain: medicaltrends
*/

/* ===== VARIABLES ===== */
:root {
    --mt-primary: #1e3a5f;
    --mt-primary-light: #2d6cb4;
    --mt-primary-dark: #0c1e33;
    --mt-accent: #3b82f6;
    --mt-bg: #f8fafc;
    --mt-white: #ffffff;
    --mt-gray-50: #f8fafc;
    --mt-gray-100: #f1f5f9;
    --mt-gray-200: #e2e8f0;
    --mt-gray-300: #cbd5e1;
    --mt-gray-500: #64748b;
    --mt-gray-600: #475569;
    --mt-gray-700: #334155;
    --mt-gray-800: #1e293b;
    --mt-gray-900: #0f172a;
    --mt-success: #10b981;
    --mt-warning: #f59e0b;
    --mt-danger: #ef4444;
    --mt-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mt-radius: 12px;
    --mt-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --mt-shadow-md: 0 4px 12px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.03);
    --mt-shadow-lg: 0 12px 24px rgba(0,0,0,0.06), 0 4px 8px rgba(0,0,0,0.03);
    --mt-max-width: 1200px;
    --mt-sidebar-width: 280px;
    --mt-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--mt-gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--mt-gray-500); }
* { scrollbar-width: thin; scrollbar-color: var(--mt-gray-300) transparent; }

body {
    font-family: var(--mt-font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--mt-gray-800);
    background: var(--mt-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--mt-accent);
    text-decoration: none;
    transition: color 0.3s var(--mt-ease);
}
a:hover { color: var(--mt-primary-light); text-decoration: none; }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
    font-family: var(--mt-font-sans);
    color: var(--mt-primary);
    line-height: 1.3;
    font-weight: 700;
}

/* ===== HEADER ===== */
.mt-header {
    background: rgba(12, 30, 51, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--mt-white);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mt-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--mt-max-width);
    margin: 0 auto;
    padding: 16px 24px;
}

.mt-header-logos {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mt-header-logos img {
    height: 40px;
    width: auto;
}

.mt-header-title {
    font-family: var(--mt-font-sans);
    font-size: 20px;
    font-weight: 700;
    color: var(--mt-white);
    letter-spacing: -0.3px;
}

.mt-header-sponsors {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.mt-header-sponsors img {
    height: 30px;
    opacity: 0.8;
    transition: opacity 0.3s var(--mt-ease);
}

.mt-header-sponsors img:hover { opacity: 1; }

.mt-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mt-header-actions a {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s var(--mt-ease);
    font-weight: 500;
}

.mt-header-actions a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--mt-white);
    text-decoration: none;
}

.mt-btn-login {
    background: var(--mt-accent) !important;
    color: var(--mt-white) !important;
    font-weight: 600;
}

.mt-btn-login:hover {
    background: var(--mt-primary-light) !important;
    transform: translateY(-1px);
}

/* ===== LAYOUT ===== */
.mt-layout {
    display: flex;
    max-width: var(--mt-max-width);
    margin: 0 auto;
    min-height: calc(100vh - 120px);
}

/* ===== SIDEBAR ===== */
.mt-sidebar {
    width: var(--mt-sidebar-width);
    background: var(--mt-white);
    border-right: 1px solid var(--mt-gray-200);
    padding: 24px 0;
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    overflow-y: auto;
    flex-shrink: 0;
    animation: slideInLeft 0.4s var(--mt-ease);
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.mt-sidebar-nav {
    list-style: none;
}

.mt-sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    color: var(--mt-gray-600);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s var(--mt-ease);
    border-left: 3px solid transparent;
    position: relative;
}

.mt-sidebar-nav li a:hover {
    background: var(--mt-gray-50);
    color: var(--mt-primary);
    text-decoration: none;
    padding-left: 28px;
}

.mt-sidebar-nav li a.active {
    color: var(--mt-primary);
    background: rgba(59,130,246,0.06);
    border-left-color: var(--mt-accent);
    font-weight: 600;
}

.mt-sidebar-nav li a .mt-nav-icon {
    width: 22px;
    text-align: center;
    font-size: 15px;
    flex-shrink: 0;
}

.mt-sidebar-nav li a .mt-nav-icon i {
    color: var(--mt-gray-500);
    font-size: 15px;
    transition: color 0.3s var(--mt-ease);
}

.mt-sidebar-nav li a:hover .mt-nav-icon i,
.mt-sidebar-nav li a.active .mt-nav-icon i {
    color: var(--mt-accent);
}

.mt-sidebar-progress {
    margin: 20px 24px;
    padding: 18px;
    background: var(--mt-gray-50);
    border-radius: var(--mt-radius);
    border: 1px solid var(--mt-gray-100);
}

.mt-sidebar-progress h4 {
    font-family: var(--mt-font-sans);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--mt-gray-500);
    margin-bottom: 10px;
    font-weight: 600;
}

.mt-progress-bar {
    height: 6px;
    background: var(--mt-gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.mt-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mt-accent), var(--mt-success));
    background-size: 200% 100%;
    border-radius: 3px;
    transition: width 0.6s var(--mt-ease);
    animation: progressGradient 3s ease infinite;
}

@keyframes progressGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.mt-progress-text {
    font-size: 12px;
    color: var(--mt-gray-500);
    margin-top: 6px;
}

/* ===== MAIN CONTENT ===== */
.mt-main {
    flex: 1;
    padding: 32px 40px;
    max-width: calc(var(--mt-max-width) - var(--mt-sidebar-width));
}

.mt-content-section {
    background: var(--mt-white);
    border-radius: var(--mt-radius);
    box-shadow: var(--mt-shadow);
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid var(--mt-gray-100);
    transition: transform 0.3s var(--mt-ease), box-shadow 0.3s var(--mt-ease);
}

.mt-content-section:hover {
    box-shadow: var(--mt-shadow-md);
}

.mt-content-section h2 {
    font-size: 24px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--mt-gray-100);
    letter-spacing: -0.3px;
}

.mt-content-section h2 i {
    margin-right: 8px;
    color: var(--mt-accent);
}

.mt-content-section h3 {
    font-size: 18px;
    margin: 20px 0 12px;
}

.mt-content-section h3 i {
    margin-right: 6px;
    color: var(--mt-accent);
}

.mt-content-section p {
    margin-bottom: 16px;
    color: var(--mt-gray-700);
}

/* ===== FADE-IN ANIMATION ===== */
.mt-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--mt-ease), transform 0.6s var(--mt-ease);
}

.mt-fade-in.mt-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== ARTICLE CARDS ===== */
.mt-article-card {
    border: 1px solid var(--mt-gray-200);
    border-radius: var(--mt-radius);
    padding: 24px;
    margin-bottom: 16px;
    transition: transform 0.3s var(--mt-ease), box-shadow 0.3s var(--mt-ease);
}

.mt-article-card:hover {
    box-shadow: var(--mt-shadow-md);
    transform: translateY(-2px);
}

.mt-article-card h3 {
    margin: 0 0 8px;
}

.mt-article-card .mt-article-authors {
    font-size: 14px;
    color: var(--mt-gray-500);
    margin-bottom: 12px;
}

.mt-article-card .mt-article-abstract {
    font-size: 15px;
    line-height: 1.7;
}

.mt-article-card .mt-article-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
}

/* ===== VIDEO SECTION ===== */
.mt-video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--mt-radius);
    background: #000;
    margin-bottom: 16px;
}

.mt-video-container iframe,
.mt-video-container video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* ===== PDF VIEWER ===== */
.mt-pdf-section {
    text-align: center;
}

.mt-pdf-section iframe {
    width: 100%;
    height: 600px;
    border: 1px solid var(--mt-gray-200);
    border-radius: var(--mt-radius);
}

.mt-pdf-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--mt-primary);
    color: var(--mt-white);
    border-radius: var(--mt-radius);
    font-weight: 600;
    margin-top: 16px;
    transition: all 0.3s var(--mt-ease);
}

.mt-pdf-download:hover {
    background: var(--mt-primary-light);
    color: var(--mt-white);
    text-decoration: none;
    transform: translateY(-1px);
}

/* ===== BUTTONS ===== */
.mt-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--mt-radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.3s var(--mt-ease);
}

.mt-btn:hover {
    transform: translateY(-1px);
}

.mt-btn:active {
    transform: translateY(0) scale(0.98);
}

.mt-btn i {
    font-size: 14px;
}

.mt-btn-primary {
    background: var(--mt-primary);
    color: var(--mt-white);
}

.mt-btn-primary:hover {
    background: var(--mt-primary-light);
    color: var(--mt-white);
    text-decoration: none;
    box-shadow: var(--mt-shadow-md);
}

.mt-btn-outline {
    background: transparent;
    color: var(--mt-primary);
    border: 1.5px solid var(--mt-gray-300);
}

.mt-btn-outline:hover {
    background: var(--mt-primary);
    color: var(--mt-white);
    text-decoration: none;
    border-color: var(--mt-primary);
    box-shadow: var(--mt-shadow-md);
}

/* ===== ADS ===== */
.mt-ad-sidebar {
    margin: 20px 24px;
    padding: 0;
}

.mt-ad-sidebar img {
    width: 100%;
    border-radius: var(--mt-radius);
}

.mt-ad-banner {
    text-align: center;
    padding: 16px;
    background: var(--mt-gray-50);
    border-radius: var(--mt-radius);
    margin-bottom: 24px;
}

/* ===== FOOTER ===== */
.mt-footer {
    background: var(--mt-primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 40px 24px;
    text-align: center;
    font-size: 13px;
}

.mt-footer a {
    color: rgba(255,255,255,0.9);
    transition: color 0.3s var(--mt-ease);
}

.mt-footer a:hover { color: var(--mt-white); }

.mt-footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.mt-footer-disclaimer {
    max-width: 800px;
    margin: 16px auto 0;
    font-size: 11px;
    line-height: 1.6;
    color: rgba(255,255,255,0.4);
}

/* ===== LANDING (pre-login) ===== */
.mt-landing-hero {
    background: linear-gradient(160deg, var(--mt-primary-dark) 0%, #1e3a5f 40%, var(--mt-primary-light) 100%);
    color: var(--mt-white);
    padding: 120px 24px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.mt-landing-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}
.mt-landing-hero-inner {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.mt-hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 20px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
    animation: fadeInDown 0.8s ease;
}
.mt-landing-hero h1 {
    font-size: 52px;
    color: var(--mt-white);
    margin-bottom: 8px;
    letter-spacing: -1px;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease;
}
.mt-landing-hero h1 span {
    color: rgba(255,255,255,0.6);
    font-weight: 400;
    font-size: 36px;
}
.mt-landing-hero > .mt-landing-hero-inner > p {
    font-size: 17px;
    color: rgba(255,255,255,0.8);
    max-width: 560px;
    margin: 16px auto 36px;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease 0.1s both;
}
.mt-hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.2s both;
}
.mt-btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mt-btn-hero-primary {
    background: #fff;
    color: var(--mt-primary);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.mt-btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    text-decoration: none;
    color: var(--mt-primary-dark);
}
.mt-btn-hero-outline {
    background: var(--mt-primary);
    color: #fff;
    border: 2px solid var(--mt-primary);
}
.mt-btn-hero-outline:hover {
    background: var(--mt-primary-dark);
    border-color: var(--mt-primary-dark);
    transform: translateY(-2px);
    text-decoration: none;
    color: #fff;
}
.mt-hero-note {
    margin-top: 28px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    animation: fadeInUp 0.8s ease 0.3s both;
}
.mt-hero-note code {
    background: rgba(255,255,255,0.12);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Landing sections */
.mt-landing-section {
    padding: 80px 24px;
}
.mt-landing-container {
    max-width: 1000px;
    margin: 0 auto;
}
.mt-landing-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
.mt-landing-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--mt-gray-500);
    margin-bottom: 48px;
}

/* Features grid */
.mt-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.mt-feature-card {
    background: var(--mt-white);
    border: 1px solid var(--mt-gray-200);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mt-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    border-color: var(--mt-primary-light);
}
.mt-feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(26,54,93,0.08), rgba(43,108,176,0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
    color: var(--mt-primary);
    transition: all 0.3s ease;
}
.mt-feature-card:hover .mt-feature-icon {
    background: linear-gradient(135deg, var(--mt-primary), var(--mt-primary-light));
    color: #fff;
    transform: scale(1.08);
}
.mt-feature-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    font-family: var(--mt-font-sans);
    font-weight: 700;
}
.mt-feature-card p {
    font-size: 14px;
    color: var(--mt-gray-500);
    line-height: 1.6;
}

/* Steps */
.mt-landing-how {
    background: var(--mt-gray-50);
}
.mt-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}
.mt-step {
    text-align: center;
    max-width: 240px;
    padding: 0 16px;
}
.mt-step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mt-primary), var(--mt-primary-light));
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 16px rgba(26,54,93,0.25);
    transition: transform 0.3s ease;
}
.mt-step:hover .mt-step-number {
    transform: scale(1.1);
}
.mt-step h3 {
    font-size: 16px;
    margin-bottom: 8px;
    font-family: var(--mt-font-sans);
    font-weight: 700;
}
.mt-step p {
    font-size: 14px;
    color: var(--mt-gray-500);
    line-height: 1.6;
}
.mt-step code {
    background: var(--mt-gray-200);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
}
.mt-step-connector {
    width: 60px;
    height: 2px;
    background: var(--mt-gray-300);
    margin-top: 24px;
    flex-shrink: 0;
}

/* Stats */
.mt-landing-stats {
    background: linear-gradient(160deg, var(--mt-primary-dark), var(--mt-primary));
    color: #fff;
}
.mt-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}
.mt-stat-number {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 4px;
}
.mt-stat-label {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

/* Audience */
.mt-audience-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.mt-audience-card {
    background: var(--mt-white);
    border: 1px solid var(--mt-gray-200);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mt-audience-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.mt-audience-card i {
    font-size: 28px;
    color: var(--mt-primary);
    margin-bottom: 14px;
    display: block;
}
.mt-audience-card h3 {
    font-size: 15px;
    margin-bottom: 6px;
    font-family: var(--mt-font-sans);
    font-weight: 700;
}
.mt-audience-card p {
    font-size: 13px;
    color: var(--mt-gray-500);
    line-height: 1.5;
}

/* CTA */
.mt-landing-cta {
    background: var(--mt-gray-50);
    text-align: center;
    padding: 80px 24px;
}
.mt-landing-cta h2 {
    font-size: 32px;
    margin-bottom: 12px;
}
.mt-landing-cta p {
    font-size: 16px;
    color: var(--mt-gray-500);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.mt-anim {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.mt-anim.mt-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .mt-layout {
        flex-direction: column;
    }
    .mt-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 1px solid var(--mt-gray-200);
        animation: none;
    }
    .mt-sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 0 12px;
    }
    .mt-sidebar-nav li a {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 12px 16px;
    }
    .mt-sidebar-nav li a:hover {
        padding-left: 16px;
    }
    .mt-sidebar-nav li a.active {
        border-left-color: transparent;
        border-bottom-color: var(--mt-accent);
    }
    .mt-sidebar-progress, .mt-ad-sidebar {
        display: none;
    }
    .mt-main {
        padding: 20px 16px;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .mt-header-top {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
    }
    .mt-header-sponsors { display: none; }
    .mt-landing-hero { padding: 80px 16px 60px; }
    .mt-landing-hero h1 { font-size: 32px; }
    .mt-landing-hero h1 span { font-size: 24px; }
    .mt-features-grid { grid-template-columns: 1fr; }
    .mt-steps { flex-direction: column; align-items: center; }
    .mt-step-connector { width: 2px; height: 30px; }
    .mt-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .mt-audience-grid { grid-template-columns: repeat(2, 1fr); }
    .mt-content-section { padding: 20px; }
    .mt-pdf-section iframe { height: 400px; }
}

@media (max-width: 480px) {
    .mt-header-actions { flex-wrap: wrap; justify-content: center; }
    .mt-content-section h2 { font-size: 20px; }
}
