/* Define the KMR specific colors */
:root {
    --color-navy: #0F172A; /* Deep navy */
    --color-accent: #3B82F6; /* Blue 500 */
    --color-light: #F8FAFC; /* Off-white */
}

.bg-kmr-navy { background-color: var(--color-navy); }
.bg-kmr-light { background-color: var(--color-light); }
.text-kmr-navy { color: var(--color-navy); }
.bg-kmr-accent { background-color: var(--color-accent); }
.text-kmr-accent { color: var(--color-accent); }
.text-kmr-light { color: var(--color-light); }
.border-kmr-navy { border-color: var(--color-navy); }
.border-kmr-accent { border-color: var(--color-accent); }

/* Base font styling */
body {
    font-family: ui-sans-serif, system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* Ensure navigation links are neutral by default, only blue on hover */
header nav a:not([class*="bg-"]):not(:hover) {
    color: inherit !important;
}

header nav a:not([class*="bg-"]):visited:not(:hover) {
    color: inherit !important;
}

/* Hero video background styling */
#lifeboats video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Dark overlay on hero */
.hero-overlay {
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 1;
}

/* Refits hero readability - remove light gradient, keep dark navy */
#refits-hero {
    position: relative;
    isolation: isolate;
    background-color: var(--color-navy);
    background-image: radial-gradient(900px circle at 50% 30%, rgba(59, 130, 246, 0.35), transparent 60%);
}

/* Ensure hero content sits above the overlay */
#refits-hero > * {
    position: relative;
    z-index: 1;
}

/* Headline - white text */
#refits-hero h1 {
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* Eyebrow (AVAILABLE ELECTRIC LIFEBOATS) - Blue accent color */
#refits-hero p:first-of-type {
    color: #bfdbfe !important; /* blue-200 */
    letter-spacing: 0.35em;
    font-weight: 700;
}

/* Body copy - Light blue */
#refits-hero p.text-blue-100 {
    color: #dbeafe !important; /* blue-100 */
}

/* Make hero buttons readable */
#refits-hero a,
#refits-hero button {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.20);
}

/* Conversions hero readability - remove light gradient, keep dark navy */
#conversions-hero {
    position: relative;
    isolation: isolate;
    background-color: var(--color-navy);
    background-image: radial-gradient(900px circle at 50% 30%, rgba(34, 197, 94, 0.35), transparent 60%);
}

#conversions-hero > * {
    position: relative;
    z-index: 1;
}

#conversions-hero h1 {
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

#conversions-hero p:first-of-type {
    color: #a7f3d0 !important; /* emerald-200 */
    letter-spacing: 0.35em;
    font-weight: 700;
}

#conversions-hero p.text-emerald-100 {
    color: #d1fae5 !important; /* emerald-100 */
}

#conversions-hero a,
#conversions-hero button {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.20);
}

/* Console kits hero readability - remove light gradient, keep dark navy */
#kits-hero {
    position: relative;
    isolation: isolate;
    background-color: var(--color-navy);
    background-image: radial-gradient(900px circle at 50% 30%, rgba(168, 85, 247, 0.35), transparent 60%);
}

#kits-hero > * {
    position: relative;
    z-index: 1;
}

#kits-hero h1 {
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

#kits-hero p:first-of-type {
    color: #e9d5ff !important; /* purple-200 */
    letter-spacing: 0.35em;
    font-weight: 700;
}

#kits-hero p.text-purple-100 {
    color: #f3e8ff !important; /* purple-100 */
}

#kits-hero a,
#kits-hero button {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.20);
}

/* Data-driven boats grid */
#available-builds .boats-grid {
    display: grid;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    #available-builds .boats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.boat-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    box-shadow: 0 25px 60px -35px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: auto;
    min-height: 0;
}

.boat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 35px 60px -30px rgba(15, 23, 42, 0.45);
}

.boat-card--sold {
    opacity: 0.75;
    filter: grayscale(0.35);
}

.boat-card__status-badge {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f172a;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.boat-card__status-badge--available {
    color: #0369a1;
    border-color: rgba(59, 130, 246, 0.35);
}

.boat-card__status-badge--inbuild {
    color: #92400e;
    border-color: rgba(217, 119, 6, 0.4);
    background-color: rgba(254, 243, 199, 0.9);
}

.boat-card__status-badge--reserved {
    color: #92400e;
    border-color: rgba(249, 115, 22, 0.45);
    background-color: rgba(255, 247, 237, 0.92);
}

.boat-card__status-badge--sold {
    color: #fff;
    background-color: #b91c1c;
    border-color: #dc2626;
}

.boat-card__gallery {
    padding: 1.5rem 1.5rem 0;
}

.boat-card--console-kit .boat-card__main-image-wrapper {
    aspect-ratio: 3 / 2;
}

.boat-card--console-kit {
    max-width: 70%;
    margin: 0 auto;
}

.boat-card--console-kit .boat-card__gallery {
    padding: 1.1rem 1.1rem 0;
}

.boat-card--console-kit .boat-card__thumbnail-button {
    aspect-ratio: 3 / 2;
    max-height: 110px;
}

.boat-card--console-kit .boat-card__body {
    padding: 1.4rem;
}

@media (max-width: 768px) {
    .boat-card--console-kit {
        max-width: 100%;
    }
}

.boat-card__main-image-wrapper {
    border-radius: 22px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background-color: #e2e8f0;
}

.boat-card__main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.boat-card__thumbnails {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
    gap: 0.5rem;
}

.boat-card__thumbnail-button {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: none;
    aspect-ratio: 4 / 3;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.boat-card__thumbnail-button:hover {
    transform: translateY(-1px);
}

.boat-card__thumbnail-button.is-active {
    border-color: var(--color-accent);
}

.boat-card__thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.boat-card__body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    min-height: 0;
}

.boat-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

@media (min-width: 640px) {
    .boat-card__header {
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
    }
}

.boat-card__name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-navy);
    margin: 0;
}

