/* Custom CSS for Travaux Ait Ahmed - Professional Electrical Services Website */

:root {
    --primary-color: #0d6efd;
    --primary-dark: #0a58ca;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --white: #ffffff;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Global Styles */
body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Header Styles */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1020;
}

.top-bar {
    font-size: 0.875rem;
}

.top-bar a:hover {
    text-decoration: underline !important;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Language Switcher */
.language-switcher a {
    font-size: 0.875rem;
    transition: opacity 0.3s ease;
}

.language-switcher a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-image {
    position: relative;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.feature-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    font-size: 0.875rem;
    font-weight: 500;
}

.feature-badge i {
    margin-right: 0.5rem;
}

/* Service Cards */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    border: 1px solid #e9ecef;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.service-icon i {
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon i {
    transform: scale(1.1);
}

/* Page Headers */
.page-header {
    padding: 4rem 0;
}

.page-header h1 {
    margin-bottom: 1rem;
}

/* Project Cards */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-3px);
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.8));
    display: flex;
    align-items: end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.placeholder-image {
    transition: transform 0.3s ease;
}

.project-card:hover .placeholder-image {
    transform: scale(1.05);
}

/* Filter Buttons */
.btn-group .btn {
    margin: 0.25rem;
}

.btn-outline-primary.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Contact Forms */
.contact-form,
.quote-form {
    background: var(--white);
}

.form-control,
.form-select {
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Quote Form Specific */
.quote-form-container {
    border: 1px solid #e9ecef;
}

.info-card {
    border-radius: 0.5rem;
}

/* Contact Information */
.contact-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-icon {
    min-width: 60px;
    text-align: center;
}

/* Business Hours */
.business-hours {
    background: var(--light-color) !important;
}

.hours-list {
    font-size: 0.9rem;
}

/* Service Areas */
.service-area {
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

.service-area:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Statistics */
.stat-box,
.stat-card {
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-box:hover,
.stat-card:hover {
    transform: translateY(-3px);
}

/* Testimonials */
.testimonial-card {
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-3px);
}

.stars i {
    font-size: 0.9rem;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    background: #20b858;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* Footer */
footer {
    background-color: var(--dark-color) !important;
}

footer h5 {
    color: white;
    margin-bottom: 1rem;
}

footer .social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-success:hover {
    transform: translateY(-2px);
}

/* Alert Messages */
.alert {
    border-radius: 0.5rem;
    border: none;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .feature-badge {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .stat-box h3,
    .stat-card h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header .display-4 {
        font-size: 2rem;
    }
    
    .service-card {
        margin-bottom: 1rem;
    }
    
    .contact-item {
        padding: 0.75rem 0;
    }
}

/* Print Styles */
@media print {
    .whatsapp-float,
    .navbar,
    .top-bar {
        display: none !important;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-outline-primary {
        border-width: 2px;
    }
    
    .service-card {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .whatsapp-btn:hover {
        transform: none;
    }
    
    .service-card:hover {
        transform: none;
    }
}
