/* ============================================
   Contact Page - Premium Gaming Design
   ============================================ */

/* Page Hero Section */
.page-hero {
    position: relative;
    padding: 140px 0 80px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    height: 100%;
    background: 
        radial-gradient(ellipse 600px 400px at 50% 0%, var(--primary-bg) 0%, transparent 70%),
        radial-gradient(ellipse 400px 300px at 20% 50%, rgba(234, 3, 9, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 400px 300px at 80% 50%, rgba(234, 3, 9, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
    text-shadow: 0 0 60px var(--primary-glow);
    animation: fadeInUp 0.6s ease-out;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact Section */
.contact-section {
    padding: var(--space-16) 0 var(--space-20);
    position: relative;
}

.contact-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* Contact Content Grid */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: var(--space-10);
    align-items: start;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

@media (max-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
}

/* Contact Info Side */
.contact-info {
    position: sticky;
    top: 120px;
}

.contact-info h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.contact-info h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 2px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.info-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.info-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateX(8px);
}

.info-item:hover::before {
    transform: scaleY(1);
}

.info-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-bg) 0%, rgba(234, 3, 9, 0.1) 100%);
    border: 1px solid rgba(234, 3, 9, 0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-light);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.info-item:hover .info-icon {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(234, 3, 9, 0.3);
}

.info-text {
    flex: 1;
}

.info-text h3 {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-1);
}

.info-text p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    transition: color 0.3s ease;
}

.info-item:hover .info-text p {
    color: var(--primary-light);
}

/* Contact Form Wrapper */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    position: relative;
    overflow: hidden;
}

.contact-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
}

.contact-form-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary-bg) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.5;
}

.contact-form-wrapper h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-6);
    position: relative;
    z-index: 1;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    position: relative;
    z-index: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: var(--primary-light);
}

.form-group input,
.form-group textarea {
    padding: var(--space-4) var(--space-5);
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: var(--border-light);
    background: var(--bg-tertiary);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: var(--bg-tertiary);
    box-shadow: 0 0 0 4px var(--primary-bg);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

/* reCAPTCHA styling */
.form-group:has(.g-recaptcha) {
    align-items: center;
}

.form-group .g-recaptcha {
    margin-top: var(--space-2);
    transform-origin: center top;
}

@media (max-width: 400px) {
    .form-group .g-recaptcha {
        transform: scale(0.85);
    }
}

/* Form Message */
.form-message {
    padding: var(--space-4);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 500;
    text-align: center;
    display: none;
}

.form-message.success {
    display: block;
    background: var(--success-bg);
    border: 1px solid var(--success);
    color: var(--success);
}

.form-message.error {
    display: block;
    background: var(--error-bg);
    border: 1px solid var(--error);
    color: var(--error);
}

/* Submit Button */
.contact-form .btn-primary {
    width: 100%;
    padding: var(--space-4) var(--space-6);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-display);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: var(--space-2);
}

.contact-form .btn-primary::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;
}

.contact-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(234, 3, 9, 0.4);
}

.contact-form .btn-primary:hover::before {
    left: 100%;
}

.contact-form .btn-primary:active {
    transform: translateY(0);
}

/* Decorative Elements */
.contact-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 300px;
    height: 500px;
    background: radial-gradient(ellipse, var(--primary-bg) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.3;
}

.contact-section::after {
    content: '';
    position: absolute;
    top: 30%;
    right: 0;
    width: 300px;
    height: 500px;
    background: radial-gradient(ellipse, var(--primary-bg) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.3;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .page-hero {
        padding: 120px 0 60px;
    }
    
    .contact-section {
        padding: var(--space-12) 0 var(--space-16);
    }
    
    .contact-info {
        position: static;
    }
    
    .contact-form-wrapper {
        padding: var(--space-6);
    }
    
    .info-item {
        padding: var(--space-4);
    }
    
    .info-icon {
        width: 44px;
        height: 44px;
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .contact-form-wrapper h2,
    .contact-info h2 {
        font-size: 1.25rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: var(--space-3) var(--space-4);
    }
}

/* Dark theme enhancements */
[data-theme="dark"] .contact-form-wrapper {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .info-item {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: rgba(0, 0, 0, 0.3);
}

/* Loading state for submit button */
.contact-form .btn-primary.loading {
    pointer-events: none;
    opacity: 0.7;
}

.contact-form .btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Success animation */
@keyframes successPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

.form-message.success {
    animation: successPulse 2s ease-in-out;
}
