/* Logo image style */
.logo {
    height: 150px;
    width: auto;
}

@media (min-width: 769px) {
    .navbar-toggler {
        display: none !important;
    }
}

/* Ensure dropdown menu is at least as wide as its parent nav item */
.nav-item .dropdown-menu {
    min-width: 100%;
    left: 0;
}

/* Highlight top-level nav-link when dropdown is open via JS */
.nav-item.menu-open>.nav-link {
    background-color: var(--accent-teal) !important;
    color: var(--background-black) !important;
}

/* Keep top-level nav-link in hover state when dropdown is open */
.nav-item.show>.nav-link,
.nav-item:focus-within>.nav-link {
    background-color: var(--accent-teal) !important;
    color: var(--background-black) !important;
}

/* Accent Bar Above Navigation */
.menu-accent-bar {
    width: 100%;
    height: 36px;
    background: var(--accent-teal, #25b2ba);
    clip-path: polygon(0 0, 75% 0, 100% 100%, 0% 100%);
    margin-bottom: -10px;
    z-index: 2;
    position: relative;
}

/* Accent Bar Above Navigation */
.menu-accent-bar {
    width: 100%;
    height: 36px;
    background: var(--accent-teal, #25b2ba);
    clip-path: polygon(0 0, 75% 0, 100% 100%, 0% 100%);
    margin-bottom: -10px;
    z-index: 2;
    position: relative;
}

/* 
 * MBL Aquaculture 2025 - Modern Responsive Design
 * Preserving original color scheme and design elements
 * Base colors from 2005 design
 */

:root {
    --primary-dark: #001844;
    --primary-blue: #006699;
    --accent-cyan: #00CCCC;
    --accent-cyan-bright: #00FFFF;
    --accent-teal: #31C6C4;
    --accent-teal-dark: #23A7B7;
    --dark-blue: #004A6F;
    --darker-blue: #011F5B;
    --border-blue: #055AA0;
    --text-white: #FFFFFF;
    --text-light: #E1E3E8;
    --text-lighter: #ECECEC;
    --text-gray: #CCCCCC;
    --background-black: #000000;
}

/* Global Styles */
body {
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
    background-color: #01051a;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

.container-custom {
    max-width: 1600px;
    margin: 0 auto;
    background-color: var(--primary-dark);
    border-left: 1px solid var(--primary-blue);
    border-right: 1px solid var(--primary-blue);
    border-bottom: 1px solid var(--primary-blue);
    /* No border-top for top bar/header */
    box-shadow: 0 0 32px 8px #000;
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-white);
    margin: 20px 0 15px;
}

h2 {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: bold;
    padding-bottom: 5px;
    font-family: 'Cairo', Arial, Helvetica, sans-serif;
}

h3 {
    font-size: 1.2rem;
    color: var(--text-white);
    margin-top: 20px;
}

p {
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 15px;
}

strong {
    color: var(--text-white);
}

/* Links */
a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-cyan-bright);
    text-decoration: underline;
}

a:active {
    color: #CCFF00;
}

