/********** Template CSS **********/
:root {
    --primary: #e64601;
    --secondary: #FDA21E;
    --light: #F6F7F8;
    --dark: #1A2A36;
}

.fw-medium {
    font-weight: 500 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-black {
    font-weight: 900 !important;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}


/*** 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;
}

.btn.btn-primary,
.btn.btn-outline-primary:hover {
    color: #FFFFFF;
}

.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;
}

/*** Navbar ***/
.navbar.sticky-top {
    top: -100px;
    transition: .5s;
    border-bottom: 1px solid #dee2e6;
}

.navbar .navbar-brand,
.navbar a.btn {
    height: 75px;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: var(--dark);
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

/*
 * Account dropdown: data-bs-popper="static" on .user-dropdown (navbar.php) avoids Popper translateX
 * that pushed the menu past the viewport and caused a horizontal scrollbar.
 * Width is capped to the viewport; labels may wrap on very small screens.
 */
.navbar .dropdown .user-dropdown.dropdown-menu {
    box-sizing: border-box;
    min-width: 0;
    width: max-content;
    max-width: min(18rem, calc(100vw - 0.75rem));
}

.user-dropdown .dropdown-item {
    white-space: normal;
    line-height: 1.35;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.navbar.idhika-user-account-nav,
.navbar.idhika-user-account-nav .container-fluid,
.navbar.idhika-user-account-nav .navbar-collapse {
    overflow-x: visible;
}

/* User dropdown: fixed-width icons so labels line up */
.user-dropdown .dropdown-item i.fa {
    display: inline-block;
    width: 1.25em;
    text-align: center;
    margin-right: 0.5rem;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link  {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        border-top: 1px solid #EEEEEE;
    }
}

@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;
    }
}


/*** Header ***/
/* Masthead: 100vh height, minimum 600px when viewport is shorter */
.header-carousel .owl-item {
    height: 100vh;
    min-height: 600px;
}

.header-carousel .owl-carousel-item.masthead-slide {
    height: 100%;
    min-height: 100%;
}

.header-carousel .masthead-slide-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.header-carousel .masthead-slide-video iframe,
.header-carousel .masthead-slide-video video {
    object-fit: cover;
}

/* Overlay behind text: black 30% so text stays readable on any image */
.owl-carousel-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, .3);
}

@media (max-width: 768px) {
    .header-carousel .owl-carousel-item p {
        font-size: 16px !important;
    }
}

.header-carousel .owl-dots {
    position: absolute;
    width: 60px;
    height: 100%;
    top: 0;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-carousel .owl-dots .owl-dot {
    position: relative;
    width: 45px;
    height: 45px;
    margin: 5px 0;
    background: #FFFFFF;
    box-shadow: 0 0 30px rgba(255, 255, 255, .9);
    border-radius: 45px;
    transition: .5s;
}

.header-carousel .owl-dots .owl-dot.active {
    width: 60px;
    height: 60px;
}

.header-carousel .owl-dots .owl-dot img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 2px;
    border-radius: 45px;
    transition: .5s;
}

.page-header {
    background: linear-gradient(rgba(0, 0, 0, .1), rgba(0, 0, 0, .1)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--light);
}


/*** 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);
    }
}


/*** Service ***/
.service-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
}

.service-icon {
    position: relative;
    margin: -50px 0 25px 0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #FFFFFF;
    border-radius: 100px;
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    transition: .5s;
}

.service-item:hover .service-icon {
    color: #FFFFFF;
    background: var(--primary);
}


/*** 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);
    }
}


/*** Project Portfolio ***/
#portfolio-flters li {
    display: inline-block;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    transition: .5s;
    border-bottom: 2px solid transparent;
}

#portfolio-flters li:hover,
#portfolio-flters li.active {
    color: var(--primary);
    border-color: var(--primary);
}

.portfolio-img {
    position: relative;
}

/* .portfolio-img::before,
.portfolio-img::after {
    position: absolute;
    content: "";
    width: 0;
    height: 100%;
    top: 0;
    background: var(--dark);
    transition: .5s;
}

.portfolio-img::before {
    left: 50%;
}

.portfolio-img::after {
    right: 50%;
}

.portfolio-item:hover .portfolio-img::before {
    width: 51%;
    left: 0;
}

.portfolio-item:hover .portfolio-img::after {
    width: 51%;
    right: 0;
} */
/* .portfolio-item{
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    margin: 10px !important;
    box-sizing: border-box;
} */
.portfolio-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 1;
    transition: .5s;
}

.portfolio-item:hover .portfolio-btn {
    opacity: 1;
    transition-delay: .3s;
}


/*** Quote ***/
@media (min-width: 992px) {
    .container.quote {
        max-width: 100% !important;
    }

    .quote-text  {
        padding-right: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .quote-text  {
        padding-right: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .quote-text  {
        padding-right: calc(((100% - 1320px) / 2) + .75rem);
    }
}


/*** Team ***/
.team-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
}

.team-item img {
    border-radius: 8px 60px 0 0;
}

.team-item .team-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    background: #FFFFFF;
    transition: .5s;
}


