/* TwentyTwenty Slider - Midnight Blue & Yellow Theme */

:root {
    --midnight-blue: #191970;
    --midnight-blue-dark: #0f0f47;
    --midnight-blue-light: #2e2e8f;
    --golden-yellow: #FFD700;
    --golden-yellow-dark: #DAA520;
    --golden-yellow-light: #FFED4E;
    --white: #FFFFFF;
}

/* Handle styling - Main circular control */
.twentytwenty-handle {
    height: 42px;
    width: 42px;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -21px;
    margin-top: -21px;
    border: 4px solid var(--golden-yellow);
    -webkit-border-radius: 1000px;
    -moz-border-radius: 1000px;
    border-radius: 1000px;
    background: var(--midnight-blue);
    -webkit-box-shadow: 0px 0px 20px rgba(25, 25, 112, 0.7), 0px 0px 40px rgba(255, 215, 0, 0.3);
    -moz-box-shadow: 0px 0px 20px rgba(25, 25, 112, 0.7), 0px 0px 40px rgba(255, 215, 0, 0.3);
    box-shadow: 0px 0px 20px rgba(25, 25, 112, 0.7), 0px 0px 40px rgba(255, 215, 0, 0.3);
    z-index: 40;
    cursor: pointer;
    transition: all 0.3s ease;
}

.twentytwenty-handle:hover {
    transform: scale(1.1);
    border-color: var(--golden-yellow-light);
    -webkit-box-shadow: 0px 0px 25px rgba(25, 25, 112, 0.8), 0px 0px 50px rgba(255, 215, 0, 0.5);
    -moz-box-shadow: 0px 0px 25px rgba(25, 25, 112, 0.8), 0px 0px 50px rgba(255, 215, 0, 0.5);
    box-shadow: 0px 0px 25px rgba(25, 25, 112, 0.8), 0px 0px 50px rgba(255, 215, 0, 0.5);
}

/* Handle lines (vertical divider lines) */
.twentytwenty-horizontal .twentytwenty-handle:before, 
.twentytwenty-horizontal .twentytwenty-handle:after, 
.twentytwenty-vertical .twentytwenty-handle:before, 
.twentytwenty-vertical .twentytwenty-handle:after {
    content: " ";
    display: block;
    background: var(--golden-yellow);
    position: absolute;
    z-index: 30;
    -webkit-box-shadow: 0px 0px 15px rgba(255, 215, 0, 0.6), 0px 0px 30px rgba(25, 25, 112, 0.4);
    -moz-box-shadow: 0px 0px 15px rgba(255, 215, 0, 0.6), 0px 0px 30px rgba(25, 25, 112, 0.4);
    box-shadow: 0px 0px 15px rgba(255, 215, 0, 0.6), 0px 0px 30px rgba(25, 25, 112, 0.4);
    transition: all 0.3s ease;
}

.twentytwenty-horizontal .twentytwenty-handle:before, 
.twentytwenty-horizontal .twentytwenty-handle:after {
    width: 4px;
    height: 9999px;
    left: 50%;
    margin-left: -2px;
}

.twentytwenty-vertical .twentytwenty-handle:before, 
.twentytwenty-vertical .twentytwenty-handle:after {
    width: 9999px;
    height: 4px;
    top: 50%;
    margin-top: -2px;
}

/* Handle line extensions with enhanced styling */
.twentytwenty-horizontal .twentytwenty-handle:before {
    bottom: 50%;
    margin-bottom: 25px;
    background: linear-gradient(to top, var(--golden-yellow), var(--golden-yellow-light));
    -webkit-box-shadow: 0 3px 0 var(--midnight-blue), 0px 0px 15px rgba(255, 215, 0, 0.6);
    -moz-box-shadow: 0 3px 0 var(--midnight-blue), 0px 0px 15px rgba(255, 215, 0, 0.6);
    box-shadow: 0 3px 0 var(--midnight-blue), 0px 0px 15px rgba(255, 215, 0, 0.6);
}

.twentytwenty-horizontal .twentytwenty-handle:after {
    top: 50%;
    margin-top: 25px;
    background: linear-gradient(to bottom, var(--golden-yellow), var(--golden-yellow-light));
    -webkit-box-shadow: 0 -3px 0 var(--midnight-blue), 0px 0px 15px rgba(255, 215, 0, 0.6);
    -moz-box-shadow: 0 -3px 0 var(--midnight-blue), 0px 0px 15px rgba(255, 215, 0, 0.6);
    box-shadow: 0 -3px 0 var(--midnight-blue), 0px 0px 15px rgba(255, 215, 0, 0.6);
}

