/* ===============================
   1. GLOBAL & RESET
================================ */

:root {
    --navbar-height: 150px;
    scroll-padding-top: var(--navbar-height);
}

html {
    height: 100%;
    overflow-y: auto;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: #000;
    background-color: #f5f7f9;
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1500px;
    margin: auto;
}

.page-content {
    padding-top: calc(var(--navbar-height) + 40px);
    padding-bottom: 80px;
}


/* ===============================
   2. NAVBAR & NAVIGATION
================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.nav-top {
    height: 100%;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e6e9ee;
}

.nav-top-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 40px;
}

/* Logo spacing FIX */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 135px;
}

/* ===============================
   PAGE CONTENT HEADINGS (GLOBAL)
================================ */
.page-content h1 {
    margin-top: 0;
}

.page-content h1 {
    margin-top: 0;
    color: #004fa3;
    font-size: 2.4rem;
    font-weight: 600;
}

.page-content h2 {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0 0 14px;
    color: #004fa3;
    /* ← main section title */
}

.page-content h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
    color: #004fa3;
    /* ← subsection headings */
}


/* ===============================
   MAIN NAV (CENTERED + LOCKED)
================================ */

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin: 0 auto;
}

/* Top-level nav */
.nav-menu a,
.nav-menu .dropdown>a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    text-decoration: none;
    text-transform: uppercase;

    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.2;

    color: #000000;
    background: transparent;
    transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu .dropdown>a:hover {
    color: #004fa3;
}

/* Active page – NO box */
.nav-menu a.active {
    color: #000000;
    background: transparent;
}

/* ===============================
   DROPDOWN (LOCKED TYPOGRAPHY)
================================ */

.nav-menu .dropdown {
    position: relative;
}

.nav-menu .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 12px;

    background: #111111;
    min-width: 260px;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 9999;
}

.nav-menu .dropdown-menu a {
    display: block;
    padding: 14px 18px;

    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;

    color: #ffffff;
    text-transform: none;
    letter-spacing: 0;
    background: transparent;
}

