/**
 * Contact Page Styles - SaintChannel
 * Stili specifici per la pagina contatti
 */

/* ================================================
   HERO SECTION
   ================================================ */

.contact-illustration {
    position: relative;
    animation: pulse 2s ease-in-out infinite;
}

.floating-icons {
    position: relative;
    width: 100%;
    height: 100px;
}

.floating-icons i {
    position: absolute;
    animation: float 3s ease-in-out infinite;
    font-size: 1.5rem;
    opacity: 0.7;
}

.floating-icons i:nth-child(1) { 
    top: -10px; 
    left: 20%; 
    animation-delay: 0s; 
}

.floating-icons i:nth-child(2) { 
    top: 10px; 
    right: 20%; 
    animation-delay: 0.5s; 
}

.floating-icons i:nth-child(3) { 
    bottom: 10px; 
    left: 10%; 
    animation-delay: 1s; 
}

.floating-icons i:nth-child(4) { 
    bottom: -5px; 
    right: 10%; 
    animation-delay: 1.5s; 
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.05); 
    }
}

/* ================================================
   INFO CARDS
   ================================================ */

.info-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.3s ease;
    opacity: 0;
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: var(--saintchannel-primary) !important;
}

.info-card:hover::before {
    opacity: 1;
    animation: shine 0.6s ease-in-out;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.icon-wrapper {
    position: relative;
    z-index: 2;
}

/* ================================================
   CONTACT FORM
   ================================================ */

.form-wrapper {
    position: relative;
    backdrop-filter: blur(10px);
}

.bg-gradient-dark {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.contact-form .form-floating {
    position: relative;
}

.contact-form .form-control,
.contact-form .form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s ease;
}

.contact-form .form-control::placeholder,
.contact-form .form-select option {
    color: rgba(255, 255, 255, 0.6);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--saintchannel-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
    color: white !important;
}

.contact-form .form-floating > label {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form .form-control:focus ~ label,
.contact-form .form-control:not(:placeholder-shown) ~ label,
.contact-form .form-select:focus ~ label,
.contact-form .form-select:not([value=""]) ~ label {
    color: var(--saintchannel-primary);
}

/* Form Validation Styles */
.contact-form .form-control.is-valid,
.contact-form .form-select.is-valid {
    border-color: #28a745;
    background-image: none;
}

.contact-form .form-control.is-invalid,
.contact-form .form-select.is-invalid {
    border-color: #dc3545;
    background-image: none;
}

.contact-form .valid-feedback {
    color: #28a745;
    font-size: 0.875rem;
}

.contact-form .invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
}

/* Form Check (Checkbox) */
.contact-form .form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.contact-form .form-check-input:checked {
    background-color: var(--saintchannel-primary);
    border-color: var(--saintchannel-primary);
}

.contact-form .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Submit Button States */
.contact-form .btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.contact-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.contact-form .btn:active {
    transform: translateY(0);
}

.contact-form .btn .btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

/* ================================================
   DIRECT CONTACT METHODS
   ================================================ */

.contact-method {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.contact-method:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

.contact-method a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-method a:hover {
    color: var(--saintchannel-primary) !important;
}

/* ================================================
   FAQ ACCORDION
   ================================================ */

.accordion-dark .accordion-item {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.accordion-dark .accordion-button {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
    border: none;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
}

.accordion-dark .accordion-button:not(.collapsed) {
    background-color: rgba(102, 126, 234, 0.15) !important;
    color: white !important;
    box-shadow: none;
}

.accordion-dark .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
    border-color: transparent;
}

.accordion-dark .accordion-button::after {
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.accordion-dark .accordion-body {
    background-color: rgba(255, 255, 255, 0.02);
    padding: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ================================================
   ALERTS & NOTIFICATIONS
   ================================================ */

.alert {
    border: none;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border-left: 4px solid #dc3545;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

@media (max-width: 768px) {
    .floating-icons {
        height: 60px;
    }
    
    .floating-icons i {
        font-size: 1.2rem;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .contact-form .btn-lg {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
    
    .info-card {
        margin-bottom: 1rem;
    }
    
    .form-wrapper {
        padding: 2rem !important;
    }
}

@media (max-width: 576px) {
    .hero-section .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .hero-section .btn:last-child {
        margin-bottom: 0;
    }
    
    .contact-method {
        margin-bottom: 1rem;
        padding: 1.5rem !important;
    }
}

/* ================================================
   ACCESSIBILITY IMPROVEMENTS
   ================================================ */

@media (prefers-reduced-motion: reduce) {
    .floating-icons i,
    .contact-illustration,
    .info-card,
    .contact-method {
        animation: none !important;
        transition: none !important;
    }
    
    .info-card:hover,
    .contact-method:hover {
        transform: none !important;
    }
}

/* Focus styles for better accessibility */
.contact-form button:focus,
.contact-method a:focus {
    outline: 2px solid var(--saintchannel-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .info-card,
    .form-wrapper,
    .accordion-dark .accordion-item {
        border-color: white !important;
    }
    
    .text-secondary {
        color: #ccc !important;
    }
}

/* ================================================
   DARK MODE SPECIFIC ADJUSTMENTS
   ================================================ */

.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #667eea; /* Fallback for browsers that don't support background-clip */
}

/* Form select options styling for dark theme */
.contact-form .form-select {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
}

.contact-form .form-select option {
    background-color: #1a1a2e !important;
    color: white !important;
    padding: 8px 12px;
}

.contact-form .form-select option:hover,
.contact-form .form-select option:focus,
.contact-form .form-select option:checked {
    background-color: #667eea !important;
    color: white !important;
}

/* Fix per browser WebKit (Chrome, Safari) */
.contact-form .form-select::-webkit-scrollbar {
    width: 8px;
}

.contact-form .form-select::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.contact-form .form-select::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

/* Fix specifico per il dropdown */
.contact-form .form-select:focus option {
    background-color: #1a1a2e !important;
    color: white !important;
}

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner.fa-spin {
    animation: spin 1s linear infinite;
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
.contact-form textarea::-webkit-scrollbar {
    width: 8px;
}

.contact-form textarea::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.contact-form textarea::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
}

.contact-form textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}
