/* ==========================================================================
   Phone Mockup Slider - Authentic iPhone 14 Pro Device with Internal Slider
   ========================================================================== */

/* Main container with scaling */
.phone-mockup-slider-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px auto;
    max-width: 100%;
    overflow: visible; /* Changed from hidden to visible for arrows */
    padding-right: 100px; /* Add space for arrows */
    /* Padding will be controlled by Elementor selectors */
}

/* Scale container for Elementor scale control */
.device-scale-container {
    transform-origin: center center;
    will-change: transform;
    /* Transform scale will be controlled by Elementor selectors */
}

/* Device container for tilt.js effects */
.device {
    transform-origin: center center;
    will-change: transform;
}

/* ==========================================================================
   iPhone 14 Pro Device Styles (Exact copy from devices.min.css)
   ========================================================================== */

.device, .device *, .device ::after, .device ::before, .device::after, .device::before {
    box-sizing: border-box;
    display: block;
}

.device {
    position: relative;
    transform: scale(1);
    z-index: 1;
}

.device .device-frame {
    z-index: 1;
}

.device .device-screen {
    background-color: #000;
    background-position: center center;
    background-size: cover;
    object-fit: cover;
    position: relative;
}

.device-iphone-14-pro {
    height: 868px;
    width: 428px;
}

.device-iphone-14-pro .device-frame {
    background: #010101;
    border: 1px solid #1b1721;
    border-radius: 68px;
    box-shadow: inset 0 0 4px 2px #c0b7cd, inset 0 0 0 6px #342c3f;
    height: 868px;
    padding: 19px;
    width: 428px;
}

.device-iphone-14-pro .device-screen {
    border-radius: 49px;
    height: 830px;
    width: 390px;
    overflow: hidden;
}

.device-iphone-14-pro .device-stripe::after, .device-iphone-14-pro .device-stripe::before {
    border: solid rgba(1,1,1,.25);
    border-width: 0 7px;
    content: "";
    height: 7px;
    left: 0;
    position: absolute;
    width: 100%;
    z-index: 9;
}

.device-iphone-14-pro .device-stripe::after {
    top: 85px;
}

.device-iphone-14-pro .device-stripe::before {
    bottom: 85px;
}

.device-iphone-14-pro .device-header {
    background: #010101;
    border-radius: 20px;
    height: 35px;
    left: 50%;
    margin-left: -60px;
    position: absolute;
    top: 29px;
    width: 120px;
    z-index: 99;
}

.device-iphone-14-pro .device-sensors::after, .device-iphone-14-pro .device-sensors::before {
    content: "";
    position: absolute;
}

.device-iphone-14-pro .device-sensors::after {
    background: #010101;
    border-radius: 17px;
    height: 33px;
    left: 50%;
    margin-left: -60px;
    top: 30px;
    width: 74px;
}

.device-iphone-14-pro .device-sensors::before {
    background: radial-gradient(farthest-corner at 20% 20%, #6074bf 0, transparent 40%), radial-gradient(farthest-corner at 80% 80%, #513785 0, #24555e 20%, transparent 50%);
    border-radius: 50%;
    box-shadow: 0 0 1px 1px rgba(255,255,255,.05);
    height: 9px;
    left: 50%;
    margin-left: 36px;
    top: 42px;
    width: 9px;
}

.device-iphone-14-pro .device-btns {
    background: #1b1721;
    border-radius: 2px;
    height: 32px;
    left: -2px;
    position: absolute;
    top: 115px;
    width: 3px;
}

.device-iphone-14-pro .device-btns::after, .device-iphone-14-pro .device-btns::before {
    background: #1b1721;
    border-radius: 2px;
    content: "";
    height: 62px;
    left: 0;
    position: absolute;
    width: 3px;
}

.device-iphone-14-pro .device-btns::after {
    top: 60px;
}

.device-iphone-14-pro .device-btns::before {
    top: 140px;
}

.device-iphone-14-pro .device-power {
    background: #1b1721;
    border-radius: 2px;
    height: 100px;
    position: absolute;
    right: -2px;
    top: 200px;
    width: 3px;
}

.device-iphone-14-pro .device-home::after, .device-iphone-14-pro .device-home::before {
    border: solid rgba(1,1,1,.25);
    border-width: 6px 0;
    content: "";
    height: 6px;
    position: absolute;
    width: 6px;
    z-index: 9;
}

.device-iphone-14-pro .device-home::after {
    right: 86px;
    top: 0;
}

.device-iphone-14-pro .device-home::before {
    bottom: 0;
    left: 86px;
}

/* Device Color Variants */
.device-iphone-14-pro.device-silver .device-frame {
    border-color: #c8cacb;
    box-shadow: inset 0 0 4px 2px #fff, inset 0 0 0 6px #e2e3e4;
}

.device-iphone-14-pro.device-silver .device-btns {
    background: #c8cacb;
}

.device-iphone-14-pro.device-silver .device-btns::after, .device-iphone-14-pro.device-silver .device-btns::before {
    background: #c8cacb;
}

.device-iphone-14-pro.device-silver .device-power {
    background: #c8cacb;
}

.device-iphone-14-pro.device-black .device-frame {
    border-color: #5c5956;
    box-shadow: inset 0 0 4px 2px #fff, inset 0 0 0 6px #76726f;
}

.device-iphone-14-pro.device-black .device-btns {
    background: #5c5956;
}

.device-iphone-14-pro.device-black .device-btns::after, .device-iphone-14-pro.device-black .device-btns::before {
    background: #5c5956;
}

.device-iphone-14-pro.device-black .device-power {
    background: #5c5956;
}

.device-iphone-14-pro.device-gold .device-frame {
    border-color: #e7d19e;
    box-shadow: inset 0 0 4px 2px #fff, inset 0 0 0 6px #d2ab4c;
}

.device-iphone-14-pro.device-gold .device-btns {
    background: #e7d19e;
}

.device-iphone-14-pro.device-gold .device-btns::after, .device-iphone-14-pro.device-gold .device-btns::before {
    background: #e7d19e;
}

.device-iphone-14-pro.device-gold .device-power {
    background: #e7d19e;
}

/* ==========================================================================
   iPhone Status Bar
   ========================================================================== */

.iphone-status-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 54px;
    background: #fff;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    gap: 90px;
}

