﻿/* ============================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================ */
:root {
    /* Colores de acento */
    --accent-primary: #8a2be2;
    --accent-secondary: #39ff14;
    --accent-gradient: linear-gradient(135deg, #8a2be2, #39ff14);

    /* Fondos */
    --bg-base: #0a0a0f;
    --bg-surface: #13131a;
    --bg-surface-elevated: #1a1a24;

    /* Texto */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;

    /* Bordes */
    --border-subtle: rgba(255,255,255,0.08);

    /* Efectos */
    --glass-bg: rgba(10,10,15,0.85);
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

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

h1, h2, h3, h4, .logo {
    font-family: 'Space Grotesk', sans-serif;
}

.accent {
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    background-image: var(--accent-gradient);
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-page {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

.about-photo-col {
    flex: 1 1 300px;
    max-width: 350px;
}

.about-photo-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(138,43,226,0.2);
    border: 1px solid var(--border-subtle);
}

.about-photo-frame img {
    width: 100%;
    display: block;
    filter: contrast(1.1);
}

.about-linkedin {
    margin-top: 2rem;
    text-align: center;
}

.linkedin-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: bold;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(138,43,226,0.3);
    font-size: 1.1rem;
}

.linkedin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(138,43,226,0.4);
}

.about-bio-col {
    flex: 2 1 600px;
    min-width: 0;
}

.about-name {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    font-family: 'Space Grotesk', sans-serif;
}

.about-role {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
}

.about-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #cbd5e1;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-section-title {
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.5rem;
    font-size: 1.8rem;
}

.about-milestones {
    margin-left: 0;
    padding-left: 0;
    margin-bottom: 3rem;
    list-style-type: none;
}

.about-milestones li {
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 2rem;
}

.milestone-icon {
    color: var(--accent-primary);
    position: absolute;
    left: 0;
    top: 2px;
}

.about-certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.cert-card {
    background: rgba(255,255,255,0.03);
    padding: 1.5rem;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-3px);
}

.cert-neon {
    border-left: 4px solid var(--accent-secondary);
}

.cert-violet {
    border-left: 4px solid var(--accent-primary);
}

.cert-card strong {
    color: white;
    display: block;
    margin-bottom: 0.5rem;
}

