/* Before/After Project Slider */
.before-after-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 60px 0;
}

.before-after-container {
    max-width: 1200px;
    margin: 40px auto 0;
}

.slider-wrapper {
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.comparison-slider {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.after-image {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
    transition: clip-path 0.3s ease;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: white;
    cursor: ew-resize;
    transform: translateX(-50%);
    z-index: 10;
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff9933, #ff6b35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 153, 51, 0.4);
    cursor: ew-resize;
}

.slider-button::before,
.slider-button::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.slider-button::before {
    left: 15px;
    border-width: 8px 12px 8px 0;
    border-color: transparent white transparent transparent;
}

.slider-button::after {
    right: 15px;
    border-width: 8px 0 8px 12px;
    border-color: transparent transparent transparent white;
}

.image-label {
    position: absolute;
    top: 20px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.9rem;
}

.label-before {
    left: 20px;
}

.label-after {
    right: 20px;
}

.project-info {
    padding: 30px;
    background: white;
}

.project-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
}

.project-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.detail-box {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ff9933;
}

.detail-box strong {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.detail-box span {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.slider-navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.nav-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #ff9933;
    background: white;
    color: #ff9933;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button:hover {
    background: #ff9933;
    color: white;
    transform: scale(1.1);
}

.project-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #ff9933;
    width: 30px;
    border-radius: 6px;
}

/* Interactive Village Map */
.village-map-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 60px 0;
    color: white;
}

.map-container {
    position: relative;
    max-width: 1200px;
    margin: 40px auto 0;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.map-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    background: #f0f0f0;
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-marker {
    position: absolute;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff9933, #ff6b35);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 153, 51, 0.4);
    animation: bounce 2s infinite;
}

.map-marker:hover {
    transform: rotate(-45deg) scale(1.2);
    box-shadow: 0 6px 20px rgba(255, 153, 51, 0.6);
}

.map-marker::before {
    content: attr(data-icon);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    font-size: 1.2rem;
}

@keyframes bounce {

    0%,
    100% {
        transform: rotate(-45deg) translateY(0);
    }

    50% {
        transform: rotate(-45deg) translateY(-10px);
    }
}

.marker-popup {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 100;
}

.map-marker:hover .marker-popup {
    opacity: 1;
    pointer-events: all;
    bottom: 60px;
}

.marker-popup::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.popup-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.popup-info {
    font-size: 0.85rem;
    color: #666;
}

.map-legend {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.legend-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    font-size: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9rem;
}

.legend-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .comparison-slider {
        height: 400px;
    }

    .map-wrapper {
        height: 400px;
    }

    .project-details {
        grid-template-columns: 1fr;
    }

    .map-legend {
        position: static;
        margin-top: 20px;
    }
}