/* -----------------------------------------
   LEFT SUBMENU LAYOUT + VERTICAL ALIGNMENT
------------------------------------------ */
.left-menu-layout {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    padding-top: 60px;
}

.left-menu-column {
    width: 280px;
    flex-shrink: 0;
}

.left-submenu {
    padding: 16px;       /* GT uses ~15–20px internal padding */
    border-radius: 6px;  /* soft rounding like GT modules */

    /* Parent-theme style shadow */
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.left-menu-content {
    flex: 1;
}

.left-menu-content .gt-section, .left-menu-content .gt-row {
    padding-top: 0 !important;
}

/* -----------------------------------------
   SUBMENU LIST + SPACING
------------------------------------------ */
.left-submenu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.left-submenu li {
    margin-bottom: 5px; /* spacing between items */
    line-height: 1.2;  /* optional: reduces height even more */
}

.left-submenu li:last-child {
    margin-bottom: 0;
}

/* -----------------------------------------
   SUBMENU LINKS (default state)
------------------------------------------ */
.left-submenu li > a {
    display: block;
    padding: 10px 5px 10px 35px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: background 0.25s ease, color 0.25s ease;

    /* Default background + white text */
    background: var(--lightGreen, #00aa90);
    color: #fff;
}

/* -----------------------------------------
   TRIANGLE REVEAL (parent theme behavior)
------------------------------------------ */
.left-submenu li > a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;  /* slightly larger for GT look */
    height: 100%;

    /* Reveal submenu container background */
    background: #ecf5f3;

    /* Triangle shape */
    clip-path: polygon(0 0, 100% 50%, 0 100%);

    opacity: 0;
    transform: translateX(-8px); /* slide-in animation */
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* -----------------------------------------
   TRIANGLE VISIBILITY (corrected generic logic)
------------------------------------------ */

/* Hover ALWAYS shows triangle */
.left-submenu li:hover > a::before {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

/* Only the TRUE current page shows triangle persistently */
.left-submenu li.is-current > a::before {
    opacity: 1;
    transform: translateX(0);
}

/* Parent/ancestor NEVER show triangle */
.left-submenu li.is-parent > a::before,
.left-submenu li.is-ancestor > a::before {
    opacity: 0;
    transform: translateX(-8px);
}

/* -----------------------------------------
   HOVER STATE (parent theme color)
------------------------------------------ */

/* Hover ALWAYS wins, even if WP marks everything as current */
.left-submenu li:hover > a {
    background: var(--lightGreen, #00aa90) !important;
    color: var(--dark, #292929) !important;
}

/* -----------------------------------------
   ACTIVE STATE (current page)
------------------------------------------ */
.left-submenu li.is-current > a {
    background: var(--lightGreen, #00aa90); /* stays green */
    color: #fff;
}

/* Parent/ancestor stay green but WITHOUT triangle */
.left-submenu li.is-parent > a,
.left-submenu li.is-ancestor > a {
    background: var(--lightGreen, #00aa90);
    color: #fff;
}

/* -----------------------------------------
   AMEND GT BOARD INFO ROW (Left Menu Pages)
------------------------------------------ */

.page-template-page-left-menu .gt-board-info-row > .row > .gt-column:first-child > .gt-column-inner {
    border-radius: 2px;
    box-shadow: 0 10px 20px rgba(21, 28, 39, 0.1);
    background-color: rgba(255, 255, 255, 0.8);
    /*padding: calc(30px + (60 - 30) * var(--calc-size)) calc(10px + (60 - 10) * var(--calc-size));*/
    padding: 10px 15px !important;
}

.page-template-page-left-menu .gt-board-info-row > .row > .gt-column:nth-child(2) > .gt-column-inner {
    background: #ecf5f3;
    box-shadow: 0 10px 20px rgba(21, 28, 39, 0.1);
    /*padding: calc(30px + (60 - 30) * var(--calc-size)) calc(10px + (60 - 10) * var(--calc-size));*/
    padding: 10px 15px !important;
}

.page-template-page-left-menu .gt-board-info-row > .row > .gt-column:last-child > .gt-column-inner {
    background: var(--darkGreen);
    box-shadow: 0 10px 20px rgba(21, 28, 39, 0.1);
    /*padding: calc(30px + (60 - 30) * var(--calc-size)) calc(10px + (60 - 10) * var(--calc-size));*/
    padding: 10px 15px !important;
}

.page-template-page-left-menu 
.gt-board-info-row > .row > .gt-column:last-child .gt-module-text,
.page-template-page-left-menu 
.gt-board-info-row > .row > .gt-column:last-child .gt-module-text * {
    color: #fff !important;
}
.page-template-page-left-menu .gt-board-info-row .gt-module-row .gt-module-text {
    border-radius: 3px;
    box-shadow: 0 3px 6px rgba(21, 28, 39, 0.1);
    border: 1px solid #b5ccc7;
    padding: calc(10px + (20 - 10) * var(--calc-size)) calc(10px + (30 - 10) * var(--calc-size));
    margin-top: 15px;
    transition: all .2s ease-in-out;
}

.page-template-page-left-menu .gt-board-info-row .gt-module-row .gt-module-text h4 {
    padding-bottom: 4px;
}

.page-template-page-left-menu .gt-board-info-row .gt-module-text-inner {
    padding: 0 !important; /* or your preferred value */
}

/* -----------------------------------------
   AMEND GT BOARD LISTING (Left Menu Pages)
------------------------------------------ */

.page-template-page-left-menu .gt-board-listing .gt-listing-post {
    width: 100%;
    flex: 0 0 100%;
    border-radius: 3px;        
    box-shadow: 0 3px 6px 0 rgba(21, 28, 39, 0.1);
    border: solid 1px #b5ccc7;
    padding: calc( 10px + ( 20 - 10 ) var( --calc-size ) ) calc( 10px + ( 30 - 10 ) var( --calc-size ) );
    margin-top: 15px;
}

.page-template-page-left-menu .gt-board-listing .gt-listing-post:hover .gt-listing-item-read-more a:after {
    right: 0;
}

.page-template-page-left-menu .gt-board-listing .gt-listing-post .gt-listing-item-date {
    display: none;
}

.page-template-page-left-menu .gt-board-listing .gt-listing-post .gt-listing-item-title {
    padding-bottom: 5px;
}

/* -----------------------------------------
   MOBILE
------------------------------------------ */
@media (max-width: 768px) {

    .left-menu-layout {
        flex-direction: column;
        padding-top: 20px;
    }

    .left-menu-column {
        width: 100%;
        position: static;
        margin-bottom: 20px;
        padding-top: 0; /* reset vertical alignment on mobile */
    }

    .left-submenu {
        padding: 12px;
        border-radius: 4px;
    }
}