/* Enhanced Motor Insurance Page Styles */

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #592260, #00a89c);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(89, 34, 96, 0.5);
}

/* Enhanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(89, 34, 96, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(89, 34, 96, 0.6);
    }
}

/* Scroll Animations */
section {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Benefit Cards */
.benefit-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.benefit-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.benefit-card:hover::before {
    left: 100%;
}

.benefit-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Enhanced Insurance Type Cards */
.insurance-type-card {
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.insurance-type-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.insurance-type-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(89, 34, 96, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: 0;
}

.insurance-type-card:hover::after {
    width: 300px;
    height: 300px;
}

.insurance-type-card > * {
    position: relative;
    z-index: 1;
}

/* Enhanced Floating Icons */
.floating-icon {
    animation: float 3s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.floating-icon:hover {
    animation-play-state: paused;
    transform: translateY(-5px) scale(1.1);
    filter: drop-shadow(0 10px 20px rgba(89, 34, 96, 0.3));
}

.floating-icon.glow {
    animation: glow 2s ease-in-out infinite alternate;
}

.floating-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    border-radius: 50%;
    z-index: -1;
}

.floating-icon:hover::before {
    width: 60px;
    height: 60px;
}

/* Enhanced Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(89, 34, 96, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 168, 156, 0.3) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* Enhanced Buttons */
.btn-gradient, .btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-gradient::before, .btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-gradient:hover::before, .btn-secondary:hover::before {
    left: 100%;
}

/* Ripple Effect */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Enhanced Form Inputs */
.form-group {
    position: relative;
}

.form-group.focused label {
    color: #592260;
    transform: translateY(-2px);
}

.custom-input, .custom-select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e5e7eb;
}

.custom-input:focus, .custom-select:focus {
    border-color: #592260;
    box-shadow: 0 0 0 3px rgba(89, 34, 96, 0.1);
    transform: scale(1.02);
}

/* Enhanced Accordion */
.accordion-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.accordion-item:hover {
    border-color: rgba(89, 34, 96, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.accordion-item.active {
    border-color: #592260;
    background: linear-gradient(135deg, rgba(89, 34, 96, 0.05), rgba(0, 168, 156, 0.05));
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Remove accordion header outline */
.accordion-header {
    outline: none !important;
    border: none !important;
}

.accordion-header:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Enhanced Logo Slider */
.logo-slider .slide img {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(1) brightness(0.8);
}

.logo-slider .slide:hover img {
    filter: grayscale(0) brightness(1.1);
    transform: scale(1.1);
}

/* Enhanced WhatsApp Button */
a[href*="wa.me"] {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulse 2s infinite;
}

a[href*="wa.me"]:hover {
    animation-play-state: paused;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* Enhanced Modals */
#quoteModal, #contactModal, #timedPopupModal {
    backdrop-filter: blur(10px);
}

#quoteModalContent, #contactModalContent, #timedPopupContent {
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Quote Modal Cards */
#quoteModal a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#quoteModal a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

#quoteModal a:hover::before {
    opacity: 1;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #592260;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Preloader */
#preloader {
    transition: opacity 0.5s ease;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Mobile Enhancements */
@media (max-width: 768px) {
    .floating-icon {
        display: none;
    }
    
    .benefit-card:hover {
        transform: translateY(-4px) scale(1.01) !important;
    }
    
    .insurance-type-card:hover {
        transform: translateY(-2px) scale(1.02) !important;
    }
    
    .hero-section {
        background-attachment: scroll;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-icon {
        animation: none;
    }
}

/* Focus States */
button:focus, a:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid #592260;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .benefit-card, .insurance-type-card {
        border: 2px solid #000;
    }
    
    .btn-gradient, .btn-secondary {
        border: 2px solid #000;
    }
}
