/* Professional Contact Page Layout */

.contact-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* ---- Contact Form ---- */

.contact-form {
    max-width: 600px;
    margin: 0 auto 3rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 3rem 2.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    position: relative;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-forest) 0%, var(--color-amber) 100%);
    border-radius: 16px 16px 0 0;
}

.contact-form h2 {
    font-family: var(--font-heading, 'cinzel', serif);
    color: var(--color-forest);
    font-size: 1.5rem;
    margin: 0;
    text-align: center;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: system-ui, -apple-system, sans-serif;
    transition: all 0.3s ease;
    background: #fafbfc;
    box-sizing: border-box;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form input[type="tel"]:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-forest);
    background: white;
    box-shadow: 0 0 0 4px rgba(39, 78, 54, 0.1);
}

.contact-form input[type="text"]::placeholder,
.contact-form input[type="email"]::placeholder,
.contact-form input[type="tel"]::placeholder,
.contact-form textarea::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.5;
}

.contact-form-note {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: -0.5rem 0 0.5rem;
    font-style: italic;
}

/* Wildlife emergency alert */
.contact-wildlife-alert {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
    border: 2px solid var(--color-amber);
    border-radius: 10px;
    margin-top: 0.5rem;
}

.contact-wildlife-alert-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.contact-wildlife-alert-content {
    flex: 1;
}

.contact-wildlife-alert-content > strong:first-child {
    font-size: 1rem;
    color: #92400e;
    display: block;
    margin-bottom: 0.35rem;
}

.contact-wildlife-alert-content p {
    font-size: 0.85rem;
    color: #78350f;
    line-height: 1.5;
    margin: 0 0 0.5rem;
}

.contact-wildlife-alert-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 0.6rem 1.25rem;
    background: var(--color-forest);
    border-radius: 8px;
    border: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(45, 80, 22, 0.3);
}

.contact-wildlife-alert-phone::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.contact-wildlife-alert-phone:hover {
    background: var(--color-forest-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.4);
    color: #ffffff !important;
}

.contact-wildlife-alert-sub {
    font-size: 0.9rem !important;
    color: #92400e !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0 !important;
    font-weight: 500;
}

.contact-info-hotline p strong {
    color: #86efac !important;
}

.contact-hotline-note {
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.7) !important;
    margin-top: 0.5rem !important;
}

/* Validation messages */
.contact-msg {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    animation: contactMsgIn 0.3s ease;
}

.contact-msg-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.contact-msg-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

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

/* Field error highlight */
.contact-field-error {
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
}

.contact-field-error:focus {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1) !important;
    border-color: #dc2626 !important;
}

#send-message-btn {
    margin-top: 1rem;
    width: 100%;
    position: static;
    transform: none;
}

#send-message-btn button {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--color-forest);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: var(--font-heading, 'cinzel-bold', serif);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#send-message-btn button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

#send-message-btn button:hover {
    background: var(--color-forest-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 78, 54, 0.3);
}

#send-message-btn button:hover::before {
    left: 100%;
}

#send-message-btn button:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(39, 78, 54, 0.2);
}

/* ---- Form Feedback ---- */

.contact-success,
.contact-error {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    text-align: center;
    font-family: system-ui, -apple-system, sans-serif;
    animation: slideInFade 0.4s ease;
}

.contact-success {
    background: #10b981;
    color: white;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.contact-error {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

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

.contact-form input.invalid,
.contact-form textarea.invalid {
    border-color: #ef4444;
    background: #fef2f2;
}

.contact-form input.valid,
.contact-form textarea.valid {
    border-color: #10b981;
    background: #f0fdf4;
}

#send-message-btn button.loading {
    pointer-events: none;
    opacity: 0.7;
}

#send-message-btn button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---- Contact Info Cards ---- */

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-info-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.contact-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.contact-info-hotline {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--color-forest) 0%, var(--color-forest-light) 100%);
    color: white;
}

.contact-info-hotline h3 {
    color: white !important;
}

.contact-info-hotline p {
    color: rgba(255, 255, 255, 0.9) !important;
}

.contact-info-hotline .contact-highlight {
    color: var(--color-amber);
}

.contact-info-hotline .contact-info-icon {
    color: var(--color-amber);
}

.contact-info-hotline a {
    color: var(--color-amber) !important;
}

.contact-info-icon {
    color: var(--color-forest);
    margin-bottom: 1rem;
}

.contact-info-card h3 {
    font-family: var(--font-heading, 'cinzel', serif);
    font-size: 1.2rem;
    color: var(--color-forest);
    margin: 0 0 0.75rem;
}

.contact-info-card p {
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--color-text, #4a5568);
    line-height: 1.6;
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.contact-info-card p:last-child {
    margin-bottom: 0;
}

.contact-highlight {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading, 'cinzel', serif);
    color: var(--color-forest);
    margin-bottom: 0.75rem !important;
}

.contact-note {
    font-size: 0.9rem !important;
    color: var(--color-text-light, #718096) !important;
}

.contact-info-card a {
    color: var(--color-forest);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

.contact-info-card a:hover {
    color: var(--color-forest-light);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .contact-page {
        padding: 2rem 1rem;
    }

    .contact-form {
        padding: 2rem 1.5rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }

    .contact-info-grid {
        grid-template-columns: 1fr;
    }

    #send-message-btn button {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .contact-form {
        padding: 1.5rem 1rem;
    }

    .contact-form input[type="text"],
    .contact-form input[type="email"],
    .contact-form textarea {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
}
