/* ===== Open Sans — self-hosted ===== */
@font-face {
    font-family: "Open Sans";
    src: url("../fonts/open-sans-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Open Sans";
    src: url("../fonts/open-sans-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Open Sans";
    src: url("../fonts/open-sans-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===== Font application ===== */
body,
button, input, select, textarea,
h1, h2, h3, h4, h5, h6,
p, li, td, th, label,
.tutor-dashboard-content,
.tutor-course-content,
.tutor-lesson-content {
    font-family: "Open Sans", system-ui, -apple-system, sans-serif !important;
}

/* ===== AuditWorkshop Brand — Primary #1c4b42 | Accent #fef08a | Yellow #fef08a ===== */
:root {
    --aw-primary: #1c4b42;
    --aw-primary-dark: #163d35;
    --aw-primary-hover: #2d7a5f;
    --aw-accent: #fef08a;
    --aw-accent-hover: #fcd34d;
    --aw-accent-text: #1c4b42;

    --tutor-color-primary: #1c4b42;
    --tutor-color-primary-rgb: 28,75,66;
    --tutor-color-primary-hover: #2d7a5f;
    --tutor-color-secondary: #2d7a5f;
    --tutor-color-secondary-rgb: 45,122,95;
    --workademy_primary-color: #1c4b42;
    --workademy_secondary-color: #2d7a5f;
    --workademy_btn-color: #1c4b42;
    --workademy_btn-hover-color: #2d7a5f;
    --workademy_link-color: #1c4b42;
    --workademy_link-hover-color: #2d7a5f;
    --workademy_accent: #1c4b42;
    --workademy_accent-light: #2d7a5f;
    --wp--preset--color--primary: #1c4b42;
    --wp--preset--color--secondary: #2d7a5f;
    --global-color-primary: #1c4b42;
}

/* Buttons */
.tutor-btn-primary,
button.tutor-btn-primary,
a.tutor-btn-primary,
input[type=submit].tutor-btn-primary,
.tutor-course-enrollment-box .tutor-btn,
[class*="btn-primary"],
.wp-block-button__link {
    background-color: #1c4b42 !important;
    border-color: #1c4b42 !important;
    color: #fff !important;
}
.tutor-btn-primary:hover,
[class*="btn-primary"]:hover,
.wp-block-button__link:hover {
    background-color: #2d7a5f !important;
    border-color: #2d7a5f !important;
}

/* Links */
a, .tutor-color-primary { color: #1c4b42; text-decoration: none; }
a:hover { color: #2d7a5f; }

/* Progress / active states */
.tutor-progress-bar .tutor-progress-value,
.tutor-bg-primary { background-color: #1c4b42 !important; }
.tutor-course-card:hover { border-color: #1c4b42; }

/* Header */
.site-header, .tutorbase-header, header.site-header {
    background-color: #1c4b42;
}
.site-header a, .tutorbase-header a, header.site-header a { color: #fff; }
.site-header a:hover { color: #a7d7c0; }

/* Dashboard sidebar */
.tutor-dashboard-menu .tutor-dashboard-menu-item.tutor-is-active a,
.tutor-dashboard-menu .tutor-dashboard-menu-item.tutor-is-active a:before {
    color: #1c4b42;
    border-color: #1c4b42;
}

/* Form focus */
.tutor-form-control:focus,
input:focus, textarea:focus {
    border-color: #1c4b42 !important;
    box-shadow: 0 0 0 2px rgba(28,75,66,0.15) !important;
}

/* Outline buttons */
.tutor-btn-outline-primary {
    color: #1c4b42 !important;
    border-color: #1c4b42 !important;
}
.tutor-btn-outline-primary:hover {
    background-color: #1c4b42 !important;
    color: #fff !important;
}

/* ===== Sticky footer — always at bottom of viewport ===== */
html, body { height: 100%; }
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
body > .aw-site-header { flex-shrink: 0; }
body > .aw-site-footer,
body > .aw-footer-strip { flex-shrink: 0; }

/* Everything between header and footer grows to fill remaining space */
body > *:not(.aw-site-header):not(.aw-site-footer):not(.aw-footer-strip):not(script) {
    flex: 1 0 auto;
}

/* ===== Shared Layout Primitives ===== */
/* These apply to every custom-templated page. TutorLMS pages are excluded
   because Tutor renders its own wrapper and spotlight mode bypasses this entirely. */

/* Strip tutorbase's default main padding on homepage and Tutor functional pages */
.home .tutorbase-site-main,
.page-id-76 .tutorbase-site-main,
.page-id-7 .tutorbase-site-main,
.page-id-8 .tutorbase-site-main,
.page-id-9 .tutorbase-site-main,
.page-id-10 .tutorbase-site-main {
    padding: 0;
    max-width: none;
    width: 100%;
}

/* Constrain Tutor registration/login forms to a readable width */
.page-id-76 .tutorbase-site-main > *,
.page-id-7 .tutorbase-site-main > * {
    max-width: 520px;
    margin: 48px auto;
    padding: 0 24px;
}

/* 1140px centred column — used inside every section */
.aw-section-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Standard vertical rhythm for a section */
.aw-section { padding: 72px 0; }

/* Centred section heading block */
.aw-section-header {
    text-align: center;
    margin-bottom: 48px;
}
.aw-section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 12px;
}
.aw-section-header p {
    font-size: 1.1rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}
.aw-section-footer {
    text-align: center;
    margin-top: 40px;
}

/* ===== AuditWorkshop Buttons ===== */
.aw-btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: "Open Sans", system-ui, sans-serif;
    line-height: 1;
}
.aw-btn-primary {
    background: #1c4b42;
    color: #fff !important;
    border-color: #1c4b42;
}
.aw-btn-primary:hover {
    background: #2d7a5f;
    border-color: #2d7a5f;
}
.aw-btn-accent {
    background: #fef08a;
    color: #1c4b42 !important;
    border-color: #fef08a;
    font-weight: 700;
}
.aw-btn-accent:hover {
    background: #fcd34d;
    border-color: #fcd34d;
    color: #1c4b42 !important;
}
.aw-btn-white {
    background: #fff;
    color: #1c4b42 !important;
    border-color: #fff;
}
.aw-btn-white:hover {
    background: #e8f5ee;
    border-color: #e8f5ee;
    color: #1c4b42 !important;
}
.aw-btn-ghost {
    background: transparent;
    color: #fff !important;
    border-color: rgba(255,255,255,0.6);
}
.aw-btn-ghost:hover {
    background: rgba(255,255,255,0.12);
    border-color: #fff;
}
.aw-btn-outline {
    background: transparent;
    color: #1c4b42 !important;
    border-color: #1c4b42;
}
.aw-btn-outline:hover {
    background: #1c4b42;
    color: #fff !important;
}

/* ===== Tutor LMS Dashboard Overrides ===== */

/* Hide Tutor's dashboard greeting/avatar block — user identity is in our header */
.tutor-frontend-dashboard-header {
    display: none !important;
}

/* Remove Tutor's mobile bottom nav bar — we have our own navigation */
#tutor-dashboard-footer-mobile {
    display: none !important;
}

/* Strip the auto-padding Tutor adds to body for the mobile nav bar */
body.tutor-screen-frontend-dashboard {
    padding-bottom: 0 !important;
}

/* Reduce the 80px bottom padding on the dashboard wrapper to something reasonable */
.tutor-wrap.tutor-pb-80 {
    padding-bottom: 32px !important;
}

/* ===== Course Archive ===== */

/* Strip Tutor's default container max-width/padding — our .aw-page-content-wide handles it */
.aw-course-archive .tutor-courses-wrap.tutor-container,
.aw-course-archive .tutor-wrap {
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

/* Remove the extra tutor-row top margin inside archive */
.aw-course-archive .tutor-row {
    margin-top: 0 !important;
}

/* ===== General LMS page spacing ===== */

/* Top padding on all Tutor-controlled pages (dashboard, cart, checkout, etc.) */
.tutor-wrap.tutor-wrap-parent {
    padding-top: 40px !important;
}

/* Bottom padding — already handled for tutor-pb-80 above; catch everything else */
.tutor-wrap {
    padding-bottom: 40px;
}

/* Dashboard specifically — tighten the top */
.tutor-page-wrap .tutor-wrap {
    padding-top: 40px !important;
}

/* ===== Tutor success/green colour — override #24a148 to brand green ===== */
:root {
    --tutor-color-success: #1c4b42;
    --tutor-color-success-rgb: 28,75,66;
}

/* Hardcoded selectors in tutor.min.css that bypass the variable */
.tutor-color-success { color: #1c4b42 !important; }
.tutor-bg-success { background-color: #1c4b42 !important; }
.tutor-border-success { border-color: #1c4b42 !important; }
.tutor-toast-parent .tutor-is-success .tutor-notification-icon,
.tutor-toast-parent .tutor-is-success .tutor-notification-content h5 { color: #1c4b42 !important; }


/* ===== Course archive — filter flicker fix ===== */

/* Hide the raw <br> Tutor inserts after the sort bar */
.aw-course-archive .tutor-course-filter + br {
    display: none;
}

}

/* Align sidebar to top so it doesn't stretch with the card column */
.aw-course-archive .tutor-row {
    align-items: flex-start;
}


/* Hide course instructor sidebar block */
.tutor-course-details-instructors { display: none !important; }

/* Clip sidebar card content to rounded corners */
.tutor-sidebar-card { overflow: hidden; }

/* Restore top border-radius on first visible sidebar section after instructor block is hidden */
.tutor-single-course-sidebar-more .tutor-course-details-instructors + div {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.tutor-single-course-sidebar-more .tutor-course-details-instructors + .tutor-course-details-widget {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

/* Vertical padding for all Tutor LMS functional pages */
.aw-tutor-page-wrap {
    padding: 56px 24px 72px;
}

/* Registration form — restore card padding (margin now comes from wrapper) */
#tutor-registration-wrap {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 40px 32px;
}

/* Login page — Tutor uses its own template with .tutor-page-wrap, not page.php */
.tutor-page-wrap {
    padding: 56px 24px 72px;
}
.tutor-login-wrap {
    max-width: 480px;
    margin: 0 auto;
}

/* Dashboard visitor login wall */
.aw-login-wall {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    background: #fff;
    border: 1px solid #e0e6ea;
    border-radius: 10px;
    padding: 48px 40px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}
.aw-login-wall p {
    font-size: 1rem;
    color: #444;
    margin-bottom: 20px;
}
.aw-login-wall .aw-btn {
    display: inline-block;
    margin-bottom: 20px;
}
.aw-login-wall-register {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0 !important;
}
.aw-login-wall-register a {
    color: #1c4b42;
    font-weight: 600;
}
