/* ========================================
   MVI Marine - Master Design System
   ======================================== */

/* ========== CSS RESET & VARIABLES ========== */
:root {
    /* STRICT COLOR PALETTE */
    --primary-base: #001b48;
    /* Dark Backgrounds */
    --primary-accent: #02457A;
    /* Buttons, icons, outlines */
    --tertiary-overlay: #018ABE;
    /* Overlays, hover glows */
    --bg-light: #d6e8ee;
    /* Main Background */
    --secondary-info: #97cadb;
    /* Graphics/Linework on dark */
    --white: #ffffff;

    /* NEW COLOR RULES */
    --heading-blue: #022A4E;
    /* Major headings on light bg */
    --nav-hover: #FF3250;
    /* Nav link hover + active */

    /* TYPOGRAPHY */
    --font-main: 'Cabin', sans-serif;
    --font-accent: 'Playfair Display', serif;
    /* Ampersands only */

    /* UI ELEMENTS */
    --radius-sm: 4px;
    --radius-md: 8px;
    --shadow-subtle: 0 4px 12px rgba(0, 27, 72, 0.08);
    --shadow-hover: 0 8px 24px rgba(0, 27, 72, 0.15);

    /* TRANSITIONS */
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--primary-base);
    line-height: 1.7;
    /* Generous line height */
    overflow-x: hidden;
    font-weight: 400;
    /* Slightly thinner */
}

/* ========== TYPOGRAPHY ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-main);
    font-weight: 700;
    line-height: 1.2;
    color: var(--heading-blue);
    /* Default to Deep Blue */
}

/* Headings on dark backgrounds */
.bg-dark h1,
.bg-dark h2,
.bg-dark h3,
.bg-dark h4,
.bg-dark h5,
.bg-dark h6,
.hero h1,
footer h1,
footer h2,
footer h3 {
    color: var(--white);
}

.ampersand {
    font-family: var(--font-accent);
    font-style: italic;
}

p {
    margin-bottom: 1.5rem;
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ========== LAYOUT & GRID ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
    position: relative;
}

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: 1fr;
}

.grid-3 {
    grid-template-columns: 1fr;
}

.grid-4 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========== NAVIGATION ========== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: var(--shadow-subtle);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: none;
    /* Mobile first */
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--primary-base);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--nav-hover);
    /* Red hover */
}

.mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: var(--primary-accent);
    cursor: pointer;
    transition: var(--transition);
    z-index: 1001;
}

.mobile-toggle:hover {
    color: var(--nav-hover);
}

.mobile-toggle.active {
    color: var(--nav-hover);
}

@media (min-width: 992px) {
    .nav-links {
        display: flex;
    }

    .mobile-toggle {
        display: none;
    }
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.9rem;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-accent);
    color: var(--white);
    border-color: var(--primary-accent);
}

.btn-primary:hover {
    background-color: var(--tertiary-overlay);
    border-color: var(--tertiary-overlay);
    box-shadow: 0 0 15px rgba(1, 138, 190, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary-accent);
    border-color: var(--primary-accent);
}

.btn-outline:hover {
    background: var(--primary-accent);
    color: var(--white);
}

/* ========== HERO SECTION ========== */
.hero {
    height: 90vh;
    background-color: var(--primary-base);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    margin-top: 70px;
    /* Offset fixed nav */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    /* Keep images vibrant */
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 27, 72, 0.1), rgba(0, 27, 72, 0.3));
    /* Subtle gradient */
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    /* Increased size */
    margin-bottom: 1rem;
    color: var(--white);
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 5rem;
    }

    /* Increased size */
}

/* ========== CARDS & TILES ========== */
.card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-subtle);
    transition: var(--transition);
    border: 1px solid rgba(0, 27, 72, 0.05);
    /* Ensure readable text on white background regardless of parent */
    color: var(--primary-base);
}

/* Card headings should always be dark blue on white cards */
.card h3,
.card h4 {
    color: var(--heading-blue);
}

.card p {
    color: var(--primary-base);
}

.card ul,
.card li {
    color: var(--primary-base);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--tertiary-overlay);
}

.icon-box {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-box svg {
    width: 40px;
    height: 40px;
    stroke: var(--primary-accent);
    stroke-width: 1.5;
    transition: var(--transition);
}

.card:hover .icon-box svg {
    stroke: var(--tertiary-overlay);
    filter: drop-shadow(0 0 5px rgba(1, 138, 190, 0.5));
}

/* ========== CAROUSEL ========== */
.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-subtle);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 500px;
}

@media (min-width: 768px) {
    .carousel-slide {
        min-width: 50%;
    }

    /* 2 visible */
}

