/* --- DIPLOMA HEADER --- */
.diplomas-header {
    background: linear-gradient(rgba(0, 33, 71, 0.9), rgba(0, 33, 71, 0.8)), url('https://images.unsplash.com/photo-1524178232363-1fb2b075b955?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    text-align: center;
    color: var(--white);
}

.diplomas-header h1 { font-size: 3rem; margin-bottom: 10px; }
.breadcrumb { color: #ccc; }

/* --- SEARCH & FILTER BAR --- */
.search-bar-section {
    background: var(--white);
    padding: 30px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
    z-index: 10;
}

.filter-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Search Input */
.course-search {
    position: relative;
    min-width: 300px;
}

.course-search input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 50px;
    outline: none;
    transition: 0.3s;
}

.course-search input:focus { border-color: var(--secondary); }
.course-search button {
    position: absolute; right: 15px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none; color: var(--gray);
    cursor: pointer;
}

/* Filter Buttons */
.category-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background: #f1f1f1;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 500;
    color: var(--dark);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--secondary);
    color: var(--white);
}

/* --- COURSE CARDS GRID --- */
.courses-grid {
    display: grid;
    /* PEHLE: repeat(auto-fit, ...) tha */
    /* AB: repeat(auto-fill, ...) kar diya hai */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Image Area */
.course-img {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.course-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.course-card:hover .course-img img { transform: scale(1.1); }

/* Category Badge */
.badge {
    position: absolute;
    top: 15px; left: 15px;
    background: var(--primary);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-safety { background: #e63946; }
.badge-it { background: #4361ee; }
.badge-mgmt { background: #f72585; }

/* Content Area */
.course-content {
    padding: 25px;
    flex: 1; /* Pushes footer down */
    display: flex;
    flex-direction: column;
}

.course-content h3 { font-size: 1.25rem; color: var(--primary); margin-bottom: 10px; }
.desc { font-size: 0.9rem; color: #666; margin-bottom: 20px; line-height: 1.5; flex: 1; }

.course-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: #555;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.course-meta span i { color: var(--secondary); margin-right: 5px; }

/* Footer Buttons */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.btn-sm {
    padding: 8px 20px;
    background: var(--secondary);
    color: var(--white);
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.3s;
}

.btn-sm:hover { background: var(--primary); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .filter-wrapper { flex-direction: column; align-items: stretch; }
    .category-filters { justify-content: center; }
    .diplomas-header h1 { font-size: 2.2rem; }
}



/* =========================================
   PART 1: CATALOG PAGE STYLES (Filter & Grid)
   ========================================= */

/* --- HEADER --- */
.diplomas-header {
    background: linear-gradient(rgba(0, 33, 71, 0.9), rgba(0, 33, 71, 0.8)), url('https://images.unsplash.com/photo-1524178232363-1fb2b075b955?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    text-align: center;
    color: var(--white);
}

.diplomas-header h1 { font-size: 3rem; margin-bottom: 10px; }
.breadcrumb { color: #ccc; }

/* --- SEARCH & FILTER --- */
.search-bar-section {
    background: var(--white);
    padding: 30px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
    z-index: 10;
}

.filter-wrapper { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.course-search { position: relative; min-width: 300px; }
.course-search input { width: 100%; padding: 12px 40px 12px 15px; border: 1px solid #ddd; border-radius: 50px; outline: none; }
.course-search button { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--gray); cursor: pointer; }

.category-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-btn { padding: 8px 20px; background: #f1f1f1; border: none; border-radius: 50px; font-size: 0.9rem; cursor: pointer; transition: 0.3s; color: var(--dark); font-weight: 500; }
.filter-btn:hover, .filter-btn.active { background: var(--secondary); color: var(--white); }

/* --- COURSE GRID --- */
.courses-grid {
    display: grid;
    /* Auto-fill fix jo aapne maanga tha */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.course-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: 0.3s; border: 1px solid #eee; display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.course-img { height: 200px; position: relative; overflow: hidden; }
.course-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.course-card:hover .course-img img { transform: scale(1.1); }
.badge { position: absolute; top: 15px; left: 15px; background: var(--primary); color: var(--white); padding: 5px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.badge-safety { background: #e63946; } .badge-it { background: #4361ee; } .badge-mgmt { background: #f72585; }

.course-content { padding: 25px; flex: 1; display: flex; flex-direction: column; }
.course-content h3 { font-size: 1.25rem; color: var(--primary); margin-bottom: 10px; }
.desc { font-size: 0.9rem; color: #666; margin-bottom: 20px; line-height: 1.5; flex: 1; }
.course-meta { display: flex; gap: 15px; margin-bottom: 20px; font-size: 0.85rem; color: #555; border-top: 1px solid #eee; padding-top: 15px; }
.course-meta span i { color: var(--secondary); margin-right: 5px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; }
.btn-text { font-size: 0.9rem; font-weight: 600; color: var(--primary); }
.btn-sm { padding: 8px 20px; background: var(--secondary); color: var(--white); border-radius: 5px; font-size: 0.85rem; font-weight: 600; transition: 0.3s; }
.btn-sm:hover { background: var(--primary); }

/* =========================================
   PART 2: COURSE DETAILS PAGE STYLES (New)
   ========================================= */

/* Hero Specific */
.course-hero { background-color: var(--primary); padding: 60px 0; color: var(--white); margin-top: -1px;}
.category-tag { background: var(--secondary); padding: 5px 15px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; }
.course-hero h1 { font-size: 2.5rem; margin: 15px 0; line-height: 1.2; }
.hero-meta { display: flex; gap: 20px; font-size: 0.9rem; color: #ccc; margin-top: 10px; }
.hero-meta i { color: #f39c12; margin-right: 5px; }

/* Layout Grid */
.course-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }

/* Content Styling */
.content-box { margin-bottom: 40px; }
.content-box h3 { font-size: 1.5rem; color: var(--primary); margin-bottom: 20px; font-weight: 700; }
.content-box p { color: #555; line-height: 1.7; }
.bg-light-box { background: #f9f9f9; padding: 30px; border-radius: 8px; border: 1px solid #eee; }

/* Learning List */
.learning-list { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.learning-list li { list-style: none; color: #444; display: flex; align-items: center; gap: 10px; }
.learning-list li i { color: var(--secondary); }

/* Accordion */
.accordion-item { border: 1px solid #ddd; margin-bottom: 10px; border-radius: 5px; overflow: hidden; }
.accordion-header { background: #fff; padding: 15px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--primary); transition: 0.3s; }
.accordion-header:hover { background: #f1f1f1; }
.accordion-body { display: none; padding: 15px 20px; background: #fdfdfd; border-top: 1px solid #eee; color: #666; font-size: 0.95rem; }
.accordion-item.active .accordion-body { display: block; }
.accordion-item.active .accordion-header i { transform: rotate(180deg); transition: 0.3s; }

/* Sticky Sidebar */
.course-sidebar { position: relative; }
.sidebar-card { background: var(--white); padding: 25px; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); border: 1px solid #eee; position: sticky; top: 100px; }
.video-preview { position: relative; height: 180px; border-radius: 8px; overflow: hidden; margin-bottom: 20px; cursor: pointer; }
.video-preview img { width: 100%; height: 100%; object-fit: cover; }
.play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50px; height: 50px; background: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--secondary); animation: pulse 2s infinite; }
.price-tag h2 { color: var(--primary); font-size: 2rem; margin-bottom: 20px; }
.old-price { font-size: 1rem; color: #999; text-decoration: line-through; margin-left: 10px; }
.full-width { width: 100%; text-align: center; }

/* Responsive */
@media (max-width: 900px) {
    .filter-wrapper { flex-direction: column; align-items: stretch; }
    .course-layout { grid-template-columns: 1fr; }
    .sidebar-card { position: static; }
    .learning-list { grid-template-columns: 1fr; }
}