/**
 * Thrive Theme - Custom CSS
 *
 * @package    theme_thrive
 * @copyright  2024
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

/* Add your custom CSS styles here */


body {
    background: #E9E6DB;    
}

@media (min-width: 768px) {
    .pagelayout-standard #page.drawers .main-inner, body.limitedwidth #page.drawers .main-inner {
        max-width: 1150px;
    }
}

.moremenu .show>.nav-link, .moremenu .active>.nav-link, .moremenu .nav-link.show, .moremenu .nav-link.active {
    color: #d19b42 !important;
    font-weight: 600;
}

.moremenu .nav-link.active {
    border-bottom-color: #d19b42;
}

.moremenu .nav-link.active {
    border-bottom-color: #d19b42 !important;
}

.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link {
    color: #d19b42 !important;
    font-weight: 500 !important;
}

.nav-link {
    color: #6a6a6a !important;
}

.moremenu .nav-link.active:focus, .moremenu .nav-link.active:hover {
    border-bottom-color: #d19b42 !important;
}

a.btn.btn-primary,
a.btn.btn-primary:hover,
a.btn.btn-primary:focus,
a.btn.btn-primary:active {
  color: #ffffff !important;
}

a.btn.btn-success,
a.btn.btn-success:hover,
a.btn.btn-success:focus,
a.btn.btn-success:active {
  color: #ffffff !important;
}

a.btn.btn-danger,
a.btn.btn-danger:hover,
a.btn.btn-danger:focus,
a.btn.btn-danger:active {
  color: #ffffff !important;
}

.card-primary {
    border-color: rgba(196, 135, 52) !important;
    color: rgba(196, 135, 52) !important;
}

.card-success {
    border-color: rgba(65, 136, 158) !important;
    color: rgba(65, 136, 158) !important;
}

.card-info {
    border-color: rgba(146, 65, 74) !important;
    color: rgba(146, 65, 74) !important;
}

.card-warning {
    border-color: rgba(3, 64, 129) !important;
    color: rgba(3, 64, 129) !important;
}

/* Courses Page Layout Fixes */
.courses-grid-row {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 24px !important;
    margin-top: 24px !important;
}

.card-courses-col {
    width: 100% !important;
    max-width: 100% !important;
}

.card-courses {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.card-courses-image {
    width: 100% !important;
    height: 200px !important;
    overflow: hidden !important;
    position: relative !important;
    background: #f5f5f5 !important;
}

.card-courses-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

.card-courses-content {
    padding: 20px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.card-courses-content h6 {
    margin: 0 0 12px 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #333 !important;
    line-height: 1.4 !important;
}

.courses-info {
    margin-bottom: 16px !important;
}

.courses-info p {
    margin: 0 !important;
    color: #666 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

.card-courses-bottom {
    padding: 16px 20px !important;
    border-top: 1px solid #e0e0e0 !important;
    background: #f9f9f9 !important;
}

/* Filter Layout Fixes */
.courses-content-top {
    margin-bottom: 32px !important;
}

.courses-content-top-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}

.courses-content-top-left h2 {
    margin: 0 !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #333 !important;
}

.courses-content-top-right {
    width: 100% !important;
}

.courses-searches {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    align-items: flex-start !important;
}

.search-inputs {
    flex: 1 !important;
    min-width: 200px !important;
    position: relative !important;
}

.search-inputs input {
    width: 100% !important;
    padding: 10px 12px 10px 40px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 14px !important;
}

.search-inputs .icon-search {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #999 !important;
}

.checkbox-ticks,
.search-year {
    min-width: 150px !important;
}

.checkbox-ticks select,
.search-year select {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    background: #fff !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .courses-grid-row {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .card-courses-image {
        height: 180px !important;
    }
    
    .courses-searches {
        flex-direction: column !important;
    }
    
    .search-inputs,
    .checkbox-ticks,
    .search-year {
        width: 100% !important;
        min-width: 100% !important;
    }
    
    .courses-content-top-left h2 {
        font-size: 24px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .courses-grid-row {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    }
}

/* Login Form Styles */
#login-form .error-message {
    display: none !important;
    color: #dc3545 !important;
    font-size: 12px !important;
    margin-top: 5px !important;
    padding: 0 !important;
}

#login-form .form-group {
    position: relative !important;
}

/* Default form control styling - no red borders on page load */
#login-form input.form-control {
    border-color: #ced4da !important;
}

/* Only show invalid state after user has interacted (blurred and not empty) */
#login-form input.form-control:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #dc3545 !important;
}

/* Only show valid state after user interaction */
#login-form input.form-control:valid:not(:focus):not(:placeholder-shown) {
    border-color: #28a745 !important;
}

