/**
 * Membership Widget CSS
 * Styles for the Membership Elementor Widget
 *
 * @package AC_Child
 */

/* ========================================
   GLOBAL STYLES
   ======================================== */

.ac-membership-widget {
    /* Widget container styles if needed */
}

/* ========================================
   SECTION: Points Section
   ======================================== */

.ac-membership-points {
    padding: 60px 40px;
    background-color: transparent;
}

.ac-mp-container {
    max-width: 1400px;
    margin: 0 auto;
}

.ac-mp-header {
    text-align: center;
    margin-bottom: 40px;
}

.ac-mp-heading {
    font-family: 'Lato', sans-serif;
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #000;
}

.ac-mp-points {
    font-family: 'Delight', sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    color: #000;
}

.ac-mp-levels {
    position: relative;
    height: 30px;
    margin-bottom: 10px;
    font-family: 'Delight', sans-serif;
}

.ac-mp-level {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}

.ac-mp-level-name {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    color: #000;
}

.ac-mp-progress-wrapper {
    position: relative;
    margin-bottom: 40px;
}

.ac-mp-progress-bar {
    position: relative;
    width: 100%;
    height: 16px;
    background-color: transparent;
    border: 1px solid #000;
    border-radius: 20px;
}

.ac-mp-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #FFFFFF;
    z-index: 3;
}

.ac-mp-marker-outside {
    background-color: #000 !important;
}

.ac-mp-progress-fill {
    position: absolute;
    left: -1px;
    top: -1px;
    height: calc(100% + 2px);
    background-color: #c35326;
    border-radius: 20px;
    transition: width 0.3s ease;
    z-index: 2;
}

/* Ensure fill has full radius if 100% */
.ac-mp-progress-fill[style*="width: 100%"] {
    border-radius: 20px;
}

.ac-mp-progress-indicator {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: #FFFFFF;
    border-radius: 50%;
}

.ac-mp-progress-labels {
    position: relative;
    top: 20px;
    transform: translateX(-50%);
    white-space: nowrap;
    text-align: center;
}

.ac-mp-current-level {
    font-family: 'Delight', sans-serif;
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.2;
    color: #000;
}

.ac-mp-next-level {
    font-family: 'Lato', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    color: #000;
}

/* ========================================
   SECTION: Points Section - Responsive
   ======================================== */

@media (max-width: 768px) {
    .ac-membership-points {
        padding: 40px 20px;
    }
    
    .ac-mp-heading {
        font-size: 16px;
    }
    
    .ac-mp-points {
        font-size: 36px;
    }
    
    .ac-mp-level-name {
        font-size: 12px;
    }
    
    .ac-mp-current-level {
        font-size: 20px;
    }
    
    .ac-mp-next-level {
        font-size: 14px;
    }
    
    /* Prevent progress labels from overflowing on mobile */
    .ac-mp-progress-labels {
        margin-left: 0 !important;
        position: absolute;
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: calc(100% - 40px);
        text-align: center;
    }
}

/* ========================================
   SECTION: Livelli Section
   ======================================== */

.ac-membership-livelli {
    padding: 60px 0;
    background-color: transparent;
}

.ac-ml-container {
    max-width: 1400px;
    margin: 0 auto;
}

.ac-ml-title {
    font-family: 'Delight', sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.1;
    color: #000;
    margin-bottom: 60px;
    margin-top: 0;
}

.ac-ml-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.ac-ml-card {
    display: flex;
    flex-direction: column;
}

.ac-ml-card-header {
    margin-bottom: 20px;
}

.ac-ml-card-number {
    display: block;
    font-family: 'Delight', sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: #000;
    margin-bottom: 5px;
}

.ac-ml-card-name {
    font-family: 'Delight', sans-serif;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    color: #000;
    margin: 0;
}

.ac-ml-card-image {
    width: 100%;
    margin-bottom: 20px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #f5f5f5;
}

