/* =================================================================== */
/*   ADEPT TRAINING CENTER - SUBPAGES & RESOURCES STYLESHEET          */
/*   Includes: Resources, Programs, Policies, Details, Admin, About    */
/* =================================================================== */

/* =================================================================== */
/*   1. ROOT VARIABLES & GLOBAL SETUP                                  */
/* =================================================================== */
:root {
    --adept-primary: #0056b3;
    --adept-primary-hover: #00418a;
    --adept-dark-blue: #0d3b4e;
    --adept-text-dark: #212529;
    --adept-text-muted: #6c757d;
    --adept-bg-light: #f8f9fa;
    --adept-bg-white: #ffffff;
    --adept-border-color: #eef2f6;
    --adept-blue-light: #e6f0ff;
    --header-height: 80px;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--adept-bg-light);
    color: var(--adept-text-dark);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    line-height: 1.6;
}

/* =================================================================== */
/*   2. DYNAMIC RESOURCES PAGE (resources.php)                         */
/* =================================================================== */

.resources-page .page-content-area {
    padding: 4rem 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f4f8fc 60%, #e8f2fc 100%);
}

.resources-page .page-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Filter Buttons */
.resource-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 3.5rem;
}

.filter-btn {
    background-color: var(--adept-bg-white);
    border: 1px solid #dcdfe3;
    color: var(--adept-text-muted);
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
}

.filter-btn:hover {
    border-color: var(--adept-primary);
    color: var(--adept-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: var(--adept-primary);
    color: var(--adept-bg-white);
    border-color: var(--adept-primary);
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.4);
}

/* Resource Grid */
.resources-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 1200px) {
    .resources-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Resource Card */
.resource-card {
    background-color: var(--adept-bg-white);
    border: 1px solid var(--adept-border-color);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 86, 179, 0.15);
}

/* Floating Template Preview (Hidden on mobile, flex on desktop) */
.resource-card__preview-wrapper {
    display: none;
    padding: 2rem;
    background-color: var(--adept-bg-light);
    flex-basis: 45%;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media (min-width: 992px) {
    .resource-card {
        flex-direction: row;
    }
    .resource-card__preview-wrapper {
        display: flex;
    }
    .resource-card__content-wrapper {
        flex-basis: 55%;
    }
}

.template-preview {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    background-color: #f0f4f8;
    padding: 10px;
    border: 1px solid #e9ecef;
    box-shadow: 10px 10px 30px rgba(0, 86, 179, 0.18);
    transform: rotate(-3deg) translateY(-6px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
}

.resource-card:hover .template-preview {
    transform: rotate(0deg) translateY(0) scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 86, 179, 0.25);
}

.template-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.template-preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--adept-primary);
    opacity: 0.6;
}

.template-preview iframe {
    width: 400%;
    height: 400%;
    transform: scale(0.25);
    transform-origin: top left;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #ffffff;
    pointer-events: none;
}

/* Resource Card Content */
.resource-card__content-wrapper {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    flex-grow: 1;
    text-align: left;
}

.resource-card__icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--adept-blue-light);
    color: var(--adept-primary);
    font-size: 1.4rem;
    margin: 0 0 1rem 0;
}

.resource-card__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--adept-dark-blue);
    margin-bottom: 0.5rem;
}

.resource-card__description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--adept-text-muted);
    flex-grow: 1;
}

.resource-card__footer {
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--adept-border-color);
    display: flex;
    gap: 0.8rem;
    justify-content: flex-start;
}

.resource-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    flex-grow: 1;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.resource-card__cta.preview {
    background-color: var(--adept-bg-white);
    color: var(--adept-primary);
    border: 1.5px solid var(--adept-primary);
}

.resource-card__cta.preview:hover {
    background-color: var(--adept-blue-light);
}

.resource-card__cta.download {
    background-color: var(--adept-primary);
    color: var(--adept-bg-white);
    border: 1.5px solid var(--adept-primary);
}

.resource-card__cta.download:hover {
    background-color: var(--adept-dark-blue);
    border-color: var(--adept-dark-blue);
}

/* =================================================================== */
/*   3. PROGRAMS & CATALOG HERO (programs-page.css)                    */
/* =================================================================== */

