/* =========================
   Course Header Layout
========================= */

.course-category-card{
    background:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:10px;
    padding:20px;
    height:100%;
    text-align:left;
    transition:all .3s ease;
    box-shadow:0 2px 8px rgba(0,0,0,0.05);
}

.course-category-card:hover{
    transform:translateY(-5px);
    box-shadow:0 8px 20px rgba(0,0,0,0.08);
}

.category-title{
    font-size:18px;
    /*font-weight:600;*/
    margin-bottom:8px;
    color:#1f2937;
}



.course-card-title{
    margin-top: 10px;
}

.category-description{
    font-size:14px;
    color:#6b7280;
    min-height:60px;
    margin-bottom:15px;
}

.category-meta{
    margin-bottom:15px;
}

.course-count{
    font-size:13px;
    background:#f3f4f6;
    padding:5px 10px;
    border-radius:20px;
    color:#374151;
}

.enter-btn{
    display:inline-block;
    padding:8px 16px;
    background:#006cb7;
    color:#fff;
    border-radius:6px;
    font-size:14px;
    text-decoration:none;
    transition:background .3s;
}

.enter-btn:hover{
    background:#006cb7;
    color:#fff;
}

.category-card-body
{
    margin-top: 15px;
    text-align: left;
}

.category-image img{
    width:100%;
    height:180px;
    object-fit:cover;
    border-radius:8px;
}

.sub-category-image{
    object-fit: cover;
    min-height: 23rem;
    max-height: 23rem;
}



/* Course details Page */

.course-header{
    margin-bottom:18px;
}

.course-meta{
    display:flex;
    align-items:center;
    /* justify-content:flex-start; */
    border:1px solid #e5e7eb;
    border-radius:6px;
    padding:12px 16px;
    background:#ffffff;
    gap:10px;
}

/* Each column */
.meta-item{
    display:flex;
    flex-direction:column;
    padding:0 18px;
    position:relative;
    text-align:left;
}

/* Column title */
.meta-item strong{
    font-size:11px;
    color:#9ca3af;
    margin-bottom:3px;
    text-transform:uppercase;
    letter-spacing:0.3px;
}

/* Column value */
.meta-item span{
    font-size:14px;
    font-weight:600;
    color:#374151;
}

/* Vertical separator lines */
.meta-item:not(:last-child)::after{
    content:'';
    position:absolute;
    right:0;
    top:5px;
    height:70%;
    width:1px;
    background:#e5e7eb;
}

/* =========================
   Progress Bar
========================= */

.progress-wrapper{
    min-width:200px;
}

.progress-flex{
    display:flex;
    align-items:center;
    gap:8px;
}

.progress-bar-container{
    width:120px;
    height:5px;
    background:#e5e7eb;
    border-radius:4px;
    overflow:hidden;
}

.progress-fill{
    height:100%;
    background:#2563eb;
}

.progress-percentage{
    font-size:12px;
    font-weight:600;
    color:#2563eb;
}

/* =========================
   Start Course Button
========================= */

.btn-wrapper{
    margin-left:0px;
    padding-left:15px;
}

/*.btn-wrapper a,*/
/*.btn-wrapper .course_button{*/
/*    display:inline-block;*/
/*    padding:7px 18px;*/
/*    background:#2563eb;*/
/*    color:#ffffff;*/
/*    border-radius:5px;*/
/*    font-size:12px;*/
/*    font-weight:600;*/
/*    text-transform:uppercase;*/
/*    text-decoration:none;*/
/*}*/

.btn-wrapper .course_button.full {
    display: inline-block;
    width: auto !important;   /* This overrides the 'full' class */
    min-width: 0;             /* Prevents any inherited minimum widths */
    padding: 7px 18px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border: none;             /* Clean up default input styling */
    cursor: pointer;
    padding: 10px !important;
}

.btn-wrapper a:hover,
.btn-wrapper .course_button:hover{
    background:#1e4ed8;
}

/* =========================
   Course Hero Image
========================= */

.course-hero img{
    width:100%;
    height:460px;
    object-fit:cover;
    border-radius:8px;
    margin-bottom:18px;
}

/* =========================
   Course Title
========================= */

