/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Open+Sans:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Custom Properties - Color Palette */
:root {
    /* Primary Colors */
    --primary-color: #3778C2;
    --accent-color: #3DDC97;
    --background-color: #F5F7FA;
    --text-color: #2E2E2E;

    /* Color Variations */
    --primary-light: #4A8BD4;
    --primary-dark: #2A5A9A;
    --accent-light: #5FE4A8;
    --accent-dark: #2BC785;
    --background-light: #FFFFFF;
    --background-dark: #E8ECF0;
    --text-light: #6B7280;
    --text-muted: #9CA3AF;

    /* Typography */
    --font-headline: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', 'Inter', sans-serif;
    --font-ui: 'Poppins', sans-serif;

    /* Spacing and Layout */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --shadow-soft: 0 2px 8px rgba(55, 120, 194, 0.08);
    --shadow-medium: 0 4px 16px rgba(55, 120, 194, 0.12);
    --shadow-strong: 0 8px 32px rgba(55, 120, 194, 0.16);

    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-medium: 0.3s ease-in-out;
}

/* Base Styles */
body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    font-weight: 400;
}

/* Typography */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-headline);
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
}

h1, .h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

h2, .h2 {
    font-size: 2rem;
    font-weight: 700;
}

h3, .h3 {
    font-size: 1.75rem;
    font-weight: 700;
}

h4, .h4 {
    font-size: 1.5rem;
    font-weight: 600;
}

h5, .h5 {
    font-size: 1.25rem;
    font-weight: 600;
}

h6, .h6 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* UI Elements Font */
.btn, .form-control, .form-select, .nav-link, .dropdown-item {
    font-family: var(--font-ui);
}

/* Bootstrap Color Overrides */
.text-primary {
    color: var(--primary-color) !important;
}

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

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-light {
    background-color: var(--background-light) !important;
}

/* Button Styles */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all var(--transition-fast);
    border: none;
    box-shadow: var(--shadow-soft);
}

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

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-success,
.btn-accent {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.btn-success:hover,
.btn-success:focus,
.btn-accent:hover,
.btn-accent:focus {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

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

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: var(--border-radius-lg);
}

/* Card Styles */
.card {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-soft);
    background-color: var(--background-light);
    transition: all var(--transition-medium);
}

.card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--background-light);
    border-bottom: 1px solid var(--background-dark);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
    font-family: var(--font-ui);
    font-weight: 600;
}

/* Index Page Card Styles */
.hover-card {
    transition: all var(--transition-medium);
    cursor: pointer;
}

.hover-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.hover-card a {
    color: inherit;
    text-decoration: none !important;
}

.hover-card a:hover {
    color: inherit;
}

.hover-card .card-title {
    transition: color var(--transition-fast);
}

.hover-card:hover .card-title {
    color: var(--primary-color) !important;
}

/* Form Styles */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 2px solid var(--background-dark);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all var(--transition-fast);
    background-color: var(--background-light);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(55, 120, 194, 0.15);
    background-color: var(--background-light);
}

.form-label {
    font-family: var(--font-ui);
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* Navigation Styles */
.navbar {
    background-color: var(--primary-color) !important;
    box-shadow: var(--shadow-medium);
    padding: 1rem 0;
}

.navbar-brand {
    font-family: var(--font-headline);
    font-weight: 800;
    font-size: 1.5rem;
    color: white !important;
}

.nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all var(--transition-fast);
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
}

.nav-link:hover,
.nav-link:focus {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-menu {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-medium);
    background-color: var(--background-light);
}

.dropdown-item {
    color: var(--text-color);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--background-color);
    color: var(--primary-color);
}

/* Container and Layout */
.container {
    max-width: 1200px;
}

/* Section Styling */
section {
    background-color: var(--background-light);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
}

/* Footer Styles */
footer {
    background-color: var(--background-light);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
}

/* Alert Styles */
.alert {
    border-radius: var(--border-radius);
    border: none;
    font-family: var(--font-ui);
}

.alert-success {
    background-color: rgba(61, 220, 151, 0.1);
    color: var(--accent-dark);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #c82333;
}

.alert-info {
    background-color: rgba(55, 120, 194, 0.1);
    color: var(--primary-dark);
}

/* Badge Styles */
.badge {
    border-radius: var(--border-radius);
    font-family: var(--font-ui);
    font-weight: 500;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

.badge.bg-success {
    background-color: var(--accent-color) !important;
}

/* Table Styles */
.table {
    background-color: var(--background-light);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.table th {
    background-color: var(--background-color);
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--background-dark);
}

/* Modal Styles */
.modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-strong);
}

.modal-header {
    background-color: var(--background-color);
    border-bottom: 1px solid var(--background-dark);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-title {
    font-family: var(--font-headline);
    font-weight: 600;
}

/* Pagination Styles */
.pagination .page-link {
    border-radius: var(--border-radius);
    border: 2px solid var(--background-dark);
    color: var(--primary-color);
    margin: 0 2px;
    transition: all var(--transition-fast);
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Progress Bar Styles */
.progress {
    border-radius: var(--border-radius);
    background-color: var(--background-dark);
}

.progress-bar {
    background-color: var(--accent-color);
}

/* Sound Wave Inspired Elements */
.wave-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 50%, var(--primary-color) 100%);
    background-size: 20px 4px;
    animation: wave 2s linear infinite;
}

@keyframes wave {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 0;
    }
}

/* Responsive Design - Mobile First */
@media (max-width: 576px) {
    h1, .h1 {
        font-size: 2rem;
    }

    h2, .h2 {
        font-size: 1.75rem;
    }

    h3, .h3 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .card {
        margin-bottom: 1rem;
    }
}

@media (min-width: 768px) {
    .btn-lg {
        padding: 1.25rem 2.5rem;
        font-size: 1.25rem;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 1140px;
    }
}

/* Accessibility Improvements */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: more) {
    :root {
        --text-color: #000000;
        --background-color: #FFFFFF;
        --primary-color: #0056b3;
        --accent-color: #28a745;
    }
}

/* 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 {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }

    body {
        background-color: white !important;
        color: black !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}