.cert-card span {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ============================================
   SINGLE ARTICLE - Clases adicionales
   ============================================ */
.article-summary {
    font-size: 1.2rem;
    color: var(--text-secondary);
    border-left: 4px solid var(--accent-secondary);
    padding-left: 1rem;
    margin-bottom: 2rem;
}

.article-cover {
    margin-bottom: 3rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.article-cover img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* ============================================
   CLASES DE UTILIDAD PARA ADMIN
   ============================================ */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-tabs {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1rem;
    flex-wrap: wrap;
}

.admin-tabs-spacer {
    flex: 1;
    min-width: 0;
}

.admin-actions-bar {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-sm {
    width: auto !important;
    padding: 0.8rem 1.5rem !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-danger {
    border-color: #ff4444 !important;
    color: #ff4444 !important;
}

.btn-neon {
    border-color: var(--accent-secondary) !important;
    color: var(--accent-secondary) !important;
}

.card {
    background: var(--bg-surface-elevated);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.card h3 {
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.card-header h3 {
    margin: 0;
}

.alert-success {
    background: rgba(57, 255, 20, 0.1);
    border-left: 4px solid var(--accent-secondary);
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #ccffcc;
}

.alert-error {
    background: rgba(255, 68, 68, 0.1);
    border-left: 4px solid #ff4444;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #ffcccc;
}

.alert-info {
    background: rgba(57, 255, 20, 0.1);
    border-left: 4px solid var(--accent-secondary);
    padding: 1rem;
    color: #ccffcc;
}

.tag-type {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 10px;
}

.action-link-edit {
    color: var(--accent-secondary);
    text-decoration: none;
}

.action-link-delete {
    color: #ff4444;
    text-decoration: none;
}

.action-cell {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-max-w {
    max-width: 500px;
}

.flex-center {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Text & display utilities */
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.d-block { display: block; }
.d-none { display: none; }
.w-auto { width: auto; }
.w-full { width: 100%; }
.cursor-pointer { cursor: pointer; }
.fw-bold { font-weight: bold; }
.fs-small { font-size: 0.85rem; }
.fs-09 { font-size: 0.9rem; }
.fs-1 { font-size: 1rem; }
.fs-12 { font-size: 1.2rem; }
.fs-15 { font-size: 1.5rem; }
.p-0 { padding: 0; }
.p-1 { padding: 1rem; }
.pb-1 { padding-bottom: 1rem; }
.pt-1 { padding-top: 1rem; }
.border-top-dashed { border-top: 1px dashed var(--border-subtle); }
.border-none { border: none; }
.bg-transparent { background: transparent; }
.bg-base { background: var(--bg-base); }
.accent-primary-text { color: var(--accent-primary); }
.accent-secondary-text { color: var(--accent-secondary); }
.rounded-8 { border-radius: 8px; }
.overflow-x-auto { overflow-x: auto; }
.line-height-15 { line-height: 1.5; }
.text-decoration-none { text-decoration: none; }
.flex-col { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-05 { gap: 0.5rem; }
.gap-08 { gap: 0.8rem; }
.m-0 { margin: 0; }
.ml-1 { margin-left: 10px; }
.inline { display: inline; }
.text-primary { color: var(--text-primary); }
.btn-xs { padding: 4px 8px !important; font-size: 0.9rem; }
.btn-danger-outline { border-color: #ff4444 !important; color: #ff4444 !important; }
.category-badge {
    background: var(--accent-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
}
.preview-thumb {
    height: 60px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
}

.btn-lg-padding {
    padding: 1rem 3rem;
}

.file-label {
    padding: 0.8rem 1.5rem;
    display: inline-block;
}

/* ============================================
   USERS PAGE
   ============================================ */
.users-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* ============================================
   NEWS FORM
   ============================================ */
.news-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.news-form-type-selector {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.news-form-type-selector label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-form-type-selector label span {
    font-size: 1.1rem;
    font-weight: bold;
}

/* ============================================
   CHAT
   ============================================ */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 75vh;
    background: var(--bg-surface-elevated);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}

.chat-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chat-history {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chat-input-area {
    padding: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.2);
}

.chat-form {
    display: flex;
    gap: 10px;
    position: relative;
}

.chat-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 25px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: white;
    resize: none;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    height: 55px;
    line-height: 1.5;
}

.chat-attach-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0 10px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.chat-attach-btn:hover {
    color: var(--accent-primary);
}

.chat-send-btn {
    background: var(--accent-primary);
    border: none;
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
}

.typing-dot {
    animation: pulse 1s infinite;
}

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

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

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.chat-footer {
    text-align: center;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.message {
    display: flex;
    gap: 15px;
    max-width: 85%;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.assistant {
    align-self: flex-start;
}

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

.avatar-user {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
}

.avatar-ai {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

.msg-bubble {
    padding: 1rem 1.5rem;
    border-radius: 15px;
    line-height: 1.6;
}

.msg-bubble.user {
    background: var(--accent-primary);
    color: white;
    border-radius: 15px 0 15px 15px;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
}

.msg-bubble.assistant {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    color: #e2e8f0;
    border-radius: 0 15px 15px 15px;
}

.model-selector {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--accent-secondary);
    color: white;
    outline: none;
    cursor: pointer;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-surface-elevated);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    width: 400px;
    max-width: 90%;
}

.modal-content h3 {
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
}

.modal-actions .btn-outline,
.modal-actions .btn-submit {
    flex: 1;
}

/* ============================================
   NAVBAR
   ============================================ */
.main-nav {
    position: sticky;
    top: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
}

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

.logo a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.tagline {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-left: 45px;
    margin-top: -5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}

.btn-outline {
    border: 1px solid var(--accent-primary);
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    color: var(--text-primary) !important;
    transition: background 0.3s, box-shadow 0.3s;
}

.btn-outline:hover, .btn-outline.active {
    background: var(--accent-primary);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    padding: 0;
    z-index: 1000;
    min-width: 30px;
    min-height: 25px;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s linear;
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.content-wrapper {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    width: 100%;
}

/* ============================================
   HOME PAGE
   ============================================ */
.home-page {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.home-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-secondary);
    padding-left: 1rem;
}

.home-section .section-header h2 {
    font-size: 1.75rem;
}

.section-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s, transform 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.section-link:hover {
    color: #a955ff;
    transform: translateX(3px);
}

/* Home Articles Grid 2x2 */
.home-articles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Home News Grid 2x2 */
.home-news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Divider */
.home-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    position: relative;
}

.home-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), var(--accent-primary), transparent);
    opacity: 0.3;
}

.home-divider-icon {
    position: relative;
    z-index: 1;
    background: var(--bg-base);
    padding: 0 1.5rem;
    font-size: 1.5rem;
    color: var(--accent-secondary);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ============================================
   ARTICLE CARDS (reutilizado en home y articles)
   ============================================ */
.article-card {
    background: transparent;
    color: var(--text-primary);
    padding: 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    display: block;
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px -10px rgba(57, 255, 20, 0.15);
}

.article-card h2 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 0.8rem 0 0.3rem;
    transition: color 0.3s;
}

.article-card:hover h2 {
    color: var(--accent-primary);
}

.article-card .date {
    color: var(--accent-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.article-img.small {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

/* ============================================
   NEWS GRID (página de noticias)
   ============================================ */
.section-header {
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-secondary);
    padding-left: 1rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card {
    background: transparent;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.news-card.featured {
    grid-column: 1 / -1;
    flex-direction: row;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(57, 255, 20, 0.2);
    border-color: rgba(57, 255, 20, 0.3);
}

.news-image {
    width: 100%;
    height: 200px;
    background-color: var(--bg-surface-elevated);
    background-size: cover;
    background-position: center;
    object-fit: cover;
}

.news-card.featured .news-image {
    width: 50%;
    height: 100%;
    min-height: 350px;
}

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

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.news-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.news-card.featured .news-title {
    font-size: 2rem;
}

.news-summary {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex: 1;
}

.read-more {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    color: #a955ff;
}

/* ============================================
   LAYOUT 70/30 (news, single)
   ============================================ */
.home-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 3rem;
}

.sidebar {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 2rem;
    height: fit-content;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-item {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.3s;
    align-items: center;
}

.article-item:hover {
    transform: translateX(5px);
}

.article-item:hover h4 {
    color: var(--accent-primary);
}

.article-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.article-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.article-info .date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.article-info h4 {
    font-size: 0.95rem;
    line-height: 1.3;
    transition: color 0.3s;
}

/* ============================================
   ARTICLES PAGE (articles + sidebar)
   ============================================ */
.articles-page {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.articles-main {
    flex: 2;
    min-width: 0;
}

.articles-main .section-header {
    margin-bottom: 1.5rem;
}

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

.latest-news {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    min-width: 280px;
}

.latest-news h3 {
    margin-top: 0;
    margin-bottom: 1.2rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: var(--text-primary);
    border-left: 4px solid var(--accent-secondary);
    padding-left: 0.8rem;
}

.latest-news ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.latest-news li {
    margin-bottom: 0;
}

.latest-news a {
    text-decoration: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: color 0.3s, transform 0.3s;
    padding: 0.5rem;
    border-radius: 8px;
}

.latest-news a:hover {
    color: var(--text-primary);
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.03);
}

.latest-news .sidebar-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-surface-elevated);
}

.latest-news .sidebar-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

.latest-news .sidebar-item-title {
    font-size: 0.85rem;
    line-height: 1.3;
    color: var(--text-secondary);
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-news a:hover .sidebar-item-title {
    color: var(--text-primary);
}

.latest-news .sidebar-item-date {
    font-size: 0.7rem;
    color: var(--accent-secondary);
    font-weight: 600;
}

/* ============================================
   SINGLE ARTICLE PAGE
   ============================================ */
.article-reading h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #cbd5e1;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ============================================
   ABOUT / CV TIMELINE
   ============================================ */
.cv-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--bg-surface-elevated);
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
    flex-shrink: 0;
}

.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--border-subtle);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-secondary);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.timeline-date {
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* ============================================
   LOGIN
   ============================================ */
.login-container {
    max-width: 400px;
    margin: 4rem auto;
    background: var(--bg-surface);
    padding: 3rem 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    font-size: 2rem;
}

.login-header p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-group textarea {
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--accent-gradient);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.3s;
    text-align: center;
}

.btn-submit:hover {
    opacity: 0.9;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   TABLAS ADMIN
   ============================================ */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.admin-table th {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--accent-secondary);
}

.clickable-img {
    cursor: zoom-in;
    transition: transform 0.3s, box-shadow 0.3s;
}

.clickable-img:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

@keyframes zoomIn {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

/* ============================================
   TOGGLE SWITCH (admin)
   ============================================ */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: var(--accent-primary);
}

.switch input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-primary);
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
}

/* ============================================
   RESPONSIVE - TABLETS (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .home-layout {
        gap: 2rem;
    }

    .articles-page {
        gap: 1.5rem;
    }

    .news-card.featured .news-title {
        font-size: 1.6rem;
    }

    .news-card.featured .news-image {
        min-height: 280px;
    }

    .article-reading h1 {
        font-size: 2rem;
    }
}

/* ============================================
   RESPONSIVE - TABLETS / MÓVILES GRANDES (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* NAVBAR */
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-surface-elevated);
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-subtle);
        transform: translateY(-150%);
        opacity: 0;
        transition: all 0.4s ease;
        z-index: 99;
        pointer-events: none;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        font-size: 1.1rem;
        white-space: normal;
    }

    .btn-outline {
        text-align: center;
        width: 100%;
    }

    /* CONTENT */
    .content-wrapper {
        padding: 2rem 1.25rem;
    }

    /* HOME */
    .home-articles-grid,
    .home-news-grid {
        grid-template-columns: 1fr;
    }

    .home-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .home-section .section-header h2 {
        font-size: 1.4rem;
    }

    /* NEWS GRID */
    .news-card.featured {
        flex-direction: column;
    }

    .news-card.featured .news-image {
        width: 100%;
        min-height: 200px;
    }

    .news-card.featured .news-title {
        font-size: 1.3rem;
    }

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

    /* LAYOUT 70/30 */
    .home-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar {
        order: 2;
    }

    /* ARTICLES PAGE */
    .articles-page {
        flex-direction: column;
    }

    .articles-main {
        flex: none;
    }

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

    .latest-news {
        flex: none;
        min-width: 0;
    }

    /* SINGLE ARTICLE */
    .article-reading h1 {
        font-size: 1.6rem;
    }

    .article-body {
        font-size: 1rem;
    }

    /* ABOUT PAGE */
    .about-page {
        flex-direction: column;
        gap: 2rem;
        padding: 0 1rem;
    }

    .about-photo-col {
        max-width: 100%;
        flex: none;
    }

    .about-photo-frame {
        max-width: 280px;
        margin: 0 auto;
    }

    .about-name {
        font-size: 2.2rem;
    }

    .about-role {
        font-size: 1.2rem;
    }

    .about-text {
        font-size: 1rem;
    }

    .about-section-title {
        font-size: 1.4rem;
    }

    .about-certs-grid {
        grid-template-columns: 1fr;
    }

    /* PROFILE */
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    /* LOGIN */
    .login-container {
        margin: 2rem auto;
        padding: 2rem 1.5rem;
    }

    /* ADMIN */
    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .admin-table td:last-child {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    /* USERS PAGE */
    .users-layout {
        grid-template-columns: 1fr;
    }

    /* CHAT */
    .chat-container {
        height: 60vh !important;
    }

    .message {
        max-width: 95% !important;
    }

    .chat-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .model-selector {
        width: 100%;
    }

    /* NEWS FORM */
    .news-form-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .news-form-type-selector {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* MODAL */
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    /* SINGLE ARTICLE */
    .article-summary {
        font-size: 1rem;
    }

    .article-cover img {
        max-height: 250px;
    }

    /* DIVIDER */
    .home-divider {
        padding: 2rem 0;
    }
}

/* ============================================
   RESPONSIVE - MÓVILES PEQUEÑOS (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .nav-container {
        padding: 0.75rem 1rem;
    }

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

    .logo a {
        font-size: 1.25rem;
    }

    .tagline {
        font-size: 0.55rem;
        margin-left: 38px;
    }

    .home-section .section-header h2 {
        font-size: 1.2rem;
    }

    .article-card {
        padding: 0.75rem;
    }

    .article-card h2 {
        font-size: 1rem;
    }

    .article-img.small {
        height: 160px;
    }

    .news-content {
        padding: 1rem;
    }

    .news-title {
        font-size: 1.1rem;
    }

    .news-card.featured .news-title {
        font-size: 1.15rem;
    }

    .news-image {
        height: 160px;
    }

    .news-card.featured .news-image {
        min-height: 180px;
    }

    .article-reading h1 {
        font-size: 1.35rem;
    }

    .article-body {
        font-size: 0.95rem;
    }

    .article-thumb {
        width: 60px;
        height: 60px;
    }

    .article-info h4 {
        font-size: 0.85rem;
    }

    .login-container {
        margin: 1.5rem auto;
        padding: 1.5rem 1rem;
    }

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

    .btn-submit {
        padding: 0.85rem;
        font-size: 0.95rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
    }

    .admin-table td:last-child {
        flex-direction: column;
        gap: 4px;
    }

    .admin-table td:last-child a {
        font-size: 0.8rem;
    }

    .sidebar {
        padding: 1.25rem;
    }

    .latest-news {
        padding: 1rem;
    }

    .latest-news .sidebar-thumb {
        width: 50px;
        height: 50px;
    }

    .latest-news .sidebar-item-title {
        font-size: 0.8rem;
    }

    /* ABOUT PAGE */
    .about-name {
        font-size: 1.8rem;
    }

    .about-role {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .about-section-title {
        font-size: 1.2rem;
    }

    .about-text {
        font-size: 0.95rem;
    }

    .linkedin-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .cert-card {
        padding: 1rem;
    }

    .profile-pic {
        width: 100px;
        height: 100px;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item::before {
        left: -1.9rem;
        width: 10px;
        height: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }

    .lightbox-modal {
        padding: 1rem;
    }

    .home-divider {
        padding: 1.5rem 0;
    }

    .home-divider-icon {
        font-size: 1.2rem;
        padding: 0 1rem;
    }

    /* CHAT */
    .chat-container {
        height: 55vh !important;
    }

    .chat-input {
        font-size: 0.9rem !important;
        padding: 0.75rem 1rem !important;
    }

    .chat-send-btn {
        width: 45px !important;
        height: 45px !important;
        font-size: 1rem !important;
    }

    /* NEWS FORM */
    .news-form-grid {
        gap: 1rem !important;
    }

    /* USERS */
    .users-layout {
        gap: 1rem !important;
    }

    .card {
        padding: 1.25rem !important;
    }

    /* MODAL */
    .modal-content {
        padding: 1.5rem !important;
        width: 95% !important;
    }
}

/* ============================================
   RESPONSIVE - TABLAS EN MÓVILES (scroll horizontal)
   ============================================ */
@media (max-width: 640px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table {
        min-width: 500px;
    }

    .admin-table th:nth-child(2),
    .admin-table td:nth-child(2) {
        min-width: 80px;
    }

    .admin-table th:nth-child(3),
    .admin-table td:nth-child(3) {
        min-width: 120px;
    }
}

/* ============================================
   RESPONSIVE - ORIENTACIÓN HORIZONTAL EN MÓVILES
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .main-nav {
        position: relative;
    }

    .content-wrapper {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .login-container {
        margin: 1rem auto;
        padding: 1.5rem;
    }

    .chat-container {
        height: 50vh !important;
    }

    .news-image {
        height: 140px;
    }

    .news-card.featured .news-image {
        min-height: 160px;
    }
}

/* ============================================
   MEJORAS DE ACCESIBILIDAD TÁCTIL
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .nav-links a,
    .btn-outline,
    .btn-submit,
    .read-more,
    .section-link,
    .article-item,
    .latest-news a {
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    .article-card:hover,
    .news-card:hover,
    .article-item:hover {
        transform: none;
    }

    .article-card:active,
    .news-card:active {
        transform: translateY(-2px);
    }
}

/* ============================================
   INFO SOURCES PAGE - FUENTES DE INFORMACIÓN
   ============================================ */
.info-sources-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.info-sources-header {
    text-align: center;
    margin-bottom: 4rem;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid rgba(57, 255, 20, 0.2);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-secondary);
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.4); }
    50% { opacity: 0.5; box-shadow: 0 0 0 6px rgba(57, 255, 20, 0); }
}

