/* ===== CSS Variables ===== */
:root {
    --primary: #0d6efd;
    --primary-light: #e8f4fc;
    --secondary: #6c757d;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #212529;
    --white: #ffffff;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --shadow-xl: 0 12px 36px rgba(0,0,0,0.2);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-round: 50%;
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
}

.section-title.text-start:after {
    left: 0;
    transform: none;
}

.lead {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--secondary);
}

/* ===== Top Bar ===== */
.top-bar {
    font-size: 0.9rem;
}

.top-bar i {
    font-size: 0.8rem;
}

/* ===== Navigation ===== */
.brand-name {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    position: relative;
    color: var(--dark) !important;
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 1rem;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover:after,
.nav-link.active:after {
    width: calc(100% - 2rem);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section:not(#home) {
    background: linear-gradient(135deg, #1a3a8f 0%, #0d6efd 100%);
    color: white;
    height: 300px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section:not(#home)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: 0;
}

.hero-section.about-hero::before {
    background-image: url('https://images.unsplash.com/photo-1548839140-29a749e1cf4d?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
}

.hero-section.services-hero::before {
    background-image: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
}

.hero-section.products-hero::before {
    background-image: url('https://images.unsplash.com/photo-1576086213369-97a306d36557?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
}

.hero-section.pricing-hero::before {
    background-image: url('https://images.unsplash.com/photo-1548839140-29a749e1cf4d?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
}

.hero-section.contact-hero::before {
    background-image: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
}

.hero-section:not(#home) .hero-content h1,
.hero-section:not(#home) .hero-content p {
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-section:not(#home) .btn-outline-light {
    color: white;
    border-color: white;
}

.hero-section:not(#home) .btn-outline-light:hover {
    background-color: white;
    color: var(--primary);
}

.carousel-inner {
    min-height: 500px;
    height: 500px;
    position: relative;
}

.carousel-item {
    padding: 5rem 0;
    background: linear-gradient(135deg, #1a3a8f 0%, #0d6efd 100%);
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.min-vh-80 {
    min-height: 80vh;
}

.min-vh-50 {
    min-height: 50vh;
}

.hero-content-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Hero Image Styling */
.hero-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    height: 100%;
    min-height: 400px;
}

.hero-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.hero-image:hover img {
    transform: scale(1.05);
}

/* Add decorative elements */
.hero-image::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, var(--primary), rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    z-index: -1;
    opacity: 0.5;
}

/* Water drop effect on image */
.hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 123, 255, 0.1) 100%
    );
    pointer-events: none;
    border-radius: 12px;
}

/* Make sure text is readable on carousel */
.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    height: 100%;
}



.hero-content h1,
.hero-content h6,
.hero-content p,
.hero-content small,
.hero-content .btn-outline-light {
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-content a {
    color: white;
}

/* Add floating animation to features icons */
.hero-content i {
    animation: floatIcon 3s ease-in-out infinite;
}

.hero-content .col-sm-4:nth-child(2) i {
    animation-delay: 0.5s;
}

.hero-content .col-sm-4:nth-child(3) i {
    animation-delay: 1s;
}

/* Ensure carousel indicators and controls are visible */
.carousel-indicators button {
    background-color: rgba(255, 255, 255, 0.5);
}

.carousel-indicators button.active {
    background-color: white;
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Carousel controls */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 20px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: brightness(0) invert(1);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-image {
        min-height: 300px;
        margin-top: 40px;
    }
    
    .carousel-inner {
        min-height: 500px;
        height: 500px;
        position: relative;
    }
    
    .carousel-item {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.6s ease-in-out;
    }
    
    .carousel-item.active {
        opacity: 1;
        visibility: visible;
        position: relative;
    }
    
    .min-vh-50 {
        min-height: 45vh;
    }
    
    .hero-section:not(#home) {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .hero-image {
        min-height: 250px;
        max-height: 300px;
        margin-top: 30px;
    }
    
    .hero-image::before {
        top: -5px;
        left: -5px;
        right: -5px;
        bottom: -5px;
    }
    
    .carousel-inner {
        min-height: 500px;
        height: 500px;
        position: relative;
    }
    
    .carousel-item {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.6s ease-in-out;
    }
    
    .carousel-item.active {
        opacity: 1;
        visibility: visible;
        position: relative;
    }
}

/* Animation for image appearance */
.carousel-item.active .hero-image {
    animation: slideInRight 0.8s ease-out;
}

/* Ensure consistent height for carousel content */
.carousel-item .container {
    height: 100%;
}

.carousel-item .row {
    width: 100%;
    height: 100%;
    margin-left: 0;
    margin-right: 0;
}

.carousel-item .col-lg-7,
.carousel-item .col-lg-5 {
    height: 100%;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== About Section ===== */
#about {
    background-color: var(--white);
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* About Images */
.about-img-1,
.about-img-2,
.about-img-3 {
    overflow: hidden;
    position: relative;
    border-radius: var(--radius-lg);
}

.about-img-1 img,
.about-img-2 img,
.about-img-3 img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-img-1:hover img,
.about-img-2:hover img,
.about-img-3:hover img {
    transform: scale(1.05);
}

.about-img-1 {
    height: 400px;
}

.about-img-2 {
    height: 250px;
    margin-bottom: 1rem;
}

.about-img-3 {
    height: 130px;
}

/* ===== Service Cards ===== */
.service-card {
    transition: all 0.3s ease;
    border-radius: var(--radius-lg);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl) !important;
}

.service-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    background-color: var(--primary-light);
}

/* ===== Product Cards ===== */
.product-card {
    transition: all 0.3s ease;
    border-radius: var(--radius-lg);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg) !important;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.product-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Pricing Cards ===== */
.pricing-card {
    transition: all 0.3s ease;
    border-radius: var(--radius-lg);
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    transition: all 0.3s ease;
    border-radius: var(--radius-lg);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg) !important;
}

.rating {
    color: var(--warning);
    font-size: 1.25rem;
}

/* ===== Contact Section ===== */
.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    background-color: var(--primary-light);
}

.contact-details h5 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-details p {
    margin-bottom: 0;
    color: var(--secondary);
}

/* ===== Buttons ===== */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-light {
    border-color: var(--white);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: var(--white);
    color: var(--dark);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem !important;
    font-size: 1.1rem;
}

/* ===== Form Styles ===== */
.form-control {
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* ===== Footer ===== */
footer a.text-white-50:hover {
    color: var(--white) !important;
    padding-left: 5px;
    transition: all 0.3s ease;
}

.social-links a {
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary) !important;
    transform: translateY(-3px);
}

.subscribe-form .input-group {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.subscribe-form .btn {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ===== Responsive Styles ===== */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
        min-height: auto;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        text-align: center;
    }
    
    .section-title.text-start:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .about-img-1 {
        height: 300px;
    }
    
    .about-img-2 {
        height: 200px;
    }
    
    .about-img-3 {
        height: 100px;
    }
    
    .min-vh-80 {
        min-height: 60vh;
    }
    
    .min-vh-50 {
        min-height: 40vh;
    }
    
    .hero-content {
        height: auto;
        padding: 2rem 0;
    }
    
    .hero-section:not(#home) {
        height: 350px;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .product-card,
    .pricing-card,
    .testimonial-card {
        margin-bottom: 1.5rem;
    }
    
    .hero-content h6,
    .hero-content small {
        color: white;
    }
    
    .min-vh-50 {
        min-height: 30vh;
    }
    
    .hero-section:not(#home) {
        height: 300px;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===== Smooth Scroll ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Custom Utilities ===== */
.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

.bg-primary-light {
    background-color: var(--primary-light) !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary), #0b5ed7) !important;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Map Section Styling */
.map-section {
    margin-top: 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.map-section h5 {
    font-weight: 600;
    color: var(--dark);
}

.ratio {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* CTA Section Text Color */
section.bg-primary.text-white {
    color: white !important;
}

section.bg-primary.text-white h2,
section.bg-primary.text-white p {
    color: white !important;
}