/* Global Styles */
html {
    background-color: #f5f5f5;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Header Styles */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em 2em;
    background-color: #222;
    color: white;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-size: 1.5em;
}

header a {
    color: white;
    text-decoration: none;
}

header nav {
    display: flex;
    flex-direction: column;
    align-items: end;
    gap: 1em;
}

header nav a {
    color: #f5f5f5;
    text-decoration: none;
    padding: 0.5em 1em;
    border-radius: 4px;
    transition: background-color 0.3s;
    z-index: 1000;
}

header nav a:hover {
    background-color: #444;
}

/* Mobile toggle button (hamburger menu) */
.nav-toggle {
    margin: auto auto;
    display: none;
    font-size: 1.5em;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 1em;
    top: 1em;
    z-index: 1001; /* Above the navbar */
}



/* Mobile-specific styles */
@media (max-width: 768px) {
    .navbar {
        display: none; /* Hide by default */
        flex-direction: column; /* Stack links vertically */
        align-items: flex-start;
        background-color: #333;
        padding: 20px;
        position: absolute;
        top: 70px; /* Adjust as needed to float out of header */
        left: 0;
        width: 100%;
        height: auto;
        z-index: 1001;
    }

    .navbar.show {
        display: flex; /* Show navbar when toggled */
    }

    /* Mobile toggle button */
    .nav-toggle {
        display: flex;
        flex:auto;
        margin: auto auto;
        font-size: 1.5em;
        color: white;
        background-color: transparent;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }

    /* Dropdown styling for mobile */
    .dropdown-content {
        position: relative; /* Relative positioning inside mobile navbar */
        width: 100%; /* Full width for mobile */
        background-color: #444; /* Dropdown background color for mobile */
        z-index: 1000;
    }

    .dropdown-content a {
        padding: 15px;
        border-bottom: 1px solid #333; /* Add border between items */
        z-index: 1000;
    }
}

/* Navbar Styles */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #333;
}

.navbar a {
    color: white;
    padding: 14px 20px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
}

.navbar a:hover {
    background-color: #444;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown .dropbtn {
    background-color: #333;
    color: white;
    padding: 14px 20px;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}


/* Timeline Styles */
.timeline {
    position: relative;
    max-width: 120em;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 6px;
    background-color: #ddd;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-item {
    padding: 20px;
    border-radius: 1rem;
    position: relative;
    width: 45%;
    margin: 10px 0;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.timeline-item:nth-child(odd) {
    flex: auto;
    margin-right: 55%;
}

.timeline-item:nth-child(even) {
    flex: auto;
    margin-left: 50%;
}

.timeline-item::before {
    content: '';
    position: relative;
    width: 12px;
    height: 12px;
    background-color: #ffa500;
    border-radius: 50%;
    z-index: 10;
}

.timeline-item:nth-child(odd)::before {
    top: 35px;
    flex: auto;
    margin-right: 55%;
}

.timeline-item:nth-child(even)::before {
    top: 35px;
    flex: auto;
    margin-left: 50%;
}

.timeline-item:hover {
    transform: scale(1.03);
}

/* Icon Styles */
.timeline-item-icon {
    width: 15em;
    height: 15em;
    font-size: 14em;
    color: #007bff;
    position: absolute;
    margin-top: 5%;
}

.timeline-item:nth-child(odd) .timeline-item-icon {
    right: -1em;
    transform: translateX(50%);
}

.timeline-item:nth-child(even) .timeline-item-icon {
    left: -1em;
    transform: translateX(-50%);
}

/* Hide the dot for empty timeline items */
.timeline-item.empty::before {
    display: none;
}


@media (max-width: 786px) {

    .timeline {
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center; /* Center all items */
    }

    .timeline::before {
        display: none; /* Remove the vertical line on mobile */
    }

    .timeline-item {
        width: 90%;
        margin: auto auto;
        display: flex;
        flex-direction: column;
        align-items: center; /* Center content within each item */
    }

    .timeline-item:nth-child(even) {
        margin: auto auto;
        left: auto;
    }

    .timeline-item::before {
        display: none; /* Hide the dot for each timeline item on mobile */
    }

    .timeline-item-icon {
        font-size: 2.5em; /* Reduce icon size for mobile */
        display: block; /* Ensure the icons are visible */
    }

    .section-item {
        text-align: center; /* Ensure the text is centered */
    }

}

.cta-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #ffa500;
    color: #f5f5f5;
    border-radius: 5px;
    margin-top: 20px;
    text-decoration: none;
    font-size: 1.2em;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.5);
}