.info-sources-header h1 {
    font-size: 3.5rem;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.info-sources-subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 500px;
    margin: 0 auto;
}

.sources-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 1rem 0;
}

/* Divisor entre fichas del grid */
.source-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    grid-column: 1 / -1;
    padding: 1.5rem 0;
    position: relative;
}

.source-divider-line {
    width: 100%;
    max-width: 300px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #39ff14, #8b5cf6, #39ff14, transparent);
    border-radius: 3px;
    opacity: 0.8;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3), 0 0 30px rgba(138, 43, 226, 0.2);
    animation: dividerPulse 3s ease-in-out infinite;
}

@keyframes dividerPulse {
    0%, 100% { opacity: 0.6; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.05); }
}

/* Icono decorativo en el centro del divisor */
.source-divider::before {
    content: '✦';
    position: absolute;
    font-size: 1.2rem;
    color: var(--accent-secondary);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
    animation: dividerIconSpin 4s ease-in-out infinite;
    z-index: 1;
    background: var(--bg-base);
    padding: 0 0.8rem;
}

@keyframes dividerIconSpin {
    0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.8; }
    50% { transform: rotate(180deg) scale(1.2); opacity: 1; }
}

/* ============================================
   SOURCE CARD - DISEÑO FUTURISTA
   ============================================ */
