/* ========================================
   CONTACT PAGE STYLES
   ======================================== */

/* Contact Hero */
.contact-hero {
    position: relative;
    padding: calc(var(--space-3xl) + 80px) 0 var(--space-3xl);
    overflow: hidden;
    min-height: 50vh;
    display: flex;
    align-items: center;
}

.contact-hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    z-index: 2;
}

.contact-hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    color: var(--color-text);
}

.contact-hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Contact Section */
.contact-section {
    padding: var(--space-3xl) 0;
    position: relative;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-3xl);
    align-items: start;
}

/* Contact Info Cards */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    position: sticky;
    top: 120px;
}

.info-card {
    padding: var(--space-xl);
    background: rgba(26, 26, 36, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
    background: rgba(26, 26, 36, 0.8);
}

.info-card:hover::before {
    transform: scaleX(1);
}

.info-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:hover .info-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(99, 102, 241, 0.2);
}

.info-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.info-card p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.info-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    opacity: 0.7;
}

.info-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    transition: all 0.3s ease;
}

.info-link:hover {
    gap: var(--space-sm);
    color: var(--color-accent);
}

/* Form Container */
.contact-form-container {
    position: relative;
}

.form-card {
    background: rgba(26, 26, 36, 0.6);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.form-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

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

.form-header {
    margin-bottom: var(--space-3xl);
    text-align: center;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--space-md);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-header p {
    color: var(--color-text-secondary);
    font-size: 1.125rem;
}

/* Form Styles */
.contact-form {
    position: relative;
    z-index: 1;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.form-group {
    margin-bottom: var(--space-xl);
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

/* 3D Input Effects */
.input-wrapper {
    position: relative;
    perspective: 1000px;
}

.input-wrapper input,
.input-wrapper textarea {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 1rem;
    font-family: var(--font-base);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    transform-style: preserve-3d;
}

.input-wrapper input:focus,
.input-wrapper textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-primary);
    transform: translateY(-4px) translateZ(20px);
    box-shadow:
        0 10px 30px rgba(99, 102, 241, 0.3),
        0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Input Border Animation */
.input-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.input-wrapper input:focus ~ .input-border,
.input-wrapper textarea:focus ~ .input-border {
    opacity: 0.2;
    animation: borderPulse 2s ease-in-out infinite;
}

@keyframes borderPulse {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.02); opacity: 0.3; }
}

/* Input Glow Effect */
.input-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: var(--radius-md);
    filter: blur(20px);
}

.input-wrapper input:focus ~ .input-glow,
.input-wrapper textarea:focus ~ .input-glow {
    opacity: 1;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* Input Icons */
.input-icon {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 2;
}

.input-wrapper input:focus ~ .input-icon {
    color: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}

.input-wrapper input:not(:placeholder-shown) ~ .input-icon {
    color: var(--color-primary);
}

/* Textarea specific */
.textarea-wrapper textarea {
    resize: vertical;
    min-height: 120px;
}

.textarea-wrapper .input-icon {
    top: var(--space-md);
    transform: translateY(0);
}

/* Error Messages */
.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: var(--space-xs);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.form-group.error .error-message {
    opacity: 1;
    transform: translateY(0);
}

.form-group.error input,
.form-group.error textarea {
    border-color: #ef4444;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.submit-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 20px 60px rgba(99, 102, 241, 0.5),
        0 0 0 4px rgba(99, 102, 241, 0.2);
}

.submit-btn:active {
    transform: translateY(-2px) scale(0.98);
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-icon {
    position: relative;
    z-index: 2;
    display: inline-flex;
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-icon {
    transform: translateX(4px) rotate(-15deg);
}

/* Button Shine Effect */
.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.submit-btn:hover .btn-shine {
    left: 100%;
}

/* Success Message */
.success-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(26, 26, 36, 0.95);
    backdrop-filter: blur(30px);
    border: 2px solid #10b981;
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    width: 90%;
    max-width: 400px;
}

.success-message.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.success-icon {
    margin: 0 auto var(--space-lg);
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successPop {
    0% { transform: scale(0) rotate(-180deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.success-message h3 {
    font-size: 1.5rem;
    color: #10b981;
    margin-bottom: var(--space-md);
}

.success-message p {
    color: var(--color-text-secondary);
}

/* Language Switcher */
.lang-switch {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}
.lang-switch:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.1);
}
.lang-flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
}

/* Light Theme Adjustments */
body.light-theme .info-card,
body.light-theme .form-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .info-card:hover,
body.light-theme .form-card:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
}

body.light-theme .input-wrapper input,
body.light-theme .input-wrapper textarea {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1a1a24;
}

body.light-theme .input-wrapper input:focus,
body.light-theme .input-wrapper textarea:focus {
    background: rgba(0, 0, 0, 0.05);
    box-shadow:
        0 10px 30px rgba(99, 102, 241, 0.2),
        0 0 0 4px rgba(99, 102, 241, 0.05);
}

body.light-theme .success-message {
    background: rgba(255, 255, 255, 0.95);
}

/* Responsive */
@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .contact-info {
        position: relative;
        top: 0;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: var(--space-md);
    }

    .info-card {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .contact-hero {
        padding: calc(var(--space-2xl) + 80px) 0 var(--space-2xl);
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 0;
    }

    .form-card {
        padding: var(--space-2xl) var(--space-xl);
    }

    .contact-info {
        flex-direction: column;
    }

    .info-card {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .contact-hero-title {
        font-size: 2rem;
    }

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

/* Floating Animation for form on load */
@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-card {
    animation: floatIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card {
    animation: floatIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:nth-child(1) { animation-delay: 0.1s; }
.info-card:nth-child(2) { animation-delay: 0.2s; }
.info-card:nth-child(3) { animation-delay: 0.3s; }
