/* =============================================
   CONTACT.CSS - CONTACT TEMPLATE SPECIFIC STYLES
   ============================================= */

/* Main Content Structure */
.contact-main-content {
    padding: 60px 0;
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Hero Section */
.contact-hero {
    text-align: center;
    margin: 60px 0;
    padding: 0 20px;
}

.contact-hero h1 {
    color: var(--excel-green);
    font-size: 42px;
    margin: 0 0 20px 0;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.contact-hero .hero-description {
    color: var(--excel-text);
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Contact Container - Aligned Sections */
.contact-container {
    display: flex;
    gap: 50px;
    margin-bottom: 60px;
    padding: 0 20px;
    align-items: stretch; /* Changed from flex-start to stretch */
}

/* Contact Form Section - Now matches card height */
.contact-form {
    flex: 1;
    background-color: var(--excel-white);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensures form takes full height */
}

.contact-form h2 {
    color: var(--excel-green);
    font-size: 28px;
    margin-bottom: 30px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.3px;
}

/* Form Elements */
.contact-form .form-group {
    margin-bottom: 24px;
}

.contact-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--excel-text);
}

.contact-form .form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--excel-border);
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.5;
    background-color: var(--excel-light-gray);
}

.contact-form .form-control:focus {
    outline: none;
    border-color: var(--excel-green);
    box-shadow: 0 0 0 3px rgba(33, 115, 70, 0.2);
    background-color: var(--excel-white);
}

.contact-form textarea.form-control {
    min-height: 160px;
    resize: vertical;
}

.contact-form select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

/* Form Submission */
.contact-form .form-submit-wrapper {
    position: relative;
    margin-top: auto; /* Pushes button to bottom */
    padding-top: 30px;
}

.contact-form .form-response {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 16px;
    z-index: 10;
    display: none;
}

.contact-form .form-response.show {
    display: block;
}

.contact-form .alert {
    padding: 14px 16px;
    border-radius: 6px;
    font-size: 15px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    line-height: 1.5;
}

.contact-form .alert-success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.contact-form .alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* Buttons */
.contact-form .btn {
    display: inline-block;
    padding: 14px 32px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: inherit;
    line-height: 1.5;
    width: 100%;
}

.contact-form .btn-primary {
    background-color: var(--excel-green);
    color: var(--excel-white);
}

.contact-form .btn-primary:hover {
    background-color: var(--excel-dark-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.contact-form .btn-primary:active {
    transform: translateY(0);
}

.contact-form button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Contact Info Section - Now matches form height */
.contact-info {
    flex: 1;
    min-width: 0;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 32px; /* Matches card margin-bottom */
}

.contact-card {
    background-color: var(--excel-white);
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    flex: 1; /* Cards now fill available space */
}

.contact-card h3 {
    color: var(--excel-green);
    font-size: 22px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.contact-card h3 i {
    margin-right: 12px;
    font-size: 24px;
    color: var(--excel-green);
}

.contact-card p {
    margin-bottom: 16px;
    line-height: 1.7;
    color: var(--excel-text);
}

.contact-card a {
    color: var(--excel-blue);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    word-break: break-word;
}

.contact-card a:hover {
    color: var(--excel-dark-green);
    text-decoration: underline;
}

.contact-card .office-hours {
    margin-top: 24px;
}

.contact-card .hours-section p {
    display: flex;
    justify-content: space-between;
    max-width: 320px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.contact-card .hours-section p span.hours-label {
    font-weight: 600;
}

.contact-card .hours-section p span.hours-time {
    color: var(--excel-dark-text);
}

/* Map Container */
.contact-card .map-container {
    height: 320px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    background-color: var(--excel-gray);
    margin-top: 24px;
}

.contact-card .map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* FAQ Section */
.contact-faq-section {
    background-color: var(--excel-white);
    border-radius: 8px;
    padding: 48px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 48px 20px;
    box-sizing: border-box;
}

.contact-faq-title {
    color: var(--excel-green);
    font-size: 32px;
    margin-bottom: 32px;
    text-align: center;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.contact-faq-items {
    margin-top: 24px;
}

.contact-faq-item {
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(33, 115, 70, 0.1);
    padding-bottom: 24px;
}

.contact-faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-faq-question {
    color: var(--excel-dark-green);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s ease;
    padding: 8px 0;
}

.contact-faq-question:hover {
    color: var(--excel-green);
}

.contact-faq-question i {
    transition: transform 0.3s ease;
    margin-left: 16px;
    font-size: 14px;
    color: var(--excel-green);
}

.contact-faq-question.active i {
    transform: rotate(180deg);
}

.contact-faq-answer {
    display: none;
    padding: 12px 0 0;
    animation: contact-fadeIn 0.3s ease;
    color: var(--excel-text);
    line-height: 1.7;
}

.contact-faq-answer.show {
    display: block;
}

.contact-faq-answer a {
    color: var(--excel-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-faq-answer a:hover {
    color: var(--excel-dark-green);
    text-decoration: underline;
}

.contact-no-faqs {
    text-align: center;
    color: var(--excel-text);
    padding: 24px;
    font-size: 18px;
}

@keyframes contact-fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   Responsive Styles
   ============================================= */

@media (max-width: 992px) {
    .contact-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .contact-info {
        position: static;
        width: 100%;
        gap: 24px;
    }
    
    .contact-card .map-container {
        margin-top: 24px;
    }
    
    /* Equalize form and cards height on tablet */
    .contact-form,
    .contact-card {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .contact-main-content {
        padding: 48px 0;
    }

    .contact-hero {
        margin: 40px 0;
    }

    .contact-hero h1 {
        font-size: 36px;
    }

    .contact-hero .hero-description {
        font-size: 17px;
    }

    .contact-form,
    .contact-faq-section,
    .contact-card {
        padding: 28px;
    }
    
    .contact-form h2,
    .contact-faq-title {
        font-size: 28px;
    }
    
    .contact-faq-section {
        margin-left: 15px;
        margin-right: 15px;
    }
}

@media (max-width: 576px) {
    .contact-main-content {
        padding: 32px 0;
    }

    .contact-hero {
        margin: 30px 0;
    }
    
    .contact-hero h1 {
        font-size: 30px;
    }
    
    .contact-hero .hero-description {
        font-size: 16px;
    }
    
    .contact-card h3 {
        font-size: 20px;
    }
    
    .contact-form,
    .contact-faq-section,
    .contact-card {
        padding: 24px;
    }
    
    .contact-faq-question {
        font-size: 17px;
    }
    
    .contact-form .btn {
        padding: 12px 24px;
    }

    .contact-card .hours-section p {
        flex-direction: column;
        gap: 4px;
    }

    .contact-card .hours-section p span.hours-label {
        margin-bottom: 4px;
    }
}

/* Print Styles */
@media print {
    .contact-main-content {
        padding: 0;
    }

    .contact-hero {
        margin: 20px 0;
    }

    .contact-hero,
    .contact-container,
    .contact-faq-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .contact-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .contact-card .map-container {
        display: none;
    }

    .contact-faq-question i {
        display: none;
    }

    .contact-faq-answer {
        display: block !important;
    }

    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        font-weight: normal;
        color: #666;
    }
}