.slider {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.slide-content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.slide-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.slider-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.slider-dot.active {
    background: white;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    border-radius: 50%;
    font-size: 24px;
    transition: background 0.3s ease;
}

.slider-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slider-arrow.prev {
    left: 20px;
}

.slider-arrow.next {
    right: 20px;
}

@media (max-width: 768px) {
    .slider {
        height: 400px;
    }

    .slide-content {
        padding: 0 15px; /* Adjust padding for smaller screens */
    }

    .slide-content h2 {
        font-size: 2rem;
    }

    .slide-content p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: row; /* Keep buttons in a row */
        gap: 10px; /* Reduce space between buttons */
        justify-content: center; /* Center buttons */
    }

    .hero-buttons .cta-button {
        width: auto; /* Allow buttons to size based on content */
        max-width: 150px; /* Limit max width */
        padding: 10px 15px; /* Reduce padding */
        font-size: 0.85rem; /* Reduce font size */
    }

    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .slider-arrow.prev {
        left: 10px;
    }

    .slider-arrow.next {
        right: 10px;
    }

    .slider-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .slider {
        height: 300px;
    }

    .slide-content h2 {
        font-size: 1.5rem;
    }

    .slide-content p {
        font-size: 0.9rem;
    }

    .hero-buttons {
        flex-direction: row; /* Keep buttons in a row */
        gap: 8px; /* Further reduce space between buttons */
    }

    .hero-buttons .cta-button {
        width: auto;
        max-width: 120px; /* Further limit max width */
        padding: 8px 12px; /* Further reduce padding */
        font-size: 0.8rem; /* Further reduce font size */
    }
}