:root {
    --primary-color: #007bff; /* Modern Blue */
    --secondary-color: #6c757d; /* Grey */
    --background-color: #f8f9fa; /* Light background */
    --text-color: #343a40; /* Dark text */
    --light-text-color: #ffffff;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --header-height: 60px;
    --padding-base: 20px;
}

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

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

/* Header & Navigation */
header {
    background-color: #2c3e50;
    color: var(--light-text-color);
    padding: 0 var(--padding-base);
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo a {
    color: var(--light-text-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.header-logo {
    height: 36px;
    width: auto;
    margin-right: 10px;
}

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

nav ul li a {
    color: var(--light-text-color);
    text-decoration: none;
    padding: 10px 5px;
    transition: color 0.3s, border-bottom 0.3s;
}

nav ul li a:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

nav ul li a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Main Content Layout */
main {
    padding: var(--padding-base);
    max-width: 1200px;
    margin: 0 auto;
}

.page-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 10px;
}

/* Home Page Specifics */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(hero_background.png) no-repeat center center/cover;
    color: var(--light-text-color);
    padding: 60px var(--padding-base);
    margin-bottom: 40px;
    border-radius: 8px;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

/* Services Page Specifics */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    object-fit: contain;
}

.service-card {
    background-color: transparent;
    border-radius: 8px;
    position: relative;
    perspective: 1000px; /* 3D context */
    min-height: 250px;
    cursor: pointer;
}

.service-card:hover {
    /* Remove default hover animation */
    transform: none;
    box-shadow: none;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.service-card.flipped .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front, .service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    top: 0;
    left: 0;
}

.service-card-front {
    background-color: white;
    color: var(--text-color);
}

.service-card-back {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    transform: rotateY(180deg);
}

.service-card-back p.price {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0 20px 0;
    line-height: 1;
}

/* Service Card Selection Styling */
.service-card.selected-service .service-card-inner {
    border: 3px solid #28a745; /* Green border */
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.4);
}
.service-card.selected-service .service-card-front {
    border: 3px solid #28a745; 
}
.service-card.selected-service .service-card-back {
    background-color: #28a745; /* Green background when selected and flipped */
}
.service-card.selected-service .service-card-back h3 {
    color: var(--light-text-color);
}


.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Contact Page Specifics */
.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}

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

.contact-form button {
    width: 100%;
    border: none;
    cursor: pointer;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background-color: var(--text-color);
    color: var(--light-text-color);
    font-size: 0.9rem;
}

/* MODAL STYLES */
.modal {
    display: none; /* Hidden by default */
    position: fixed; 
    z-index: 2000; /* Above header */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 30px;
    border-radius: 10px;
    width: 90%; 
    max-width: 650px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeIn 0.3s;
}

/* Modal specific list styling for selected services */
.selected-services-list {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 5px;
    background-color: #fcfcfc;
}
.selected-services-list h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
}
.selected-services-list ul {
    list-style-type: disc;
    margin-left: 15px;
    font-size: 0.95rem;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}


.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-color);
    text-decoration: none;
}

#modalServiceName {
    color: var(--primary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.modal-content input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Custom Checkbox Group Styling */
.checkbox-group.days-of-week {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.checkbox-group input[type="checkbox"] {
    /* Hide default checkbox */
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-group label {
    cursor: pointer;
    background-color: #eee;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    font-weight: normal;
    text-align: center;
    /* Ensure sufficient touch target size for mobile */
    min-height: 44px; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-group input[type="checkbox"]:checked + label {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Time Range Slider */
input[type=range] {
    width: 100%;
    margin: 10px 0;
}
.time-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--secondary-color);
}

/* Global Schedule Button Styling */
#globalScheduleBtn {
    margin-left: 15px; /* Add separation from 'Get a Quote' */
    background-color: var(--secondary-color);
    cursor: not-allowed;
    border: none;
}

#globalScheduleBtn.active-schedule {
    background-color: #28a745; /* A nice green */
    cursor: pointer;
}
#globalScheduleBtn.active-schedule:hover {
    background-color: #1e7e34;
}


/* TOAST NOTIFICATION STYLES */
#toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none; /* Allows clicks to pass through */
}

.toast {
    background-color: #333;
    color: var(--light-text-color);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    transform: translateY(100%);
    max-width: 90vw;
    text-align: center;
    font-size: 1rem;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo a {
        font-size: 1.2rem;
    }

    nav ul {
        gap: 10px;
    }

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

    .page-title {
        font-size: 2rem;
    }
    
    main {
        padding: var(--padding-base) 10px;
    }
}