/* Contact Hero Section */
.contact-hero {
    position: relative;
    padding: 160px 0 80px;
    margin-top: 80px;
    text-align: center;
    color: white;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(44, 85, 48, 0.7)), url('../images/listing3a.jpeg') no-repeat center center/cover, #2c5530; /* Fallback to primary color */
    background-blend-mode: overlay;
}

/* Overlay to darken background image */
.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Primary color with 70% opacity */
    z-index: 1;
}

.contact-hero-content {
    position: relative;
    z-index: 2; /* Ensure content is above overlay */
}

.contact-hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8); /* Improve legibility */
}

.contact-hero-content p {
    font-size: 1.2rem;
    opacity: 1; /* Increased for visibility */
    max-width: 600px;
    margin: 0 auto 2rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8); /* Improve legibility */
}

.contact-hero-content .btn-primary {
    background: #2c5530;
    border: 2px solid #2c5530;
    color: white;
    padding: 12px 30px;
    transition: all 0.3s ease;
}

.contact-hero-content .btn-primary:hover {
    background: #1a3b1e; /* Primary-dark */
    border-color: #1a3b1e;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Contact Form */
.contact-form-container {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.5s ease;
}

.contact-form-container h2 {
    color: var(--primary);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
    min-height: 1.25rem;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #dc3545;
}

/* Submit Button */
.btn-full {
    width: 100%;
    text-align: center;
}

.btn-primary {
    background: #2c5530;
    border: 2px solid #2c5530;
    color: white;
    padding: 12px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #1a3b1e;
    border-color: #1a3b1e;
}

.btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: flex;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Contact Info */
.contact-info-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.contact-info-card h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 1.25rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
    color: var(--primary);
}

.contact-details h4 {
    color: var(--dark);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.contact-link {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
    line-height: 1.5;
}

.contact-link:hover {
    color: var(--primary);
}

.contact-details p {
    color: var(--gray);
    line-height: 1.5;
    margin: 0;
}

/* Map Container */
.map-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map-container h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.map-embed {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.map-embed:hover {
    transform: scale(1.02);
}

.map-embed iframe {
    display: block;
    border: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid #2c5530;
    color: #2c5530;
    padding: 12px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #2c5530;
    color: white;
}

/* FAQ Section */
.faq-section {
    background: var(--light);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-item.active {
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(44, 85, 48, 0.15);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    background: white;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.2);
}

.faq-item.active .faq-question {
    background: var(--primary);
    color: white;
}

.faq-item.active .faq-question h3 {
    color: var(--secondary);
}

.faq-question h3 {
    color: var(--primary);
    margin: 0;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary);
    transition: all 0.3s ease;
    min-width: 20px;
    text-align: center;
}

.faq-item.active .faq-toggle {
    color: white;
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--gray);
    line-height: 1.6;
    margin: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideInUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

.modal-close:hover {
    color: var(--primary);
}

.modal h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.modal p {
    color: var(--gray);
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .contact-form-container,
    .contact-info-card,
    .map-container {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .contact-hero {
        padding: 120px 0 60px;
    }
    .contact-hero-content h1 {
        font-size: 2.5rem;
    }
    .faq-question {
        padding: 1rem;
    }
    .faq-question h3 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .contact-hero-content h1 {
        font-size: 2rem;
    }
    .contact-hero-content p {
        font-size: 1rem;
    }
    .contact-form-container h2 {
        font-size: 1.5rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}