/* portal.css */

.portal-body {
    background-color: #F8FAFC;
}

/* Navbar */
.portal-nav {
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0 20px;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Hero Section */
.portal-hero {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    padding: 80px 40px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    transition: all 0.3s;
}

.hero-content.hidden {
    display: none;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight {
    color: var(--primary-color);
}

.hero-content p {
    font-size: 18px;
    color: #4B5563;
    margin-bottom: 40px;
    line-height: 1.6;
}

.search-bar {
    display: flex;
    background: white;
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    align-items: center;
}

.search-bar i {
    color: #9CA3AF;
    font-size: 20px;
    margin: 0 15px 0 20px;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 10px 0;
    box-shadow: none;
}

.search-bar .btn {
    border-radius: 50px;
    padding: 12px 30px;
    font-size: 16px;
}

/* Main Content & Tabs */
.portal-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 40px;
}

.tab-switcher {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    background: white;
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    display: inline-flex;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    border: 1px solid var(--border-color);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn i {
    font-size: 18px;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
}

.filter-select {
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background-color: white;
    font-weight: 500;
    cursor: pointer;
}

/* Grids */
.training-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Card Common */
.card-hoverable {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 10px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid #F3F4F6;
    display: flex;
    flex-direction: column;
}

.card-hoverable: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);
}

/* Course Card */
.course-card {
    position: relative;
}

.expired-course {
    opacity: 0.75;
    filter: grayscale(60%);
    cursor: default;
}

.expired-course:hover {
    transform: none;
    /* Disable hover lift for expired */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 10px 15px rgba(0, 0, 0, 0.03);
}

.course-card .card-banner {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.course-card .card-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.expired-course .card-banner::after {
    background: rgba(0, 0, 0, 0.4);
}

.expired-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(239, 68, 68, 0.95);
    /* Tailwind red-500 */
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    backdrop-filter: blur(4px);
}

.card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #111827;
    line-height: 1.4;
}

.card-org {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.meta-item {
    font-size: 13px;
    color: #4B5563;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #F3F4F6;
    padding: 6px 10px;
    border-radius: 6px;
}

.card-footer {
    margin-top: auto;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary-color);
}

.card-action {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

.text-error {
    color: var(--danger-color, #EF4444);
}

/* Trainer Card */
.trainer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 24px 30px;
    background: linear-gradient(180deg, #ffffff 0%, #FAFAFA 100%);
    border-top: 4px solid var(--primary-color);
    position: relative;
}

.trainer-card .trainer-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 6px solid white;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.15);
    transition: transform 0.3s ease;
}

.trainer-card:hover .trainer-photo {
    transform: scale(1.05);
}

.trainer-card .card-title {
    margin-bottom: 6px;
    font-size: 22px;
}

.trainer-card .trainer-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trainer-card .trainer-skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
}

.skill-tag {
    background: #F3F4F6;
    color: #374151;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
}

.trainer-card .trainer-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    width: 100%;
    justify-content: center;
}

.trainer-card .trainer-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}


/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    justify-content: flex-end;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 900px;
    height: 100vh;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    position: relative;
    transform: translateX(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.modal-overlay.hidden .modal-content {
    transform: translateX(100%);
}

.modal-close {
    position: absolute;
    top: 20px;
    left: -60px;
    background: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-close:hover {
    background: var(--danger-color);
    color: white;
}

.modal-scroll-area {
    overflow-y: auto;
    flex: 1;
}

/* Detail View Components */
.detail-hero {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.detail-hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
}

.detail-header-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    color: white;
}

.detail-badge {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
}

.detail-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
}

.detail-body {
    padding: 40px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Trainer Specific Modal Details */
.trainer-hero-content {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 60px 40px;
    background: linear-gradient(135deg, #1e3a8a, #4338ca);
    color: white;
}

.detail-prof-pic {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 8px solid white;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.trainer-hero-text h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 8px;
}

.trainer-hero-text .title {
    font-size: 18px;
    color: #E0E7FF;
    font-weight: 500;
    margin-bottom: 15px;
}

.trainer-hero-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
}

.trainer-hero-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Common Detail Sections */
.detail-section {
    margin-bottom: 40px;
}

.detail-section h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #111827;
}

.detail-section h3 i {
    color: var(--primary-color);
}

.detail-desc {
    font-size: 16px;
    line-height: 1.8;
    color: #4B5563;
}

/* Gallery Grid */
.detail-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.gallery-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.skill-tags-xl {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tags-xl .skill-tag {
    padding: 10px 20px;
    font-size: 15px;
    background: #EEF2FF;
    color: var(--primary-color);
    border: 1px solid #C7D2FE;
}

.trainer-comprehensive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.trainer-info-card {
    background: #F9FAFB;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.trainer-info-card h4 {
    font-size: 16px;
    color: #374151;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.trainer-info-card h4 i {
    color: var(--primary-color);
    font-size: 18px;
}

.trainer-info-card p,
.trainer-info-card li {
    font-size: 15px;
    color: #4B5563;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Lists and Accordions */
.objective-list {
    list-style: none;
}

.objective-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 16px;
    color: #4B5563;
    line-height: 1.6;
}

.objective-list li i {
    color: var(--secondary-color);
    font-size: 20px;
    flex-shrink: 0;
}

.syllabus-accordion {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.syllabus-module {
    border-bottom: 1px solid var(--border-color);
}

.syllabus-module:last-child {
    border-bottom: none;
}

.module-head {
    padding: 20px;
    background: #F9FAFB;
    font-weight: 600;
    font-size: 16px;
}

.module-head span.mod-num {
    color: var(--primary-color);
}

.module-body {
    padding: 20px;
    padding-left: 50px;
    color: #4B5563;
    background: white;
}

/* Sticky Sidebar */
.detail-sidebar {
    position: sticky;
    top: 40px;
}

.enroll-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.price-tag {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 20px;
}

.price-tag span {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
}

.enroll-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
}

.logistics-list {
    list-style: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.logistics-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 16px;
    color: #4B5563;
    font-size: 14px;
}

.logistics-list li i {
    color: var(--text-main);
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.logistics-list li strong {
    display: block;
    color: var(--text-main);
    margin-bottom: 2px;
}