/**
 * Contact Page Mobile Enhancements
 * Optimizes personal communication and contact information for mobile
 * 
 * Perfect for mobile networking and professional contact
 */

@media (max-width: 768px) {
    
    /* ============================================
       MOBILE LAYOUT OPTIMIZATION
       ============================================ */
    
    .container {
        padding: 30px 15px !important;
        min-height: auto !important;
        justify-content: flex-start !important;
    }
    
    /* ============================================
       MOBILE HEADER SECTION
       ============================================ */
    
    header {
        margin-bottom: 30px !important;
    }
    
    .name {
        font-size: 2.2em !important;
        margin-bottom: 8px !important;
        letter-spacing: 1px;
    }
    
    .company {
        font-size: 1.2em !important;
        color: #4ecdc4 !important;
        font-weight: 500;
        margin-bottom: 6px;
    }
    
    .title {
        font-size: 1em !important;
        color: #888 !important;
        font-weight: 400;
    }
    
    /* ============================================
       MOBILE CONTACT METHODS
       ============================================ */
    
    .contact-methods {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        margin-bottom: 30px;
    }
    
    .contact-method {
        background: linear-gradient(135deg, #111 0%, #1a1a1a 100%) !important;
        border: 1px solid #333 !important;
        border-radius: 12px !important;
        padding: 18px !important;
        text-decoration: none !important;
        color: inherit !important;
        transition: all 0.3s ease;
        display: flex !important;
        align-items: center !important;
        gap: 15px;
        min-height: 70px;
    }
    
    .contact-method:active {
        transform: scale(0.98);
        border-color: #4ecdc4;
        background: linear-gradient(135deg, #1a1a1a 0%, #222 100%) !important;
    }
    
    .contact-icon {
        font-size: 2em !important;
        width: 40px;
        text-align: center;
        flex-shrink: 0;
    }
    
    .contact-info {
        flex: 1;
    }
    
    .contact-label {
        font-size: 0.9em !important;
        color: #888 !important;
        font-weight: 500;
        margin-bottom: 2px;
    }
    
    .contact-value {
        font-size: 1.1em !important;
        color: #fff !important;
        font-weight: 600;
        word-break: break-all;
    }
    
    /* Specific contact method styling */
    .email-method .contact-icon { color: #ff6b6b; }
    .phone-method .contact-icon { color: #4ecdc4; }
    .social-method .contact-icon { color: #667eea; }
    .location-method .contact-icon { color: #ffc107; }
    
    /* ============================================
       MOBILE CONTACT FORM
       ============================================ */
    
    .contact-form {
        background: #0a0a0a !important;
        border: 1px solid #222 !important;
        border-radius: 12px !important;
        padding: 25px !important;
        margin-bottom: 30px;
    }
    
    .form-title {
        font-size: 1.4em !important;
        color: #fff !important;
        font-weight: 600;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    .form-group label {
        display: block;
        font-size: 0.9em;
        color: #ccc;
        font-weight: 500;
        margin-bottom: 8px;
    }
    
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group select,
    .form-group textarea {
        width: 100% !important;
        min-height: 48px !important;
        padding: 14px 16px !important;
        font-size: 16px !important; /* Prevent iOS zoom */
        border: 2px solid #333 !important;
        border-radius: 10px !important;
        background: #222 !important;
        color: #fff !important;
        font-family: inherit;
        transition: border-color 0.3s ease;
    }
    
    .form-group textarea {
        min-height: 120px !important;
        resize: vertical;
        line-height: 1.6;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: #4ecdc4 !important;
        outline: none;
        box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
    }
    
    .form-group input::placeholder,
    .form-group textarea::placeholder {
        color: #666;
        font-style: italic;
    }
    
    /* Character counter for message */
    .char-counter {
        font-size: 0.8em;
        color: #888;
        text-align: right;
        margin-top: 4px;
    }
    
    .char-counter.warning {
        color: #ffc107;
    }
    
    .char-counter.error {
        color: #ff6b6b;
    }
    
    /* ============================================
       MOBILE FORM SUBMIT BUTTON
       ============================================ */
    
    .submit-btn,
    .send-message-btn {
        width: 100% !important;
        min-height: 54px !important;
        background: linear-gradient(135deg, #4ecdc4 0%, #44b3a8 100%) !important;
        color: #000 !important;
        border: none !important;
        border-radius: 12px !important;
        font-size: 1.1em !important;
        font-weight: 600 !important;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px;
        box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
        margin-top: 20px;
        text-transform: none;
        letter-spacing: 0.5px;
    }
    
    .submit-btn::before,
    .send-message-btn::before {
        content: "📧";
        font-size: 1.3em;
    }
    
    .submit-btn:hover:not(:disabled),
    .send-message-btn:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
    }
    
    .submit-btn:active:not(:disabled),
    .send-message-btn:active:not(:disabled) {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
    }
    
    .submit-btn:disabled,
    .send-message-btn:disabled {
        background: #333 !important;
        color: #666 !important;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }
    
    /* Loading state */
    .submitting .submit-btn::before,
    .submitting .send-message-btn::before {
        content: "⏳";
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }
    
    /* ============================================
       MOBILE BUSINESS CARD SECTION
       ============================================ */
    
    .business-card {
        background: linear-gradient(135deg, #0a0a0a 0%, #111 100%) !important;
        border: 1px solid #333 !important;
        border-radius: 12px !important;
        padding: 25px !important;
        margin-bottom: 25px;
        text-align: center;
        position: relative;
        overflow: hidden;
    }
    
    .business-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(78, 205, 196, 0.05) 0%, rgba(102, 126, 234, 0.05) 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    
    .business-card:active::before {
        opacity: 1;
    }
    
    .card-name {
        font-size: 1.6em;
        font-weight: 700;
        color: #fff;
        margin-bottom: 6px;
    }
    
    .card-title {
        font-size: 1em;
        color: #4ecdc4;
        font-weight: 500;
        margin-bottom: 4px;
    }
    
    .card-company {
        font-size: 0.9em;
        color: #888;
        margin-bottom: 15px;
    }
    
    .card-actions {
        display: flex;
        gap: 8px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .card-action {
        padding: 8px 16px;
        background: rgba(78, 205, 196, 0.1);
        border: 1px solid #4ecdc4;
        border-radius: 20px;
        color: #4ecdc4;
        text-decoration: none;
        font-size: 0.85em;
        font-weight: 500;
        transition: all 0.3s ease;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .card-action:active {
        background: #4ecdc4;
        color: #000;
        transform: scale(0.95);
    }
    
    /* ============================================
       MOBILE DOWNLOAD VCARD
       ============================================ */
    
    .download-vcard {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: #fff !important;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        text-decoration: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .download-vcard::before {
        content: "📇";
        font-size: 1.3em;
    }
    
    .download-vcard:hover,
    .download-vcard:active {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
        transform: translateY(-2px);
    }
    
    /* ============================================
       MOBILE STATUS MESSAGES
       ============================================ */
    
    .status-message {
        padding: 15px 20px !important;
        border-radius: 10px !important;
        font-size: 0.95em !important;
        text-align: center;
        margin-bottom: 20px;
        font-weight: 500;
        border: 1px solid transparent;
    }
    
    .status-success {
        background: rgba(78, 205, 196, 0.1) !important;
        color: #4ecdc4 !important;
        border-color: #4ecdc4 !important;
    }
    
    .status-error {
        background: rgba(255, 107, 107, 0.1) !important;
        color: #ff6b6b !important;
        border-color: #ff4444 !important;
    }
    
    .status-info {
        background: rgba(102, 126, 234, 0.1) !important;
        color: #667eea !important;
        border-color: #667eea !important;
    }
    
    /* ============================================
       MOBILE SOCIAL LINKS
       ============================================ */
    
    .social-links {
        display: flex !important;
        justify-content: center !important;
        gap: 12px !important;
        margin-bottom: 25px;
        flex-wrap: wrap;
    }
    
    .social-link {
        min-width: 48px !important;
        min-height: 48px !important;
        background: #222 !important;
        border: 1px solid #333 !important;
        border-radius: 50% !important;
        color: #ccc !important;
        text-decoration: none !important;
        font-size: 1.3em !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.3s ease;
    }
    
    .social-link:active {
        transform: scale(0.9);
        border-color: #4ecdc4;
        color: #4ecdc4;
    }
    
    /* Platform-specific colors */
    .social-link.twitter:active { color: #1da1f2; border-color: #1da1f2; }
    .social-link.linkedin:active { color: #0077b5; border-color: #0077b5; }
    .social-link.github:active { color: #333; border-color: #333; background: #fff; }
    .social-link.email:active { color: #ff6b6b; border-color: #ff6b6b; }
    
    /* ============================================
       MOBILE FOOTER
       ============================================ */
    
    footer {
        text-align: center !important;
        margin-top: 30px !important;
        padding-top: 25px !important;
        border-top: 1px solid #333 !important;
        font-size: 0.8em !important;
        color: #666 !important;
        line-height: 1.5;
    }
    
    /* ============================================
       MOBILE KEYBOARD OPTIMIZATIONS
       ============================================ */
    
    /* Ensure forms don't get covered by keyboard */
    .form-group input:focus,
    .form-group textarea:focus {
        scroll-margin-top: 20px;
        scroll-margin-bottom: 120px;
    }
    
    /* iOS keyboard handling */
    body.keyboard-open .business-card,
    body.keyboard-open .social-links,
    body.keyboard-open footer {
        display: none !important;
    }
    
    body.keyboard-open .contact-methods {
        display: none !important;
    }
    
    /* ============================================
       MOBILE COPY TO CLIPBOARD
       ============================================ */
    
    .copy-success {
        position: fixed;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(78, 205, 196, 0.95) !important;
        color: #000 !important;
        padding: 12px 20px;
        border-radius: 25px;
        font-size: 0.9em;
        font-weight: 600;
        z-index: 1000;
        animation: copyFeedback 2s ease;
    }
    
    @keyframes copyFeedback {
        0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
        15% { opacity: 1; transform: translateX(-50%) translateY(0); }
        85% { opacity: 1; transform: translateX(-50%) translateY(0); }
        100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    }
    
    /* ============================================
       MOBILE UTILITY CLASSES
       ============================================ */
    
    .mobile-hidden { display: none !important; }
    .mobile-only { display: block !important; }
    .mobile-center { text-align: center !important; }
    .mobile-full-width { width: 100% !important; }
    .mobile-stack { flex-direction: column !important; }
    .mobile-small-text { font-size: 0.85em !important; }
    
    /* ============================================
       MOBILE ACCESSIBILITY ENHANCEMENTS
       ============================================ */
    
    /* Enhanced touch targets */
    .contact-method,
    .card-action,
    .social-link,
    .submit-btn {
        min-height: 48px !important;
        touch-action: manipulation;
    }
    
    /* Better focus indicators */
    .form-group input:focus,
    .form-group textarea:focus,
    .submit-btn:focus {
        box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.5) !important;
    }
    
    /* Improved contrast for mobile screens */
    .contact-value,
    .card-name {
        color: #fff !important;
    }
    
    .contact-label,
    .card-company {
        color: #bbb !important;
    }
}