/* ===== Contact Modal ===== */
#contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#contact-modal.show {
    opacity: 1;
}

.contact-modal-overlay {
    width: 100%;
    height: 100%;
    background: rgba(27, 39, 50, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.contact-modal-content {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: slideUpModal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.contact-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-soft);
    cursor: pointer;
    padding: 0.5rem;
    transition: all var(--transition);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-modal-close:hover {
    background: var(--bg-soft);
    color: var(--text);
    transform: rotate(90deg);
}

.contact-modal-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.contact-modal-intro {
    color: var(--text-soft);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ===== Form Styles ===== */
.contact-form-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text);
    background: var(--bg-soft);
    transition: all var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-alt);
    box-shadow: 0 0 0 3px rgba(13, 85, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-faint);
}

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

.char-counter {
    color: var(--text-faint);
    font-size: 0.875rem;
    text-align: right;
}

.form-actions {
    margin-top: 0.5rem;
}

.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--accent-grad);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgba(36, 107, 255, 0.6);
}

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

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

.spinner-border {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== Form Feedback ===== */
.form-feedback {
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    margin-top: 1rem;
    display: none;
}

.form-feedback.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-feedback.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== Contact CTA Button (Header) ===== */
.btn-contact-cta {
    padding: 0.75rem 1.5rem;
    background: var(--accent-grad);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition);
    cursor: pointer;
    box-shadow: 0 4px 12px -4px rgba(36, 107, 255, 0.4);
}

.btn-contact-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgba(36, 107, 255, 0.6);
    color: white;
    text-decoration: none;
}

.btn-contact-cta:active {
    transform: translateY(0);
}

.btn-contact-cta svg {
    width: 18px;
    height: 18px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .contact-modal-content {
        padding: 2rem 1.5rem;
        max-height: 95vh;
    }

    .contact-modal-content h2 {
        font-size: 1.5rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem 0.875rem;
        font-size: 0.95rem;
    }

    .btn-submit {
        padding: 0.875rem 1.5rem;
    }
}

/* Smooth scroll when modal is open */
body:has(#contact-modal.show) {
    overflow: hidden;
}

/* ===== Toast Notification ===== */
.toast-notification {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 1.25rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 500px;
    width: 90%;
    transition: top 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid #10b981;
}

.toast-notification.show {
    top: 2rem;
}

.toast-notification.error {
    border-left-color: #ef4444;
}

.toast-notification.success {
    border-left-color: #10b981;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #1b2732;
}

.toast-message {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #64748b;
}

@media (max-width: 768px) {
    .toast-notification {
        padding: 1rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .toast-notification.show {
        top: 1rem;
    }
}