@media (min-width: 1200px) {
    .carousel-slide {
        min-width: 33.333%;
    }

    /* 3 visible */
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.carousel-slide:hover img {
    transform: scale(1.05);
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--tertiary-overlay);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.carousel-slide:hover .carousel-overlay {
    opacity: 0.15;
    /* Max 15% opacity */
}

/* ========== FOOTER ========== */
footer {
    background-color: var(--primary-base);
    color: var(--white);
    padding: 4rem 0 2rem;
    text-align: center;
}

.footer-logo {
    height: 80px;
    margin-bottom: 2rem;
    filter: brightness(0) invert(1);
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--secondary-info);
    font-weight: 600;
}

.footer-links a:hover {
    color: var(--white);
}

/* ========== UTILITIES ========== */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-4 {
    margin-bottom: 4rem;
}

.text-accent {
    color: var(--primary-accent);
}

.bg-white {
    background-color: var(--white);
}

.bg-dark {
    background-color: var(--primary-base);
    color: var(--white);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 80%;
    height: calc(100vh - 70px);
    background: var(--white);
    padding: 2rem;
    transition: var(--transition);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu li {
    margin-bottom: 1.5rem;
}

.mobile-menu a {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-base);
}

.mobile-menu a:hover {
    color: var(--nav-hover);
}

/* Mobile Backdrop */
.mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 27, 72, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ========== CAROUSEL NAVIGATION CONTROLS ========== */
.carousel-wrapper {
    position: relative;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: var(--white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.carousel-prev svg,
.carousel-next svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-accent);
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-indicator.active {
    background: var(--white);
    transform: scale(1.2);
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Hide controls on small carousels */
@media (max-width: 768px) {
    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
    }

    .carousel-prev svg,
    .carousel-next svg {
        width: 20px;
        height: 20px;
    }
}

/* ========== HERO CAROUSEL ========== */
.hero-carousel {
    position: relative;
    height: 90vh;
    margin-top: 70px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 1s ease-in-out;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 27, 72, 0.1), rgba(0, 27, 72, 0.3));
    pointer-events: none;
}

.hero-carousel .hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    text-align: center;
    color: var(--white);
}

.hero-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.hero-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.hero-indicator.active {
    background: var(--white);
    border-color: var(--primary-accent);
    transform: scale(1.2);
}

.hero-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* ========== PLACEHOLDER IMAGES (Coming Soon) ========== */
.placeholder-image {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.placeholder-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: placeholder-shimmer 2s infinite;
}

@keyframes placeholder-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.placeholder-image span {
    position: relative;
    z-index: 1;
    padding: 1rem 2rem;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
}

/* Hero placeholder */
.hero .placeholder-image,
.hero-slide.placeholder-image {
    width: 100%;
    height: 100%;
}

/* Carousel placeholder */
.carousel-slide .placeholder-image {
    width: 100%;
    height: 100%;
}

/* Card placeholder */
.card .placeholder-image {
    height: 200px;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

/* ========== ADDITIONAL GALLERY STYLES ========== */
.gallery-section {
    margin-bottom: 3rem;
}

.gallery-section h2 {
    margin-bottom: 1.5rem;
}

.gallery-section:last-child {
    margin-bottom: 0;
}

/* Taller carousel for gallery pages */
.gallery-carousel .carousel-slide {
    height: 600px;
}

@media (max-width: 768px) {
    .gallery-carousel .carousel-slide {
        height: 400px;
    }
}

/* ========== SPECIFICATION TABLE ENHANCEMENTS ========== */
.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid rgba(0, 27, 72, 0.1);
}

.specs-table td {
    padding: 1rem 0;
}

.specs-table td:first-child {
    font-weight: 700;
    color: var(--heading-blue);
}

.specs-table td:last-child {
    text-align: right;
    color: var(--primary-base);
}

.specs-section {
    margin-bottom: 2rem;
}

.specs-section h3 {
    color: var(--primary-accent);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* TBA placeholder text */
.tba {
    color: var(--secondary-info);
    font-style: italic;
}

/* ========== FEATURE CARDS WITH IMAGES ========== */
.feature-card-image {
    height: 200px;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin: -2rem -2rem 1.5rem -2rem;
}

.feature-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .feature-card-image img {
    transform: scale(1.05);
}

/* ========== DEVELOPMENT BADGE ========== */
.dev-badge {
    display: inline-block;
    background: var(--primary-accent);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--white);
    margin-bottom: 1rem;
}

/* ========== SECTION DIVIDER ========== */
.section-divider {
    width: 60px;
    height: 3px;
    background: var(--primary-accent);
    margin: 0 auto 2rem;
}

.text-center .section-divider {
    margin-left: auto;
    margin-right: auto;
}