/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000;
    color: #fff;
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

/* Header Styles */
header {
    background-color: rgba(0, 0, 0, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.5rem 2rem;
    transition: transform 0.3s ease-in-out, background 0.3s ease-in-out;
}

header.scrolled {
    background: rgba(0, 0, 0, 0.9);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 75px;
    width: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: transform 0.2s ease, text-shadow 0.2s ease;
}

.nav-links a:hover {
    transform: scale(1.1);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    height: 20px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-background video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    pointer-events: none; /* Ensure the video is not interactive */
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.8); /* Semi-transparent white background */
    color: #000;
    text-decoration: none;
    border-radius: 5px;
    opacity: 0.8; /* Initial opacity */
    font-weight: 700; /* Make the text bold */
    transition: background 0.3s, opacity 0.3s; /* Smooth transition */
}

.cta-button:hover {
    background: rgba(255, 255, 255, 1); /* Full opacity on hover */
    opacity: 1; /* Full opacity on hover */
}

/* Services Section */
.services-section {
    padding: 7rem 2rem;
    background: #111;
    text-align: center;
}

.services-section h2 {
    font-size: 2.5rem; 
    font-weight: 900; 
    margin-bottom: 3rem;
}

/* Services Container */
.services-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* Added gap for spacing between cards */

}

/* Service Card Styles */
.service-card {
    width: 350px;
    height: 300px; /* Increased height */
    margin: 1rem;
    border: 2px solid black; /* Adjusted border thickness */
    perspective: 1000px;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-size: cover;
    background-position: center;
    overflow: hidden; /* Ensure content stays inside the card */
}

/* Individual Backgrounds for Service Cards */
.service-card:nth-child(1) {
    background-image: url('../images/services1.jpg');
}

.service-card:nth-child(2) {
    background-image: url('../images/services2.jpg');
}

.service-card:nth-child(3) {
    background-image: url('../images/services3.jpg');
}

/* Add a hover effect */
.service-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

/* Flip Effect */
/* Flip Effect */
.service-card .service-front,
.service-card .service-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.6s;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7); /* Semi-transparent overlay for text visibility */
}

.service-card .service-front {
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay on the front */
}

.service-card .service-back {
    background-color: rgba(0, 0, 0, 0.7); /* Darker overlay on the back */
    transform: rotateY(180deg);
}

.service-card:hover .service-front,
.service-card.flipped .service-front {
    transform: rotateY(180deg);
}

.service-card:hover .service-back,
.service-card.flipped .service-back {
    transform: rotateY(360deg);
}

/* Front and back content */
.service-card h3 {
    font-size: 1.5rem;
    text-align: center;
}

/* Prevent text overflow on all screen sizes */
.service-back p {
    word-wrap: break-word;
    white-space: normal; /* Ensure text wraps */
    overflow-wrap: break-word; /* Handle long words gracefully */
    padding: 1rem;
}

/* Contact Section */
.contact-section {
    position: relative;
    padding: 5rem 2rem;
    text-align: center;
    overflow: hidden;
}

.contact-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Ensures video is behind content */
    overflow: hidden;
}

.contact-background video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure the video covers the entire background */
    pointer-events: none; /* Ensure the video is not interactive */
}

.contact-content {
    position: relative;
    z-index: 1; /* Keep content above the video */
    background-color: rgba(0, 0, 0, 0.7); /* Optional dark overlay for readability */
    padding: 2rem;
    border-radius: 10px;
    display: inline-block;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content .form-group input,
.contact-content .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid #fff;
    color: #fff;
}

.contact-content h2 {
    font-size: 2.5rem;
    color: #fff;
}

#contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

#phone {
    margin-top: 1rem;
}

.submit-button {
    padding: 1rem 2rem;
    background: #fff;
    color: #000;
    border: none;
    cursor: pointer;
}

.submit-button:hover {
    background: #f1f1f1;
}

/* Success and error message styles */
.success-notification {
    color: green;
    margin-top: 1rem;
    text-align: center;
    font-size: 1.2rem;
}

.error-notification {
    color: red;
    margin-top: 1rem;
    text-align: center;
    font-size: 1.2rem;
}

/* Base styles for the fade animations */
@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-30px); /* Moves down */
    }
    100% {
        opacity: 1;
        transform: translateY(0); /* Restores to its original position */
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px); /* Moves up */
    }
    100% {
        opacity: 1;
        transform: translateY(0); /* Restores to its original position */
    }
}

/* Apply the animations */
.fade-in-down {
    opacity: 0; /* Initial state */
    animation: fadeInDown 1s ease forwards;
    animation-delay: 0.3s; /* Delay for a slight sequence */
}

.fade-in {
    opacity: 0; /* Initial state */
    animation: fadeIn 1.2s ease forwards;
    animation-delay: 0.8s; /* Slight delay to play after the title */
}

.fade-in-up {
    opacity: 0; /* Initial state */
    animation: fadeInUp 1s ease forwards;
    animation-delay: 1.2s; /* Plays after the middle text */
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Black background with opacity */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    width: 80%;
    max-width: 400px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

.close-button:hover {
    color: red;
}

#modal-message {
    font-size: 1.2rem;
    color: #000;
}

/* Responsive Design for Service Cards */
@media (max-width: 768px) {
    .services-container {
        padding: 1rem; /* Adjust padding for small screens */
    }

.service-card {
    z-index: 10; /* Set a high z-index value to bring them forward */
    position: relative; /* Ensure the z-index is applied properly */
}

    .service-card .service-front,
    .service-card .service-back {
        font-size: 0.9rem; /* Reduce the font size */
        padding: 0.8rem; /* Adjust padding */
    }

    .service-back p {
        word-wrap: break-word; /* Ensure long words break properly */
        white-space: normal; /* Make sure text wraps */
        overflow: hidden; /* Prevent text from overflowing */
    }
}

/* Prevent text overflow on all screen sizes */
.service-back p {
    overflow-wrap: break-word;
    word-wrap: break-word; /* Break long words to prevent overflow */
}

/* Ensure background videos remain inline and non-interactive on mobile */
.hero-background video,
.contact-background video {
    object-fit: cover;
    pointer-events: none;
}
