/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #fff;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    box-sizing: border-box;
}

.logo-container {
    width: 100%;
    max-width: 350px; /* Reduced logo size on desktop */
    padding: 0 2rem;
    box-sizing: border-box;
}

header .logo {
    height: 50px;
    width: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.logo-container .logo {
    width: 100%;
    height: auto;
    transition: transform 0.3s;
    animation: fadeIn 1.5s ease-in-out;
}

.logo-container .logo:hover {
    transform: scale(1.05);
}

.hamburger-menu {
    cursor: pointer;
}

.hamburger-menu .line {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
}

header .hamburger-menu .line {
    background-color: #fff;
}

body:not(.home-page):not(.objective-page) header .hamburger-menu .line {
    background-color: #333;
}

/* Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease-in-out;
    z-index: 5;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav a {
    color: #fff;
    font-size: 2rem;
    margin: 1rem 0;
}

/* Video Background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Home Page */
.home-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    text-align: center;
    /* Padding is now handled in media queries for smaller screens */
}

.welcome-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh; /* Full height for desktop hero */
    padding: 2rem;
    box-sizing: border-box;
}

.welcome-section {
    background-color: transparent !important;
}

.welcome-section-bg {
    background-color: rgba(255, 255, 255, 0.5);
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.secondary-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 2rem 0;
    box-sizing: border-box;
    background-color: transparent;
}

.fade-in-section {
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    will-change: opacity;
}

.fade-in-section.is-visible {
    opacity: 1;
}

.services-links {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: 0;
    background-color: #fff;
    padding: 2rem 4rem;
    width: 100%;
    box-sizing: border-box;
}

.service-link-item {
    text-align: center;
}

.service-letter {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 2.5rem;
    color: rgba(0,0,0,0.8);
    text-decoration: none;
    position: relative;
    text-shadow: -2px -2px 0px rgba(255,0,0,0.5), 2px 2px 0px rgba(0,0,255,0.5);
    transition: transform 0.3s;
    padding-bottom: 4px;
    display: inline-block; /* Ensure the link is an inline block for proper layout */
    margin-right: 10px; /* Add space after the letter icon */
}

.service-name {
    font-family: Arial, sans-serif;
    text-transform: uppercase;
    margin-top: 0.5rem;
    color: #000;
}

.service-letter::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0; /* Position at the very bottom of the padding area */
    width: 100%;
    height: 3px;
    background: rgba(0,0,0,0.8);
    box-shadow: -2px -2px 0px rgba(255,0,0,0.5), 2px 2px 0px rgba(0,0,255,0.5);
}

.service-letter:hover {
    transform: scale(1.1);
}

.info-text {
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.info-heading {
    font-family: Arial, sans-serif;
    font-size: 2rem;
    color: #000;
    text-transform: uppercase;
    text-shadow: -2px -2px 0px rgba(255,0,0,0.7), 2px 2px 0px rgba(0,0,255,0.7);
    margin-bottom: 2rem;
}

.section-four {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.section-four p {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.2rem;
    color: #000;
    max-width: 900px;
    margin: 0 auto;
}

.sphere-logo-link {
    display: block;
    text-align: center;
    margin-top: 2rem;
}

.sphere-logo {
    width: 80px;
    height: auto;
    transition: transform 0.3s;
}

.sphere-logo:hover {
    transform: scale(1.1);
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: #fff;
    color: #333;
    border-radius: 5px;
    font-weight: bold;
}

/* Objective Page */
.objective-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: #fff;
    text-align: center;
}

.objective-content section {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 1rem 2rem;
    margin: 1rem 0;
}

/* Services Page */
.services-content {
    padding: 8rem 2rem 2rem;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.service-item {
    text-align: center;
    flex: 0 0 300px; /* Control the width of the items */
}

.service-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-item h3 {
    transition: transform 0.3s;
}

.service-item:hover h3 {
    transform: translateY(-5px);
}

/* Service Detail Pages */
.service-detail-content {
    display: flex;
    padding: 8rem 2rem 2rem;
    gap: 2rem;
}

.service-detail-text {
    flex: 1;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: #333;
    text-decoration: underline;
}

.service-detail-image {
    flex: 1;
}

/* Clients Page */
.clients-content {
    padding: 8rem 2rem 2rem;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    align-items: center;
}

.client-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.client-item img {
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    position: relative;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Contact Page */
.contact-content {
    padding: 8rem 2rem 2rem;
}

.map-container {
    margin-bottom: 2rem;
}

.map-container iframe {
    width: 100%;
}

.contact-info {
    margin-bottom: 2rem;
}

form {
    display: flex;
    flex-direction: column;
}

form input, form textarea, form button {
    margin-bottom: 1rem;
    padding: 0.8rem;
    font-size: 1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    background-color: #f2f2f2;
}

/* Responsive */

/* Tablet and Mobile */
@media (max-width: 1024px) {
    .home-content {
        padding-top: 80px; /* Add padding back to push content below header */
    }
    .welcome-section {
        height: calc(100vh - 80px); /* Adjust height to account for padding */
    }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .welcome-section-bg {
        width: 70%;
    }
    .logo-container {
        max-width: 400px;
    }
    .services-links {
        max-width: 700px;
        gap: 1rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .welcome-section-bg {
        width: 90%;
    }
    .logo-container {
        max-width: 300px;
    }
    .services-links {
        flex-direction: row;
        justify-content: space-around;
        padding: 2rem 1rem;
    }
    .service-name {
        display: none;
    }
    .service-letter {
        font-size: 2rem;
    }
    .info-text {
        width: 90%;
    }
    .service-detail-content {
        flex-direction: column;
    }
}
