@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: black;
    color: white;
    font-family: 'Montserrat', sans-serif;
}

/* Fix for browser-default phone number styling */
a[href^="tel"] {
    color: white;
    text-decoration: none;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Aligns top of logo with top of right block */
    padding: 40px 130px 20px 60px; /* Adjusted left padding */
    background-color: transparent;
    z-index: 100;
}

.services-page header {
    background-color: black;
}

.logo img {
    height: 52px;
    vertical-align: middle;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 14px;
    font-weight: 700;
}

.header-link {
    text-decoration: none;
    color: white;
    transition: color 0.3s;
    margin-bottom: 10px; /* Added padding */
}

.header-link:hover,
.header-link.active {
    color: #ffa500;
}

.header-info {
    color: white;
    font-weight: 300; /* Adjusted font weight */
}

.header-controls button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px 0 0 0; /* Add some space above the button */
}

.header-controls svg {
    stroke: white;
    transition: stroke 0.3s;
}

.header-controls button:hover svg {
    stroke: #ffa500;
}

/* Home Page */
.video-background {
    position: absolute; /* Change from fixed to absolute */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Hide anything outside */
    z-index: -1;
}

#bg-video {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Keep cover for filling */
}

/* Services Page */
.services-container {
    display: flex;
    padding-top: 160px;
}

.video-list {
    width: 250px;
    padding: 40px 40px 40px 60px; /* Adjusted left padding */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.video-list ul {
    list-style: none;
    margin-bottom: 40px;
}

.video-list li {
    margin-bottom: 15px;
}

.video-list a {
    text-decoration: none;
    color: white;
    font-size: 14px;
    font-weight: 300;
    transition: color 0.3s;
}

.video-list a:hover,
.video-list a.active {
    color: #ffa500;
}

#about-link {
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    color: white;
    margin-bottom: 40px;
}

#about-link.active-section {
    color: #ffa500;
}

#home-link {
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    color: white;
}

.services-content {
    flex-grow: 1;
    padding: 40px 130px 40px 40px; /* Adjusted right padding */
}

.text-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.text-grid p {
    font-size: 14px;
    line-height: 1.8;
    font-weight: 300;
    text-align: justify;
}

.clients-logo {
    padding-top: 40px;
    text-align: center;
}

.clients-logo img {
    max-width: 100%;
}

#video-player-container {
    width: 100%;
}

#service-video {
    width: 100%;
    height: auto;
}

.hidden {
    display: none;
}

body.autoplay-blocked .video-background {
    position: absolute; /* Change from fixed to absolute to allow scrolling if content below */
    top: 160px;
    left: 60px;
    right: 130px;
    width: auto; /* Let left/right define width */
    height: auto; /* Let top/bottom define height, or use aspect ratio */
    bottom: auto; /* Don't stretch to bottom */
    z-index: 1; /* Bring it above other content if needed */
    background-color: black; /* Ensure background if video doesn't fill */
}

body.autoplay-blocked #bg-video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Show entire video, letterboxed */
    display: block; /* Ensure it's not hidden by default */
}


/* Responsive Design */
@media (max-width: 1024px) { /* iPad landscape */
    .services-container {
        flex-direction: column;
    }

    .video-list {
        width: 100%;
        padding: 15px;
    }

    .video-list ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 15px;
    }

    .video-list li {
        margin: 0 15px;
    }

    .text-grid {
        grid-template-columns: 1fr;
    }

    .services-content {
        padding-right: 40px;
    }
}

@media (max-width: 768px) { /* iPad portrait & mobile */
    header {
        padding: 15px;
        flex-direction: column; /* Stack vertically */
        justify-content: center; /* Center horizontally */
        align-items: center; /* Center horizontally */
        background-color: black; /* Added for mobile */
    }

    .logo {
        margin-bottom: 15px; /* Add some space below logo */
    }

    .header-right {
        flex-direction: column; /* Stack vertically */
        align-items: center; /* Center horizontally */
        gap: 5px; /* Adjust gap between items */
        margin-top: 0;
    }

    .header-controls {
        display: none; /* Hiding mute on mobile for simplicity */
    }
    
    .services-container {
        padding: 220px 20px 40px 20px; /* Increased top padding */
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .video-list {
        order: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 25px;
        width: 100%;
        padding: 0;
    }

    .services-content {
        order: 2;
        padding: 0;
    }

    #about-link {
        text-align: center;
        margin-bottom: 30px;
    }

    #video-link-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 25px;
    }

    #home-link {
        text-align: center;
    }

     .video-list ul {
        flex-direction: column;
        align-items: center;
        margin-bottom: 0;
    }

     .video-list li {
        margin: 10px 0;
    }

    #text-content {
        margin-bottom: 25px;
    }

    #video-player-container {
        margin-bottom: 25px;
    }

    .clients-logo {
        margin-bottom: 25px;
    }
}

/* iOS Specific Fixes */
.is-ios .video-background {
    /* Use -webkit-fill-available to account for browser UI */
    height: -webkit-fill-available;
}

.is-ios #bg-video {
    /* Ensure the video is not being pushed down by anything */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.autoplay-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    z-index: 1;
}

body.autoplay-blocked .autoplay-overlay {
    display: flex;
}

.custom-mute-toggle {
    /* Removed position: fixed; */
    /* Removed bottom and right */
    width: 50px; /* Fixed width */
    height: 50px; /* Fixed height */
    background-color: transparent !important; /* Explicitly set to transparent */
    border: none !important; /* Explicitly set to no border */
    border-radius: 50%; /* Make it round */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 101;
    transition: background-color 0.3s, border-color 0.3s;
    margin-top: 10px; /* Add some space from elements above */
}

.custom-mute-toggle img {
    width: 60%; /* Adjust image size within the button */
    height: 60%;
    object-fit: contain;
}

.custom-mute-toggle:hover {
    background-color: transparent !important; /* Ensure hover is also transparent */
    border: none !important; /* Ensure hover has no border */
}
