:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-orange: #f59e0b;
    /* PMP / Certificación */
    --accent-blue: #3b82f6;
    /* PMBOK / Professional */
    --accent-green: #10b981;
    /* Agile */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* --- HEADER --- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #334155;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 2rem;
}

.logo span {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filters button {
    background: transparent;
    border: 1px solid #334155;
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.filters button.active,
.filters button:hover {
    background: var(--accent-orange);
    color: #000;
    border-color: var(--accent-orange);
    font-weight: 600;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(59, 130, 246, 0.1));
    padding: 3rem 2rem;
    text-align: center;
    border-bottom: 1px solid #334155;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Content Wrapper with Sidebar */
.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem 2rem;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-orange) var(--bg-card);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--bg-card);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--accent-orange);
    border-radius: 10px;
}

.sidebar-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #334155;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.filters-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid #334155;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    text-align: left;
}

.filter-btn:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    background: rgba(245, 158, 11, 0.05);
}

.filter-btn.active {
    background: var(--accent-orange);
    color: #000;
    border-color: var(--accent-orange);
    font-weight: 600;
}

.filter-icon {
    font-size: 1.2rem;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-orange);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Main Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #334155;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-orange);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.2);
}

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.source-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    background: var(--accent-orange);
    color: #000;
}

.category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.badge-certificacion {
    background: var(--accent-orange);
    color: #000;
}

.badge-pmbok {
    background: var(--accent-blue);
    color: #fff;
}

.badge-agile {
    background: var(--accent-green);
    color: #000;
}

.badge-ia {
    background: #a855f7;
    color: #fff;
}

.badge-quick {
    background: #ef4444;
    color: #fff;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.card-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #334155;
}

.action-btn {
    background: transparent;
    border: 1px solid #334155;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.action-btn:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.action-btn.active {
    background: var(--accent-orange);
    color: #000;
    border-color: var(--accent-orange);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(245, 158, 11, 0.1);
    border-top-color: var(--accent-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Smart Reader Drawer */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.drawer {
    position: fixed;
    top: 0;
    right: -700px;
    width: 650px;
    height: 100%;
    background: var(--bg-dark);
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    transition: var(--transition);
    border-left: 1px solid #334155;
}

.drawer-open .drawer-overlay {
    opacity: 1;
    visibility: visible;
}

.drawer-open .drawer {
    right: 0;
}

.drawer-header {
    padding: 2rem;
    border-bottom: 1px solid #334155;
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(5px);
    z-index: 10;
}

.drawer-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--accent-orange);
}

.drawer-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.drawer-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.drawer-body {
    padding: 2rem;
    line-height: 1.8;
    color: #cbd5e1;
}

.drawer-body h2 {
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}

.drawer-body p {
    margin-bottom: 1rem;
}

.drawer-body a {
    color: var(--accent-orange);
    text-decoration: none;
}

.drawer-body a:hover {
    text-decoration: underline;
}

/* PMBOK Processes Section */
.pmbok-section {
    background: var(--bg-card);
    padding: 3rem 2rem;
    margin: 2rem 0;
    border-top: 1px solid #334155;
    border-bottom: 1px solid #334155;
}

.pmbok-container {
    max-width: 1400px;
    margin: 0 auto;
}

.pmbok-header {
    text-align: center;
    margin-bottom: 3rem;
}

.pmbok-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pmbok-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.focus-area {
    margin-bottom: 3rem;
}

.focus-area-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-orange);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-orange);
}

.processes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.process-card {
    background: var(--bg-dark);
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.process-card:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.2);
}

.process-header {
    background: #000;
    color: #fff;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.process-number {
    font-weight: 700;
    font-size: 1.2rem;
}