.ac-ml-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ac-ml-card-points {
    font-family: 'Delight', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #000;
    margin-bottom: 20px;
}

.ac-ml-card-description {
    margin-bottom: 30px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.ac-ml-card-description p {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: #000;
    margin: 0 0 15px 0;
}

.ac-ml-card-description p:last-child {
    margin-bottom: 0;
}

.ac-ml-benefits-title {
    font-family: 'Delight', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #000;
    margin: 0 0 15px 0;
}

.ac-ml-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ac-ml-benefits-list li {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: #000;
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

.ac-ml-benefits-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #000;
}

.ac-ml-benefits-list li:last-child {
    margin-bottom: 0;
}

/* ========================================
   SECTION: Livelli Section - Responsive
   ======================================== */

@media (max-width: 1024px) {
    .ac-ml-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .ac-membership-livelli {
        padding: 40px 20px;
    }
    
    .ac-ml-title {
        font-size: 36px;
        margin-bottom: 40px;
    }
    
    .ac-ml-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .ac-ml-card-number,
    .ac-ml-card-name {
        font-size: 36px;
    }
    
    .ac-ml-card-points,
    .ac-ml-benefits-title {
        font-size: 20px;
    }
}

/* ========================================
   SECTION: Livelli Mobile Slider
   ======================================== */

/* Desktop: Show as grid */
@media (min-width: 769px) {
    .ac-ml-slider {
        padding: 0 40px;
        display: block;
    }
    
    .ac-ml-slider-track {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
    
    .ac-ml-slider-nav,
    .ac-ml-slider-progress {
        display: none;
    }
}

/* Mobile: Show as slider */
@media (max-width: 768px) {
    .ac-ml-slider {
        position: relative;
        overflow: hidden;
    }
    
    .ac-ml-slider-track {
        display: flex;
        transition: transform 0.3s ease-out;
        gap: 0;
    }
    
    .ac-ml-card {
        flex: 0 0 100%;
        width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    .ac-ml-card-description {
        min-height: auto;
    }
    
    /* Navigation Arrows */
    .ac-ml-slider-nav {
        display: flex;
        justify-content: space-between;
        position: absolute;
        top: 35%;
        left: 0;
        right: 0;
        transform: translateY(-50%);
        pointer-events: none;
        z-index: 10;
    }
    
    .ac-ml-slider-prev,
    .ac-ml-slider-next {
        width: 40px;
        height: 40px;
        border: none;
        background: rgba(255, 255, 255, 0.9);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: auto;
        transition: opacity 0.2s ease;
        color: #000;
    }
    
    .ac-ml-slider-prev:hover,
    .ac-ml-slider-next:hover {
        opacity: 0.7;
    }
    
    .ac-ml-slider-prev {
        margin-left: 5px;
    }
    
    .ac-ml-slider-next {
        margin-right: 5px;
    }
    
    .ac-ml-slider-prev svg,
    .ac-ml-slider-next svg {
        width: 20px;
        height: 20px;
    }
    
    /* Progress Bar */
    .ac-ml-slider-progress {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #e0e0e0;
        margin-top: 30px;
        position: relative;
        overflow: hidden;
    }
    
    .ac-ml-slider-progress-bar {
        height: 100%;
        background-color: #c35326;
        transition: width 0.3s ease;
        width: 33.333%;
    }
}

/* ========================================
   LEVEL CARDS: Active & Locked States
   ======================================== */

/* Active level cards */
.ac-ml-card--active .ac-ml-card-number,
.ac-ml-card--active .ac-ml-card-name {
    color: #000;
}

.ac-ml-card--active .ac-ml-card-image {
    opacity: 1;
}

/* Locked level card (Level 3 when user is at level 2) */
.ac-ml-card--locked {
    position: relative;
}

/* White overlay for locked level */
.ac-ml-card--locked .ac-ml-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
    border-radius: 8px;
}

/* Non-active levels (not locked, just not reached yet) */
.ac-ml-card:not(.ac-ml-card--active):not(.ac-ml-card--locked) .ac-ml-card-number,
.ac-ml-card:not(.ac-ml-card--active):not(.ac-ml-card--locked) .ac-ml-card-name {
    color: #999;
}

.ac-ml-card:not(.ac-ml-card--active):not(.ac-ml-card--locked) .ac-ml-card-image {
    opacity: 0.5;
    filter: grayscale(100%);
}

.ac-ml-card:not(.ac-ml-card--active):not(.ac-ml-card--locked) .ac-ml-card-points,
.ac-ml-card:not(.ac-ml-card--active):not(.ac-ml-card--locked) .ac-ml-card-description p,
.ac-ml-card:not(.ac-ml-card--active):not(.ac-ml-card--locked) .ac-ml-benefits-title,
.ac-ml-card:not(.ac-ml-card--active):not(.ac-ml-card--locked) .ac-ml-benefits-list li {
    color: #999;
}


/* ========================================
   SECTION: Premi Section
   ======================================== */

.ac-membership-premi {
    padding: 60px 0;
    background-color: transparent;
}

.ac-pr-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.ac-pr-title {
    font-family: 'Delight', sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.1;
    color: #000;
    margin-bottom: 60px;
    margin-top: 0;
}

.ac-pr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 40px;
    padding: 0 40px;
}

.ac-pr-card {
    display: flex;
    flex-direction: column;
}

.ac-pr-card-image-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.ac-pr-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #c0c0c0;
}

