:root {
    --primary-blue: #2c5282;
    --secondary-blue: #4299e1;
    --light-blue: #ebf8ff;
    --dark-gray: #2d3748;
    --light-gray: #e2e8f0;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
    -webkit-tap-highlight-color: transparent;
    /* Remove tap highlight on mobile */
}

html {
    font-size: 16px;
    /* Base font size */
    -webkit-text-size-adjust: 100%;
    /* For older Safari */
    text-size-adjust: 100%;
    /* Modern browsers */
}

body {
    line-height: 1.6;
    color: var(--dark-gray);
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    -webkit-font-smoothing: antialiased;
    /* Smoother text rendering */
    -moz-osx-font-smoothing: grayscale;
}

/* Loading Overlay Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-container {
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 1.2rem;
    color: var(--primary-blue);
    font-weight: bold;
    margin-bottom: 15px;
}

.loading-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(66, 153, 225, 0.5);
}

.loading-percentage {
    font-size: 1rem;
    color: var(--dark-gray);
    font-weight: 600;
}

.navbar {
    background-color: var(--white);
    padding: 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-blue);
}

.nav-contact {
    color: var(--primary-blue);
    font-weight: bold;
    text-decoration: none;
}

.hero {
    background: linear-gradient(rgba(44, 82, 130, 0.9), rgba(44, 82, 130, 0.9)), url('images/1.png');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding-top: 60px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-icon {
    font-size: 1.2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--secondary-blue);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: var(--primary-blue);
}

.section {
    padding: 5rem 2rem;
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-blue);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.transformations {
    background-color: var(--light-blue);
    padding-bottom: 3rem;
}

.before-after-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    contain: content;
}

.transformation-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.transformation-navigation button {
    background: var(--primary-blue);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.transformation-navigation button:hover {
    background: var(--secondary-blue);
}

.transformation-navigation button:disabled {
    background: var(--light-gray);
    cursor: not-allowed;
    opacity: 0.5;
}

.transform-pagination {
    display: flex;
    gap: 0.5rem;
}

.transform-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--light-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.transform-dot:hover {
    background: var(--secondary-blue);
}

.transform-dot.active {
    background: var(--primary-blue);
    transform: scale(1.2);
}

.before-after-slider {
    position: relative;
    width: 100%;
    height: 500px;
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.slider-before,
.slider-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slider-before img,
.slider-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--white);
    cursor: ew-resize;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.slider-handle::after {
    content: '↔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-blue);
    font-size: 20px;
}

.slider-label {
    position: absolute;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 3px;
    font-size: 0.9rem;
}

.label-before {
    left: 10px;
    top: 10px;
}

.label-after {
    right: 10px;
    top: 10px;
}

.gallery {
    background-color: var(--light-gray);
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.gallery-grid {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.gallery-item {
    flex: 0 0 33.333%;
    padding: 0.5rem;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.gallery-item video {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.05);
}

/* Video play icon overlay */
.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.gallery-item {
    position: relative;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-blue);
    color: white;
    padding: 1rem;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.gallery-nav:hover {
    opacity: 1;
}

.gallery-prev {
    left: 1rem;
}

.gallery-next {
    right: 1rem;
}

.gallery-pagination {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 0.5rem;
}

.page-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--dark-gray);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid var(--primary-blue);
}

.page-dot:hover {
    transform: scale(1.2);
}

.page-dot.active {
    background: var(--primary-blue);
    transform: scale(1.2);
}

.commitment-section {
    background: linear-gradient(to right, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
}

.commitment-section .section-title,
.commitment-section .service-card {
    color: var(--white);
}

.commitment-section .service-card {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
    will-change: opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    touch-action: pan-x;
    /* Enable horizontal swipe */
}

.lightbox-main {
    position: relative;
    width: 70%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.lightbox video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#lightboxImage,
#lightboxVideo {
    display: none;
}

#lightboxImage.active,
#lightboxVideo.active {
    display: block;
}

.lightbox-preview {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 15%;
    opacity: 0.5;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
}

.lightbox-preview:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.05);
}

.lightbox-preview.prev {
    left: 0;
}

.lightbox-preview.next {
    right: 0;
}

