/* #region ===== LANDING PAGE ===== */

#brandPresentation {
    text-align: center;
    margin: 1rem auto 0;
    padding: 0 1rem;
}

#brandPresentation h1 {
    font-size: clamp(4rem, 10vw, 8rem);
    margin: 0;
    line-height: 1;
    letter-spacing: 0.05em;
    color: #fff;
}

#brandPresentation p {
    font-size: 1.5rem;
    margin: 1rem auto 0;
    max-width: 600px;
}

/* grid */
.productsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    justify-content: center; 
    justify-items: center; 
}

.card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    min-height: 280px; 
    
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(92, 236, 134, 0.15);
}


.card-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.card-icon-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 0;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}



.card h3 { 
    color: #fff; 
    font-size: 2.2rem;
    margin: 0;
    letter-spacing: 0.05em;
    line-height: 1;
}

.card p { 
    color: var(--text-muted); 
    font-size: 1.4rem;
    line-height: 1.4;
    margin: 0;
}

/* arrow animation */
.arrow {
    margin-top: auto;
    padding-top: 2rem;
    color: var(--primary-color);
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    opacity: 0.7;
    transform: translateX(0);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.card:hover .arrow { 
    opacity: 1; 
    transform: translateX(10px); 
    text-shadow: 0 0 10px var(--primary-dim);
}

/* mobile optimization */
@media (max-width: 768px) {
    main {
        padding: 1rem;
    }
    
    .productsGrid {
        padding: 0;
        gap: 1.5rem;
    }

    .card {
        padding: 2rem; 
        min-height: auto;
    }
    
    #brandPresentation h1 {
        font-size: 4rem; 
    }
}

/* #endregion */



/* #region ===== DOCUMENTATION PAGES ===== */

.docs-layout {
    flex-direction: row;
    align-items: flex-start;
}

.docs-layout header {
    position: sticky;
    top: 0;
    height: 100vh;
    flex-shrink: 0;
    z-index: 100;
}

.docs-layout #contentTable {
    position: static;
    height: 100%;
    width: auto;
    border-right: 2px solid var(--border-color);
    margin: 0; padding: 1.2rem;
    overflow-y: scroll;
    scrollbar-width: none;
}

#docs-main {
    flex-grow: 1;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding: 2rem 3.5rem;
}

#contentTable h1 {
    color: var(--primary-color);
    font-size: 2.3rem;
    margin: 0 0 -5px; padding: 0;
}

.contentTableCategory {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0 0 5px 0;
}

#contentTable a:first-child {
    color: var(--primary-color);
    font-size: 1.7rem;
    font-weight: bold;
    margin-top: 20px;
}

#contentTable a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.3rem;
    margin: 0; padding: 0;
    transition: all 0.2s ease;
}

#contentTable a:hover {
    color: var(--primary-color);
    transform: translate(5px);
}


.doc-section {
    margin: 0 auto;
    width: 100%;
    margin-right: auto;
}

#docs-title-div {
    margin: 10px 0 0;
}

#docs-title-div h1 {
    text-align: center;
    color: var(--primary-color);
    --base-font-size: clamp(2rem, 4.3vw, 18rem);
    font-size: var(--base-font-size);
    margin: -0.15em 0; padding: 0;
    letter-spacing: 2px;
    text-shadow: var(--primary-dim) 0 0 0.2em;
}

#docs-title-div h1:nth-child(2) {
    font-size: calc(var(--base-font-size) * 1.15);
    text-decoration: underline;
}


.doc-section h1 {
    color: var(--primary-color);
    font-size: clamp(3.5rem, 5vw, 15rem);
    text-decoration: underline;
    margin: 0;
}

.doc-section h2 {
    color: white;
    font-size: 2.5rem;
    margin: 2rem 0 10px 0;
}

.doc-section h3 {
    color: #f3f3f3;
    font-size: 1.65rem;
    margin: 2.5rem 0 10px 0;
    font-weight: normal;
    font-style: italic;
    text-decoration: underline;
}

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

.inline-code {
    color: white;
    display: inline-block;
    background: #2d2d2d;
    margin: 0; padding: 0.3rem 0.4rem;
    font-size: 85%;
    border-radius: 5px;
    text-align: center;
}

.doc-section p {
    font-size: 1.45rem;
    margin: 0 0 1.5rem 0;
}

.doc-section .highlight-danger {
    font-size: 105%;
    color: #ff5c5c;
    font-weight: normal;
    text-decoration: underline;
}

.doc-section br {
    height: 20rem;
}


.sub-page-btn {
    display: inline-flex;
    text-align: center;
    font-size: 1.6rem;
    padding: 0.5rem 1em;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    background-color: var(--bg-panel);
    text-decoration: none;
}

.sub-page-btn:hover {
    translate: 5px; 
    box-shadow: 0 0 7px var(--primary-color); 
}

#mobileMenuToggle {
    display: none;
}

@media (max-width: 768px) {
    
    .docs-layout {
        flex-direction: column !important;
    }

    .docs-layout header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        z-index: 1000;
        background: var(--bg-void);
        border-bottom: 1px solid var(--border-color);
    }

    #mobileMenuToggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 1rem 1.5rem;
        background: var(--bg-panel);
        border: none;
        color: var(--primary-color);
        font-size: 1.5rem;
        cursor: pointer;
        outline: none;
        user-select: none;
    }

    .docs-layout #contentTable {
        width: 100%;
        position: absolute;
        top: 100%; 
        left: 0;
        background: var(--bg-void);
        border-bottom: 2px solid var(--primary-color);
        height: auto;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        margin: 0;
        padding: 0 1rem;
        border-right: none;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }

    .docs-layout #contentTable.active {
        max-height: 80vh;
        opacity: 1;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
        overflow-y: auto;
    }

    #mobileMenuToggle.active #menuArrow {
        transform: rotate(180deg);
    }

    #docs-main {
        margin: 70px auto 10px;
        width: 100%;
        padding: 0 1.2rem;
    }

    [id] {
        scroll-margin-top: 70px;
    }
}

