/* Custom styles to complement Bootstrap */

/* Card styling */
.document-card {
    transition: all 0.3s ease;
    height: 100%;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* File input styling */
.custom-file-upload {
    display: block;
    padding: 1.5rem;
    border: 2px dashed var(--bs-border-color);
    border-radius: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-file-upload:hover {
    border-color: var(--bs-primary);
}

.custom-file-upload.has-file {
    border-color: var(--bs-success);
    background-color: rgba(var(--bs-success-rgb), 0.1);
}

/* Maritime-themed Loading animation */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1a75ff 0%, #004080 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
}

.maritime-scene {
    position: relative;
    width: 300px;
    height: 200px;
    margin-bottom: 20px;
}

/* Ocean waves */
.ocean {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #00579c;
    overflow: hidden;
    border-radius: 0 0 8px 8px;
}

.wave {
    position: absolute;
    width: 300%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%230073ca' opacity='.25'%3E%3C/path%3E%3Cpath d='M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z' fill='%230073ca' opacity='.5'%3E%3C/path%3E%3Cpath d='M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z' fill='%230073ca' opacity='.75'%3E%3C/path%3E%3C/svg%3E") repeat-x;
    animation: wave-animation 10s linear infinite;
    transform: translate3d(0, 0, 0);
}

.wave:nth-of-type(2) {
    animation: wave-animation 7s linear infinite;
    opacity: 0.6;
    bottom: 10px;
}

.wave:nth-of-type(3) {
    animation: wave-animation 15s linear infinite;
    opacity: 0.4;
    bottom: 15px;
}

@keyframes wave-animation {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Cargo ship */
.ship {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 40px;
    animation: ship-movement 6s ease-in-out infinite;
}

.ship-body {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 20px;
    background-color: #3D5A80;
    border-radius: 6px 6px 0 0;
}

.ship-deck {
    position: absolute;
    bottom: 20px;
    left: 30px;
    width: 60px;
    height: 12px;
    background-color: #293241;
    border-radius: 2px 2px 0 0;
}

.ship-smokestack {
    position: absolute;
    bottom: 32px;
    left: 45px;
    width: 10px;
    height: 15px;
    background-color: #EE6C4D;
}

.ship-container {
    position: absolute;
    bottom: 20px;
    width: 15px;
    height: 10px;
    background-color: #E07A5F;
    border: 1px solid #f8edeb;
}

.ship-container:nth-of-type(1) {
    left: 5px;
    background-color: #81B29A;
}

.ship-container:nth-of-type(2) {
    left: 25px;
    background-color: #F2CC8F;
}

.ship-container:nth-of-type(3) {
    right: 25px;
    background-color: #3D5A80;
}

.ship-container:nth-of-type(4) {
    right: 5px;
    background-color: #98C1D9;
}

/* Smoke animation */
.smoke {
    position: absolute;
    bottom: 46px;
    left: 48px;
    width: 4px;
    height: 4px;
    background-color: #E0FBFC;
    border-radius: 50%;
    opacity: 0;
    animation: smoke-animation 2s ease-out infinite;
}

.smoke:nth-of-type(2) {
    animation-delay: 0.5s;
}

.smoke:nth-of-type(3) {
    animation-delay: 1s;
}

@keyframes smoke-animation {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-20px) scale(2);
        opacity: 0;
    }
}

@keyframes ship-movement {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Seagulls */
.seagull {
    position: absolute;
    width: 20px;
    height: 10px;
    top: 40px;
    opacity: 0.7;
    animation: seagull-flight 15s linear infinite;
}

.seagull:before, .seagull:after {
    content: "";
    position: absolute;
    width: 10px;
    height: 2px;
    background-color: white;
    top: 4px;
}

.seagull:before {
    left: 0;
    transform: rotate(30deg);
}

.seagull:after {
    right: 0;
    transform: rotate(-30deg);
}

.seagull:nth-of-type(1) {
    left: -20px;
    animation-delay: 0s;
}

.seagull:nth-of-type(2) {
    left: -40px;
    top: 30px;
    animation-delay: 1s;
}

.seagull:nth-of-type(3) {
    left: -60px;
    top: 50px;
    animation-delay: 2s;
}

@keyframes seagull-flight {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(350px);
    }
}

.spinner-text {
    margin-top: 1.5rem;
    font-weight: 500;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: #ffffff;
}

/* Results page */
.results-container {
    padding: 1.5rem;
}

.section-header {
    border-bottom: 1px solid var(--bs-border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Hero section on home page */
.hero-section {
    padding: 4rem 0;
    background: linear-gradient(120deg, var(--bs-dark), var(--bs-secondary-bg));
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    margin-bottom: 1rem;
}

/* Footer styling */
footer {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid var(--bs-border-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
}
