/* ======================================= */
/* CONTACT PAGE - 3D/4D HYPERSPACE DESIGN */
/* ======================================= */

/* Page Header with Video Hero */
.page-header {
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    isolation: isolate;
}

/* Video Background */
.page-header-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.page-header-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.35) contrast(1.2) hue-rotate(5deg);
    transform: scale(1.01);
    transition: transform 25s ease;
}

.page-header:hover .page-header-video {
    transform: scale(1.08);
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(145deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.8) 100%),
        radial-gradient(circle at 20% 30%, rgba(110,231,183,0.2) 0%, transparent 60%),
        radial-gradient(circle at 80% 70%, rgba(110,231,183,0.15) 0%, transparent 60%);
    z-index: -1;
}

/* 3D Floating Crystals */
.page-header .crystal {
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(110, 231, 183, 0.03);
    border: 1px solid rgba(110, 231, 183, 0.2);
    transform-style: preserve-3d;
    animation: crystalFloat 20s infinite ease-in-out;
    z-index: 0;
    pointer-events: none;
    backdrop-filter: blur(5px);
}

.page-header .crystal::before,
.page-header .crystal::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(110, 231, 183, 0.15);
}

.page-header .crystal::before {
    transform: rotateX(60deg) rotateY(30deg) translateZ(30px);
}

.page-header .crystal::after {
    transform: rotateY(60deg) rotateX(30deg) translateZ(30px);
}

.page-header .crystal-1 {
    top: 10%;
    left: 5%;
    width: 200px;
    height: 200px;
    animation-delay: 0s;
}

.page-header .crystal-2 {
    bottom: 15%;
    right: 8%;
    width: 250px;
    height: 250px;
    animation-delay: -5s;
}

.page-header .crystal-3 {
    top: 40%;
    right: 15%;
    width: 120px;
    height: 120px;
    animation-delay: -10s;
}

.page-header .crystal-4 {
    bottom: 25%;
    left: 10%;
    width: 180px;
    height: 180px;
    animation-delay: -15s;
}

/* 4D Hyperspace Portal */
.page-header .portal {
    position: absolute;
    width: 600px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: conic-gradient(from 0deg, 
        transparent, 
        rgba(110, 231, 183, 0.1), 
        transparent, 
        rgba(110, 231, 183, 0.1), 
        transparent, 
        rgba(110, 231, 183, 0.1), 
        transparent);
    animation: portalSpin 30s linear infinite;
    z-index: 0;
    opacity: 0.2;
    filter: blur(30px);
}

/* Quantum Energy Field */
.page-header .energy-field {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(110,231,183,0.1) 0%, transparent 70%);
    animation: energyPulse 8s ease-in-out infinite;
    z-index: 0;
}

/* Floating Particles - Different from services page */
.page-header .plasma-particle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    filter: blur(4px);
    animation: plasmaFlow 25s infinite linear;
    z-index: 0;
    opacity: 0.2;
    box-shadow: 0 0 40px var(--accent);
}

.page-header .plasma-1 { top: 15%; left: 20%; animation-delay: 0s; width: 20px; height: 20px; }
.page-header .plasma-2 { top: 25%; left: 80%; animation-delay: -3s; width: 15px; height: 15px; }
.page-header .plasma-3 { top: 45%; left: 35%; animation-delay: -6s; width: 25px; height: 25px; }
.page-header .plasma-4 { top: 65%; left: 70%; animation-delay: -9s; width: 10px; height: 10px; }
.page-header .plasma-5 { top: 75%; left: 45%; animation-delay: -12s; width: 18px; height: 18px; }
.page-header .plasma-6 { top: 35%; left: 55%; animation-delay: -15s; width: 22px; height: 22px; }
.page-header .plasma-7 { top: 85%; left: 15%; animation-delay: -18s; width: 12px; height: 12px; }
.page-header .plasma-8 { top: 55%; left: 90%; animation-delay: -21s; width: 16px; height: 16px; }