.lightbox-preview img {
    width: 100%;
    height: auto;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.lightbox-preview:hover img {
    border-color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .lightbox-main {
        width: 100%;
        padding: 20px;
    }

    .lightbox-preview {
        display: none;
    }

    .lightbox-nav {
        opacity: 0.7;
    }

    .lightbox img {
        max-height: 80vh;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        font-size: 28px;
        background: rgba(0, 0, 0, 0.8);
        width: 56px;
        height: 56px;
        padding: 0;
    }

    .lightbox-content {
        touch-action: pan-x pinch-zoom;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    padding: 15px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 1010;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.testimonials-section {
    background: var(--light-blue);
}

.business-info {
    background: var(--light-gray);
}

.info-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
    margin-top: 2rem;
}

.info-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.areas-grid {
    display: grid;
    gap: 1.5rem;
}

.area h4 {
    color: var(--secondary-blue);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.area p {
    color: var(--dark-gray);
    line-height: 1.5;
}

.hours-grid {
    display: grid;
    gap: 1rem;
}

.hours-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light-gray);
}

.day {
    font-weight: bold;
    color: var(--dark-gray);
}

.time {
    color: var(--secondary-blue);
}

.hours-note {
    margin-top: 1rem;
    text-align: center;
    color: var(--primary-blue);
    font-style: italic;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.testimonial-rating {
    color: #FFD700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.testimonial-author {
    color: var(--primary-blue);
    font-weight: bold;
}

.testimonial-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--dark-gray);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--light-gray);
    border-radius: 3px;
}

.form-group textarea {
    height: 150px;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--light-gray);
    border-radius: 3px;
    background-color: var(--white);
    color: var(--dark-gray);
    font-size: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.form-note {
    text-align: center;
    margin-top: 1rem;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.submit-button {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

.submit-button:hover {
    background-color: var(--secondary-blue);
}

footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 2rem;
    text-align: center;
}

footer a {
    color: var(--white);
    text-decoration: none;
}

/* Floating CTA */
.floating-cta {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 900;
}

.floating-cta-button {
    background-color: var(--primary-blue);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    font-weight: bold;
}

.floating-cta-button:hover {
    background-color: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.floating-cta-button.phone {
    background-color: #25D366;
}

.floating-cta-button.phone:hover {
    background-color: #128C7E;
}

@media (max-width: 768px) {

    /* Navbar adjustments */
    .navbar {
        padding: 0.75rem;
    }

    .navbar-content {
        flex-direction: row;
        /* Keep phone number next to logo */
        justify-content: space-between;
        padding: 0 0.5rem;
    }

    .logo {
        font-size: 1.25rem;
        /* Slightly smaller logo text */
    }

    .nav-contact {
        font-size: 1.1rem;
    }

    /* Hero section adjustments */
    .hero {
        min-height: 100vh;
        /* Use min-height instead of height */
        padding-top: 80px;
        /* Increased padding for better spacing */
    }

    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }

    .hero-content {
        padding: 1.5rem;
    }

    /* Section adjustments */
    .section {
        padding: 3rem 1.25rem;
        /* Slightly more horizontal padding */
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    /* Service cards adjustments */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        /* Reduced gap between cards */
    }

    .service-card {
        padding: 1.5rem;
        /* Reduced padding */
        margin-bottom: 0;
        /* Remove bottom margin */
    }

    .service-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }

    .service-card p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    /* Gallery adjustments */
    .gallery-item {
        flex: 0 0 100%;
        padding: 0.75rem;
    }

    .gallery-item img {
        height: 250px;
        /* Shorter images on mobile */
    }

    .gallery-nav {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    /* Form adjustments */
    .contact-form {
        padding: 0;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group label {
        margin-bottom: 0.35rem;
        font-size: 0.95rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 1rem;
    }

    /* Trust badges adjustments */
    .trust-badges {
        gap: 1rem;
        margin: 1.5rem 0;
    }

    .badge {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Before/After slider adjustments */
    .before-after-slider {
        height: 350px;
        margin: 1rem 0;
    }

    .slider-handle::before {
        width: 32px;
        height: 32px;
    }

    .slider-label {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    /* Business info adjustments */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .info-card {
        padding: 1.5rem;
    }

    .info-card h3 {
        font-size: 1.3rem;
        margin-bottom: 1.25rem;
    }

    .areas-grid {
        gap: 1.25rem;
    }

    .area h4 {
        font-size: 1rem;
    }

    .hours-row {
        padding: 0.5rem 0;
        font-size: 0.95rem;
    }

    /* Testimonials adjustments */
    .testimonials-grid {
        gap: 1.25rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonial-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    /* Contact form adjustments */
    .contact-form {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    /* Footer adjustments */
    footer {
        padding: 1.5rem 1rem;
        font-size: 0.9rem;
        line-height: 1.6;
    }

    footer p {
        margin-bottom: 0.5rem;
    }

    /* Loading overlay mobile optimizations */
    .loading-overlay {
        background-color: rgba(255, 255, 255, 0.98);
        /* Slightly more opaque on mobile */
    }

    .loading-container {
        width: 85%;
        padding: 2rem 1rem;
    }

    .loading-spinner {
        width: 60px;
        height: 60px;
        border-width: 5px;
        /* Thicker border for better visibility */
        margin-bottom: 25px;
    }

    .loading-text {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .loading-bar-container {
        height: 10px;
        /* Slightly taller on mobile */
        margin-bottom: 12px;
    }

    .loading-percentage {
        font-size: 1.1rem;
    }
}