/* Plan Categories - Fantasy & Modern Style Redesign */
.plan-categories-container {
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
    position: relative;
    padding-top: 1rem;
}

/* Connector line behind (subtle emerald) */
.plan-categories-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-emerald), transparent);
    z-index: 0;
    opacity: 0.12;
}

.plan-categories {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.category-btn {
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    border-radius: 28px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Text */
.category-btn span {
    font-family: var(--font-heading);
    font-weight: 800;
    color: #333;
    /* Darker for better visibility */
    font-size: 1rem;
    z-index: 3;
    transition: color 0.3s;
    margin-top: 0.8rem;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.5);
    /* Glow for legibility */
}

/* Icons */
.cat-icon {
    transition: all 0.4s;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.cat-icon img { display:block; width:100%; height:100%; object-fit:cover }

/* Decoration Text (Background Calligraphy) - Enhanced */
.cat-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8) rotate(-15deg);
    font-family: 'Scheherazade New', serif;
    opacity: 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 2.2rem;
    white-space: nowrap;
    z-index: 1;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    font-weight: 700;
    letter-spacing: -1px;
}

/* Hover State */
.category-btn:hover {
    transform: translateY(-5px);
    background: white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.category-btn:hover .cat-icon {
    transform: scale(1.1);
    color: var(--color-emerald);
}

/* --- ACTIVE STATES --- */

.category-btn.active {
    transform: translateY(-8px) scale(1.03);
    border-color: transparent;
    box-shadow: 0 16px 36px rgba(46,139,87,0.12);
    background: linear-gradient(135deg, var(--color-emerald), #43a047);
}

.category-btn.active span {
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.category-btn.active .cat-icon {
    background: #fff;
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    color: var(--color-emerald);
}

.category-btn.active .cat-decoration {
    opacity: 0.22;
    transform: translate(-50%, -36%) scale(1.1) rotate(-6deg);
}

/* Removed per-category gold/variant styles to keep a consistent visual language on the plans page.
   All active categories now use the unified emerald branding above. */


/* Mobile Responsiveness */
@media (max-width: 768px) {
    .plan-categories-container::before {
        display: none;
    }

    .plan-categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 1rem 0.5rem;
        width: 100%;
        mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    }

    .category-btn {
        width: 110px;
        height: 110px;
        flex-shrink: 0;
        margin: 0 5px;
    }

    .cat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }

    .category-btn span {
        font-size: 0.8rem;
    }

    /* Hide scrollbar */
    .plan-categories::-webkit-scrollbar {
        display: none;
    }
}