/* Additional CSS enhancements for Rawasekh website */

/* Dark mode support (optional) */
.dark {
    background-color: #0f172a;
    color: #e2e8f0;
}

.dark header {
    background-color: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid #334155;
}

.dark .bg-white {
    background-color: #1e293b;
}

.dark .text-slate-900 {
    color: #e2e8f0;
}

.dark .text-slate-800 {
    color: #cbd5e1;
}

.dark .text-slate-700 {
    color: #94a3b8;
}

.dark .text-slate-600 {
    color: #64748b;
}

.dark .border-slate-300 {
    border-color: #475569;
}

.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Enhanced animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Enhanced card hover effects */
.card-hover-enhanced {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover-enhanced:hover {
    transform: translateY(-15px) rotate(2deg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Gradient text animation */
.animated-gradient-text {
    background: linear-gradient(-45deg, #14b8a6, #2563eb, #7c3aed, #db2777);
    background-size: 400% 400%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Enhanced loading states */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, transparent 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Parallax effect for hero section */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Enhanced form focus states */
.form-input:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
    transform: translateY(-2px);
}

/* Smooth page transitions */
.page-transition {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.page-transition.active {
    opacity: 1;
    transform: translateX(0);
}

/* Cookie consent banner animations */
#cookie-consent {
    backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.9);
}

/* Enhanced testimonials */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-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;
}

.testimonial-card:hover::before {
    left: 100%;
}

/* Enhanced stats section */
.stats-section {
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" fill-opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" fill-opacity="0.1"/><circle cx="75" cy="25" r="1" fill="white" fill-opacity="0.05"/><circle cx="25" cy="75" r="1" fill="white" fill-opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

/* Blog search enhancements */
.blog-search-container {
    position: relative;
}

.blog-search-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #14b8a6, #2563eb);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.blog-search-container:focus-within::after {
    width: 100%;
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    .hero-gradient {
        background-attachment: scroll;
    }
    
    .card-hover-enhanced:hover {
        transform: translateY(-10px);
    }
    
    .parallax-bg {
        background-attachment: scroll;
    }
    
    /* Better mobile touch targets */
    #mobile-menu-button {
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(20, 184, 166, 0.3);
    }
    
    /* Mobile menu improvements */
    #mobile-menu {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    #mobile-menu a {
        min-height: 48px;
        display: flex;
        align-items: center;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(20, 184, 166, 0.3);
    }
    
    /* Remove hover effects on mobile */
    .card-hover:hover {
        transform: none;
        box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
    }
}

/* Print styles */
@media print {
    .scroll-to-top,
    #mobile-menu-button,
    #cookie-consent,
    #dark-mode-toggle {
        display: none !important;
    }
    
    .hero-gradient {
        background: #0f172a !important;
        color: white !important;
    }
    
    .shadow-lg,
    .shadow-md {
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus-visible:focus {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-slate-600 {
        color: #1e293b;
    }
    
    .text-slate-500 {
        color: #374151;
    }
    
    .border-slate-300 {
        border-color: #000;
    }
}