.course-title{
    font-size:24px;
    font-weight:700;
    color:#111827;
    margin-bottom:12px;
    text-align: left;
}


/* Search widget container */

.search-widget{
    background:linear-gradient(135deg,#880b17,#880b17);
    border-radius:14px;
    padding:28px;
    color:#fff;
    margin-bottom:25px;
}

/* Title */

.search-widget h3{
    font-size:22px;
    font-weight:700;
    margin-bottom:20px;
    position:relative;
}

.search-widget h3::after{
    content:"";
    display:block;
    width:100%;
    height:2px;
    background:#880b17;
    margin-top:10px;
}

/* Search box */

.search-box{
    display:flex;
    flex-direction:column;
    gap:18px;
    background: #880b17;
    border: none;
}

/* Input wrapper */

.search-input-wrapper{
    position:relative;
}

/* Input */

.search-input-wrapper input{
    width:100%;
    padding:14px 40px 14px 0;
    border:none;
    border-bottom:2px solid #ffffff;
    background:transparent;
    color:#fff;
    font-size:15px;
    outline:none;
}

.search-input-wrapper input::placeholder{
    color:rgba(255,255,255,0.7);
}

/* Icon */

.search-icon{
    position:absolute;
    right:0;
    top:50%;
    transform:translateY(-50%);
    font-size:16px;
    opacity:0.9;
}

/* Button */

.search-box button{
    background:#6c050ff2;
    border:none;
    padding:14px;
    border-radius:10px;
    color:#fff;
    font-weight:600;
    font-size:14px;
    cursor:pointer;
    transition:all .3s ease;
}

.search-box button:hover{
    background:rgba(255,255,255,0.3);
}

.news-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.news-item img {
    width: 54px;
    height: 51px;
    border-radius: 5px;
}

.custom-course-page{
    padding:40px 0 60px;
}

.custom-course-page .course-container{
    width:min(1180px, calc(100% - 32px));
    display:flex;
    gap:32px;
    align-items:flex-start;
    margin:20px auto 0;
}

.custom-course-page main{
    flex:1 1 auto;
    min-width:0;
}

.custom-course-page aside{
    flex:0 0 320px;
    min-width:280px;
}

.custom-course-page .course-details{
    display:flex;
    gap:24px;
    align-items:flex-start;
}

.custom-course-page .course-description{
    flex:1 1 auto;
    min-width:0;
}

.custom-course-page .course-details > .course-info{
    flex:0 0 280px;
}

.custom-course-page aside .sidebar-widget{
    margin-top:0;
}

.custom-course-page aside .sidebar-widget + .sidebar-widget{
    margin-top:24px;
}

.custom-course-page .latest-course-list{
    list-style:none;
    padding:0;
    margin:0;
}

.custom-course-page .latest-news .course-info{
    flex:1 1 auto;
    min-width:0;
    background:transparent;
    padding:0;
    border-radius:0;
    color:inherit;
    font-size:inherit;
}

.custom-course-page .news-title{
    display:block;
    line-height:1.4;
    word-break:break-word;
}


/* Certificate Modal */
#certificateModal {
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    z-index:9999;
}

.certificate-overlay {
    position:absolute;
    width:100%; height:100%;
    background: rgba(0,0,0,0.7);
}

.certificate-box {
    position: relative;
    width: 90%;          /* Occupation of screen width */
    max-width: 900px;    /* Maximum size it will ever be */
    margin: 40px auto;   /* Centering */
    background: #fff;
    padding: 20px;
    z-index: 10;
    border-radius: 8px;  /* Optional: cleaner look */
}

.close-modal {
    position:absolute;
    right:15px;
    top:10px;
    cursor:pointer;
    font-size:22px;
}

.certificate-template {
    width: 100%;
    display: flex;
    justify-content: center;
}

.certificate-bg {
    position: relative;
    width: 100%;         /* Fill the modal width */
    
    /* This creates a 3:2 ratio (900x600). Change to 1.414 for A4 landscape */
    aspect-ratio: 3 / 2; 
    
    background-size: contain; /* Ensures the whole image is visible */
    background-position: center;
    background-repeat: no-repeat;
    
    /* Prevents the certificate from being taller than the viewport */
    max-height: 70vh; 
    margin: 0 auto;
}

