/* css/style.css - Design styles for Munday Engineers website clone */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
    --primary-color: #0b3c72;
    /* Premium Deep Blue */
    --primary-hover: #082d57;
    /* Darker Blue on Hover */
    --accent-color: #0078d4;
    /* Electric Blue Accent */
    --text-dark: #2c3e50;
    /* Rich Dark Text */
    --text-light: #5a6e82;
    /* Subdued Body Text */
    --bg-white: #ffffff;
    --bg-alt: #f4f7fa;
    /* Clean Alternate Background */
    --footer-bg: #0d121a;
    /* Sleek Dark Blue/Black Footer */
    --footer-text: #8e9cae;
    /* Muted Footer Text */
    --border-color: #e2e8f0;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --font-primary: 'Outfit', sans-serif;
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 40px rgba(11, 60, 114, 0.15);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

button,
input,
textarea {
    font-family: inherit;
}

/* Typography Utility */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--primary-color);
    margin-bottom: 0.5em;
}

p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 60, 114, 0.2);
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* 1. TOP BAR */
.top-bar {
    background-color: #FFEB5C;
    /* Warm Yellow/Gold Accent */
    color: var(--text-dark);
    padding: 10px 0;
    font-size: 0.9rem;
    font-weight: 500;
    /* Slightly bolder for text clarity */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar-left {
    display: flex;
    gap: 20px;
    align-items: center;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-item i {
    color: var(--text-dark);
    font-size: 0.95rem;
}

.top-bar-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.top-bar-right a {
    color: var(--text-dark);
}

.top-bar-right a:hover {
    color: var(--primary-color);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.08);
    color: var(--text-dark);
    font-size: 0.85rem;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: scale(1.1);
}

/* 2. HEADER NAVIGATION */
.main-header {
    background-color: black;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 85px;
    display: flex;
    align-items: center;
}

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

.logo-wrapper {
    display: flex;
    align-items: center;
}

.logo {
    max-height: 80px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    /* Ensure the dark logo displays clearly in white on the blue background */
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 100%;
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link {
    color: #ffffff;
    font-weight: 500;
    font-size: 1.05rem;
    padding: 12px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #ffffff;
    transition: var(--transition-smooth);
}

.nav-link:hover,
.nav-item.active .nav-link {
    color: #ffffff;
    opacity: 0.9;
}

.nav-link:hover::after,
.nav-item.active .nav-link::after {
    width: 100%;
}

/* Submenu Dropdown Styling */
.nav-item.dropdown {
    cursor: pointer;
}

.nav-item.dropdown i {
    font-size: 0.8rem;
    margin-left: 4px;
    transition: var(--transition-smooth);
}

.nav-item.dropdown:hover i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 250px;
    box-shadow: var(--shadow-medium);
    border-radius: 0 0 8px 8px;
    border-top: 3px solid var(--primary-color);
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: var(--transition-smooth);
}

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

.dropdown-item a {
    display: block;
    padding: 10px 24px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

.dropdown-item a:hover {
    background-color: var(--bg-alt);
    color: var(--primary-color);
    padding-left: 30px;
}

/* Mobile Toggle Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: var(--transition-smooth);
}

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

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

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

/* 3. HERO BANNER SECTION */
.hero-section {
    position: relative;
    padding: 140px 0;
    background-color: var(--primary-color);
    background-size: cover;
    background-position: center;
    color: #fff;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(11, 60, 114, 0.92) 0%, rgba(13, 18, 26, 0.85) 100%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 800px;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.15;
}

.hero-text {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 35px;
    max-width: 650px;
}

/* Internal Banner Header for other pages */
.page-banner {
    position: relative;
    padding: 80px 0;
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(11, 60, 114, 0.95) 0%, rgba(13, 18, 26, 0.9) 100%);
    z-index: 1;
}

.page-banner .container {
    position: relative;
    z-index: 2;
}

.page-banner h1 {
    color: #fff;
    font-size: 2.8rem;
    margin-bottom: 10px;
}

.breadcrumb {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    gap: 8px;
}

.breadcrumb a:hover {
    color: #fff;
}

/* 4. SECTIONS & CARDS */
.section {
    padding: 90px 0;
}

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

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.section-subtitle {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-color);
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-top: 15px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background-color: #fff;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(11, 60, 114, 0.1);
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(11, 60, 114, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 25px;
    transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon-wrapper {
    background-color: var(--primary-color);
    color: #fff;
}

.feature-card h3 {
    font-size: 1.35rem;
    margin-bottom: 15px;
}

/* Split Content Grid (Who we are) */
.split-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.split-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.split-image-wrapper img {
    width: 100%;
    object-fit: cover;
}

/* 5. PRODUCT CATEGORIES GRID */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.category-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-image {
    position: relative;
    padding-bottom: 80%;
    /* aspect ratio */
    overflow: hidden;
    background-color: #f8f9fa;
}

.category-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: var(--transition-smooth);
}

.category-card:hover .category-image img {
    transform: scale(1.08);
}

.category-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    align-items: center;
    text-align: center;
}