/*** 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;
}

.bg-light .testimonial-carousel::before {
    background: linear-gradient(to right, rgba(246, 247, 248, 1) 0%, rgba(246, 247, 248, 0) 100%);
}

.bg-light .testimonial-carousel::after {
    background: linear-gradient(to left, rgba(246, 247, 248, 1) 0%, rgba(246, 247, 248, 0) 100%);
}

@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-nav {
    position: absolute;
    width: 350px;
    top: 20px;
    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);
}

.testimonial-carousel .testimonial-img img {
    width: 100px;
    height: 100px;
}

.testimonial-carousel .testimonial-img .btn-square {
    position: absolute;
    bottom: -19px;
    left: 50%;
    transform: translateX(-50%);
}

.testimonial-carousel .owl-item .testimonial-text {
    margin-bottom: 30px;
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    transform: scale(.8);
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text {
    transform: scale(1);
}


/*** Contact ***/
.contact-map-embed {
    position: relative;
}

.contact-map-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@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);
    }
}


/*** Footer ***/
.footer .btn.btn-social {
    margin-right: 5px;
    color: #FFFFFF;
    border: 1px solid #FFFFFF;
    border-radius: 38px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--primary);
    border-color: var(--light);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #9B9B9B;
    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;
}

.footer .btn.btn-link:hover {
    color: #FFFFFF;
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    padding: 25px 0;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--light);
}

.footer .copyright a:hover {
    color: var(--primary);
}

/* User modals: top-aligned, 30px inset top & bottom from viewport (breathing room, never flush to edges) */
/* Stack above sticky .app-bottom-nav (z-index: 2000 in footer) so footer buttons are never covered */
.modal-backdrop {
    z-index: 2040 !important;
}
.user-modal.modal {
    align-items: flex-start !important;
    padding-top: 30px;
    padding-bottom: 30px;
    z-index: 2050 !important;
    /* If the shell is shorter than the modal, allow the overlay to scroll so footers stay reachable */
    overflow-y: auto !important;
}
.user-modal .modal-dialog {
    /* Padding on .user-modal already gives 30px from top; don’t add a second margin here (was clipping footers) */
    margin: 0 auto !important;
    align-self: flex-start !important;
    max-height: calc(100vh - 60px);
    /* Bootstrap .modal-dialog-centered sets a large min-height; that can cancel max-height and clip footers */
    min-height: 0 !important;
    display: flex;
    flex-direction: column;
}
.user-modal .modal-content {
    max-height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.user-modal .modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

/*
 * Global modals: keep within viewport (30px + 30px inset) and make the body the scroll region.
 * When a <form> wraps header/body/footer, the form must be a flex column too or the footer clips.
 */
.modal .modal-header,
.modal .modal-footer {
    flex-shrink: 0;
}
.modal .modal-dialog {
    max-height: calc(100vh - 60px);
    min-height: 0 !important;
    display: flex;
    flex-direction: column;
}
.modal .modal-content {
    max-height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal .modal-content > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}
.modal .modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

/* Add Payment: status line opens the same terms modal as the link above */
.payment-terms-status-row {
    cursor: pointer;
    width: fit-content;
    max-width: 100%;
    padding: 0.15rem 0.25rem;
    margin: 0 -0.25rem;
    border-radius: 0.25rem;
}
.payment-terms-status-row:hover #termsAcceptStatusText,
.payment-terms-status-row:focus-visible #termsAcceptStatusText {
    text-decoration: underline;
}
.payment-terms-status-row:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Tighter form spacing in user modals on mobile */
@media (max-width: 767.98px) {
    .user-modal .modal-body {
        padding: 0.75rem 1rem;
    }
    .user-modal .modal-body .mb-3 {
        margin-bottom: 0.5rem !important;
    }
    .user-modal .modal-body .form-label {
        margin-bottom: 0.25rem;
        font-size: 0.9rem;
    }
    .user-modal .modal-header {
        padding: 0.5rem 1rem;
    }
    .user-modal .modal-footer {
        padding: 0.5rem 1rem;
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }
    /* First / last name side-by-side: slightly tighter labels */
    .user-modal .team-modal-name-row .form-label {
        font-size: 0.82rem;
    }
    .user-modal .modal-body .small,
    .user-modal .modal-body .text-muted {
        font-size: 0.8rem;
        margin-top: 0.25rem;
    }
}

/* Mission / Target / Vision blocks */
.mtv-box {
    background: #ffffff;
    border-radius: 16px;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    text-align: center;
    border-bottom: 10px solid var(--mtv-accent, var(--primary));
}

.mtv-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mtv-icon {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    border: 3px solid var(--mtv-accent, var(--primary));
    padding: 14px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mtv-accent, var(--primary));
    background: rgba(0, 0, 0, 0.02);
}

.mtv-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mtv-heading {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
}

.mtv-text {
    margin: 0;
    color: rgba(0, 0, 0, 0.6);
    flex: 1 1 auto;
    text-align: center;
}

/* Accent colors (managed from CSS) */
.mtv-1 { --mtv-accent: var(--primary); }
.mtv-2 { --mtv-accent: var(--secondary); }
.mtv-3 { --mtv-accent: var(--primary); }

