body {
    background-color: #f4f7f6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    margin: 0;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 350px;
    /* Reduced from 450px to make the whole stack narrower */
    margin: 0 auto;
    text-align: center;
    flex: 1;
    /* This pushes the footer to the bottom of the screen*/
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 40px;
    padding: 20px;
}

.logo {
    width: 300px;
    /* Increased from 96px */
    height: 300px;
    /* Increased from 96px */
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 5px;
}

p {
    color: #666;
    margin-bottom: 30px;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    align-items: center;
    /* Center the cards */
}

.link-card {
    background-color: #ffffff;
    color: #2d3436;
    /* Reduced padding: 8px top/bottom, 16px left/right */
    padding: 15px 20px;
    /* Reduced padding: 8px top/bottom, 16px left/right */

    /* Removed margin-bottom since gap handles it now */
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;

    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 15px;

    /* Add these lines to equalize length of cards */
    width: 95%;
    /* Sets them to the same width relative to container */
    max-width: 400px;
    /* Limits length on larger screens */
    box-sizing: border-box;
    /* Ensures padding doesn't add to the width */
}

.link-card span {
    font-size: 1.1rem;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.btn-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;

    /* This removes slight off-white backgrounds or gray borders */
    mix-blend-mode: multiply;

    /* Optional: If the icons look a bit dull, this sharpens them */
    filter: contrast(1.1);
}

/* The background overlay */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    /* This is the secret: it allows the content inside to scroll */
    overflow-y: auto;
    padding: 20px 0;
    /* Adds a little space at top/bottom on mobile */
}

/* The white box itself */
.modal-content {
    background-color: #fefefe;
    margin: 30px auto;
    /* Centers the box with space above/below */
    padding: 25px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    position: relative;
    /* Remove any fixed height or max-height here so it can grow */
}

/* Fix for iOS momentum scrolling */
.modal {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.save-contact-btn {
    display: inline-block;
    background-color: #2d3436;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    margin-top: 10px;
}

.nav-link {
    display: block;
    color: #007aff;
    text-decoration: underline;
    margin-top: 5px;
    font-size: 1.1rem;
    line-height: 1.4;
}

.hours-box {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: left;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

.hours-box p {
    margin: 5px 0;
    font-size: 0.95rem;
    color: #444;
}

/* Ensure the Save/Maps button is centered */
.save-contact-btn {
    display: block;
    width: fit-content;
    margin: 15px auto 0 auto;
}

/* 1. Remove or Comment out the #bg-video CSS if you are using the Still Image instead */

.intake-text {
    text-align: left;
    /* Better for reading long paragraphs */
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
    max-height: 60vh;
    /* Adds scroll if the text is too long for the screen */
    overflow-y: auto;
    padding: 10px;
}

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

/* Optional: Make the Services Modal slightly wider for the text */
#intakeModal .modal-content {
    max-width: 400px;
}

.ken-burns-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    /* Ensure it is the furthest back layer */
    background-color: #000;
    /* Fallback if image fails */
    overflow: hidden;
}

.bg-image {
    width: 100%;
    height: 100%;
    /* MAKE SURE THIS FILENAME MATCHES YOUR UPLOADED FILE EXACTLY */
    background-image: url('pexels-francesco-ungaro-1526713.jpg');
    background-size: cover;
    background-position: center;
    filter: brightness(0.6);
    /* Darkens the image for text contrast */

    /* The Animation */
    animation: kenburns 30s ease-in-out infinite alternate;
}

@keyframes kenburns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.2) translate(10px, 10px);
    }
}

.intake-form {
    text-align: left;
    margin-top: 15px;
}

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

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    /* Ensures both date boxes are the same width */
}

.field-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #636e72;
    margin-bottom: 4px;
    text-align: left;
    padding-left: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ensure the date input looks consistent across browsers */
input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    background-color: #fff;
}

.intake-form input,
.intake-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
    color: #444;
    margin: 15px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-group input {
    width: auto;
}

.conditional-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Space between rows */
    margin-top: 20px;
}

.cond-row {
    display: flex;
    align-items: center;
    /* Vertically centers checkbox with text box */
    justify-content: space-between;
    width: 100%;
}

.cond-label {
    display: flex;
    align-items: center;
    flex-basis: 150px;
    /* Adjust this to fit your text exactly */
    flex-shrink: 0;
    /* Prevents the label column from squishing */
    font-size: 0.85rem;
    font-weight: 500;
    color: #2d3436;
    cursor: pointer;
}

