/* Contact Section */
.contact {
    background: #0f0f0f;
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
}

/* Subtle Background Animation */
.contact::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
    opacity: 0.3;
    animation: pulse 10s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.contact h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ffffff;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1; /* Above background animation */
}

.contact p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 1.2rem;
    color: #e0e0e0;
    max-width: 700px;
    margin: 0 auto 3rem;
    position: relative;
    z-index: 1;
}

.contact-form {
    max-width: 600px;
    background: rgba(26, 26, 26, 0.95); /* Slightly more opaque */
    padding: 3rem; /* Increased padding */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 2rem; /* More spacing */
    position: relative;
}

.form-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: #d3d3d3;
    position: absolute;
    top: -0.75rem; /* Position above input */
    left: 1.5rem;
    background: rgba(26, 26, 26, 0.95); /* Match form background */
    padding: 0 0.5rem;
    transition: color 0.3s ease;
    z-index: 2;
}

.form-control {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    padding: 1.25rem 1.5rem; /* Taller inputs */
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.form-control:hover {
    border-color: rgba(255, 255, 255, 0.5); /* Subtle hover effect */
    transform: translateY(-2px); /* Slight lift */
}

.form-control:focus {
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    outline: none;
}

.form-control::placeholder {
    color: #b0b0b0;
    opacity: 1;
}

.form-control:focus::placeholder {
    color: #d3d3d3; /* Lighter on focus */
}

.form-control textarea {
    resize: vertical;
    min-height: 140px; /* Taller textarea */
}

.contact-btn {
    background: #ffffff;
    color: #0f0f0f;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 1.1rem; /* Slightly larger */
    padding: 1.25rem 2rem;
    border-radius: 0;
    border: 2px solid #ffffff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.4s ease;
    z-index: -1;
}

.contact-btn:hover::before {
    left: 0; /* Slide effect on hover */
}

.contact-btn:hover {
    background: transparent;
    color: #ffffff;
    transform: scale(1.05);
}

.contact-info p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    color: #d3d3d3;
    margin: 0.75rem 0;
}

.contact-link {
    color: #ffffff;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #ffffff;
    transition: width 0.3s ease;
}

.contact-link:hover::after {
    width: 100%; /* Underline effect on hover */
}

.contact-link:hover {
    color: #e0e0e0;
}

/* Animations */
.reveal-text {
    opacity: 0;
    transform: translateY(20px);
    animation: revealText 1s ease forwards;
}

.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }
.delay-3 { animation-delay: 0.9s; }

@keyframes revealText {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Decorative Elements */
.contact::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 1px;
    background: #ffffff;
    opacity: 0;
    transform: rotate(-45deg);
    animation: drawLine 1.5s ease forwards 0.5s;
}

.contact .container::after {
    content: '';
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    opacity: 0;
    animation: fadeInShape 1.5s ease forwards 1s; /* Delayed appearance */
}

@keyframes drawLine {
    from { width: 0; opacity: 0; }
    to { width: 50px; opacity: 0.4; }
}

@keyframes fadeInShape {
    from { opacity: 0; transform: rotate(45deg) scale(0.8); }
    to { opacity: 0.3; transform: rotate(45deg) scale(1); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .contact {
        padding: 4rem 0;
    }

    .contact h2 {
        font-size: 2.2rem;
    }

    .contact p {
        font-size: 1rem;
    }

    .contact-form {
        padding: 2rem;
        max-width: 100%;
    }

    .form-control {
        padding: 1rem 1.25rem;
    }

    .contact-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .contact-info p {
        font-size: 0.9rem;
    }
}