/********** Template CSS **********/
:root {
    --primary: #6244C5;
    --secondary: #FFE720;
    --light: #FAFAFB;
    --dark: #12141D;
}

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

.my-6 {
    margin-top: 6rem;
    margin-bottom: 6rem;
}

.py-6 {
    padding-top: 6rem;
    padding-bottom: 6rem;
}


/*** 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-secondary {
    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.fixed-top {
    display: none;
    transition: .5s;
}

.navbar .navbar-nav .nav-link {
    padding: 20px 15px;
    color: var(--dark);
    font-size: 18px;
    font-weight: 600;
    outline: none;
}

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

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


/*** Header ***/
.hero-img {
    background-color: var(--light);
    border-radius: 10px;
}
#home {
    margin-bottom: 6rem;
    background: url(../img/bg-header.png) left top no-repeat;
}

.typed-cursor {
    font-size: 30px;
    color: var(--dark);
}

.btn-play {
    position: relative;
    display: block;
    box-sizing: content-box;
    width: 16px;
    height: 26px;
    border-radius: 100%;
    border: none;
    outline: none !important;
    padding: 18px 20px 20px 28px;
    background: var(--primary);
}

.btn-play:before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 100%;
    animation: pulse-border 1500ms ease-out infinite;
}

.btn-play:after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: #FFFFFF;
    border-radius: 100%;
    transition: all 200ms;
}

.btn-play span {
    display: block;
    position: relative;
    z-index: 3;
    width: 0;
    height: 0;
    left: -1px;
    border-left: 16px solid var(--primary);
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
}

@keyframes pulse-border {
    0% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(2);
        opacity: 0;
    }
}

.modal-video .modal-dialog {
    position: relative;
    max-width: 800px;
    margin: 60px auto 0 auto;
}

.modal-video .modal-body {
    position: relative;
    padding: 0px;
}

.modal-video .close {
    position: absolute;
    width: 30px;
    height: 30px;
    right: 0px;
    top: -30px;
    z-index: 999;
    font-size: 30px;
    font-weight: normal;
    color: #FFFFFF;
    background: #000000;
    opacity: 1;
}


/*** About ***/
#about .years .display-1 {
    font-size: 10rem;
    line-height: 9rem;
}

#about .years h5 {
    letter-spacing: 30px;
    margin-right: -30px;
}


/*** Skills ***/
#skill .progress {
    height: 5px;
    border-radius: 5px;
}

#skill .progress .progress-bar {
    width: 0px;
    border-radius: 5px;
    transition: 3s;
}

#skill .nav-pills .nav-link {
    color: var(--dark);
}

#skill .nav-pills .nav-link.active {
    color: #FFFFFF;
}

#skill .tab-content hr {
    width: 30px;
}


/*** Service ***/
.service-item .bg-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url(../img/bg-icon.png) center center no-repeat;
    background-size: cover;
}


/*** Project Portfolio (legacy filter grid) ***/
#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-btn {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(98, 68, 197, .9);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 30px;
    padding-bottom: 100px !important;
    opacity: 0;
    transition: .5s;
}

.portfolio-item:hover .portfolio-btn {
    opacity: 1;
    padding-bottom: 30px !important;
}


/*** Team ***/
.team-item img {
    transition: .5s;
}

.team-item:hover img {
    opacity: .7;
}

.team-item .team-text {
    position: absolute;
    left: 0;
    right: 60px;
    bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
}

.team-item:hover .team-text {
    right: 30px;
    opacity: 1;
}

.team-item .team-text div {
    transition: .5s;
}

.team-item:hover .team-text div {
    margin-left: 30px;
}


/*** Testimonial ***/
.testimonial-left,
.testimonial-right {
    position: relative;
}

.testimonial-left img,
.testimonial-right img {
    position: absolute;
    padding: 5px;
    border: 1px solid var(--secondary);
    border-radius: 70px;
}

.testimonial-left img:nth-child(1),
.testimonial-right img:nth-child(3) {
    width: 70px;
    height: 70px;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.testimonial-left img:nth-child(2),
.testimonial-right img:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
}

.testimonial-left img:nth-child(3),
.testimonial-right img:nth-child(1) {
    width: 50px;
    height: 50px;
    bottom: 10%;
    right: 10%;
}

.testimonial-carousel .owl-item img {
    width: 120px;
    height: 120px;
}

.testimonial-carousel .testimonial-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border: 1px solid var(--secondary);
    border-radius: 60px;
}

.testimonial-carousel .owl-dots {
    height: 40px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 30px;
    height: 30px;
    background: #FFFFFF;
    border: 2px solid var(--secondary);
    border-radius: 30px;
    transition: .5s;
}

.testimonial-carousel .owl-dot::after {
    position: absolute;
    content: "";
    width: 16px;
    height: 16px;
    top: 5px;
    left: 5px;
    border-radius: 16px;
    background: var(--secondary);
    transition: .5s;
}

.testimonial-carousel .owl-dot.active::after {
    background: var(--primary);
}


/* ============================================
   EXPERIENCE LOGO
   ============================================ */
.exp-logo {
    height: 24px;
    width: auto;
    vertical-align: middle;
}


/* ============================================
   BASE PROJECT CARD
   Shared by major-grid, minor-grid, and the
   legacy #projects-grid.
   ============================================ */
