/* =========================================
   CONTACT PAGE - MODERN RESPONSIVE DESIGN
   ========================================= */

/* CSS Variables for Easy Theming */
:root {
    --primary-color: #003580;
    --primary-dark: #002147;
    --primary-light: #0056b3;
    --accent-color: #ff4500;
    --accent-hover: #d63a00;
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --text-light: #94a3b8;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* =========================================
   HERO SECTION
   ========================================= */
.contact-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--primary-light) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   MAIN CONTACT SECTION
   ========================================= */
.main-contact-section {
    padding: 60px 20px;
    max-width: 1400px;
    margin: -40px auto 60px;
    position: relative;
    z-index: 10;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* =========================================
   CONTACT FORM CARD
   ========================================= */
.contact-form-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
}

.contact-form-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 30px rgba(0, 0, 0, 0.2);
}

.card-header {
    margin-bottom: 30px;
}

.card-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: 700;
}

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

/* Success Alert */
.success-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #d1fae5;
    border: 1px solid var(--success-color);
    color: #065f46;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon {
    width: 24px;
    height: 24px;
    color: var(--success-color);
    flex-shrink: 0;
}

/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.input-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-light);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(0, 53, 128, 0.1);
}

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

/* reCAPTCHA Wrapper */
.recaptcha-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    display: none;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Submit Button */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* =========================================
   CONTACT INFO SECTION
   ========================================= */
.contact-info-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-md);
    display: flex;
    gap: 20px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.info-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.info-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.location-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.email-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.phone-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.info-content {
    flex: 1;
}

.info-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.info-content p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.info-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.info-link:hover {
    color: var(--accent-color);
    gap: 10px;
}

.info-link svg {
    width: 16px;
    height: 16px;
}

/* =========================================
   MAP SECTION
   ========================================= */
.map-section {
    background: var(--bg-white);
    padding: 80px 20px;
    margin-top: 40px;
}

.map-container {
    max-width: 1400px;
    margin: 0 auto;
}

.map-container h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-dark);
    font-weight: 700;
}

.map-wrapper {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    height: 500px;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

/* Tablets (768px - 1023px) */
@media (max-width: 1023px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-hero {
        padding: 60px 20px;
    }

    .main-contact-section {
        margin-top: -30px;
        padding: 40px 20px;
    }

    .contact-form-card {
        padding: 30px;
    }

    .map-wrapper {
        height: 400px;
    }
}

/* Mobile Landscape (576px - 767px) */
@media (max-width: 767px) {
    .contact-hero {
        padding: 50px 20px;
    }

    .main-contact-section {
        padding: 30px 15px;
        margin-top: -25px;
    }

    .contact-form-card,
    .info-card {
        padding: 24px;
    }

    .card-header h2 {
        font-size: 1.5rem;
    }

    .info-card {
        flex-direction: column;
        text-align: center;
    }

    .info-icon {
        margin: 0 auto;
    }

    .map-wrapper {
        height: 350px;
    }

    .map-section {
        padding: 50px 15px;
    }
}

/* Mobile Portrait (up to 575px) */
@media (max-width: 575px) {
    .contact-hero {
        padding: 40px 15px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .main-contact-section {
        padding: 20px 10px;
    }

    .contact-form-card {
        padding: 20px;
        border-radius: 8px;
    }

    .card-header {
        margin-bottom: 20px;
    }

    .card-header h2 {
        font-size: 1.35rem;
    }

    .card-header p {
        font-size: 0.9rem;
    }

    .contact-form {
        gap: 18px;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .submit-btn {
        padding: 14px 24px;
        font-size: 1rem;
    }

    .info-card {
        padding: 20px;
        border-radius: 8px;
    }

    .info-icon {
        width: 48px;
        height: 48px;
    }

    .info-icon svg {
        width: 24px;
        height: 24px;
    }

    .info-content h3 {
        font-size: 1.1rem;
    }

    .info-content p {
        font-size: 0.875rem;
    }

    .map-wrapper {
        height: 300px;
        border-radius: 8px;
    }

    .map-section {
        padding: 40px 10px;
    }

    .map-container h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }

    /* Adjust reCAPTCHA for mobile */
    .g-recaptcha {
        transform: scale(0.95);
        transform-origin: 0 0;
    }
}

/* Extra Small Mobile (up to 375px) */
@media (max-width: 375px) {
    .contact-hero {
        padding: 30px 10px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .contact-form-card {
        padding: 16px;
    }

    .info-card {
        padding: 16px;
    }

    .g-recaptcha {
        transform: scale(0.85);
    }

    .map-wrapper {
        height: 250px;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f1f5f9;
        --text-gray: #94a3b8;
        --text-light: #64748b;
        --bg-light: #0f172a;
        --bg-white: #1e293b;
        --border-color: #334155;
    }

    .success-alert {
        background: #064e3b;
        color: #d1fae5;
    }
}

/* Print Styles */
@media print {
    .contact-hero,
    .submit-btn,
    .g-recaptcha {
        display: none;
    }

    .contact-wrapper {
        display: block;
    }

    .info-card {
        page-break-inside: avoid;
    }
}
