/* Custom CSS for Al-Habib Integrated Services */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1e3a8a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

/* Navigation styles */
.nav-link.active {
    color: #1e3a8a;
    font-weight: 600;
}

/* Hero section animations */
.hero-bg {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.9), rgba(15, 118, 110, 0.8)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23f8fafc" width="1200" height="600"/><circle fill="%23e2e8f0" cx="200" cy="150" r="100"/><circle fill="%23cbd5e1" cx="800" cy="300" r="150"/><circle fill="%23e2e8f0" cx="1000" cy="100" r="80"/></svg>');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Animated counters */
.counter {
    font-size: 3rem;
    font-weight: 800;
    color: #1e3a8a;
}

/* Service cards hover effect */
.service-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: #d97706;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Project gallery */
.project-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.project-item:hover {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(30, 58, 138, 0.9), rgba(15, 118, 110, 0.8));
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-item:hover .project-overlay {
    opacity: 1;
}

/* Testimonials slider */
.testimonial-slide {
    display: none;
}

.testimonial-slide.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Client logos */
.client-logo {
    filter: grayscale(100%);
    transition: all 0.3s ease;
    opacity: 0.6;
}

.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Contact form */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

.form-input:focus {
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, #1e3a8a, #0f766e);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #d97706, #ea580c);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(217, 119, 6, 0.3);
}

/* Notice modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1e3a8a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-bg {
        background-attachment: scroll;
    }
    
    .counter {
        font-size: 2rem;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
}

/* Floating Action Buttons */
.whatsapp-float, .order-float {
    animation: float 3s ease-in-out infinite;
    position: relative;
}

.whatsapp-float:hover, .order-float:hover {
    animation: none;
    transform: scale(1.1) rotate(5deg);
}

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

/* WhatsApp Button Pulse Animation */
.whatsapp-float::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.3);
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
    z-index: -1;
}

/* Order Button Pulse Animation */
.order-float::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(30, 58, 138, 0.3);
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

/* WhatsApp Button Hover Effects */
.whatsapp-float:hover::before {
    animation: none;
    background: rgba(37, 211, 102, 0.5);
    transform: translate(-50%, -50%) scale(1.2);
}

/* Mobile responsiveness for floating button */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .whatsapp-float i {
        font-size: 1.5rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .whatsapp-float {
        display: none !important;
    }
}