.ac-pr-card-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

/* Info Icon & Tooltip */
.ac-pr-card-tooltip-wrapper {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.ac-pr-card-info {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    transition: all 0.2s ease;
    padding: 0;
}

.ac-pr-card-info:hover {
    color: #FFF;
}

.ac-pr-card-info svg {
    width: 16px;
    height: 16px;
}

/* Tooltip */
.ac-pr-card-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: -5px;
    background-color: #1a1a1a;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all 0.2s ease;
    z-index: 20;
}

.ac-pr-card-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 10px;
    border-width: 5px;
    border-style: solid;
    border-color: #1a1a1a transparent transparent transparent;
}

.ac-pr-card-tooltip-wrapper:hover .ac-pr-card-tooltip,
.ac-pr-card-info:focus + .ac-pr-card-tooltip,
.ac-pr-card-tooltip.ac-pr-card-tooltip--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Ottenuto Button */
.ac-pr-card-button-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0;
}

.ac-pr-card-button {
    width: 100%;
    padding: 12px 20px;
    border: none;
    font-family: 'Delight', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ac-pr-card-button--disabled {
    background-color: #fff;
    color: #8a8a8a;
    border: 2px solid #e5e5e5 !important;
}

.ac-pr-card-button--disabled:hover {
    background-color: #fff;
    color: #8a8a8a;
}

.ac-pr-card-button--active {
    background-color: #c35326;
    color: #fff;
}

.ac-pr-card-button--active:hover {
    background-color: #dd5c28;
    color: #fff;
} 

.ac-pr-card-button--active:active, .ac-pr-card-button--active:focus {
    background-color: #c35326;
    color: #fff;
}

/* Card Content */
.ac-pr-card-content {
    padding: 0;
}

.ac-pr-card-title {
    font-family: 'Delight', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: #000;
    margin: 0 0 6px 0;
}

.ac-pr-card-points {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #666;
    margin: 0;
}

/* ========================================
   SECTION: Premi Section - Responsive
   ======================================== */

@media (max-width: 1024px) {
    .ac-pr-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .ac-membership-premi {
        padding: 40px 0;
    }
    
    .ac-pr-container {
        padding: 0 20px;
    }
    
    .ac-pr-title {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .ac-pr-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0;
    }
    
    .ac-pr-card-title {
        font-size: 16px;
        margin-bottom: 4px;
    }
    
    .ac-pr-card-points {
        font-size: 13px;
    }
    
    .ac-pr-card-info {
        width: 22px;
        height: 22px;
    }
    
    .ac-pr-card-info svg {
        width: 14px;
        height: 14px;
    }
    
    .ac-pr-card-button {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .ac-pr-card-tooltip {
        font-size: 11px;
        padding: 6px 12px;
    }
    
}

@media (max-width: 480px) {
    .ac-pr-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0;
    }
}

/* ========================================
   SECTION: Guadagno Section
   ======================================== */

.ac-membership-guadagno {
    padding: 60px 0;
    background-color: transparent;
}

.ac-gu-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.ac-gu-title {
    font-family: 'Delight', sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.1;
    color: #000;
    margin-bottom: 60px;
    margin-top: 0;
    text-align: left;
}

.ac-gu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 20px;
    padding: 0;
}

