/* ==========================
   CONTACT PAGE SPECIFIC STYLES
   Follows homepage design system
   ========================== */

/* Contact Hero Section */
.contact-hero {
    background: #ffffff;
    padding: 1.5rem 2rem;
    min-height: auto;
    display: flex;
    align-items: center;
}

.contact-hero .hero-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.contact-hero .hero-title {
    font-family: "Inter Tight", sans-serif;
    font-size: 72px;
    font-weight: 600;
    line-height: 72px;
    color: var(--navy-text);
    margin-bottom: 0.6rem;
    letter-spacing: -0.03em;
    max-width: 680px;
}

.contact-hero .hero-subtitle {
    font-family: Helvetica, sans-serif;
    font-size: 32px;
    line-height: 44.8px;
    font-weight: 400;
    letter-spacing: normal;
    color: #4b5563;
    margin-bottom: 1.1rem;
}

.contact-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.contact-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    clip-path: polygon(0 0, 85% 0, 100% 20%, 100% 100%, 15% 100%, 0 80%);
    border-radius: 0;
}

/* Active navigation state */
.nav-link-active {
    color: var(--primary-green) !important;
    font-weight: 600;
}

/* ==========================
   CONTACT INFORMATION SECTION
   ========================== */

.contact-info-section {
    background: #ffffff;
    padding: 5rem 2rem;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
    max-width: var(--container-max-width);
    margin: 0 auto;
    width: 100%;
}

.contact-details .section-title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy-text);
    margin-bottom: 1rem;
    font-family: 'Inter Tight', sans-serif;
}

.contact-details .section-description {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--gray-text);
    margin-bottom: 3rem;
    max-width: 500px;
}

/* Contact Methods */
.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #F8FAFC;
    border-radius: 12px;
    border-left: 4px solid var(--primary-green);
    transition: all 0.3s ease;
}

.contact-method:hover {
    background: #E8F3EA;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 124, 89, 0.1);
}

.method-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-green);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.method-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--navy-text);
    margin-bottom: 0.5rem;
    font-family: 'Inter Tight', sans-serif;
}

.method-content p {
    font-size: 1rem;
    color: var(--navy-text);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.method-content a {
    color: var(--navy-text);
    text-decoration: none;
    font-weight: 600;
}

.method-content a:hover {
    color: var(--primary-green);
}

.method-note {
    font-size: 0.875rem;
    color: var(--gray-text);
    font-style: italic;
}

/* ==========================
   CONTACT FORM STYLING
   ========================== */

.contact-form-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy-text);
    margin-bottom: 0.5rem;
    font-family: 'Inter Tight', sans-serif;
}

.form-subtitle {
    font-size: 1rem;
    color: var(--gray-text);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy-text);
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--gray-text);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--primary-green);
}

.checkbox-label a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.form-submit {
    width: 100%;
    margin-top: 1rem;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

/* ==========================
   MAP SECTION
   ========================== */

.map-section {
    background: #F8FAFC;
    padding: 6rem 0;
    position: relative;
}

.map-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #E8F3EA, transparent);
}

.map-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: center;
    width: 100%;
}

.office-info .section-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--navy-text);
    margin-bottom: 1rem;
    font-family: 'Inter Tight', sans-serif;
}

.office-description {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--gray-text);
    margin-bottom: 3rem;
    max-width: 500px;
}

.office-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.office-detail {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #E8F3EA;
}

.detail-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-green);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.detail-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--navy-text);
    margin-bottom: 0.5rem;
    font-family: 'Inter Tight', sans-serif;
}

.detail-content p {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--gray-text);
}

.office-cta {
    text-align: left;
}

/* Map Embed */
.map-embed {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border: 2px solid #E8F3EA;
    background: #ffffff;
    padding: 8px;
}

.map-embed iframe {
    width: 100%;
    height: 450px;
    border: none;
    display: block;
    border-radius: 12px;
}

/* ==========================
   WHY CHOOSE US CONTACT SECTION
   ========================== */

.why-choose-contact {
    background: #ffffff;
    padding: 5rem 2rem;
}

.why-choose-contact .section-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--navy-text);
    margin-bottom: 3rem;
    text-align: left;
    font-family: 'Inter Tight', sans-serif;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: var(--container-max-width);
    margin: 0 auto;
    width: 100%;
}

.benefit-item {
    text-align: left;
    padding: 2rem;
    background: #F8FAFC;
    border-radius: 16px;
    border: 1px solid #E8F3EA;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    background: #E8F3EA;
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(74, 124, 89, 0.15);
}

.benefit-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-green);
    margin: 0 0 1.5rem 0;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(74, 124, 89, 0.2);
}

.benefit-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--navy-text);
    margin-bottom: 1rem;
    font-family: 'Inter Tight', sans-serif;
}

.benefit-item p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-text);
}

/* ==========================
   RESPONSIVE DESIGN FOR CONTACT PAGE
   ========================== */