.process-domain {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.process-title-section {
    background: #e5e7eb;
    color: #000;
    padding: 1.5rem;
    transition: var(--transition);
}

.process-name {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

/* Botón de expansión en la parte inferior */
.process-expand-btn {
    width: 100%;
    background: #e5e7eb;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    color: #000;
    font-weight: 600;
    font-size: 0.9rem;
    border-top: 1px solid #d1d5db;
}

.process-expand-btn:hover {
    background: #d1d5db;
    color: var(--accent-orange);
}

.process-expand-btn .expand-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    animation: bounce 2s ease-in-out infinite;
}

.process-expand-btn .expand-text {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

.process-card.expanded .process-expand-btn .expand-icon {
    transform: rotate(180deg);
    animation: none;
}

.process-card.expanded .process-expand-btn .expand-text::before {
    content: 'Ocultar detalles';
}

.process-card:not(.expanded) .process-expand-btn .expand-text::before {
    content: 'Ver detalles';
}

.process-details {
    background: #f3f4f6;
    color: #000;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.process-card.expanded .process-details {
    max-height: 2000px;
}

.process-section {
    padding: 1.5rem;
    border-bottom: 1px solid #d1d5db;
}

.process-section:last-child {
    border-bottom: none;
}

.process-section-title {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.process-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.process-section li {
    padding: 0.25rem 0 0.25rem 1.5rem;
    position: relative;
    line-height: 1.5;
}

.process-section li:before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    font-weight: bold;
}

.process-section li ul {
    margin-top: 0.25rem;
}

.process-section li ul li:before {
    content: "-";
    left: 0.25rem;
}

/* AI Explanation Modal */
.ai-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.ai-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.ai-modal {
    background: var(--bg-card);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--accent-orange);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.ai-modal-overlay.active .ai-modal {
    transform: scale(1);
}

.ai-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(245, 158, 11, 0.1);
}

.ai-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-orange);
    margin: 0;
}

.ai-modal-close {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-modal-close:hover {
    color: var(--accent-orange);
    transform: rotate(90deg);
}

.ai-modal-controls {
    padding: 1rem 1.5rem;
    background: rgba(245, 158, 11, 0.05);
    border-bottom: 1px solid #334155;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-session-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-dark);
    border: 1px solid #334155;
    border-radius: 8px;
}

.session-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.session-status.logged-in {
    color: var(--accent-green);
}

.session-icon {
    font-size: 1.2rem;
}

.session-action-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--accent-orange);
    color: var(--accent-orange);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.session-action-btn:hover {
    background: var(--accent-orange);
    color: #000;
}

.session-action-btn.logout {
    border-color: #ef4444;
    color: #ef4444;
}

.session-action-btn.logout:hover {
    background: #ef4444;
    color: #fff;
}

.ai-personalization-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.ai-context-input {
    flex: 1;
    padding: 0.625rem 1rem;
    background: var(--bg-dark);
    border: 1px solid #334155;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.ai-context-input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.ai-context-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.ai-regenerate-btn {
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--accent-orange), #ef4444);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-regenerate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.ai-regenerate-btn:active {
    transform: translateY(0);
}

.ai-regenerate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ai-modal-body {
    padding: 2rem;
    color: var(--text-primary);
}

.ai-loading {
    text-align: center;
    padding: 3rem 2rem;
}

