/* ========================================
--- MJBTS Global Stylesheet ---
All styles for the entire site live here.
========================================
*/

/* --- Global Fixes --- */
html {
    scroll-behavior: smooth;
}
body {
    overflow-x: hidden; /* Fixes horizontal scroll on mobile */
}
/* Fixes sticky header anchor link issue */
section[id], div[id] {
    scroll-margin-top: 70px;
}

/* --- Basic Setup & Typography --- */
body {
    font-family: 'Lato', 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333333;
    background-color: #FFFFFF;
    /* Used by mobile nav script */
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
}

/* --- Brand Colors & Fonts --- */
:root {
    --primary-color: #1BBCB4; /* Your MJBTS Brand Teal */
    --dark-grey: #333333;
    --light-grey-bg: #F4F4F4;
    --white: #FFFFFF;
}

h1, h2, h3 {
    font-family: 'Montserrat', 'Arial', sans-serif;
    font-weight: 700;
    color: var(--dark-grey);
}

h2 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 40px;
}

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

p {
    font-size: 1.1em;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1em;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #17a59b; /* A slightly darker teal */
}

/* ========================================
--- Reusable Components (Header/Footer) ---
========================================
*/

/* --- Header & Navigation --- */
.main-header {
    background: var(--white);
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

/* --- Logo Image Styling --- */
.logo-link {
    display: inline-block;
    z-index: 1001; /* Ensure logo stays on top */
}
.logo-image {
    height: 70px; /* Sensible logo height */
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav li {
    margin-left: 20px;
}

.main-nav a {
    color: var(--dark-grey);
    font-weight: 600;
    font-size: 1em;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav .btn {
    padding: 8px 16px;
    margin-left: 20px;
}

/* --- Mobile Nav Toggle (Hamburger) --- */
.mobile-nav-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-nav-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-grey);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* Hamburger "X" animation */
.nav-open .mobile-nav-toggle .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-open .mobile-nav-toggle .bar:nth-child(2) {
    opacity: 0;
}
.nav-open .mobile-nav-toggle .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- Footer --- */
.main-footer {
    background: var(--dark-grey);
    color: #ccc;
    padding: 40px 0;
    text-align: center;
}

.main-footer .container {
    padding: 0 20px;
}

.main-footer p {
    margin: 0;
    font-size: 0.9em;
}

/* ========================================
--- Page: Home (index.html) ---
========================================
*/
.hero {
    background: linear-gradient(to right, rgba(0,0,0,0.5), rgba(0,0,0,0.1)), url(https://images.unsplash.com/photo-1522071820081-009f0129c71c?q=80&w=2070&auto=format&fit=crop) no-repeat center center/cover;
    color: var(--white);
    padding: 100px 0;
    text-align: left;
}

.hero .container {
    max-width: 600px; /* Limit hero text width */
    margin: 0 5%; /* Align text to the left */
}

.hero h1 {
    font-size: 3.2em;
    color: var(--white);
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.4em;
    margin-bottom: 30px;
    font-weight: 300;
}

.services {
    background: var(--light-grey-bg);
    padding: 60px 0;
}

.service-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.tab-link {
    padding: 12px 25px;
    font-size: 1.2em;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    color: #888;
    text-align: center;
}

.tab-link:hover {
    color: var(--dark-grey);
}

.tab-link.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    display: none; /* Hidden by default */
}

.tab-content.active {
    display: block; /* Shown when active */
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-box {
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 15px; /* The curved boxes */
    padding: 30px;
    text-align: left; /* Switched to left for list items */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.service-box h3 {
    font-size: 1.6em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.service-box ul {
    list-style-type: '✓'; /* Simple checkmark */
    padding-left: 20px;
    margin: 0;
}

.service-box li {
    padding-left: 10px;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.case-study {
    padding: 60px 0;
}

.case-study-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.case-study img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.case-study-text h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
}

/* ========================================
--- Page: About (about.html) ---
========================================
*/
.parallax-hero {
    height: 60vh; /* 60% of the viewport height */
    position: relative;
    overflow: hidden; /* This clips the image */
    display: flex;
    justify-content: center;
    align-items: center;
}

.parallax-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover; /* Ensures the image covers the area */
    z-index: 1;
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Dark overlay */
    z-index: 2;
}

.parallax-title {
    position: relative;
    z-index: 3;
    color: var(--white);
    font-size: 3.5em;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.page-content {
    position: relative;
    z-index: 5; /* Sits on top of the hero section */
    background: var(--white);
    padding: 60px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns on desktop */
    gap: 40px;
}

.content-column h2 {
    text-align: left;
    font-size: 1.8em;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.content-column p:last-child {
    margin-bottom: 0;
}

/* ========================================
--- Page: Case Study (casestudy-ammco.html) ---
========================================
*/
/* Hero for internal pages */
.simple-hero {
    height: 40vh; /* 40% of the viewport height */
    min-height: 300px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(https://images.unsplash.com/photo-1512917774080-b3b36a6c0de0?q=80&w=2070&auto=format&fit=crop) no-repeat center center/cover;
    color: var(--white);
}
.simple-hero-title {
    position: relative;
    z-index: 3;
    color: var(--white);
    font-size: 3em;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.case-study-layout {
    display: grid;
    grid-template-columns: 1fr 2fr; /* 33% sidebar, 67% main */
    gap: 50px;
}

.case-study-sidebar {
    background: var(--light-grey-bg);
    padding: 30px;
    border-radius: 10px;
    border-left: 5px solid var(--primary-color);
    height: fit-content; /* Makes it only as tall as its content */
}

.case-study-sidebar h3 {
    font-size: 1.6em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 25px;
}

.case-study-sidebar p {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 15px;
}

.case-study-sidebar strong {
    display: block;
    color: var(--dark-grey);
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 3px;
}

.case-study-main {
    /* This holds the main text */
}

.case-study-main h2 {
    text-align: left;
    font-size: 2.2em;
    color: var(--dark-grey);
    margin-bottom: 20px;
}

.case-study-main h3 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.case-study-main ul {
    list-style-type: '✓';
    padding-left: 20px;
}

.case-study-main li {
    padding-left: 10px;
    margin-bottom: 10px;
    font-size: 1.05em;
}

/* Call to Action Section */
.cta-section {
    background: var(--light-grey-bg);
    padding: 60px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.2em;
    margin-bottom: 30px;
}


/* ========================================
--- Page: Contact (contact.html) ---
========================================
*/
/* Uses .simple-hero style from Case Study */
.contact-hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(https://images.unsplash.com/photo-1587560699334-cc42634907a1?q=80&w=2070&auto=format&fit=crop) no-repeat center center/cover;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Info column is smaller */
    gap: 50px;
    align-items: flex-start;
}

/* Left column "Info" */
.contact-info h2 {
    text-align: left;
    font-size: 2.2em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
}

.contact-info p {
    font-size: 1.1em;
    line-height: 1.7;
}

.contact-info strong {
    display: block;
    color: var(--dark-grey);
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    margin-top: 20px;
    margin-bottom: 5px;
}

/* Right column "Form" */
.contact-form {
    background: var(--light-grey-bg);
    padding: 40px;
    border-radius: 10px;
}

.contact-form h2 {
    text-align: left;
    margin-top: 0;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: 'Lato', sans-serif;
    box-sizing: border-box; /* Important for padding to work right */
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.form-group .btn {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
}

/* ========================================
--- NEW: Case Study Directory (casestudy.html) ---
========================================
*/
.case-study-hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(https://images.unsplash.com/photo-1554224739-16a75f286f84?q=80&w=2070&auto=format&fit=crop) no-repeat center center/cover;
}

.page-intro {
    font-size: 1.2em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
    color: #555;
}

.case-study-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.case-study-card {
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Clips the image corners */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.case-study-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.case-study-card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Makes card content fill the space */
}

.case-study-card-content h3 {
    font-size: 1.6em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
}

.case-study-card-content p {
    font-size: 1em;
    flex-grow: 1; /* Pushes the button to the bottom */
}

.case-study-card-content strong {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-grey);
}

.case-study-card-content .btn {
    margin-top: 20px;
    align-self: flex-start; /* Aligns button to the left */
}

/* Placeholder Card Style */
.case-study-card.placeholder {
    background: var(--light-grey-bg);
    border-style: dashed;
    border-color: #ccc;
    text-align: center;
}

.case-study-card.placeholder .case-study-card-content {
    justify-content: center;
    align-items: center;
}
.case-study-card.placeholder .btn {
    align-self: center; /* Center the button in the placeholder */
}


/* ========================================
--- Responsive Media Queries ---
(Applies to all pages)
========================================
*/
@media (max-width: 800px) {
    
    /* --- Header & Nav --- */
    .main-header .container {
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box; 
    }

    .mobile-nav-toggle {
        display: block; /* Show hamburger button */
    }

    .main-nav {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        background: var(--white);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        padding-top: 70px; /* Space for the header */
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    }

    .nav-open .main-nav {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    .main-nav ul {
        display: flex;
        flex-direction: column; /* Stack links vertically */
        width: 100%;
        align-items: center;
    }

    .main-nav li {
        margin: 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }

    .main-nav a {
        display: block;
        padding: 15px;
        width: 100%;
    }
    
    .main-nav .btn {
        margin: 10px 0 15px 0;
        width: 90%;
    }

    /* --- General Page Styles --- */
    h2 {
        font-size: 1.8em; /* Reduce all h2s */
    }
    .page-content {
        padding: 40px 0;
    }

    /* --- Home Page --- */
    .hero {
        padding: 60px 0;
    }
    .hero .container {
        width: 90%; /* Use container width */
        margin: 0 auto;
        text-align: center;
    }
    .hero h1 {
        font-size: 2.2em; /* Reduce heading size */
    }
    .hero p {
        font-size: 1.1em; /* Reduce paragraph size */
    }
    .service-tabs {
        flex-wrap: wrap; /* Allow tabs to wrap if needed */
    }
    .tab-link {
        font-size: 1em;
        padding: 10px 15px;
    }
    .services-grid {
        grid-template-columns: 1fr; /* Stack service boxes */
    }
    .case-study-content {
        grid-template-columns: 1fr; /* Stack case study */
        gap: 20px;
    }
    .case-study img {
        margin-bottom: 20px;
    }
    .case-study-text h3 {
        font-size: 1.5em;
    }

    /* --- About Page --- */
    .parallax-hero {
        height: 40vh; /* Shorter hero on mobile */
    }
    .parallax-title {
        font-size: 2.2em; /* Smaller title on mobile */
    }
    .content-grid {
        grid-template-columns: 1fr; /* Stack content columns */
    }

    /* --- Case Study Page (Ammco) --- */
    .simple-hero {
        padding: 60px 0;
        min-height: 250px;
    }
    .simple-hero-title {
        font-size: 2.2em;
        line-height: 1.3;
    }
    .case-study-layout {
        grid-template-columns: 1fr; /* Stack sidebar and main */
    }
    .case-study-sidebar {
        margin-bottom: 30px;
    }
    
    /* --- Case Study Page (Directory) --- */
    .case-study-gallery {
        grid-template-columns: 1fr; /* Stack cards */
    }
    .page-intro {
        font-size: 1.1em;
        margin-bottom: 30px;
    }

    /* --- Contact Page --- */
    .contact-layout {
        grid-template-columns: 1fr; /* Stack info and form */
    }
    .contact-form {
        padding: 30px;
    }
}