/* --- Google Fonts & Basic Setup --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #0056b3; /* A professional blue */
    --secondary-color: #ffc107; /* A contrasting gold/yellow */
    --dark-color: #222;
    --light-color: #f4f4f4;
    --text-color: #555;
    --white-color: #fff;
    --header-height: 80px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--white-color);
    font-size: 1rem; /* Explicitly set base font size */
}

html {
    scroll-behavior: smooth;
}

ul {
    list-style: none;
}

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

img {
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
}

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

.text-center {
    text-align: center;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white-color);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary-color);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--dark-color);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background: transparent;
    color: var(--secondary-color);
}

.btn-lg {
    font-size: 1.1rem;
    padding: 15px 40px;
}


/* --- Header --- */
#main-header {
    background: var(--white-color);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

#main-header.scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 70px;
}

.logo img {
    height: 50px;
}

#main-nav ul {
    display: flex;
    margin-bottom: 0;
}

#main-nav ul li {
    margin-left: 30px;
}

#main-nav ul li a {
    color: var(--dark-color);
    font-weight: 600;
    position: relative;
    padding: 5px 0;
    display: inline-block;
}

#main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

#main-nav ul li a:hover::after {
    width: 100%;
}


/* --- Hero Section --- */
#hero {
    background: url('../images/ship.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white-color);
    padding-top: var(--header-height);
    position: relative; /* For positioning children */
    overflow: hidden; /* Hides any part of the video that might overflow */
}

#hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1; /* Above the fallback background, below the overlay */
}

/* Dark overlay for text readability */
#hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2; /* Above the video, below the content */
}

.hero-content {
    position: relative; /* To enable z-index */
    z-index: 3; /* On top of everything */
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.hero-buttons .btn {
    margin: 0 10px;
}


/* --- Services Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white-color);
    padding: 40px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

/* --- About Section --- */
.about-flex {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-image, .about-content {
    flex: 1;
}

.about-image img {
    border-radius: 10px;
}

.about-content h2 {
    text-align: left;
}

.about-content h2::after {
    left: 0;
    transform: translateX(0);
}

.about-content p {
    margin-bottom: 20px;
}

/* --- CTA Section --- */
#cta {
    background: var(--primary-color);
    color: var(--white-color);
}

#cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}
#cta p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}
#cta .btn-secondary {
    border-color: var(--white-color);
    color: var(--white-color);
}
#cta .btn-secondary:hover {
    background: var(--white-color);
    color: var(--primary-color);
}

/* --- Footer --- */
#main-footer {
    background: var(--dark-color);
    color: #ccc;
    padding: 60px 0 20px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
}

.footer-col h4 {
    color: var(--white-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--secondary-color);
}

.footer-col p {
    margin-bottom: 10px;
}

.footer-col i {
    margin-right: 10px;
    color: var(--primary-color);
}

.social-icons a {
    color: #ccc;
    font-size: 1.2rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.9rem;
}

/* --- Responsiveness --- */
@media (max-width: 992px) {
    .section-title { font-size: 2.2rem; }
    .hero-content h1 { font-size: 3rem; }
    .about-flex { flex-direction: column; }
    .about-image { margin-bottom: 30px; }
}


@media (max-width: 768px) {
    :root { --header-height: 70px; }

    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1rem; }
}

@media (max-width: 991px) {
    #main-nav {
        background: var(--white-color);
        padding: 10px 0;
    }

    #main-nav ul {
        flex-direction: column;
    }

    #main-nav ul li {
        margin: 0;
        text-align: center;
        border-bottom: 1px solid #e0e0e0;
    }

    #main-nav ul li:last-child {
        border-bottom: none;
    }

    #main-nav ul li a {
        display: block;
        padding: 15px 20px;
        color: var(--dark-color) !important;
        font-weight: 600;
    }

    #main-nav ul li a:hover,
    #main-nav ul li a.active {
        background: var(--light-color);
        color: var(--primary-color) !important;
    }

    #main-nav .btn {
        margin: 10px 20px;
        display: block;
        text-align: center;
    }
}

.card-body-flex {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* --- Inventory Page --- */
#inventory-hero {
    background: linear-gradient(135deg, var(--primary-color), #003d82);
    min-height: 220px;
    padding-top: var(--header-height);
}

.inventory-section-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-color);
    border-left: 4px solid var(--secondary-color);
    padding-left: 12px;
    margin-bottom: 1rem;
}

.inventory-table {
    font-size: 0.88rem;
    border-radius: 6px;
    overflow: hidden;
}

.inventory-table thead th {
    background-color: #1a3a5c;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
    vertical-align: middle;
    padding: 12px 14px;
}

.inventory-table tbody td {
    vertical-align: middle;
    padding: 10px 14px;
    color: #333;
    line-height: 1.5;
}

.inventory-table tbody tr:hover {
    background-color: #eef4ff;
    transition: background 0.2s;
}

.inventory-table .col-sno   { width: 5%; text-align: center; }
.inventory-table .col-qty   { width: 8%; text-align: center; white-space: nowrap; }
.inventory-table .col-desc  { width: 45%; }
.inventory-table .col-part  { width: 22%; font-family: monospace; font-size: 0.85rem; }
.inventory-table .col-ready { width: 15%; text-align: center; white-space: nowrap; }
.inventory-table .col-unit  { width: 5%; text-align: center; }

.badge-stock {
    display: inline-block;
    background: #28a745;
    color: #fff;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-weeks {
    display: inline-block;
    background: #0d6efd;
    color: #fff;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.78rem;
    font-weight: 600;
}