/* --- Partners Intro Section --- */
.lavie-partners-intro {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 30px auto;
    padding: 0 15px;
}

.lavie-intro-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lavie-intro-text {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .lavie-intro-title {
        font-size: 1.4rem;
    }
    .lavie-intro-text {
        font-size: 0.95rem;
    }
}

/* --- Compact Horizontal Tier Selector with Tilted Mini Cards --- */
.lavie-tier-filter-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f8f9fa;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    margin-bottom: 18px;
}

.filter-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.filter-label {
    font-weight: 700;
    color: #1f2937;
    font-size: 0.88rem;
}

.tier-reset-btn {
    padding: 5px 12px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tier-reset-btn:hover {
    border-color: #274e13;
    color: #274e13;
}

.tier-reset-btn.active {
    background: #274e13;
    color: #ffffff;
    border-color: #274e13;
}

.lavie-tier-cards {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.tier-card-btn {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 30px;
    padding: 4px 12px 4px 8px;
    cursor: pointer;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.tier-card-btn:hover {
    border-color: #274e13;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.tier-card-btn.active {
    border-color: #274e13;
    background: #f1f8e9;
    box-shadow: 0 3px 10px rgba(39, 78, 19, 0.15);
}

.lavie-tier-filter-wrapper:has(.tier-card-btn.active) .tier-card-btn:not(.active) {
    opacity: 0.55;
}

.lavie-tier-filter-wrapper:has(.tier-card-btn.active) .tier-card-btn:not(.active):hover {
    opacity: 1;
}

.tier-card-img {
    width: 36px;
    height: auto;
    object-fit: contain;
    border-radius: 3px;
    transform: rotate(-6deg);
    box-shadow: 1px 2px 4px rgba(0,0,0,0.18);
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.tier-card-btn:hover .tier-card-img {
    transform: rotate(-10deg) scale(1.08);
}

.tier-card-btn.active .tier-card-img {
    transform: rotate(-8deg) scale(1.1);
}

.tier-card-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tier-card-btn.active .tier-card-name {
    color: #274e13;
}

@media (max-width: 768px) {
    .lavie-tier-filter-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    .filter-header {
        width: 100%;
        justify-content: space-between;
    }
}

/* --- Compact 4-Column Partners Grid Layout --- */
.lavie-partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

/* --- Compact Partner Card --- */
.partner-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.partner-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.07);
}

/* Uncropped Logo Header (Supports Both Portrait & Landscape) */
.partner-header {
    background: #ffffff;
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    height: 105px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.partner-logo {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.partner-logo-fallback {
    font-size: 0.9rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px;
    text-align: center;
}

/* --- Compact Body & Title --- */
.partner-body {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.partner-top-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.partner-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.25;
}

/* Sleek Horizontal Pill for "All Tiers" Summary */
.uniform-discount-badge {
    background: #f1f8e9;
    border: 1px solid #c5e1a5;
    border-radius: 6px;
    padding: 7px 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.discount-highlight {
    font-size: 1rem;
    font-weight: 800;
    color: #274e13;
    white-space: nowrap;
}

.discount-subtext {
    font-size: 0.65rem;
    color: #558b2f;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    text-align: right;
    line-height: 1.15;
}

/* Hide individual tier items when in "All Tiers" mode */
.lavie-partners-grid[data-active-tier="all"] .tier-grid.has-uniform {
    display: none;
}

/* Hide summary badge when a specific card is selected */
.lavie-partners-grid:not([data-active-tier="all"]) .uniform-discount-badge {
    display: none;
}

.tier-item {
    display: none;
    border-radius: 6px;
    overflow: hidden;
}

.tier-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    color: #fff;
}

.tier-label.silver { background: #9ca3af; }
.tier-label.gold { background: #d97706; }
.tier-label.platinum { background: #4b5563; }
.tier-label.titanium { background: #1f2937; }

.tier-value {
    font-size: 1rem;
    font-weight: 800;
    color: #274e13;
}

/* Show only the selected card tier's discount */
.lavie-partners-grid[data-active-tier="silver"] .tier-item[data-tier-item="silver"],
.lavie-partners-grid[data-active-tier="gold"] .tier-item[data-tier-item="gold"],
.lavie-partners-grid[data-active-tier="platinum"] .tier-item[data-tier-item="platinum"],
.lavie-partners-grid[data-active-tier="titanium"] .tier-item[data-tier-item="titanium"] {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
}

/* --- NEW: Teaser Link for Custom Privileges --- */
.custom-privileges-teaser {
    background: #f9fafb;
    padding: 8px 10px;
    border-radius: 6px;
    border-left: 3px solid #274e13;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.teaser-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
}

.btn-learn-more {
    background: none;
    border: none;
    color: #274e13;
    text-decoration: underline;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.btn-learn-more:hover {
    color: #1a360d;
}

/* Inline Meta Info (Address & Contact) */
.meta-section {
    border-top: 1px dashed #e5e7eb;
    padding-top: 8px;
    font-size: 0.74rem;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.3;
}

.meta-item strong {
    color: #374151;
    display: inline;
    margin-right: 4px;
}

/* Compact Footer Badges */
.partner-footer {
    padding: 8px 12px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
	width: 100%;
    text-align: center;
}

.badge.lavie-cash {
    background-color: #e6f4ea;
    color: #137333;
    border: 1px solid #ceead6;
}

.badge.special-inst {
    background-color: #fef7e0;
    color: #b06000;
	width: 100%;
    text-align: center;
    border: 1px solid #fde293;
}

/* --- NEW: Global Partner Modal --- */
.lavie-partner-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999; /* Ensure it sits on top of Elementor headers */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.lavie-partner-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lavie-partner-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.lavie-partner-modal-overlay.active .lavie-partner-modal-content {
    transform: translateY(0);
}

.lavie-partner-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    line-height: 1;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 2;
}

.lavie-partner-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.lavie-modal-header {
    padding: 30px 24px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    background: #fafafa;
}

.lavie-modal-header img {
    max-width: 160px;
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 12px;
}

.lavie-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.lavie-modal-body {
    padding: 24px;
    overflow-y: auto;
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.6;
}

.lavie-modal-body ul {
    margin: 0 0 16px 0;
    padding-left: 20px;
	list-style: disc;
}

.lavie-modal-body p {
    margin: 0 0 16px 0;
}

.lavie-modal-body p:last-child,
.lavie-modal-body ul:last-child {
    margin-bottom: 0;
}