/* Interactive Hero Section Styles */

/* Container for the hero content and form */
.hero-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    transition: all 0.5s ease-in-out;
    min-height: 500px; /* Ensure minimum height for the hero */
}

/* Default state - only hero content is visible */
.hero-content {
    width: 50%;
    padding: 20px;
}

/* Hero Button */
.hero-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.hero-btn:hover {
    background-color: var(--primary-dark);
}

/* Form Container */
.hero-form-container {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Active state when form is shown */
.hero-container.form-active .hero-form-container {
    width: 400px;
    opacity: 1;
}

/* Hide the hero button when form is active */
.hero-container.form-active #hero-appointment-btn,
.hero-container.form-active .hero-btn {
    display: none !important;
}

/* Form Styles */
.hero-form {
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* Form Header */
.form-header {
    background: #1e40af;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* Close Button */
.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.close-form-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Form Body */
.form-body {
    padding: 20px;
}

/* Form Rows and Columns */
.form-row {
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
}

.form-col {
    flex: 1;
}

.form-col.full {
    flex: 0 0 100%;
}

/* Form Labels */
.form-body label {
    display: block;
    margin-bottom: 3px;
    font-size: 13px;
    color: #1e40af;
    font-weight: 500;
    text-align: left;
}

/* Form Inputs */
.form-body input[type="text"],
.form-body input[type="tel"],
.form-body input[type="email"],
.form-body select,
.form-body textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-body input:focus,
.form-body select:focus,
.form-body textarea:focus {
    border-color: #1e40af;
    outline: none;
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.1);
}

/* Checkbox Row */
.checkbox-row {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.checkbox-row input[type="checkbox"] {
    margin-right: 10px;
}

.checkbox-row label {
    margin: 0;
    font-size: 13px;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    background-color: #1e40af;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 5px;
}

.submit-btn:hover {
    background-color: #1c3879;
}

/* Scrollbar Styling */
.form-body::-webkit-scrollbar {
    width: 8px;
}

.form-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.form-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.form-body::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hero-container.form-active .hero-form-container {
        width: 90%;
        right: 5%;
        left: 5%;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-body {
        padding: 15px;
        max-height: 80vh;
        overflow-y: auto;
    }
}

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

.form-group.half {
    flex: 1;
    min-width: 0;
}

.hero-appointment-form h3 {
    color: var(--primary-color);
    margin: 0 0 20px 0;
    text-align: center;
    padding-top: 10px;
}

.hero-appointment-form .form-group {
    margin-bottom: 15px;
}

.hero-appointment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.hero-appointment-form input,
.hero-appointment-form select,
.hero-appointment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Montserrat', sans-serif;
}

.hero-appointment-form .form-checkbox {
    display: flex;
    align-items: center;
}

.hero-appointment-form .form-checkbox input {
    width: auto;
    margin-right: 10px;
}

.hero-appointment-form .form-checkbox label {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.hero-appointment-form button {
    width: 100%;
    margin-top: 10px;
}

/* Thank You Message Styles */
.thank-you-message {
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 25px;
    text-align: center;
}

.thank-you-message h3 {
    color: #1e40af;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 600;
}

.thank-you-message p {
    margin-bottom: 15px;
    line-height: 1.5;
    color: #333;
}

.thank-you-message .btn-primary {
    background-color: #1e40af;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.thank-you-message .btn-primary:hover {
    background-color: #1c3879;
}

/* Utility Classes */
.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Responsive styles */
@media (max-width: 768px) {
    .hero-container {
        flex-direction: column;
        min-height: 600px;
        justify-content: center;
        padding-top: 0;
    }
    
    .hero-content {
        width: 100%;
        text-align: center;
        margin-bottom: 30px;
    }
    
    .hero-container.form-active .hero-content {
        width: 100%;
        text-align: center;
        margin-bottom: 30px;
    }
    
    /* Hide hero text (h1) when form is active on mobile */
    .hero-container.form-active .hero-content h1 {
        display: none;
    }
    
    .hero-container.form-active .hero-form-container {
        width: 100%;
        position: relative;
        transform: none;
        top: 0;
        right: 0;
        left: 0;
    }
}

@media (max-width: 576px) {
    .hero-container {
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 0;
    }
    
    .form-body {
        padding: 15px;
    }
    
    /* Remove height restrictions and scrolling when form is active */
    .hero-container.form-active .form-body {
        max-height: none;
        overflow-y: visible;
    }
    
    .hero-container.form-active .hero-content {
        margin-bottom: 15px;
    }
    
    .form-row {
        margin-bottom: 8px;
    }
    
    .hero-form {
        transform: none;
    }
    
    /* Position the form better when hero text is hidden */
    .hero-container.form-active .hero-form-container {
        position: static;
        margin-top: 10px;
        width: 100%;
    }
    
    /* Adjust form spacing to eliminate scrolling */
    .hero-container.form-active .form-row {
        margin-bottom: 5px;
    }
    
    .hero-container.form-active .form-header {
        padding: 10px 15px;
    }
    
    .hero-container.form-active label {
        margin-bottom: 2px;
    }
    
    .hero-container.form-active input,
    .hero-container.form-active select,
    .hero-container.form-active textarea {
        padding: 6px 8px;
    }
}
