/**
 * World Sea Marine Ships - Custom Styles
 * Phase 1 - Foundation
 */

/* CSS Variables for Maritime Theme */
:root {
    --primary-navy: #1e3a8a;
    --secondary-blue: #3b82f6;
    --accent-teal: #0891b2;
    --sea-green: #059669;
    --light-blue: #dbeafe;
    --dark-navy: #1e293b;
    --warning-amber: #f59e0b;
    --success-emerald: #10b981;
    --danger-red: #ef4444;
    --gray-light: #f8fafc;
    --gray-medium: #64748b;
    --gray-dark: #334155;
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 700;
}

/* Maritime Color Classes */
.text-maritime {
    color: var(--primary-navy) !important;
}

.bg-maritime {
    background-color: var(--primary-navy) !important;
}

.maritime-bg {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-blue) 100%);
}

.maritime-accent {
    color: var(--accent-teal) !important;
}

.bg-maritime-accent {
    background-color: var(--accent-teal) !important;
}

/* Button Styles */
.btn-maritime {
    background-color: var(--accent-teal);
    border-color: var(--accent-teal);
    color: white;
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-maritime:hover {
    background-color: var(--sea-green);
    border-color: var(--sea-green);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.btn-maritime:focus,
.btn-maritime:active {
    background-color: var(--sea-green);
    border-color: var(--sea-green);
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(8, 145, 178, 0.25);
}

.btn-outline-maritime {
    color: var(--accent-teal);
    border-color: var(--accent-teal);
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-outline-maritime:hover {
    background-color: var(--accent-teal);
    border-color: var(--accent-teal);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

/* Navigation Styles */
.navbar {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-teal) !important;
}

.navbar-nav .nav-link.active {
    color: var(--warning-amber) !important;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: var(--warning-amber);
    border-radius: 1px;
}

/* Card Styles */
.card {
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.service-card {
    border: none;
    border-radius: 1rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(30, 58, 138, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-blue), rgba(8, 145, 178, 0.1));
    border-radius: 50%;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--accent-teal), var(--sea-green));
}

.service-card:hover .service-icon i {
    color: white !important;
    transform: scale(1.1);
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-bg {
    z-index: -1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.8) 0%, rgba(59, 130, 246, 0.6) 100%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* Testimonials */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: var(--primary-navy);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    background-color: var(--accent-teal);
}

.carousel-control-prev {
    left: -25px;
}

.carousel-control-next {
    right: -25px;
}

/* Form Styles */
.form-control {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 0.2rem rgba(8, 145, 178, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
}

/* Modal Styles */
.modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header.maritime-bg {
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_filter input {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(8, 145, 178, 0.02);
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, var(--dark-navy) 0%, var(--primary-navy) 100%);
}

footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-teal) !important;
}

/* Utility Classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.bg-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.border-maritime {
    border-color: var(--accent-teal) !important;
}

.shadow-maritime {
    box-shadow: 0 10px 25px rgba(8, 145, 178, 0.15);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section .container {
        padding-top: 100px;
        padding-bottom: 50px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .service-card {
        margin-bottom: 1.5rem;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        display: none;
    }
}

@media (max-width: 576px) {
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .modal,
    .carousel-control-prev,
    .carousel-control-next,
    footer {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        break-inside: avoid;
    }
}

/* Loading States */
.loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--accent-teal);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Focus States */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--accent-teal);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn-maritime {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 1px solid currentColor;
    }
}

/* Phase 3: Advanced Services Catalog Styles */

/* Service Catalog Controls */
.service-icon-container {
    position: relative;
}

.service-stats {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9rem;
}

.stat-item strong {
    font-size: 1.2rem;
    color: var(--maritime-color);
}

/* View Container Transitions */
.view-container {
    transition: all 0.3s ease;
}

/* Service Thumbnails */
.service-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--maritime-light);
}

/* Service Grid Cards */
.service-grid-card {
    transition: all 0.3s ease;
    height: 100%;
}

.service-grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.service-grid-card .card-img-top {
    transition: transform 0.3s ease;
}

.service-grid-card:hover .card-img-top {
    transform: scale(1.05);
}

/* DataTables Custom Styling */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_length select,
.dataTables_filter input {
    border: 1px solid var(--maritime-light);
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
}

