
/* Header */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

footer {
    flex-shrink: 0;
}

/* Enhanced Navbar Styling */
.navbar {
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.navbar-brand i {
    font-size: 1.8rem;
    vertical-align: middle;
}

.nav-link {
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
}

.nav-link.active {
    background: rgba(255,255,255,0.2);
}

/* Mobile Navigation */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .nav-item {
        margin: 0.5rem 0;
    }
    
    .nav-link {
        padding: 0.8rem 1.5rem;
        border-radius: 8px;
    }
}

/* Hero Carousel */
.carousel-item {
    height: 600px;
    background-color: #000;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    opacity: 0.7;
}

.carousel-caption {
    bottom: 50%;
    transform: translateY(50%);
}

/* Stats Section */
.stat-item {
    padding: 2rem;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
}

.counter {
    font-size: 2.5rem;
    font-weight: bold;
    color: #007bff;
}


/* Feature Cards */
.feature-card {
    padding: 2rem;
    border-radius: 10px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

/* Category Cards */
.category-card {
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    position: relative;
}

.category-card:hover {
    transform: translateY(-10px);
}

.category-card i {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}






/* Resources Hero Section */
.resources-hero {
    background: linear-gradient(45deg, #007bff, #0056b3);
    margin-top: -1.5rem;
}

/* Resource Cards */
.resource-card {
    border: none;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-preview {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.resource-card:hover .preview-overlay {
    opacity: 1;
}

.meta-info {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.rating {
    font-size: 0.8rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags .badge {
    font-weight: normal;
    padding: 0.5em 1em;
}

/* Empty State */
.text-muted {
    color: #6c757d !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.resource-card {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .resources-hero .row {
        row-gap: 1rem !important;
    }
    
    .meta-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/*----------- Collections or Channel */
.channel-card {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: block;
    text-decoration: none;
    color: inherit;
}

.channel-card:hover {
    transform: translateY(-10px);
}

.channel-header {
    height: 200px;
    overflow: hidden;
}

.channel-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.channel-body {
    padding: 1.5rem;
    background-color: #fff;
}

.channel-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.channel-description {
    color: #6c757d;
    margin-bottom: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.channel-stats {
    font-size: 0.9rem;
    color: #6c757d;
}

.channel-stats i {
    margin-right: 0.5rem;
}

.badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}



/* ----------- Thesis page ------------ */
.thesis-description {
    color: #6c757d;
    margin-bottom: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.thesis-card {
    border: none;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.thesis-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-preview {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-preview-portrait img {
    border: 3px solid #cecece;
    border-radius: 8px; 
    padding: 0px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.thesis-card:hover .card-preview-portrait img {
    border: 1px solid #686868;
    transform: scale(1.05);
}

.thesis-card:hover .card-preview img {
    transform: scale(1.05);
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.thesis-card:hover .preview-overlay {
    opacity: 1;
}

.preview-overlay .badge {
    font-size: 1rem;
    padding: 0.5rem;
}

.preview-overlay .btn {
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.thesis-card:hover .preview-overlay .btn {
    transform: translateY(0);
    opacity: 1;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: bold;
}

.meta-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #6c757d;
} 

/************* Project Cards Styling *******************/
/* Core Project Card Styles */
.khec-project-card, .gallery-item {
    border: none;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.khec-project-card {
    animation: fadeInUp 0.5s ease-out;
}

.khec-project-card:hover,
.gallery-item:hover,
.team-member-card:hover,
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.khec-project-image {
    height: 200px;
    object-fit: cover;
    border-top-left-radius: calc(0.375rem - 1px);
    border-top-right-radius: calc(0.375rem - 1px);
}

.khec-project-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.khec-project-card:hover .khec-project-hover-overlay {
    opacity: 1;
}

.khec-project-description {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Project Filter & Modal Styles */
.khec-project-modal .modal-dialog {
    margin: 1rem auto;
    max-width: 400px;
}

.khec-project-modal .modal-content {
    border-radius: 1rem;
    border: none;
}

.khec-project-modal .modal-body {
    padding: 1.5rem;
}

.khec-project-modal .form-control,
.khec-project-modal .form-select {
    height: 44px;
    border-radius: 0.5rem;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 0.625rem 1rem;
}

/* Project Modal Header Styles */
.project-modal-header {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7));
    min-height: 200px;
}

.project-header-bg {
    background-size: cover;
    background-position: center;
    filter: blur(5px);
    opacity: 0.5;
}

/* Navigation Styles */
.modal-navigation {
    padding: 1rem;
    z-index: 1020;
}

.modal-navigation .nav-link {
    color: #6c757d;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.modal-navigation .nav-link:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.modal-navigation .nav-link.active {
    background-color: #0d6efd;
    color: white;
}

/* Badge and Tag Styles */
.project-tags .badge {
    font-size: 0.8rem;
    padding: 0.5em 1em;
    margin-right: 0.5rem;
}

/* Timeline Styles */
.timeline-item {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 2rem;
    border-left: 2px solid #dee2e6;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #0d6efd;
    border: 2px solid white;
}

.timeline-item:last-child {
    border-left: none;
}

.timeline-date {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

/* Team Member Cards */
.team-member-card {
    transition: transform 0.3s ease;
}

.team-member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

/* Gallery Styles */
.gallery-item {
    cursor: pointer;
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
}

.image-caption {
    padding: 0.5rem;
    text-align: center;
}

/* Tech Stack Styles */
.tech-pill {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    display: inline-block;
    margin: 0.25rem;
    font-size: 0.875rem;
    color: #495057;
    transition: all 0.3s ease;
}

.tech-pill:hover {
    background: #0d6efd;
    color: white;
}

/* Award Styles */
.award-item {
    padding: 1rem;
    border-left: 4px solid #ffc107;
    background: #fff8e5;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
}

/* Stats Card Styles */
.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    border-radius: 1rem;
    text-align: center;
    padding: 1rem;
    transition: all 0.3s ease;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #0d6efd;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Challenge Cards */
.challenge-card {
    border-left: 4px solid #0d6efd;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

.challenge-card .solution {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #dee2e6;
}

/* List Items */
.list-group-item {
    border-left: 3px solid #0d6efd;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
}

/* Video Elements */
.video-thumbnail {
    position: relative;
    cursor: pointer;
    border-radius: 0.5rem;
    overflow: hidden;
}

.play-button {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
}

/* Project Sort */
.khec-project-sort {
    min-width: 140px;
    height: 44px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .khec-project-card .btn-outline-dark,
    .khec-project-card .btn-outline-primary {
        width: 44px;
        height: 44px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.5rem;
    }

    .khec-project-card .btn-outline-dark i,
    .khec-project-card .btn-outline-primary i {
        font-size: 1.25rem;
    }

    .khec-project-modal .modal-footer .btn {
        min-width: 100px;
        height: 44px;
    }
    
    .khec-project-container {
        padding-bottom: 70px;
    }
}

.video-container {
    background: #000;
    position: relative;
    width: 100%;
}

.video-container video {
    width: 100%;
    max-height: 70vh;
}

.ratio-16x9 {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.ratio-16x9 iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}