/* Focus state - always use brand color */
#login-form input.form-control:focus {
    border-color: #144194 !important;
    outline: none !important;
    box-shadow: 0 0 0 0.2rem rgba(20, 65, 148, 0.25) !important;
}

/* Remove invalid styling when user is typing (focus state) */
#login-form input.form-control:invalid:focus {
    border-color: #144194 !important;
}

#login-form .forgot-password-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

#login-form .forgot-password-row p {
    margin: 0 !important;
    padding: 0 !important;
}

#login-form .remember-me {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    color: #333 !important;
    font-weight: normal !important;
    line-height: 1.5 !important;
}

#login-form .remember-me input[type="checkbox"] {
    margin: 0 !important;
    cursor: pointer !important;
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
}

#login-form .forgot-password-row a {
    color: #144194 !important;
    text-decoration: none !important;
    font-size: 14px !important;
}

#login-form .forgot-password-row a:hover {
    text-decoration: underline !important;
    color: #1e5fb8 !important;
}

/* Forgot Password Page Styles - Same as Login Page */
.thrive-forgot-password-section {
    background: none !important;
}

.thrive-forgot-password-section .contact-us-left {
    margin: 0 auto !important;
    max-width: 100% !important;
}

.thrive-forgot-password-section .login-forms {
    width: 100% !important;
}

/* Forgot Password Form Styles - Match Login Page */
.thrive-forgot-password-section h2,
.thrive-forgot-password-section h3 {
    color: #115456 !important;
    margin-bottom: 1.5rem !important;
    font-weight: 600 !important;
}

.thrive-forgot-password-section p {
    color: #666 !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.6 !important;
}

.thrive-forgot-password-section .form-group {
    margin-bottom: 1.5rem !important;
    width: 100% !important;
}

.thrive-forgot-password-section label {
    color: #333 !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

.thrive-forgot-password-section .form-control {
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    padding: 0.75rem 1rem !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.thrive-forgot-password-section input[type="text"],
.thrive-forgot-password-section input[type="email"] {
    width: 100% !important;
    box-sizing: border-box !important;
}

.thrive-forgot-password-section .form-control:focus {
    border-color: #144194 !important;
    outline: none !important;
    box-shadow: 0 0 0 0.2rem rgba(20, 65, 148, 0.25) !important;
}

.thrive-forgot-password-section .btn-primary {
    background-color: #3F859A !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 0.75rem 2rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    margin-top: 1rem !important;
}

.thrive-forgot-password-section .btn-primary:hover {
    background-color: #357a8d !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(63, 133, 154, 0.3) !important;
}

.thrive-forgot-password-section .btn-secondary,
.thrive-forgot-password-section .btn-default {
    background: #f8f9fa !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    border-radius: 6px !important;
    padding: 0.75rem 2rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    margin-top: 0.5rem !important;
}

.thrive-forgot-password-section .btn-secondary:hover,
.thrive-forgot-password-section .btn-default:hover {
    background: #e9ecef !important;
    border-color: #adb5bd !important;
}

.thrive-forgot-password-section .alert {
    border-radius: 6px !important;
    padding: 1rem 1.25rem !important;
    margin-bottom: 1.5rem !important;
}

.thrive-forgot-password-section .alert-success {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

.thrive-forgot-password-section .alert-info {
    background-color: #d1ecf1 !important;
    border-color: #bee5eb !important;
    color: #0c5460 !important;
}

.thrive-forgot-password-section .alert-danger {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

.thrive-forgot-password-section .alert-warning {
    background-color: #fff3cd !important;
    border-color: #ffeaa7 !important;
    color: #856404 !important;
}

.thrive-forgot-password-section a {
    color: #144194 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.thrive-forgot-password-section a:hover {
    color: #1e5fb8 !important;
    text-decoration: underline !important;
}

.thrive-forgot-password-section .back-to-login {
    text-align: center !important;
    margin-top: 2rem !important;
    padding-top: 2rem !important;
    border-top: 1px solid #e9ecef !important;
}

.thrive-forgot-password-section .back-to-login a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    color: #144194 !important;
    font-weight: 500 !important;
}

.thrive-forgot-password-section .back-to-login a:hover {
    color: #1e5fb8 !important;
}

/* Hide form labels on forgot password page */
body.thrive-forgot-password-page .col-md-3.col-form-label,
.thrive-forgot-password-section .col-md-3.col-form-label {
    display: none !important;
}

/* Expand form fields to full width when labels are hidden on forgot password page */
body.thrive-forgot-password-page .col-md-9.d-flex.flex-wrap.align-items-start.felement,
.thrive-forgot-password-section .col-md-9.d-flex.flex-wrap.align-items-start.felement {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* Adjust form row layout on forgot password page */
body.thrive-forgot-password-page .mb-3.row.fitem,
.thrive-forgot-password-section .mb-3.row.fitem {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Ensure form elements are aligned - Forgot Password */
.thrive-forgot-password-section form {
    width: 100% !important;
}

.thrive-forgot-password-section input[type="submit"],
.thrive-forgot-password-section button[type="submit"],
.thrive-forgot-password-section .btn {
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Hide logo image on login page */
#logoimage,
#loginlogo,
.login-logo {
    display: none !important;
}

/* Login Page - Center Form */
.thrive-login-section .contact-us-left {
    margin: 0 auto !important;
    max-width: 100% !important;
}

.thrive-login-section .login-forms {
    width: 100% !important;
}

/* Hide signup info on login page */
.thrive-login-section .signup-info {
    display: none !important;
}

.thrive-login-section .or-text {
    display: none !important;
}

/* Responsive Design for Login and Forgot Password */
@media (max-width: 768px) {
    .thrive-login-section .col-lg-6,
    .thrive-forgot-password-section .col-lg-6 {
        padding: 0 15px !important;
    }
}

#login-form .form-group.with-icon {
    position: relative !important;
}

#login-form .form-group.with-icon .password-input-wrapper {
    position: relative !important;
    display: block !important;
    width: 100% !important;
}

#login-form .form-group.with-icon input[type="password"],
#login-form .form-group.with-icon input[type="text"].password-textbox {
    padding-right: 45px !important;
    width: 100% !important;
}

#login-form .form-group.with-icon .jsShowPassword {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    color: #666 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    text-align: center !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

#login-form .form-group.with-icon .jsShowPassword:before {
    display: inline-block !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

#login-form .form-group.with-icon .jsShowPassword.icons {
    font-family: 'icomoon' !important;
}

#login-form .form-group.with-icon .jsShowPassword:hover {
    color: #333 !important;
    opacity: 1 !important;
}

#login-form .form-group.with-icon .jsShowPassword:active {
    opacity: 0.7 !important;
}