.twentytwenty-vertical .twentytwenty-handle:before {
    left: 50%;
    margin-left: 25px;
    background: linear-gradient(to right, var(--golden-yellow), var(--golden-yellow-light));
    -webkit-box-shadow: 3px 0 0 var(--midnight-blue), 0px 0px 15px rgba(255, 215, 0, 0.6);
    -moz-box-shadow: 3px 0 0 var(--midnight-blue), 0px 0px 15px rgba(255, 215, 0, 0.6);
    box-shadow: 3px 0 0 var(--midnight-blue), 0px 0px 15px rgba(255, 215, 0, 0.6);
}

.twentytwenty-vertical .twentytwenty-handle:after {
    right: 50%;
    margin-right: 25px;
    background: linear-gradient(to left, var(--golden-yellow), var(--golden-yellow-light));
    -webkit-box-shadow: -3px 0 0 var(--midnight-blue), 0px 0px 15px rgba(255, 215, 0, 0.6);
    -moz-box-shadow: -3px 0 0 var(--midnight-blue), 0px 0px 15px rgba(255, 215, 0, 0.6);
    box-shadow: -3px 0 0 var(--midnight-blue), 0px 0px 15px rgba(255, 215, 0, 0.6);
}

/* Arrow styling */
.twentytwenty-left-arrow, 
.twentytwenty-right-arrow, 
.twentytwenty-up-arrow, 
.twentytwenty-down-arrow {
    width: 0;
    height: 0;
    border: 8px inset transparent;
    position: absolute;
    transition: all 0.3s ease;
}

.twentytwenty-left-arrow, 
.twentytwenty-right-arrow {
    top: 50%;
    margin-top: -8px;
}

.twentytwenty-up-arrow, 
.twentytwenty-down-arrow {
    left: 50%;
    margin-left: -8px;
}

.twentytwenty-left-arrow {
    border-right: 8px solid var(--golden-yellow);
    left: 50%;
    margin-left: -20px;
}

.twentytwenty-right-arrow {
    border-left: 8px solid var(--golden-yellow);
    right: 50%;
    margin-right: -20px;
}

.twentytwenty-up-arrow {
    border-bottom: 8px solid var(--golden-yellow);
    top: 50%;
    margin-top: -20px;
}

.twentytwenty-down-arrow {
    border-top: 8px solid var(--golden-yellow);
    bottom: 50%;
    margin-bottom: -20px;
}

/* Labels styling */
.twentytwenty-before-label, 
.twentytwenty-after-label, 
.twentytwenty-overlay {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
}

.twentytwenty-before-label, 
.twentytwenty-after-label, 
.twentytwenty-overlay {
    -webkit-transition-duration: 0.4s;
    -moz-transition-duration: 0.4s;
    transition-duration: 0.4s;
}

.twentytwenty-before-label, 
.twentytwenty-after-label {
    -webkit-transition-property: opacity;
    -moz-transition-property: opacity;
    transition-property: opacity;
}

.twentytwenty-before-label:before, 
.twentytwenty-after-label:before {
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(25, 25, 112, 0.8);
}

.twentytwenty-before-label:before, 
.twentytwenty-after-label:before {
    position: absolute;
    background: linear-gradient(135deg, var(--midnight-blue), var(--midnight-blue-light));
    border: 2px solid var(--golden-yellow);
    line-height: 40px;
    padding: 0 25px;
    -webkit-border-radius: 25px;
    -moz-border-radius: 25px;
    border-radius: 25px;
    -webkit-box-shadow: 0px 0px 20px rgba(25, 25, 112, 0.6);
    -moz-box-shadow: 0px 0px 20px rgba(25, 25, 112, 0.6);
    box-shadow: 0px 0px 20px rgba(25, 25, 112, 0.6);
    transition: all 0.3s ease;
}

.twentytwenty-horizontal .twentytwenty-before-label:before, 
.twentytwenty-horizontal .twentytwenty-after-label:before {
    top: 50%;
    margin-top: -22px;
}

