/* 
    Theme Name: Semantic Training Platform
    Description: Semantic Training Platform Theme
    Author: Apphia s.r.l.
    Author URI: https://www.apphia.it/
    Template: hello-elementor
    Version: 1.0.0
    Text Domain: semantic-training-platform
*/

:root {
    --sidebar-width: 300px;
    --sidebar-collapsed-width: 0px;
    --sidebar-border-color: #D8D8D8;
    --sidebar-border-width: 5px;
}

html, body {
    height: 100%;
    margin: 0;
}

main {
    flex-grow: 1;
    margin: 0
}

/*
 *  Shortcode Language Switcher
 */
.elementor-shortcode .trp-ls-shortcode-current-language,
.elementor-shortcode .trp-ls-shortcode-language {
    display: flex;
    justify-content: center;
    width: 70px !important;
}

.trp-language-switcher > div {
    background-color: var(--e-global-color-primary)!important;
    border: none !important;
    border-radius: 15px !important;
    background-image: unset !important;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    padding: 4px 4px;
}

.trp-language-switcher > div > a {
    display: block;
    border-radius: 3px;
    text-decoration: none;
    font-style: normal;
    font-weight: 600;
    font-size: 15px;
    color: white !important;
    padding: 0px;
}

.trp-language-switcher > div > a > img {
    display: inline;
    margin: 0px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    vertical-align: text-bottom;
}

.trp-language-switcher-container > .trp-ls-shortcode-current-language:hover{
    width: auto !important;
    background-color: white !important;
    box-shadow: rgba(0, 0, 0, 0.15) 0px 5px 15px 0px;
}

.trp-language-switcher {
    position: relative;
    box-sizing: border-box;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    margin-left: 10px;
    height: auto;
}


.trp-shortcode-overlay {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 9999;
}

.trp-language-switcher .trp-ls-shortcode-language{
    border-radius: 8px !important;
    padding: 0px 6px;
}

.trp-language-switcher > div > a:hover,
.trp-language-switcher > div > a.trp-ls-shortcode-disabled-language:hover {
    background: unset;
    color: var(--e-global-color-accent) !important;
    font-weight: bold !important;
}

/* Hide TRP language switcher dropdown arrow icon */
.trp-ls-shortcode-current-language > a::after {
    display: none;
}

/* For tablets and smaller screens (max-width: 1024px) */
@media (max-width: 1024px) {
    #primary-sidebar {
        width: 250px; 
    }

    #main-content {
        margin-left: 250px; 
    }

    .smtc-resources-menu {
        flex-direction: column; 
    }

    .smtc-resources-menu-group-container {
        flex-direction: column;
    }

    .smtc-resource-description {
        width: 100%;
    }
}

/* For mobile screens (max-width: 600px) */
@media (max-width: 600px) {
    #primary-sidebar {
        width: 200px; 
    }

    #main-content {
        margin-left: 200px; 
    }

    .smtc-resources-menu {
        flex-direction: column; 
    }

    .smtc-resources-menu-group-container {
        flex-direction: column;
    }

    .smtc-resources-menu-element {
        margin-bottom: 1rem; 
    }

    .smtc-resource-description h1 {
        font-size: 1.5rem; 
    }

    .smtc-resource-description p {
        font-size: 1rem;
    }

    .smtc-resource-upload {
        width: 90%; 
        padding: 15px;
    }
}



.elementor-widget-slider_revolution
.revslider-container {
    transition: opacity 0.3s ease;
    opacity: 1;
}

/* SIDEBAR */
#primary-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--sidebar-width);
    background-color: white;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    
    border-right: var(--sidebar-border-width) solid var(--e-global-color-primary);
    margin-left: calc(var(--sidebar-border-width) - 1px);
}

#primary-sidebar.active {
    transform: translateX(0);
}

#main-content {
    margin-left: 0 !important;
    width: 100%;
    transition: none;
}

.sidebar-toggle {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 1000;
    background-color: var(--e-global-color-primary);
    color: white;
    border: none;
    padding: 0.5rem 0.3rem;
    border-radius: 0 5px 5px 0;
    transition: all 0.3s ease;
}



.sidebar-toggle {
  display: flex;
  align-items: center;   /* centra verticalmente la freccia */
  justify-content: center;
  gap: 8px;              /* spazio tra MENU e freccia */
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Urbanist', sans-serif;
  font-size: 18px;
}

.menu-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.5em;
  font-size: 10px;
  font-family: 'Urbanist', sans-serif;

  
  writing-mode: vertical-rl;   /* scrittura verticale da alto a basso */
  text-orientation: upright;   /* mantiene le lettere dritte */
  font-weight: bold;
  letter-spacing: 2px;
  text-align: center;
}


.sidebar-toggle.active {
    transform: translateX(var(--sidebar-width));
}



.sidebar-toggle:hover {
    background-color: var(--e-global-color-accent) !important;
}

.sidebar-toggle {
    background-color: var(--e-global-color-primary) !important;
}


/* Sidebar overlay */
#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    transition: opacity 1s ease, visibility 1s ease;
}

#primary-sidebar.active ~ #sidebar-overlay {
    opacity: 1;
    visibility: visible;
}