.dataTables_filter input:focus {
    border-color: var(--maritime-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

.table-hover tbody tr:hover {
    background-color: rgba(30, 58, 138, 0.05);
}

/* Description Cell Styling */
.description-cell {
    max-width: 300px;
    word-wrap: break-word;
    line-height: 1.4;
}

/* Compare Button States */
.compare-btn.active {
    background-color: var(--warning-color) !important;
    border-color: var(--warning-color) !important;
    color: #000 !important;
}

/* Service Comparison Table */
.table-bordered th,
.table-bordered td {
    border: 1px solid var(--maritime-light);
}

.table-bordered thead th {
    background-color: var(--maritime-color);
    color: white;
    border-color: var(--maritime-color);
}

/* Category Filter Styling */
.list-group-item {
    border: 1px solid var(--maritime-light);
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background-color: rgba(30, 58, 138, 0.05);
    border-color: var(--maritime-color);
}

.list-group-item.active {
    background-color: var(--maritime-color);
    border-color: var(--maritime-color);
}

.list-group-item.active:hover {
    background-color: var(--maritime-dark);
    border-color: var(--maritime-dark);
}

/* Badge Styling */
.bg-maritime-light {
    background-color: rgba(30, 58, 138, 0.1) !important;
}

.text-maritime {
    color: var(--maritime-color) !important;
}

/* Modal Enhancements */
.modal-header.maritime-bg {
    background: var(--maritime-gradient);
}

.modal-body img {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Floating Icon Animation */
.floating-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Service Features Section */
.feature-icon {
    padding: 1.5rem;
    border-radius: 50%;
    background: rgba(30, 58, 138, 0.1);
    display: inline-block;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.py-5 .col-md-3:hover .feature-icon {
    background: var(--maritime-color);
    transform: scale(1.1);
}

.py-5 .col-md-3:hover .feature-icon i {
    color: white !important;
}

/* Responsive DataTable */
@media (max-width: 768px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .service-thumb {
        width: 40px;
        height: 40px;
    }
    
    .description-cell {
        max-width: 200px;
        font-size: 0.9rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Loading States */
.loading-overlay {
    position: relative;
}

.loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--maritime-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Search Enhancement */
.search-highlight {
    background-color: yellow;
    padding: 0 2px;
    border-radius: 2px;
}

/* Service Card Animations */
.service-card {
    transition: all 0.3s ease;
}

.service-card.filtered-out {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Comparison View Enhancements */
#compareContent .table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#compareContent .table th {
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}

#compareContent .table td {
    vertical-align: middle;
    padding: 1rem;
}

/* Quote Form Enhancements */
#quickQuoteForm .form-control:focus,
#quickQuoteForm .form-select:focus {
    border-color: var(--maritime-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

.border-warning {
    border: 2px solid var(--warning-color) !important;
    border-radius: 8px;
    transition: border 0.3s ease;
}

/* Sticky Sidebar */
.sticky-top {
    transition: all 0.3s ease;
}

/* Advanced Animations */
.animate-slideInLeft {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced Gradients */
.maritime-gradient {
    background: linear-gradient(135deg, var(--maritime-color) 0%, var(--teal-color) 100%);
}

/* Print Styles for Service Comparison */
@media print {
    .btn, .navbar, .footer {
        display: none !important;
    }
    
    #compareContent .table {
        border: 1px solid #000 !important;
    }
    
    #compareContent .table th,
    #compareContent .table td {
        border: 1px solid #000 !important;
        padding: 8px !important;
    }
}

/* Phase 4: Marketplace E-commerce Styles */

/* Marketplace Header */
.marketplace-gradient {
    background: linear-gradient(135deg, var(--maritime-color) 0%, var(--teal-color) 50%, var(--success-color) 100%);
}

.marketplace-icon-container {
    position: relative;
}

.marketplace-stats {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
}

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    border-color: var(--maritime-color);
}

.marketplace-product-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
}

.product-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    min-height: 2.6rem;
}

.product-card .card-text {
    font-size: 0.85rem;
    line-height: 1.4;
    min-height: 3.5rem;
}

/* Product Thumbnails */
.product-thumb, .marketplace-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--maritime-light);
    transition: transform 0.2s ease;
}

.product-thumb:hover {
    transform: scale(1.1);
}

