/* ==========================================================
   Homepage — notification button
   ========================================================== */

.dia-hp-notif-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1.125rem;
    background: #f0ad4e;
    color: #1d2125;
    border-radius: 100px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}

.dia-hp-notif-btn:hover {
    background: #e09a30;
    color: #1d2125;
    text-decoration: none;
    transform: translateY(-1px);
}

.dia-hp-notif-btn .bi-chevron-right {
    font-size: 0.8rem;
}

/* ==========================================================
   Dashboard (/my/) — custom sections
   ========================================================== */

/* Empty state */
.dia-empty-state {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.dia-empty-state-icon {
    font-size: 2rem;
    color: #368537;
    flex-shrink: 0;
}

.dia-empty-state-text {
    margin: 0;
    font-size: 0.9375rem;
    color: #1d2125;
    font-weight: 500;
}

.dia-empty-state-subtext {
    margin: 0.15rem 0 0;
    font-size: 0.875rem;
    color: #6a737b;
}

.dia-empty-state > div {
    display: flex;
    flex-direction: column;
}

.dia-dashboard {
    margin-bottom: 2rem;
}

/* Section */
.dia-dashboard-section {
    margin-bottom: 2.5rem;
}

.dia-dashboard-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dia-dashboard-section-header .dia-hp-h2-header {
    margin-bottom: 0;
}

.dia-show-all-btn {
    color: #368537;
    font-weight: 600;
    font-size: 0.9375rem;
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
}

.dia-show-all-btn:hover {
    color: #207315;
    text-decoration: underline;
}

/* Course grid */
.dia-course-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

/* Mandatory section: max 2 columns */
#dia-mandatory-grid {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1199px) {
    .dia-course-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    #dia-mandatory-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .dia-course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    #dia-mandatory-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 479px) {
    .dia-course-grid,
    #dia-mandatory-grid {
        grid-template-columns: 1fr;
    }
}

/* Course card wrapper — needed so the star link positions relative to the card */
.dia-course-card-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Course card */
.dia-course-card {
    flex: 1;              /* fill the wrapper height so all cards in a row match */
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s, transform 0.2s;
}

.dia-course-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.13);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.dia-course-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #e9ecef;
    overflow: hidden;
}

.dia-course-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dia-course-card-image-placeholder {
    width: 100%;
    height: 100%;
    background: #dee2e6;
}

/* Star icon overlay — favourited courses only */
.dia-course-card-fav {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: #fff;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #f0ad4e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Card body */
.dia-course-card-body {
    padding: 0.875rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dia-course-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #368537;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.dia-course-card:hover .dia-course-card-title {
    color: #207315;
}

.dia-course-card-summary {
    font-size: 0.875rem;
    color: #495057;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    flex: 1;
}

/* Tags */
.dia-course-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
}

.dia-course-tag {
    font-size: 0.8rem;
    color: #368537;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.dia-course-tag .bi {
    font-size: 0.7rem;
}

/* ==========================================================
   Logged-in navbar nav (Moje studium / Moje certifikáty)
   ========================================================== */

.dia-logged-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dia-logged-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #1d2125;
    text-decoration: none;
    padding: 0.375rem 0.875rem;
    border-radius: 100px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.dia-logged-nav-btn:hover {
    background: #e8f3e8;
    color: #1d2125;
    text-decoration: none;
}

.dia-logged-nav-btn--active {
    background: #e8f3e8;
}

.dia-logged-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #368537;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    padding: 0 0.25rem;
    line-height: 1;
}

/* ==========================================================
   Navbar search icon + popup
   ========================================================== */

.dia-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.dia-search-toggle {
    background: none;
    border: none;
    padding: 0.375rem 0.5rem;
    color: #1d2125;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: background 0.15s;
    line-height: 1;
}

.dia-search-toggle:hover,
.dia-search-toggle[aria-expanded="true"] {
    background: #e8f3e8;
}

.dia-search-popup {
    position: absolute;
    top: calc(100% + 0.625rem);
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    padding: 0.75rem;
    min-width: 320px;
    z-index: 1050;
}

.dia-search-popup[hidden] {
    display: none;
}

/* ==========================================================
   Course card star — homepage & kurzy.php
   ========================================================== */

/* Ensure the card wrapper is a positioning context */
.gov-cz-card.course-card {
    position: relative;
}

.course-card-star {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    z-index: 2;
    transition: background 0.15s;
    padding: 0;
}

.course-card-star:hover {
    background: #fff;
}

/* Yellow star = already favourited */
.course-card-star[data-isfavourite="1"] {
    color: #f0ad4e;
}

/* Grey star = not yet favourited */
.course-card-star[data-isfavourite="0"] {
    color: #6c757d;
}
