:root {
    --primary-color: #10106b;
    --secondary-color: #A2AAAD;
    --background-color: #f8f9fa;
    --text-color: #333333;
    --accent-color: #B80000;
    --divider-color: #e9ecef;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 15px;
}

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

p {
    font-size: 1.3rem;
    font-weight: 400;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--divider-color);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

header {
    background-color: white;
    padding: 0.75rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, padding 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 0.4rem 5%;
}

.logo-container {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.logo-image {
    max-height: 60px;
    width: auto;
    transition: max-height 0.3s ease;
    margin-right: 2px;
}

.company-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

header.scrolled .logo-image {
    max-height: 60px;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--primary-color);
    transition: all 0.3s ease-in-out;
}

.nav-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 1.1rem;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

main {
    margin-top: 80px;
}

h2, h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;

}

h4 {
    color: var(--accent-color);
    font-size: 1.25rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.2;
}

h1 {
    color: white;
    font-size: 4rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

@keyframes underlineAnimation {
    0% {
        width: 0;
    }
    100% {
        width: 50px;
    }
}

h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background-color: var(--accent-color);
    animation: underlineAnimation 0.5s ease forwards;
    animation-delay: 0.3s;
}

section {
    margin-bottom: 4rem;
    padding: 4rem 10%;
    position: relative;
}

section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background-color: var(--divider-color);
}

section:last-child::after {
    display: none;
}

.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(0, 0, 0, 0.6),
        rgba(0, 0, 0, 0.6)
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 3rem;
    border-radius: 10px;
    max-width: 1000px;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 1.5rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-weight: 400;
    letter-spacing: 0.05rem;
}

.cta-button:hover {
    background-color: #174cd1;
    transform: translateY(-2px);
}

.about-highlights {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 2rem;
}

.about-highlights h3 {
    font-size: 2rem;
}

.highlight {
    flex: 1;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.highlight:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.highlight i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.animate-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
}

#technology ul {
    list-style-type: none;
    padding: 0;
}

#technology li {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

#technology i {
    margin-right: 1.5rem;
    font-size: 1.8em;
    color: var(--primary-color);
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 2rem;
}

.section-header {
    text-align: left;
    margin-bottom: 40px;
}

.section-header .underline {
    width: 50px;
    height: 3px;
    background-color: #000;
    margin: 10px 0;
}

.success-stories {
    gap: 40px;
}

.story-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.story-text {
    flex: 1;
    text-align: left;
}

.story-image {
    flex: 1;
}

.story-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.solution-slider {
    overflow: hidden;
    position: relative;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.solution-slide {
    display: none;
    padding: 2rem;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.solution-slide.active {
    display: block;
    animation: slideIn 0.5s forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slider-controls {
    text-align: center;
    margin-top: 1.5rem;
}

.slider-controls button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.slider-controls button:hover {
    background-color: #174cd1;
    transform: translateY(-2px);
}

form {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto;
}

input, textarea {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 56, 49, 0.25);
}

button {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 1rem;
    font-weight: bold;
}

button:hover {
    background-color: #174cd1;
    transform: translateY(-2px);
}

footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-social a {
    color: white;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: var(--accent-color);
}

.footer-logo img {
    height: 75px;
    width: auto;
}

.footer-content .footer-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* AOS custom styles */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(100px);
}

[data-aos="fade-down"] {
    transform: translateY(-100px);
}

[data-aos="fade-right"] {
    transform: translateX(-100px);
}

[data-aos="fade-left"] {
    transform: translateX(100px);
}

[data-aos].aos-animate {
    transform: translate(0);
}

.news-slider {
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    height: 500px;
    width: 100%;
}

.news-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.news-slide.active {
    opacity: 1;
    z-index: 1;
}

.news-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.news-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    z-index: -1;
}

.news-slide:nth-child(1) { background-image: url('img/news1.jpg'); }
.news-slide:nth-child(2) { background-image: url('img/news2.jpg'); }
.news-slide:nth-child(3) { background-image: url('img/news3.jpg'); }
.news-slide:nth-child(4) { background-image: url('img/news4.jpg'); }

.news-slide.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.news-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    max-width: 80%;
    width: 100%;
    line-height: 1.2;
    z-index: 3;
    margin: 0;
}

.news-content h3 {
    color: WHITE;
    margin-bottom: 1rem;
    font-size: 4rem;
    z-index: 2;
    line-height: 1.1;
}

.news-content p {
    margin-bottom: 1rem;
    margin-top: 0.75rem;
}

.news-content a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.news-content a:hover {
    color: white;
}

.news-slide .company-logo {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 150px;
    z-index: 2;
}

.content-left,
.content-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.content-right {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-right:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.section-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.section-image:hover {
    transform: scale(1.05);
}

/* Maze Path */
/* Maze Path */
#maze-path {
    stroke: #f00;
    stroke-width: 2;
    fill: none;
    stroke-dasharray: var(--path-length); /* This will be dynamically set */
    stroke-dashoffset: var(--path-length); /* Start with the full dashoffset to hide the line */
    marker-end: url(#arrowhead);
    /* No animation applied here yet. It will be triggered dynamically in JS. */
}

/* Obstacles (no animation) */
.obstacle {
    fill: #10106b;
}

/* Initially hide the arrowhead */
#arrowhead {
    visibility: hidden;
}

/* Keyframes for line drawing animation */
@keyframes drawPath {
    to {
        stroke-dashoffset: 0; /* Reveal the line gradually by reducing the dashoffset to 0 */
    }
}

