/* Estilos personalizados - ESTABILIDAD FINAL */
html {
    scroll-behavior: smooth;
}

.boat-card {
    transition: all 0.4s ease;
}

.boat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.modal-overlay {
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

/* Transitions for header elements */
#main-header,
#main-header svg,
#header-container {
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Base resets */
.blue-med-wrapper img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    background-color: #f8fafc;
    aspect-ratio: 16 / 9;
}

/* --- LOGO & HEADER VISIBILITY --- */

/* Mobile Default */
#main-header {
    height: 100px;
    padding: 10px 0;
}

#main-header svg {
    height: 70px !important;
    width: auto !important;
    display: block;
    margin: 0 auto;
}

/* Tablet */
@media (min-width: 768px) {
    #main-header {
        height: 120px;
    }

    #main-header svg {
        height: 85px !important;
    }
}

/* Desktop - Reduced top spacing */
@media (min-width: 1024px) {
    #main-header {
        height: 180px;
        /* Refined Initial PC */
        padding-top: 5px;
        /* Bring closer to top */
    }

    #main-header svg {
        height: 150px !important;
    }
}

/* --- SCROLLED STATES --- */

.header-scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* PC Scrolled */
@media (min-width: 1024px) {
    .header-scrolled {
        height: 120px !important;
    }

    .header-scrolled svg {
        height: 100px !important;
    }
}

/* Mobile Scrolled */
@media (max-width: 1023px) {
    .header-scrolled {
        height: 85px !important;
    }

    .header-scrolled svg {
        height: 60px !important;
    }
}

/* --- FILTER BAR (COMPACT & STABLE) --- */

#filter-bar {
    margin-bottom: 3rem;
    padding: 1.5rem 0;
    transition: all 0.4s ease;
}

.filter-compact {
    padding: 0.6rem 0 !important;
    margin-bottom: 1.5rem !important;
    /* Move list up on scroll */
}

.filter-compact input,
.filter-compact select {
    padding-bottom: 0.4rem !important;
    font-size: 0.85rem !important;
}

/* On scroll, force horizontal on desktop/tablet */
@media (min-width: 768px) {
    .filter-compact .filter-container {
        flex-direction: row !important;
        gap: 1.5rem !important;
    }
}

/* Mobile Modal functional fixes */
@media (max-width: 767px) {
    #boat-modal .bg-white {
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
}

.filter-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}