/* =============================================
   Contact Page Specific Styles
   ============================================= */

/* Contact Hero Section */
.contact-hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.contact-hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.contact-hero .hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
    text-align: left;
}

.contact-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(139, 198, 63, 0.1);
    border: 1px solid rgba(139, 198, 63, 0.2);
    border-radius: 50px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.contact-hero .hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.contact-hero .title-line {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

.contact-hero .title-line:nth-child(2) {
    animation-delay: 0.2s;
}

.contact-hero .hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 0 2.5rem;
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.contact-hero .hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    align-items: center;
    animation: fadeInUp 0.6s ease-out 0.8s both;
    flex-wrap: wrap;
}

/* Contact Information Section */
.contact-section {
    padding: 6rem 0;
    background: #ffffff;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
}

.contact-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(139, 198, 63, 0.15);
    border-color: var(--primary);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: rgba(139, 198, 63, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-card:hover .contact-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.contact-details {
    flex: 1;
    min-width: 0; /* Prevents overflow */
    text-align: left;
}

.contact-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.contact-details p {
    color: var(--text-secondary);
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Contact Form */
.contact-form-wrapper {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(139, 198, 63, 0.1);
    height: fit-content;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.form-header {
    margin-bottom: 2rem;
    text-align: center;
}

.form-header h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(139, 198, 63, 0.2);
    border-radius: 10px;
    background: white;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.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(139, 198, 63, 0.1);
}

.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);
}

.error-message {
    display: none;
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0.5rem 0;
}

.form-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.form-checkbox label {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 400;
}

