/* CSS Variables for Theme */
:root {
    --primary-color: #0056b3;
    --secondary-color: #00a8ff;
    --text-dark: #2d3436;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    --card-bg: #ffffff;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    color: var(--text-light);
}

    .hero h1 {
        font-size: 4rem;
        font-weight: 800;
        margin-bottom: 10px;
        animation: fadeInDown 1s ease;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    }

    .hero h2 {
        font-size: 2rem;
        font-weight: 400;
        margin-bottom: 20px;
        animation: fadeInDown 1s ease;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    }

    .hero p {
        font-size: 1.25rem;
        max-width: 750px;
        margin-bottom: 40px;
        animation: fadeInUp 1s ease;
        color: #e0e0e0;
    }

.hero-btn {
    display: inline-block;
    padding: 16px 40px;
    background: var(--secondary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 168, 255, 0.4);
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}

    .hero-btn:hover {
        background: var(--primary-color);
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 86, 179, 0.6);
    }
/* Hero Section Container */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    color: var(--text-light);
    overflow: hidden;
    background-color: #000; /* Fallback background */
}

    /* Setup both background layers */
    .hero::before,
    .hero::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    /* Image 2: BOTTOM LAYER (Sits underneath, revealed when Image 1 fades) */
    .hero::after {
        z-index: 1; /* FIXED: Moved from -1 to 1 so it sits in front of the black background */
        background-image: linear-gradient(rgba(0, 15, 30, 0.7), rgba(0, 30, 60, 0.7)), url('/images/tracking.jpeg');
        /* Zooms in the opposite direction for contrast */
        animation: smoothZoom 24s infinite alternate-reverse;
    }

    /* Image 1: TOP LAYER (Sits on top and fades away) */
    .hero::before {
        z-index: 2; /* FIXED: Moved from 0 to 2 so it sits on top of Image 2 */
        background-image: linear-gradient(rgba(0, 15, 30, 0.7), rgba(0, 30, 60, 0.7)), url('/images/app.avif');
        /* Runs the fade AND the zoom at the same time */
        animation: imageCrossfade 12s infinite alternate, smoothZoom 24s infinite alternate;
    }

    /* Lock all text and buttons securely ON TOP of the backgrounds */
    .hero h1,
    .hero h2,
    .hero p,
    .hero a.hero-btn {
        position: relative;
        z-index: 10; /* FIXED: Increased to 10 to ensure it stays in front of both images */
    }

/* --- The Animations --- */

/* 1. Crossfades the top image out to reveal the bottom one */
@keyframes imageCrossfade {
    0%, 35% {
        opacity: 1;
    }

    65%, 100% {
        opacity: 0;
    }
}

/* 2. Slowly scales the images to give it that breathing effect */
@keyframes smoothZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.15);
    }
    /* Increased slighty for a better 3D feel */
}
/* Services Section */
.services-section {
    padding: 100px 5%;
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.8rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

    .section-title::after {
        content: '';
        position: absolute;
        width: 60px;
        height: 4px;
        background: var(--secondary-color);
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 2px;
    }

/* Services Grid - 3 Columns on Desktop */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
}

    .service-card:hover {
        transform: translateY(-12px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    }

.img-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-card:hover .service-img {
    transform: scale(1.1);
}

.service-content {
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    align-items: center;
    text-align: center;
}

    .service-content h3 {
        font-size: 1.4rem;
        color: var(--text-dark);
        margin-bottom: 15px;
        font-weight: 700;
    }

    .service-content p {
        color: #636e72;
        margin-bottom: 30px;
        flex-grow: 1;
        font-size: 0.95rem;
    }

.proceed-btn {
    display: block;
    width: 100%;
    padding: 12px 0;
    background: #f1f2f6;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.service-card:hover .proceed-btn {
    background: var(--primary-color);
    color: var(--text-light);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .services-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
        gap: 30px;
    }
}