/* RailFlow Atlas - Custom Styles */

/* Base Styles */
body {
    background-color: #0E1525;
    color: #F5F7FA;
}

/* Floating Smartphone Demo */
.smartphone-container {
    position: relative;
    max-width: 280px;
    border-radius: 36px;
    background-color: #000;
    padding: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
    transition: all 0.5s ease;
}

.smartphone-container:hover {
    transform: perspective(1000px) rotateY(-10deg) rotateX(3deg) translateY(-10px);
}

.smartphone-screen {
    border-radius: 28px;
    overflow: hidden;
}

.smartphone-screen img {
    width: 100%;
    height: auto;
    display: block;
}

/* Custom Utilities */
.bg-navy {
    background-color: #0E1525;
}

.bg-navy-700 {
    background-color: #1A2333;
}

.bg-navy-800 {
    background-color: #141C2E;
}

.bg-navy-900 {
    background-color: #0C111D;
}

.text-teal {
    color: #38BDF8;
}

.bg-teal {
    background-color: #38BDF8;
}

.border-teal {
    border-color: #38BDF8;
}

/* Interactive US State Map */
#state-map-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

#us-map {
    width: 100%;
    height: auto;
    max-width: 1000px;
    margin: 0 auto;
    display: block;
}

#us-map path {
    stroke: #141C2E;
    stroke-width: 0.5;
    fill: rgba(56, 189, 248, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

#state-info {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1A2333;
    color: #F5F7FA;
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    border: 1px solid #38BDF8;
    text-align: center;
    font-size: 18px;
}

.map-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 0 10px;
}

.legend-color {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 4px;
}

/* Heat Map - old styles kept for reference */
.heat-point {
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: rgba(56, 189, 248, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.3s ease;
}

.heat-point::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background-color: #38BDF8;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.heat-point::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background-color: rgba(56, 189, 248, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

.heat-point:hover .tooltip {
    opacity: 1;
    transform: translateY(-10px);
    visibility: visible;
}

.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background-color: #0E1525;
    color: #F5F7FA;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #38BDF8;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #38BDF8;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Mobile menu animation */
.mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.mobile-menu.open {
    max-height: 300px;
}

/* Custom styling for accordion */
[x-cloak] {
    display: none !important;
}

/* Timeline component styles */
.timeline-item {
    position: relative;
    padding-left: 30px;
}

@media (min-width: 768px) {
    .timeline-item {
        padding-left: 0;
    }
}

/* Custom form styling */
input, select, textarea {
    background-color: rgba(14, 21, 37, 0.5);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.5);
}

/* Carousel styling */
.carousel-container {
    position: relative;
    overflow: hidden;
}

/* Custom button hover effects */
.hover-lift {
    transition: transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* Background Image Enhancement Framework */
.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 0;
}

.bg-image.blur {
    filter: blur(2px);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(14, 21, 37, 0.8) 0%, rgba(14, 21, 37, 0.6) 100%);
    z-index: 1;
}

.overlay.subtle {
    background: rgba(14, 21, 37, 0.4);
}

.content {
    position: relative;
    z-index: 2;
}

/* Inline Image Utilities */
.inline-img {
    width: 33.333%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.inline-img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.text-block {
    flex: 1;
    padding: 0 2rem;
}

.feature-section {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.feature-section.reverse {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    .feature-section, .feature-section.reverse {
        flex-direction: column;
    }
    
    .inline-img {
        width: 100%;
        max-width: 400px;
    }
    
    .text-block {
        padding: 1rem 0;
    }
}

/* Background image specific styles */
.bg-mountains {
    background-image: url('/img/BNSF Mountains - Blank Upper Left.jpg');
}

.bg-yard {
    background-image: url('/img/Yard Wide - Blank Upper Half.jpg');
}

.bg-bridge {
    background-image: url('/img/CSX Bridge - Blank Right.jpg');
}

.bg-freight {
    background-image: url('/img/New Freight - Blank Left.jpg');
}

.bg-western {
    background-image: url('/img/Western - Blank Upper Right.jpg');
}
