*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

:root {
    --clr-dark: hsl(0, 0%, 0%);
    --clr-light: hsl(0, 0%, 100%);
    --clr-accent: hsl(172.7, 100%, 38.8%);
    --ff: "Roboto", sans-serif;
    --ff2: "Fira Sans", sans-serif;
    --p: 1rem/1.5em var(--ff);
    --h1: 600 1em/1.2 var(--ff2); /* Weight, Line-height, family*/
    --h2: 600 2rem/1.2em var(--ff2);

    /* Not sure if used */
    --bg-dark: hsl(0, 0%, 100%);
    --bg: hsl(0, 0%, 95%);
    --bg-light: hsl(0, 0%, 90%);
    --text: hsl(0, 0%, 5%);
    --text-muted: hsl(0, 0%, 30%);

    --spacing1: 4px;
    --spacing2: 8px;
    --spacing3: 16px;
    --spacing4: 20px;
    --spacing5: 40px;
    --spacing6: 80px;
    --spacing7: 160px;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
    text-wrap: balance;
    word-spacing: 1.4px;
    font: var(--p);
    background: var(--bg-dark);
    color: var(--text-muted);
}
h1 {
    font: var(--heading-font);
    font-size: clamp(2rem, 5vw + 1rem, 4rem);
}
h2 {
    font: var(--h2);
}
p {
    margin: var(--spacing2) 0;
    line-height: 1.75;
    text-wrap: pretty;
    hyphens: auto;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
}

@media (max-width: 480px) {
    p {
        font-size: 0.95rem;
        padding-inline: 0.5rem;
    }
}

/* div {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: 1rem;
} */

/* Header Start */
header {
    background: var(--bg);
    /* padding: 1.5rem; */
    border-radius: 0;
}

.nav-links {
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-links li {
    height: 50px;
}

.nav-links a {
    height: 100%;
    padding: 0 30px;
    text-decoration: none;
    display: flex;
    align-items: center;
    color: var(--clr-dark);
}

.nav-links li a:hover {
    color: var(--clr-accent);
}

.logo-img {
    height: 40px;
    width: auto;
    padding: 5px 0;
}

.nav-links li:first-child {
    cursor: pointer;
    margin-right: auto;
}

#nav-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 250px;
    z-index: 999;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: -10px 0 10px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

#nav-sidebar li {
    width: 100%;
}
#nav-sidebar a {
    width: 100%;
}

.menu-button {
    display: none;
}

@media (max-width: 800px) {
    .hideOnMobile {
        display: none;
    }
    .menu-button {
        display: block;
    }
    .logo-img {
        height: 35px;
    }
    .nav-links {
        justify-content: space-between;
        padding: 10px 15px;
    }
}
@media (max-width: 400px) {
    #nav-sidebar {
        width: 100%;
    }
}
/* Header End */

/* Hero Start */
.hero {
    width: 100%;
    min-height: 70vh;
    padding: 4rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* background: linear-gradient(rgba(4, 9, 30, 0.7), rgba(4, 9, 30, 0.7)),
        url(/assests/images/JEC-Beauty-Web.jpg) no-repeat center / cover; */
    color: white;
}
.hero_container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.hero-main-text {
    font-size: clamp(1rem, 2vw, 1.3rem);
    margin: 0 auto 1rem;
    color: #f0f0f0;
    line-height: 1.6;
    max-width: 70ch;
}

.hero-subtext {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: #d1d5db;
    max-width: 70ch;
    line-height: 1.7;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .hero {
        padding: 3rem 1rem 2rem;
    }

    .hero-main-text,
    .hero-subtext {
        max-width: 95%;
        text-align: left;
    }
}
/* Hero End */

/* Footer Start */
footer {
    background: #343434;
    padding: 50px 20px 0;
    color: white;
    font-size: var(--spacing3);
}

.footer-container {
    /* max-width: 1140px; */
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    text-align: center;
}

.footer-content-title h4 {
    /* font-size: var(--spacing4); */
    margin: 0;
    font-weight: 600;
    font-family: var(--ff2, sans-serif);
}