.page-header-content {
    text-align: center;
    z-index: 10;
    max-width: 900px;
    padding: 0 20px;
    position: relative;
    animation: headerReveal 1.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.page-header-content h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--white) 0%, var(--accent) 30%, #a8e6cf 60%, var(--white) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 60px rgba(110, 231, 183, 0.4);
    animation: titleWave 4s ease-in-out infinite;
}

.page-header-content p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 300;
    line-height: 1.6;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 60px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Contact Section - 4D Enhanced */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    position: relative;
    z-index: 10;
}

/* Contact Info with 4D Effects */
.contact-info {
    padding-right: 40px;
    position: relative;
    animation: slideInLeft 1s ease forwards;
}

.contact-info h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--white) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.contact-info h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 2px;
    animation: lineWidth 3s ease-in-out infinite;
}

.contact-info p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    line-height: 1.8;
    font-weight: 300;
}

.contact-details {
    margin-top: 50px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.contact-item:hover {
    transform: translateX(15px) translateY(-5px) rotateX(2deg) rotateY(2deg);
    background: rgba(110, 231, 183, 0.05);
    border-color: rgba(110, 231, 183, 0.3);
    box-shadow: 0 20px 30px -15px rgba(110, 231, 183, 0.3);
}

.contact-item i {
    color: var(--accent);
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(110, 231, 183, 0.1);
    border-radius: 50%;
    transition: all 0.4s ease;
}

.contact-item:hover i {
    transform: scale(1.2) rotateY(180deg);
    background: var(--accent);
    color: var(--black);
}

.contact-item h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--white);
}

.contact-item p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
    font-size: 1rem;
}

/* Contact Form - 4D Interactive */
.contact-form-container {
    position: relative;
    animation: slideInRight 1s ease forwards;
}

.contact-form {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 40px;
    padding: 60px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* 4D Rotating Border */
.contact-form::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: conic-gradient(from 0deg, 
        transparent, 
        var(--accent), 
        transparent, 
        var(--accent), 
        transparent);
    border-radius: 42px;
    animation: borderRotate 8s linear infinite;
    z-index: -1;
}

.contact-form::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: rgba(20, 20, 20, 0.95);
    border-radius: 38px;
    z-index: -1;
}

/* Floating Input Labels */
.form-group {
    margin-bottom: 30px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    transform-origin: left;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 18px 25px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    z-index: 1;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(110, 231, 183, 0.05);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 30px -15px rgba(110, 231, 183, 0.3);
}

/* Floating Effect on Focus */
.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group select:focus + label {
    transform: translateY(-30px) scale(0.9);
    color: var(--accent);
}

/* 3D Glow on Hover */
.form-group:hover input,
.form-group:hover textarea,
.form-group:hover select {
    border-color: rgba(110, 231, 183, 0.3);
    box-shadow: 0 0 30px rgba(110, 231, 183, 0.1);
}

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

/* Submit Button - 4D Enhanced */
.submit-btn {
    background: linear-gradient(135deg, transparent, rgba(110, 231, 183, 0.1));
    color: var(--white);
    border: 2px solid rgba(110, 231, 183, 0.3);
    padding: 20px 45px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(110, 231, 183, 0.4), transparent);
    transition: left 0.6s ease;
}

.submit-btn:hover {
    background: var(--accent);
    color: var(--black);
    border-color: var(--accent);
    transform: translateY(-8px) rotateX(5deg) scale(1.02);
    box-shadow: 0 30px 50px -15px rgba(110, 231, 183, 0.6);
}

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

.submit-btn i {
    font-size: 1.2rem;
    transition: transform 0.4s ease;
}

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

/* FAQ Section - 4D Cards */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.faq-card {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 40px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.faq-card::before {
    content: '?';
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 8rem;
    font-weight: 700;
    color: rgba(110, 231, 183, 0.03);
    z-index: 0;
}

.faq-card:hover {
    transform: translateY(-15px) rotateX(2deg) rotateY(2deg);
    border-color: rgba(110, 231, 183, 0.2);
    box-shadow: 0 30px 50px -20px rgba(110, 231, 183, 0.3);
}

.faq-card h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--accent);
    position: relative;
    z-index: 1;
}

