/* Doctores.cloud Premium CSS Framework - Redesigned */

:root {
    /* Brand Colors - Matching Logo */
    --primary-dark: #4B0082;      /* Violet/Purple from logo */
    --primary-light: #00BFFF;     /* Cyan/Light blue from logo */
    --accent-blue: #1E90FF;       /* Dodger blue */
    --dark-bg: #0a0e27;           /* Deep dark blue */
    --darker-bg: #050814;         /* Almost black blue */
    --card-bg: rgba(30, 41, 82, 0.4); /* Semi-transparent blue */
    --glass-border: rgba(0, 191, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Gradients */
    --gradient-brand: linear-gradient(135deg, #4B0082 0%, #00BFFF 100%);
    --gradient-brand-reverse: linear-gradient(135deg, #00BFFF 0%, #4B0082 100%);
    --gradient-glow: linear-gradient(135deg, rgba(75, 0, 130, 0.3) 0%, rgba(0, 191, 255, 0.3) 100%);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--darker-bg);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Background Effects */
.bg-animated {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0a0e27 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* Gradient Text */
.gradient-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Buttons with Glow Effect */
.btn-glow {
    position: relative;
    background: var(--gradient-brand);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 191, 255, 0.3);
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 191, 255, 0.5), 0 0 40px rgba(75, 0, 130, 0.4);
}

.btn-glow:hover::before {
    left: 100%;
}

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

/* Animated Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 191, 255, 0.3);
    }
    50% {
        box-shadow: 0 8px 40px rgba(0, 191, 255, 0.6), 0 0 50px rgba(75, 0, 130, 0.5);
    }
}

.btn-glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Cards */
.card-glass {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.card-glass:hover {
    border-color: var(--primary-light);
    box-shadow: 0 8px 32px rgba(0, 191, 255, 0.2);
    transform: translateY(-2px);
}

/* Atlas Consultoría Section */
.atlas-section {
    background: var(--card-bg);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.atlas-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-brand);
}

.atlas-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.atlas-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 191, 255, 0.4);
}

.atlas-title {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.atlas-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4px;
}

/* Search Bar */
.search-bar-container {
    position: relative;
    margin-bottom: 24px;
}

.search-bar {
    width: 100%;
    padding: 16px 56px 16px 20px;
    background: rgba(30, 41, 82, 0.6);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-bar:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.1);
    background: rgba(30, 41, 82, 0.8);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-light);
    font-size: 1.2rem;
    pointer-events: none;
}

/* Protocol Cards */
.protocol-card {
    background: rgba(30, 41, 82, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.protocol-card:hover {
    border-color: var(--primary-light);
    background: rgba(30, 41, 82, 0.7);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0, 191, 255, 0.2);
}

.protocol-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.protocol-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.protocol-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.protocol-badge.hipertension {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.protocol-badge.urgencias {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

.protocol-badge.diabetes {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.protocol-excerpt {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Stats Badges */
.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 191, 255, 0.1);
    border: 1px solid rgba(0, 191, 255, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-light);
    font-weight: 600;
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, rgba(30, 41, 82, 0.3) 0%, rgba(30, 41, 82, 0.6) 50%, rgba(30, 41, 82, 0.3) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(30, 41, 82, 0.3);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--gradient-brand);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-brand-reverse);
}

/* Sidebar */
.dc-sidebar {
    background: var(--dark-bg);
    border-right: 1px solid var(--glass-border);
}

.dc-sidebar-logo {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dc-sidebar-logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 191, 255, 0.3);
}

/* Navigation Items */
.dc-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    margin-bottom: 4px;
    font-weight: 500;
}

.dc-nav-item:hover {
    background: rgba(0, 191, 255, 0.1);
    color: var(--primary-light);
}

.dc-nav-item.active {
    background: var(--gradient-glow);
    color: var(--primary-light);
    border-left: 3px solid var(--primary-light);
    font-weight: 600;
}

/* Tables */
.dc-table-container {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.dc-table th {
    padding: 16px;
    background: rgba(75, 0, 130, 0.2);
    color: var(--primary-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.dc-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 191, 255, 0.1);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .atlas-section {
        padding: 20px;
    }

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

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.border-gradient::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-brand);
    border-radius: inherit;
    z-index: -1;
}