@media (max-width: 767.98px) {
    .mtv-box {
        padding: 1rem;
    }
    .mtv-heading {
        font-size: 1.05rem;
        margin-top: 0.9rem;
    }
    .mtv-icon {
        width: 56px;
        height: 56px;
        padding: 12px;
    }

    .mtv-icon img {
        width: 100%;
        height: 100%;
    }
}

/* Desktop spacing: bigger gaps between the 3 blocks */
@media (min-width: 768px) {
    .mission-target-vision-wrap .row {
        --bs-gutter-x: 40px;
        --bs-gutter-y: 40px;
    }
}

.tree-programs-section-head .tree-programs-small-heading {
    font-weight: 600;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}
.tree-programs-section-head .tree-programs-main-heading {
    font-weight: 700;
}

.tree-programs-section-download {
    font-weight: 600;
}

/*** Venture project page: full-bleed slogan (break out of .container) ***/
.venture-project-slogan {
    background-color: var(--primary);
    color: #fff;
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
}

.venture-project-slogan .container {
    position: relative;
}


/*--------------------------------------------------------------
# Recent Posts Section
--------------------------------------------------------------*/
.recent-posts article {
    background: var(--surface-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 30px;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
  }
  
  .recent-posts .post-img {
    max-height: 240px;
    margin: -30px -30px 15px -30px;
    overflow: hidden;
  }
  
  .recent-posts .post-category {
    font-size: 16px;
    color: color-mix(in srgb, var(--default-color), transparent 50%);
    margin-bottom: 10px;
  }
  
  .recent-posts .title {
    font-size: 20px;
    font-weight: 700;
    padding: 0;
    margin: 0 0 20px 0;
  }
  
  .recent-posts .title a {
    color: var(--heading-color);
    transition: 0.3s;
  }
  
  .recent-posts .title a:hover {
    color: var(--accent-color);
  }
  
  .recent-posts .post-author-img {
    width: 50px;
    border-radius: 50%;
    margin-right: 15px;
  }
  
  .recent-posts .post-author {
    font-weight: 600;
    margin-bottom: 5px;
  }
  
  .recent-posts .post-date {
    font-size: 14px;
    color: color-mix(in srgb, var(--default-color), transparent 50%);
    margin-bottom: 0;
  }

/* Venture cards (projects grid uses same .recent-posts article layout) */
.portfolio-container.recent-posts .post-img img {
    display: block;
    width: 100%;
    object-fit: cover;
    min-height: 200px;
}

/* Commissions page: summary tabs — primary glow, inactive very light gray, content white */
.commissions-summary-tabs.card {
    /* Primary-tinted glow (rgba matches default --primary #e64601) */
    box-shadow:
        0 4px 28px rgba(230, 70, 1, 0.16),
        0 2px 10px rgba(0, 0, 0, 0.06);
    border-radius: 10px;
}

@supports (color: color-mix(in srgb, red, blue)) {
    .commissions-summary-tabs.card {
        box-shadow:
            0 4px 28px color-mix(in srgb, var(--primary), transparent 78%),
            0 2px 10px rgba(0, 0, 0, 0.06);
    }
}

.commissions-summary-tabs .commissions-summary-tab-content {
    background-color: #fff !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.commissions-summary-tabs .nav-tabs {
    border-bottom: 0;
    background-color: #f3f4f6;
}

.commissions-summary-tabs .nav-link {
    border: 0;
    border-radius: 0;
    color: var(--heading-color, #333);
    background-color: #f3f4f6;
    margin-bottom: 0;
}

/* Thin separator between tab headings (not after last tab) */
.commissions-summary-tabs .nav-item:not(:last-child) .nav-link {
    border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.commissions-summary-tabs .nav-item:not(:last-child) .nav-link.active {
    border-right-color: rgba(255, 255, 255, 0.35);
}

.commissions-summary-tabs .nav-link:hover:not(.active) {
    background-color: #e8eaed;
    color: var(--primary);
}

.commissions-summary-tabs .nav-link.active {
    background-color: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

.commissions-summary-tabs .nav-link.active:hover,
.commissions-summary-tabs .nav-link.active:focus {
    background-color: var(--primary) !important;
    color: #fff !important;
}

.commissions-summary-tabs .nav-link:focus-visible {
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary), transparent 65%);
    outline: 0;
}

/* Dashboard: section titles sit above stat cards with clear gap (not flush with tab bar) */
.dashboard-stats-grid > [class*="col-"] {
    min-width: 0;
}

.dashboard-stats-grid .dashboard-stat-title {
    display: block;
    line-height: 1.4;
    flex-shrink: 0;
}

.dashboard-stats-grid .commissions-summary-tabs.card {
    flex-shrink: 0;
}

/*
 * Member area navbar: public website links + mobile burger are hidden via PHP in includes/navbar.php
 * ($is_user_account_area when $current_page starts with "user-"). Classes: .idhika-user-account-nav,
 * .idhika-navbar-public-links, toggler gets .d-none. To show the menu again on account pages, edit navbar.php.
 */