@media (max-width: 1024px) {
    .contact-info-grid {
        gap: 3rem;
    }
    
    .map-container {
        gap: 3rem;
    }
    
    .benefits-grid {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .contact-hero .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .contact-hero .hero-title {
        font-size: 3rem;
        text-align: center;
    }
    
    .contact-hero .hero-subtitle {
        font-size: 1.25rem;
        text-align: center;
    }
    
    .contact-hero .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .contact-info-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .contact-details {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .section-label {
        text-align: center !important;
        display: block;
        width: 100%;
    }
    
    /* Contact form should be left-aligned */
    .contact-form-wrapper {
        text-align: left !important;
    }
    
    .contact-form,
    .form-title,
    .form-subtitle,
    .form-group,
    .form-group label,
    .form-row {
        text-align: left !important;
        align-items: flex-start !important;
    }
    
    .map-container {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    
    .map-embed {
        order: -1;
        margin-bottom: 1rem;
    }
    
    .map-embed iframe {
        height: 350px;
    }
    
    /* Improved Form Mobile Styling */
    .contact-form {
        gap: 1rem; /* Balanced spacing between sections */
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem; /* Slightly more breathing room */
    }
    
    .form-group {
        margin-bottom: 0; /* Remove extra margin */
    }
    
    .form-group label {
        font-size: 0.95rem; /* Slightly larger labels */
        margin-bottom: 0.75rem; /* More breathing room */
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 1rem 1.125rem; /* Increased padding for better touch targets */
        font-size: 1rem;
        min-height: 48px; /* Better touch target */
    }
    
    .form-group textarea {
        min-height: 150px; /* Taller textarea on mobile */
        padding: 1rem 1.125rem;
    }
    
    /* Improved Checkbox Layout */
    .checkbox-group {
        margin-top: 1.5rem; /* More spacing from previous field */
        gap: 1rem; /* Increased gap */
    }
    
    .checkbox-label {
        font-size: 0.95rem; /* Larger text for readability */
        line-height: 1.7; /* More generous line spacing */
        gap: 1rem; /* More space between checkbox and text */
        display: flex;
        align-items: flex-start;
    }
    
    .checkbox-label input[type="checkbox"] {
        width: 22px; /* Larger checkbox for easier tapping */
        height: 22px;
        margin-top: 0.2rem; /* Better alignment with first line */
        flex-shrink: 0; /* Prevent checkbox from shrinking */
    }
    
    .checkbox-label .checkbox-text {
        flex: 1; /* Let text take remaining space */
        display: block; /* Ensure text wraps naturally */
    }
    
    /* Submit Button */
    .form-submit {
        margin-top: 1.5rem; /* More spacing from checkbox */
        padding: 1.125rem 2rem; /* Bigger button */
        font-size: 1.125rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-details .section-title {
        font-size: 2.25rem;
        text-align: center;
    }
    
    .office-info .section-title {
        font-size: 2.25rem;
        text-align: center;
    }
    
    .office-info {
        text-align: center;
    }
    
    .office-cta {
        text-align: center;
    }
    
    /* Office Details Centering for Mobile */
    .office-detail {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 1rem;
        padding: 1.5rem;
    }

    .office-detail .detail-icon {
        margin: 0 auto 0.75rem auto !important;
    }

    .detail-content {
        text-align: center !important;
        width: 100%;
    }
    
    .detail-content h4,
    .detail-content p {
        text-align: center !important;
    }
}

@media (max-width: 480px) {
    .contact-hero {
        padding: 1rem;
    }
    
    .contact-hero .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .contact-hero .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .contact-info-section {
        padding: 3rem 0;
    }
    
    .map-section {
        padding: 3rem 0;
    }
    
    .why-choose-contact {
        padding: 3rem 0;
    }
    
    .contact-form-wrapper {
        padding: 0; /* No padding - let form breathe */
    }
    
    /* Center everything on mobile except form */
    .contact-info-section,
    .contact-details,
    .contact-methods,
    .contact-method,
    .method-content,
    .map-section,
    .office-info,
    .office-details,
    .office-detail,
    .detail-content,
    .why-choose-contact,
    .benefits-grid,
    .benefit-item {
        text-align: center !important;
        justify-content: center;
        align-items: center;
    }

    .contact-details .section-label,
    .contact-details .section-title,
    .contact-details .section-description,
    .why-choose-contact .section-label,
    .why-choose-contact .section-title,
    .benefit-item h3,
    .benefit-item p,
    .office-detail h4,
    .office-detail p,
    .method-content h3,
    .method-content p,
    .method-content a,
    .method-note {
        text-align: center !important;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Keep form left-aligned */
    .form-title,
    .form-subtitle {
        text-align: left !important;
        margin-left: 0;
        margin-right: 0;
    }

    .contact-methods,
    .benefits-grid,
    .office-details {
        gap: 1.5rem;
    }

    .contact-method {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        border-left-width: 0;
        border-top: 4px solid var(--primary-green);
        padding: 1.5rem 1.25rem;
    }

    .method-icon {
        margin: 0 0 1rem 0;
    }

    .method-content {
        text-align: center;
        width: 100%;
    }

    .office-detail {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 1rem;
        padding: 1.5rem;
    }

    .office-detail .detail-icon {
        margin: 0 auto 0.75rem auto !important;
    }

    .detail-content {
        text-align: center !important;
        width: 100%;
    }
    
    .detail-content h4,
    .detail-content p {
        text-align: center !important;
    }

    .checkbox-label {
        text-align: left !important;
        justify-content: flex-start;
    }
    
    .checkbox-label .checkbox-text {
        text-align: left !important;
    }
    
    .contact-method {
        padding: 1.25rem;
    }
    
    .office-detail {
        padding: 1.25rem;
    }
    
    .benefit-item {
        padding: 1.5rem;
    }
    
    .contact-image-container {
        height: 300px;
    }
}

/* ==========================
   FORM VALIDATION STATES
   ========================== */

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.error-message {
    font-size: 0.875rem;
    color: #EF4444;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Form submission states */
.form-submit:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
    transform: none;
}

.form-submit.loading {
    position: relative;
    color: transparent;
}

.form-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