.nav-menu .dropdown-menu a+a {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-menu .dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.nav-menu .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* ===============================
   3. HERO SECTIONS (FIXED SIZE)
================================ */

.hero,
.services-hero {
    position: relative;
    height: 100vh;                 /* lock to viewport */
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;        /* CRITICAL */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Home hero */
.hero {
    background-image: url("../assets/Background.png");
}

/* Desktop scroll-over effect only */
@media (min-width: 901px) {
    .hero,
    .services-hero {
        background-attachment: fixed;
    }
}

/* Service-specific images */
.services-hero.service-pressure {
    background-image: url("../assets/pressure.png");
    background-size: 100% auto;
}

.services-hero.service-temperature {
    background-image: url("../assets/temperature.png");
    background-size: 100% auto;
}

.services-hero.service-mass {
    background-image: url("../assets/mass.png");
    background-size: 100% auto;
}

.services-hero.service-dimensional {
    background-image: url("../assets/dimensional.png");
    background-size: 100% auto;
}

.services-hero.service-gas {
    background-image: url("../assets/gas.png");
    background-size: 100% auto;
}

.services-hero.service-healthcare {
    background-image: url("../assets/healthcare.png");
    background-size: 100% auto;
}

/* Overlay box */
.hero-overlay,
.services-hero-overlay {
    display: flex;
    justify-content: center;
    text-align: center;
    color: #ffffff;
}

.hero-content,
.services-hero-content {
    background: rgba(45, 76, 105, 0.65);
    padding: 20px 40px;
    max-width: 900px;
}

.hero-content h1,
.services-hero-content h1 {
    font-size: 2.6rem;
    margin-bottom: 12px;
}

.hero-content p,
.services-hero-content p {
    font-size: 1.1rem;
    max-width: 700px;
}


/* ===============================
   4. COMPONENTS (BUTTONS, FORMS, CARDS)
================================ */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #004fa3;
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button:hover {
    background-color: #007BB2;
    transform: translateY(-2px);
}

/* Forms */
.page-content form {
    margin-top: 30px;
    max-width: 900px;
}

.page-content input,
.page-content select,
.page-content textarea {
    width: 100%;
    max-width: 650px;
    padding: 14px 16px;
    font-size: 1rem;
    border: 1px solid #bbb;
    border-radius: 4px;
}

.page-content textarea {
    min-height: 140px;
}

/* Capabilities Grid */
.capabilities {
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(180deg,
            #f5f7f9 0%,
            #eef3f7 100%);
}


.capabilities::after {
    margin-top: 60px;
}

.capability-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 1100px;
    margin: 0 auto;
    gap: 40px;
}

.cap-card {
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: #f15d22;
    background: #004fa3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 180px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, color 0.3s ease;
}

.cap-card:hover {
    transform: translateY(-4px);
    color: #f15d22;
    ;
}

.cap-text {
    position: relative;
    z-index: 2;
    font-weight: 600;
    font-size: 1.3rem;
    text-align: center;
    padding: 0 10px;
}

.cap-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 1;
}

.cap-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.cap-card:hover::before,
.cap-card:hover::after {
    opacity: 1;
}

/* Capability Backgrounds */
.cap-pressure::before {
    background-image: url("../assets/pressure.png");
}

.cap-temperature::before {
    background-image: url("../assets/temperature.png");
}

.cap-mass::before {
    background-image: url("../assets/mass.png");
}

.cap-dimensional::before {
    background-image: url("../assets/dimensional.png");
}

.cap-gas::before {
    background-image: url("../assets/gas.png");
}

.cap-healthcare::before {
    background-image: url("../assets/healthcare.png");
}

/* Why Us Section */
.why-us {
    background: #f5f7f9;
    padding: 100px 0;
}

.why-card {
    background: #ffffff;
    padding: 50px;
    border-radius: 12px;
    /* Slightly rounder */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* Softer, larger shadow */
    border: 1px solid rgba(0, 150, 214, 0.1);
    /* Subtle blue border */
    text-align: center;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.why-card h2,
.why-card h3 {
    margin-top: 0;
    color: #004fa3;
}

.why-card p {
    line-height: 1.8;
    color: #000000;
    /* Dark grey is easier on the eyes than pure black */
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.why-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.why-card-centered {
    max-width: 1000px;
    margin: 0 auto;
}

.button {
    background: linear-gradient(135deg, #004fa3 0%, #007BB2 100%);
    box-shadow: 0 4px 15px rgba(0, 150, 214, 0.3);
    letter-spacing: 0.5px;
}

/* ===============================
   5. SERVICE BLOCKS (INTERNAL PAGES)
================================ */
.services-content {
    background: #f5f7f9;
    padding-bottom: 80px;
    /* bottom only */
}


.service-block {
    display: flex;
    align-items: center;
    gap: 50px;
    margin: 80px 0;
}

.service-text,
.service-image {
    flex: 1;
}

.service-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===============================
   6. FOOTER
================================ */
.site-footer {
    background: #0f1114;
    color: #ffffff;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    column-gap: 110px;
    row-gap: 40px;
    padding: 60px 20px;
    align-items: start;
}

.footer-brand img {
    max-width: 200px;
    margin-bottom: 15px;
}

.footer-brand p {
    max-width: 420px;
    line-height: 1.6;
    margin-top: 10px;
    color: #cfd3da;
}

.footer-col h4 {
    font-size: 14px;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col p,
.footer-col a {
    color: #cfd3da;
    font-size: 0.95rem;
    margin-bottom: 12px;
    text-decoration: none;
}

.footer-col a:hover {
    color: #004fa3;
}

.footer-col:last-child a {
    display: block;
    white-space: nowrap;
    max-width: 220px;
}

.footer-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.footer-bottom {
    background: #000;
    text-align: center;
    padding: 15px;
    font-size: 13px;
    color: #9aa0aa;
}

/* ===============================
   7. UTILITIES (BACK TO TOP)
================================ */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 120px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #004fa3;
    border: none;
    cursor: pointer;
    display: none;
    z-index: 999;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.back-to-top::before {
    content: '';
    width: 12px;
    height: 12px;
    border-left: 3px solid #fff;
    border-top: 3px solid #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) rotate(45deg);
}

/* Sidebar Container */
.service-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.main-content {
    flex: 3;
}

.sticky-sidebar {
    flex: 0.8;
    margin-left: 40px;
    position: -webkit-sticky;
    /* Safari */
    position: sticky;
    top: 180px;
    /* Distance from top of screen - matches your navbar height */
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Hamburger icon */
.menu-toggle {
    display: none;
    /* desktop hidden */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    cursor: pointer;
    z-index: 3000;
    /* above nav */
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #111111;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ===============================
   MOBILE STYLES (≤900px)
================================ */
@media (max-width: 900px) {

    :root {
        --navbar-height: 100px;
    }

    body {
        scroll-behavior: auto;
    }

    /* --- Navbar --- */
    .navbar,
    .nav-top {
        height: var(--navbar-height);
    }

    .nav-top-container {
        padding: 10px 15px;
        justify-content: space-between;
    }

    /* Mobile menu text color FIX */
    .nav-menu a,
    .nav-menu .dropdown>a {
        color: #ffffff;
    }

    .nav-menu a:hover,
    .nav-menu .dropdown>a:hover {
        color: #66b3ff;
        /* optional hover accent */
    }

    /* Stack service content + sidebar on mobile */
    .service-layout {
        flex-direction: column;
        gap: 0;
    }

    .top-info {
        display: flex;
    }

    .sticky-sidebar {
        margin-left: 0;
        margin-top: 40px;
        width: 100%;
        position: static;
        /* disable sticky on mobile */
    }

    .logo img {
        height: 80px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        width: 250px;
        background: #111111;
        flex-direction: column;
        padding-top: 100px;
        transition: left 0.4s ease;
        z-index: 2000;
    }

    .nav-menu.open {
        left: 0;
    }

    .nav-menu .dropdown-menu {
        display: none;
        position: static;
        background: transparent;
        box-shadow: none;
    }

    .nav-menu .dropdown.open .dropdown-menu {
        display: block;
    }

    /* --- Home Page Capability Buttons FIX --- */
    .capability-grid {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 20px;
    }

    .cap-card {
        width: 320px;
        /* Fixed width for all buttons */
        min-height: 150px;
        /* Fixed height for all buttons */
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }

    .cap-text {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    /* --- Layout & Blocks --- */
    .service-block {
        flex-direction: column;
        text-align: center;
    }

    .why-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .swoop-background {
        height: 300px;
    }

    .why-us-wrapper {
        padding-bottom: 100px;
    }

    /* --- Footer Fix --- */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 40px 20px;
        row-gap: 30px;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-brand img {
        max-width: 100px;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-row {
        justify-content: center;
    }
}

/* ===============================
   FINAL FULL-WIDTH CURVE & SPACING
================================ */

.why-us-wrapper {
    position: relative;
    background-color: #f5f7f9;
    /* Original body color */
    padding: 40px 0 240px 0;
    /* Correct desktop spacing */
    overflow: hidden;
}

/* The Background Curve */
.swoop-background {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 600px;
    z-index: 1;
    pointer-events: none;
}

.swoop-background svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Content ABOVE the curve */
.main-why-content {
    position: relative;
    z-index: 20;
}

/* Grid layout */
.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 60px;
}

/* Cards */
.why-card,
.why-card-centered {
    position: relative;
    z-index: 20;
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 150, 214, 0.1);
    text-align: center;
}

.why-card-centered {
    max-width: 1000px;
    margin: 0 auto;
}

/* ===============================
   MOBILE ADJUSTMENTS
================================ */
@media (max-width: 900px) {

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

    .swoop-background {
        height: 300px;
    }

    .why-us-wrapper {
        padding-bottom: 100px;
    }
}

/* ===============================
   PAGE-SPECIFIC TWEAKS
================================ */

.services-page .services-hero h1 {
    color: #ffffff;
}

.policy-note {
    margin-top: 40px;
    font-size: 0.95rem;
    color: #555;
}

.services-page .container {
    width: 80%;
}

@media (min-width: 901px) {
    .services-page .container {
        width: 80%;
    }
}

.privacy-page h3 {
    margin-top: 36px;
}

/* ===== HARD MOBILE FIX ===== */
@media (max-width: 900px) {
    .sticky-sidebar {
        margin-left: 0 !important;
        width: 100% !important;
        position: static !important;
        box-sizing: border-box;
    }

    .nav-menu a.active {
        color: #ffffff;
    }
}