/* ===== MICROSOFT CRM DASHBOARD HERO SECTION ===== */

/* Main Hero Section - Dashboard Layout */
.crm-hero-section {
    position: relative;
    background: #0A1F44;
    min-height: 85vh;
    overflow: hidden;
    color: white;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Enhanced Dynamic Background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Gradient Overlays */
.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.primary-gradient {
    background: linear-gradient(135deg, 
        rgba(0, 120, 212, 0.03) 0%, 
        rgba(106, 90, 205, 0.02) 25%,
        rgba(59, 130, 246, 0.015) 50%,
        rgba(0, 120, 212, 0.02) 75%,
        rgba(106, 90, 205, 0.03) 100%);
    animation: gradientShift 20s ease-in-out infinite;
}

.secondary-gradient {
    background: radial-gradient(ellipse at 20% 30%, 
        rgba(0, 120, 212, 0.04) 0%,
        transparent 60%),
        radial-gradient(ellipse at 80% 70%, 
        rgba(106, 90, 205, 0.03) 0%,
        transparent 60%);
    animation: gradientPulse 15s ease-in-out infinite alternate;
}

.accent-gradient {
    background: linear-gradient(45deg,
        transparent 0%,
        rgba(59, 130, 246, 0.01) 25%,
        transparent 50%,
        rgba(0, 120, 212, 0.015) 75%,
        transparent 100%);
    animation: gradientRotate 25s linear infinite;
}

/* Geometric Patterns */
.geometric-pattern {
    position: absolute;
    opacity: 0.02;
}

.primary-pattern {
    top: 10%;
    left: 10%;
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, 
        rgba(0, 120, 212, 0.1) 0%, 
        transparent 50%, 
        rgba(106, 90, 205, 0.08) 100%);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: geometricFloat 20s ease-in-out infinite;
}

.secondary-pattern {
    bottom: 15%;
    right: 15%;
    width: 150px;
    height: 150px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 50%;
    animation: geometricPulse 18s ease-in-out infinite alternate;
}

/* Microsoft Elements */
.microsoft-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ms-square {
    position: absolute;
    width: 12px;
    height: 12px;
    opacity: 0.7;
    animation: msFloat 12s ease-in-out infinite;
}

.ms-circle {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    opacity: 0.6;
    animation: msRotateFloat 15s ease-in-out infinite;
}

.ms-diamond {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0.5;
    transform: rotate(45deg);
    animation: msDiamondSpin 18s linear infinite;
}

.ms-triangle {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0.6;
    animation: msTriangleFloat 14s ease-in-out infinite;
}

.ms-hexagon {
    position: absolute;
    width: 16px;
    height: 9px;
    opacity: 0.5;
    animation: msHexagonPulse 20s ease-in-out infinite;
}

/* Microsoft Brand Colors */
.red-square {
    background: #F25022;
    top: 25%;
    right: 20%;
    animation-delay: 0s;
}

.blue-square {
    background: #00BCF2;
    bottom: 30%;
    left: 25%;
    animation-delay: 6s;
}

.green-square {
    background: #7FBA00;
    top: 60%;
    right: 35%;
    animation-delay: 3s;
}

.yellow-square {
    background: #FFB900;
    bottom: 50%;
    left: 15%;
    animation-delay: 9s;
}

.orange-circle {
    background: #FF8C00;
    top: 40%;
    left: 10%;
    animation-delay: 2s;
}

.purple-diamond {
    background: #6A5ACD;
    top: 70%;
    right: 15%;
    animation-delay: 7s;
}

.blue-triangle {
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 10px solid #0078D4;
    background: transparent;
    top: 15%;
    left: 40%;
    animation-delay: 4s;
}

.green-hexagon {
    background: #107C10;
    position: relative;
    top: 80%;
    right: 25%;
    animation-delay: 8s;
}

.green-hexagon:before,
.green-hexagon:after {
    content: "";
    position: absolute;
    width: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
}

.green-hexagon:before {
    bottom: 100%;
    border-bottom: 4.5px solid #107C10;
}

.green-hexagon:after {
    top: 100%;
    border-top: 4.5px solid #107C10;
}

/* Animation Keyframes */
@keyframes gradientShift {
    0%, 100% { transform: translateX(0) rotate(0deg); opacity: 0.8; }
    50% { transform: translateX(20px) rotate(5deg); opacity: 1; }
}

@keyframes gradientPulse {
    0% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(1.05); opacity: 0.6; }
}

@keyframes gradientRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes geometricFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(180deg); }
}

@keyframes geometricPulse {
    0% { transform: scale(1) rotate(0deg); opacity: 0.02; }
    100% { transform: scale(1.2) rotate(90deg); opacity: 0.05; }
}

@keyframes msFloat {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.7; }
    50% { transform: translateY(-10px) scale(1.1); opacity: 0.9; }
}

@keyframes msRotateFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); opacity: 0.6; }
    50% { transform: translateY(-15px) rotate(180deg) scale(1.2); opacity: 0.8; }
}

@keyframes msDiamondSpin {
    0% { transform: rotate(45deg) scale(1); opacity: 0.5; }
    25% { transform: rotate(135deg) scale(1.1); opacity: 0.7; }
    50% { transform: rotate(225deg) scale(0.9); opacity: 0.6; }
    75% { transform: rotate(315deg) scale(1.1); opacity: 0.7; }
    100% { transform: rotate(405deg) scale(1); opacity: 0.5; }
}

