/* C2RISK Scientific Effects CSS - Elegant & Discreet */

/* Scientific Color Palette */
:root {
    --scientific-primary: #1e3a8a;      /* Deep Blue */
    --scientific-secondary: #0f766e;    /* Teal */
    --scientific-accent: #7c3aed;       /* Purple */
    --scientific-success: #059669;      /* Green */
    --scientific-warning: #d97706;      /* Orange */
    --scientific-danger: #dc2626;       /* Red */
    --scientific-info: #0891b2;         /* Cyan */
    
    --scientific-light: #f8fafc;
    --scientific-dark: #0f172a;
    --scientific-gray: #64748b;
    --scientific-gray-light: #e2e8f0;
    
    /* Gradient Backgrounds */
    --gradient-scientific: linear-gradient(135deg, #1e3a8a 0%, #0f766e 50%, #7c3aed 100%);
    --gradient-climate: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #10b981 100%);
    --gradient-infrastructure: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    
    /* Shadows */
    --shadow-scientific: 0 4px 6px -1px rgba(30, 58, 138, 0.1), 0 2px 4px -1px rgba(30, 58, 138, 0.06);
    --shadow-strong: 0 20px 25px -5px rgba(30, 58, 138, 0.1), 0 10px 10px -5px rgba(30, 58, 138, 0.04);
    --shadow-glow: 0 0 20px rgba(30, 58, 138, 0.3);
}

/* Scientific Background Patterns */
.scientific-bg {
    background: 
        radial-gradient(circle at 20% 80%, rgba(30, 58, 138, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(15, 118, 110, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Climate Data Visualization Effects - Enhanced Glassmorphism */
.climate-data-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.climate-data-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.climate-data-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 
        0 20px 60px 0 rgba(31, 38, 135, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Card Title - Centered */
.climate-data-card .card-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--scientific-dark);
    margin-bottom: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Card Description - Centered */
.climate-data-card .card-description {
    text-align: center;
    color: var(--scientific-gray);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 0.95rem;
}
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 58, 138, 0.1), transparent);
    transition: left 0.5s ease;
}

.climate-data-card:hover::before {
    left: 100%;
}

.climate-data-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
    border-color: var(--scientific-primary);
}

/* Infrastructure Icons with Scientific Effects */
.infrastructure-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-infrastructure);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    transition: all 0.3s ease;
}

.infrastructure-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-infrastructure);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.infrastructure-icon:hover::after {
    opacity: 0.3;
    animation: pulse 2s infinite;
}

.infrastructure-icon:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* Scientific Data Visualization */
.data-visualization {
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    overflow: hidden;
}

.data-visualization::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-scientific);
}

/* Climate Monitoring Dashboard */
.climate-dashboard {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-strong);
    border: 1px solid rgba(30, 58, 138, 0.1);
    position: relative;
}

.climate-dashboard::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(30, 58, 138, 0.05) 0%, transparent 70%),
        radial-gradient(circle at 100% 0%, rgba(15, 118, 110, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: -1;
}

/* Scientific Navigation */
.scientific-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(30, 58, 138, 0.1);
    box-shadow: var(--shadow-scientific);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.scientific-nav .nav-link {
    color: var(--scientific-primary);
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.scientific-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-scientific);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.scientific-nav .nav-link:hover::before,
.scientific-nav .nav-link.active::before {
    width: 80%;
}

.scientific-nav .nav-link:hover {
    background: rgba(30, 58, 138, 0.1);
    transform: translateY(-2px);
}

/* Language Selector with Flags */
.language-selector {
    position: relative;
}

.language-selector .dropdown-toggle {
    background: var(--gradient-scientific);
    border: none;
    border-radius: 25px;
    padding: 8px 16px;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.language-selector .dropdown-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.language-flag {
    width: 20px;
    height: 15px;
    border-radius: 3px;
    margin-right: 8px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Scientific Buttons */
.btn-scientific {
    background: var(--gradient-scientific);
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 4px 15px rgba(30, 58, 138, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-scientific::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-scientific:hover::before {
    left: 100%;
}

.btn-scientific:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(30, 58, 138, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

.btn-scientific:active {
    transform: translateY(-1px) scale(1.02);
}

/* Climate Data Cards */
.climate-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    margin: 15px 0;
    box-shadow: var(--shadow-scientific);
    border: 1px solid rgba(30, 58, 138, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.climate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-climate);
}

.climate-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

/* Infrastructure Risk Indicators */
.risk-indicator {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-low {
    background: rgba(5, 150, 105, 0.1);
    color: var(--scientific-success);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.risk-medium {
    background: rgba(217, 119, 6, 0.1);
    color: var(--scientific-warning);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.risk-high {
    background: rgba(220, 38, 38, 0.1);
    color: var(--scientific-danger);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.risk-critical {
    background: rgba(220, 38, 38, 0.2);
    color: var(--scientific-danger);
    border: 1px solid var(--scientific-danger);
    animation: pulse-critical 2s infinite;
}

/* Scientific Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulse-critical {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Elements */
.floating-element {
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(2) {
    animation-delay: -2s;
}

.floating-element:nth-child(3) {
    animation-delay: -4s;
}

/* Scientific Typography */
.scientific-title {
    background: var(--gradient-scientific);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    line-height: 1.2;
}

.scientific-subtitle {
    color: var(--scientific-gray);
    font-weight: 500;
    line-height: 1.4;
}

/* Data Visualization Charts */
.chart-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-scientific);
    border: 1px solid rgba(30, 58, 138, 0.1);
    position: relative;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-climate);
    border-radius: 12px 12px 0 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .scientific-nav .nav-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .climate-dashboard {
        padding: 20px;
        margin: 10px;
    }
    
    .infrastructure-icon {
        width: 50px;
        height: 50px;
    }
}

/* Loading States */
.loading-scientific {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(30, 58, 138, 0.3);
    border-radius: 50%;
    border-top-color: var(--scientific-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scientific Progress Bars */
.progress-scientific {
    height: 8px;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-scientific .progress-bar {
    background: var(--gradient-scientific);
    height: 100%;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.progress-scientific .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}
