/* Carmen Marine Cooperative - Custom Styles */

:root {
    --primary-color: #0056b3; /* A deeper blue for a more professional feel */
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #343a40; /* Slightly lighter dark for better contrast */
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

/* Navigation */
.navbar {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); /* Add a subtle shadow */
}

.navbar-brand {
    font-weight: 700; /* Bolder brand name */
    font-size: 1.35rem; /* Slightly larger brand name */
}

/* Hero Section */
.hero-section {
    padding: 5rem 0; /* Increased padding for more impact */
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%); /* New gradient */
    color: white;
}

.hero-section h1 {
    color: white;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.9);
}

.hero-section p {
    color: rgba(255, 255, 255, 0.85);
}

/* Cards */
.card {
    border: none; /* Remove border for a cleaner look */
    border-radius: 0.75rem; /* Slightly more rounded corners */
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.05); /* Softer shadow */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Disable hover effect on cards containing forms or other interactive elements */
.report-form-section .card:hover,
.order-section .card:hover,
.heatmap-section .card:hover {
    transform: none;
}

.card-title {
    color: var(--primary-color);
}

/* Sections */
.updates-section {
    background: white;
}

.community-section {
    background: var(--light-color);
}

.page-header {
    border-bottom: 3px solid var(--primary-color);
}

/* Pest Information Cards */
.pest-info-section .card {
    height: 100%;
}

.pest-info-section .border-danger {
    border-width: 2px;
}

/* Pest Selector (Radio Buttons styled as Cards) */
.pest-selector .btn-check:checked + label {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.pest-selector label {
    cursor: pointer;
    transition: all 0.3s ease;
    border-width: 2px;
}

.pest-selector label:hover {
    transform: scale(1.05);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* Report Form */
.report-form-section {
    background: white;
}

.report-form-section .card {
    max-width: 100%;
}

/* Building Visualization */
#buildingVisualization {
    background: #f8f9fa;
    border-radius: 0.5rem;
    overflow: hidden;
}

#buildingVisualization canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.heatmap-gradient {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

/* Statistics Display */
.stat-box {
    padding: 1rem;
    border-radius: 0.5rem;
    background: var(--light-color);
    margin: 0.5rem 0;
}

#statsDisplay .stat-box:hover {
    background: #e9ecef;
}

/* Footer */
.footer {
    margin-top: 4rem; /* Increased margin */
    background-color: var(--dark-color); /* Use the new dark color */
}

.footer a {
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    border-radius: 0.5rem;
    border-left-width: 4px;
}

.alert-info {
    border-left-color: var(--info-color);
}

.alert-success {
    border-left-color: var(--success-color);
}

.alert-danger {
    border-left-color: var(--danger-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

/* Buttons */
.btn {
    padding: 0.6rem 1.75rem; /* Slightly larger padding */
    border-radius: .375;
    font-weight: 600; /* Bolder text */
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
}

/* Loading States */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15rem;
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    #buildingVisualization {
        height: 400px !important;
    }
    
    .pest-selector .col-md-6 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    #buildingVisualization {
        height: 300px !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    #buildingVisualization {
        display: none;
    }
    
    .hero-section {
        background: white;
        color: black;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles for Keyboard Navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed in the future */
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Utility Classes */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.rounded {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

/* Image Placeholder */
img[src*="placeholder"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Building Placeholder Box */
.building-placeholder-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.building-placeholder-box .placeholder-content {
    text-align: center;
}

.building-placeholder-box h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.building-placeholder-box p {
    font-size: 1.25rem;
    margin: 0;
    opacity: 0.9;
}