/* Content positioning */
.cert-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    text-align: center;
}

/* Typography */
.cert-title {
    font-size: 26px;
    margin-bottom: 10px;
}

.cert-name {
    font-size: 32px;
    font-weight: bold;
    margin: 15px 0;
}

.cert-course {
    font-size: 20px;
}

.cert-date {
    margin-top: 20px;
}

.cert-signature-wrapper {
    display: flex;
    justify-content: center; /* Change to flex-end for right-aligned */
    margin-top: 30px;
}

.signature-block {
    width: 200px;
    text-align: center;
}

.signature-img {
    width: 120px; /* Adjust based on your image */
    height: auto;
    margin-bottom: -10px; /* Pulls the signature closer to the line */
}

.signature-line {
    border-bottom: 1px solid #000;
    margin-bottom: 5px;
}

.signer-name {
    font-weight: bold;
    font-size: 1.2cqi;
    margin: 0;
}

.signer-title {
    font-size: 1cqi;
    color: #555;
    margin: 0;
}

/* =========================
   Responsive
========================= */

@media(max-width:1199px){

    .custom-course-page .course-container{
        width:min(100%, calc(100% - 24px));
        gap:24px;
    }

    .custom-course-page aside{
        flex-basis:300px;
        min-width:260px;
    }

    .course-hero img{
        height:400px;
    }

    .custom-course-page .course-details > .course-info{
        flex-basis:240px;
    }
}

@media(max-width:900px){

    .course-meta{
        flex-wrap:wrap;
        gap:12px;
    }

    .meta-item{
        padding:0;
    }

    .meta-item:not(:last-child)::after{
        display:none;
    }

    .btn-wrapper{
        width:100%;
        margin-left:0;
    }

}

@media(max-width:991px){

    .custom-course-page{
        padding:32px 0 48px;
    }

    .custom-course-page .course-container,
    .custom-course-page .course-details{
        flex-direction:column;
    }

    .custom-course-page aside,
    .custom-course-page .course-details > .course-info{
        width:100%;
        min-width:0;
        flex-basis:auto;
    }

    .course-meta{
        padding:16px;
    }

    .meta-item{
        flex:1 1 calc(50% - 12px);
        min-width:220px;
    }
}

@media(max-width:767px){

    .custom-course-page .course-container{
        width:calc(100% - 20px);
        gap:20px;
    }

    .course-hero img{
        height:280px;
    }

    .course-title{
        font-size:22px;
    }

    .course-meta{
        flex-direction:column;
        align-items:stretch;
    }

    .meta-item,
    .progress-wrapper,
    .btn-wrapper{
        width:100%;
        min-width:0;
    }

    .progress-flex{
        width:100%;
    }

    .progress-bar-container{
        width:100%;
    }

    .btn-wrapper a,
    .btn-wrapper .course_button,
    .btn-wrapper .course_button a{
        width:100%;
        text-align:center;
    }

    .lesson{
        flex-direction:column;
        align-items:flex-start;
        gap:12px;
    }

    .lesson-left{
        width:100%;
    }

    .lesson-btn{
        width:100%;
        text-align:center;
    }

    .search-widget{
        padding:20px;
    }

    .search-widget h3{
        font-size:20px;
        margin-bottom:16px;
    }

    .search-box{
        gap:14px;
    }
}

@media(max-width:575px){

    .custom-course-page{
        padding:24px 0 40px;
    }

    .custom-course-page .course-container{
        width:calc(100% - 16px);
    }

    .course-hero img{
        height:220px;
    }

    .breadcrumbs{
        font-size:11px;
    }

    .course-description h3,
    .course-details > .course-info h3,
    .curriculum h3,
    .widget-title{
        font-size:18px;
    }

    .news-item{
        gap:12px;
        align-items:flex-start;
    }

    .news-item img{
        width:48px;
        height:48px;
    }

    .course-categories li{
        gap:12px;
    }
}

/* .category-action a {
    color: white;
    background: brown;
    padding: 5px;
    border-radius: 5px;
} */

@media (min-width: 1200px) {
    .container {
        padding-top: 0px !important;
    }
}
