/* ==========================================================================
   1. GLOBAL STYLES & VARIABLES
   Used by: iotedge.html, index.html
   Source: 0-global.css
   ========================================================================== */
:root {
    --iotedge-purple: #9146FF;
    --iotedge-purple-1: #A873FF;
    --iotedge-yellow-0: #FFE546;
    --iotedge-green-0: #46FF91;
    --iotedge-green-4: #46FF5E;
    --iotedge-divider: #ccc;

    --github-light-purple: #9466e2;
    --baby-pink: #ff94c2;
    --highlight-yellow: #f2d743;
    --background-light: #ffffff;
    --background-dark: #f6f8fa;
    /* --text-color: #24292e; */
    --text-color: hsl(210, 10%, 0%);
    --text-color-1: hsl(210, 10%, 50%);
    --text-color-iot-edge: hsl(210, 10%, 30%);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;

    font-size: 16px;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-light);
    color: var(--text-color);
    line-height: 1.6;
    scroll-behavior: smooth;
}

.fade-out {
    opacity: 0;
}

section {
    scroll-margin-top: 8rem;
    max-width: 60rem;
    margin: 0 auto;
    text-align: center;
    justify-content: center;
    align-items: center;
}

p {
    margin-top: 0;
    text-align: justify;
}

/* Links styling in p */
p a:link {
    text-decoration: none;
    color: var(--iotedge-purple);
}

p a:visited {
    text-decoration: none;
    color: var(--iotedge-purple);
}

p a:hover {
    text-decoration: underline;
}

p a:active {
    text-decoration: underline;
}

@media (max-width: 768px) {

    /* Exclude specific elements from global margin adjustment */
    body *:not(header):not(footer):not(section img):not(.gateway-container):not(.gateway-header):not(.product-pipeline):not(.product-card):not(.product-icon):not(.btn-fake):not(.flow-connector):not(.particle-container):not(.mobile-nav):not(.mobile-nav-item-wrapper):not(.nav-item):not(.mobile-submenu-wrapper):not(.nav-submenu-item):not(.hamburger-menu):not(.hamburger-menu.active):not(.hamburger-menu span):not(.modal) {
        margin-left: 0.3rem;
        margin-right: 0.3rem;
    }
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   Used by: iotedge.html, index.html
   Source: 1-header.css
   ========================================================================== */
header {
    background-color: var(--iotedge-purple);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1001;
    box-shadow: 0 0.25rem 0.375rem var(--shadow-color);
    height: 2.8rem;
    transition: top 0.3s ease-in-out;
}

header .nav-container {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    max-width: 75rem;
    margin: 0 auto;
    align-items: center;
}

header img {
    width: auto;
    height: 3.5rem;
    cursor: pointer;
    transition: transform var(--transition-speed);
    vertical-align: middle;
}

@media (max-width: 866px) {
    header img {
        height: 3rem;
    }
}

nav {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    gap: 1.25rem;
}

nav .nav-item {
    color: #ffffff;
    text-decoration: none;
    padding: 0.625rem 0.25rem;
    border-radius: 0.0625rem;
    font-weight: 500;
    position: relative;
    transition: background-color var(--transition-speed);
}

nav .nav-item:hover:after,
nav .nav-item.active:after {
    width: 100%;
    content: '';
    position: absolute;
    height: 0.125rem;
    background-color: var(--iotedge-yellow-0);
    bottom: -0.1875rem;
    left: 0;
    transition: width var(--transition-speed);
}

nav a:hover,
nav a.active {
    color: var(--iotedge-yellow-0);
}

nav .cta-button {
    text-decoration: none;
    background-color: var(--iotedge-green-0);
    color: var(--text-color) !important;
    padding: 0.625rem 1.25rem;
    border-radius: 0.625rem;
    font-weight: 500;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

nav .cta-button:hover {
    background-color: var(--iotedge-green-4);
    transform: scale(1.05);
}

.nav-item-wrapper {
    position: relative;
    padding: 0.625rem;
}

.nav-submenu-wrapper {
    display: none;
    position: absolute;
    top: 150%;
    left: 0;
    background-color: rgba(255, 255, 255);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    z-index: 1000;
    width: 12.5rem;
    border-radius: 0.5rem;
}

.nav-hover-zone {
    position: absolute;
    top: 100%;
    left: 0;
    width: 12.5rem;
    height: 3rem;
    z-index: 999;
    background-color: transparent;
    display: none;
}

/* Show submenu on hover */
.nav-item-wrapper:hover .nav-submenu-wrapper,
.nav-hover-zone:hover+.nav-submenu-wrapper {
    display: block;
}

.nav-item-wrapper:hover .nav-hover-zone {
    display: block;
}

.arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 0.3125rem solid transparent;
    border-right: 0.3125rem solid transparent;
    border-top: 0.3125rem solid currentColor;
    margin-left: 0.3125rem;
    margin-top: 0.25rem;
    transition: transform 0.3s ease;
}

.nav-item-wrapper .arrow,
.mobile-nav-item-wrapper .arrow {
    position: relative;
    top: -0.125rem;
}

.mobile-nav-item-wrapper.active .arrow,
.nav-item-wrapper:hover .arrow {
    transform: rotate(180deg);
}

.nav-submenu-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--iotedge-purple);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-submenu-item:hover {
    background-color: var(--iotedge-purple);
    color: var(--iotedge-yellow-0);
}