.ac-gu-card {
    display: flex;
    flex-direction: column;
}

.ac-gu-card-image-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.ac-gu-card-image {
    width: 100%;
    overflow: hidden;
    background-color: #c0c0c0;
}

.ac-gu-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info Icon & Tooltip */
.ac-gu-card-tooltip-wrapper {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.ac-gu-card-info {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    transition: all 0.2s ease;
    padding: 0;
}

.ac-gu-card-info:hover {
    color: #FFF;
}

.ac-gu-card-info svg {
    width: 16px;
    height: 16px;
}

/* Tooltip */
.ac-gu-card-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: -5px;
    background-color: #1a1a1a;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all 0.2s ease;
    z-index: 20;
}

.ac-gu-card-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 10px;
    border-width: 5px;
    border-style: solid;
    border-color: #1a1a1a transparent transparent transparent;
}

.ac-gu-card-tooltip-wrapper:hover .ac-gu-card-tooltip,
.ac-gu-card-info:focus + .ac-gu-card-tooltip,
.ac-gu-card-tooltip.ac-gu-card-tooltip--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Action Button */
.ac-gu-card-button-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0;
}

.ac-gu-card-button {
    width: 100%;
    padding: 12px 20px;
    border: none;
    font-family: 'Delight', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ac-gu-card-button--disabled {
    background-color: #fff;
    color: #8a8a8a;
    border: 2px solid #e5e5e5 !important;
}

.ac-gu-card-button--disabled:hover {
    background-color: #fff;
    color: #8a8a8a;
}

.ac-gu-card-button--active {
    background-color: #c35326;
    color: #fff;
}

.ac-gu-card-button--active:hover {
    background-color: #dd5c28;
    color: #fff;
} 

.ac-gu-card-button--active:active, .ac-gu-card-button--active:focus {
    background-color: #c35326;
    color: #fff;
}

/* Card Content */
.ac-gu-card-content {
    padding: 0;
}

.ac-gu-card-title {
    font-family: 'Delight', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: #000;
    margin: 0 0 6px 0;
}

.ac-gu-card-points {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #666;
    margin: 0;
}

/* ========================================
   SECTION: Guadagno Section - Responsive
   ======================================== */

@media (max-width: 1024px) {
    .ac-gu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .ac-membership-guadagno {
        padding: 40px 0;
    }
    
    .ac-gu-container {
        padding: 0 20px;
    }
    
    .ac-gu-title {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .ac-gu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0;
    }
    
    .ac-gu-card-title {
        font-size: 16px;
        margin-bottom: 4px;
    }
    
    .ac-gu-card-points {
        font-size: 13px;
    }
    
    .ac-gu-card-info {
        width: 22px;
        height: 22px;
    }
    
    .ac-gu-card-info svg {
        width: 14px;
        height: 14px;
    }
    
    .ac-gu-card-button {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .ac-gu-card-tooltip {
        font-size: 11px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .ac-gu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0;
    }
}