.boat-card__price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-accent);
    margin: 0;
    white-space: nowrap;
}

.boat-card__headline {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.boat-card__description {
    color: #475569;
    line-height: 1.55;
}

.boat-card__availability-note {
    font-size: 0.95rem;
    font-weight: 600;
    color: #b45309;
}

.boat-card__highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: #1f2937;
    font-size: 0.95rem;
    height: auto;
    max-height: none;
    overflow: visible;
}

.boat-card__highlights li::before {
    content: '•';
    color: var(--color-accent);
    margin-right: 0.5rem;
    display: inline-block;
    width: 1rem;
}

.boat-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.boat-card__tag {
    padding: 0.35rem 0.9rem;
    background-color: #f1f5f9;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #0f172a;
}

.boat-card__ctas {
    margin-top: auto;
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 480px) {
    .boat-card__ctas {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.boat-card__cta {
    border-radius: 999px;
    padding: 0.95rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.boat-card__cta--primary {
    background-color: var(--color-accent);
    color: var(--color-navy);
}

.boat-card__cta--primary:hover {
    background-color: #60a5fa;
}

.boat-card__cta--secondary {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background-color: transparent;
}

.boat-card__cta--secondary:hover {
    color: var(--color-navy);
    background-color: rgba(59, 130, 246, 0.1);
}

.boat-card__cta--disabled {
    background-color: #e2e8f0 !important;
    border-color: #cbd5f5 !important;
    color: #475569 !important;
    cursor: not-allowed;
}

.boat-card__empty {
    padding: 3rem;
    border-radius: 24px;
    border: 1px dashed #cbd5f5;
    background-color: #f8fafc;
}

.boat-card__anchor-helper {
    display: block;
    height: 1px;
    margin-bottom: -1px;
}

/* Navigation dropdown styles */
.nav-dropdown {
    position: relative;
}

.nav-dropdown__button {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.15s ease;
}

.nav-dropdown__button:hover,
.nav-dropdown__button:focus {
    color: var(--color-accent);
    outline: none;
}

.nav-dropdown__button[aria-expanded="true"] {
    color: var(--color-accent);
}

.nav-dropdown__icon {
    width: 0.75rem;
    height: 0.75rem;
    transition: transform 0.2s ease;
}

.nav-dropdown__button[aria-expanded="true"] .nav-dropdown__icon {
    transform: rotate(180deg);
}

.nav-dropdown__menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    min-width: 160px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 100;
}

.nav-dropdown__menu[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown__item {
    display: block;
    padding: 0.5rem 1rem;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-dropdown__item:hover,
.nav-dropdown__item:focus {
    background-color: #f1f5f9;
    color: var(--color-accent);
    outline: none;
}

/* Desktop: show dropdown on hover */
@media (min-width: 640px) {
    .nav-dropdown:hover .nav-dropdown__menu,
    .nav-dropdown:focus-within .nav-dropdown__menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* Mobile: dropdown only opens on click (for old always-visible mobile nav - deprecated) */
@media (max-width: 639px) {
    .nav-dropdown__menu:not(.mobile-menu .nav-dropdown__menu) {
        position: static;
        margin-top: 0.5rem;
        margin-left: 1rem;
        box-shadow: none;
        border: none;
        border-top: 1px solid #e2e8f0;
        border-radius: 0;
        padding: 0.5rem 0;
    }
}

/* Mobile menu hamburger button */
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

.mobile-menu-toggle__line {
    width: 24px;
    height: 2px;
    background-color: var(--color-navy);
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle__line:not(:last-child) {
    margin-bottom: 5px;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle__line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu panel */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
    opacity: 0;
}

.mobile-menu.mobile-menu--open {
    max-height: 500px;
    opacity: 1;
    display: block !important;
}

/* Ensure mobile menu is hidden on desktop */
@media (min-width: 769px) {
    .mobile-menu {
        display: none !important;
    }
}

/* Mobile dropdown styling - accordion style */
@media (max-width: 768px) {
    .mobile-menu .nav-dropdown__menu {
        position: static;
        margin-top: 0.5rem;
        margin-left: 0;
        box-shadow: none;
        border: none;
        border-top: 1px solid #e2e8f0;
        border-radius: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: none;
        transition: max-height 0.3s ease-out, opacity 0.2s ease-out, padding 0.3s ease-out;
    }

    .mobile-menu .nav-dropdown__menu[aria-hidden="false"] {
        max-height: 200px;
        opacity: 1;
        visibility: visible;
        padding: 0.5rem 0 0.5rem 1rem;
    }

    .mobile-menu .nav-dropdown__item {
        padding: 0.75rem 1rem;
    }
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}


