/* Contact Hero Section */
.contact-hero {
    position: relative;
    height: 80vh; /* Increased height for more impact */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: white;
    font-family: 'Poppins', sans-serif; /* Modern font */
}

.contact-hero video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: -2;
    filter: brightness(0.8); /* Slightly dimmed for better contrast */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(20, 30, 48, 0.85), rgba(142, 68, 173, 0.75));
    z-index: -1;
    backdrop-filter: blur(3px); /* Subtle blur effect */
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Button styles */
.hero-buttons {
    margin-top: 2rem;
}

.hero-buttons .btn {
    display: inline-block;
    padding: 14px 32px; /* Larger buttons */
    margin: 12px;
    border: 2px solid transparent;
    color: white;
    background: #8e44ad;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 50px; /* Rounded buttons */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.hero-buttons .btn:hover {
    background: #9b59b6;
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.2);
}

.hero-buttons .btn-outline {
    background: transparent;
    border-color: white;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-buttons .btn-outline:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: white;
    transition: all 0.4s;
    z-index: -1;
}

.hero-buttons .btn-outline:hover {
    color: #8e44ad;
}

.hero-buttons .btn-outline:hover:before {
    left: 0;
}

/* Add animations for hero content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease forwards;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.contact-hero .hero-content {
    animation: fadeInUp 1s ease-out;
    position: relative;
    z-index: 2;
}

.contact-hero .hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-light);
    animation: glowText 3s infinite alternate;
    text-shadow: 0 0 15px rgba(142, 68, 173, 0.6);
}

.contact-hero .hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-light);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.hero-buttons .btn {
    position: relative;
    overflow: hidden;
}

.hero-buttons .btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.hero-buttons .btn:hover::after {
    left: 100%;
}

.tech-animation-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.tech-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(rgba(142, 68, 173, 0.3) 2px, transparent 2px),
        radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 50px 50px, 30px 30px;
    animation: particleFloat 20s infinite linear;
}

/* Contact Info Section */
.contact-info-section {
    padding: 80px 0;
    background-color: var(--darker-bg);
    position: relative;
    overflow: hidden;
}

.contact-info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 48%, rgba(142, 68, 173, 0.1) 49%, rgba(142, 68, 173, 0.1) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(142, 68, 173, 0.1) 49%, rgba(142, 68, 173, 0.1) 51%, transparent 52%);
    background-size: 60px 60px;
    opacity: 0.4;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
    position: relative;
    z-index: 2;
}

.info-card {
    background-color: rgba(19, 19, 31, 0.9);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.info-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--glow), 0 15px 30px rgba(0, 0, 0, 0.3);
}

.info-card:hover::before {
    transform: scaleX(1);
}

.info-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 20px;
    transition: transform 0.5s ease;
}

.info-card:hover .info-icon {
    transform: scale(1.2) rotate(5deg);
    color: var(--primary-light);
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.info-card h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.info-card:hover h3::after {
    width: 80%;
}

.info-card p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.info-card:hover p {
    color: var(--text-light);
}

.btn-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    position: relative;
}

.btn-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.btn-link:hover {
    color: var(--primary-light);
}

.btn-link:hover i {
    transform: translateX(8px);
}

/* Contact Form Section */
.contact-form-section {
    padding: 80px 0;
    background-color: var(--dark-bg);
    position: relative;
}

.contact-form-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(142, 68, 173, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    z-index: 1;
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(19, 19, 31, 0.9);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-light);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 15px rgba(142, 68, 173, 0.5);
    background-color: rgba(142, 68, 173, 0.05);
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
    opacity: 0.5;
    transform: translateX(10px);
}

.form-group textarea {
    height: 150px;
    resize: none;
}

.form-group button {
    position: relative;
    overflow: hidden;
}

.form-group button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.form-group button:hover::before {
    width: 300px;
    height: 300px;
}

/* Map Section */
.map-section {
    padding: 80px 0;
    background-color: var(--darker-bg);
    position: relative;
    overflow: hidden;
}

.map-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-container:hover {
    transform: scale(1.02);
    box-shadow: var(--glow), 0 20px 40px rgba(0, 0, 0, 0.3);
}

.map-section::before {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(142, 68, 173, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(70px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowText {
    0% {
        text-shadow: 0 0 5px rgba(142, 68, 173, 0.5);
    }
    100% {
        text-shadow: 0 0 20px rgba(142, 68, 173, 0.8);
    }
}

@keyframes particleFloat {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 500px 500px, 400px 400px;
    }
}

/* Back to Top Button Enhancement */
.back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-light);
    transform: translateY(-5px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .contact-hero .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

/* Form Input Focus Animations */
.form-group input:focus + .focus-border,
.form-group textarea:focus + .focus-border {
    width: 100%;
    transition: 0.4s;
}

.form-group .focus-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: 0.4s;
}

/* Loading Animation for Submit Button */
.btn-loading {
    position: relative;
}

.btn-loading .loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}