.page-hero {
    background: linear-gradient(135deg, #0d3b4e 0%, #0056b3 100%);
    color: #ffffff;
    padding: 4rem 1.5rem;
    text-align: center;
}

.page-hero__title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.page-hero__subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

.page-content-area {
    padding: 3.5rem 1.5rem;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    border: 1px solid var(--adept-border-color);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 35px rgba(0, 86, 179, 0.15);
}

.card-image {
    height: 190px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid #eef2f6;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #2c3e50;
}

.card-description {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.6;
    flex-grow: 1;
}

.card-footer-link {
    margin-top: 1.25rem;
    font-weight: 600;
    color: var(--adept-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.card-footer-link i {
    transition: transform 0.2s;
}

.category-card:hover .card-footer-link i {
    transform: translateX(4px);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--adept-text-muted);
}

/* =================================================================== */
/*   4. LEGAL & POLICY PAGES (policy.php)                              */
/* =================================================================== */

main.legal-page {
    padding-top: var(--header-height);
}

.legal-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3rem;
    padding: 3rem 0;
}

.legal-sidebar .sticky-nav {
    position: sticky;
    top: calc(var(--header-height) + 30px);
}

.sticky-nav h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--adept-text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--adept-primary);
}

.sticky-nav__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sticky-nav__list li {
    margin-bottom: 0.5rem;
}

.sticky-nav__link {
    display: block;
    padding: 10px 15px;
    color: #555555;
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease-in-out;
}

.sticky-nav__link:hover {
    background-color: #f1f5f9;
    color: var(--adept-dark-blue);
    transform: translateX(3px);
}

.sticky-nav__link.active {
    background-color: #eaf2fa;
    color: var(--adept-primary);
    font-weight: 700;
    border-left: 3px solid var(--adept-primary);
}

.legal-content {
    background-color: var(--adept-bg-white);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 49, 82, 0.06);
    border: 1px solid var(--adept-border-color);
}

.last-updated {
    text-align: right;
    color: var(--adept-text-muted);
    font-style: italic;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
    font-size: 0.85rem;
}

.policy-section {
    margin-bottom: 3.5rem;
    scroll-margin-top: calc(var(--header-height) + 20px);
}

.policy-section:last-child {
    margin-bottom: 0;
}

.policy-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.25rem;
}

.policy-header i {
    font-size: 1.8rem;
    color: var(--adept-primary);
}

.policy-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--adept-dark-blue);
    margin: 0;
}

.policy-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--adept-dark-blue);
}

.policy-body p,
.policy-body ul {
    line-height: 1.8;
    color: #444444;
}

.policy-body ul {
    padding-left: 20px;
}

@media (max-width: 991px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }
    .legal-sidebar {
        margin-bottom: 2rem;
    }
    .sticky-nav {
        position: static;
    }
}

/* =================================================================== */
/*   5. COURSE DETAILS PAGE (details.php, course_details.php)          */
/* =================================================================== */

.details-hero {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.details-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.details-hero__content {
    position: absolute;
    bottom: 25px;
    left: 20px;
    right: 20px;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 2;
    color: #ffffff;
}

.details-hero__title {
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
    margin: 0;
    color: #ffffff;
}

.details-page__layout {
    margin-top: 25px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 3rem;
}

@media (min-width: 992px) {
    .details-page__layout {
        display: grid;
        grid-template-columns: 1.3fr 1fr;
        gap: 2rem;
        align-items: flex-start;
    }
}

.details-page__main-content,
.details-page__dates-table-wrapper {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 49, 82, 0.08);
    padding: 2rem;
    border: 1px solid var(--adept-border-color);
}

.details-page__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--adept-dark-blue);
    margin-bottom: 1rem;
}

.details-page__meta {
    display: flex;
    gap: 1.5rem;
    color: var(--adept-text-muted);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.meta-item i {
    color: var(--adept-primary);
    margin-right: 8px;
}

/* Tabs */
.details-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
    gap: 10px;
}