.faq-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* Animations */
@keyframes headerReveal {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes titleWave {
    0%, 100% {
        text-shadow: 0 0 40px rgba(110, 231, 183, 0.3);
    }
    50% {
        text-shadow: 0 0 80px rgba(110, 231, 183, 0.6);
    }
}

@keyframes crystalFloat {
    0%, 100% {
        transform: translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
    }
    20% {
        transform: translateY(-40px) rotateX(45deg) rotateY(60deg) rotateZ(30deg) scale(1.1);
    }
    40% {
        transform: translateY(30px) rotateX(90deg) rotateY(120deg) rotateZ(60deg) scale(0.9);
    }
    60% {
        transform: translateY(-20px) rotateX(135deg) rotateY(180deg) rotateZ(90deg) scale(1.2);
    }
    80% {
        transform: translateY(20px) rotateX(180deg) rotateY(240deg) rotateZ(120deg) scale(0.95);
    }
}

@keyframes portalSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) rotate(180deg) scale(1.3);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg) scale(1);
    }
}

@keyframes energyPulse {
    0%, 100% {
        opacity: 0.1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.2);
    }
}

@keyframes plasmaFlow {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.2;
    }
    20% {
        transform: translate(150px, -80px) scale(2) rotate(72deg);
        opacity: 0.4;
    }
    40% {
        transform: translate(-80px, 120px) scale(1.5) rotate(144deg);
        opacity: 0.3;
    }
    60% {
        transform: translate(100px, 100px) scale(2.5) rotate(216deg);
        opacity: 0.5;
    }
    80% {
        transform: translate(-120px, -60px) scale(1.8) rotate(288deg);
        opacity: 0.4;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes lineWidth {
    0%, 100% {
        width: 80px;
        opacity: 1;
    }
    50% {
        width: 150px;
        opacity: 0.7;
    }
}

@keyframes borderRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .contact-grid {
        gap: 40px;
    }
    
    .contact-form {
        padding: 50px;
    }
}

@media (max-width: 992px) {
    .page-header {
        height: 60vh;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .contact-info {
        padding-right: 0;
        max-width: 700px;
        margin: 0 auto;
    }
    
    .contact-form-container {
        max-width: 700px;
        margin: 0 auto;
    }
    
    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header {
        height: 50vh;
        min-height: 450px;
    }
    
    .page-header .crystal {
        width: 100px;
        height: 100px;
        opacity: 0.15;
    }
    
    .page-header .portal {
        width: 400px;
        height: 400px;
    }
    
    .page-header .plasma-particle {
        animation: none;
        opacity: 0.1;
    }
    
    .page-header-content p {
        padding: 15px 20px;
        font-size: 0.95rem;
        backdrop-filter: blur(5px);
    }
    
    .contact-form {
        padding: 40px 30px;
    }
    
    .contact-item {
        padding: 15px;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .faq-card {
        padding: 30px;
    }
}

@media (max-width: 576px) {
    .page-header-content h1 {
        font-size: 2.5rem;
    }
    
    .page-header-content p {
        font-size: 0.9rem;
        padding: 12px 15px;
    }
    
    .contact-info h2 {
        font-size: 2rem;
    }
    
    .contact-info p {
        font-size: 1rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .contact-item i {
        margin: 0 auto;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 15px 20px;
    }
    
    .submit-btn {
        padding: 16px 35px;
        font-size: 1rem;
    }
}

/* Landscape Mode */
@media (max-width: 896px) and (orientation: landscape) {
    .page-header {
        height: 100vh;
        min-height: 500px;
    }
    
    .page-header-content {
        padding: 0 40px;
    }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
    .contact-item:hover,
    .faq-card:hover,
    .submit-btn:hover {
        transform: none;
    }
    
    .form-group input:focus,
    .form-group textarea:focus,
    .form-group select:focus {
        transform: none;
    }
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    .page-header .crystal,
    .page-header .portal,
    .page-header .energy-field,
    .page-header .plasma-particle,
    .contact-form::before,
    .contact-item,
    .faq-card,
    .submit-btn {
        animation: none;
    }
}