/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Orbitron:wght@400;500;700&display=swap');

:root {
    /* Brand Colors */
    --primary-color: #FF0033;
    --secondary-color: #ffffff;

    /* Light Theme Palette */
    --bg-body: #ffffff;
    --bg-card: #f8f9fa;
    --bg-dark: #212529;

    /* Text Colors */
    --text-main: #212529;
    --text-secondary: #555555;
    --text-light: #ffffff;

    /* Typography */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions */
    --transition-fast: 0.3s ease;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Navbar */
.navbar {
    background: transparent;
    /* Initially transparent for cleaner look */
    padding: 1.5rem 0;
    transition: all 0.4s ease;
    border-bottom: 1px solid transparent;
}

.navbar-scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    /* Stronger shadow */
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-brand img {
    height: 40px;
    transition: 0.3s;
}

.navbar-scrolled .navbar-brand img {
    height: 35px;
    /* Slight resize on scroll */
}

.nav-link {
    font-family: var(--font-heading);
    color: var(--text-main) !important;
    text-transform: uppercase;
    font-weight: 600;
    /* Made bolder for visibility */
    font-size: 0.85rem;
    margin: 0 12px;
    position: relative;
    transition: var(--transition-fast);
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    /* Thicker underline */
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition-fast);
    border-radius: 2px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.navbar-toggler {
    border: 2px solid var(--text-main);
    padding: 4px 8px;
    color: var(--text-main);
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

/* Dropdown Menu Improvements */
.dropdown-menu {
    border: none;
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
    padding: 0.5rem 0;
    margin-top: 0;
}

.dropdown-item {
    padding: 0.7rem 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: 0.2s;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--bg-card);
    color: var(--primary-color);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--primary-color);
    color: #fff;
}

/* Open on Hover for Desktop */
@media (min-width: 992px) {
    .dropdown:hover .dropdown-menu {
        display: block;
        animation: fadeInUp 0.3s;
    }

    .dropdown>.dropdown-toggle:active {
        /*pointer-events: none;*/
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Ensure Nav Link Caret visual is clear */
/* Ensure Nav Link Caret visual is clear */
.nav-link.dropdown-toggle::after {
    font-family: "bootstrap-icons";
    content: "\f282";
    /* chevron-down */
    border: none;
    vertical-align: middle;
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
    position: static;

    /* Reset properties to prevent underline conflict */
    width: auto !important;
    height: auto !important;
    background: none !important;
}

.dropdown:hover .nav-link.dropdown-toggle::after {
    transform: rotate(180deg);
    color: var(--primary-color);
    width: auto !important;
    /* Ensure it stays auto on hover */
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-light);
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 12px 30px;
    border-radius: 6px;
    /* Slightly rounded */
    box-shadow: 0 10px 20px rgba(255, 0, 51, 0.25);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
}

.btn-primary:hover {
    background-color: #d6002b;
    border-color: #d6002b;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 0, 51, 0.4);
}

.btn-outline-dark {
    border-width: 2px;
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: radial-gradient(circle at 10% 20%, rgb(249, 249, 249) 0%, rgb(255, 255, 255) 90%);
    /* Cleaner gradient */
    padding-top: 100px;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--text-main);
    text-transform: uppercase;
    /* More impactful */
}

.hero-content h1 span.hero-accent {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

/* Optional: Underline decoration for hero accent */
.hero-content h1 span.hero-accent::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 10px;
    background: rgba(255, 0, 51, 0.1);
    z-index: -1;
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    line-height: 1.6;
}

