/* ===== SERVICES PAGE STYLES ===== */

/* Section Layout */
.services-main {
    padding-top: 140px;
    padding-bottom: 80px;
    background-color: #f8fafc;
    min-height: 100vh;
}

.services-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* ===== SIDEBAR NAVIGATION ===== */
.services-sidebar {
    position: sticky;
    top: 140px;
    background: #ffffff;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1A3A52;
    margin-bottom: 25px;
    padding-left: 10px;
    border-left: 4px solid #1562BC;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-item:hover {
    background-color: #f1f5f9;
    color: #1562BC;
    transform: translateX(5px);
}

.category-item.active {
    background-color: #1562BC;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(21, 98, 188, 0.2);
}

.category-count {
    margin-left: auto;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
}

.category-item.active .category-count {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== SEARCH & FILTER BAR ===== */
.services-header {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.page-title-group h1 {
    font-size: 2rem;
    color: #1A3A52;
    font-weight: 800;
    margin-bottom: 5px;
}

.search-box {
    position: relative;
    max-width: 275px;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #1562BC;
    box-shadow: 0 0 0 4px rgba(21, 98, 188, 0.1);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* ===== PROGRAM GRID & CARDS ===== */
.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.creative-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #f1f5f9;
    position: relative;
}

.creative-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.card-header {
    position: relative;
    height: 200px;
}

.card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1562BC 0%, #0d4580 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.2rem;
}

.card-badge-group {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
}

.badge {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-green {
    background: #3DDAB4;
    color: #ffffff;
}

.badge-blue {
    background: #1562BC;
    color: #ffffff;
}

.badge-orange {
    background: #D85818;
    color: #ffffff;
}

.card-body {
    padding: 25px;
}

.card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1A3A52;
    margin-bottom: 15px;
    line-height: 1.3;
}

.card-description {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
}

.btn-detail {
    color: #1562BC;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.btn-detail:hover {
    gap: 12px;
}

.btn-register-small {
    background: #1562BC;
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-register-small:hover {
    background: #0d4580;
    transform: scale(1.05);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1024px) {
    .services-main {
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .section-container {
        padding: 0 16px;
    }

    .services-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .services-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 20px;
        padding: 20px;
        border-radius: 20px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .category-list {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Hide scrollbar Firefox */
        width: 100%;
    }

    .category-list::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Chrome/Safari */
    }

    .category-item {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .services-header {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .page-title-group h1 {
        font-size: 1.75rem;
    }

    .search-box {
        max-width: 100%;
        width: 70%;
        position: relative;
        left: 15%;
    }

    .program-grid {
        grid-template-columns: 1fr;
    }

    .empty-state-container {
        padding: 40px 16px;
        margin: 20px 0;
    }

    .empty-state-title {
        font-size: 1.5rem;
    }

    .empty-state-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .services-main {
        padding-top: 90px;
    }

    .page-title-group h1 {
        font-size: 1.5rem;
    }

    .empty-state-image-wrapper {
        width: 150px;
        height: 150px;
    }

    .gear-icon {
        font-size: 60px;
    }

    .empty-state-title {
        font-size: 1.25rem;
    }
}

/* ===== FILTERING & EMPTY STATE ===== */
.creative-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.creative-card.hide {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.empty-state-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    margin: 40px 0;
    animation: fadeIn 0.6s ease-out;
    width: 100%;
    box-sizing: border-box;
}

.empty-state-container.show {
    display: flex;
}

.empty-state-image-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 30px;
}

.empty-state-illustration {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.gear-icon {
    font-size: 80px;
    animation: rotate 10s linear infinite;
    color: #1562BC;
}

.empty-state-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1A3A52;
    margin-bottom: 10px;
}

.empty-state-text {
    color: #64748b;
    font-size: 1.1rem;
    max-width: 450px;
    line-height: 1.6;
}

.pulse-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid #1562BC;
    border-radius: 50%;
    opacity: 0;
    animation: pulse 3s infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Category Transition */
.services-content header {
    transition: opacity 0.3s ease;
}

.services-content.fade header {
    opacity: 0;
}

/* ===== NEW PROGRAM CARD DESIGN ===== */
.program-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.program-card:hover .card-image {
    transform: scale(1.05);
}

.card-badges {
    padding: 16px 20px 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-category {
    background-color: #e2e8f0;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
    display: inline-block;
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 12px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.meta-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.card-description {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.btn-card-detail {
    display: block;
    width: 100%;
    background-color: #559e6d;
    /* Green color from reference */
    color: #ffffff;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin-top: auto;
}

.btn-card-detail:hover {
    background-color: #438257;
}