.project-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(98, 68, 197, 0.12);
}

.project-img {
    position: relative;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
    display: block;
}

.project-card:hover .project-img img {
    transform: scale(1.03);
}

.project-card .p-3 {
    flex: 1 0 auto;
}

/* Small tweaks for buttons inside cards */
.project-card .btn {
    margin-top: 8px;
}


/* ============================================
   MAJOR PROJECTS GRID — 3 equal columns
   ============================================ */
.major-grid .project-card {
    height: 480px;
}

.major-grid .project-img {
    height: 58%;
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
}

.major-grid .project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.major-grid .project-card:hover .project-img img {
    transform: scale(1.03);
}

/* carousel inside major card */
.major-grid .project-img .carousel,
.major-grid .project-img .carousel-inner,
.major-grid .project-img .carousel-item {
    height: 100%;
}

.major-grid .project-img .carousel-item img {
    height: 100%;
    object-fit: cover;
}

/* text area */
.major-grid .p-3 {
    flex: 1 1 auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Truncate long descriptions */
.major-grid .p-3 .small.text-muted {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 991.98px) {
    .major-grid .project-card {
        height: auto;
    }
    .major-grid .project-img {
        height: 220px;
    }
    .major-grid .p-3 .small.text-muted {
        -webkit-line-clamp: unset;
    }
}


/* ============================================
   MINOR PROJECTS GRID
   ============================================ */
.minor-grid .small-card {
    display: flex;
    flex-direction: column;
    height: 280px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}

.minor-grid .small-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(98, 68, 197, 0.12);
}

.minor-grid .small-card .project-img {
    height: 140px;
    overflow: hidden;
    flex-shrink: 0;
}

.minor-grid .small-card .project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.minor-grid .small-card:hover .project-img img {
    transform: scale(1.04);
}

.minor-grid .p-3 {
    flex: 1 0 auto;
}

@media (max-width: 575.98px) {
    .minor-grid .small-card {
        height: auto;
    }
    .minor-grid .small-card .project-img {
        height: 160px;
    }
}


/* ============================================
   LEGACY #projects-grid
   ============================================ */
#projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#projects-grid .project-card {
    background: #FAFAFA;
    border: 2px solid #000;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 240px;
}

#projects-grid .project-img {
    flex: 1 1 auto;
    position: relative;
    overflow: hidden;
}

#projects-grid .project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#projects-grid .project-card .p-3 {
    flex: 0 0 auto;
    background: #FAFAFA;
}

@media (min-width: 992px) {
    #projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ============================================
   VIDEO WRAPPER & CONTROLS
   ============================================ */
.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}

.video-controls {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 10;
}

.video-controls input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    flex: 1 1 auto;
    cursor: pointer;
}

.video-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.video-controls input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
}

/* Play/Pause + Fullscreen buttons in control bar */
.video-controls .btn {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.35);
    font-size: 0.75rem;
    padding: 3px 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.video-controls .btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

@media (max-width: 575.98px) {
    .video-controls {
        left: 8px;
        right: 8px;
        bottom: 8px;
    }
}


/* ============================================
   FULLSCREEN BUTTONS — videos & carousel
   ============================================ */

/* Fullscreen button that lives inside .video-controls */
.video-controls .video-fs-btn {
    padding: 3px 8px;
    line-height: 1;
    flex-shrink: 0;
}

/* Fullscreen button that sits over the EduStake carousel */
.project-img > .media-fs-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 28px;
    background: rgba(0, 0, 0, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: background .2s, border-color .2s;
    /* Override any inherited Bootstrap .btn styles */
    padding: 0;
}

.project-img > .media-fs-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Fullscreen: make .video-wrapper fill the screen */
.video-wrapper:fullscreen,
.video-wrapper:-webkit-full-screen,
.video-wrapper:-moz-full-screen,
.video-wrapper:-ms-fullscreen {
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-wrapper:fullscreen video,
.video-wrapper:-webkit-full-screen video,
.video-wrapper:-moz-full-screen video,
.video-wrapper:-ms-fullscreen video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Keep video controls visible over the fullscreen video */
.video-wrapper:fullscreen .video-controls,
.video-wrapper:-webkit-full-screen .video-controls,
.video-wrapper:-moz-full-screen .video-controls,
.video-wrapper:-ms-fullscreen .video-controls {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    z-index: 9999;
}

/* Fullscreen: make EduStake .project-img fill the screen */
.project-img:fullscreen,
.project-img:-webkit-full-screen,
.project-img:-moz-full-screen,
.project-img:-ms-fullscreen {
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
}

.project-img:fullscreen .carousel,
.project-img:fullscreen .carousel-inner,
.project-img:fullscreen .carousel-item,
.project-img:-webkit-full-screen .carousel,
.project-img:-webkit-full-screen .carousel-inner,
.project-img:-webkit-full-screen .carousel-item {
    height: 100%;
}

.project-img:fullscreen .carousel-item img,
.project-img:-webkit-full-screen .carousel-item img {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

/* Keep the EduStake fullscreen button visible in fullscreen */
.project-img:fullscreen > .media-fs-btn,
.project-img:-webkit-full-screen > .media-fs-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}