/* General Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #F5F5F0; /* Warm Neutral Background */
    color: #333333;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Chart Container Strict Styling */
.chart-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 350px; /* Base height */
    max-height: 400px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .chart-container {
        height: 400px;
    }
}

/* Custom Scrollbar for sleek look */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
::-webkit-scrollbar-thumb {
    background: #A3A3A3; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555; 
}

/* Interaction feedback */
.interactive-card {
    transition: all 0.3s ease;
}
.interactive-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Mobile Menu Styles */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.hidden {
    display: none;
}

#mobile-menu:not(.hidden) {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 767px) {
    .chart-container {
        height: 300px;
        max-height: 350px;
    }
    
    /* Mobile navigation adjustments */
    nav .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Mobile section spacing */
    main section {
        margin-bottom: 2rem;
    }
    
    /* Mobile card adjustments */
    .interactive-card {
        margin-bottom: 1rem;
    }
}

/* Print Styles */
@media print {
    nav, footer {
        display: none;
    }
    
    body {
        background-color: white;
    }
    
    .chart-container {
        page-break-inside: avoid;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .text-gray-500 {
        color: #000000;
    }
    
    .text-gray-600 {
        color: #000000;
    }
    
    .border-gray-200 {
        border-color: #000000;
    }
    
    .bg-gray-50 {
        background-color: #ffffff;
    }
}

/* Focus Styles for Keyboard Navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #10B981;
    outline-offset: 2px;
}

/* Custom Button Styles */
.btn-primary {
    background-color: #10B981;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: #6B7280;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #4B5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Chart Legend Styles */
#cost-legend li {
    transition: background-color 0.2s ease;
}

#cost-legend li:hover {
    background-color: #f9fafb;
}

/* Revenue Calculator Animation */
#revenueOutput {
    transition: color 0.2s ease;
}

/* Image Gallery Styles */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Navigation Active State */
nav a.active {
    color: #10B981;
    font-weight: 600;
}

/* Section Spacing */
section {
    scroll-margin-top: 80px; /* Account for fixed navigation */
}

/* Custom Shadow Classes */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}