/* Enhanced Contact Page Styles */

/* Hero section enhancements */
.hero-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50vh;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    z-index: -1;
}

.contact-hero {
    position: relative;
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(6, 78, 97, 0.2), rgba(0, 0, 0, 0.3));
    opacity: 0.2;
    z-index: -2;
}

/* Enhanced form animations */
.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradient-x 3s ease infinite;
}

.animate-gradient-x-slow {
    background-size: 200% 200%;
    animation: gradient-x 6s ease infinite;
}

.bg-size-200 {
    background-size: 200% 200%;
}

@keyframes gradient-x {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Digital circuit pattern background animation */
.bg-tronBg {
    position: relative;
    overflow: hidden;
}

.circuit-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/assets/images/circuit-pattern.svg');
    background-size: cover;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
    animation: pulse-opacity 8s ease-in-out infinite alternate;
}

@keyframes pulse-opacity {
    0% {
        opacity: 0.03;
    }
    100% {
        opacity: 0.08;
    }
}

/* Water ripple effect */
.water-ripple {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, rgba(6, 182, 212, 0) 70%);
    transform: scale(0);
    animation: ripple 6s linear infinite;
    filter: blur(1px);
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(10);
        opacity: 0;
    }
}

/* Enhanced form inputs */
.form-input {
    transition: all 0.3s ease;
    background-color: rgba(0, 0, 0, 0.2);
    border-color: rgba(6, 182, 212, 0.3);
}

.form-input:focus {
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.3);
    border-color: #06b6d4;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
}

.form-input:hover:not(:focus) {
    border-color: rgba(6, 182, 212, 0.5);
    background-color: rgba(0, 0, 0, 0.25);
}

.form-group {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.form-group:hover {
    transform: translateY(-2px);
}

.form-group.form-active {
    transform: translateY(-4px);
}

/* Form elements that become visible with animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation delay for form elements */
.fade-in-up:nth-child(2) {
    animation-delay: 0.1s;
}
.fade-in-up:nth-child(3) {
    animation-delay: 0.2s;
}
.fade-in-up:nth-child(4) {
    animation-delay: 0.3s;
}
.fade-in-up:nth-child(5) {
    animation-delay: 0.4s;
}

/* Success modal enhancements */
#success-modal.visible {
    display: flex !important;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(6, 182, 212, 0.3);
    border: 1px solid rgba(6, 182, 212, 0.3);
    background: linear-gradient(to bottom right, rgba(15, 23, 42, 0.95), rgba(0, 0, 0, 0.95));
    backdrop-filter: blur(10px);
}

#modal-content.visible {
    transform: scale(1);
    opacity: 1;
}

#modal-backdrop {
    opacity: 0;
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

#modal-backdrop.visible {
    opacity: 1;
}

/* Form progress bar animations */
#form-progress-bar {
    transition: width 0.5s ease-out;
    background: linear-gradient(90deg, #4ade80, #06b6d4);
    background-size: 200% 100%;
    animation: progress-pulse 2s ease infinite;
    height: 3px;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
    border-radius: 3px;
}

@keyframes progress-pulse {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Custom checkbox styling - Modern approach using peer classes */
/* These styles target the modern Tailwind checkbox implementation */
.custom-checkbox-container {
    position: relative;
    display: inline-block;
}

/* Fix for any overlapping elements within the checkbox container */
.custom-checkbox-container label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Add a subtle hover effect for better UX */
.custom-checkbox-container label:hover {
    border-color: rgba(6, 182, 212, 0.8) !important;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.2);
}

/* Animation for the checkmark */
@keyframes checkmarkAppear {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Apply animation to the checkmark icon */
.custom-checkbox-container .peer-checked ~ span i {
    animation: checkmarkAppear 0.3s ease forwards;
}

@keyframes checkmarkAppear {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .contact-container {
        flex-direction: column-reverse;
    }
    
    .contact-info-card {
        margin-bottom: 2rem;
    }
    
    /* Improved mobile spacing */
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    /* Make sure forms are readable on mobile */
    .form-input {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 0.75rem;
    }
    
    /* Adjust hero section for mobile */
    .contact-hero {
        min-height: 100vh !important;
        padding-top: 6rem !important;
        padding-bottom: 3rem !important;
        overflow-x: hidden;
    }
    
    /* Fix container issues on mobile */
    .contact-hero .container {
        width: 100%;
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
        overflow-x: hidden;
    }
    
    /* Center elements on mobile */
    .contact-hero .lg\:text-left {
        text-align: center !important;
    }
    
    .contact-hero .lg\:justify-start {
        justify-content: center !important;
    }
    
    .contact-hero .lg\:mx-0 {
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Improve heading readability on mobile */
    h1, h2 {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        font-size: calc(1.5rem + 2vw) !important;
        line-height: 1.2 !important;
    }
}

/* Form status message styling */
#form-status {
    transform: translateY(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#form-status.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

#form-status.success-message {
    background-color: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
    color: white;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

#form-status.error-message {
    background-color: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: white;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

#form-status.info-message {
    background-color: rgba(59, 130, 246, 0.2);
    border: 1px solid #3b82f6;
    color: white;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

/* Enhanced button styles */
.btn-primary, .btn-submit {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary:active, .btn-submit:active {
    transform: translateY(1px);
}

.btn-primary::after, .btn-submit::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 0;
    padding-bottom: 120%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.btn-primary:hover::after, .btn-submit:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Subtle gradient text animations */
.text-gradient {
    background-size: 200% auto;
    animation: textGradientFlow 5s ease infinite;
}

@keyframes textGradientFlow {
    0% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
    100% {
        background-position: 0% center;
    }
}

/* Add subtle hover effects for service area cards */
.service-area-card {
    transition: all 0.3s ease;
}

.service-area-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(6, 182, 212, 0.3);
} 