.ai-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(245, 158, 11, 0.1);
    border-top-color: var(--accent-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.ai-explanation h4 {
    color: var(--accent-orange);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.ai-explanation h4:first-child {
    margin-top: 0;
}

.ai-explanation p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.ai-explanation ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.ai-explanation li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.ai-explanation strong {
    color: var(--accent-orange);
}

/* Clickable Items */
.clickable-item {
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--accent-blue);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: rgba(59, 130, 246, 0.4);
    text-underline-offset: 2px;
    font-weight: 500;
    position: relative;
    padding: 1px 0;
}

.clickable-item::before {
    content: '✨';
    font-size: 0.7em;
    margin-right: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.clickable-item:hover::before {
    opacity: 1;
}

.clickable-item:hover {
    color: var(--accent-orange);
    text-decoration-color: var(--accent-orange);
    text-decoration-style: solid;
    background: rgba(245, 158, 11, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    margin: -2px -6px;
}

.clickable-item:active {
    transform: scale(0.98);
    background: rgba(245, 158, 11, 0.15);
}

.process-name.clickable-item {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.process-name.clickable-item::before {
    content: '💡';
    font-size: 0.85em;
    margin-right: 6px;
    opacity: 0.6;
}

.process-name.clickable-item:hover {
    color: var(--accent-orange);
    background: rgba(245, 158, 11, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    margin: -4px -8px;
}

.process-name.clickable-item:hover::before {
    opacity: 1;
}

/* PMBOK Visual Map */
.pmbok-visual-map {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid #334155;
}

.pmbok-visual-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-orange);
    text-align: center;
    margin-bottom: 0.5rem;
}

.pmbok-visual-description {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.pmbok-visual-link {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    cursor: pointer;
}

.pmbok-visual-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.4);
}

.pmbok-visual-image {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.pmbok-visual-link:hover .pmbok-visual-image {
    opacity: 0.9;
}

.pmbok-visual-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transition: var(--transition);
}

.pmbok-visual-link:hover .pmbok-visual-overlay {
    opacity: 1;
}

.pmbok-visual-icon {
    font-size: 3rem;
}

.pmbok-visual-text {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Premium Coming Soon Banner */
.premium-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(59, 130, 246, 0.15));
    border: 2px solid var(--accent-orange);
    border-left: none;
    border-right: none;
    padding: 3rem 2rem;
    margin: 0;
}

.premium-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.premium-icon {
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.premium-content {
    flex: 1;
}

.premium-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.premium-badge {
    background: linear-gradient(135deg, var(--accent-orange), #ef4444);
    color: #000;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.premium-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.premium-description strong {
    color: var(--accent-orange);
    font-weight: 700;
}

.premium-highlight {
    display: block;
    margin-top: 0.5rem;
    color: var(--accent-blue);
    font-weight: 600;
}

.premium-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.premium-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.feature-icon {
    font-size: 1.5rem;
}

.premium-cta {
    background: linear-gradient(135deg, var(--accent-orange), #ef4444);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.premium-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.5);
}

.premium-cta:active {
    transform: translateY(0);
}

.cta-arrow {
    font-size: 1.3rem;
    transition: transform 0.3s;
}

.premium-cta:hover .cta-arrow {
    transform: translateX(5px);
}

/* User Login Modal */
.user-login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10002;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.user-login-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.user-login-modal {
    background: var(--bg-card);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--accent-orange);
    transform: scale(0.9);
    transition: transform 0.3s;
    position: relative;
}

.user-login-modal-overlay.active .user-login-modal {
    transform: scale(1);
}

.user-login-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.user-login-modal-close:hover {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-orange);
}

.user-login-modal h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--accent-orange);
    text-align: center;
}

.user-login-modal p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-align: center;
}

.user-login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-login-form input {
    padding: 0.875rem 1.25rem;
    background: var(--bg-dark);
    border: 1px solid #334155;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.user-login-form input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.user-login-form button {
    background: linear-gradient(135deg, var(--accent-orange), #ef4444);
    color: #000;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.user-login-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.user-login-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.user-login-success {
    display: none;
    text-align: center;
    padding: 2rem;
}

.user-login-success.active {
    display: block;
}

/* Interest Modal */
.interest-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.interest-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.interest-modal {
    background: var(--bg-card);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--accent-orange);
    transform: scale(0.9);
    transition: transform 0.3s;
    position: relative;
}

.interest-modal-overlay.active .interest-modal {
    transform: scale(1);
}

.interest-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.interest-modal-close:hover {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-orange);
}

.interest-modal h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--accent-orange);
}

