/* Main Stylesheet for Boussaba Tradiv Website */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
}

/* Hero Background */
.hero-bg {
    background: linear-gradient(rgba(54, 54, 54, 0.7), rgba(54, 54, 54, 0.7)),
                url('../img/Menuiserie Metallique Bois Verre et Divers Temara.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

/* For larger screens, use the fixed attachment and contain size */
@media (min-width: 1024px) {
    .hero-bg {
        background-attachment: fixed;
        background-size: contain;
    }
}

/* Glass Effect */
.glass-effect {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
}

/* Hover Lift Animation */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Fade In Animation */
.animate-fade-in {
    animation: fadeIn 0.6s ease-in forwards;
    opacity: 0;
    transform: translateY(20px);
    will-change: opacity, transform;
}

/* Pre-animation state for elements observed by Intersection Observer (excluding footer) */
.hover-lift:not(.animate-fade-in):not(footer *):not(footer),
.grid > div:not(.animate-fade-in):not(footer *):not(footer) {
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Service Card Hover Effect */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Gallery Item Hover */
.gallery-item {
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

/* Filter Buttons */
.filter-btn {
    transition: all 0.3s ease;
}

/* Counter Styling */
.counter {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fe330b;
}

/* Form Styling */
.form-control {
    transition: all 0.3s ease;
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(254, 51, 11, 0.1);
    border-color: #fe330b;
}

/* Contact Card Hover */
.contact-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Legal accordion cards (match FAQ look) */
.legal-item {
    border: 1px solid #e5e7eb;
}
.legal-item + .legal-item {
    margin-top: 1rem;
}
.legal-icon {
    transition: transform 0.2s ease;
}

/* Map Container */
.map-container {
    height: 325px;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    box-sizing: border-box;
}

.modal.show {
    display: block;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-content img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
}

/* Notification Styling */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 28rem;
    transform: translateX(calc(100% + 1rem));
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background-color: #10b981;
    color: white;
}

.notification-error {
    background-color: #ef4444;
    color: white;
}

.notification-info {
    background-color: #3b82f6;
    color: white;
}

/* Scroll to Top Button */
#scroll-top {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    width: 3rem;
    height: 3rem;
    background-color: #363636;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

#scroll-top:hover {
    background-color: #4b5563;
    transform: translateY(-3px);
}

#scroll-top.show {
    opacity: 1;
    pointer-events: auto;
}

/* Responsive Design - Mobile */
@media (max-width: 640px) {
    .counter {
        font-size: 2rem;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on mobile */
    }
}

/* Responsive Design - Tablet */
@media (max-width: 768px) {
    .hero-bg {
        background-attachment: scroll;
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    nav,
    .fixed {
        display: none !important;
    }
    
    body {
        background-color: white;
    }
}
