/**
 * Mobile Menu Collapsible Subsections
 * Makes .groupdrop-title headers clickable to expand/collapse content
 */

@media (max-width: 767px) {
    /* Subsection container */
    .cdz-menu .groupmenu-drop-content .row > [class*="col-"] {
        margin-bottom: 0;
    }

    /* Subsection header - make it look tappable */
    .cdz-menu .groupdrop-title {
        position: relative;
        cursor: pointer;
        padding: 12px 40px 12px 0;
        margin: 0;
        border-bottom: 1px solid #eee;
        font-size: 13px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #333;
        display: block;
        text-align: left !important;
        -webkit-tap-highlight-color: transparent;
    }

    /* Link inside title should inherit styling */
    .cdz-menu .groupdrop-title a {
        color: inherit;
        text-decoration: none;
        display: block;
    }

    /* Toggle indicator - only show when has-subsection class is present */
    .cdz-menu .groupdrop-title::after {
        content: none;
    }

    .cdz-menu .groupdrop-title.has-subsection::after {
        content: '+';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-55%);
        font-size: 20px;
        font-weight: 300;
        color: #999;
        transition: all 0.2s ease;
    }

    /* Expanded state */
    .cdz-menu .groupdrop-title.has-subsection.subsection-open::after {
        content: '−';
        color: #b40000;
    }

    /* Hide subsection content by default */
    .cdz-menu .groupdrop-link {
        display: none;
        padding: 8px 0 8px 15px;
        margin: 0;
        background: #fafafa;
        border-bottom: 1px solid #eee;
    }

    /* Show when expanded */
    .cdz-menu .groupdrop-title.subsection-open + .groupdrop-link,
    .cdz-menu .groupdrop-link.subsection-visible {
        display: block;
    }

    /* Subsection links styling */
    .cdz-menu .groupdrop-link .item,
    .cdz-menu .groupdrop-link li {
        padding: 6px 0;
        margin: 0;
        list-style: none;
    }

    .cdz-menu .groupdrop-link .item a,
    .cdz-menu .groupdrop-link li a {
        color: #555;
        font-size: 13px;
        font-weight: 400;
        text-decoration: none;
        display: block;
        padding: 4px 0;
    }

    .cdz-menu .groupdrop-link .item a:active,
    .cdz-menu .groupdrop-link li a:active {
        color: #b40000;
    }

    /* For content that uses div structure instead of ul */
    .cdz-menu .groupmenu-drop-content .row {
        margin: 0;
    }

    .cdz-menu .groupmenu-drop-content .row > [class*="col-"] {
        padding: 0;
        width: 100%;
        float: none;
    }

    /* Hide the "Navigheaza la" link for cleaner UI - optional */
    .cdz-menu .tablet-item.visible-tablet {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
        margin-bottom: 5px;
    }

    .cdz-menu .tablet-item .menu-go-link {
        color: #b40000;
        font-weight: 500;
        font-size: 13px;
    }

    .cdz-menu .tablet-item .link-prefix {
        color: #666;
    }

    /* Animation for smoother expand/collapse */
    .cdz-menu .groupdrop-link {
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }
}
