/* Tech Carousel Styles */
.tech-carousel {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.tech-swiper {
    width: 100%;
    height: 100%;
}

.tech-swiper .swiper-slide {
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.tech-swiper .swiper-slide-active {
    opacity: 1;
}

/* Tech Category Heading */
.tech-category-heading {
    text-align: center; /* Can be changed to 'left' or 'center' */
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: #58A6FF; /* Accent color - can be customized */
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

/* Center the heading container */
.swiper-slide > h4 {
    text-align: center;
    width: 100%;
}

/* Animated underline for headings */
.tech-category-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #58A6FF;
    transition: width 1s ease;
}

.swiper-slide-active .tech-category-heading::after {
    width: 100%;
}

/* Tech Grid Layout - Exactly 5 columns and 3 rows */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 columns fixed */
    grid-template-rows: repeat(3, auto); /* 3 rows */
    gap: 1rem;
    margin: 0 auto;
    max-width: 100%;
}

/* Skill Icon Styles */
.skill-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease, color 0.3s ease;
    text-align: center;
}

.skill-icon.animate-skill-icon {
    transform: translateY(0);
    opacity: 1;
}

.skill-icon:hover {
    transform: translateY(-5px);
    color: #58A6FF;
}

.skill-icon img {
    height: 2.25rem;
    width: 2.25rem;
    transition: transform 0.3s ease;
}

.skill-icon:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px rgba(88, 166, 255, 0.5));
}

.skill-icon span {
    font-size: 0.7rem;
    font-weight: 500;
}

/* Navigation Arrows */
.tech-swiper-button-prev,
.tech-swiper-button-next {
    position: absolute;
    top: 50%;
    width: 2.5rem;
    height: 2.5rem;
    margin-top: -1.25rem;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #58A6FF;
    background: rgba(22, 27, 34, 0.7);
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.tech-swiper-button-prev {
    left: 1px;
}

.tech-swiper-button-next {
    right: 1px;
}

.tech-swiper-button-prev:hover,
.tech-swiper-button-next:hover {
    background: rgba(88, 166, 255, 0.3);
    transform: scale(1.1);
}

.tech-swiper-button-prev i,
.tech-swiper-button-next i {
    font-size: 1rem;
}

/* Autoplay Toggle Button */
.tech-autoplay-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 2rem;
    height: 2rem;
    background: rgba(22, 27, 34, 0.7);
    color: #58A6FF;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.tech-autoplay-btn:hover {
    background: rgba(88, 166, 255, 0.3);
    transform: scale(1.1);
}

/* Pagination styles */
.tech-swiper-pagination {
    position: relative;
    margin-top: 1.5rem;
    text-align: center;
}

.tech-swiper-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #30363D;
    opacity: 0.7;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.tech-swiper-pagination .swiper-pagination-bullet-active {
    background: #58A6FF;
    opacity: 1;
    width: 25px;
    border-radius: 5px;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .tech-grid {
        gap: 0.75rem;
    }
    
    .skill-icon img {
        height: 2rem;
        width: 2rem;
    }
    
    .skill-icon span {
        font-size: 0.65rem;
    }
}

@media screen and (max-width: 640px) {
    .tech-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on mobile */
        grid-template-rows: repeat(5, auto); /* 5 rows on mobile */
        gap: 0.5rem;
    }
    
    .skill-icon img {
        height: 1.75rem;
        width: 1.75rem;
    }
    
    .skill-icon span {
        font-size: 0.6rem;
    }
}

@media screen and (max-width: 380px) {
    .tech-grid {
        grid-template-columns: repeat(3, 1fr); /* Keep 3 columns on very small screens */
    }
    
    .skill-icon img {
        height: 1.5rem;
        width: 1.5rem;
    }
}