/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

:root {
    --primary-color: #002855;  /* Dark blue */
    --accent-color: #FFD700;   /* Gold - matches the logo color in the PDF */
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

/* Header styles */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

/* Default Sparky image size on larger screens */
.logo img {
    height: 50px;
    margin-right: 10px;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Dropdown menu styles */
.nav-links li.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background-color: var(--primary-color);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    border-radius: 0 0 4px 4px;
    display: none;
    z-index: 100;
    padding: 0.5rem 0;
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
    width: 100%;
}

.dropdown-menu a {
    padding: 0.5rem 1rem;
    display: block;
    font-size: 0.9rem;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background-color: rgba(255,255,255,0.1);
}

.nav-links li.has-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-toggle::after {
    content: "▼";
    font-size: 0.7rem;
    margin-left: 0.3rem;
    vertical-align: middle;
}

/* Mobile menu styles */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('/api/placeholder/1200/600') center/cover no-repeat;
    color: white;
    text-align: center;
    padding: 5rem 0;
    margin-top: -20px;
}

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

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 0.8rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

/* Services section */
.services {
    padding: 5rem 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

.service-card {
    background-color: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-img {
    height: 200px;
    background-color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-content {
    padding: 1.5rem;
}

.service-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Detailed Services Styling */
.detailed-services {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.detailed-services-title {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.detailed-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.detailed-service-item {
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.detailed-service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    border-radius: 50%;
}

.detailed-service-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.detailed-service-item p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
}

/* About section */
.about {
    padding: 5rem 0;
    background-color: #f8f8f8;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.about-img {
    height: 400px;
    background-color: #ddd;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* FAQ section */
.faq {
    padding: 5rem 0;
    background-color: white;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Testimonials section with slider */
.testimonials {
    padding: 5rem 0;
    background-color: #f8f8f8;
}

.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease;
}

.testimonial-slide {
    min-width: 100%;
    box-sizing: border-box;
    padding: 0 1rem;
}

.testimonial-card {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: #555;
    font-size: 1.1rem;
    line-height: 1.6;
}

.testimonial-content h4 {
    color: var(--primary-color);
    font-size: 1rem;
}

.slider-nav {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.slider-dot.active {
    background-color: var(--primary-color);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.slider-btn:hover {
    opacity: 1;
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}

/* Service Areas styling */
.service-areas {
    padding: 5rem 0;
    background-color: white;
}

.service-areas-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.areas-list h3, 
.service-map h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.towns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.town-item {
    background-color: white;
    border-radius: 8px;
    padding: 1.2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.town-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.town-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.town-item p {
    font-size: 0.9rem;
    color: #555;
}

.map-container {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.map-container iframe {
    width: 100%;
    height: 400px;
    display: block;
}

.map-caption {
    font-size: 0.9rem;
    color: #555;
    margin-top: 0.8rem;
}

.areas-cta {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 2rem;
}

.areas-cta p {
    margin-bottom: 1rem;
}

.areas-cta .btn {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

/* Contact section */
.contact {
    padding: 5rem 0;
    background-color: #f8f8f8;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-details p {
    margin-bottom: 0.5rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.form-submit {
    text-align: center;
}

/* Loyalty Program section */
.loyalty-program {
    padding: 5rem 0;
    background-color: white;
}

.loyalty-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.loyalty-feature {
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.loyalty-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.loyalty-feature h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.loyalty-feature p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
}

.satisfaction-guarantee {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 3rem;
}

.satisfaction-guarantee h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.satisfaction-guarantee p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Make images responsive */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.service-img {
    height: auto;
    min-height: 200px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

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

.about-img {
    height: auto;
    min-height: 300px;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Responsive adjustments for landscape mode */
@media screen and (orientation: landscape) and (max-width: 900px) {
    .service-img {
        height: 180px;
    }
    
    .about-img {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .service-card {
        max-width: 100%;
    }
    
    .service-img {
        height: 200px;
    }
}

@media screen and (orientation: landscape) and (max-width: 767px) {
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .about-img {
        order: 0;
    }
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-bottom: 1rem;
}

.social-links li {
    margin: 0 0.8rem;
}

.social-links a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: scale(1.1);
}

.social-links img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.copyright {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

/* Modal styles with improved z-index and mobile handling */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

/* SMS Details and Privacy policy modals should appear above other modals */
.sms-details-modal, 
.policy-modal {
    z-index: 200; /* Higher z-index to appear above other modals */
}

.modal-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

/* Ensure modal content for SMS and Privacy appears above other modal content */
.sms-modal-content,
.policy-modal-content {
    position: relative;
    z-index: 210; /* Even higher z-index for the content */
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    z-index: 220; /* Ensure close button is above everything */
}

.close-modal:hover {
    color: #333;
    background-color: #f0f0f0;
}

.modal-form .form-group {
    margin-bottom: 1.5rem;
}

.modal-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    font-size: 1.1rem;
}

.modal-form input,
.modal-form textarea,
.modal-form select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #f9f9f9;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 40, 85, 0.1);
    background-color: #fff;
}

.modal-form textarea {
    min-height: 100px;
    resize: vertical;
}

.modal-form-submit {
    text-align: center;
    margin-top: 2rem;
}

.modal-form-submit .btn {
    padding: 0.8rem 3rem;
    font-size: 1.1rem;
    background-color: var(--accent-color);
    width: 100%;
    transition: all 0.3s;
}

/* Mobile-specific fixes */
@media (max-width: 768px) {
    /* Force modals to be visible and active on mobile */
    .sms-details-modal, 
    .policy-modal {
        /* Higher z-index on mobile */
        z-index: 300;
    }
    
    .sms-modal-content,
    .policy-modal-content {
        z-index: 310;
        /* Ensure modal is sized appropriately for mobile */
        width: 90%;
        max-width: 90%;
        padding: 1.5rem;
    }
    
    /* Improve touch targets on mobile */
    .details-link, 
    .privacy-policy-link {
        padding: 6px 2px; /* Larger touch target */
        display: inline-block;
    }
    
    /* Make close buttons more accessible on mobile */
    .close-modal {
        top: 0.75rem;
        right: 0.75rem;
        width: 35px;
        height: 35px;
        font-size: 1.75rem;
        z-index: 320; /* Ensure close button is above everything */
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    .sms-modal-content,
    .policy-modal-content {
        width: 95%;
        padding: 1.25rem;
    }
    
    /* Ensure the SMS details modal doesn't have excessive height */
    .sms-modal-content {
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* Ensure modals can be closed on mobile */
.sms-details-modal.active, 
.policy-modal.active {
    display: flex !important;
}

/* Improved styling for details and privacy links */
.details-link,
.privacy-policy-link {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    position: relative;
    z-index: 10;
    transition: opacity 0.2s;
}

.details-link:hover,
.privacy-policy-link:hover {
    opacity: 0.8;
}

/* Responsive form styling */
@media (max-width: 480px) {
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .modal-content h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .contact-form input,
    .contact-form textarea,
    .contact-form select,
    .modal-form input,
    .modal-form textarea,
    .modal-form select {
        padding: 0.7rem;
    }
    
    .contact-content {
        gap: 1.5rem;
    }
}

@media (max-width: 320px) {
    .modal-content {
        padding: 0.8rem;
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 0.8rem;
    }
    
    .contact-form label,
    .modal-form label {
        margin-bottom: 0.3rem;
        font-size: 0.9rem;
    }
    
    .contact-form input,
    .contact-form textarea,
    .contact-form select,
    .modal-form input,
    .modal-form textarea,
    .modal-form select {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .modal {
        align-items: flex-start;
        padding-top: 10px;
    }
    
    .modal-content {
        padding: 1.5rem 1rem;
        width: 92%;
        margin-top: 1rem;
    }
    
    .modal-content h2 {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }
    
    .close-modal {
        top: 0.7rem;
        right: 0.7rem;
    }
    
    .modal-form .form-group {
        margin-bottom: 0.8rem;
    }
    
    .modal-form label {
        margin-bottom: 0.3rem;
    }
    
    .modal-form-submit {
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-links {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-links li {
        margin: 0.5rem;
    }
    
    /* Mobile dropdown menu */
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        padding-left: 1rem;
        background-color: rgba(0,0,0,0.1);
        border-radius: 4px;
        margin-top: 0.5rem;
        width: 100%;
    }
    
    .dropdown-menu li {
        width: 100%;
        text-align: center;
        margin: 0;
    }
    
    .dropdown-menu a {
        padding: 0.5rem;
    }
    
    .nav-links li.has-dropdown {
        width: 100%;
    }
    
    .nav-links li.has-dropdown.show .dropdown-menu {
        display: block;
    }
    
    .about-content,
    .contact-content,
    .service-areas-content {
        grid-template-columns: 1fr;
    }
    
    .about-img {
        order: -1;
    }
    
    .slider-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    .detailed-services-grid {
        grid-template-columns: 1fr;
    }
    
    .towns-grid {
        grid-template-columns: 1fr;
    }
    
    .loyalty-features {
        grid-template-columns: 1fr;
    }
}

/* Mobile hamburger menu + extra fixes for the Sparky image */
@media (max-width: 576px) {
    .mobile-menu-btn {
        display: block;
        position: absolute;
        right: 2rem; /* increased from 1.5rem to create more space */
        top: 0.8rem; /* moved up to align with the baseline of the title */
    }
    
    /* Shrink the Sparky image and logo text on small screens */
    .logo img {
        height: 35px;
        margin-right: 8px;
    }
    
    .logo {
        font-size: 1.3rem; /* reduced slightly from 1.4rem */
        margin-bottom: 0.5rem;
        max-width: 75%; /* limit width to prevent overlap with hamburger */
    }
    
    .header-content {
        align-items: flex-start;
        padding-top: 0.5rem;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        text-align: center;
        margin-top: 1rem;
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .nav-links li {
        margin: 0.5rem 0;
    }
}

/* Extra small device adjustment */
@media (max-width: 375px) {
    .mobile-menu-btn {
        right: 1rem; /* pull in slightly on very small screens */
    }
    
    .logo {
        font-size: 1.1rem; /* even smaller font on very small screens */
        max-width: 72%;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 1.6rem;
    }
}

.hero-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.alternating-bg {
    background-color: #f8f8f8;
}

/* Social media icons styling */
.social-icon {
    font-style: normal;
    font-weight: bold;
    font-size: 1.2rem;
}

.emergency-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 99;
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    gap: 10px;
}

.emergency-badge:hover {
    animation: none;
    transform: scale(1.05);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Monthly special popup styling */
.special-modal-content {
    background: linear-gradient(to bottom, #fff, #f5f5f5);
    border-top: 5px solid var(--accent-color);
    max-width: 500px;
    padding: 0;
    overflow: hidden;
}

.special-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.special-header h2 {
    margin: 0;
    color: var(--accent-color);
    font-size: 1.8rem;
}

.special-date {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.special-body {
    padding: 2rem;
    text-align: center;
}

.special-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.special-body h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.special-body p {
    margin-bottom: 2rem;
    color: #555;
    line-height: 1.5;
}

.special-cta .btn {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    width: 100%;
    background-color: var(--accent-color);
    transition: all 0.3s;
}

.special-cta .btn:hover {
    background-color: #e6c200;
    transform: translateY(-2px);
}

/* Animation for the popup */
@keyframes specialPopupFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.special-modal-content {
    animation: specialPopupFadeIn 0.5s ease forwards;
}

/* Utility classes */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* SMS Opt-in styling - Improved */
.sms-opt-in {
    margin: 1rem 0;
  }
  
  .inline-checkbox-container {
    display: inline;
    cursor: pointer;
    font-weight: normal;
  }
  
  .inline-checkbox-container input[type="checkbox"] {
    margin: 0 5px;
    vertical-align: middle;
    position: relative;
    top: -1px;
    cursor: pointer;
  }
  
  .disclaimer-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #555;
  }
  
  .disclaimer-links {
    white-space: nowrap;
    display: inline-block;
  }
  
  .details-link,
  .privacy-policy-link {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
  }
  
  /* Specific styling for the SMS details modal */
  .sms-modal-content {
    max-width: 600px;
    padding: 1.5rem;
  }
  
  .sms-modal-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
  }
  
  .sms-modal-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
  }
  
  @media (max-width: 576px) {
    .disclaimer-text {
      font-size: 0.8rem;
    }
    
    .sms-modal-content {
      max-width: 95%;
      padding: 1rem;
    }
    
    .sms-modal-content h3 {
      font-size: 1.1rem;
    }
    
    .sms-modal-content p {
      font-size: 0.85rem;
    }
  }

/* Privacy Policy and Opt-In Modals */
.policy-modal {
    display: none;
    position: fixed;
    z-index: 200;  /* Higher than other modals */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
}

.policy-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.policy-modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.policy-modal-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.policy-modal-content ul {
    margin: 0 0 1rem 1.5rem;
}

.policy-modal-content li {
    margin-bottom: 0.5rem;
}

/* Compact version for quote form */
.compact-opt-in {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.compact-opt-in input[type="checkbox"] {
    margin: 0 4px 0 0;
}

.inline-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.inline-links a {
    color: var(--primary-color);
    text-decoration: underline;
}

.inline-links span {
    color: #666;
}

@media (max-width: 576px) {
    .policy-modal-content {
        padding: 1.5rem;
        width: 95%;
        margin-top: 1rem;
    }
    
    .opt-in-text {
        font-size: 0.8rem;
    }
    
    .compact-opt-in {
        font-size: 0.75rem;
    }
    
    #sms-details-text,
    #modal-sms-details-text {
        font-size: 0.75rem;
        margin-left: 1.2rem;
    }
}
/* Modal fixes - simplified version */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

/* SMS Details and Privacy policy modals should appear above other modals */
.sms-details-modal, 
.policy-modal {
    z-index: 200;
}

.modal-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.sms-modal-content,
.policy-modal-content {
    position: relative;
    z-index: 210;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    z-index: 220;
}

.close-modal:hover {
    color: #333;
    background-color: #f0f0f0;
}

/* Ensure touch targets are large enough for mobile */
@media (max-width: 768px) {
    .details-link, 
    .privacy-policy-link {
        padding: 8px 4px;
        display: inline-block;
        margin: 0 2px;
    }
    
    .close-modal {
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
    }
}

<!-- Towns We Serve Section -->
<section class="towns-section" id="service-area">
    <div class="container">
        <div>
            <h3>Towns We Proudly Serve</h3>
            <p>Cavanagh Electric provides professional electrical services to residential and commercial customers in the following towns and surrounding areas:</p>
            
            <div class="towns-grid">
                <div class="town-item">
                    <h4>Commack</h4>
                    <p>Comprehensive electrical services including panel upgrades, generator installation, and EV charger installation.</p>
                </div>
                
                <div class="town-item">
                    <h4>East Northport</h4>
                    <p>Home base for our licensed electricians, serving both residential and commercial needs with whole-home generator solutions.</p>
                </div>
                
                <div class="town-item">
                    <h4>Huntington</h4>
                    <p>Providing electrical troubleshooting, repairs, backup power systems, and lighting installation services.</p>
                </div>
                
                <div class="town-item">
                    <h4>Smithtown</h4>
                    <p>Full-service electrical contractor for homes and businesses, including generator installation and maintenance.</p>
                </div>
                
                <div class="town-item">
                    <h4>Dix Hills</h4>
                    <p>Specialized electrical services including pool & spa wiring, generator installation, and safety inspections.</p>
                </div>
                
                <div class="town-item">
                    <h4>Hauppauge</h4>
                    <p>Commercial and residential electrical services including backup power solutions for the Hauppauge community.</p>
                </div>
                
                <div class="town-item">
                    <h4>Northport</h4>
                    <p>Expert electrical installation for new construction, renovation projects, and whole-home generator systems.</p>
                </div>
                
                <div class="town-item">
                    <h4>Deer Park</h4>
                    <p>Professional electrical solutions including outlet installation, panel upgrades, and backup generator installation.</p>
                </div>
                
                <div class="town-item">
                    <h4>Melville</h4>
                    <p>Commercial electrical services, emergency power systems, and lighting upgrades for Melville businesses.</p>
                </div>
                
                <div class="town-item">
                    <h4>Bay Shore</h4>
                    <p>Reliable electrical contractor serving Bay Shore with comprehensive electrical services and backup power solutions.</p>
                </div>
            </div>
            
            <h3 class="additional-towns-title">Additional Service Areas</h3>
            <p>Our service area extends throughout Suffolk County to provide generator installation and electrical services to these communities:</p>
            
            <div class="additional-towns">
                <div class="towns-columns">
                    <ul>
                        <li>Elwood</li>
                        <li>Greenlawn</li>
                        <li>Centerport</li>
                        <li>Fort Salonga</li>
                        <li>Lloyd Harbor</li>
                        <li>St. James</li>
                        <li>Asharoken</li>
                        <li>Kings Park</li>
                        <li>Eatons Neck</li>
                        <li>Nissequogue</li>
                        <li>Stony Brook</li>
                        <li>Cold Spring Harbor</li>
                        <li>Huntington Station</li>
                        <li>Huntington Bay</li>
                    </ul>
                </div>
            </div>
            
            <div class="areas-cta">
                <p>Don't see your town listed? We likely serve your area too! Contact us today to confirm service availability for generator installation and other electrical services.</p>
                <a href="#contact" class="btn">Contact Us Today</a>
            </div>
        </div>
    </div>
</section>


/* Additional CSS for the expanded towns section */
.additional-towns-title {
    margin-top: 40px;
    text-align: center;
}

.additional-towns {
    margin: 20px 0 40px;
}

.towns-columns {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.towns-columns .column {
    flex: 1;
    min-width: 180px;
}

.towns-columns ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.towns-columns ul li {
    background-color: #f8f8f8;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 10px;
    text-align: center;
}

.towns-columns ul li:hover {
    background-color: #e9f7fe;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

@media screen and (max-width: 768px) {
    .towns-columns {
        justify-content: flex-start;
    }
    
    .towns-columns .column {
        flex-basis: calc(50% - 10px);
    }
}

@media screen and (max-width: 480px) {
    .towns-columns .column {
        flex-basis: 100%;
    }
}