.source-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    min-height: 400px;
}

.source-card:hover {
    transform: translateY(-10px) scale(1.01);
}

/* Borde verde neón animado */
.card-border {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(
        135deg,
        rgba(57, 255, 20, 0.8),
        rgba(57, 255, 20, 0.2),
        rgba(138, 43, 226, 0.3),
        rgba(57, 255, 20, 0.8)
    );
    background-size: 400% 400%;
    animation: borderShift 6s ease-in-out infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

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

/* Brillo exterior */
.card-glow {
    position: absolute;
    inset: -20px;
    border-radius: 40px;
    background: radial-gradient(ellipse at 50% 0%, rgba(57, 255, 20, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.source-card:hover .card-glow {
    opacity: 1;
}

/* Fondo con grid y orbes */
.source-card-bg {
    position: absolute;
    inset: 2px;
    border-radius: 22px;
    background: linear-gradient(160deg, #0d0d1a, #111122, #0a0a18);
    overflow: hidden;
    z-index: 0;
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(57, 255, 20, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(57, 255, 20, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    transition: opacity 0.6s ease;
}

.source-card:hover .bg-orb {
    opacity: 0.5;
}

.orb-1 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(57, 255, 20, 0.3), transparent);
    top: -80px;
    right: -80px;
    animation: orbFloat1 8s ease-in-out infinite;
}

.orb-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.2), transparent);
    bottom: -60px;
    left: -60px;
    animation: orbFloat2 10s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 20px) scale(1.1); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.15); }
}

