/* ===================================
   Common Category Page Styles
   =================================== */

/* --- Dynamic Hero Section --- */
.category-hero {
    position: relative;
    /* Default background - overridden inline in HTML for specific pages */
    background-color: #f0fdf4;
    padding: 160px 0 80px;
    text-align: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.category-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.85) 0%, rgba(6, 95, 70, 0.8) 100%);
    z-index: 1;
}

.category-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

/* Service Area Badge - Changed from red to vibrant teal/green */
.service-area-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #065F46; /* Maroon - positive and standout */
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
    100% { transform: scale(0.95); }
}

.category-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.category-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* --- Listing Layout --- */
.listing-section {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    align-items: stretch;
}

/* --- Premium Product Card --- */
.listing-card {
    background: linear-gradient(180deg, #ffffff 0%, #fffdf6 100%);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(6, 78, 59, 0.08);
    transition: all 0.4s ease;
    border: 1px solid rgba(6, 95, 70, 0.13);
    display: flex;
    flex-direction: column;
    position: relative;
}

.listing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 22px 38px rgba(6, 95, 70, 0.16);
    border-color: rgba(6, 95, 70, 0.3);
}

/* Highlight one card per page: the first card acts as "Top Choice" */
.listing-grid > .listing-card:first-child,
.listing-grid > .listing-card.featured {
    background: linear-gradient(165deg, #ffffff 0%, #fff6df 58%, #ffffff 100%);
    border-color: rgba(6, 95, 70, 0.26);
    box-shadow: 0 22px 40px rgba(6, 78, 59, 0.16);
    transform: translateY(-4px);
}

.listing-grid > .listing-card:first-child::before,
.listing-grid > .listing-card.featured::before {
    content: 'Top Choice';
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #ffffff;
    background: linear-gradient(135deg, #065F46 0%, #064E3B 100%);
    box-shadow: 0 6px 14px rgba(6, 78, 59, 0.24);
}

.listing-grid > .listing-card:first-child .card-image-box::after,
.listing-grid > .listing-card.featured .card-image-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(6, 95, 70, 0.08) 0%,
        rgba(6, 78, 59, 0.34) 100%
    );
    pointer-events: none;
}

.listing-grid > .listing-card:first-child .card-title,
.listing-grid > .listing-card.featured .card-title {
    color: var(--primary-dark);
}

.listing-grid > .listing-card:first-child .card-actions,
.listing-grid > .listing-card.featured .card-actions {
    border-color: rgba(6, 95, 70, 0.28);
    background: rgba(255, 255, 255, 0.98);
}

/* Image Area */
.card-image-box {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.listing-card:hover .card-image-box img {
    transform: scale(1.1);
}

/* Badges */
.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.badge-popular { background: #064E3B; } /* Dark emerald for popular */
.badge-premium { background: #f59e0b; color: #1F2937; } /* Amber for premium */

/* Content Area */
.card-content {
    position: relative;
    padding: 2.2rem 1.35rem 1.35rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.card-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.58;
    margin-bottom: 1.3rem;
    flex-grow: 1;
}

/* Card Actions */
.card-footer {
    position: absolute;
    top: 0;
    left: 1.35rem;
    right: 1.35rem;
    transform: translateY(calc(-50% - 2px));
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    border-top: none;
    z-index: 4;
}

.card-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(6, 95, 70, 0.2);
    box-shadow: 0 10px 20px rgba(6, 78, 59, 0.14);
}

.btn-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-whatsapp {
    background: rgba(6, 95, 70, 0.1);
    color: #065F46;
}

.btn-whatsapp:hover {
    background: #065F46;
    color: white;
}

.btn-call-card {
    background: rgba(245, 158, 11, 0.18);
    color: #92400e;
}

.btn-call-card:hover {
    background: #f59e0b;
    color: #1F2937;
}

/* --- Features Section (Mini Bento) --- */
.category-features {
    padding: 4rem 0;
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-box {
    text-align: center;
    padding: 2rem;
    border-radius: 16px;
    background: #fffdf5;
    border: 1px solid rgba(6, 95, 70, 0.14);
    transition: var(--transition);
}

.feature-box:hover {
    transform: translateY(-5px);
    background: white;
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-box h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* ===================================
   Responsive Adjustments - Mobile First
   =================================== */
@media (max-width: 991px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .category-hero {
        padding: 140px 0 60px;
    }

    .category-title {
        font-size: 2.2rem;
    }

    .listing-grid {
        grid-template-columns: 1fr; /* Full width cards on mobile */
        gap: 1.5rem;
    }

    .card-image-box {
        height: 220px;
    }

    .card-content {
        padding: 2.35rem 1.1rem 1.1rem;
    }

    .card-footer {
        left: 1.1rem;
        right: 1.1rem;
        top: 0;
        transform: translateY(calc(-50% - 2px));
    }

    .card-actions {
        padding: 5px;
    }

    .listing-card {
        box-shadow: 0 4px 15px rgba(0,0,0,0.08); /* Softer shadow on mobile */
    }

    .listing-grid > .listing-card:first-child,
    .listing-grid > .listing-card.featured {
        transform: none;
    }

    /* Make buttons bigger on mobile for tapping */
    .btn-card-action {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    /* FIXED: Feature boxes now look clean on mobile - centered layout */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-box {
        text-align: center; /* Keep centered on mobile */
        padding: 1.5rem 1rem;
        display: block; /* Changed from flex to block */
    }

    .feature-icon {
        margin-bottom: 0.75rem; /* Restore bottom margin */
        font-size: 2rem; /* Keep icon size prominent */
        display: block;
    }

    .feature-box h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .feature-box p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

