/* css/main.css - BOOTSTRAP 5.3.7 MOBILE-FIRST VERSION */

:root {
    --primary-blue: #1E3A5F;
    --secondary-blue: #6CA0DC;
    --accent-blue: #B3DDF2;
    --background: #F8FAFC;
    --text-dark: #2D3748;
    --text-light: #718096;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --success: #198754;
    --warning: #ffc107;
    --error: #dc3545;
    --bs-primary: #1E3A5F;
    --bs-primary-rgb: 30, 58, 95;
}

/* Custom Bootstrap Overrides */
.bg-primary {
    background: linear-gradient(135deg, var(--primary-blue), #2A4365) !important;
}

.text-primary {
    color: var(--primary-blue) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), #2A4365) !important;
    border-color: var(--primary-blue) !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #152642, #1E3A5F) !important;
    border-color: #152642 !important;
    transform: translateY(-1px);
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background);
    padding-top: 0 !important;
}

/* Utility Classes */
.hover-primary:hover {
    color: var(--accent-blue) !important;
}

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

/* Hero Section */
.page-hero {
    background: linear-gradient(135deg, var(--primary-blue), #2A4365);
    /* ... rest of your CSS ... */
}

/* To this: */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue), #2A4365);
    color: var(--white);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.05"><polygon fill="white" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-section h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    opacity: 0.9;
}

/* Hero Image Styles */
.hero-image {
    position: relative;
    z-index: 2;
}

.hero-image img {
    max-height: 500px;
    object-fit: cover;
    border-radius: 1rem !important;
}

/* Hero Icon Styles */
.hero-icon {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    /* ensures vertical centering in column */
}

.hero-icon i {
    font-size: 8rem;
    /* large, bold icon */
    color: #CC5500;
    /* burnt orange or brand color */
    background-color: skyblue;
    /* optional background circle */
    border-radius: 50%;
    /* circular background */
    padding: 2rem;
    /* spacing inside circle */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Hover effect: invert colors */
.hero-icon i:hover {
    background-color: #CC5500;
    color: skyblue;
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-icon i {
        font-size: 6rem;
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-icon i {
        font-size: 4rem;
        padding: 1rem;
    }
}


/* Responsive adjustments for hero image */
@media (max-width: 768px) {
    .hero-image {
        margin-top: 2rem;
    }

    .hero-image img {
        max-height: 300px;
    }
}

@media (max-width: 576px) {
    .hero-image img {
        max-height: 250px;
    }
}

/* Card Enhancements */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.stat-card {
    background: linear-gradient(135deg, var(--white), #f8fafc);
    border-left: 4px solid var(--secondary-blue);
}

.condition-card {
    border-left: 4px solid var(--accent-blue);
}

.risk-factor-card {
    background: linear-gradient(135deg, var(--white), #f0f7ff);
    text-align: center;
    padding: 2rem 1rem;
}

/* Button Enhancements */
.btn {
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-rounded {
    border-radius: 50px !important;
}

.btn-lg {
    padding: 0.75rem 2rem;
}

/* Form Enhancements */
.form-control {
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 0.2rem rgba(108, 160, 220, 0.25);
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-blue: #000080;
        --secondary-blue: #0000ff;
        --accent-blue: #4169e1;
    }
}

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

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Content Sections */
.content-section {
    padding: 3rem 0;
}

.content-section h2 {
    color: var(--primary-blue);
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--accent-blue);
    padding-bottom: 0.5rem;
}

/* Grid Layouts */
.conditions-grid,
.services-grid,
.providers-grid {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

.conditions-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-hero {
        padding: 3rem 0;
    }

    .content-section {
        padding: 2rem 0;
    }

    .conditions-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .display-5 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .page-hero {
        padding: 2rem 0;
    }

    .content-section {
        padding: 1.5rem 0;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: none;
    /* hidden by default */
    background-color: skyblue;
    /* sky blue background */
    color: #CC5500;
    /* burnt orange icon */
    border: none;
    border-radius: 50%;
    /* circular shape */
    width: 60px;
    height: 60px;
    display: flex;
    /* flexbox for centering */
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    /* smooth hover/animation */
    z-index: 9999;
}

/* Icon styling */
.back-to-top i {
    font-size: 1.5rem;
    pointer-events: none;
    /* prevent accidental clicks on icon */
}

/* Hover effect: invert colors */
.back-to-top:hover {
    background-color: #CC5500;
    /* burnt orange background */
    color: skyblue;
    /* sky blue icon */
    transform: scale(1.1);
    /* subtle grow effect */
}

/* Fade animations */
.animate__fadeInUp {
    animation: fadeInUp 0.5s forwards;
}

.animate__fadeOutDown {
    animation: fadeOutDown 0.5s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(20px);
    }
}