@keyframes msTriangleFloat {
    0%, 100% { transform: translateX(0px) translateY(0px) rotate(0deg); opacity: 0.6; }
    33% { transform: translateX(10px) translateY(-8px) rotate(120deg); opacity: 0.8; }
    66% { transform: translateX(-5px) translateY(-12px) rotate(240deg); opacity: 0.7; }
}

@keyframes msHexagonPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
    25% { transform: scale(1.2) rotate(90deg); opacity: 0.7; }
    50% { transform: scale(0.8) rotate(180deg); opacity: 0.6; }
    75% { transform: scale(1.1) rotate(270deg); opacity: 0.8; }
}

/* Dashboard Container */
.crm-dashboard-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding: 0;
    width: 100%;
    max-width: none;
}

/* Header Bar */
.crm-header-bar {
    padding: 20px 40px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
}

.dashboard-breadcrumb {
    margin: 0;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: #ffffff;
}

.breadcrumb-item a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #00BCF2;
}

.breadcrumb-item.active {
    color: #00BCF2;
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #ffffff;
    margin: 0 8px;
}

/* Main Dashboard Content */
.dashboard-main-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    flex: 1;
    align-items: center;
    padding: 40px;
}

.dashboard-left-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Title Section */
.dashboard-title-section {
    margin-bottom: 15px;
}

.dashboard-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.1);
}

.highlight-text {
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    text-shadow: none;
}

.highlight-text::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #00BCF2, #0078D4);
    border-radius: 2px;
    animation: underlineGlow 3s ease-in-out infinite;
}

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

.dashboard-subtitle {
    font-size: 1.1rem;
    color: #ffffff;
    line-height: 1.6;
    font-weight: 400;
    max-width: 90%;
}

/* KPI Cards */
.crm-kpis {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 20px 0;
}

.kpi-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 188, 242, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kpi-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 188, 242, 0.2);
    transform: translateX(5px);
}

.kpi-card:hover::before {
    opacity: 1;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.kpi-title {
    font-size: 0.85rem;
    color: #ffffff;
    font-weight: 500;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 4px;
}

.kpi-change {
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-up {
    color: #10B981;
    font-size: 0.8rem;
}

.trend-down {
    color: #EF4444;
    font-size: 0.8rem;
}

.satisfaction .kpi-change {
    color: #ffffff;
}

.resolution .kpi-change {
    color: #ffffff;
}

.response .kpi-change {
    color: #ffffff;
}

/* Dashboard Disclaimer */
.dashboard-disclaimer {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
}

.dashboard-disclaimer p {
    margin: 0;
    font-size: 0.8rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-disclaimer i {
    color: #60A5FA;
    flex-shrink: 0;
}

/* Right Panel - Dashboard Visual */
.dashboard-right-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.crm-dashboard-visual {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-image {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 10px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-image:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 15px 25px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .crm-hero-section {
        min-height: 80vh;
    }
    
    .crm-dashboard-container {
        height: 80vh;
    }
    
    .dashboard-main-content {
        padding: 30px;
        gap: 25px;
    }
}

@media (max-width: 992px) {
    .crm-hero-section {
        min-height: auto;
    }
    
    .crm-dashboard-container {
        height: auto;
        min-height: 70vh;
    }
    
    .dashboard-main-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 25px;
    }
    
    .dashboard-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
        text-align: center;
    }
    
    .crm-kpis {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .kpi-card {
        flex: 1;
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .crm-header-bar {
        padding: 15px 20px 0;
    }
    
    .dashboard-main-content {
        padding: 20px;
        gap: 25px;
    }
    
    .dashboard-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 0.8rem;
    }
    
    .dashboard-subtitle {
        font-size: 1rem;
        max-width: 100%;
        color: #ffffff;
    }
    
    .crm-kpis {
        flex-direction: column;
        gap: 8px;
    }
    
    .kpi-card {
        min-width: auto;
    }
    
    .kpi-value {
        font-size: 1.5rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
    }
    
    /* Hide geometric patterns and shapes on mobile for performance */
    .geometric-pattern,
    .microsoft-elements {
        display: none;
    }
}

@media (max-width: 576px) {
    .crm-header-bar {
        padding: 10px 15px 0;
    }
    
    .dashboard-main-content {
        padding: 15px;
        gap: 20px;
    }
    
    .kpi-header {
        margin-bottom: 6px;
    }
    
    .kpi-title {
        font-size: 0.8rem;
    }
    
    .kpi-value {
        font-size: 1.3rem;
    }
    
    .kpi-change {
        font-size: 0.7rem;
    }
}

/* Dark Mode Compatibility */
[data-theme="dark"] .crm-hero-section {
    background: #0A1F44;
}

[data-theme="dark"] .kpi-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dashboard-disclaimer {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.25);
}

/* Dark Mode Text Colors - Make all text white */
[data-theme="dark"] .dashboard-title {
    color: #ffffff !important;
}

[data-theme="dark"] .highlight-text {
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .dashboard-subtitle {
    color: #ffffff !important;
}

[data-theme="dark"] .breadcrumb-item {
    color: #ffffff !important;
}

[data-theme="dark"] .breadcrumb-item a {
    color: #ffffff !important;
}

[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
    color: #ffffff !important;
}

[data-theme="dark"] .kpi-title {
    color: #ffffff !important;
}

[data-theme="dark"] .kpi-value {
    color: #ffffff !important;
}

[data-theme="dark"] .satisfaction .kpi-change,
[data-theme="dark"] .resolution .kpi-change,
[data-theme="dark"] .response .kpi-change {
    color: #ffffff !important;
}

[data-theme="dark"] .dashboard-disclaimer p {
    color: #ffffff !important;
}