/* Video Background Wrapper - spans multiple sections */
.video-background-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

main {
    position: relative;
    display: block;
    line-height: 0;
    font-size: 0;
}

main > section {
    line-height: normal;
    font-size: 16px;
    display: block;
    vertical-align: top;
    margin: 0;
    padding-top: 0;
    border: 0;
}

.page-background-video {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: 0;
}

/* Semi-transparent overlay for text readability */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    pointer-events: none;
}

/* Hero Section with Video Background */
.hero {
    padding: 80px 0 80px 0;
    text-align: center;
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 0;
}

.hero-video {
    background: transparent none !important;
    background-color: transparent !important;
    background-image: none !important;
    display: block;
    margin: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

/* Force no gap between hero and services on Firefox */
.hero-video + .services-video,
.hero-video + .services {
    margin-top: 0 !important;
    padding-top: 60px;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.hero .btn {
    background: var(--primary-color);
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    text-transform: uppercase;
    font-weight: bold;
    display: inline-block;
    width: auto;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.hero .btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Services Section with Video Background */
.services {
    padding: 60px 0 60px 0;
    position: relative;
    display: block;
    margin: 0;
    border: 0;
}

.services-video {
    background-color: transparent;
    display: block;
    margin: 0;
    padding-top: 0;
    border-top: 0;
}

.services-video .container {
    position: relative;
    z-index: 2;
}

.services-video h2 {
    color: #fff;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-item {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.service-item h4 {
    text-align: center;
    padding: 15px 15px 10px;
    font-size: 16px;
    color: var(--dark-color);
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-description {
    padding: 10px 15px 15px;
    text-align: center;
    font-size: 14px;
    color: #666;
    margin: 5px 0 0 0;
    line-height: 1.4;
    flex-grow: 1;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-image-container {
    margin-top: auto;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.service-item picture {
    display: block;
    width: 100%;
    height: 100%;
}

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

/* Video Container - Responsive viewport fitting */
.video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 2rem auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Custom Play Button Overlay */
.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    padding: 0;
    opacity: 1;
}

.video-play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-button:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.video-play-button.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Ensure video fits within viewport on smaller screens */
@media (max-width: 1200px) {
    .video-container {
        max-width: 90vw;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .video-container {
        max-width: 95vw;
        margin: 1.5rem auto;
    }
}

@media (max-width: 480px) {
    .video-container {
        max-width: 100vw;
        margin: 1rem 0;
        border-radius: 0;
    }
    
    .video-container video {
        border-radius: 0;
    }
}

/* About Section */
.about {
    padding: 60px 0;
    background-color: #fff;
    position: relative;
    z-index: 2;
}

.about h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.about p {
    font-size: 18px;
    max-width: 900px;
    margin: 0 auto 30px;
    text-align: center;
}

.features {
    max-width: 600px;
    margin: 0 auto 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.features li {
    font-size: 18px;
    position: relative;
    padding-left: 30px;
}

.features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.image-container {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Story Section */
.story {
    padding: 60px 0;
    background-color: var(--light-color);
    position: relative;
    z-index: 2;
}

.story h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 30px;
}

.story p {
    font-size: 18px;
    max-width: 900px;
    margin: 0 auto 30px;
    text-align: center;
}

/* Common Services Section */
.common-services {
    padding: 60px 0;
    position: relative;
    z-index: 2;
    background-color: #fff;
}

.common-services h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
}

.service-category {
    margin-bottom: 50px;
}

.service-category h3 {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
}

.service-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.service-details p {
    margin-bottom: 15px;
    font-size: 18px;
}

.service-details ul,
.service-details ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.service-details li {
    margin-bottom: 10px;
    font-size: 16px;
}

/* Why Choose Us Section */
.why-choose-us {
    padding: 60px 0;
    background-color: transparent;
    position: relative;
    z-index: 2;
}

.why-choose-us h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.why-choose-us > .container > p {
    text-align: center;
    font-size: 18px;
    max-width: 900px;
    margin: 0 auto 30px;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.feature h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.feature p {
    font-size: 16px;
    flex-grow: 1;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: #fff;
    padding: 60px 0 20px;
    position: relative;
    z-index: 2;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-logo {
    max-width: 200px;
    margin-bottom: 15px;
}

.footer-links h3,
.footer-contact h3 {
    color: #fff;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 18px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #fff;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    color: #fff;
    font-size: 24px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}



/* Full-width container overrides for homepage sections */
.hero .container,
.services .container,
.about .container,
.story .container,
.common-services .container,
.why-choose-us .container {
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
    display: block;
    line-height: normal;
}

/* Full-width service-content */
.service-content {
    padding: 0;
}

/* Full-width CTA */
.cta {
    width: 100%;
    max-width: 100%;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .hero {
        min-height: 400px;
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .hero .btn {
        font-size: 16px;
        padding: 12px 24px;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 350px;
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 14px;
    }
}