.interest-modal p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.interest-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.interest-form input {
    padding: 0.875rem 1.25rem;
    background: var(--bg-dark);
    border: 1px solid #334155;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.interest-form input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.interest-form button {
    background: linear-gradient(135deg, var(--accent-orange), #ef4444);
    color: #000;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.interest-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.interest-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.success-message {
    display: none;
    text-align: center;
    padding: 2rem;
}

.success-message.active {
    display: block;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.success-message h4 {
    font-size: 1.5rem;
    color: var(--accent-green);
    margin-bottom: 0.5rem;
}

.success-message p {
    color: var(--text-secondary);
}

/* TodoPMP Studio Widget */
.studio-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #f59e0b, #3b82f6);
    border-radius: 50%;
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.3s;
    z-index: 9999;
    animation: pulse 2s ease-in-out infinite;
    padding: 12px;
    overflow: hidden;
}

.studio-fab img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 40px rgba(245, 158, 11, 0.6);
    }
}

.studio-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(245, 158, 11, 0.6);
}

.studio-fab.open {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    animation: none;
}

.studio-fab.open img {
    filter: brightness(1.2);
}

/* Studio Panel */
.studio-panel {
    position: fixed;
    bottom: 0;
    right: -500px;
    width: 450px;
    height: 85vh;
    max-height: 800px;
    background: var(--bg-dark);
    border: 2px solid var(--accent-orange);
    border-radius: 12px 12px 0 0;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.studio-panel.open {
    right: 2rem;
}

/* Studio Header */
.studio-header {
    background: linear-gradient(135deg, #f59e0b, #3b82f6);
    padding: 1.5rem;
    border-radius: 10px 10px 0 0;
    position: relative;
}

.studio-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: #000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.studio-header p {
    margin: 0.5rem 0 0 0;
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.7);
    font-weight: 500;
}

.studio-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 50%;
    color: #000;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.studio-close:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: rotate(90deg);
}

/* Progress Bar */
.studio-progress-container {
    padding: 1rem 1.5rem;
    background: rgba(245, 158, 11, 0.05);
    border-bottom: 1px solid #334155;
}

.studio-progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.studio-progress-bar-container {
    height: 8px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.studio-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #3b82f6);
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s ease;
}

