/* Import Roboto font */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* Reset and font settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Roboto", sans-serif;
}

body {
    background-color: #fff;
    color: #000;
}

/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 5%;
    background: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(0, 0, 0, 0.95);
    padding: 10px 5%;
}

.logo {
    background: url('images/cmdlogowhite.svg') no-repeat center center/contain;
    width: 150px;
    height: 50px;
    display: inline-block;
    transition: all 0.3s ease;
}

.header.scrolled .logo {
    background: url('images/cmdlogowhite.svg') no-repeat center center/contain;
    width: 120px;
    height: 40px;
}

.navbar {
    display: flex;
    flex-wrap: wrap;
}

.navbar a {
    position: relative;
    font-size: 18px;
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    margin-left: 40px;
    transition: color 0.3s;
}

.header.scrolled .navbar a {
    color: #fff;
}

.navbar a::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: currentColor;
    transition: width 0.3s;
}

.navbar a:hover::before {
    width: 100%;
}

.navbar a:hover {
    color: #ff0055;
}

/* Hamburger Menu */
.hamburger {
    display: none; /* Hidden by default */
    cursor: pointer;
    position: fixed;
    top: 20px;
    right: 20px;
    background: transparent;
    width: 50px;
    height: 50px;
    border: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: transform 0.3s ease, color 0.3s ease;
}

.hamburger .material-icons {
    font-size: 36px;
    color: #ffffff;
    transition: transform 0.3s ease, color 0.3s ease;
}

/* Move Hamburger Down When Scrolled */
.header.scrolled .hamburger {
    top: auto;
    bottom: 100px; /* Adjusted value to stop before footer */
}

.header.scrolled .hamburger .material-icons {
    color: #000;
}

.hamburger.active .material-icons {
    transform: rotate(90deg);
    color: #ffffff;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* Changed from 100vw to 100% */
    height: 0;
    background: rgba(0, 0, 0, 0.9);
    overflow-y: auto;
    transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1000;
}

.menu-overlay.active {
    height: 100%;
}

.menu-overlay .mobile-navbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
}

.menu-overlay .mobile-navbar a {
    color: #fff;
    font-size: 24px;
    margin: 20px 0;
    text-decoration: none;
}

.menu-overlay .mobile-navbar a::before {
    display: none;
}

/* Hero Section Styles */
.hero-section {
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 0 5%;
    background: url('images/background.avif') no-repeat center center/cover;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    text-align: left;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 30px;
}

/* CTA Button */
.maincta {
    display: inline-block;
    font-size: 1.25rem;
    padding: 15px 35px;
    background-color: #ff0055;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background 0.3s;
}

.maincta:hover {
    background-color: #e6004c;
}

.maincta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.maincta:hover::before {
    left: 100%;
}

/* Mouse Tracking Gradient Effect */
.button-gradient {
    position: relative;
    overflow: hidden;
}

.button-gradient::after {
    content: '';
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, transparent 80%);
    opacity: 0.5;
    pointer-events: none;
    transition: width 0.3s, height 0.3s;
}

.button-gradient:hover::after {
    width: 200px;
    height: 200px;
}

/* Remove Italics and Set Normal Font Weight */
h1, h2, h3, p {
    font-style: normal;
    font-weight: 400;
}

/* Adjust Margins and Padding */
section {
    position: relative;
    padding: 60px 5%;
    background-color: #fff;
}

section::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.2);
    z-index: -1;
}

.hero-section::before {
    display: none;
}

/* Flex Container Adjustments */
.experience-inner,
.about-inner,
.gallery-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.experience-content,
.about-content,
.gallery-content,
.experience-image,
.about-image,
.gallery-image {
    flex: 1 1 calc(50% - 40px);
    max-width: calc(50% - 40px);
}

.experience-content,
.about-content,
.gallery-content {
    padding: 20px;
}

.experience-image,
.about-image,
.gallery-image {
    width: 100%;
    height: auto;
    margin: 20px 0;
}

/* Work Section */
.work-section {
    text-align: center;
}

.work-section h2 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 40px;
}

.work-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.work-item {
    flex: 1 1 300px;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.work-item img {
    width: 100%;
    height: auto;
    transition: transform 0.3s;
}

.work-item:hover img {
    transform: scale(1.05);
}

.work-item h3 {
    margin-top: 10px;
    font-size: 1.2rem;
    color: #333;
    font-weight: 400;
}

/* Gallery Grid */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.gallery-item {
    flex: 1 1 300px;
    overflow: hidden;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: auto;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Contact Section */
.contact-section h2 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.contact-section p {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 30px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    max-width: 500px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e9e9e9;
    font-size: 1rem;
}

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

.contact-button {
    padding: 15px;
    background-color: #ff0055;
    color: #fff;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
    overflow: hidden;
}

.contact-button:hover {
    background-color: #e6004c;
}

.contact-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.contact-button:hover::before {
    left: 100%;
}

/* Footer Styles */
.footer {
    background: url('images/footer-background.avif') no-repeat center center/cover;
    background-attachment: fixed;
    position: relative;
    color: #fff;
    padding: 40px 5%;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.footer-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 20px;
}

.footer-logo img {
    width: 150px;
    height: auto;
}

/* If using background image for footer logo */
.footer-logo {
    background: url('images/cmdlogo.svg') no-repeat center center/contain;
    width: 150px;
    height: 50px;
    display: inline-block;
    margin-bottom: 20px;
}

.footer p {
    flex: 1 1 100%;
    text-align: center;
    margin: 20px 0;
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 100%;
}

.footer-social a {
    margin: 0 10px;
    color: #fff;
    font-size: 24px;
    text-decoration: none;
}

.footer-social .material-icons {
    font-size: 24px;
    color: #fff;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Media Query for Mobile Devices */
@media (max-width: 768px) {
    /* Hide desktop navbar */
    .navbar {
        display: none;
    }

    /* Show Hamburger Menu */
    .hamburger {
        display: flex;
    }

    /* Center the logo when scrolled */
    .header.scrolled {
        justify-content: center;
    }

    .header .logo {
        margin: 0;
    }

    /* Ensure default header alignment when not scrolled */
    .header {
        justify-content: space-between;
    }

    /* Adjust hero content */
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* Adjust section padding */
    section {
        padding: 40px 2%;
    }

    /* Stack flex items vertically on mobile */
    .experience-inner,
    .about-inner,
    .gallery-inner {
        flex-direction: column;
        align-items: center;
    }

    .experience-content,
    .about-content,
    .gallery-content,
    .experience-image,
    .about-image,
    .gallery-image {
        flex: 1 1 100%;
        max-width: 100%;
    }

    /* Adjust navbar link margins */
    .navbar a {
        margin-left: 0;
    }

    /* Adjust footer logo size */
    .footer-logo {
        width: 120px;
        height: 40px;
    }

    .footer-logo img {
        width: 120px;
        height: auto;
    }
}

/* Hide menu overlay on desktop */
@media (min-width: 769px) {
    .menu-overlay {
        display: none;
    }

    /* Hide Hamburger Menu on Desktop */
    .hamburger {
        display: none;
    }
}

/* Enable smooth scrolling */
html {
    scroll-behavior: smooth;
}