.category-content h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.category-content p {
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Product Listing Layout */
.products-listing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: center;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-img-box {
    position: relative;
    padding-bottom: 100%;
    /* square box */
    overflow: hidden;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
}

.product-img-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: var(--transition-smooth);
}

.product-card:hover .product-img-box img {
    transform: scale(1.08);
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    flex-grow: 1;
    line-height: 1.4;
}

.product-inquiry-btn {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 15px;
}

.product-card:hover .product-inquiry-btn {
    background-color: var(--accent-color);
}

/* Call to Action Banner before contact footer */
.cta-banner {
    background-color: var(--primary-color);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.cta-banner h2 {
    color: #fff;
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    margin-bottom: 25px;
}

/* Contact Details Page Split */
.contact-split {
    display: grid;
    grid-template-columns: 4fr 5fr;
    gap: 50px;
}

.contact-info-block {
    background-color: var(--bg-alt);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.contact-info-block h3 {
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.info-item-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.25rem;
    box-shadow: var(--shadow-light);
    flex-shrink: 0;
}

.info-item-content h4 {
    font-size: 1.05rem;
    margin-bottom: 5px;
}

.info-item-content p {
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Forms (Contact and Footer) */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    color: var(--text-dark);
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(11, 60, 114, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* 6. GLOBAL FOOTER */
.main-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 80px 0 0 0;
    font-size: 0.95rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-widget h3 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
}

.footer-widget p {
    color: var(--footer-text);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

.footer-widget ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-widget ul li a {
    color: var(--footer-text);
}

.footer-widget ul li a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-contact-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.footer-contact-item i {
    color: var(--accent-color);
    margin-top: 5px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form input {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.newsletter-form input:focus {
    background-color: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 0;
    color: var(--footer-text);
}

/* Scroll to top button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

/* Mobile responsive media queries */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 85px;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        height: auto;
        box-shadow: var(--shadow-medium);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: var(--transition-smooth);
        padding: 20px 24px;
        max-height: 80vh;
        overflow-y: auto;
    }

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

    .nav-item {
        width: 100%;
        display: block;
        height: auto;
    }

    .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }

    .nav-link::after {
        display: none;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background-color: var(--primary-hover);
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding: 5px 0;
        border-radius: 4px;
        margin: 5px 0;
    }

    .dropdown-item a {
        color: #ffffff;
        padding-left: 20px;
    }

    .dropdown-item a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }

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

    .nav-item.dropdown.open i {
        transform: rotate(180deg);
    }

    .features-grid,
    .categories-grid,
    .products-listing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .split-content,
    .contact-split {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 600px) {

    .features-grid,
    .categories-grid,
    .products-listing-grid,
    .footer-top {
        grid-template-columns: 1fr;
    }

    .top-bar-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}