/* Contenido de la tarjeta */
.source-card-content {
    position: relative;
    z-index: 1;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 396px;
}

/* Top row: logo + status */
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 1.5rem;
}


/* Status badge */
.source-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--accent-secondary);
    text-transform: uppercase;
    font-family: 'Space Grotesk', sans-serif;
    padding: 4px 12px;
    background: rgba(57, 255, 20, 0.06);
    border-radius: 20px;
    border: 1px solid rgba(57, 255, 20, 0.1);
}

.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-secondary);
    animation: pulseDot 2s ease-in-out infinite;
}

/* Nombre de la empresa */
.source-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, #ffffff, var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

/* Nombre del modelo de IA */
.source-ai-name {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-secondary);
    text-align: center;
    margin-top: -0.8rem;
    margin-bottom: 1.2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.85;
}

/* Stats / CEO */
.source-stats {
    width: 100%;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0.75rem;
    background: rgba(57, 255, 20, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(57, 255, 20, 0.06);
    transition: all 0.3s ease;
}

.source-card:hover .stat-item {
    background: rgba(57, 255, 20, 0.06);
    border-color: rgba(57, 255, 20, 0.12);
}

.stat-value {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}

/* Links grid */
.source-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    width: 100%;
    margin-top: auto;
}

.source-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.6rem 0.4rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.source-link:hover {
    background: rgba(57, 255, 20, 0.08);
    border-color: rgba(57, 255, 20, 0.2);
    color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(57, 255, 20, 0.1);
}

