/* Portfolio Slider Styles */
* {
    box-sizing: border-box;
}

/* Main slider styles */
.slider-section {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 15px;
}

.slider-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding-bottom: 40px;
    /* Space for navigation dots */
}

.projects-slider {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    position: relative;
    min-width: calc((100% / 2.3) - 30px);
    height: 0;
    padding-bottom: calc(((100% / 2.3) - 30px) * (3/4));
    /* 4:3 aspect ratio */
    margin: 0 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    /* Black overlay */
    transition: all 0.3s ease;
    z-index: 1;
}

.slide.active::after {
    background-color: rgba(0, 0, 0, 0);
    /* No overlay for active slide */
}

.slide-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
}

/* Background image styling */
.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transition: transform 0.5s ease;
}

.slide.active .slide-image {
    /* Optional: Add slight zoom effect to active slide */
    transform: scale(1.03);
}

.slide.active {
    transform: scale(1.05);
    z-index: 2;
    opacity: 1;
}

.slide-content {
    position: absolute;
    bottom: 25px;
    /* Moved further down */
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 15px 25px;
    border-radius: 3px;
    text-align: left;
    width: 80%;
    max-width: 350px;
    /* Increased max-width for content */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 3;
    /* Ensure content is above the overlay */
}

/* Show content on hover for any slide */
.slide:hover .slide-content {
    opacity: 1;
}

/* Keep showing content for active slide */
.slide.active .slide-content {
    opacity: 1;
}

.slide-content h4 {
    font-size: 16px;
    /* Increased font size */
    margin-bottom: 5px;
    color: #444;
    font-weight: normal;
}

.slide-content h2 {
    font-size: 24px;
    /* Increased font size */
    color: #000;
    font-weight: bold;
    margin: 0;
}

.slider-nav {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.slider-nav-btn {
    width: 12px;
    /* Slightly larger nav dots */
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-nav-btn.active {
    background-color: #fff;
}

.slider-controls {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 10;
    top: 50%;
    transform: translateY(-50%);
}

.slider-btn {
    width: 45px;
    /* Larger control buttons */
    height: 45px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.slider-btn i {
    color: #fff;
    font-size: 18px;
    /* Larger icons */
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .slide {
        min-width: calc((100% / 2.2) - 30px);
        padding-bottom: calc(((100% / 2.2) - 30px) * (3/4));
        margin: 0 15px;
    }
}

@media (max-width: 992px) {
    .slide {
        min-width: calc(50% - 20px);
        padding-bottom: calc((50% - 20px) * (3/4));
        margin: 0 10px;
    }

    .slide-content {
        bottom: 20px;
    }
}

@media (max-width: 768px) {
    .slider-section {
        padding: 20px 10px;
    }

    .slide {
        min-width: calc(80% - 16px);
        padding-bottom: calc((80% - 16px) * (3/4));
        margin: 0 8px;
    }

    .slide-content {
        width: 90%;
        bottom: 20px;
        padding: 12px 20px;
    }

    .slide-content h2 {
        font-size: 22px;
    }

    .slider-controls {
        padding: 0 15px;
    }
}

@media (max-width: 576px) {
    .slider-section {
        padding: 15px 5px;
    }

    .slide {
        min-width: 90%;
        padding-bottom: calc(90% * (3/4));
        margin: 0 5px;
        opacity: 0.9;
        /* Make non-active slides more visible on mobile */
    }

    .slide.active {
        transform: scale(1.03);
        /* Smaller scale change on mobile for better viewing */
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        background-color: rgba(255, 255, 255, 0.3);
        /* More visible buttons on mobile */
        position: absolute;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }

    .slide-content {
        bottom: 15px;
        /* Even lower on mobile */
        padding: 10px 18px;
        width: 85%;
        max-width: none;
        /* Allow content to be as wide as needed on mobile */
    }

    .slide-content h4 {
        font-size: 14px;
    }

    .slide-content h2 {
        font-size: 20px;
    }

    /* Ensure slider nav is visible above content */
    .slider-nav {
        bottom: 5px;
        z-index: 20;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .slide {
        min-width: 95%;
        padding-bottom: calc(95% * (3/4));
        margin: 0;
    }

    .slider-btn {
        width: 36px;
        height: 36px;
    }

    .slider-btn i {
        font-size: 16px;
    }

    .slide-content {
        bottom: 12px;
        padding: 8px 15px;
    }
}