/* Custom Styles for Bootstrap 5 Integration */

/* Global Styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Custom Navbar Styling */
.custom-navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1050; /* Ensure navbar stays on top */
}

.navbar-brand:hover {
    color: #ffd700 !important;
}

.nav-link:hover {
    color: #ffd700 !important;
}

/* Hero Section */
.hero-section {
    margin-top: 80px; /* Account for Bootstrap navbar height */
    padding: 0;
}

/* Image Gallery with Bootstrap Grid */
.image-gallery {
    min-height: 400px;
    display: flex !important; /* Force flex layout on all devices */
    flex-direction: row !important; /* Always horizontal */
}

.image-card {
    perspective: 1000px;
    flex: 1; /* Equal width for all cards */
}

.image-container {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    height: 400px;
    transition: all 0.4s ease;
}

.image-container:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 5; /* Lower than navbar but higher than other content */
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.image-container:hover img {
    transform: scale(1.1);
    filter: brightness(0.7);
}

/* Overlay Animation */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    opacity: 0;
    transition: all 0.4s ease;
    transform: translateY(20px);
}

.image-container:hover .overlay {
    opacity: 1;
    transform: translateY(0);
}

.overlay h3 {
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.overlay p {
    transform: translateY(20px);
    transition: transform 0.4s ease 0.2s;
}

.image-container:hover .overlay h3,
.image-container:hover .overlay p {
    transform: translateY(0);
}

/* Custom Animation Effects for Each Image */
.image-card:nth-child(1) .image-container:hover {
    animation: bounce 0.6s ease;
}

.image-card:nth-child(2) .image-container:hover {
    animation: pulse 0.6s ease;
}

.image-card:nth-child(3) .image-container:hover {
    animation: rotate 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: scale(1.02);
    }
    40% {
        transform: scale(1.05);
    }
    60% {
        transform: scale(1.03);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1.02);
    }
    50% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1.02);
    }
}

@keyframes rotate {
    0% {
        transform: scale(1.02) rotateZ(0deg);
    }
    50% {
        transform: scale(1.02) rotateZ(2deg);
    }
    100% {
        transform: scale(1.02) rotateZ(0deg);
    }
}

/* Feature Cards Hover Effects */
.feature-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
    border-color: #667eea;
}

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

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

/* Services Section Styles */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    border-color: #667eea;
}

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

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

/* Contact Section Styles */
.contact-card {
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
}

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

.contact-card:hover .contact-icon {
    transform: scale(1.05);
}

/* Custom Responsive Adjustments */
@media (max-width: 991.98px) {
    .image-gallery {
        flex-direction: row !important; /* Keep horizontal on tablets */
        min-height: 300px;
    }
    
    .image-container {
        height: 300px;
    }
}

@media (max-width: 767.98px) {
    .image-gallery {
        flex-direction: row !important; /* Keep horizontal on mobile */
        min-height: 250px;
    }
    
    .image-container {
        height: 250px;
    }
    
    .custom-navbar {
        padding: 0.5rem 0;
    }
    
    .hero-section {
        margin-top: 56px; /* Smaller navbar on mobile */
    }
    
    /* Adjust overlay text size for mobile */
    .overlay h3 {
        font-size: 1.2rem !important;
    }
    
    .overlay p {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 575.98px) {
    .image-gallery {
        flex-direction: row !important; /* Still horizontal on small mobile */
        min-height: 180px;
    }
    
    .image-container {
        height: 180px;
    }
    
    /* Further reduce text size for very small screens */
    .overlay h3 {
        font-size: 0.9rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .overlay p {
        font-size: 0.7rem !important;
        padding: 0 5px;
        line-height: 1.2;
    }
    
    /* Adjust navbar for very small screens */
    .navbar-brand {
        font-size: 1.2rem !important;
    }
    
    .custom-navbar {
        padding: 0.3rem 0;
    }
    
    .hero-section {
        margin-top: 50px;
    }
}
