/* Courses Page Premium Styles - Grid Layout Version */
:root {
    --ied-red: #b33b2c;
    --ied-text-dark: #1a1a1a;
    --ied-text-light: #666;
    --ied-gray: #e5e5e5;
    --ied-light-gray: #f5f5f5;
}

/* Hero Section */
.courses-hero {
    background: linear-gradient(135deg, #ffffff 0%, #fef8f7 100%);
    padding: 2rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.courses-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(179, 59, 44, 0.05), transparent);
    pointer-events: none;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ied-red);
    font-family: 'Poppins', sans-serif;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--ied-text-light);
}

/* Search Section */
.search-section {
    background: linear-gradient(135deg, #ffffff 0%, #fef8f7 100%);
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--ied-gray);
    position: sticky;
    top: 72px;
    z-index: 99;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
}

.search-wrapper {
    max-width: 450px;
    margin: 0 auto;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ied-red);
    font-size: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.8rem;
    border: 2px solid var(--ied-gray);
    border-radius: 60px;
    font-size: 0.9rem;
    transition: all 0.3s;
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: var(--ied-red);
    box-shadow: 0 0 0 4px rgba(179, 59, 44, 0.08);
}

.clear-search {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--ied-text-light);
    cursor: pointer;
    font-size: 0.9rem;
    display: none;
    transition: all 0.3s;
}

.clear-search:hover {
    color: var(--ied-red);
}

/* Specialization Section */
.spec-section {
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--ied-gray);
}

.spec-section:last-child {
    border-bottom: none;
}

/* Section Header */
.spec-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.spec-title-premium {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.spec-icon-premium {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, rgba(179, 59, 44, 0.1) 0%, rgba(139, 42, 30, 0.05) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    overflow: hidden;
}

.spec-icon-premium img {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    transition: transform 0.3s;
    object-fit: cover;
}

.spec-title-premium:hover .spec-icon-premium img {
    transform: scale(1.1);
}

.spec-icon-premium i {
    font-size: 1.8rem;
    color: var(--ied-red);
}

.spec-info-premium h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    color: var(--ied-text-dark);
    font-family: 'Poppins', sans-serif;
}

.spec-info-premium p {
    font-size: 0.85rem;
    color: var(--ied-text-light);
    margin: 0.3rem 0 0 0;
}

.view-all-premium {
    background: transparent;
    border: 1.5px solid var(--ied-red);
    color: var(--ied-red);
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.view-all-premium:hover {
    background: var(--ied-red);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 6px 15px rgba(179, 59, 44, 0.2);
}

/* ========== GRID LAYOUT ========== */
.courses-grid-premium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Course Cards */
.premium-course-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--ied-gray);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.premium-course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.1);
    border-color: var(--ied-red);
}

.card-image-premium {
    position: relative;
    width: 100%;
    padding-top: 62.5%;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa, #f1f3f5);
}

.card-image-premium img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.premium-course-card:hover .card-image-premium img {
    transform: scale(1.08);
}

.card-badge-premium {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    background: var(--ied-red);
    color: white;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.card-duration-premium {
    position: absolute;
    bottom: 0.8rem;
    right: 0.8rem;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: white;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.card-content-premium {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title-premium {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--ied-text-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Course Meta Badges */
.course-meta-badges {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
}

.duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--ied-light-gray);
    color: var(--ied-text-light);
    padding: 0.35rem 0.9rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Skills Section */
.skills-section {
    margin-bottom: 1.25rem;
    flex: 1;
}

.skills-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--ied-text-light);
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.skill-tag {
    background: rgba(179, 59, 44, 0.08);
    color: var(--ied-red);
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* View Button */
.view-card-premium {
    width: 100%;
    background: transparent;
    border: 1.5px solid var(--ied-red);
    color: var(--ied-red);
    padding: 0.7rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: auto;
}

.view-card-premium:hover {
    background: var(--ied-red);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(179, 59, 44, 0.3);
}

/* Search Results */
.search-results-section {
    padding: 2rem 0;
    min-height: 400px;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-results-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.back-to-all-premium {
    background: transparent;
    border: 1px solid var(--ied-gray);
    color: var(--ied-text-dark);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
}

.back-to-all-premium:hover {
    border-color: var(--ied-red);
    color: var(--ied-red);
}

.results-grid-premium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

/* No Results */
.no-results-premium {
    text-align: center;
    padding: 4rem;
}

.no-results-premium i {
    font-size: 3.5rem;
    color: var(--ied-gray);
    margin-bottom: 1rem;
}

.no-results-premium h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* Skeleton Loading */
.skeleton-spec-section {
    animation: fadeIn 0.3s ease;
}

.skeleton-icon {
    width: 65px;
    height: 65px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 50%;
}

.skeleton-title {
    width: 200px;
    height: 28px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    margin-bottom: 10px;
}

.skeleton-text-short {
    width: 300px;
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-button {
    width: 140px;
    height: 40px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 30px;
}

.skeleton-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.skeleton-image {
    width: 100%;
    padding-top: 62.5%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-card-title {
    width: 80%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 12px;
}

.skeleton-level {
    width: 60px;
    height: 24px;
    background: #e0e0e0;
    border-radius: 20px;
    margin-bottom: 12px;
}

.skeleton-badge-group {
    display: flex;
    gap: 0.5rem;
    margin: 0.8rem 0;
}

.skeleton-badge-small {
    width: 70px;
    height: 24px;
    background: #e0e0e0;
    border-radius: 20px;
}

.skeleton-skills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.5rem 0;
}

.skeleton-skill {
    width: 60px;
    height: 22px;
    background: #e0e0e0;
    border-radius: 20px;
}

.skeleton-button-small {
    width: 100%;
    height: 40px;
    background: #e0e0e0;
    border-radius: 40px;
    margin-top: 12px;
}

.skeleton-title-large {
    width: 300px;
    height: 32px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Tablet - 2 columns */
@media (max-width: 1024px) {

    .courses-grid-premium,
    .results-grid-premium {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .courses-hero {
        text-align: center;
    }

    .spec-header-premium {
        flex-direction: column;
        align-items: flex-start;
    }

    .spec-title-premium {
        width: 100%;
    }

    .view-all-premium {
        align-self: flex-start;
    }

    .search-wrapper {
        max-width: 100%;
    }

    .courses-hero h1 {
        font-size: 2rem !important;
    }

    .hero-stats {
        gap: 1rem;
        justify-content: center;
    }

    .spec-icon-premium {
        width: 55px;
        height: 55px;
    }

    .spec-icon-premium img {
        width: 55px;
        height: 55px;
    }

    .spec-info-premium h2 {
        font-size: 1.4rem;
    }
}

/* Small Mobile - 1 column */
@media (max-width: 640px) {

    .courses-grid-premium,
    .results-grid-premium {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .spec-icon-premium {
        width: 48px;
        height: 48px;
    }

    .spec-icon-premium img {
        width: 48px;
        height: 48px;
    }

    .spec-info-premium h2 {
        font-size: 1.2rem;
    }

    .spec-info-premium p {
        font-size: 0.75rem;
    }

    .view-all-premium {
        width: 100%;
        justify-content: center;
        padding: 0.5rem 1.2rem;
        font-size: 0.8rem;
    }

    .card-title-premium {
        font-size: 1rem;
    }

    .skill-tag {
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }

    .search-results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .back-to-all-premium {
        width: 100%;
        text-align: center;
    }
}

/* Loading State */
.loading-state-premium {
    text-align: center;
    padding: 4rem;
}

.loading-state-premium i {
    font-size: 2.5rem;
    color: var(--ied-red);
    margin-bottom: 1rem;
}