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

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #ffffff;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Styles */
.header {
    background-color: #fff;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.logo img {
    max-height: 60px;
    transition: all 0.3s ease;
}

.nav .nav-list {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav .nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav .nav-link:hover {
    color: #28a745; /* Changed from #007BFF to #28a745 */
}

.emergency-btn {
    background-color: #28a745; /* Changed from #007BFF to #28a745 */
    color: #fff !important;
    padding: 8px 15px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.emergency-btn:hover {
    background-color: #218838; /* Changed from #0056b3 to #218838 */
}

.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

.nav.nav-active {
    display: block;
    width: 100%;
}

@media (max-width: 768px) {
    .nav {
        display: none;
        width: 100%;
    }

    .nav.nav-active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
    }

    .nav-list li {
        width: 100%;
        text-align: left;
        padding: 10px 0;
        border-bottom: 1px solid #ddd;
    }

    .mobile-menu-toggle {
        display: block;
    }
}

/* Hero Section */
.hero {
    position: relative;
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    color: #fff;
    text-align: center;
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.hero-container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
    color: #fff;
}

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 20px;
    color: #ddd;
}

.hero-call-to-action {
    font-size: 20px;
    margin-bottom: 10px;
}

.hero-description {
    font-size: 16px;
    margin-bottom: 30px;
    color: #ddd;
}