.footer-content-address {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.inline-address {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-address span.material-symbols-outlined {
    font-size: var(--spacing4);
    color: var(--clr-accent);
    min-width: 24px;
    text-align: center;
}

.inline-address p {
    margin: 0;
}

.address-text {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.footer-bottom_bar {
    width: 100%;
    background: var(--clr-accent);
    text-align: center;
    padding: 15px 20px;
    margin-top: 40px;
}

.footer-bottom_bar h4 {
    color: #343434;
    font-size: var(--spacing3);
    margin: 0;
    font-weight: 600;
    font-family: var(--ff2, sans-serif);
}

@media (max-width: 600px) {
    footer {
        padding: 30px 15px 0;
    }

    .footer-container {
        gap: 20px;
    }

    .address-text p {
        font-size: 0.95rem;
    }

    .footer-bottom_bar h4 {
        font-size: 0.85rem;
    }
}
/* Footer End */

/* Repositaory Content Box */
.main-layout {
    font-family: var(--ff);
    width: 90%;
    margin-inline: auto;
    align-items: center;
}

.main-layout h1 {
    margin-top: var(--spacing3);
    text-align: center;
}

.main-layout_wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
    margin-bottom: 5rem;
}

.repository-box {
    border: 1px solid #ccc;
    border-radius: var(--spacing2);
    padding: 2rem;
    text-align: center;
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
}

.repository-box:hover {
    box-shadow: 0 0 30px 0px rgba(87, 175, 190, 0.918);
}

.repository-box p {
    max-width: 60ch;
}

.poster_section {
    border: 5px, solid, gray;
    background-position: center;
    position: relative;
    width: 100%;
}

/* Doftbot content */
.content-body {
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--bg-light);
    color: var(--text);
    display: grid;
    grid-template-columns: auto 1fr;
}

#sidebar {
    box-sizing: border-box;
    height: 100vh;
    width: 250px;
    padding: 5px 1em;
    background-color: var(--bg-dark);
    border-right: 1px solid var(--text-muted);
    position: sticky;
    top: 0;
    align-self: start;
    transition: 300ms ease-in-out;
    overflow: hidden;
    text-wrap: nowrap;
}

#sidebar.close {
    padding: 5px;
    width: 60px;
}

#sidebar ul {
    list-style: none;
}
#sidebar > ul > li:first-child {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--spacing4);
    .content-logo {
        font-weight: 600;
    }
}

#sidebar ul li.active a {
    color: var(--clr-accent);
    span .material-symbols-outlined {
        fill: var(--clr-accent);
    }
}

#sidebar a,
#sidebar .dropdown-btn,
#sidebar .content-logo {
    border-radius: 0.5em;
    padding: 0.85em;
    text-decoration: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 1em;
}

footer p,
#sidebar p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* .dropdown-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
} */
.dropbutton-btn {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 1em;
    text-align: left;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
}

.content-container,
main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}


main {
    padding: min(30px, 7%);
}
main p {
    color: var(--text-muted);
    margin-top: var(--spacing1);
    margin-bottom: var(--spacing3);
}
main ol,
main ul {
    padding-left: 2rem; /* Indent list */
    margin-top: var(--spacing2);
    margin-bottom: var(--spacing3);
    list-style-position: inside;
}

main ol li,
main ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-size: 1rem;
    color: var(--text-muted);
}

.content-container {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
}

.content-container h2 {
    font-size: 1.75rem;
    color: #0a0a0a;
    border-left: 5px solid var(--clr-accent);
    padding-left: 1rem;
    margin-top: 2rem;
}
.content-container h3 {
    font-size: 1.3rem;
    color: #111;
    margin-top: 1.5rem;
}

.content-container p {
    line-height: 1.8;
    font-size: 1.05rem;
    color: var(--text);
}

.instruction-list {
    counter-reset: step-counter;
    padding-left: 1.2rem;
}

.instruction-list > li {
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1rem;
}

.instruction-list ul {
    padding-left: 1.2rem;
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.instruction-list ul li {
    margin-bottom: 0.8rem;
}

.instruction-list a {
    color: var(--clr-accent);
    text-decoration: underline;
}

.img-div {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.img-div img {
    max-width: 100%;
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.table-div {
    display: flex;
    justify-content: center;
    padding: 1rem;
    overflow-x: auto;
}

.styled-table {
    border-collapse: collapse;
    font-size: 0.9em;
    font-family: var(--ff2, Arial);
    min-width: 300px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    table-layout: auto;
}

.styled-table thead {
    font-weight: bold;
}

.styled-table thead tr {
    background-color: var(--clr-accent);
    color: #ffffff;
    text-align: left;
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
}

.styled-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid var(--clr-accent);
}

/* #sidebar span .material-symbols-outlined {
    flex-shrink: 0;
    fill: var(--text-muted);
} */

.dropbutton-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: var(--text-muted);
}

/* #sidebar a span,
#sidebar .dropdown-btn span {
    flex-grow: 1;
} */
.dropbutton-label {
    flex-grow: 1;
}

#sidebar a:hover,
#sidebar .dropbutton-btn:hover {
    background-color: var(--bg-light);
}

#sidebar .sub-menu {
    display: grid;
    grid-template-rows: 0fr;
    transition: 300ms ease-in-out;

    > div {
        overflow: hidden;
    }
}
#sidebar .sub-menu.show {
    grid-template-rows: 1fr;
}

.dropbutton-btn .dropbutton-icon {
    transition: 200ms ease;
}

.rotate .dropbutton-icon:last-child {
    rotate: 180deg;
}

