/* General Body Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #e9ecef;
    color: #343a40;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: 0 15px;
}

/* Header Styles */
header {
    background: #fcfeff;
    color: #131313;
    padding: 1rem 0;
    border-bottom: 3px solid #007bff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.active a {
    color: #000000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    height: 60px; /* Adjusted for better visibility */
    width: auto;
}

header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

header nav ul li {
    display: inline;
    margin-left: 25px;
}

header nav ul li a {
    color: #000000; /* Changed to black */
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: #007bff;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 15px; /* Increased padding for easier tapping */
    z-index: 1000;
}

.hamburger-menu .bar {
    display: block;
    width: 30px; /* Increased width */
    height: 4px; /* Increased height */
    margin: 6px auto; /* Adjusted margin */
    background-color: #007bff; /* Changed color for better visibility */
    transition: all 0.3s ease-in-out;
}

/* Navigation Links */
.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-links.active {
    /* Styles for when the menu is active on mobile */
}

/* Hero Section */
.hero {
    min-height: 500px; /* Increased height */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('kam1.jpg') no-repeat center center/cover; /* Dynamic placeholder */
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hero h1 {
    font-size: 3.8rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    max-width: 700px;
}

.btn {
    display: inline-block;
    color: #fff;
    background: #007bff;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 50px;
    transition: background 0.3s ease, transform 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* Sections General */
section {
    padding: 60px 0;
    margin-bottom: 0;
}

section h2 {
    font-size: 2.8rem;
    color: #0781fb;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    height: 4px;
    width: 80px;
    background-color: #007bff;
    border-radius: 2px;
}

/* Services Section */
.services {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('kam1.jpg') no-repeat center center/cover; /* Electrical background */
    color: #fff; /* Ensure text is visible on dark background */
    overflow: hidden; /* Hide overflowing content */
}

.services-slider-container {
    position: relative; /* For positioning arrows */
    width: 100%;
    overflow: hidden;
}

.services-slider {
    display: flex;
    width: fit-content; /* Allow content to define width */
    animation: slideServices 60s linear infinite; /* Adjusted duration for slower speed */
}

/* Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.slider-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev-arrow {
    left: 10px;
}

.next-arrow {
    right: 10px;
}

.service-item {
    flex: 0 0 auto;
    width: 300px;
    margin-right: 30px;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid #e0e0e0; /* Added subtle border */
}

.service-item img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #f0f0f0; /* Added subtle border to image */
}

.service-item h3 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 1.8rem; /* Slightly increased font size */
    font-weight: 700; /* Made bolder */
    text-transform: uppercase; /* Uppercase for titles */
}

.whatsapp-btn {
    position: absolute;
    bottom: -50px; /* Start off-screen */
    left: 50%;
    transform: translateX(-50%);
    background-color: #25D366; /* WhatsApp green */
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: bottom 0.3s ease-in-out;
    white-space: nowrap; /* Prevent text wrapping */
}

.service-item:hover .whatsapp-btn {
    bottom: 20px; /* Slide in on hover */
}

.service-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Keyframe animation for sliding */
@keyframes slideServices {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%); /* Slide to the left */
    }
}

/* Pause animation on hover */
.services-slider-container:hover .services-slider {
    animation-play-state: paused;
}

.service-item p {
    font-size: 1rem;
    color: #6c757d;
}

/* Gallery Section */
.gallery {
    background: #e9ecef;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-grid img {
    width: 100%;
    height: 220px; /* Slightly increased height */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Contact Section */
.contact {
    background: #f8f9fa;
    text-align: center;
    padding-bottom: 60px; /* Add some padding at the bottom */
}

.contact p {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #495057;
}

.contact p strong {
    color: #007bff;
}

.contact-form {
    max-width: 600px;
    margin: 40px auto 0 auto; /* Adjust top margin as needed */
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: left;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #343a40;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    transition: border-color 0.3s ease;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    border-color: #007bff;
    outline: none;
}

.contact-form textarea {
    resize: vertical; /* Allow vertical resizing */
}

.contact-form .btn {
    width: auto;
    padding: 12px 30px;
    font-size: 1.1rem;
    cursor: pointer;
    border: none;
    display: block; /* Make button full width on small screens */
    margin: 0 auto; /* Center the button */
}

/* About Section */
.about {
    background: #fff;
    padding: 60px 0;
    text-align: center;
}

.about p {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 20px auto;
    color: #555;
}

/* Footer Styles */
footer {
    background: #212529;
    color: #adb5bd;
    text-align: center;
    padding: 25px 0;
    margin-top: 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: row; /* Keep logo and hamburger on one line */
        justify-content: space-between;
        align-items: center;
    }

    header nav .nav-links {
        display: none; /* Hide regular nav links by default */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 80px; /* Adjust based on header height */
        left: 0;
        background: #212529; /* Same as header background */
        padding: 20px 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        transition: all 0.3s ease-in-out;
    }

    header nav .nav-links.active {
        display: flex; /* Show when active */
    }

    header nav .nav-links li {
        margin: 10px 0;
        text-align: center;
    }

    .hamburger-menu {
        display: block; /* Show hamburger icon */
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    section h2 {
        font-size: 2rem;
    }

    .service-item, .gallery-grid img {
        padding: 20px;
    }

    .contact-form {
        margin: 20px auto 0 auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    header .logo {
        height: 50px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    section {
        padding: 40px 0;
    }

    section h2 {
        font-size: 1.8rem;
    }

    .service-list, .gallery-grid {
        grid-template-columns: 1fr;
    }
}