.btn-primary {
    background-color: #28a745; /* Changed from #007BFF to #28a745 */
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 18px;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-primary:hover {
    background-color: #218838; /* Changed from #0056b3 to #218838 */
    transform: translateY(-2px);
}

.services-cta {
    margin-top: 30px;
}

/* About Rancho Cucamonga Section */
.about-rancho {
    padding: 60px 0;
    background-color: #f1f1f1;
}

.about-rancho-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.about-rancho-image {
    flex: 1;
    min-width: 300px;
}

.about-rancho-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.about-rancho-text {
    flex: 1;
    min-width: 300px;
}

.about-rancho-text .section-title {
    font-size: 32px;
    color: #28a745; /* Changed from #007BFF to #28a745 */
    margin-bottom: 20px;
}

.about-rancho-text p {
    margin-bottom: 15px;
    font-size: 16px;
}

/* About Section */
.about {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.about-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

/* Alternating Image and Text */
.about-container.reverse {
    flex-direction: row-reverse;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.section-title {
    font-size: 32px;
    color: #28a745; /* Changed from #007BFF to #28a745 */
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 15px;
}

.about-image-container {
    text-align: center;
    margin: 20px 0;
}

.about-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.about-side-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Electrical Services Section */
.services {
    padding: 60px 0;
    background-color: #fff;
}

.services-container {
    text-align: center;
}

.services-container .section-title {
    margin-bottom: 10px;
    color: #28a745; /* Changed from #007BFF to #28a745 */
}

.services-container .section-subtitle {
    margin-bottom: 40px;
    color: #555;
}

.service-items {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.service-item {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.service-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.service-title {
    color: #28a745; /* Changed from #007BFF to #28a745 */
    margin: 15px 0 10px 0;
    font-size: 22px;
}

.services-cta {
    margin-top: 30px;
}

/* Testimonials Section */
.testimonials {
    padding: 60px 0;
    background-color: #f9f9f9;
    text-align: center;
}

.testimonials-container .section-title {
    margin-bottom: 10px;
    color: #28a745; /* Changed from #007BFF to #28a745 */
}

.testimonials-container .testimonial-summary {
    margin-bottom: 30px;
    color: #555;
}

.testimonial-list {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.testimonial-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    width: 300px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 15px;
    color: #555;
}

.testimonial-card h4 {
    color: #28a745; /* Changed from #007BFF to #28a745 */
    margin-bottom: 5px;
    font-size: 18px;
}

/* Why Choose Us Section */
.why-choose-us {
    padding: 60px 0;
    background-color: #fff;
}

.why-choose-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.service-box {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.service-box-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 15px;
}

.service-box-title {
    color: #28a745; /* Changed from #007BFF to #28a745 */
    margin-bottom: 10px;
    font-size: 20px;
}

.service-box-subtitle {
    font-size: 18px;
    margin-bottom: 10px;
    color: #555;
}

.services-list {
    list-style: disc;
    padding-left: 20px;
    text-align: left;
    margin-bottom: 20px;
    color: #555;
}

.services-list li {
    margin-bottom: 10px;
    font-size: 16px;
}

/* Emergency Services Section */
.emergency-services {
    padding: 60px 0;
    background-color: #fff;
}

.emergency-banner {
    background-color: #dc3545;
    color: #fff;
    text-align: center;
    padding: 30px 0;
    font-size: 28px;
    font-weight: bold;
}

.emergency-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.emergency-img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.emergency-text {
    flex: 1;
    min-width: 300px;
}

.emergency-phone {
    font-size: 50px;
    font-weight: bold;
    color: #28a745; /* Changed from #007BFF to #28a745 */
    text-align: center;
    margin-bottom: 20px;
}

.emergency-title {
    color: #28a745; /* Changed from #007BFF to #28a745 */
    font-size: 28px;
    text-align: center;
    margin-bottom: 20px;
}

.emergency-text p {
    margin-bottom: 15px;
    font-size: 16px;
    color: #555;
}

.emergency-cta {
    display: block;
    margin-top: 20px;
    text-align: center;
}

/* Unique Services Section */
.unique-services {
    padding: 60px 0;
    background-color: #f1f1f1;
}

.unique-services-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.unique-services-content {
    flex: 1;
    min-width: 300px;
}

.unique-services-content .section-title {
    color: #28a745; /* Changed from #007BFF to #28a745 */
    margin-bottom: 20px;
    font-size: 32px;
}

.unique-services-content .section-description {
    margin-bottom: 20px;
    font-size: 18px;
    color: #555;
}

.unique-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.unique-services-content .services-list {
    list-style: disc;
    padding-left: 20px;
    text-align: left;
    margin-bottom: 20px;
    color: #555;
}

.unique-cta {
    margin-top: 20px;
    display: inline-block;
}

/* Contact Section */
.contact {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.contact-banner {
    background-color: #dc3545;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 24px;
    font-weight: bold;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    justify-content: center;
}

.contact-img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-title {
    color: #28a745; /* Changed from #007BFF to #28a745 */
    font-size: 28px;
    margin-bottom: 20px;
}

.contact-description {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.contact-phone {
    font-size: 22px;
    font-weight: bold;
    color: #28a745; /* Changed from #007BFF to #28a745 */
    margin-bottom: 20px;
}

.contact-phone a {
    color: #28a745; /* Changed from #007BFF to #28a745 */
    text-decoration: none;
}

.contact-cta {
    display: inline-block;
}

/* Updated Footer Styles */
.footer {
    background-color: #222; /* Uniform dark background */
    color: #fff;
    padding: 60px 0 30px 0;
    font-family: 'Roboto', sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    background-color: #222; /* Ensure same background */
}

.footer-section {
    flex: 1;
    min-width: 250px;
    background-color: #222; /* Ensure same background */
}

.footer-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: #28a745; /* Changed from #007BFF to #28a745 */
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background-color: #28a745; /* Changed from #007BFF to #28a745 */
    bottom: 0;
    left: 0;
}

.footer-description {
    font-size: 16px;
    line-height: 1.6;
    color: #ccc;
}

.footer-socials {
    margin-top: 20px;
}

.footer-socials a {
    display: inline-block;
    margin-right: 15px;
    color: #ccc;
    font-size: 18px;
    transition: color 0.3s ease;
}

.footer-socials a:hover {
    color: #28a745; /* Changed from #007BFF to #28a745 */
}

.quick-links ul.footer-links {
    list-style: none;
    padding: 0;
}

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

.quick-links ul.footer-links li a.footer-link {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.quick-links ul.footer-links li a.footer-link:hover {
    color: #28a745; /* Changed from #007BFF to #28a745 */
}

.contact-info ul.contact-details {
    list-style: none;
    padding: 0;
}

.contact-info ul.contact-details li {
    margin-bottom: 15px;
    font-size: 16px;
    color: #ccc;
    display: flex;
    align-items: center;
}

.contact-info ul.contact-details li i {
    margin-right: 10px;
    color: #28a745; /* Changed from #007BFF to #28a745 */
}

.footer-phone, .footer-email {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-phone:hover, .footer-email:hover {
    color: #28a745; /* Changed from #007BFF to #28a745 */
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    background-color: #222; /* Ensure same background */
}

.footer-info-text {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 10px;
}

.footer-credit {
    font-size: 14px;
    color: #aaa;
}

.footer-credit a {
    color: #28a745; /* Changed from #007BFF to #28a745 */
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-credit a:hover {
    text-decoration: underline;
    color: #218838; /* Changed from #0056b3 to #218838 */
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: #28a745; /* Changed from #007BFF to #28a745 */
    color: #fff;
    border: none;
    padding: 12px 15px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: none;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

#back-to-top:hover {
    background-color: #218838; /* Changed from #0056b3 to #218838 */
}

/* Alerts */
.alert {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    font-size: 16px;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-section {
        max-width: 400px;
    }

    .footer-socials a {
        margin-right: 10px;
    }

    .contact-info ul.contact-details li {
        justify-content: center;
    }
}

/* Additional Styles for Modern Design */

/* Hover Effects for Service Boxes */
.service-box:hover, .service-item:hover, .testimonial-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Smooth Transitions */
a, .btn-primary, .footer-socials a, .footer-nav-link, .footer-phone, .footer-email, .contact-cta {
    transition: all 0.3s ease;
}

/* Typography Enhancements */
h1, h2, h3, h4 {
    font-weight: 700;
}

h1 {
    font-size: 36px;
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 22px;
}

h4 {
    font-size: 18px;
}

/* Button Enhancements */
.btn-primary {
    background-color: #28a745; /* Changed from #007BFF to #28a745 */
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 18px;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-primary:hover {
    background-color: #218838; /* Changed from #0056b3 to #218838 */
    transform: translateY(-2px);
}

/* Link Styles */
a {
    color: #28a745; /* Changed from #007BFF to #28a745 */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Image Responsiveness */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.pb-20 {
    padding-bottom: 20px;
}

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}
