/* ===================================
   Global Styles
   =================================== */
:root {
    --primary-color: #112c5b;
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --white-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

/* ===================================
   Navigation
   =================================== */
.navbar,
.navbar-dark,
.navbar.fixed-top,
nav.navbar {
    padding: 0.8rem 0 !important;
    transition: all 0.3s ease;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
}

.navbar::before,
.navbar::after {
    display: none !important;
}

.navbar .container {
    background: transparent !important;
}

/* Scrolled state - compact navbar */
.navbar.scrolled {
    padding: 0.3rem 0 !important;
    background: rgba(52, 58, 64, 0.98) !important;
    background-color: rgba(52, 58, 64, 0.98) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

.navbar-brand {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

/* Hide logo and tagline when scrolled */
.navbar.scrolled .logo-img,
.navbar.scrolled .affiliate-text {
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.logo-img {
    height: 115px;
    /* width: 50%; */
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border-radius: 50%;
    object-fit: cover;
    background-color: white;
}

.affiliate-text {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    text-align: center;
    line-height: 1.3;
    max-width: 220px;
    display: block;
    transition: all 0.3s ease;
}

.navbar-nav {
    align-items: center;
}

.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.6rem 0.9rem !important;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #ffffff !important;
}

.navbar-nav .dropdown-toggle::after {
    margin-left: 0.4em;
    vertical-align: 0.15em;
}

.dropdown-menu {
    background-color: rgba(52, 58, 64, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0;
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* ===================================
   Hero Slider Section
   =================================== */
.hero-slider-section {
    position: relative;
    padding-top: 0;
    margin-top: 0;
}

#heroCarousel {
    height: 100vh;
    min-height: 600px;
}

.carousel-inner {
    height: 100%;
}

.carousel-item {
    height: 100%;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.carousel-caption-custom {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 2;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
}

.btn-hero {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #00d9ff;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-hero:hover {
    background-color: #00d9ff;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.5);
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: rgba(0, 191, 255, 0.6);
    opacity: 1;
}

.carousel-control-prev {
    left: 30px;
}

.carousel-control-next {
    right: 30px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 30px;
    height: 30px;
}

/* Carousel Indicators */
.carousel-indicators {
    bottom: 30px;
    z-index: 3;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background-color: #00bfff;
    border-color: #ffffff;
    transform: scale(1.2);
}

/* Carousel Fade Effect */
.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

/* Animations */
.animate-fade-in {
    animation: fadeInUp 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeInUp 1.2s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 1.2s ease-out 0.6s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Carousel Item Content Animation */
.carousel-item.active .hero-title {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.carousel-item.active .hero-description {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.carousel-item.active .btn-hero {
    animation: fadeInUp 0.8s ease-out 0.9s both;
}

/* ===================================
   About Section
   =================================== */
.about-section {
    padding: 100px 0;
}

.about-section img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-section .section-title::after {
    left: 0;
    transform: translateX(0);
}

/* About section: multi-line title layout */
.section-title-about {
    line-height: 1.25;
}

.section-title-about br {
    display: block;
}

/* Key Personnel statement */
.personnel-statement {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}
/* Mission & Vision Cards */
.mission-vision-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 40px 35px;
    box-shadow: 0 10px 40px rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.mission-vision-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #112c5b 0%, #0056b3 100%);
    transition: width 0.4s ease;
    pointer-events: none;
}

.mission-vision-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 123, 255, 0.2);
    border-color: rgba(0, 123, 255, 0.3);
}

.mission-vision-card:hover::before {
    width: 100%;
    opacity: 0.05;
}

.mission-vision-card .card-icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #112c5b 0%, #0056b3 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

.mission-vision-card .card-icon-wrapper i {
    font-size: 32px;
    color: #ffffff;
}

.mission-vision-card .card-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #112c5b;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.mission-vision-card .card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #112c5b 0%, transparent 100%);
}

.mission-vision-card .card-content {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.8;
}

.mission-vision-card .card-content strong {
    color: #112c5b;
    font-weight: 600;
}

.mission-vision-card .card-content p {
    margin-bottom: 15px;
}

/* Mission List Styling */
.mission-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mission-list li {
    padding-left: 0;
    margin-bottom: 20px;
    position: relative;
}

.mission-list li:last-child {
    margin-bottom: 0;
}

.mission-list li::before {
    content: '•';
    color: #112c5b;
    font-weight: bold;
    font-size: 1.5rem;
    margin-right: 10px;
}
/* ===================================
   Projects Section
   =================================== */
.projects-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #f8f9fc 0%, #f0f2f7 100%);
}

.projects-section-header {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.projects-section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 250px;
}

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

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

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

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay h5 {
    margin: 0;
    font-size: 1.2rem;
}

/* ===================================
   Stats Section
   =================================== */
.stats-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.stats-section .container {
    position: relative;
    z-index: 2;
}

.stat-item {
    padding: 30px;
    transition: transform 0.3s ease;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin: 10px 0;
}

/* ===================================
   Testimonials Section
   =================================== */
.testimonials-section {
    padding: 100px 0;
}

.testimonial-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    font-style: italic;
}

.testimonial-author {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.testimonial-position {
    font-size: 0.9rem;
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev {
    left: -70px;
}

.carousel-control-next {
    right: -70px;
}

/* ===================================
   Clients Section
   =================================== */
.clients-section {
    padding: 100px 0;
}

.client-logo-placeholder {
    padding: 50px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.client-logo-placeholder:hover {
    background: #e9ecef;
    transform: scale(1.05);
}

/* ===================================
   Clientele Section - Single row sliding loop
   =================================== */
.clientele-section {
    padding: 80px 0;
    overflow: hidden;
}

.clientele-slider {
    overflow: hidden;
    margin: 0 -15px;
}

.clientele-slider-track {
    display: flex;
    width: max-content;
    gap: 0;
    animation: clienteleScroll 35s linear infinite;
}

.clientele-slider-track:hover {
    animation-play-state: paused;
}

@keyframes clienteleScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.clientele-slide {
    flex: 0 0 auto;
    width: 300px;
    padding: 0 12px;
}

.clientele-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem 1.25rem;
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.clientele-card:hover {
    box-shadow: 0 8px 28px rgba(17, 44, 91, 0.12);
    transform: translateY(-4px);
}

.clientele-card-logo {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.clientele-card-logo img {
    max-width: 140px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.clientele-card-logo--dark {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

.clientele-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.35rem;
}

.clientele-card-desc {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .clientele-slide {
        width: 260px;
        padding: 0 8px;
    }

    .clientele-card {
        min-height: 180px;
        padding: 1.25rem 1rem;
    }

    .clientele-card-logo {
        height: 70px;
    }

    .clientele-card-logo img {
        max-width: 120px;
        max-height: 60px;
    }

    .clientele-slider-track {
        animation-duration: 28s;
    }
}

/* Clientele grid: 5 equal columns (no slider) - even layout */
#clientele .clientele-grid .card.clientele-card {
    padding: 0;
}

#clientele .clientele-grid .clientele-card-logo {
    min-height: 90px;
    width: 100%;
}

#clientele .clientele-grid .clientele-card-logo--dark {
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    #clientele .clientele-grid .clientele-card-logo {
        min-height: 80px;
    }
}

/* ===================================
   Contact Section
   =================================== */
.contact-section {
    padding: 100px 0;
    background: #1a1a1a;
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    height: 100%;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.flag-icon {
    width: 60px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: #000;
    border-top: 3px solid var(--primary-color);
}

.footer a {
    transition: all 0.3s ease;
}

.footer a:hover {
    opacity: 0.7;
    transform: translateY(-3px);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 992px) {
    .logo-img {
        height: 70px;
    }

    .affiliate-text {
        font-size: 0.65rem;
        max-width: 180px;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    .navbar-nav {
        align-items: flex-start;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 1rem !important;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 50px;
        height: 50px;
    }

    .carousel-control-prev {
        left: 15px;
    }

    .carousel-control-next {
        right: 15px;
    }
}

@media (max-width: 768px) {
    .logo-img {
        height: 60px;
    }

    .affiliate-text {
        font-size: 0.6rem;
        max-width: 160px;
    }

    .navbar {
        padding: 0.4rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 0.95rem;
        padding: 0 15px;
    }

    .btn-hero {
        font-size: 0.9rem;
        padding: 0.6rem 2rem !important;
    }

    #heroCarousel {
        min-height: 500px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .about-section,
    .projects-section,
    .stats-section,
    .testimonials-section,
    .clients-section,
    .contact-section {
        padding: 60px 0;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }

    .carousel-control-prev {
        left: 10px;
    }

    .carousel-control-next {
        right: 10px;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 20px;
        height: 20px;
    }

    .carousel-indicators {
        bottom: 20px;
    }

    .carousel-indicators button {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 576px) {
    .logo-img {
        height: 75px;
    }

    .affiliate-text {
        font-size: 0.55rem;
        max-width: 140px;
    }

    .hero-slider-section {
        padding-top: 0;
        margin-top: 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: 0.85rem;
    }

    #heroCarousel {
        min-height: 450px;
    }
}

/* ===================================
   Utilities
   =================================== */
.bg-black {
    background-color: #000 !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* ===================================
   Portfolio Tabs
   =================================== */
.portfolio-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.btn-portfolio {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #495057;
    padding: 8px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-portfolio:hover {
    background-color: #e9ecef;
    border-color: #112c5b;
    color: #112c5b;
    transform: translateY(-2px);
}

.btn-portfolio.active {
    background-color: #112c5b;
    border-color: #112c5b;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Projects section: animated tabs + sliding indicator */
.projects-tabs-wrapper {
    margin-bottom: 2.25rem;
}

.projects-tabs-track {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    padding-bottom: 6px;
}

.projects-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(17, 44, 91, 0.08);
    border: 1px solid rgba(17, 44, 91, 0.08);
}

.btn-project-tab {
    position: relative;
    padding: 12px 22px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #4a5568;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease;
    z-index: 1;
}

.btn-project-tab:hover {
    color: var(--primary-color);
    background: rgba(17, 44, 91, 0.06);
}

.btn-project-tab.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Sliding tab indicator (position/size set by JS) */
.projects-tab-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    min-width: 40px;
    background: linear-gradient(90deg, var(--primary-color), #1e4a8a);
    border-radius: 2px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Unified showcase card */
.portfolio-showcase-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border-top: 4px solid var(--primary-color);
}

/* Panel container */
.project-detail-panels {
    position: relative;
    min-height: 340px;
}

.project-detail-panel {
    display: none;
    opacity: 0;
}

.project-detail-panel.active {
    display: block;
    animation: projectPanelIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes projectPanelIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-panel-row {
    min-height: 360px;
}

/* Left: image slider */
.project-slider-wrapper {
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 320px;
    aspect-ratio: 4/3;
}

.project-slider-wrapper::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.25), transparent);
    pointer-events: none;
}

.project-slider-count {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 2;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 10px;
    border-radius: 6px;
    backdrop-filter: blur(8px);
}

.project-carousel {
    height: 100%;
}

.project-carousel .carousel-inner,
.project-carousel .carousel-item {
    height: 100%;
    min-height: 320px;
}

.project-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 320px;
}

.project-carousel .carousel-control-prev,
.project-carousel .carousel-control-next {
    width: 48px;
    height: 48px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background: rgba(17, 44, 91, 0.85);
    opacity: 1;
    transition: background 0.25s ease, transform 0.2s ease;
}

.project-carousel .carousel-control-prev:hover,
.project-carousel .carousel-control-next:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.05);
}

.project-carousel .carousel-control-prev { left: 14px; }
.project-carousel .carousel-control-next { right: 14px; }

.project-carousel .carousel-indicators {
    margin-bottom: 12px;
    gap: 6px;
}

.project-carousel .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    border: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.project-carousel .carousel-indicators [data-bs-target]:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.project-carousel .carousel-indicators .active {
    background-color: #fff;
    transform: scale(1.25);
}

/* Right: project description */
.project-description-box {
    background: #fff;
    padding: 2rem 2rem 2rem 2.25rem;
    height: 100%;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 4px solid var(--primary-color);
}

.project-description-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.project-detail-title {
    font-size: 1.65rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.project-meta {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1.25rem;
}

.project-meta i {
    color: var(--primary-color);
    opacity: 0.9;
}

.project-description {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Project Item Filter Animation */
.project-item {
    transition: all 0.5s ease;
    animation: fadeInScale 0.5s ease;
}

.project-item.hide {
    display: none;
    opacity: 0;
    transform: scale(0.8);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Portfolio Tabs */
@media (max-width: 768px) {
    /* Fix portfolio section padding */
    .projects-section {
        padding: 60px 0;
    }
    
    /* Fix container overflow */
    .projects-section .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Fix row gutter overflow */
    #projectGrid.row {
        margin-left: -8px;
        margin-right: -8px;
    }
    
    #projectGrid.row > * {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .projects-section-label {
        font-size: 0.7rem;
    }

    .projects-tabs {
        gap: 4px;
        padding: 6px;
    }

    .btn-project-tab {
        padding: 10px 14px;
        font-size: 0.8rem;
    }

    .portfolio-showcase-card {
        border-radius: 12px;
    }

    .portfolio-panel-row {
        min-height: auto;
    }

    .project-detail-panel .row.portfolio-panel-row {
        flex-direction: column;
    }

    .project-slider-wrapper {
        min-height: 260px;
        aspect-ratio: 16/10;
    }

    .project-carousel .carousel-item img {
        min-height: 260px;
    }

    .project-description-box {
        min-height: auto;
        padding: 1.5rem 1.25rem;
        border-left: none;
        border-top: 4px solid var(--primary-color);
    }

    .project-detail-title {
        font-size: 1.35rem;
    }

    .project-slider-count {
        bottom: 10px;
        right: 10px;
        font-size: 0.7rem;
    }
    
    /* Ensure project cards fit properly on mobile */
    .project-card {
        height: 200px;
    }
    
    .project-overlay h5 {
        font-size: 1rem;
    }
    
    .project-overlay p {
        font-size: 0.75rem;
    }
}

/* Additional fixes for very small screens */
@media (max-width: 576px) {
    .projects-section .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    #projectGrid.row {
        margin-left: -6px;
        margin-right: -6px;
    }
    
    #projectGrid.row > * {
        padding-left: 6px;
        padding-right: 6px;
    }
    
    .project-card {
        height: 180px;
    }
}