.form-submit {
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.submit-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Form Overlays */
.form-success-overlay,
.form-error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.success-content,
.error-content {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    margin: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.success-icon,
.error-icon {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.success-content h3,
.error-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.success-content p,
.error-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Location Features */
.location-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

.location-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s ease;
}

.location-feature.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(139, 198, 63, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.location-feature:hover .feature-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.feature-content {
    flex: 1;
    min-width: 0;
}

.feature-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.feature-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.location-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Map Placeholder */
.map-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(139, 198, 63, 0.1);
}

.map-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(139, 198, 63, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 198, 63, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.map-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(139, 198, 63, 0.2);
    max-width: 90%;
    word-wrap: break-word;
}

.map-marker {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.map-info h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.map-info p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse-focus {
    0% {
        box-shadow: 0 0 0 0 rgba(139, 198, 63, 0.4);
        border-color: var(--primary);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(139, 198, 63, 0.1);
        border-color: var(--primary);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(139, 198, 63, 0);
        border-color: var(--primary);
    }
}

/* =============================================
   RESPONSIVE DESIGN - Mobile First Approach
   ============================================= */

/* Tablets (768px and down) */
@media (max-width: 768px) {
    .contact-hero .hero-container {
        padding: 0 1.5rem;
        text-align: center;
    }

    .contact-hero .hero-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }

    .contact-hero .hero-subtitle {
        font-size: 1.1rem;
        max-width: 100%;
    }

    .contact-hero .hero-actions {
        justify-content: center;
        flex-direction: column;
        gap: 0.75rem;
    }

    .contact-hero .hero-actions .btn-modern {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    /* Contact Section */
    .contact-section {
        padding: 4rem 0;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
        margin-top: 2rem;
    }

    .contact-card {
        padding: 1.5rem;
        flex-direction: row;
        text-align: left;
        gap: 1rem;
    }

    .contact-card .contact-icon {
        align-self: flex-start;
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }

    .contact-details h3 {
        font-size: 1.1rem;
    }

    .contact-details p {
        font-size: 0.9rem;
    }

    /* Form */
    .contact-form-wrapper {
        padding: 2rem;
    }

    .form-header h3 {
        font-size: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 1rem;
        font-size: 1rem;
    }

    /* Location */
    .location-features {
        gap: 1.25rem;
    }

    .location-feature {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .location-actions {
        flex-direction: column;
        align-items: center;
    }

    .location-actions .btn-modern {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .map-placeholder {
        height: 300px;
    }

    .map-overlay {
        padding: 1.5rem;
        max-width: 95%;
    }

    .map-info h4 {
        font-size: 1.1rem;
    }

    .map-info p {
        font-size: 0.85rem;
    }

    /* Overlays */
    .success-content,
    .error-content {
        padding: 2rem;
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
}

/* Mobile Phones (480px and down) */
@media (max-width: 480px) {
    .contact-hero .hero-container {
        padding: 0 1rem;
    }

    .contact-hero .hero-title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
        line-height: 1.2;
    }

    .contact-hero .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }

    .contact-hero .hero-badge {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    /* Contact Section */
    .contact-section {
        padding: 3rem 0;
    }

    .contact-wrapper {
        gap: 2rem;
    }

    .contact-card {
        padding: 1.25rem;
        border-radius: 15px;
        flex-direction: row;
        gap: 1rem;
    }

    .contact-icon {
        width: 45px;
        height: 45px;
        flex-shrink: 0;
    }

    .contact-details h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .contact-details p {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    /* Form */
    .contact-form-wrapper {
        padding: 1.5rem;
        border-radius: 15px;
    }

    .form-header {
        margin-bottom: 1.5rem;
    }

    .form-header h3 {
        font-size: 1.3rem;
    }

    .form-header p {
        font-size: 0.9rem;
    }

    .contact-form {
        gap: 1.25rem;
    }

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.875rem;
        font-size: 0.95rem;
        border-radius: 8px;
    }

    .form-checkbox {
        gap: 0.5rem;
    }

    .form-checkbox label {
        font-size: 0.85rem;
    }

    .form-submit {
        margin-top: 0.75rem;
        padding: 1rem 2rem;
    }

    /* Location */
    .location-feature {
        gap: 0.75rem;
        flex-direction: row;
        align-items: flex-start;
    }

    .feature-icon {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .feature-content h4 {
        font-size: 1rem;
    }

    .feature-content p {
        font-size: 0.85rem;
    }

    .location-actions {
        gap: 0.75rem;
    }

    .map-placeholder {
        height: 250px;
        border-radius: 15px;
    }

    .map-overlay {
        padding: 1.25rem;
    }

    .map-marker svg {
        width: 36px;
        height: 36px;
    }

    .map-info h4 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .map-info p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    /* Overlays */
    .success-content,
    .error-content {
        padding: 1.5rem;
        border-radius: 15px;
    }

    .success-content h3,
    .error-content h3 {
        font-size: 1.25rem;
    }

    .success-content p,
    .error-content p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
}

/* Small Mobile Phones (360px and down) */
@media (max-width: 360px) {
    .contact-hero .hero-container {
        padding: 0 0.75rem;
    }

    .contact-hero .hero-title {
        font-size: clamp(1.5rem, 8vw, 2rem);
    }

    .contact-hero .hero-subtitle {
        font-size: 0.9rem;
    }

    .contact-card {
        padding: 1rem;
    }

    .contact-form-wrapper {
        padding: 1.25rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
    }

    .map-overlay {
        padding: 1rem;
    }

    .success-content,
    .error-content {
        padding: 1.25rem;
    }
}

/* Utility Classes for Contact Page */
.contact-loaded .contact-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

.contact-card:nth-child(1) { animation-delay: 0.1s; }
.contact-card:nth-child(2) { animation-delay: 0.2s; }
.contact-card:nth-child(3) { animation-delay: 0.3s; }
.contact-card:nth-child(4) { animation-delay: 0.4s; }

.location-feature:nth-child(1) { animation-delay: 0.1s; }
.location-feature:nth-child(2) { animation-delay: 0.2s; }
.location-feature:nth-child(3) { animation-delay: 0.3s; }

/* Focus States for Accessibility */
.contact-card:focus-within,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .contact-card {
        border: 2px solid var(--primary);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        border: 2px solid var(--text-primary);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .contact-card,
    .location-feature,
    .contact-icon,
    .feature-icon {
        animation: none;
        transition: none;
    }
    
    .spinner {
        animation: none;
    }
}