#sidebar .sub-menu a {
    padding-left: 2em;
}

#toggle-btn {
    margin-left: auto;
    padding: 1em;
    border: none;
    border-radius: 0.5em;
    background: none;
    cursor: pointer;

    .material-symbols-outlined {
        transition: rotate 150ms ease;
    }
}

#toggle-btn:hover {
    background-color: var(--bg-light);
}

@media (max-width: 800px) {
    .content-body {
        grid-template-columns: 1fr;
    }
    main {
        padding: 2em 1em 60px 1em;
    }
    .content-container {
        border: none;
        padding: 0;
    }
    #sidebar {
        height: 60px;
        width: 100%;
        border-right: none;
        border-top: 1px solid var(--text-muted);
        padding: 0;
        position: fixed;
        top: unset;
        bottom: 0;

        > ul {
            padding: 0;
            display: grid;
            grid-template-columns: 60px;
            grid-auto-flow: column;
            align-items: center;
            overflow-x: scroll;
        }

        ul li {
            height: 100%;
        }
        /* ul a,
        ul .dropbutton-btn {
            width: 60px;
            height: 60px;
            padding: 0;
            border-radius: 0;
            justify-content: center;
        } */

        /* ul li,
        ul li:first-child,
        .dropbutton-icon:last-child {
            display: none;
        } */

        ul li .sub-menu.show {
            position: fixed;
            bottom: 60px;
            left: 0;
            box-sizing: border-box;
            height: 60px;
            width: 100%;
            background-color: var(--bg-dark);
            border-top: 1px solid var(--text-muted);
            display: flex;
            justify-content: center;

            > div {
                overflow-x: auto;
            }
            li {
                display: inline-flex;
            }
            a {
                box-sizing: border-box;
                padding: 1em;
                width: auto;
                justify-content: center;
            }
        }
    }
}

/* New Add */
@media (min-width: 1024px) {
    .content-body {
        display: grid;
        grid-template-columns: 240px 1fr;
        gap: 2rem;
    }
    #sidebar {
        position: sticky;
        top: 20px;
        height: fit-content;
    }
}
/* New added over */

.code-path {
    font-family: "Fira Code", monospace;
    background: #f9fafb;
    padding: 0.5rem 1rem;
    border-left: 4px solid var(--clr-accent);
    margin: 1rem 0;
    border-radius: 0.25rem;
    font-size: 0.95rem;
    color: #333;
    overflow-x: auto;
    max-width: 100%;
}

.code-box {
    margin: 2rem auto;
    width: 100%;
    max-width: 800px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
    overflow-x: auto;
}

.code-box pre {
    margin: 0;
    padding: 1.2rem;
    background: #2d2d2d; /* fallback if Prism theme doesn't load */
    color: #f8f8f2;
    font-size: inherit;
    font-family: "Fira Code", "Courier New", monospace;
    border-radius: 10px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
}

.code-box code {
    font-family: "Fira Code", "Courier New", monospace;
    font-size: inherit;
    line-height: 1.6;
    display: block;
}

.func_wrapper {
    font-family: Arial, sans-serif;
    background-color: #f6f8fa;
    padding: 20px;
    
    display: flex;
    flex-direction: column;
    gap: 1.5rem;

    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
    border-radius: 8px;
}


.function-card {
    background-color: #fff;
    border-left: 6px solid var(--clr-accent);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 700px;
    margin: 2rem auto;
    font-family: "Segoe UI", sans-serif;
    line-height: 1.6;
}

.function-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #00c6ae;
    background-color: #f9f9f9;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    display: inline-block;
}

.function-desc {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: #555;
}

.section {
    margin-top: 1.25rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #d62828;
    margin-bottom: 0.5rem;
}

.section dl {
    margin: 0;
}

.section dt {
    font-weight: bold;
    margin-top: 0.75rem;
    color: #333;
}

.section dd {
    margin-left: 1rem;
    color: #444;
    font-size: 0.95rem;
}

.section code {
    background-color: #f2f2f2;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: "Fira Code", "Courier New", monospace;
    font-size: 0.95rem;
}

/* About us */
.aboutus-container {
    display: flex;
    flex-wrap: wrap;
    background-color: var(--clr-light);
    gap: 2rem;
    padding: 4rem 8%;
    justify-content: center;
    align-items: center;
}

.aboutus-content {
    flex-grow: 1;
    width: 20rem;

    h2 {
        margin-bottom: 1.25rem;
    }

    p {
        font-size: 1rem;
        line-height: 1.75;
        max-width: 75ch;
    }
}

.aboutus-img {
    flex: 1;
    min-width: 17.5rem;
    max-width: 31.25rem;
    position: relative;
}

@media (max-width: 800px) {
    .aboutus-container {
        flex-direction: column;
        /* align-items: none; */
    }
}