/* Chat Messages */
.studio-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.studio-message {
    display: flex;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.studio-message.assistant {
    flex-direction: row;
}

.studio-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.message-avatar.assistant {
    background: linear-gradient(135deg, #f59e0b, #3b82f6);
}

.message-avatar.user {
    background: linear-gradient(135deg, #10b981, #059669);
}

.message-bubble {
    max-width: 80%;
    padding: 0.875rem 1.125rem;
    border-radius: 16px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.message-bubble.assistant {
    background: var(--bg-card);
    border: 1px solid #334155;
    color: var(--text-primary);
}

.message-bubble.user {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #000;
    font-weight: 500;
}

.message-bubble.markdown {
    background: #1e293b;
    border: 2px solid var(--accent-orange);
    padding: 1.5rem;
    max-width: 100%;
}

.message-bubble.markdown h1 {
    font-size: 1.3rem;
    color: var(--accent-orange);
    margin-bottom: 0.5rem;
}

.message-bubble.markdown h2 {
    font-size: 1.1rem;
    color: var(--accent-blue);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.message-bubble.markdown ul {
    margin-left: 1.5rem;
}

.message-bubble.markdown li {
    margin-bottom: 0.25rem;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-orange);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Input Area */
.studio-input-container {
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-top: 1px solid #334155;
}

.studio-input-form {
    display: flex;
    gap: 0.75rem;
}

.studio-input {
    flex: 1;
    padding: 0.875rem 1.125rem;
    background: var(--bg-dark);
    border: 1px solid #334155;
    border-radius: 24px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.studio-input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.studio-send-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #f59e0b, #3b82f6);
    border: none;
    border-radius: 50%;
    color: #000;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.studio-send-btn:hover:not(:disabled) {
    transform: scale(1.1);
}

.studio-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Crash Test Button */
.crash-test-banner {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    border: 2px solid #ef4444;
    border-radius: 12px;
    text-align: center;
}

.crash-test-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 24px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.crash-test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Copy Charter Button */
.copy-charter-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.copy-charter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.copy-charter-btn.copied {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.charter-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Markdown Table Styles */
.message-bubble.markdown table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.85rem;
}

.message-bubble.markdown th {
    background: rgba(245, 158, 11, 0.1);
    padding: 0.5rem;
    text-align: left;
    border: 1px solid #334155;
    font-weight: 600;
    color: var(--accent-orange);
}

.message-bubble.markdown td {
    padding: 0.5rem;
    border: 1px solid #334155;
}

.message-bubble.markdown h3 {
    font-size: 1rem;
    color: var(--accent-green);
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.message-bubble.markdown strong {
    color: var(--accent-orange);
}

.message-bubble.markdown hr {
    border: none;
    border-top: 1px solid #334155;
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: 0;
        max-height: none;
    }

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

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
    }

    .filters {
        width: 100%;
        justify-content: center;
    }

    .drawer {
        width: 100%;
        right: -100%;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .content-wrapper {
        padding: 0 1rem 1rem;
    }

    .premium-container {
        flex-direction: column;
        text-align: center;
    }

    .premium-icon {
        font-size: 3rem;
    }

    .premium-title {
        font-size: 1.5rem;
    }

    .premium-features {
        grid-template-columns: 1fr;
    }

    .interest-modal {
        padding: 2rem 1.5rem;
    }

    .user-login-modal {
        padding: 2rem 1.5rem;
    }

    .studio-panel {
        width: 100%;
        right: -100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .studio-panel.open {
        right: 0;
    }

    .studio-fab {
        bottom: 1rem;
        right: 1rem;
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* PMBOK Carrusel Horizontal en Móviles */
    .pmbok-section {
        padding: 2rem 0;
    }

    .pmbok-header {
        padding: 0 1rem;
        margin-bottom: 2rem;
    }

    .pmbok-header h2 {
        font-size: 1.5rem;
    }

    .pmbok-header p {
        font-size: 0.95rem;
    }

    .focus-area {
        margin-bottom: 2rem;
    }

    .focus-area-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
        padding: 0 1rem;
    }

    .processes-grid {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        padding: 0 1rem 1rem;
        grid-template-columns: unset;
    }

    .processes-grid::-webkit-scrollbar {
        height: 8px;
    }

    .processes-grid::-webkit-scrollbar-track {
        background: rgba(245, 158, 11, 0.1);
        border-radius: 10px;
    }

    .processes-grid::-webkit-scrollbar-thumb {
        background: var(--accent-orange);
        border-radius: 10px;
    }

    .process-card {
        min-width: 320px;
        max-width: 320px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    /* Indicador visual de scroll horizontal */
    .focus-area::after {
        content: '← Desliza para ver más →';
        display: block;
        text-align: center;
        font-size: 0.75rem;
        color: var(--text-secondary);
        margin-top: 0.5rem;
        padding: 0 1rem;
        opacity: 0.7;
    }

    /* PMBOK Visual Map - Móvil */
    .pmbok-visual-map {
        margin-top: 2rem;
        padding: 2rem 1rem 0;
    }

    .pmbok-visual-title {
        font-size: 1.3rem;
    }

    .pmbok-visual-description {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }

    .pmbok-visual-link {
        border-radius: 8px;
    }

    .pmbok-visual-icon {
        font-size: 2rem;
    }

    .pmbok-visual-text {
        font-size: 0.95rem;
    }

    /* AI Modal Controls - Móvil */
    .ai-modal-controls {
        gap: 0.75rem;
        padding: 1rem;
    }

    .ai-session-indicator {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .session-action-btn {
        width: 100%;
    }

    .ai-personalization-controls {
        flex-direction: column;
        gap: 0.5rem;
    }

    .ai-context-input {
        width: 100%;
    }

    .ai-regenerate-btn {
        width: 100%;
        justify-content: center;
    }
}