/* Mobile Nav Styles */
.mobile-nav {
    display: none;
    background-color: rgba(145, 70, 255, 0.95);
    position: fixed;
    right: 0;
    top: 5.3rem;
    height: calc(100vh - 5.3rem);
    width: 12rem;
    z-index: 1002;
    flex-direction: column;
    align-items: center;
    box-shadow: -0.25rem 0.25rem 0.375rem var(--shadow-color);
    opacity: 0;
    transform: translateX(100%);
    transition: opacity var(--transition-speed), transform var(--transition-speed);
    overflow-y: auto;
}

.mobile-nav.active {
    display: flex;
    opacity: 1;
    transform: translateX(0);
}

.mobile-nav .nav-item {
    display: block;
    width: 60%;
    padding: 1rem 1.5rem;
    color: #ffffff;
    text-align: center;
    font-size: 1.25rem;
    margin: 0.5rem 0;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.mobile-nav .nav-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0.5rem 0.75rem rgba(0, 0, 0, 0.2);
}

.mobile-nav .cta-button {
    display: block;
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    background-color: var(--iotedge-green-0);
    color: #24292e !important;
    border-radius: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color var(--transition-speed), transform var(--transition-speed), box-shadow var(--transition-speed);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.mobile-nav .cta-button:hover {
    background-color: var(--iotedge-green-4);
    transform: scale(1.05);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

.mobile-nav .nav-item,
.mobile-nav .cta-button {
    z-index: 1001;
}

.mobile-nav-item-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    text-align: center;
}

.mobile-submenu-wrapper {
    display: none;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    margin-top: 0.5rem;
    border-radius: 0.5rem;
}

.mobile-nav-item-wrapper.active .mobile-submenu-wrapper {
    display: flex;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 2rem;
    height: 1.5rem;
    cursor: pointer;
    position: relative;
    margin-left: auto;
    transition: transform var(--transition-speed);
}

.hamburger-menu.active {
    transform: none;
}

.hamburger-menu span {
    display: block;
    height: 0.25rem;
    background-color: #fff;
    border-radius: 0.25rem;
    transition: all 0.3s ease-in-out;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(0.61rem) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-0.61rem) rotate(-45deg);
}

@media (max-width: 866px) {
    nav {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }
}

@media (max-width: 866px) and (orientation: landscape) {
    .mobile-nav .nav-item {
        padding: 0.5rem 1rem;
        margin: 0.25rem 0;
    }

    .mobile-nav .cta-button {
        padding: 0.5rem 1.5rem;
        margin-top: 1rem;
    }
}

/* ==========================================================================
   5. USE CASES SECTION
   Used by: iotedge.html
   Source: 3-usecases.css
   ========================================================================== */