/* Smaller Random Shapes */
.small-shape {
    fill: var(--accent-color);
}



.technology-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-title {
    color: var(--primary-color);
}

.section-description {
    color: var(--text-color);
    margin-bottom: 40px;
}

.technology-list {
    position: relative;
    padding-top: 20px;
}

.technology-list::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: var(--primary-color);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.5s ease;
}

.technology-list.animate::before {
    transform: scaleY(1);
}

.technology-item {
    position: relative;
    margin-bottom: 60px;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    height: 100px;
}

.technology-item.animate {
    opacity: 1;
}

.icon-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 60px;
    height: 60px;
    background-color: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    transition: transform 0.5s ease 0.7s;
}

.technology-item.animate .icon-container {
    transform: translate(-50%, -50%) scale(1);
}

.icon {
    font-size: 30px;
    opacity: 0;
    transition: opacity 0.3s ease 1s;
}

.technology-item.animate .icon {
    opacity: 1;
}

#technology h3{
    margin-bottom: 0.075rem;
    font-size: 1.5rem;
}

#technology p{
    margin-top: 0.075rem;
}

.content {
    position: absolute;
    top: 50%;
    width: calc(50% - 50px);
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.5s ease 1s, opacity 0.5s ease 1s;
    opacity: 0;
}

.content:hover {
    transform: translateY(-5px);
}

.technology-item:nth-child(odd) .content {
    right: 50%;
    margin-right: 50px;
    transform: translate(50px, -50%);
}

.technology-item:nth-child(even) .content {
    left: 50%;
    margin-left: 50px;
    transform: translate(-50px, -50%);
}

.technology-item.animate:nth-child(odd) .content,
.technology-item.animate:nth-child(even) .content {
    transform: translate(0, -50%);
    opacity: 1;
}

#success h2 {
    margin-bottom: 30px;
}

.success-stories {
    display: flex;
    flex-direction: column;
    gap: 120px;
}

.story-container {
    display: flex;
    align-items: stretch;
    gap: 30px;
}

.story-text, .story-image {
    flex: 1;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.story-text:hover, .story-image:hover {
    transform: translateY(-5px);
}

.story-text {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeIn 1s ease-out;
}
.story-text h3 {
    font-size: 1.65rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.story-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.story-image:hover img {
    transform: scale(1.05);
}

#node-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}
svg {
    width: 100%;
    height: auto;
}
.node-highlight, .node-border {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.node-highlight {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 3;
}
.node-border {
    fill: none;
    stroke: black;
    stroke-width: 2;
}
#connectingLine {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 2.5s linear;
}

/* Responsive SVG */
.responsive-svg {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Responsive video */
.section-video {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 8px;
}

#graph-container {
    position: relative;
    width: 100%;
    height: 400px; /* Fixed height for mobile */
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden; /* Prevent overflow */
}

.node-graph {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 0, 0, 0.8);
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    z-index: 10; /* Ensure the nodes are on top of edges */
    animation: float 3s ease-in-out infinite;
}

.node-graph.green {
    background-color: rgba(0, 255, 0, 0.8);
}

.node-graph.blue {
    background-color: rgba(0, 0, 255, 0.8);
}

.edge {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.4); /* Slightly darker color for visibility */
    height: 2px;
    z-index: 1; /* Ensure the edges are behind the nodes */
    transform-origin: top left;
    transition: width 0.5s ease; /* Edge grows faster */
}

@keyframes float {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-4px); /* Less dramatic swaying */
    }
}

#d3-container {
    width: 100%;
    height: 40vh; /* or any other responsive height */
    max-width: 800px; /* optional: set a max-width if desired */
    margin: 0 auto; /* centers the container */
}





/* MOBILE START */
/* ----- */
/* Media Queries for Responsive Design */
@media (max-width: 1200px) {
    html {
        font-size: 14px;
    }

    .section-content {
        flex-direction: column;
    }

    .content-left,
    .content-right {
        width: 100%;
    }

    .content-right {
        margin-top: 2rem;
    }
}

@media (max-width: 992px) {
    html {
        font-size: 14px;
    }

    .about-highlights {
        flex-direction: column;
    }

    .highlight {
        width: 100%;
        margin-bottom: 2rem;
    }

    .story-container {
        display: flex;
        flex-wrap: wrap;
    }

    .story-text,
    .story-image {
        width: 100%;
        flex: 1 1 300px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 5%;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        height: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        left: 0;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin: 2.5rem 0;
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero {
        height: auto;
        min-height: 100vh;
    }

    .hero-content {
        padding: 2rem;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2rem;
    }

    .news-content h3 {
        font-size: 2.5rem;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-logo,
    .footer-links,
    .footer-social {
        margin-bottom: 1rem;
    }

    .footer-logo{
        margin-top: 3rem;
    }

    .technology-list::before {
        left: 20px;
    }
    .technology-list{
        display: flex;
        flex-direction: column;
        gap: 20px;
        justify-content: space-between;
    }

    .icon-container {
        left: 20px;
    }

    .technology-item:nth-child(odd) .content,
    .technology-item:nth-child(even) .content {
        left: 60px;
        width: calc(100% - 80px);
        margin-left: 0;
        margin-right: 0;
    }
    .news-content{
        top: 60%;
    }
    .story-container{
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 12px;
    }

    p{
        font-size: 1.2rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .news-slider {
        height: 300px;
    }

    .news-content h3 {
        font-size: 2rem;
    }
}
