/* Global Styles */
:root {
    --primary-color: #001f3f; /* Navy Blue */
    --secondary-color: #003366;
    --accent-color: #ff6b35;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --text-color: #333;
    --text-light: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

p {
    margin-bottom: 1rem;
}

.section {
    padding: 5rem 0;
}

.section h2 {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-color);
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: #e65a2b;
    border-color: #e65a2b;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Logo Styles */
.navbar-brand {
    padding: 0;
    margin-right: 2rem;
}

.logo-img {
    height: 85px; /* Adjust based on your logo's aspect ratio */
    width: auto;
    transition: all 0.3s ease;
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.98);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color) !important;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.nav-link {
    color: var(--dark-color) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
}

.nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover:after,
.nav-link.active:after {
    width: 100%;
}

/* Hero Section with Carousel */
.hero {
    position: relative;
    color: white;
    overflow: hidden;
    height: 100vh;
    max-height: 900px;
    min-height: 500px; /* Add minimum height for better mobile display */
}

.carousel {
    height: 100%;
    width: 100%;
}

.carousel-inner {
    height: 100%;
    width: 100%;
    position: relative;
}

.carousel-item {
    height: 100%;
    position: relative;
    width: 100%;
}

.carousel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed; /* Add parallax effect */
    z-index: 1;
    transition: transform 0.5s ease;
}

/* Carousel Caption Styling */
.carousel-caption {
    position: absolute;
    right: 15%;
    bottom: 20%;
    left: 15%;
    padding-top: 20px;
    padding-bottom: 20px;
    color: #fff;
    text-align: center;
    z-index: 10;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .hero {
        height: 50vh;
        min-height: 350px;
    }
    
    .carousel-caption {
        padding: 15px;
        bottom: 15%;
    }
    
    .carousel-caption h1 {
        font-size: 2rem !important;
        margin-bottom: 10px;
    }
    
    .carousel-caption p.lead {
        font-size: 1rem !important;
        margin-bottom: 15px;
        display: block; /* Ensure it's visible */
    }
    
    .carousel-caption .btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .carousel-bg {
        background-attachment: scroll; /* Disable parallax on mobile for better performance */
    }
}
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 31, 63, 0.85), rgba(0, 51, 102, 0.85));
    z-index: 2;
}

.carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    text-align: center;
}

.carousel-caption h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease;
    line-height: 1.2;
}

.carousel-caption p.lead {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease 0.2s both;
}

.carousel-caption .btn {
    animation: fadeInUp 1s ease 0.4s both;
    padding: 0.75rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
}

.hero p.lead {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    font-weight: 400;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero .btn {
    animation: fadeInUp 1s ease 0.4s both;
}

/* Make sure the carousel container has proper z-index */
.carousel-inner {
    position: relative;
    z-index: 1;
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 8%;
    z-index: 10;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background-size: 1.5rem;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: var(--accent-color);
}

/* Carousel Indicators */
.carousel-indicators {
    margin-bottom: 2rem;
    z-index: 10;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: var(--accent-color);
    transform: scale(1.2);
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .hero {
        height: auto;
        min-height: 100vh;
    }
    
    .carousel-caption {
        padding: 8rem 1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
}

@media (max-width: 575.98px) {
    .carousel-caption {
        padding: 6rem 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        display: none;
    }
}

/* Services Section */
.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    border-bottom: 3px solid var(--accent-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

/* Products Section */
.product-card {
    background: white;
    padding: 2rem 1rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #eee;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.product-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Clients Section */
.client-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.client-logo {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    color: var(--primary-color);
    transition: all 0.3s ease;
    text-align: center;
    flex: 1 1 200px;
    max-width: 300px;
}

.client-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Form Styles */
.form-control {
    padding: 0.75rem 1rem;
    border-radius: 5px;
    border: 1px solid #ddd;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(255, 107, 53, 0.25);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer Logo */
.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.footer-logo:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 5rem 0 0;
}

.footer h3, 
.footer h4 {
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--accent-color);
}

.footer p, 
.footer a {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
    display: block;
}

.footer a:hover {
    color: white;
    padding-left: 5px;
}

.footer-links li {
    margin-bottom: 0.5rem;
    list-style: none;
}

.footer-links a {
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 10px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 4rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* Hero Section */
.hero {
    padding-top: 76px; /* Height of navbar */
    position: relative;
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Carousel specific styles */
.carousel {
    width: 100%;
    height: 100%;
}

.carousel-inner,
.carousel-item,
.carousel-bg {
    height: 100%;
    min-height: 100vh;
}

.carousel-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.carousel-caption {
    position: absolute;
    right: 15%;
    bottom: 50%;
    left: 15%;
    transform: translateY(50%);
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    text-align: center;
    z-index: 1;
}

/* Mobile responsiveness */
@media (max-width: 767.98px) {
    .carousel-caption {
        bottom: 45%;
        transform: translateY(50%);
    }
    
    .carousel-caption h1 {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
    
    .carousel-caption .lead {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .carousel-caption .btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 10%;
    }
}

/* Ensure touch scrolling works on mobile */
.carousel-inner {
    -webkit-overflow-scrolling: touch;
}

/* Fix for iOS scrolling */
@supports (-webkit-overflow-scrolling: touch) {
    .carousel-inner {
        -webkit-overflow-scrolling: touch;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 5px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        margin-top: 1rem;
    }
    
    .nav-link {
        margin: 0.5rem 0;
        padding: 0.5rem 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .section {
        padding: 4rem 0;
    }
}

@media (max-width: 991.98px) {
    .logo-img, .footer-logo {
        height: 40px; /* Slightly smaller logo on mobile */
    }
    .hero {
        padding: 8rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .section h2 {
        font-size: 1.8rem;
    }
    
    .client-logo {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* Preload carousel images to prevent flickering */
body::after {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    z-index: -1;
    content: url('images/slide1.jpg') url('images/slide2.jpg') 
             url('images/slide3.jpg') url('images/slide4.jpg');
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}