#login-form .form-group.with-icon .jsShowPassword .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

#login-form .form-group.with-icon .jsShowPassword:focus {
    outline: 2px solid #d19b42 !important;
    outline-offset: 2px !important;
    border-radius: 2px !important;
}

/* Dashboard link wrapper */
.dashboard-link-wrapper {
    margin-top: 30px !important;
}

/* Error messages - hidden by default, shown via JavaScript or validation */
.error-message {
    display: none !important;
    color: #dc3545 !important;
    font-size: 12px !important;
    margin-top: 5px !important;
    padding: 0 !important;
}

/* Error messages should be hidden by default, shown via JavaScript */
.error-message.show {
    display: block !important;
}

/* Login error container for server-side errors */
#login-error-container {
    display: block !important;
    padding: 12px 16px !important;
    margin-bottom: 20px !important;
    border-radius: 4px !important;
    background-color: #f8d7da !important;
    border: 1px solid #f5c6cb !important;
    color: #721c24 !important;
    font-size: 14px !important;
}

/* Navbar Logo Styles */
.navbar-brand {
    display: flex !important;
    align-items: center !important;
}

.navbar-brand .logo {
    display: block !important;
    max-height: 50px !important;
    width: auto !important;
    height: auto !important;
    max-width: 200px !important;
}

/* Screen reader only class */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border-width: 0 !important;
}

/* Accessibility improvements */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #d19b42 !important;
    outline-offset: 2px !important;
}

/* Semantic HTML improvements */
article {
    display: block;
}

nav[role="navigation"] ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Header Search Functionality - Catalogue Module Highlighting */
.catalogue-item.search-highlight {
    border: 2px solid #d19b42 !important;
    border-radius: 8px !important;
    box-shadow: 0 0 0 3px rgba(209, 155, 66, 0.2) !important;
    transition: all 0.3s ease !important;
}

.catalogue-item.search-highlight .catalogue-top h6,
.catalogue-item.search-highlight .catalogue-top p {
    color: #d19b42 !important;
    font-weight: 600 !important;
}

/* Search No Results Message */
.search-no-results {
    text-align: center !important;
    padding: 30px 20px !important;
    color: #666 !important;
    font-size: 16px !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    margin: 20px 0 !important;
    border: 1px solid #e9ecef !important;
}

.search-no-results strong {
    color: #333 !important;
    font-weight: 600 !important;
}

/* Hide catalogue items when filtered */
.catalogue-item-col[style*="display: none"] {
    display: none !important;
}