/* #endregion */








/* #region ===== CODE BLOCKS ===== */

.code-block {
    background: var(--bg-panel);
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    margin: 1.2rem 0 3rem;
    width: stretch;
    max-width: 100%;
    overflow: hidden;
    box-shadow: 0 0px 5px var(--primary-color);
}

.code-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.3rem;
    color: #e4e4e4;
}

.code-lang {
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.1em;
}

.code-block pre {
    margin: 0;
    padding: 1.5rem;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #888 transparent;
    -webkit-overflow-scrolling: touch;
    background: transparent;
    transition: none !important;
}

.code-block code {
    display: block;
    width: max-content;
    font-family: monospace !important;
    font-size: 0.9rem;
    color: #ffffff;
}

.code-block code span {
    font-family: monospace !important;
}



.code-block .key { color: #eaf1f2; }
.code-block .string { color: var(--primary-color); }
.code-block .number { color: #7ce0ff; }
.code-block .boolean { color: #ffeb51; }
.code-block .null { color: #c5c5c5; font-style: italic; text-transform: uppercase; }
.code-block .placeholder { color: #ffa46f; font-style: italic; }


/* #endregion */






/* #region ===== INTERACTIVE PREVIEW ===== */

#preview-form {
    display: flex;
    flex-direction: column;
    width: stretch;
    gap: 30px;
    margin: 50px 0;
    padding: 1.5rem;
    background: var(--bg-panel);
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 0px 5px var(--primary-color);
}


#preview-fields {
    margin: 0; padding: 0;
    width: stretch;
    justify-content: start;
    align-items: start;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
    gap: 20px;
}

#preview-fields > div:has(textarea) {
    grid-column: 1 / -1; 
}

#preview-fields select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: stretch;
    margin: 0; padding: 12px 16px;
    font-size: 1.3em;
    background-color: var(--bg-panel);
    color: var(--text-main);
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23475569%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px auto;
}


#preview-fields select:hover, #preview-btn:hover {
    border-color: var(--primary-color);
}

#preview-fields select:focus, #preview-fields textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}


#preview-fields select option {
    background-color: var(--bg-void);
    color: var(--text-main);
}


#preview-fields textarea {
    resize: none;
    width: stretch;
    margin: 0; padding: 12px 16px;
    font-size: 1.3em;
    background-color: var(--bg-panel);
    color: var(--text-main);
    border: 2px solid var(--text-main);
    border-radius: 8px;
    field-sizing: content;
}


#preview-form label {
    min-width: max-content;
    font-size: 1.5em;
    display: block;
    margin: 0 0 6px;
}


#preview-form hr {
    width: 100%;
    height: 2px;
    background: white;
    margin: 10px 0;
}



#preview-form .code-block {
    margin: 0 0 20px;
}



#preview-btn {
    width: max-content;
    color: var(--text-main);
    text-align: center;
    font-size: 1.6rem;
    margin: 0; padding: 0.5rem 1em;
    border-radius: 8px;
    border: 2px solid var(--text-main);
    background-color: var(--bg-panel);
    text-decoration: none;
    cursor: pointer;
}



.mandatory {
    color: var(--primary-color);
}




.array-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
}


.array-list {
    display: flex;
    flex-direction: column;
}


.array-list {
    display: flex;
    flex-direction: column;
}


.add-array-btn {
    width: max-content;
    margin: 0; padding: 8px 12px;
    font-size: 1.2em;
    border-radius: 8px;
    background: var(--bg-panel);
    color: var(--text-main);
    border: 2px dashed var(--text-main);
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}


.add-array-btn:hover {
    border-color: var(--primary-color);
}




.array-item-row {
    display: flex;
    gap: 10px;
    margin: 0 0 12px;
}

.array-item-input {
    min-width: 0;
    flex-grow: 1;
    padding: 12px 16px;
    font-size: 1.3em;
    background: var(--bg-panel);
    color: var(--text-main);
    border: 2px solid var(--text-main);
    border-radius: 8px;
}

.array-item-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.array-item-remove {
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; 
    flex-shrink: 0; 
    font-size: 1em;
    cursor: pointer;
    border-radius: 8px;
    border: 2px solid #ff5c5c;
    background: rgba(255, 92, 92, 0.1);
    color: #ff5c5c;
}

.array-item-remove:hover {
    background: rgba(255, 92, 92, 0.2);
}

/* #endregion */





/* #region ===== TABLES ===== */


.table-wrapper {
    width: 100%;
    margin: 2rem 0 3rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #888 transparent;
    background: var(--bg-panel);
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 0px 5px var(--primary-color);
}


.doc-section table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    white-space: nowrap;
}

.doc-section th,
.doc-section td {
    padding: 1.4rem 1.2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.doc-section th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-color);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: bold;
    border-bottom: 2px solid var(--primary-color);
}

.doc-section td {
    color: var(--text-main);
    font-size: 1.3rem;
}

.doc-section tbody tr:nth-child(even) {
    background-color: rgba(100, 100, 100, 0.1);
}

.doc-section tbody tr {
    transition: background-color 0.2s ease;
}

.doc-section tbody tr:hover {
    background-color: rgba(92, 236, 134, 0.05);
}

/* #endregion */

