/* Custom CSS for thefinance247.shop */

/* Root variables for consistent theming */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --body-color: #495057;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.3s ease;
}

/* Base styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--body-color);
}

/* Navigation enhancements */
.navbar {
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
    left: 10%;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0b5cd5 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
    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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.05"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

/* Card enhancements */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.card-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Button enhancements */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0b5cd5 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0b5cd5 0%, var(--primary-color) 100%);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Badge improvements */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 2rem;
}

/* Alert styles */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.alert-heading {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Progress bars */
.progress {
    height: 0.75rem;
    border-radius: 2rem;
    background-color: rgba(0, 0, 0, 0.1);
}

.progress-bar {
    border-radius: 2rem;
    transition: width 0.6s ease;
}

/* Form enhancements */
.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

/* Table improvements */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table thead th {
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Breadcrumb styling */
.breadcrumb {
    background-color: transparent;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.breadcrumb-item {
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-weight: bold;
    color: var(--secondary-color);
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: #0b5cd5;
    text-decoration: underline;
}

/* Footer styling */
footer {
    margin-top: auto;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--light-color) !important;
    transform: translateY(-1px);
}

/* Utility classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #0b5cd5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.shadow-custom {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.rounded-custom {
    border-radius: var(--border-radius) !important;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive design improvements */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        padding: 2rem 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem !important;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 50vh;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0 !important;
    }
}

/* Print styles */
@media print {
    .navbar,
    .hero-section,
    footer,
    .btn,
    .alert {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        break-after: avoid;
    }
    
    .table {
        font-size: 10pt;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles for better accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0066cc;
        --secondary-color: #333333;
        --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .card {
        border: 1px solid #333;
    }
    
    .btn {
        border: 2px solid;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --body-color: #e9ecef;
        --dark-color: #f8f9fa;
        --light-color: #212529;
        --box-shadow: 0 0.125rem 0.25rem rgba(255, 255, 255, 0.075);
    }
    
    body {
        background-color: #1a1a1a;
        color: var(--body-color);
    }
    
    .card {
        background-color: #2d2d2d;
        color: var(--body-color);
    }
    
    .navbar {
        background-color: #2d2d2d !important;
    }
    
    .table {
        background-color: #2d2d2d;
        color: var(--body-color);
    }
    
    .form-control,
    .form-select {
        background-color: #3d3d3d;
        border-color: #555;
        color: var(--body-color);
    }
}