.status-bar-left, .status-bar-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.status-bar-left .time {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    letter-spacing: -0.3px;
}

.status-bar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Cellular Signal Bars */
.cellular-signal {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.signal-bar {
    background: #000;
    border-radius: 0.5px;
    display: block;
}

.signal-bar.bar-1 {
    width: 2px;
    height: 3px;
}

.signal-bar.bar-2 {
    width: 2px;
    height: 5px;
}

.signal-bar.bar-3 {
    width: 2px;
    height: 7px;
}

.signal-bar.bar-4 {
    width: 2px;
    height: 9px;
}

/* WiFi Signal */
.wifi-signal {
    display: flex;
    align-items: flex-end;
    position: relative;
    width: 15px;
    height: 12px;
    margin-left: 2px;
}

.wifi-wave {
    position: absolute;
    background: #000;
    border-radius: 2px 2px 0 0;
    display: block;
}

.wifi-wave.wave-1 {
    width: 3px;
    height: 3px;
    bottom: 0;
    left: 0;
}

.wifi-wave.wave-2 {
    width: 3px;
    height: 6px;
    bottom: 0;
    left: 4px;
}

.wifi-wave.wave-3 {
    width: 3px;
    height: 9px;
    bottom: 0;
    left: 8px;
}

/* Battery */
.battery {
    display: flex;
    align-items: center;
    position: relative;
    margin-left: 2px;
}

.battery-icon {
    width: 22px;
    height: 10px;
    border: 1px solid #000;
    border-radius: 2px;
    position: relative;
    display: block;
}

.battery-icon::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 4px;
    background: #000;
    border-radius: 0 1px 1px 0;
}

.battery-level {
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 6px;
    background: #000;
    border-radius: 1px;
    display: block;
}

/* ==========================================================================
   Safari Interface Mockup
   ========================================================================== */