.section-divider-h1 {
    margin-top: 8rem;
    font-size: 2rem;
    color: var(--iotedge-purple);
    font-weight: bold;
    text-transform: capitalize;
    padding-bottom: 0.25rem;
    border-bottom: 0.25rem solid var(--iotedge-divider);
}

/* ==========================================================================
   6. TECHNOLOGIES SECTION
   Used by: iotedge.html  010_about_us.html
   Source: 4-technologies.css
   ========================================================================== */
.styled-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.styled-list>li {
    margin-bottom: 20px;
}

.styled-list ul {
    list-style-type: ">  ";
    padding-left: 2rem;
    margin-top: 10px;
}

.styled-list ul li {
    margin-bottom: 0.5rem;
}

.styled-list ul li b {
    color: var(--text-color);
    font-weight: 600;
}

.styled-list a:link {
    text-decoration: none;
    color: var(--iotedge-purple);
}

.styled-list a:visited {
    text-decoration: none;
    color: var(--iotedge-purple);
}

.styled-list a:hover {
    text-decoration: underline;
}

.styled-list a:active {
    text-decoration: underline;
}

/* ==========================================================================
   7. CONTACT SECTION
   Used by: iotedge.html
   Source: 5-contact.css
   ========================================================================== */
.badge-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

.contact h4 {
    margin-top: 4rem;
    margin-bottom: 4rem;
    font-size: 1.125rem;
    max-width: 60rem;
    color: var(--text-color);
}

.profile-badge {
    max-width: 300px;
    background-color: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.badge-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.badge-header img {
    height: 20px;
}

.profile-content {
    text-align: left;
}

.profile-picture {
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 1.5rem auto 1rem;
}

.profile-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
    text-align: center;
    margin-bottom: 0.5rem;
}

