/********** FJSC Template CSS **********/
:root {
    --primary: #006B3F;      /* Nigerian green */
    --secondary: #FFFFFF;
    --gold: #C9A84C;         /* Gold accent for judicial gravitas */
    --light: #F5F7F5;
    --dark: #1A2E1A;
    --text: #333333;
}

* { box-sizing: border-box; }

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text);
}

.fw-medium { font-weight: 500 !important; }
.fw-bold   { font-weight: 700 !important; }
.fw-black  { font-weight: 900 !important; }

.text-primary { color: var(--primary) !important; }
.text-gold    { color: var(--gold) !important; }
.bg-primary   { background-color: var(--primary) !important; }

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
    background: var(--primary);
    border-radius: 0;
}

.mytext-justify {
    text-align: justify;
    text-justify: inter-word;
}

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}
#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
    border-radius: 0;
}
.btn.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #FFFFFF;
}
.btn.btn-primary:hover {
    background-color: var(--dark);
    border-color: var(--dark);
}
.btn.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}
.btn.btn-outline-primary:hover {
    background-color: var(--primary);
    color: #fff;
}
.btn-square    { width: 38px; height: 38px; }
.btn-sm-square { width: 32px; height: 32px; }
.btn-lg-square { width: 48px; height: 48px; }
.btn-square, .btn-sm-square, .btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

/*** Topbar ***/
.topbar-item { font-size: 13px; }

/*** Navbar ***/
.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}
.navbar-light .navbar-nav .nav-link {
    margin-right: 20px;
    padding: 25px 0;
    color: var(--dark);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    outline: none;
}
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary);
}
@media (max-width: 991.98px) {
    .navbar-light .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }
    .navbar-light .navbar-nav { border-top: 1px solid #EEEEEE; }
}
.navbar-light .navbar-brand,
.navbar-light a.btn { height: 75px; }
.navbar-light.sticky-top {
    top: -100px;
    transition: .5s;
}
@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }
    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}

/*** Logo area ***/
.navbar-brand-logo {
    height: 55px;
    width: auto;
}
.navbar-brand-text h2 {
    font-size: 16px;
    line-height: 1.2;
    color: var(--primary);
    margin: 0;
    font-weight: 800;
}
.navbar-brand-text small {
    font-size: 10px;
    color: #666;
    display: block;
    letter-spacing: 0.5px;
}

/*** Hero Carousel ***/
@media (max-width: 768px) {
    .header-carousel .owl-carousel-item {
        position: relative;
        min-height: 500px;
    }
    .header-carousel .owl-carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .header-carousel .owl-carousel-item h5,
    .header-carousel .owl-carousel-item p { font-size: 14px !important; font-weight: 400 !important; }
    .header-carousel .owl-carousel-item h1 { font-size: 28px; font-weight: 600; }
}
.header-carousel .owl-nav {
    position: absolute;
    width: 200px;
    height: 45px;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
}
.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: transparent;
    border: 1px solid #FFFFFF;
    font-size: 22px;
    transition: .5s;
}
.header-carousel .owl-nav .owl-prev:hover,
.header-carousel .owl-nav .owl-next:hover {
    background: var(--primary);
    border-color: var(--primary);
}
.header-carousel .owl-dots {
    position: absolute;
    height: 45px;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 15px;
    height: 15px;
    background: transparent;
    border: 1px solid #FFFFFF;
    transition: .5s;
}
.header-carousel .owl-dot::after {
    position: absolute;
    content: "";
    width: 5px;
    height: 5px;
    top: 4px;
    left: 4px;
    background: transparent;
    border: 1px solid #FFFFFF;
}
.header-carousel .owl-dot.active {
    background: var(--primary);
    border-color: var(--primary);
}