.cta-button:focus, .cta-button:hover {
    background-color: #ff8500;
    outline: none; /* Remove default outline for custom focus */
    transform: scale(1.05); /* Slight scale on hover for better interaction */
}

/* Main Content Styles */
main {
    padding: 2em;
}

pre {
    padding: 1em;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    border-radius: 4px;
    overflow-x: auto;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

th, td {
    padding: 0.75em;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Form Styles */
form {
    padding: 1em;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 1em 0;
}

form label {
    display: block;
    margin-bottom: 0.5em;
    color: #333;
}

form input[type="text"], form input[type="email"], form textarea {
    width: 100%;
    padding: 0.75em;
    margin-bottom: 1em;
    border: 1px solid #ddd;
    border-radius: 4px;
}

form input[type="submit"] {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 0.75em 1.5em;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

form input[type="submit"]:hover {
    background-color: #0056b3;
}

/* Footer Styles */
.footer {
    background-color: #222;
    color: #f5f5f5;
    padding: 10px 20px;
    text-align: center;
}

.footer h2 {
    margin-bottom: 20px;
}

.footer a {
    color: #ffa500;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: Highlight;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 1em;
}

.mt-2 {
    margin-top: 2em;
}

.mt-3 {
    margin-top: 3em;
}

.mb-1 {
    margin-bottom: 1em;
}

.mb-2 {
    margin-bottom: 2em;
}

.mb-3 {
    margin-bottom: 3em;
}

.p-1 {
    padding: 1em;
}

.p-2 {
    padding: 2em;
}

.p-3 {
    padding: 3em;
}

/* Code Box Styles */
.code-container {
    margin: 1em 0;
}

.toggle-button {
    display: block;
    width: 100%;
    padding: 0.5em 1em;
    background-color: #007BFF;
    color: white;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1em;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.toggle-button:hover {
    background-color: #0056b3;
}

.code-box {
    display: none;
    background-color: #f5f5f5; /* Light background to contrast black text */
    color: #000; /* Black text color */
    border-radius: 4px;
    padding: 1em;
    margin-top: 0.5em;
    overflow-x: auto;
}

.tree {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
}

.node {
    position: relative;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 5px;
    margin: 5px;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.children {
    display: flex;
    justify-content: space-around;
    width: 100%;
    position: relative;
}

.child {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.line {
    background-color: #333;
    position: absolute;
}

.vertical-line {
    width: 2px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
}

.horizontal-line {
    height: 2px;
    width: 50%;
    top: 100%;
    transform: translateY(-50%);
}

.left-horizontal-line {
    left: 0;
}

.right-horizontal-line {
    right: 0;
}

/* Prism.js theme overrides */
pre[class*="language-"] {
    background: none;
    padding: 0;
    margin: 0;
    color: #000; /* Black text color */
}

code[class*="language-"] {
    background: none;
    padding: 0;
    color: #000; /* Black text color */
}

/* CSS to hide certain sections on mobile screens */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none;
    }


    .logo-slider {
        height: 4em;
        z-index: 1;
        display: inline-block;
        scroll-behavior: smooth;
        animation: 35s slide infinite linear;
    }

}

@keyframes slide  {
    from {
        transform: translateX(0);
    }
    to {

        transform: translateX(-100%);

    }

}

@keyframes zoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.25);
    }
}

@keyframes blink {
    0% {
        opacity: 100%;
    }
    50% {
        opacity: 0%;
    }
}

@keyframes blink-less {
    0% {
        opacity: 100%;
    }
    50% {
        opacity: 30%;
    }
}

.hidden {
    opacity: 0;
    filter: blur(0.2rem);
    transform: translateX(-2%);
    transition: all 0.5s;
}

.show {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0%);
}

@media(prefers-reduced-motion) {
    .hidden {
        transition: none;
    }
}