/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
}

body {
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    width: 80%;
    margin: 0 auto; /* Center horizontally */
    padding: 0 15px; /* Avoid edges */
}

h1, h2, h3 {
    font-weight: 600;
}

a {
    text-decoration: none;
}

button {
    cursor: pointer;
}

/* Hero Logo - inside hero text */
.hero-logo {
    text-align: center;
    margin-bottom: 30px;
    background: transparent;
}

.hero-logo a {
    display: inline-block;
    background: transparent;
}

.hero-logo img {
    width: 450px; /* 150% of original 300px */
    height: auto; /* Maintain aspect ratio */
    max-width: 90%;
    display: block;
    margin: 0 auto;
    background: transparent !important; /* Force transparency */
    background-color: transparent !important;
    mix-blend-mode: normal;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Header */
header {
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
}

/* Header when inside hero section - positioned over video */
.hero-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.5); /* 50% transparent white */
    z-index: 10;
    backdrop-filter: blur(2px); /* Adds a subtle blur effect */
}

header .container {
    display: flex; /* Enable flex layout */
    justify-content: space-between; /* Space out left, center (logo), and right sections */
    align-items: center; /* Vertically align items */
}

header .left, header .right {
    display: flex; /* Ensure content inside is aligned horizontally */
    align-items: center; /* Align content vertically within the section */
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    gap: 10px; /* Add spacing between buttons when they wrap */
}

header .logo {
    text-align: center; /* Center the logo horizontally */
}

/* Left, Center, and Right Sections */
header .left {
    text-align: left;
}

header .center {
    flex: 1 0 auto; /* Allow growing/shrinking */
    text-align: center;
}

header .right {
    text-align: right;
}

/* Navigation */
header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

header nav ul li a {
    color: #000;
    font-size: 16px;
}

/* Responsive Layout */
@media (max-width: 768px) {
    .hero-logo img {
        width: 300px; /* Smaller on mobile */
        max-width: 80%;
    }
    
    header .container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    header .left, header .right {
        justify-content: center;
        width: 100%;
    }

    header .logo {
        margin-bottom: 10px;
        text-align: center;
    }

    .cta-button {
        width: auto;
        min-width: 140px;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .hero-text {
        top: 30%; /* Even higher on mobile */
        transform: translate(-50%, -50%);
        padding: 0 20px;
    }
    
    .hero h1,
    .hero h2 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
}

/* Hero Section */
.hero {
    position: relative;
    background-color: #606060; /* Even lighter grey */
    color: #fff;
    padding: 0;
    min-height: 100vh; /* Full viewport height */
    text-align: center;
    overflow: hidden;
    margin-top: 0; /* Ensure it starts at top */
}

/* Background image as fallback - only shows if video doesn't load */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero/hero1.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

/* Show background when video is not playing or not supported */
.hero-video:not([autoplay]),
.hero-video[poster] {
    background-image: url('../images/hero/hero1.jpg');
    background-size: cover;
    background-position: center;
}

/* For browsers that don't support :has() */
@supports not selector(:has(*)) {
    .hero::before {
        display: block;
    }
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Full viewport height */
    min-width: 100%;
    min-height: 100vh;
    object-fit: cover;
    z-index: 0;
    background-color: #606060; /* Even lighter grey */
    background-image: url('../images/hero/hero1.jpg');
    background-size: cover;
    background-position: center;
    pointer-events: none;
}

/* Ensure video works on mobile devices */
@media (max-width: 768px) {
    .hero-video {
        /* Some mobile devices need explicit dimensions */
        min-height: 100%;
        height: 100%;
    }
    
    /* Reduce video quality on mobile if needed (handled by preload) */
    .hero-video {
        preload: 'metadata'; /* Load less data on mobile */
    }
}

.hero-text {
    position: absolute;
    top: 35%; /* Position higher on screen */
    left: 50%;
    transform: translate(-50%, -50%); /* Center horizontally, adjust vertically */
    z-index: 2;
    max-width: 700px; /* Increased to accommodate larger logo */
    width: 90%;
    margin: 0 auto;
    text-align: center;
}

.hero h1,
.hero h2 {
    font-size: 48px;
    margin-bottom: 10px;
    color: #fff;
}

.hero p {
    font-size: 20px;
    margin-bottom: 20px;
    color: #fff;
}

.cta-button {
    display: inline-block;
    padding: 15px 0;
    width: 150px;
    background-color: transparent;
    color: #004ce4;
    border: 2px solid #004ce4;
    border-radius: 30px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-bottom: 15px;
    margin-top: 15px;
    margin-left: 15px;
    margin-right: 15px;
}

.cta-button:hover {
    background-color: #004ce4;
    color: #fff;
}

/* Services Section */
.services {
    background-color: #fff;
    padding: 60px 0;
    text-align: center;
}

.services .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.services h2 {
    margin: 0 auto 40px;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
}

.service-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.service-card {
    background-color: #e9ecef;
    padding: 30px;
    border-radius: 8px;
    width: calc(33.333% - 30px);
    min-width: 250px;
    text-align: center;
}

.service-card img {
    margin-top: 15px;
    max-width: 100%;
    height: auto;
}
/* Projects Section */
.projects {
    background-color: #f1f1f1;
    padding: 60px 0;
    text-align: center;
}

.projects h2 {
    margin-bottom: 40px;
}

.project-gallery {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping */
}

.project-item {
    flex: 1 1 40%; /* Allow items to grow and shrink, with a base width of 30% */
    min-width: 300px; /* Ensure items don't shrink below this width */
    text-align: center;
    box-sizing: border-box; /* Ensure padding/margins don't affect width */
}

.project-item img {
    width: 100%; /* Ensure the image takes up the full width of the container */
    height: auto; /* Maintain aspect ratio */
    border-radius: 8px;
}

.project-item h3 {
    margin-top: 10px;
    font-size: 18px;
}

/* 3D Virtual Tours Section */
.virtual-tours {
    background-color: #fff;
    padding: 60px 0;
    text-align: center;
}

.virtual-tours .container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.virtual-tours h2 {
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: bold;
}

.virtual-tours > .container > p {
    font-size: 18px;
    margin-bottom: 40px;
    color: #666;
}

.matterport-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.matterport-item {
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}

.matterport-item h3 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.matterport-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.matterport-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive adjustments for virtual tours */
@media (max-width: 768px) {
    .matterport-item h3 {
        font-size: 20px;
    }
    
    .virtual-tours h2 {
        font-size: 24px;
    }
}

/* Contact Section */
.contact {
    background-color: #fff;
    padding: 60px 0;
    text-align: center;
}

.contact p {
    font-size: 18px;
    margin-bottom: 20px;
}

.contact-info {
    margin: 30px 0;
    line-height: 1.8;
}

.contact-info p {
    margin: 10px 0;
}

.contact-info a {
    color: #004ce4;
    text-decoration: underline;
}

.contact-info a:hover {
    color: #0033a0;
}

.services-intro,
.projects-intro {
    max-width: 800px;
    margin: 0 auto 30px;
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

.footer-links {
    margin-top: 15px;
    font-size: 14px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    margin: 0 5px;
}

.footer-links a:hover {
    text-decoration: underline;
}