.safari-interface {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 122px;
    z-index: 10;
    background-image: url('images/safari_overlay.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.url-text {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    z-index: 11;
}

/* ==========================================================================
   Slider Container and Slides
   ========================================================================== */

.slides-container {
    position: relative;
    height: calc(100% - 54px - 88px); /* Status bar height - Safari interface height */
    top: 54px; /* Status bar height */
    bottom: 88px; /* Safari interface height */
    overflow: hidden;
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.slide-item.active {
    opacity: 1;
    z-index: 2;
}

/* Show first slide by default as fallback before JavaScript loads */
.slides-container .slide-item:first-child {
    opacity: 1;
    z-index: 2;
}

/* When slider is initialized, only active slides should be visible */
.slides-container.slider-initialized .slide-item:first-child {
    opacity: 0;
    z-index: 0;
}

.slides-container.slider-initialized .slide-item.active {
    opacity: 1;
    z-index: 2;
}

.slide-screenshot {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.slide-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* ==========================================================================
   Content Overlay
   ========================================================================== */

.slide-overlay {
    position: absolute;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    color: white;
    padding: 20px 16px;
    z-index: 5;
    text-align: left;
}

.slide-overlay.overlay-top {
    top: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
}

.slide-overlay.overlay-bottom {
    bottom: 88px; /* Above Safari interface */
}

.slide-overlay.overlay-center {
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    margin: 0 16px;
    left: 16px;
    right: 16px;
}

.slide-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #fff;
    line-height: 1.3;
}

.client-name {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 6px 0;
    color: #f0f0f0;
    opacity: 0.9;
}

.project-description {
    font-size: 13px;
    margin: 0 0 12px 0;
    color: #e0e0e0;
    line-height: 1.4;
    opacity: 0.8;
}

.visit-site-btn {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.visit-site-btn:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ==========================================================================
   Navigation Controls
   ========================================================================== */

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.slider-nav:hover {
    background: rgba(0,0,0,0.7);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
    left: 10px;
}

.slider-nav.next {
    right: 10px;
}

.slider-nav::before {
    content: '';
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.slider-nav.prev::before {
    transform: rotate(-135deg);
    margin-left: 2px;
}

.slider-nav.next::before {
    transform: rotate(45deg);
    margin-right: 2px;
}

.slider-dots {
    position: absolute;
    bottom: 110px; /* Above Safari interface */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 15;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.slider-dot.active {
    background: rgba(255,255,255,0.9);
    transform: scale(1.2);
}

.slider-dot:hover {
    background: rgba(255,255,255,0.7);
}

/* ==========================================================================
   Tilt.js Enhancement
   ========================================================================== */

.device {
    transform-style: preserve-3d;
}

.device .js-tilt-glare {
    border-radius: 68px !important;
}

/* ==========================================================================
   Responsive Behavior
   ========================================================================== */

/* Tablet */
@media (max-width: 768px) {
    .phone-mockup-slider-wrapper {
        margin: 20px auto;
    }
    
    .slide-overlay {
        padding: 16px 12px;
    }
    
    .slide-title {
        font-size: 16px;
    }
    
    .client-name {
        font-size: 13px;
    }
    
    .project-description {
        font-size: 12px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .phone-mockup-slider-wrapper {
        margin: 10px auto;
    }
    
    .slide-overlay {
        padding: 12px 10px;
    }
    
    .slide-title {
        font-size: 14px;
    }
    
    .client-name {
        font-size: 12px;
    }
    
    .project-description {
        font-size: 11px;
    }
    
    .slider-nav {
        width: 32px;
        height: 32px;
    }
    
    .slider-nav.prev {
        left: 5px;
    }
    
    .slider-nav.next {
        right: 5px;
    }
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

.phone-mockup-slider-wrapper * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.device,
.slide-item,
.slide-screenshot {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .slide-item,
    .slider-nav,
    .slider-dot,
    .visit-site-btn {
        transition: none !important;
    }
    
    .phone-mockup-slider-wrapper .device {
        transform-style: flat !important;
    }
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Custom Arrow Navigation (Outside Phone)
   ========================================================================== */

.phone-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.custom-slider-arrows {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
}

.custom-arrow {
    width: 40px;
    height: 40px;
    border: none;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 11;
}

.custom-arrow:hover {
    background-color: #007cba;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.custom-arrow i {
    color: #007cba;
    font-size: 16px;
    transition: color 0.3s ease;
}

.custom-arrow:hover i {
    color: #ffffff;
}

.custom-arrow:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.custom-arrow:active {
    transform: scale(0.95);
}

/* Hide default slider navigation when custom arrows are used */
.phone-mockup-slider-wrapper .slider-nav.prev,
.phone-mockup-slider-wrapper .slider-nav.next {
    display: none !important;
}

/* Also hide any default Slick arrows if present */
.phone-mockup-slider-wrapper .slick-prev,
.phone-mockup-slider-wrapper .slick-next {
    display: none !important;
}

/* Responsive adjustments for custom arrows */
@media (max-width: 1200px) {
    .custom-slider-arrows {
        right: -30px;
    }
    
    .custom-arrow {
        width: 45px;
        height: 45px;
    }
    
    .custom-arrow i {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .phone-mockup-slider-wrapper {
        padding-right: 0; /* Remove right padding on mobile */
        padding-bottom: 80px; /* Add bottom padding for arrows */
    }
    
    .phone-slider-container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .custom-slider-arrows {
        position: relative; /* Change from absolute to relative */
        right: auto; /* Reset right positioning */
        top: auto; /* Reset top positioning */
        bottom: 180px;
        transform: none; /* Remove transform */
        flex-direction: row; /* Change to horizontal layout */
        gap: 20px;
        margin-top: 30px; /* Add space above arrows */
        justify-content: center;
    }
    
    .custom-arrow {
        width: 45px;
        height: 45px;
    }
    
    .custom-arrow i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .phone-mockup-slider-wrapper {
        padding-bottom: 70px; /* Adjust bottom padding for smaller screens */
    }
    
    .custom-slider-arrows {
        gap: 15px;
        margin-top: 25px;
    }
    
    .custom-arrow {
        width: 40px;
        height: 40px;
    }
    
    .custom-arrow i {
        font-size: 12px;
    }
}