h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
    text-align: start;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

/* Prevent any horizontal scrolling site-wide to avoid sliding to reveal off-canvas menu */
html,
body {
    overflow-x: hidden;
}

:root {
    --primary-navy: #1B2B48;
    --accent-red: #C82128;
    --highlight-blue: #4BA9D8;
    --text-light: #f8f9fa;
    --text-dark: #212529;
}

body {
    font-family: 'Inter', sans-serif;
    /* font-family: 'Archivo Black', sans-serif;*/
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

h1.hero-headline {
    font-weight: 900;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.text-navy {
    color: var(--primary-navy) !important;
}

.bg-navy {
    background-color: var(--primary-navy) !important;
}

.text-accent-red {
    color: var(--accent-red) !important;
}

.bg-accent-red {
    background-color: var(--accent-red) !important;
}

.btn-accent {
    background-color: var(--accent-red);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-red);
    padding: 10px 24px;
}

.btn-accent:hover {
    background-color: transparent;
    color: var(--accent-red);
}

.btn-navy {
    background-color: var(--primary-navy);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-navy);
    border-radius: 50px;
    padding: 12px 30px;
}

.btn-navy:hover {
    background-color: transparent;
    color: var(--primary-navy);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-image: url('images/hero1.jpg');
    /* Placeholder offshore rig */
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(27, 43, 72, 0.9) 0%, rgba(27, 43, 72, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

/* Stats Bar - Glassmorphism */
.stats-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
    padding: 20px 0;
}

.stat-item h3 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-red);
    margin-bottom: 0;
}

.stat-item p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
}

/* Core Competencies Cards */
.capability-card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    overflow: hidden;
    padding: 30px 20px;
    background-color: var(--primary-navy);
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 1;
}

.capability-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 25, 45, 0.9) 0%, rgba(10, 15, 30, 0.98) 100%);
    z-index: -1;
    transition: background 0.3s ease;
}

.capability-card:hover::before {
    background: linear-gradient(135deg, rgba(15, 25, 45, 0.85) 0%, rgba(150, 20, 30, 0.95) 100%);
}

.capability-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.capability-icon {
    font-size: 2.2rem;
    color: white;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.capability-card:hover .capability-icon {
    background-color: white;
    color: var(--accent-red);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.card-title {
    font-weight: 800;
    color: white !important;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.capability-card p {
    color: white !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    font-weight: 400;
}

/* Sticky Header & Navigation */
.maritech-navbar {
    transition: all 0.4s ease;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.maritech-navbar.scrolled {
    background-color: white !important;
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-bottom: none;
}

.maritech-navbar.scrolled .text-white {
    color: var(--primary-navy) !important;
}

.maritech-navbar.scrolled .nav-link {
    color: var(--primary-navy) !important;
}

.maritech-navbar.scrolled .navbar-toggler i {
    color: var(--primary-navy) !important;
}

.navbar-brand {
    font-weight: 900;
    letter-spacing: -1px;
}

.maritech-navbar .navbar-brand.text-white {
    color: white !important;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.2rem !important;
}

.maritech-navbar .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

.maritech-navbar .nav-link:hover {
    color: white;
}

.maritech-navbar.scrolled .nav-link:hover {
    color: var(--accent-red);
}

/* Mega Menu Dropdown Hover */
@media all and (min-width: 992px) {
    .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(15px);
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        pointer-events: none;
        border-radius: 0 0 12px 12px;
        border: none;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
        border-top: 3px solid var(--accent-red);
        min-width: 250px;
        margin-top: 0;
    }

    .navbar .nav-item.dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .dropdown-item {
        padding: 12px 24px;
        font-weight: 500;
        transition: all 0.2s ease;
    }

    .dropdown-item:hover {
        background-color: rgba(75, 169, 216, 0.1);
        color: var(--primary-navy);
        padding-left: 28px;
    }
}

/* NEW HERO LAYOUT STYLES */
.hero-section {
    background-image: url('images/hero1.jpg');
    /* Updated industrial placeholder */
}

.hero-overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(27, 43, 72, 0.95) 0%, rgba(27, 43, 72, 0.7) 40%, rgba(27, 43, 72, 0.1) 100%);
    z-index: 1;
}

.text-highlight-blue {
    color: var(--highlight-blue) !important;
}

.bg-highlight-blue {
    background-color: var(--highlight-blue) !important;
}

.hero-tagbadge {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--highlight-blue);
    letter-spacing: 2px;
}

.hero-tagbadge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.stats-bar-wrapper {
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%) translateY(50%);
    width: 90%;
    max-width: 1300px;
    z-index: 5;
}

.stats-bar-floating {
    width: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.8) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 12px;
}

.z-2 {
    z-index: 2;
}

.z-1 {
    z-index: 1;
}

.mobile-responsive-title {
    font-size: clamp(3rem, 10vw, 5rem);
}

