/* * contact.css - Optimized styles for contact page
 * Reduced redundancy and improved performance
 */

/* Page Header */
.page-header {
    background-color: var(--dark-color);
    padding-top: 160px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(124, 58, 237, 0.2), transparent 50%);
    z-index: 0;
}

/* Form Styling */
.form-input {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
    font-family: 'Comfortaa', sans-serif;
    border-radius: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-input:focus {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.1);
    outline: none;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.checkbox-selected {
    color: #3B82F6;
    font-weight: 600;
    transition: color 0.3s ease;
}

/* Form Container */
.contact-form {
    background-color: var(--light-bg);
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    position: relative;
    z-index: 1;
}


/* Error Styles */
.form-error {
    color: #f87171;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: fadeIn 0.3s ease-in-out;
}

.error-input {
    border: 2px solid #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
    background-color: rgba(239, 68, 68, 0.05);
}

/* Consolidated Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Info Card Styles */
.info-card,
.faq-card {
    background-color: var(--light-bg);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    z-index: 1;
    overflow: hidden;
    will-change: transform, box-shadow;
}

.info-card {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1);
    display: block;
    width: 100%;
}

.faq-card {
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.3);
}

.info-card::before,
.faq-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(59, 130, 246, 0.05));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px;
}

.info-card:hover,
.faq-card:hover {
    transform: translateY(-5px);
}

.info-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 5px 10px rgba(0, 0, 0, 0.15);
}

.faq-card:hover {
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.4);
}

.info-card:hover::before,
.faq-card:hover::before {
    opacity: 1;
}

.info-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3), 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    will-change: transform, box-shadow;
}

.info-card:hover .info-icon {
    transform: scale(1.1);
    box-shadow: 0 15px 25px rgba(124, 58, 237, 0.4), 0 5px 10px rgba(0, 0, 0, 0.15);
}

/* Collapsible styles moved from inline <style> block in contact.html */
/* and adjusted for more performant animation */
.collapsible-header {
    transition: all 0.3s ease;
}

.collapsible-header:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    padding-top: 0;
    padding-bottom: 0;
}

.collapsible-content.active {
    transition: max-height 0.5s ease-in;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Responsive mobile styles */
@media (max-width: 767px) {
    .page-header {
        padding-top: 100px;
        padding-bottom: 5px;
        text-align: center;
    }
    
    .info-icon {
        margin-left: auto;
        margin-right: auto;
    }
    
    .contact-body {
        padding-top: 0;
    }
    
    .info-card {
        margin-bottom: 20px;
        padding: 20px;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    .form-input {
        font-size: 16px;
        padding: 12px;
    }
    
    .btn-primary {
        padding: 14px 24px;
        width: 100%;
        margin-bottom: 10px;
    }
    
    #mobile-menu a {
        padding: 15px;
        margin-bottom: 5px;
    }

    /* Small screen adjustments for info cards */
    .info-card h3,
    .info-card p,
    .info-card a {
        text-align: center;
    }
}

/* Specific alignments for desktop */
@media (min-width: 768px) {
    .info-card .info-icon {
        margin-left: 0;
        margin-right: auto;
    }
}
    /* * Form error improvements
 */

.form-error {
    color: #f87171;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: fadeIn 0.3s ease-in-out;
    position: relative;
}

.form-general-error {
    margin: 0 0 1.5rem 0;
    padding: 0.75rem;
    background-color: rgba(239, 68, 68, 0.15);
    border-left: 4px solid #ef4444;
    color: #fee2e2;
    font-weight: 500;
}

/* Improved error input styling */
.error-input {
    border: 2px solid #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
    background-color: rgba(239, 68, 68, 0.05);
}

/* Checkbox selected state */
.checkbox-selected {
    color: #3B82F6 !important;
    font-weight: 600 !important;
    transition: color 0.3s ease;
}

/* Enhanced form styling */
.form-input:focus {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.1);
    outline: none;
}

/* Form input with success state */
.form-input.valid {
    border-color: #10B981;
    background-color: rgba(16, 185, 129, 0.05);
}

/* Submit button loading state */
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Improved accessibility focus styles */
input:focus, 
textarea:focus, 
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4) !important;
}

/* Mobile form improvements */
@media (max-width: 768px) {
    .form-label {
        font-size: 0.95rem;
        margin-bottom: 0.35rem;
    }
    
    .form-input {
        padding: 0.75rem !important;
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }

}

.form-error {
    font-size: 0.8rem;
    padding: 0.4rem;
}

/* Custom checkbox styling */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.25rem;
    background-color: rgba(0, 0, 0, 0.2);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="checkbox"]:checked {
    background-color: #3B82F6;
    border-color: #3B82F6;
}

input[type="checkbox"]:checked::after {
    content: '✓';
    font-size: 0.875rem;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
    outline: none;
}

/* Date input styling */
input[type="date"] {
    color-scheme: dark;
    min-height: 2.75rem;
}

/* Loading animation for submit button */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}