.drop-shadow {
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Services */
.service-card {
    background: #ffffff;
    padding: 3rem 2rem;
    border-radius: 20px;
    border: 1px solid transparent;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    /* Softer, larger shadow */
    transition: all 0.4s ease;
    height: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transition: 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.service-card:hover::before {
    opacity: 1;
}

.service-img-container {
    height: 220px;
    /* Larger images */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.service-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: 0.4s;
}

.service-card:hover .service-img {
    transform: scale(1.1);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.6rem;
    color: var(--text-main);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* About Section */
.about-section-img {
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* Contact Section */
.contact-form-wrapper {
    background: #ffffff;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.form-control,
.form-select {
    background-color: #fcfcfc;
    border: 2px solid #edeff2;
    color: var(--text-main);
    border-radius: 8px;
    font-size: 1rem;
    padding: 1rem;
}

.form-control:focus,
.form-select:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: none;
    color: var(--text-main);
}

/* Footer */
footer {
    background-color: #1a1a1a;
    color: #fff;
    font-family: var(--font-body);
}

footer h6 {
    color: #fff;
    letter-spacing: 1px;
}

footer .form-control {
    background: #333;
    border: none;
    color: #fff;
}

footer .form-control::placeholder {
    color: #999;
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1) !important;
}

.icon-box-lg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 0, 51, 0.1) !important;
    /* Light red tint */
}

/* Grayscale hover for Tech Stack */
.grayscale-hover>div {
    transition: 0.3s;
}

.grayscale-hover>div:hover {
    color: var(--primary-color) !important;
    transform: scale(1.05);
}

.grayscale-hover h4 {
    opacity: 0.6;
}


/* Hero Animation Container */
.hero-anim-container {
    position: relative;
    width: 100%;
    height: 450px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #ffffff;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensure full image visibility */
    opacity: 1;
}

/* Overlay Elements */
.anim-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* Cloud Hub Animation */
.cloud-hub {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 50px;
    color: var(--primary-color);
    filter: drop-shadow(0 10px 20px rgba(255, 0, 51, 0.3));
    z-index: 10;
    animation: pulseCloud 4s ease-in-out infinite;
}

@keyframes pulseCloud {

    0%,
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translateX(-50%) scale(1.1);
        opacity: 0.9;
    }
}

/* Communications Tower */
.comms-tower {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    color: #212529;
    z-index: 9;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

.comms-tower::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 1px solid rgba(255, 0, 51, 0.2);
    border-radius: 50%;
    animation: towerPulse 2s infinite;
}

@keyframes towerPulse {
    0% {
        width: 60px;
        height: 60px;
        opacity: 1;
        border-width: 2px;
    }

    100% {
        width: 150px;
        height: 150px;
        opacity: 0;
        border-width: 0;
    }
}

/* Data Packet Animation */
.data-packet {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #212529;
    border-radius: 50%;
    opacity: 0;
    z-index: 11;
}

/* Stage 1: Sensors -> Tower */
.packet-sensor-1 {
    animation: sendToTower 2s linear infinite;
    left: 15%;
    top: 75%;
}

.packet-sensor-2 {
    animation: sendToTower 2s linear infinite 0.7s;
    left: 85%;
    top: 60%;
}

.packet-sensor-3 {
    animation: sendToTower 2s linear infinite 1.4s;
    left: 40%;
    top: 85%;
}

/* Stage 1b: Vehicle & Drone -> Tower */
.packet-vehicle-1 {
    animation: sendToTower 2.5s linear infinite 0.3s;
    left: 10%;
    top: 65%;
    background: var(--primary-color);
}

.packet-drone-1 {
    animation: sendToTower 2.5s linear infinite 1.1s;
    left: 80%;
    top: 25%;
    background: var(--primary-color);
}

@keyframes sendToTower {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
}

/* Stage 2: Tower -> Cloud */
.packet-tower-1 {
    animation: sendToCloud 2s linear infinite 1s;
    top: 50%;
    left: 50%;
}

.packet-tower-2 {
    animation: sendToCloud 2s linear infinite 2s;
    top: 50%;
    left: 50%;
}

@keyframes sendToCloud {
    0% {
        transform: translate(-50%, -50%);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        top: 15%;
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

/* Floating Sensor Animation */
.sensor-node {
    position: absolute;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 8px 16px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    /* Soft Shadow */
    animation: floatSensor 4s ease-in-out infinite;
    z-index: 8;
}

.sensor-node i {
    font-size: 16px;
    color: var(--primary-color);
}

.sensor-1 {
    top: 75%;
    left: 10%;
    animation-delay: 0s;
}

.sensor-2 {
    top: 60%;
    right: 10%;
    animation-delay: 1.5s;
}

.sensor-3 {
    bottom: 10%;
    left: 40%;
    animation-delay: 2.5s;
}

@keyframes floatSensor {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Grid Overlay */
.grid-overlay {
    display: none;
}