/* ===== TABLE COURSES ===== */
/* ===== LAYOUT ===== */

body {
    font-family: 'Montserrat', sans-serif;
    padding-top: 80px;
}
.container {
    max-width: 1200px;
    margin: auto;
    padding: 40px 20px;
}

/* TITLE */
.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    color: #003986;
    margin-bottom: 30px;
}

/* ===== CARD WRAPPER ===== */
.table-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* ===== TABLE ===== */
.courses-table {
    width: 100%;
    border-collapse: separate;
    font-size: 14px;
    border-spacing: 0 10px;   /* 🔥 spacing between rows */
}

/* HEADER */
.courses-table thead {
    background: linear-gradient(90deg, #003986, #0050b3);
    color: white;
}

.courses-table th {
    font-family: 'Montserrat', sans-serif;
    padding: 18px 24px;
    text-align: left;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* BODY */
.courses-table td {
    padding: 18px 24px;
     line-height: 1.6;
    color: #444;
}

/* ROW STYLE */
.courses-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

/* HOVER EFFECT */
.courses-table tbody tr:hover {
    background: #eef4ff;
    transform: scale(1.01);
}

/* ZEBRA */
.courses-table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* ===== BADGES ===== */

/* TYPE */
.type-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.face {
    background: rgba(0, 57, 134, 0.1);
    color: #003986;
}

.online {
    background: rgba(255, 199, 0, 0.2);
    color: #b68a00;
}
/* BACK BUTTON WRAPPER */
.back-wrapper {
    position: sticky;
    top: 20px;
    z-index: 10;
    text-align: left;   /* 🔥 ito */
    margin-left: 20px;  /* konting space sa gilid */
}

/* BACK BUTTON */
.back-btn {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 57, 134, 0.1);
    color: #003986;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 57, 134, 0.3);
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* HOVER */
.back-btn:hover {
    background: #003986;
    color: white;
}

.header-brand {
    text-align: center;
    margin-bottom: 20px;
    
}

.logo {
    width: 250px;
    margin-bottom: 10px;
}
.table-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
}

.table-controls input,
.table-controls select {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    outline: none;
}

.table-controls input {
    width: 60%;
}

.table-controls select {
    width: 180px;
}

/* focus effect */
.table-controls input:focus,
.table-controls select:focus {
    border-color: #003986;
    box-shadow: 0 0 0 2px rgba(0,57,134,0.1);
}
.back-wrapper {
    position: sticky;
    top: 20px;
    z-index: 10;
}
.category-row td {
    font-family: 'Montserrat', sans-serif;
    background: transparent;
    color: #003986;
     font-size: 18px;
    font-weight: 900;
    padding: 16px 24px;
    margin-top: 10px;
    border-left: 5px solid #ffc700;
     letter-spacing: 0.5px;

    text-align: left !important;   /* 🔥 FIX */
}
.courses-table {
    font-family: 'Montserrat', sans-serif;
}
.courses-table td strong {
    font-weight: 900;
    color: #111;
    display: block;
     text-align: left;   /* 🔥 FIX */
}
.row-hide {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* 🔥 VISIBLE STATE */
.row-show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== SCROLL REVEAL BASE ===== */
.reveal {
    opacity: 0;
    transform: translateY(60px) scale(0.98);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ACTIVE STATE */
.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 🔥 VARIATIONS */
.reveal-left {
    transform: translateX(-80px);
}
.reveal-right {
    transform: translateX(80px);
}

.reveal-left.active,
.reveal-right.active {
    transform: translateX(0);
}

/* ===== PAGE LOADER ===== */
/* 🔥 TOP PROGRESS BAR */
#top-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #ffc700, #003986);
    z-index: 9999;
    transition: width 0.3s ease;
}

/* 🔥 FULL SCREEN LOADER */
#page-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #003986, #002c6b);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    transition: opacity 0.5s ease;
}

#page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

/* CONTENT */
.loader-content {
    text-align: center;
    color: white;
}

/* LOGO */
.loader-logo {
    width: 120px;
    margin-bottom: 20px;
    animation: float 2s ease-in-out infinite;
}
.table-sub-header {
    background: linear-gradient(90deg, #003986, #0050b3);
    color: white;
}

.table-sub-header th {
    padding: 16px 24px;
    text-align: left;
    font-weight: 700;
}

/* 🔥 FORCE LEFT PER COLUMN */
.courses-table td:nth-child(3), /* Duration */
.courses-table td:nth-child(5), /* Description */
.courses-table th:nth-child(3),
.courses-table th:nth-child(5) {
    text-align: left !important;
}
.courses-table th:nth-child(1),
.courses-table td:nth-child(1) {
    width: 25%;
}

.courses-table th:nth-child(2),
.courses-table td:nth-child(2) {
    width: 10%;
}

.courses-table th:nth-child(3),
.courses-table td:nth-child(3) {
    width: 15%;
}

.courses-table th:nth-child(4),
.courses-table td:nth-child(4) {
    width: 10%;
}
.courses-table th:nth-child(5),
.courses-table td:nth-child(5) {
    width: 40%;
}
.courses-table td:nth-child(5) {
    line-height: 1.7;
    max-width: 300px;   /* para hindi sobrang lapad */
}
.courses-table td:nth-child(3) {
    white-space: nowrap;   /* para hindi nagbe-break weird */
}
/* FLOAT ANIMATION */
@keyframes float {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* SPINNER */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top: 4px solid #ffc700;
    border-radius: 50%;
    margin: 0 auto 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* TEXT */
.loader-content p {
    font-size: 14px;
    opacity: 0.8;
}

/* ================= MOBILE VIEW ================= */
@media (max-width: 768px) {

    /* CONTAINER */
    .container {
        padding: 20px 10px;
    }

    /* TITLE */
    .section-title {
        font-size: 22px;
    }

    /* LOGO */
    .logo {
        width: 180px;
    }

    /* FILTER */
    .table-controls {
        flex-direction: column;
    }

    .table-controls input {
        width: 100%;
    }

    .table-controls select {
        width: 100%;
    }

    /* TABLE WRAP */
    .table-card {
        overflow-x: auto;   /* 🔥 para scroll sa mobile */
    }

    .courses-table {
        min-width: 700px;   /* 🔥 hindi masisira layout */
    }

    /* TEXT SIZE */
    .courses-table th,
    .courses-table td {
        text-align: left;   /* 🔥 ito pinaka fix */
    vertical-align: top;
    }

    /* CATEGORY */
    .category-row td {
        font-size: 14px;
    }

}