.twentytwenty-vertical .twentytwenty-before-label:before, 
.twentytwenty-vertical .twentytwenty-after-label:before {
    left: 50%;
    margin-left: -60px;
    text-align: center;
    width: 120px;
}

/* Container styling */
.twentytwenty-container {
    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
    box-sizing: content-box;
    z-index: 0;
    overflow: hidden;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    border-radius: 15px;
    -webkit-box-shadow: 0 10px 40px rgba(25, 25, 112, 0.3);
    -moz-box-shadow: 0 10px 40px rgba(25, 25, 112, 0.3);
    box-shadow: 0 10px 40px rgba(25, 25, 112, 0.3);
    transition: all 0.3s ease;
}

.twentytwenty-container:hover {
    -webkit-box-shadow: 0 15px 50px rgba(25, 25, 112, 0.4);
    -moz-box-shadow: 0 15px 50px rgba(25, 25, 112, 0.4);
    box-shadow: 0 15px 50px rgba(25, 25, 112, 0.4);
}

.twentytwenty-container img {
    max-width: 100%;
    position: absolute;
    top: 0;
    display: block;
    transition: all 0.3s ease;
}

.twentytwenty-container.active .twentytwenty-overlay, 
.twentytwenty-container.active :hover.twentytwenty-overlay {
    background: rgba(25, 25, 112, 0.1);
}

.twentytwenty-container.active .twentytwenty-overlay .twentytwenty-before-label,
.twentytwenty-container.active .twentytwenty-overlay .twentytwenty-after-label, 
.twentytwenty-container.active :hover.twentytwenty-overlay .twentytwenty-before-label,
.twentytwenty-container.active :hover.twentytwenty-overlay .twentytwenty-after-label {
    opacity: 0;
}

.twentytwenty-container * {
    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
    box-sizing: content-box;
}

/* Label states */
.twentytwenty-before-label {
    opacity: 0;
}

.twentytwenty-before-label:before {
    content: attr(data-content);
}

.twentytwenty-after-label {
    opacity: 0;
}

.twentytwenty-after-label:before {
    content: attr(data-content);
}

.twentytwenty-horizontal .twentytwenty-before-label:before {
    left: 15px;
}

.twentytwenty-horizontal .twentytwenty-after-label:before {
    right: 15px;
}

.twentytwenty-vertical .twentytwenty-before-label:before {
    top: 15px;
}

.twentytwenty-vertical .twentytwenty-after-label:before {
    bottom: 15px;
}

/* Overlay styling */
.twentytwenty-overlay {
    -webkit-transition-property: background;
    -moz-transition-property: background;
    transition-property: background;
    background: rgba(0, 0, 0, 0);
    z-index: 25;
}

.twentytwenty-overlay:hover {
    background: linear-gradient(45deg, rgba(25, 25, 112, 0.3), rgba(25, 25, 112, 0.5));
}

.twentytwenty-overlay:hover .twentytwenty-after-label {
    opacity: 1;
}

.twentytwenty-overlay:hover .twentytwenty-before-label {
    opacity: 1;
}

.twentytwenty-overlay:hover .twentytwenty-before-label:before,
.twentytwenty-overlay:hover .twentytwenty-after-label:before {
    transform: scale(1.05);
    border-color: var(--golden-yellow-light);
    -webkit-box-shadow: 0px 0px 25px rgba(25, 25, 112, 0.8), 0px 0px 15px rgba(255, 215, 0, 0.5);
    -moz-box-shadow: 0px 0px 25px rgba(25, 25, 112, 0.8), 0px 0px 15px rgba(255, 215, 0, 0.5);
    box-shadow: 0px 0px 25px rgba(25, 25, 112, 0.8), 0px 0px 15px rgba(255, 215, 0, 0.5);
}

/* Z-index layers */
.twentytwenty-before {
    z-index: 20;
}

.twentytwenty-after {
    z-index: 10;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .twentytwenty-handle {
        height: 38px;
        width: 38px;
        margin-left: -19px;
        margin-top: -19px;
    }
    
    .twentytwenty-before-label:before, 
    .twentytwenty-after-label:before {
        font-size: 12px;
        padding: 0 15px;
        line-height: 32px;
    }
    
    .twentytwenty-horizontal .twentytwenty-before-label:before, 
    .twentytwenty-horizontal .twentytwenty-after-label:before {
        margin-top: -16px;
    }
}