/*** Page Header (inner pages) ***/
.page-header {
    background: linear-gradient(rgba(0, 50, 20, .85), rgba(0, 50, 20, .85)), url(../img/fjsc-front.webp) center center no-repeat;
    background-size: cover;
}
.breadcrumb-item + .breadcrumb-item::before { color: var(--gold); }
.breadcrumb-item a { color: var(--gold); }
.breadcrumb-item.active { color: #fff; }

/*** Section Title ***/
.section-title h1 {
    position: relative;
    display: inline-block;
    padding: 0 60px;
}
.section-title.text-start h1 { padding-left: 0; }
.section-title h1::before,
.section-title h1::after {
    position: absolute;
    content: "";
    width: 45px;
    height: 4px;
    bottom: 0;
    background: var(--gold);
}
.section-title h1::before { left: 0; }
.section-title h1::after  { right: 0; }
.section-title.text-start h1::before { display: none; }

/*** Stats Strip ***/
.stats-strip { background: var(--primary); }
.stats-strip .stat-item h2 { font-size: 2.5rem; font-weight: 800; }
.stats-strip .stat-item p  { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }

/*** About ***/
@media (min-width: 992px) {
    .container.about { max-width: 100% !important; }
    .about-text { padding-right: calc(((100% - 960px) / 2) + .75rem); }
}
@media (min-width: 1200px) {
    .about-text { padding-right: calc(((100% - 1140px) / 2) + .75rem); }
}
@media (min-width: 1400px) {
    .about-text { padding-right: calc(((100% - 1320px) / 2) + .75rem); }
}

/*** Function Cards ***/
.function-item {
    border-left: 4px solid var(--primary);
    background: #fff;
    padding: 25px 20px;
    transition: .3s;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    height: 100%;
}
.function-item:hover {
    border-left-color: var(--gold);
    box-shadow: 0 5px 25px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}
.function-item i { color: var(--primary); }
.function-item h5 { color: var(--dark); }

/*** Feature ***/
@media (min-width: 992px) {
    .container.feature { max-width: 100% !important; }
    .feature-text { padding-left: calc(((100% - 960px) / 2) + .75rem); }
}
@media (min-width: 1200px) {
    .feature-text { padding-left: calc(((100% - 1140px) / 2) + .75rem); }
}
@media (min-width: 1400px) {
    .feature-text { padding-left: calc(((100% - 1320px) / 2) + .75rem); }
}

/*** Departments ***/
.dept-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 20px;
    transition: .3s;
    text-align: center;
}
.dept-item:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}
.dept-item:hover i, .dept-item:hover h6 { color: #fff !important; }
.dept-item i { font-size: 2rem; color: var(--primary); margin-bottom: 10px; }

/*** Portfolio / Gallery ***/
#portfolio-flters li {
    display: inline-block;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    transition: .5s;
    border-bottom: 2px solid transparent;
    padding: 5px 0;
}
#portfolio-flters li:hover,
#portfolio-flters li.active {
    color: var(--primary);
    border-color: var(--primary);
}
.portfolio-item img { transition: .5s; }
.portfolio-item:hover img { transform: scale(1.1); }
.portfolio-item .portfolio-overlay {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0;
    height: 0;
    bottom: 0;
    left: 50%;
    background: rgba(0, 107, 63, .8);
    transition: .5s;
}
.portfolio-item:hover .portfolio-overlay { width: 100%; height: 100%; left: 0; }
.portfolio-item .portfolio-overlay .btn { opacity: 0; }
.portfolio-item:hover .portfolio-overlay .btn { opacity: 1; }

.member-badge {
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    padding: 3px 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/*** Team (Members) ***/
.team-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.team-item .overflow-hidden {
    height: 340px;
    background: #f0f4f1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.team-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
    transition: .5s;
    display: block;
}
.team-item:hover img { transform: scale(1.05); }
.team-item .text-center.border {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.team-item .team-social {
    position: absolute;
    width: 38px;
    top: 50%;
    left: -38px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    transition: .5s;
}
.team-item .team-social .btn { color: var(--primary); background: #FFFFFF; }
.team-item .team-social .btn:hover { color: #FFFFFF; background: var(--primary); }
.team-item:hover .team-social { left: 0; }

/*** Testimonial ***/
.testimonial-carousel::before {
    position: absolute; content: ""; top: 0; left: 0; height: 100%; width: 0;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    z-index: 1;
}
.testimonial-carousel::after {
    position: absolute; content: ""; top: 0; right: 0; height: 100%; width: 0;
    background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    z-index: 1;
}
@media (min-width: 768px) {
    .testimonial-carousel::before, .testimonial-carousel::after { width: 200px; }
}
@media (min-width: 992px) {
    .testimonial-carousel::before, .testimonial-carousel::after { width: 300px; }
}
.testimonial-carousel .owl-item .testimonial-text {
    border: 5px solid var(--light);
    transform: scale(.8);
    transition: .5s;
}
.testimonial-carousel .owl-item.center .testimonial-text { transform: scale(1); }
.testimonial-carousel .owl-nav {
    position: absolute;
    width: 350px;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
    z-index: 1;
}
.testimonial-carousel:hover .owl-nav { width: 300px; opacity: 1; }
.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    position: relative;
    color: var(--primary);
    font-size: 45px;
    transition: .5s;
}
.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover { color: var(--dark); }

/*** Contact form ***/
@media (min-width: 992px) {
    .container.contact { max-width: 100% !important; }
    .contact-text { padding-left: calc(((100% - 960px) / 2) + .75rem); }
}
@media (min-width: 1200px) {
    .contact-text { padding-left: calc(((100% - 1140px) / 2) + .75rem); }
}
@media (min-width: 1400px) {
    .contact-text { padding-left: calc(((100% - 1320px) / 2) + .75rem); }
}

/*** News/Announcements ***/
.news-item { border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 15px; }
.news-item:last-child { border-bottom: none; }
.news-date {
    background: var(--primary);
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 8px;
}

/*** Footer ***/
.footer {
    background: linear-gradient(rgba(10, 40, 20, .97), rgba(10, 40, 20, .97)), url(../img/fjsc-front.webp) center center no-repeat;
    background-size: cover;
}
.footer .btn.btn-social {
    margin-right: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    border: 1px solid #FFFFFF;
    transition: .3s;
    border-radius: 0;
}
.footer .btn.btn-social:hover { color: var(--gold); border-color: var(--gold); }
.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #ccc;
    font-size: 14px;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}
.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
    color: var(--gold);
}
.footer .btn.btn-link:hover { color: var(--gold); letter-spacing: 1px; box-shadow: none; }
.footer .copyright {
    padding: 25px 0;
    font-size: 14px;
    border-top: 1px solid rgba(256,256,256,.1);
    color: #aaa;
}
.footer .copyright a { color: var(--gold); }
.footer .copyright a:hover { color: #fff; }
.footer h4 { color: #fff; border-left: 3px solid var(--gold); padding-left: 10px; }

/*** Gold divider ***/
.gold-divider {
    width: 60px;
    height: 3px;
    background: var(--gold);
    margin: 10px 0 20px;
}

/*** Responsive image fixes ***/
img { max-width: 100%; }
