/* Custom CSS for شركة المنبع Website */

/* Font Family */
.font-cairo {
    font-family: 'Cairo', sans-serif;
}

/* Anti-copy deterrents (affects UX; keep minimal) */
body {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow selection in inputs/textareas and explicit opt-in */
input, textarea, .selectable {
    -webkit-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Hero Background */
.hero-bg {
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay2 {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeInDelay 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeInDelay2 1s ease-out 0.6s both;
}

.animate-bounce-in {
    animation: bounceIn 1s ease-out 1s both;
}

/* Floating Buttons */
.floating-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.floating-btn::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;
}

.floating-btn:hover::before {
    left: 100%;
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.05), rgba(59, 130, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* Blog Cards */
.blog-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.05), rgba(245, 158, 11, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.blog-card:hover::before {
    opacity: 1;
}

/* Service Detail Cards */
.service-detail-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.02), rgba(59, 130, 246, 0.02));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-detail-card:hover::before {
    opacity: 1;
}

/* FAQ Accordion */
.faq-btn {
    transition: all 0.3s ease;
}

.faq-btn:hover {
    background-color: rgba(30, 64, 175, 0.05);
}

.faq-content {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.faq-content.active {
    max-height: 200px;
}

.faq-btn i {
    transition: transform 0.3s ease;
}

.faq-btn.active i {
    transform: rotate(180deg);
}

/* Form Styling */
input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Button Hover Effects */
button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success/Error Messages */
.message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* RTL Specific Styles */
[dir="rtl"] .space-x-reverse > * + * {
    margin-right: 0.5rem;
    margin-left: 0;
}

[dir="rtl"] .ml-2 {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .ml-3 {
    margin-left: 0;
    margin-right: 0.75rem;
}

[dir="rtl"] .ml-4 {
    margin-left: 0;
    margin-right: 1rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1e40af;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-bg {
        background-attachment: scroll;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        padding: 12px;
    }
    
    .floating-btn i {
        font-size: 1.2rem;
    }
}

/* Print Styles */
@media print {
    .floating-btn,
    .contact-modal,
    nav {
        display: none !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bg-gray-50 {
        background-color: #ffffff;
    }
    
    .text-gray-600 {
        color: #000000;
    }
    
    .text-gray-300 {
        color: #000000;
    }
}