.cond-label input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
}

.cond-input {
    flex-grow: 1;
    /* Makes the text box fill the rest of the row */
    padding: 8px 12px;
    border: 1px solid #dfe6e9;
    border-radius: 6px;
    font-size: 0.85rem;
    background-color: #fafafa;
    transition: border-color 0.2s;
}

.cond-input:focus {
    border-color: #007aff;
    background-color: #fff;
    outline: none;
}

/* This targets the white box inside the modal */
#intakeModal .modal-content {
    max-height: 85vh;
    /* Limits height to 85% of the screen */
    overflow-y: auto;
    /* Enables vertical scrolling */
    padding-right: 15px;
    /* Extra space so text doesn't touch the scrollbar */
    border-radius: 20px;
    position: relative;
}

/* Custom Scrollbar Styling (Webkit browsers like Chrome/Safari) */
#intakeModal .modal-content::-webkit-scrollbar {
    width: 6px;
}

#intakeModal .modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

#intakeModal .modal-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.modal-body {
    max-height: 60vh;
    /* Adjust based on how much room the header takes */
    overflow-y: auto;
    padding: 10px 5px;
}

/* White Background Footer */
.site-footer {
    width: 100%;
    background-color: #ffffff;
    /* Solid White */
    padding: 5px 0;
    text-align: center;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
    /* Soft shadow to separate from bg */
    border-top: 1px solid #eee;
}

.footer-content p {
    color: #2d3436;
    /* Dark text for white background */
    margin: 5px 0;
    font-size: 0.75rem;
}

.footer-links a {
    color: #007aff;
    /* Action Blue for links */
    text-decoration: none;
    font-weight: 500;
}

.divider {
    color: #ccc;
    margin: 0 10px;
}

.powered-by {
    font-size: 0.65rem;
    color: #636e72 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chat-modal {
    height: 80vh;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
}

.chat-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.lang-toggle {
    float: right;
    display: flex;
    gap: 5px;
}

.lang-btn {
    border: 1px solid #007aff;
    background: none;
    color: #007aff;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
}

.lang-btn.active {
    background: #007aff;
    color: #fff;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f9f9f9;
}

.msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.msg.bot {
    background: #e9e9eb;
    color: #000;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.msg.user {
    background: #007aff;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-input-area {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
}

.chat-input-area input,
.chat-input-area select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
}

.chat-btn {
    background: #007aff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    margin-top: 10px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
}

/* =========================================
   Chat Interface Styles
   ========================================= */

/* Container for message rows */
.msg {
    display: flex;
    align-items: flex-end;
    margin-bottom: 15px;
    width: 100%;
}

/* User messages align right */
.msg.user {
    justify-content: flex-end;
}

/* The text bubble */
.msg span {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 75%;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Bot bubble specific style */
.msg.bot span {
    background-color: #f1f0f0;
    color: #333;
    border-bottom-left-radius: 2px;
}

/* User bubble specific style */
.msg.user span {
    background-color: #007aff;
    color: white;
    border-bottom-right-radius: 2px;
}

/* Social Icons Row Styles */
.social-row {
    display: flex;
    justify-content: center;
    gap: 25px;
    /* Space between icons */
    margin-top: 1px;
    margin-bottom: 1px;
}

.social-icon {
    width: 35px;
    height: 35px;
    object-fit: contain;
    transition: transform 0.2s ease;
    /* Optional: multiply blend mode if icons have white backgrounds */
    mix-blend-mode: multiply;
}

.social-icon:hover {
    transform: scale(1.1);
    /* Slight zoom effect on hover */
}

/* --- New Header Styles --- */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: relative;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    /* Increase or decrease these numbers to adjust the spacing */
    margin-top: 1px;
    margin-bottom: 1px;
}

.header-info h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    font-weight: 700;
}

.header-info span {
    font-size: 0.85rem;
    color: #007aff;
    font-weight: 500;
}

/* Position the close button absolutely so it doesn't mess up flexbox */
.chat-header .close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}

/* --- Clean up Bot Bubble (remove padding shift) --- */
.msg.bot {
    align-self: flex-start;
    /* Ensure no weird margin remains from where the icon used to be */
    margin-left: 0;
}