/* Enhanced styles for Pacific Medihub Dashboard */

/* Color Palette */
:root {
    --primary-color: #0066cc;
    --primary-light: #4a9af5;
    --secondary-color: #7a4cbb;
    --accent-color: #00ccaa;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
}

/* Base Styles */
body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: var(--gray-800);
    line-height: 1.6;
}

/* Custom logo for Pacific Medihub */
.logo-container {
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin-left: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Navigation */
.navbar {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1.5rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

/* Sidebar */
.sidebar {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 25px;
    position: sticky;
    top: 20px;
    transition: all 0.3s ease;
}

.sidebar-header {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-200);
}

.sidebar-link {
    display: block;
    padding: 12px 15px;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-link:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
    transform: translateX(5px);
}

.sidebar-link.active {
    background-color: var(--primary-light);
    color: white;
    box-shadow: 0 4px 8px rgba(74, 154, 245, 0.2);
}

.sidebar-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Cards */
.card {
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    border: none;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    padding: 15px 20px;
    border: none;
}

.card-body {
    padding: 25px;
}

/* KPI Cards */
.kpi-card {
    text-align: center;
    padding: 20px;
    height: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.kpi-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    background: rgba(74, 154, 245, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 15px;
}

.kpi-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
    line-height: 1.2;
}

.kpi-label {
    font-size: 0.95rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

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

.btn-primary:hover {
    background-color: #0055b3;
    border-color: #0055b3;
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #6a3dab;
    border-color: #6a3dab;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* Section Titles */
.section-title {
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    margin-bottom: 25px;
    font-weight: 700;
    color: var(--gray-800);
}

/* Strategy Items */
.strategy-item {
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin-bottom: 20px;
    background-color: white;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.strategy-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.strategy-item h5 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

/* Timeline */
.timeline-container {
    position: relative;
    padding-left: 40px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: var(--gray-300);
}

.timeline-item {
    position: relative;
    padding: 20px;
    margin-bottom: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(74, 154, 245, 0.2);
    z-index: 1;
}

.timeline-item h5 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

/* Competitor Cards */
.competitor-card {
    height: 100%;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background-color: white;
}

.competitor-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.competitor-logo {
    max-height: 60px;
    margin-bottom: 20px;
    padding: 10px;
    background-color: var(--gray-100);
    border-radius: 8px;
}

.competitor-name {
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.competitor-strength {
    color: #28a745;
    font-weight: 500;
}

.competitor-weakness {
    color: #dc3545;
    font-weight: 500;
}

/* Market Segments */
.market-segment {
    padding: 20px;
    border-radius: 8px;
    background-color: white;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.market-segment:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.market-segment h5 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

/* Loyalty Tiers */
.loyalty-tier {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.loyalty-tier:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.tier-standard {
    background-color: #f8f9fa;
    border-left: 4px solid #6c757d;
}

.tier-silver {
    background-color: #e9ecef;
    border-left: 4px solid #adb5bd;
}

.tier-gold {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.tier-platinum {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
}

.loyalty-tier h5 {
    font-weight: 600;
    margin-bottom: 15px;
}

/* Video Thumbnails */
.video-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.video-thumbnail img {
    width: 100%;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.video-thumbnail::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.video-thumbnail:hover::after {
    background-color: rgba(0, 102, 204, 0.7);
    width: 70px;
    height: 70px;
    font-size: 2.2rem;
}

.video-title {
    font-weight: 600;
    margin-top: 10px;
    color: var(--gray-800);
}

.video-description {
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* Progress Bars */
.progress {
    height: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    background-color: var(--gray-200);
}

.progress-bar {
    background-color: var(--primary-color);
    border-radius: 5px;
}

/* Charts */
.chart-container {
    position: relative;
    margin: auto;
    height: 300px;
    margin-bottom: 30px;
}

/* Tables */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border: none;
    padding: 15px;
}

.table tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 102, 204, 0.05);
}

.table tbody tr:hover {
    background-color: rgba(0, 102, 204, 0.1);
}

.table td {
    padding: 15px;
    vertical-align: middle;
    border-top: 1px solid var(--gray-200);
}

/* Footer */
footer {
    background-color: var(--gray-800);
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

footer a {
    color: var(--gray-300);
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
    text-decoration: none;
}

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

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Loading Spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color);
}

/* Responsive Improvements */
@media (max-width: 992px) {
    .sidebar {
        position: static;
        margin-bottom: 30px;
    }
    
    .kpi-card {
        margin-bottom: 20px;
    }
    
    .chart-container {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        margin-right: 0;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .kpi-value {
        font-size: 1.8rem;
    }
    
    .chart-container {
        height: 200px;
    }
    
    .timeline-item {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.5rem;
    }
    
    .kpi-card {
        padding: 15px;
    }
    
    .kpi-value {
        font-size: 1.5rem;
    }
    
    .chart-container {
        height: 180px;
    }
}

/* Print Styles */
@media print {
    .sidebar, .navbar {
        display: none;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
    
    .card-header {
        background: var(--gray-200) !important;
        color: var(--gray-800) !important;
    }
    
    .btn {
        display: none;
    }
}
