/* General Styling */
:root {
    --royal-blue: #4169E1; /* A common, vibrant royal blue */
    --gold-yellow: #FDC500;
    --dark-blue: #0A1128; /* For darker text/backgrounds */
    --light-gray: #f4f4f4;
    --text-color: #333;
    --white: #fff;
    --border-radius: 5px;
    --transition-speed: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--royal-blue);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--gold-yellow);
}

ul {
    list-style: none;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 15px;
    color: var(--dark-blue);
}

h1 {
    font-size: 2.8em;
    line-height: 1.2;
}

h2 {
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 40px;
}

h3 {
    font-size: 1.6em;
}

.btn {
    display: inline-block;
    background-color: var(--gold-yellow);
    color: var(--dark-blue);
    padding: 12px 25px;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    font-weight: bold;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--royal-blue);
    color: var(--white);
}

section {
    padding: 80px 0;
}

/* Header */
header {
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: var(--white);
    font-size: 2em;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
}

.logo a:hover {
    color: var(--gold-yellow);
}

nav .nav-links {
    display: flex;
    gap: 30px;
}

nav .nav-links a {
    color: var(--white);
    font-weight: bold;
    font-size: 1.1em;
    padding: 5px 0;
    position: relative;
}

nav .nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background-color: var(--gold-yellow);
    transition: width var(--transition-speed);
}

nav .nav-links a:hover::after,
nav .nav-links a.active::after {
    width: 100%;
}

/* Hamburger Menu (Mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger .bar {
    width: 100%;
    height: 3px;
    background-color: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    /* 1. Add a relevant placeholder image (for demonstration) */
    background-image: url('https://rvelectricmt.com/img/LED_SOFFITT.jpg'); 
    
    /* 2. Key properties for a full-screen hero image */
    background-size: cover; /* Ensures the image covers the entire section */
    background-position: center; /* Centers the image */
    background-repeat: no-repeat; /* Prevents image tiling */
    
    /* 3. Add an overlay to help text readability */
    /* This creates a dark, semi-transparent layer over the image */
    background-color: rgba(0, 0, 0, 0.5); 
    background-blend-mode: overlay;

    /* 4. Set a minimum height for the section to show the image */
    min-height: 400px; /* Adjust this value as needed */

    /* Ensure text color is light for contrast */
    color: white; 
    
    /* Keep existing layout properties */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px 0; /* Add top/bottom padding for mobile */
}

/* Optional: Improve text readability */
.hero h1,
.hero p {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8); /* Adds shadow for better contrast */
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    color: var(--white);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 30px;
}

/* About Section */
.about-section {
    background-color: var(--light-gray);
    text-align: center;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.about-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.about-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.about-item i {
    font-size: 3em;
    color: var(--royal-blue);
    margin-bottom: 20px;
}

.about-item h3 {
    color: var(--royal-blue);
    margin-bottom: 10px;
}

/* Services Section */
.services-section {
    background-color: var(--white);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.service-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.service-card h3 {
    margin: 20px 0 10px;
    color: var(--royal-blue);
}

.service-card p {
    padding: 0 20px 20px;
    color: var(--text-color);
}

/* Testimonials Section */
.testimonials-section {
    background-color: var(--royal-blue);
    color: var(--white);
    text-align: center;
    overflow: hidden; /* For slider overflow */
}

.testimonials-section h2 {
    color: var(--gold-yellow);
}

.testimonial-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%; /* Important for sliding */
}

.testimonial-item {
    flex: 0 0 100%; /* Each item takes full width */
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box; /* Ensures padding is included in width */
}

.testimonial-item p {
    font-size: 1.4em;
    font-style: italic;
    margin-bottom: 20px;
    color: var(--white);
}

.testimonial-item h4 {
    font-size: 1.1em;
    color: var(--gold-yellow);
}

.slider-nav {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.dot {
    height: 12px;
    width: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.dot.active, .dot:hover {
    background-color: var(--gold-yellow);
    transform: scale(1.1);
}


/* Contact Section */
.contact-section {
    background-color: var(--light-gray);
    text-align: center;
}

.contact-section h2 {
    color: var(--dark-blue);
}

.contact-section p {
    font-size: 1.1em;
    margin-bottom: 40px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: left;
}

.contact-info h3, .contact-form h3 {
    color: var(--royal-blue);
    margin-bottom: 20px;
}

.contact-info p {
    font-size: 1.1em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    color: var(--text-color);
}

.contact-info p i {
    color: var(--royal-blue);
    margin-right: 10px;
    font-size: 1.3em;
}

.contact-info p a {
    color: var(--text-color);
}

.contact-info p a:hover {
    color: var(--royal-blue);
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: var(--royal-blue);
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-size: 1.3em;
    margin-right: 10px;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.social-links a:hover {
    background-color: var(--gold-yellow);
    color: var(--dark-blue);
    transform: translateY(-3px);
}

.contact-form {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--dark-blue);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1em;
    font-family: inherit;
    transition: border-color var(--transition-speed);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--royal-blue);
    outline: none;
    box-shadow: 0 0 0 2px rgba(65, 105, 225, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
}

/* Footer */
footer {
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

footer p {
    margin: 0;
}

.footer-links a {
    color: var(--white);
    margin: 0 10px;
}

.footer-links a:hover {
    color: var(--gold-yellow);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2em;
    }

    h2 {
        font-size: 1.8em;
    }

    h3 {
        font-size: 1.4em;
    }

    /* Header */
    header .container {
        flex-wrap: wrap;
    }

    nav {
        order: 1; /* Puts nav below logo on mobile if space is tight */
        width: 100%;
        text-align: center;
        margin-top: 15px;
    }

    .hamburger {
        display: flex;
        position: absolute;
        right: 20px;
        top: 20px;
        z-index: 1010;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        background-color: var(--dark-blue);
        position: absolute;
        top: 65px; /* Adjust based on header height */
        left: 0;
        transform: translateX(-100%);
        transition: transform var(--transition-speed);
        padding: 20px 0;
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li {
        margin: 10px 0;
    }

    .nav-links a {
        display: block;
        padding: 10px 20px;
        text-align: center;
    }

    .nav-links a::after {
        display: none; /* Hide underline on mobile menu items */
    }

    /* Hamburger animation */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }


    /* Hero Section */
    .hero {
        padding: 100px 20px;
        min-height: 60vh;
    }

    .hero-content h1 {
        font-size: 2em;
    }

    .hero-content p {
        font-size: 1em;
    }

    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
    }

    /* Services Section */
    .service-grid {
        grid-template-columns: 1fr;
    }

    /* Testimonials Section */
    .testimonial-item p {
        font-size: 1.2em;
    }

    /* Contact Section */
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 80px 15px;
    }

    .hero-content h1 {
        font-size: 1.8em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    section {
        padding: 60px 0;
    }

    footer .container {
        flex-direction: column;
        gap: 10px;
    }
}