/* Shopping Cart Styles */
.cart-item {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-total {
    background: linear-gradient(135deg, var(--maritime-color) 0%, var(--teal-color) 100%);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.product-actions .btn {
    flex: 1;
    font-size: 0.85rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .marketplace-stats {
        position: static;
        transform: none;
        margin-top: 1rem;
    }
    
    .product-card .card-title {
        font-size: 0.9rem;
        min-height: 2.2rem;
    }
    
    .product-card .card-text {
        font-size: 0.8rem;
        min-height: 3rem;
    }
    
    .product-thumb {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    .marketplace-gradient h1 {
        font-size: 2rem;
    }
    
    .marketplace-gradient .lead {
        font-size: 1rem;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
}

/* ============================================================================
   PHASE 5: WEST AFRICAN PORTS & MAPPING STYLES
   ============================================================================ */

/* Ports Page Header */
.ports-gradient {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #5cb3cc 100%);
    position: relative;
    overflow: hidden;
}

.ports-gradient::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="anchor-pattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><text x="10" y="15" text-anchor="middle" fill="rgba(255,255,255,0.1)" font-size="12">⚓</text></pattern></defs><rect width="100" height="100" fill="url(%23anchor-pattern)"/></svg>');
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.ports-stats-container {
    position: relative;
    z-index: 2;
}

.ports-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.stat-item strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.stat-item span {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Port Information Cards */
.port-info-card {
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}

.port-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.port-flag {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-info));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.port-specs .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

.badge.bg-maritime-light {
    background-color: rgba(30, 60, 114, 0.1) !important;
    color: var(--maritime-color) !important;
}

.badge.bg-success-light {
    background-color: rgba(25, 135, 84, 0.1) !important;
    color: var(--success-color) !important;
}

/* Interactive Map Styles */
.ports-map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.map-content {
    background: linear-gradient(135deg, #2c5aa0 0%, #5cb3cc 100%);
    position: relative;
    overflow: hidden;
}

.port-marker {
    cursor: pointer;
    z-index: 10;
}

.port-marker:hover .marker-icon {
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}

.port-marker:hover .marker-label {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.marker-icon {
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.marker-label {
    opacity: 0.8;
    transition: all 0.3s ease;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-legend .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
}

/* Vessel Tracking Styles */
.tracking-widget {
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.marine-traffic-widget {
    padding: 1.5rem;
}

.marine-traffic-map {
    border-radius: 8px;
    min-height: 300px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    position: relative;
    overflow: hidden;
}

.marine-traffic-map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(92, 179, 204, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(42, 82, 152, 0.1) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.tracking-stat {
    padding: 0.5rem;
}

.tracking-stat strong {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.tracking-stat small {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Port Statistics Cards */
.stat-card {
    border-radius: 10px;
    border: none;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--card-bg-start, #007bff), var(--card-bg-end, #0056b3));
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.stat-card.bg-primary {
    --card-bg-start: #007bff;
    --card-bg-end: #0056b3;
}

.stat-card.bg-success {
    --card-bg-start: #28a745;
    --card-bg-end: #1e7e34;
}

.stat-card.bg-warning {
    --card-bg-start: #ffc107;
    --card-bg-end: #e0a800;
}

.stat-card.bg-info {
    --card-bg-start: #17a2b8;
    --card-bg-end: #117a8b;
}

/* View Container Transitions */
.view-container {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Vessel List Table */
.vessel-list .table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vessel-list .table thead th {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    border: none;
    padding: 1rem;
    font-weight: 600;
}

.vessel-list .table tbody tr {
    transition: all 0.3s ease;
}

.vessel-list .table tbody tr:hover {
    background-color: rgba(30, 60, 114, 0.05);
    transform: scale(1.01);
}

.vessel-list .table td {
    padding: 1rem;
    vertical-align: middle;
    border-color: rgba(0, 0, 0, 0.05);
}

/* Port Details Modal */
.modal-xl .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header.maritime-bg {
    background: linear-gradient(135deg, #1e3c72, #2a5298) !important;
    border-radius: 15px 15px 0 0;
}

.port-services-list .list-group-item {
    border: none;
    padding: 0.75rem 0;
    background: transparent;
}

.port-services-list .list-group-item:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Port Brochure Download Animation */
.download-animation {
    position: relative;
    overflow: hidden;
}

.download-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Responsive Design for Ports */
@media (max-width: 992px) {
    .ports-stats {
        gap: 1rem;
    }
    
    .stat-item strong {
        font-size: 1.2rem;
    }
    
    .port-marker .marker-label {
        font-size: 10px;
        max-width: 100px;
    }
}

@media (max-width: 768px) {
    .ports-stats {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
    }
    
    .stat-item strong,
    .stat-item span {
        display: inline;
    }
    
    .map-content {
        height: 400px !important;
    }
    
    .port-marker {
        transform: scale(0.8);
    }
    
    .tracking-data .row {
        margin: 0;
    }
    
    .tracking-data .col-md-3 {
        margin-bottom: 1rem;
    }
    
    .vessel-list .table-responsive {
        font-size: 0.85rem;
    }
    
    .modal-xl .modal-dialog {
        margin: 1rem;
    }
}

@media (max-width: 576px) {
    .btn-group .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .btn-group .btn i {
        font-size: 0.7rem;
    }
    
    .port-info-card .card-body {
        padding: 1rem;
    }
    
    .port-specs .badge {
        font-size: 0.65rem;
        padding: 0.25em 0.5em;
        margin: 0.1rem;
    }
    
    .map-controls .btn-group-vertical .btn {
        padding: 0.4rem;
        font-size: 0.8rem;
    }
    
    .marine-traffic-map {
        min-height: 250px;
        padding: 1.5rem !important;
    }
    
    .tracking-stat strong {
        font-size: 1rem;
    }
    
    .vessel-list .table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Print Styles for Port Brochures */
@media print {
    .port-details-modal .modal-header,
    .port-details-modal .modal-footer {
        display: none;
    }
    
    .port-details-modal .modal-body {
        padding: 0;
        margin: 0;
    }
    
    .port-info-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}