/* Mobile View Adjustments */
@media (max-width: 991.98px) {
    .stats-bar-wrapper {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        width: 100%;
        margin-top: -30px;
        z-index: 5;
    }

    .stats-bar-floating {
        border-radius: 0;
    }

    .hero-section {
        min-height: auto;
    }

    /* Default: keep collapse in normal flow until it's shown */
    .maritech-navbar .navbar-collapse {
        position: static;
        transition: all 0.3s ease;
    }

    /* When the mobile menu is expanding or expanded, fix it to the viewport */
    .maritech-navbar .navbar-collapse.collapsing,
    .maritech-navbar .navbar-collapse.show {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 100vh !important;
        background-color: rgba(27, 43, 72, 0.99);
        z-index: 1050;
        padding: 120px 30px 40px 30px;
        overflow-y: auto;
        overflow-x: hidden;
        max-width: 100%;
        margin: 0;
        display: flex !important;
        flex-direction: column;
        animation: mobileMenuFadeIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
        border: none;
    }

    /* Hide individual items during collapse to prevent flicker */
    .maritech-navbar .navbar-collapse.collapsing .nav-item {
        opacity: 0;
    }

    @keyframes mobileMenuFadeIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Staggered entry for menu items */
    .maritech-navbar .navbar-collapse.show .nav-item {
        opacity: 0;
        animation: mobileMenuItemSlide 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    }

    .maritech-navbar .navbar-collapse.show .nav-item:nth-child(1) {
        animation-delay: 0.2s;
    }

    .maritech-navbar .navbar-collapse.show .nav-item:nth-child(2) {
        animation-delay: 0.3s;
    }

    .maritech-navbar .navbar-collapse.show .nav-item:nth-child(3) {
        animation-delay: 0.4s;
    }

    .maritech-navbar .navbar-collapse.show .ms-lg-4 {
        opacity: 0;
        animation: mobileMenuItemSlide 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
        animation-delay: 0.5s;
    }

    @keyframes mobileMenuItemSlide {
        from {
            opacity: 0;
            transform: translateX(-20px);
        }

        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    /* Prevent page horizontal scroll while mobile menu is open (supported in modern browsers) */
    body:has(.maritech-navbar .navbar-toggler[aria-expanded="true"]) {
        overflow-x: hidden;
    }

    .maritech-navbar .navbar-toggler,
    .maritech-navbar .navbar-brand {
        z-index: 1060;
        position: relative;
    }

    /* Transform hamburger to close icon */
    .maritech-navbar .navbar-toggler:not(.collapsed) i::before {
        content: "\f00d";
        /* FontAwesome Close (X) icon */
    }

    .maritech-navbar .navbar-toggler {
        border: none;
        padding: 0;
        outline: none !important;
        box-shadow: none !important;
        transition: transform 0.3s ease;
    }

    .maritech-navbar .navbar-toggler:active {
        transform: scale(0.9);
    }

    .maritech-navbar:has(.navbar-toggler[aria-expanded="true"]) .navbar-brand .text-white,
    .maritech-navbar:has(.navbar-toggler[aria-expanded="true"]) .navbar-brand .text-navy,
    .maritech-navbar:has(.navbar-toggler[aria-expanded="true"]) .navbar-toggler i,
    .maritech-navbar:has(.navbar-toggler[aria-expanded="true"]) .nav-link,
    .maritech-navbar .navbar-collapse.show .nav-link,
    .maritech-navbar .navbar-collapse.show .dropdown-item {
        color: white !important;
    }

    .maritech-navbar .nav-link {
        font-size: 1.25rem;
        color: white !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 15px 0 !important;
    }

    .maritech-navbar .dropdown-menu {
        background-color: transparent;
        border: none;
        box-shadow: none;
        display: none;
    }

    .maritech-navbar .dropdown-menu.show {
        display: block;
        animation: mobileSubmenuFade 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    }

    @keyframes mobileSubmenuFade {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .maritech-navbar .dropdown-item {
        color: rgba(255, 255, 255, 0.8) !important;
        padding: 12px 0 12px 25px;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        opacity: 0;
        animation: mobileMenuItemSlide 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    }

    .maritech-navbar .dropdown-menu.show .dropdown-item:nth-child(1) {
        animation-delay: 0.1s;
    }

    .maritech-navbar .dropdown-menu.show .dropdown-item:nth-child(2) {
        animation-delay: 0.2s;
    }

    .maritech-navbar .dropdown-menu.show .dropdown-item:nth-child(3) {
        animation-delay: 0.3s;
    }

    .maritech-navbar .dropdown-item:hover {
        background-color: transparent;
        color: var(--highlight-blue) !important;
    }

    /* Ensure no horizontal scroll on small screens */
    html,
    body {
        overflow-x: hidden;
    }

    /* Slightly reduce horizontal padding for the shown collapse to ensure it fits */
    .maritech-navbar .navbar-collapse.show {
        padding-left: 20px;
        padding-right: 20px;
        max-width: 100%;
        left: 0;
        right: 0;
    }

    .maritech-navbar .navbar-collapse .navbar-nav {
        width: 100%;
        box-sizing: border-box;
    }
}