/* Mental Health Support App - Custom Styles */

/* Root Variables for Calming Color Scheme */
:root {
    --primary-blue: #4A90E2;
    --soft-green: #7ED321;
    --warm-orange: #F5A623;
    --light-gray: #F7F9FC;
    --danger-red: #D0021B;
    --success-green: #7ED321;
    --warning-yellow: #F8E71C;
    --info-blue: #50E3C2;
    --text-dark: #2C3E50;
    --text-muted: #7F8C8D;
    --border-light: #E8F4FD;
}

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

/* Crisis Banner */
.crisis-banner {
    background: linear-gradient(135deg, #D0021B, #FF4757) !important;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: pulse-soft 3s infinite;
}

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

/* Navigation */
.navbar {
    background-color: white !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 3px solid var(--primary-blue);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--primary-blue) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    border-radius: 20px;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: var(--border-light);
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.hero-section h1 {
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.card-header {
    border: none;
    font-weight: 600;
    padding: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Crisis Resource Cards */
.crisis-resource {
    background: white;
    border: 1px solid var(--border-light) !important;
    transition: all 0.3s ease;
}

.crisis-resource:hover {
    border-color: var(--primary-blue) !important;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

/* Buttons */
.btn {
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    text-transform: none;
    transition: all 0.3s ease;
    border: none;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), #357ABD);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-green), #6BCF0F);
    box-shadow: 0 4px 15px rgba(126, 211, 33, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(126, 211, 33, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-red), #B91C1C);
    box-shadow: 0 4px 15px rgba(208, 2, 27, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(208, 2, 27, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-blue), #3DCAB3);
    box-shadow: 0 4px 15px rgba(80, 227, 194, 0.3);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(80, 227, 194, 0.4);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.alert-danger {
    background: linear-gradient(135deg, #FFF5F5, #FED7D7);
    color: #C53030;
    border-left: 4px solid var(--danger-red);
}

.alert-warning {
    background: linear-gradient(135deg, #FFFBEB, #FEF5E7);
    color: #B7791F;
    border-left: 4px solid var(--warning-yellow);
}

.alert-info {
    background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
    color: #166534;
    border-left: 4px solid var(--info-blue);
}

.alert-success {
    background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
    color: #166534;
    border-left: 4px solid var(--success-green);
}

/* Photo Upload Section */
.photo-upload-group {
    background: white;
    border: 2px dashed var(--border-light) !important;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.photo-upload-group:hover {
    border-color: var(--primary-blue) !important;
    background-color: #F8FAFF;
}

/* Form Controls */
.form-control {
    border-radius: 10px;
    border: 2px solid var(--border-light);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Impact Visualization */
.impact-stat {
    text-align: center;
    padding: 1rem;
}

.impact-stat h2 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.photo-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.3) 50%,
        rgba(0,0,0,0.7) 100%
    );
    border-radius: 0 0 15px 15px;
}

/* Badge Styles */
.badge {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2C3E50, #34495E) !important;
    color: white;
    margin-top: 3rem;
}

footer h5 {
    color: white !important;
}

/* Visitor Counter Styles */
.stat-card {
    padding: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.display-4 {
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card i {
    margin-right: 10px;
}

/* Active Counter Animation */
.active-counter {
    position: relative;
    overflow: hidden;
}

.active-counter .fa-circle {
    animation: pulse-live 2s infinite;
    color: #28a745;
}

@keyframes pulse-live {
    0% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

.active-counter::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .hero-section {
        padding: 2rem 1rem !important;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}

/* Accessibility Improvements */
.btn:focus,
.form-control:focus,
.card:focus {
    outline: 3px solid rgba(74, 144, 226, 0.3);
    outline-offset: 2px;
}

/* Loading Animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top: 2px solid var(--primary-blue);
    animation: spin 1s linear infinite;
}

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

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--text-dark);
    }
    
    .btn {
        border: 2px solid var(--text-dark);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .crisis-banner,
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}