.source-link .link-icon {
    flex-shrink: 0;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.source-link:hover .link-icon {
    opacity: 1;
    transform: scale(1.1);
}

/* ============================================
   SOURCE CARD - EMPTY (PLACEHOLDER)
   ============================================ */
.source-card-empty {
    cursor: default;
}

.source-card-empty .card-border {
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.1),
        rgba(255,255,255,0.02),
        rgba(138, 43, 226, 0.1),
        rgba(255,255,255,0.1)
    );
    animation: none;
}

.source-card-empty .source-card-content {
    justify-content: center;
    min-height: 396px;
}

.source-card-empty .source-card-bg {
    background: linear-gradient(160deg, #0d0d1a, #0a0a15);
}

.source-empty-icon {
    color: var(--text-secondary);
    opacity: 0.2;
    margin-bottom: 1.5rem;
    animation: pulseIcon 3s ease-in-out infinite;
}

@keyframes pulseIcon {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.1); }
}

.source-empty-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.source-empty-desc {
    color: var(--text-secondary);
    opacity: 0.5;
    font-size: 0.9rem;
}

/* ============================================
   INFO SOURCES - RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .info-sources-page {
        padding: 2rem 1rem;
    }

    .info-sources-header h1 {
        font-size: 2.2rem;
    }

    .info-sources-subtitle {
        font-size: 1rem;
    }

    .sources-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .source-card {
        min-height: 360px;
    }

    .source-card-content {
        padding: 1.5rem 1.25rem;
        min-height: 356px;
    }

    .source-name {
        font-size: 1.4rem;
    }

    .source-links {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .source-link {
        font-size: 0.7rem;
        padding: 0.5rem 0.3rem;
    }

    .source-card-empty .source-card-content {
        min-height: 356px;
    }

    /* Divisor responsive */
    .source-divider {
        padding: 1rem 0;
    }

    .source-divider-line {
        max-width: 180px;
        height: 2px;
    }

    .source-divider::before {
        font-size: 1rem;
        padding: 0 0.6rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .sources-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* ============================================
   UTILIDADES RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}