/* Header with Angled Design */
.site-header {
    background: linear-gradient(to right, #000000 0%, #0099ff 100%);
    border-left: 1px solid var(--primary-blue);
    border-right: 1px solid var(--primary-blue);
    position: relative;
}

.header-top-bar {
    background-color: var(--primary-dark);
    padding: 5px 0;
    font-size: 11px;
    text-align: right;
}

.header-top-bar a {
    color: var(--text-white);
    margin-left: 20px;
}

.header-logo {
    padding: 20px 0;
}

.header-logo img {
    max-width: 300px;
    height: auto;
}

/* Masthead Hero Section */
.masthead {
    width: 100%;
    height: 600px;
    background-color: #000000;
    padding: 0;
}

.masthead .container-fluid {
    padding: 0;
    height: 100%;
}

.masthead .row {
    margin: 0;
    height: 600px;
}

.masthead .col-lg-7,
.masthead .col-lg-5,
.masthead [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}

.masthead-image-wrapper {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    background-color: #000000;
    padding-right: clamp(40px, 7vw, 120px);
    padding-left: clamp(10px, 3vw, 40px);
}

.masthead-image {
    max-width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
}

.masthead-content {
    background: black;
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: clamp(40px, 7vw, 120px);
    padding-right: clamp(10px, 3vw, 40px);
}

.masthead-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.masthead-content p {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

/* Navigation Menu */
.main-nav {
    background: linear-gradient(to right, var(--dark-blue) 0%, var(--darker-blue) 100%);
    border-top: 10px solid var(--accent-teal);
    border-bottom: 1px solid var(--primary-blue);
    min-height: 50px;
    display: flex;
    align-items: stretch;
}

.navbar {
    padding: 0;
}

.navbar-nav {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.nav-item {
    position: relative;
}

/* ...existing code... */

/* Mobile Menu: Move hamburger to top right of screen */
@media (max-width: 768px) {

    .logo {
        height: 100px;
        width: auto;
        margin-top: 30px;
    }

    .navbar-toggler {
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 3000;
        border-color: #fff;
    }

    .navbar-toggler .navbar-toggler-icon {
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
        display: block;
        width: 2rem;
        height: 2rem;
        background-color: transparent;
    }
}

.nav-link {
    color: var(--text-white) !important;
    font-size: 18px;
    font-weight: normal;
    padding: 20px 35px !important;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(0, 102, 153, 0.5);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    height: 100%;
    font-family: 'Cairo', Arial, Helvetica, sans-serif;
}

.nav-link:hover {
    background-color: var(--accent-teal) !important;
    color: var(--background-black) !important;
    text-decoration: none;
}

.dropdown-menu {
    background-color: var(--accent-teal);
    /*border: 1px solid var(--accent-teal);*/
    border-radius: 0;
    border: none;
    padding: 0 0 10px 0;
    margin-top: -1px;
}

.nav-link:last-child {
    border-right: none;
}

.dropdown-item {
    color: var(--text-white);
    background-color: var(--accent-teal);
    font-size: 18px;
    font-family: 'Cairo', Arial, Helvetica, sans-serif;
    font-weight: normal;
    padding: 15px 35px;
    border-right: 1px solid rgba(0, 102, 153, 0.5);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    height: 100%;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--accent-teal);
    color: var(--background-black);
    text-decoration: none;
}

/* New styles for dropdown active state */
.nav-item.dropdown.show>.nav-link.dropdown-toggle {
    background-color: var(--accent-teal) !important;
    color: var(--background-black) !important;
}

/* Breadcrumb */
.breadcrumb-custom {
    background-color: transparent;
    padding: 15px 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-custom a {
    color: var(--accent-cyan);
}

/* Content Area */
.content-wrapper {
    min-height: 500px;
    padding: 30px 0;
}

.main-content {
    padding: 25px 50px;
    font-size: 24px;
    line-height: 1.1;
}

.main-content p {
    padding-bottom: 20px;
}

.right-col {
    padding-top: 25px;
    font-size: 20px;
}

.ready-to-order {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--darker-blue) 100%);
    border: 2px solid var(--accent-teal);
    padding: 20px;
    margin-top: 30px;
    text-align: center;
}

.ready-to-order h3 {
    font-size: 1.1rem;
    color: var(--accent-cyan);
    margin-bottom: 10px;
}

.ready-to-order p {
    font-size: 0.9rem;
    margin-bottom: 15px;
}


.btn-primary-custom {
    background: #07204a;
    border: none;
    color: #fff;
    font-weight: bold;
    padding: 10px 30px;
    /* No text-transform, keep original case */
    transition: background 0.3s ease, color 0.3s ease;
    text-decoration: none !important;
}

.btn-primary-custom:hover {
    background: #1793b2;
    color: #fff;
    text-decoration: none !important;
}

/* Contact Box */
.contact-info-hover {
    background-color: #FFFFCC;
    color: #000066;
    padding: 15px;
    font-size: 12px;
    border: 2px solid var(--accent-teal);
}

.contact-info-hover a {
    color: var(--primary-blue);
}

/* Images */
.organism-photo {
    border: 3px solid var(--accent-teal);
    margin: 15px 0;
    max-width: 100%;
    height: auto;
}

.photo-caption {
    font-size: 0.85rem;
    color: var(--text-gray);
    font-style: italic;
    margin-top: 5px;
}

/* Lists */
ul {
    padding-left: 20px;
}

li {
    color: var(--text-lighter);
    line-height: 1.6;
    margin-bottom: 0px;
}

/* Footer with Angled Design */
.site-footer {
    border-left: 1px solid var(--primary-blue);
    border-right: 1px solid var(--primary-blue);
    padding: 20px 0;
    font-size: 11px;
    margin-bottom: 30px;
    color: var(--text-gray);
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.back-to-top {
    text-align: left;
}

.back-to-top a {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 11px;
}

.back-to-top a:hover {
    color: var(--text-white);
}

.copyright {
    text-align: right;
}

.copyright a {
    color: var(--text-gray);
}

.copyright a:hover {
    color: var(--text-white);
}

/* Homepage Specific */
.homepage-columns {
    display: grid;
    grid-template-columns: 200px 1fr 250px;
    gap: 20px;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .container-custom {
        max-width: 100%;
    }

    .masthead-content h1 {
        font-size: 2rem;
    }
}

/*Tablet */
@media (max-width: 992px) {
    .nav-link {
        padding: 20px 20px !important;
        /*font-size: 14px;*/
    }

    .main-content {
        font-size: 22px;
    }

    div.right-col {
        font-size: 18px;
        padding-right: 50px !important;
    }

    a.btn.btn-primary-custom {
        width: 300px;
    }

    a.btn.btn-primary-custom:first-child {
        margin-bottom: 10px;
    }

}

/* =========================================
   Mobile Navigation (Flyout / Side Drawer)
   Max-width 768px
   ========================================= */
@media (max-width: 768px) {

    .right-col { padding: 25px 50px; }

    /* 1. The Container - Slid off-screen by default */
    .main-nav {
        display: block !important;
        /* Override hidden state */
        position: fixed !important;
        top: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        /* Full height */
        width: 75vw;
        /* Width of the drawer */
        max-width: 75%;

        /* Background & Shadow */
        background: linear-gradient(to bottom, var(--dark-blue, #004A6F) 0%, var(--darker-blue, #011F5B) 100%);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
        z-index: 2999;
        /* Just below the toggle button */

        /* Layout adjustments */
        padding-top: 80px;
        /* Leave space at top for the close button */
        overflow-y: auto;
        /* Allow scrolling if menu is tall */

        /* Animation: Slide in from right */
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
        visibility: hidden;
    }

    /* 2. The Active State - Triggered by JS */
    .main-nav.flyout-open {
        transform: translateX(0);
        /* Slide in */
        visibility: visible;
    }

    /* 3. The Hamburger/Close Button */
    .navbar-toggler {
        display: block !important;
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 3000;
        /* Must be higher than .main-nav */

        /* Styling for visibility */
        background-color: rgba(0, 0, 0, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 4px;
        padding: 8px;
        width: 45px;
        height: 45px;
    }

    .navbar-toggler .navbar-toggler-icon {
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
        width: 100%;
        height: 100%;
    }

    /* 4. Reset Bootstrap Internals */
    .main-nav .navbar-collapse {
        display: block !important;
        /* Prevent bootstrap from hiding content */
        height: auto !important;
    }

    .main-nav .navbar-nav {
        flex-direction: column;
        width: 100%;
        padding: 0;
    }

    /* 5. Main Link Styling */
    .main-nav .nav-link {
        width: 100%;
        padding: 15px 25px !important;
        font-size: 18px;
        color: var(--text-white, #fff) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-right: none;
        /* Remove the desktop border */
        display: flex;
        justify-content: space-between;
        /* Puts text left, arrow right */
        align-items: center;
    }

    .main-nav .nav-link:hover,
    .main-nav .nav-link:focus {
        background-color: rgba(255, 255, 255, 0.1) !important;
        color: var(--accent-teal, #31C6C4) !important;
    }

    /* 6. Mobile Dropdowns - Stack/Accordion Style */
    /* This forces the dropdown to sit INLINE instead of floating */
    .main-nav .dropdown-menu {
        position: static !important;
        float: none !important;
        transform: none !important;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.3);
        /* Darker background for depth */
        box-shadow: none;
        border: none;
        margin: 0;
        padding: 0;
        display: none;
        /* Hidden by default until clicked */
    }

    /* Bootstrap adds .show to the menu when clicked */
    .main-nav .dropdown-menu.show {
        display: block;
    }

    /* Dropdown Items */
    .main-nav .dropdown-item {
        padding: 12px 25px 12px 45px;
        /* Deep indentation */
        color: rgba(255, 255, 255, 0.8);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 16px;
        background-color: transparent;
    }

    .main-nav .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    /* 7. Arrow Rotation Animation */
    .nav-item.dropdown .dropdown-toggle::after {
        margin-left: auto;
        /* Push arrow to far right */
        transition: transform 0.2s ease;
    }

    /* Rotate arrow when open */
    .nav-item.dropdown.show .dropdown-toggle::after {
        transform: rotate(180deg);
    }
}

/* Print Styles */
@media print {

    .main-nav,
    .header-top-bar,
    .back-to-top,
    .sidebar,
    .quick-links-box {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .content-wrapper {
        background: white;
        border: none;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}