.details-tabs__btn {
    padding: 0.6rem 1.2rem;
    border: none;
    background: none;
    font-weight: 600;
    color: var(--adept-text-muted);
    cursor: pointer;
    position: relative;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.details-tabs__btn:hover {
    color: var(--adept-dark-blue);
}

.details-tabs__btn.active {
    color: var(--adept-primary);
    border-bottom-color: var(--adept-primary);
}

.details-tab-pane {
    display: none;
}

.details-tab-pane.active {
    display: block;
}

.details-page__description {
    line-height: 1.8;
    color: #495057;
}

.details-page__pdf-viewer {
    width: 100%;
    height: 700px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

/* Dates Table */
.dates-table {
    width: 100%;
    border-collapse: collapse;
}

.dates-table thead th {
    text-align: left;
    padding: 0.75rem 0.5rem;
    background-color: #f8f9fa;
    color: #495057;
    font-size: 0.75rem;
    text-transform: uppercase;
    border-bottom: 2px solid #dee2e6;
}

.dates-table tbody td {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    font-size: 0.9rem;
}

.dates-table tbody tr:last-child td {
    border-bottom: none;
}

.enroll-btn-table {
    padding: 0.5rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 5px;
    background-color: var(--adept-primary);
    border: none;
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.enroll-btn-table:hover {
    background-color: var(--adept-primary-hover);
    transform: translateY(-1px);
}

/* =================================================================== */
/*   6. CLIENT LOGO SCROLLER (Fixed Opacity Bug)                       */
/* =================================================================== */

.adept-clients-section {
    padding: 4rem 0;
    background-color: #f8f9fa;
    border-top: 1px solid var(--adept-border-color);
}

.adept-logo-scroller-viewport {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.adept-logo-scroller-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 70px;
    animation: adept-scroll 35s linear infinite;
    width: max-content;
}

.adept-logo-scroller-track:hover {
    animation-play-state: paused;
}

.adept-client-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adept-client-logo img {
    max-height: 50px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.65;
    transition: all 0.3s ease;
}

/* Fixed opacity(0) bug -> Now properly highlights in color on hover */
.adept-client-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.08);
}

@keyframes adept-scroll {
    from { transform: translateX(0); }
    to   { transform: translate(calc(-50% - 35px)); }
}

/* =================================================================== */
/*   7. ABOUT US PAGE MODULES                                          */
/* =================================================================== */

.about-hero {
    position: relative;
    padding: 6rem 1.5rem;
    color: #ffffff;
    background-size: cover;
    background-position: center;
    text-align: center;
}

.about-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13, 59, 78, 0.88), rgba(0, 86, 179, 0.88));
}

.about-hero__content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.about-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}

.about-hero p {
    font-size: 1.2rem;
    opacity: 0.92;
    line-height: 1.6;
}

.about-section {
    padding: 5rem 0;
}

.about-section--light-grey {
    background-color: #f8f9fa;
}

.about-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

.mission-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .mission-layout {
        grid-template-columns: 1fr 1fr;
    }
}

.mission-text h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--adept-primary);
    margin-bottom: 1rem;
}

.mission-text p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #495057;
}

.mission-image img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 49, 82, 0.12);
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.why-us-card {
    background-color: #ffffff;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 5px 20px rgba(0, 49, 82, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.why-us-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 49, 82, 0.12);
}

.why-us-card .icon-wrapper {
    width: 65px;
    height: 65px;
    margin: 0 auto 1.5rem;
    background-color: #eaf2fa;
    color: var(--adept-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.why-us-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--adept-dark-blue);
    margin-bottom: 0.75rem;
}

.why-us-card p {
    line-height: 1.7;
    color: var(--adept-text-muted);
}

/* =================================================================== */
/*   8. ADMIN PANEL & QUILL EDITOR (admin.php)                         */
/* =================================================================== */

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--adept-border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.admin-header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.btn-logout {
    text-decoration: none;
    color: #ffffff;
    background: #dc3545;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
}

.item-list,
.editor-form {
    border: 1px solid var(--adept-border-color);
    padding: 1.5rem;
    border-radius: 10px;
    background-color: #ffffff;
}

.item-list h2,
.editor-form h2 {
    margin-top: 0;
    font-size: 1.4rem;
    color: var(--adept-text-dark);
}

.item-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.item-list li:last-child {
    border-bottom: none;
}

.item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-info img {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.actions a {
    margin-left: 0.5rem;
    text-decoration: none;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
}

.form-group input,
.form-group select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem;
    border: 1px solid var(--adept-border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--adept-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

#editor {
    height: 300px;
    border: 1px solid var(--adept-border-color);
    border-radius: 4px;
}

.ql-toolbar {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.ql-container {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    font-size: 1rem;
}

.btn-submit {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    background: var(--adept-primary);
    color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: var(--adept-primary-hover);
}

.btn-cancel {
    margin-left: 1rem;
    text-decoration: none;
    color: var(--adept-text-dark);
    font-weight: 500;
}
