/* 
    Coastal Pressure Pros - Stylesheet
    Version: 1.4.0
    Last Updated: 2024-09-03
    Author: Support Team, Coastal Pressure Pros
*/

/* Global Styles */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header Styles */
header {
    background: linear-gradient(to bottom right, #0052a2, #0073e6);
    color: #fff;
    padding: 1rem 2rem;
    position: relative;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.logo {
    flex: 1 1 auto;
    max-width: 200px;
}

.logo img {
    max-height: 50px;
}

.call-button {
    background: #ff9933;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
    margin-left: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    justify-content: center;
}

/* Chat Widget Styles */
#chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #0073e6;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: background-color 0.3s ease;
}

#chat-icon:hover {
    background-color: #0052a2;
}

#chat-icon i {
    color: white;
    font-size: 24px;
}

#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    height: 400px;
    border: 1px solid #0073e6;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-family: 'Roboto', sans-serif;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
}

#chat-header {
    background-color: #0052a2;
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-header h4 {
    margin: 0;
    font-size: 16px;
}

#close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

#chat-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
}

#chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
}

#chat-input input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 5px;
}

#chat-input button {
    padding: 8px 12px;
    background-color: #0073e6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#chat-input button:hover {
    background-color: #0052a2;
}

.message {
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 10px;
    max-width: 80%;
}

.bot-message {
    background-color: #f1f1f1;
    align-self: flex-start;
}

.user-message {
    background-color: #0073e6;
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.typing-indicator {
    background-color: #f1f1f1;
    padding: 10px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
}

.typing-indicator span {
    height: 10px;
    width: 10px;
    background-color: #3b3b3b;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: bounce 1.3s linear infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -1.1s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: -0.9s;
}

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* Navigation Styles */
nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.nav-links li {
    display: inline-block;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1101;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    text-align: center;
    background: url('images/hero-bg.jpg') no-repeat center center/cover;
    position: relative;
    color: #fff;
    padding: 4rem 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.cta-button {
    background: #ff9933;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #e68a00;
}

/* Services Section */
.services, .about, .testimonials {
    padding: 4rem 2rem;
    text-align: center;
    background-color: #ffffff;
    margin: 2rem 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

h2 {
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: #0052a2;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-item {
    background: #f4f4f4;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px);
}

.service-item h3 {
    color: #0052a2;
    margin-bottom: 1rem;
}

/* About Section */
.about {
    padding: 4rem 10%;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
}

.about img {
    flex: 1;
    max-width: 600px;
    height: 400px;
    border-radius: 10px;
    object-fit: cover;
}

.about-text {
    flex: 2;
    text-align: left;
}

/* Testimonials Section */
.testimonials .testimonial-item {
    background: #f4f4f4;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.testimonials .testimonial-item img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
}

.testimonials .testimonial-item p {
    font-style: italic;
    margin-bottom: 1rem;
}

/* Contact Section */
.contact {
    padding: 4rem 2rem;
    background-color: #ffffff;
    margin: 2rem 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.contact h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.contact-info {
    flex: 1;
    text-align: left;
    max-width: 500px;
}

.contact-info p {
    margin-bottom: 1.5rem;
}

.contact-details {
    list-style: none;
    padding: 0;
}

.contact-details li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.contact-details i {
    margin-right: 1rem;
    color: #0052a2;
    font-size: 1.2rem;
    width: 20px;
}

.contact-details a,
.contact-details span {
    color: #333;
    text-decoration: none;
}

.contact-details a:hover {
    color: #0052a2;
}

.contact-form-container {
    flex: 1;
    max-width: 500px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.contact-form label {
    font-weight: bold;
    color: #333;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
    box-sizing: border-box;
}

.contact-form textarea {
    resize: vertical;
}

.submit-button {
    background: #0052a2;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
    align-self: flex-start;
}

.submit-button:hover {
    background: #003d7a;
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-content img {
    height: 50px;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.social-links a {
    display: inline-block;
    margin-right: 10px;
}

.social-links a:last-child {
    margin-right: 0;
}

.social-links i {
    font-size: 1.5rem;
    color: #fff;
    vertical-align: middle;
}

/* Trust Logos */
.trust-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.trust-logo {
    height: 50px;
}

/* Exit-Intent Popup Styles */
.exit-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.exit-popup-content {
    background: #fff;
    border-radius: 10px;
    text-align: center;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-sizing: border-box;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.close-exit-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

.popup-content-container {
    display: flex;
    flex-direction: row;
}

.popup-image-container {
    flex: 1;
    background: url('images/pressure-washer-image.jpg') no-repeat center center/cover;
    display: none;
}

.popup-text-container {
    flex: 2;
    padding: 2rem;
}

.popup-text-container h2 {
    font-size: 2.2rem;
    color: #0052a2;
    margin-bottom: 1rem;
}

.popup-text-container p {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: #333;
}

.popup-text-container form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popup-text-container input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.popup-text-container .submit-button {
    background: #ff9933;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
    font-size: 1.2rem;
}

.popup-text-container .submit-button:hover {
    background: #e68a00;
}

/* Alert Styles */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
    width: 90%;
    max-width: 500px;
    margin: 20px auto;
}

.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Remove gray highlight on tap for all interactive elements */
a, button, input, select, textarea {
    -webkit-tap-highlight-color: transparent;
}

/* Custom focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 82, 162, 0.5);
}

/* Responsive Design */
@media (min-width: 1024px) {
    .header-container {
        flex-wrap: nowrap;
    }
    
    .call-button {
        margin-left: 1rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .logo {
        flex: 1;
    }

    .call-button {
        order: 2;
        margin-right: 1rem;
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .mobile-menu-toggle {
        display: block;
        order: 3;
    }

    nav {
        flex-basis: 100%;
        order: 4;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #0052a2;
        position: absolute;
        top: 100%;
        left: 0;
        padding: 0.5rem 0;
        margin: 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links li {
        margin: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .about img {
        max-width: 100%;
        height: auto;
    }

    .about-content {
        flex-direction: column;
    }

    .about-text {
        text-align: center;
    }

    .contact-container {
        flex-direction: column;
    }

    .contact-info,
    .contact-form-container {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .contact-info {
        margin-bottom: 2rem;
    }
    
    .trust-logos {
        flex-wrap: wrap;
    }
    
    .trust-logo {
        height: 40px;
        margin: 0.5rem;
    }
}

@media (min-width: 769px) {
    .header-right {
        flex: 1;
        justify-content: flex-end;
    }

    nav {
        margin-right: 1rem;
    }
}

@media (max-width: 1024px) and (orientation: landscape) {
    .header-container {
        flex-wrap: nowrap;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .nav-links {
        flex-wrap: nowrap;
        justify-content: flex-end;
        text-align: center;
        padding: 0;
    }

    .nav-links a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .call-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .logo img {
        max-height: 40px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .popup-image-container {
        display: block;
    }
}

@media (max-width: 767px) {
    .popup-content-container {
        flex-direction: column;
    }

    .popup-image-container {
        display: block;
        height: 200px;
        background-size: cover;
    }

    .popup-text-container {
        padding: 1.5rem;
    }
}

/* Print styles */
@media print {
    header, footer, .cta-button, .contact-form {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 2cm;
    }
}