.profile-title {
    font-size: 0.95rem;
    color: #555;
    text-align: center;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.profile-university {
    font-size: 0.85rem;
    color: #777;
    text-align: center;
    margin: 0 0 1rem;
}

.view-profile-btn {
    display: block;
    text-align: center;
    background-color: #fff;
    color: var(--iotedge-purple);
    border: 1px solid var(--iotedge-purple);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-weight: bold;
    margin: 2rem auto;
    width: fit-content;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-profile-btn-container {
    display: flex;
    justify-content: center;
}

.view-profile-btn:hover {
    background-color: var(--iotedge-purple);
    color: #fff;
}

@media (max-width: 768px) {
    .badge-container {
        flex-direction: column;
        gap: 1rem;
    }

    .profile-badge {
        max-width: 100%;
        margin: 0 auto;
        padding: 1rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .view-profile-btn-container {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .view-profile-btn {
        width: 25%;
        margin: 0.2rem auto;
    }
}

/* ==========================================================================
   8. GATEWAY (LANDING) PAGE SPECIFIC STYLES
   Used by: index.html
   Source: Embedded <style> in index.html
   ========================================================================== */
/* Ensure the body takes full height */
.gateway-container body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #F5F7FA;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Main Container - Centering Everything */
.gateway-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

/* Header Text */
.gateway-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 40rem;
    animation: fadeIn 0.8s ease-out;
}

.gateway-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.gateway-header p {
    font-size: 1.1rem;
    color: #7f8c8d;
    line-height: 1.6;
    text-align: center;
}

/* The Pipeline Row */
.product-pipeline {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    max-width: 70rem;
}

/* Product Cards */
.product-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    padding: 1rem 1rem;
    border-radius: 16px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-width: 280px;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(145, 70, 255, 0.15);
    border-color: #9146FF;
}

.product-icon {
    height: 20rem !important;
    width: 20rem !important;
    object-fit: contain;
    margin-bottom: 1rem;
    transition: transform 0.3s;
}

.product-card:hover .product-icon {
    transform: scale(1.2);
}

.product-card h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.product-card p {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Fake Button */
.btn-fake {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    background-color: #f0f0f0;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.product-card:hover .btn-fake {
    background-color: #9146FF;
    color: white;
}

/* --- VERCEL-STYLE PARTICLE FLOW CONNECTOR --- */
.flow-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 120px;
    position: relative;
    overflow: visible;
}

.particle-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, #9146FF, #A873FF);
    box-shadow: 0 0 8px rgba(145, 70, 255, 0.6);
    opacity: 0;
}

/* Three different paths */
.particle.path-1 {
    top: 20%;
    animation: moveParticle1 var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

.particle.path-2 {
    top: 50%;
    animation: moveParticle2 var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

.particle.path-3 {
    top: 80%;
    animation: moveParticle3 var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes moveParticle1 {
    0% {
        left: -10px;
        opacity: 0;
        transform: scale(0.5) translateY(0);
    }

    10% {
        opacity: 1;
    }

    50% {
        transform: scale(1) translateY(-2px);
    }

    90% {
        opacity: 1;
    }

    100% {
        left: calc(100% + 10px);
        opacity: 0;
        transform: scale(0.5) translateY(0);
    }
}

@keyframes moveParticle2 {
    0% {
        left: -10px;
        opacity: 0;
        transform: scale(0.5) translateY(0);
    }

    10% {
        opacity: 1;
    }

    50% {
        transform: scale(1) translateY(0);
    }

    90% {
        opacity: 1;
    }

    100% {
        left: calc(100% + 10px);
        opacity: 0;
        transform: scale(0.5) translateY(0);
    }
}

@keyframes moveParticle3 {
    0% {
        left: -10px;
        opacity: 0;
        transform: scale(0.5) translateY(0);
    }

    10% {
        opacity: 1;
    }

    50% {
        transform: scale(1) translateY(2px);
    }

    90% {
        opacity: 1;
    }

    100% {
        left: calc(100% + 10px);
        opacity: 0;
        transform: scale(0.5) translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 868px) {

    .product-pipeline {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .flow-connector {
        transform: none !important;
        min-width: 100%;
        height: 100px;
        position: relative;
        display: flex;
        justify-content: center;
    }

    .particle-container {
        width: 100%;
        height: 100%;
    }

    .particle {
        left: 50% !important;
        margin-left: -4px;
        top: -10px;
    }

    @keyframes moveParticleMobile {
        0% {
            top: -10px;
            opacity: 0;
            transform: scale(0.5);
        }

        10% {
            opacity: 1;
        }

        90% {
            opacity: 1;
        }

        100% {
            top: 110px;
            opacity: 0;
            transform: scale(0.5);
        }
    }

    .particle.path-1,
    .particle.path-2,
    .particle.path-3 {
        animation: moveParticleMobile var(--duration) linear infinite !important;
        animation-delay: var(--delay) !important;
    }

    .gateway-container {
        padding: 2rem 1rem;
    }
}

/* ==========================================================================
   10. FOOTER STYLES
   Used by: iotedge.html, index.html
   Source: 6-footer.css
   ========================================================================== */
footer {
    background-color: var(--iotedge-purple);
    padding: 1rem;
    text-align: center;
    bottom: 0;
    box-shadow: 0 -0.25rem 0.375rem var(--shadow-color);
}

footer .footer-container {
    display: flex;
    justify-content: space-between;
    width: 15%;
    max-width: 75rem;
    margin: 0 auto;
    align-items: center;
}

.footer-copyright,
.footer-link {
    color: #ffffff;
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 500;
}

.footer-link:hover {
    color: var(--iotedge-yellow-0);
}

@media (max-width: 768px) {
    footer .footer-container {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
        width: 100%;
        text-align: center;
    }

    .footer-copyright,
    .footer-link {
        font-size: 0.75rem;
        white-space: nowrap;
    }
}



/* Kill the global mobile margins inside gateway (they cause overflow) */
@media (max-width: 768px) {

    /* Prevent mobile sideways scrolling */
    html,
    body {
        overflow-x: hidden;
    }

    /* Gateway should never exceed viewport */
    .gateway-container {
        width: 100%;
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .gateway-container * {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* header {
        position: fixed !important;
        top: 0;
    } */

    header .nav-container {
        justify-content: space-between;
        width: 100%;
        gap: 0;
    }

    header img {
        height: 2.5rem;
        margin-left: 0;
    }

    .hamburger-menu {
        flex-shrink: 0;
        z-index: 2000;
        margin-left: 0;
    }
}