/* videos slider based on instagram style - CLEANED */

#showreel {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    padding: 60px 20px !important;
    width: 100% !important;
    min-height: auto !important;
    position: relative !important;
}

.vslider-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 auto !important;
}

.vslider-wrapper {
    margin: 0 auto;
    width: min(85vw, 1200px); /* ask mahmoud if he want almost square box 80vw 1000px*/
    max-width: 1200px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 32px;
    backdrop-filter: blur(2px);
    padding: 8px;
    transition: width 0.2s ease;
}

.vslider-window {
    position: relative;
    width: 100%;
    height: 660px; /** height of player **/
    background: #05070c;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(212, 175, 55, 0.5);
}

#slidesContainer {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
}

/* Slide transitions */
.vslider-slide {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.35s ease !important;
}

.vslider-slide.active {
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 10 !important;
    animation: fadeSlide 0.35s ease;
}

@keyframes fadeSlide {
    from { opacity: 0.4; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.vslider-slide video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    background: #000;
}

.vslider-slide:not(.active) video {
    display: none !important;
}

/* Bookmark badge */
.vslider-bookmark {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(212, 175, 55, 0.9);
    color: #0a0a0a;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 30;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(4px);
    font-family: monospace;
}

.vslider-bookmark.visible { opacity: 1; }

/* Progress bar - overlay on top */
.vslider-progress-row {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 40;
    display: flex;
    gap: 6px;
    background: transparent !important;
}

.vslider-prog-item {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.vslider-prog-item:hover {
    background: rgba(212, 175, 55, 0.6);
    transform: scaleY(1.3);
}

.vslider-prog-fill {
    width: 0%;
    height: 100%;
    background: #D4AF37;
    border-radius: 6px;
    transition: width 0.08s linear;
}

/* Control bar - bottom overlay */
.vslider-control-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(5, 7, 15, 0.95) 0%, rgba(5, 7, 15, 0.85) 70%, transparent 100%);
    backdrop-filter: blur(8px);
    padding: 12px 16px;
    border-top: 1px solid rgba(212, 175, 55, 0.5);
    z-index: 50;
    border-radius: 0 0 24px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.vslider-left-group,
.vslider-right-group,
.vslider-center-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vslider-title {
    font-weight: 600;
    letter-spacing: -0.2px;
    background: rgba(212, 175, 55, 0.2);
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.85rem;
}

.vslider-timer {
    font-family: monospace;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 10px;
    border-radius: 24px;
}

.vslider-volume-btn,
.vslider-center-group button {
    background: rgba(30, 30, 30, 0.9);
    border: none;
    color: #eee;
    font-size: 1.2rem;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.vslider-volume-btn:hover,
.vslider-center-group button:hover {
    background: #D4AF37;
    color: #0a0a0a;
    transform: scale(1.05);
}

/* Audio visualizer */
.slider-audio-badge {
    font-size: 11px;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 12px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.audio-visualizer {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.audio-visualizer span {
    width: 3px;
    height: 12px;
    background-color: #D4AF37;
    border-radius: 2px;
    animation: audioBounce 0.8s ease-in-out infinite;
}

.audio-visualizer span:nth-child(1) { animation-delay: 0s; height: 8px; }
.audio-visualizer span:nth-child(2) { animation-delay: 0.2s; height: 14px; }
.audio-visualizer span:nth-child(3) { animation-delay: 0.4s; height: 10px; }
.audio-visualizer span:nth-child(4) { animation-delay: 0.1s; height: 16px; }
.audio-visualizer span:nth-child(5) { animation-delay: 0.3s; height: 12px; }

@keyframes audioBounce {
    0%, 100% { transform: scaleY(1); opacity: 0.5; }
    50% { transform: scaleY(1.8); opacity: 1; background-color: #F5E8C7; }
}

.hidden-badge { display: none !important; }

/* Toast notification */
.auto-mute-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    color: #D4AF37;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 9999;
    transition: transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    font-family: monospace;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.auto-mute-toast.show { transform: translateX(-50%) translateY(0); }

/* Navbar scroll effect */
nav#navbar.scrolled {
    background: rgba(255, 255, 255, 0.12) !important;
    border-bottom: 2px solid #D4AF37 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(0);
}

nav#navbar {
    transform: translateY(-100%);
    transition: transform 0.5s ease;
}

/* Glass card styling */
.glass-card-premium {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

/* Infinite reel (if used) */
.infinite-track {
    display: flex;
    gap: 1.25rem;
    width: fit-content;
    animation: seamlessScroll 32s linear infinite;
}

@keyframes seamlessScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #showreel {
        padding: 0 !important;
        min-height: auto !important;
    }

    .vslider-container {
        height: 75vh;
        align-items: center;
    }

    .vslider-wrapper {
        width: 100% !important;
        max-width: none !important;
        height: 100%;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    .vslider-window {
        height: 100%;
        border-radius: 0 !important;
        box-shadow: none;
    }

    .vslider-slide::before {
        content: '';
        position: absolute;
        top: -10%;
        left: -10%;
        right: -10%;
        bottom: -10%;
        background-size: cover;
        background-position: center;
        filter: blur(30px);
        transform: scale(1.1);
        z-index: 0;
    }

    .vslider-progress-row {
        padding: 8px 12px !important;
    }

    .vslider-prog-item {
        height: 3px !important;
    }

    .vslider-control-bar {
        padding: 12px 16px !important;
        background: rgba(0, 0, 0, 0.5) !important;
    }

    .vslider-title {
        font-size: 0.8rem !important;
    }

    .vslider-volume-btn,
    .vslider-center-group button {
        background: rgba(255, 255, 255, 0.2) !important;
    }

    .slider-audio-badge {
        display: none !important;
    }
}

@media (max-width: 540px) {
    .vslider-window {
        height: 340px;
    }
}

@media (max-width: 480px) {
    .vslider-container {
        height: 100vh;
    }

    .vslider-title {
        max-width: 110px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 1000px) {
    #sliderRightButtons {
        display: none !important;
    }
}

@media (max-width: 580px) {
    .vslider-control-bar {
        flex-wrap: wrap;
    }
    .vslider-center-group {
        order: 3;
        width: 100%;
        justify-content: center;
    }
}

/************* text insta-slider ***************/

 /* main card – lighter base, warmer undertones */
    .slider-cinema {
      width: 560px;
      max-width: 100%;
      background: #1a232c; /* less dark, more charcoal with blue */
      border-radius: 36px;
      overflow: hidden;
      box-shadow: 0 30px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(230, 190, 120, 0.4);
		margin: auto;
    }

    .slides-wrapper {
      position: relative;
    }

    .slides {
      display: flex;
      overflow-x: hidden;
      scroll-snap-type: x mandatory;
      aspect-ratio: 1 / 1;
      background: #1f2a33;  /* lifted dark background */
    }

    .slide {
      flex: 0 0 100%;
      scroll-snap-align: start;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 2.2rem;
      color: white;
      background-size: cover;
      background-position: center;
      text-shadow: 0 4px 18px rgba(0,0,0,0.5);
    }

    .slide::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(circle at 30% 40%, rgba(30, 40, 50, 0.25) 0%, rgba(10, 15, 20, 0.6) 100%);
      z-index: 1;
      pointer-events: none;
    }

    /* rich backgrounds – now with more depth, less pitch black #3b2760 */
    .slide-1 {
      background-image: linear-gradient(125deg, #314956 0%, #1d2c36 100%), url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4MCIgaGVpZ2h0PSI4MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cGF0aCBkPSJNMCAwaDQwdjQwSDB6IiBmaWxsPSIjMjEzMDQwIi8+PHBhdGggZD0iTTEwIDEwaDIwdjIwSDEweiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjM2I0YzVjIiBzdHJva2Utd2lkdGg9IjAuNSIvPjwvc3ZnPg==');
      
    }
    .slide-2 {
    	background-image:
    		linear-gradient(210deg, #3b2760, #1a0e2a),
    		radial-gradient(circle at 60% 60%, rgba(90, 60, 120, 0.25), transparent 80%);
    	background-blend-mode: overlay, normal;
    }
    .slide-3 {
      background: radial-gradient(ellipse at 70% 30%, #3a6053, #1a332b);
    }
    .slide-4 {
      background: #18232e;        
    }

    /* text styling */
    .film-text {
      position: relative;
      z-index: 5;
      text-align: center;
      max-width: 400px;
    }

    .film-eyebrow {
      font-size: 0.9rem;
      letter-spacing: 4px;
      text-transform: uppercase;
      font-weight: 400;
      color: #f3cf9c; /* warmer gold */
      margin-bottom: 0.75rem;
      opacity: 0;
      animation: cinematicFadeUp 0.5s ease forwards;
    }

    .film-headline {
      font-size: 2.8rem;
      font-weight: 800;
      line-height: 1.1;
      margin-bottom: 0.75rem;
      opacity: 0;
      animation: cinematicFadeUp 0.5s 0.1s ease forwards;
      letter-spacing: -0.02em;
		
    }

    .film-sub {
      font-size: 1.2rem;
      font-weight: 300;
      color: #dce9f5;             /* brighter, less grey */
      opacity: 0;
      animation: cinematicFadeUp 0.5s 0.2s ease forwards;
      max-width: 360px;
      margin-left: auto;
      margin-right: auto;
    }

    @keyframes cinematicFadeUp {
      0% { opacity: 0; transform: translateY(20px); }
      100% { opacity: 1; transform: translateY(0); }
    }

    /* ----- SLIDE 4: CENTER-BURST OVERLAY (from center) ----- */
    .slide-4 {
      position: relative;
      overflow: hidden;
    }

    .vibrant-overlay {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);  /* start exactly at center */
      width: 0;
      height: 0;
      background: #b85e00;
      z-index: 20;
      pointer-events: none;
      animation: vibrantRevealCenter 2.8s cubic-bezier(0.76, 0, 0.24, 1) forwards;
      animation-delay: 0.2s;
      box-shadow: 0 0 50px rgba(255, 140, 0, 0.5);
      opacity: 0.98;
      background: linear-gradient(135deg, #ff8c1a, #c05e00);
      border-radius: 0;            /* keep square expansion */
    }

    @keyframes vibrantRevealCenter {
      0% {
        width: 0%;
        height: 0%;
        opacity: 1;
        background: #ff8c1a;
        box-shadow: 0 0 30px #ffb347;
      }
      20% {
        width: 30%;
        height: 30%;
        background: #ff7e00;
        box-shadow: 0 0 60px #ffaa33;
      }
      40% {
        width: 55%;
        height: 55%;
        background: #cc6a00;
      }
      60% {
        width: 80%;
        height: 80%;
        background: #a35100;
        box-shadow: 0 0 80px #ffb347;
      }
      80% {
        width: 120%;
        height: 120%;
        background: #5e2f00;
        box-shadow: 0 0 100px #ffa500;
      }
      100% {
        width: 300%;
        height: 300%;
        opacity: 0.85;
        background: #2f1a00;
        box-shadow: 0 0 120px #ffaa33;
      }
    }

    .grain-texture {
      position: absolute;
      inset: 0;
      background-image: radial-gradient(circle at 30% 40%, rgba(255, 215, 140, 0.12) 1px, transparent 1px);
      background-size: 20px 20px;
      z-index: 22;
      pointer-events: none;
      opacity: 0.4;
      mix-blend-mode: overlay;
    }

    .final-message {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      text-align: center;
      z-index: 40;
      width: 90%;
      opacity: 0;
      animation: finalMessageGlow 1s ease forwards 2.6s;
      text-shadow: 0 0 30px rgba(255, 140, 0, 0.9);
		
    }

    .final-message .main-line {
      font-size: 4rem;
      font-weight: 800;
      line-height: 1.1;
      margin-bottom: 0.75rem;
      background: linear-gradient(135deg, #ffffff, #ffd78c, #ffb347);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      text-shadow: 0 0 40px #ff9900;
      letter-spacing: 2px;
    }

    .final-message .tagline {
      font-size: 1.8rem;
      font-weight: 400;
      color: #ffffff;
      text-transform: uppercase;
      letter-spacing: 8px;
      margin-bottom: 1.5rem;
      background: linear-gradient(135deg, #fff5e6, #ffe6b3);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .final-message .outro {
      font-size: 1rem;
      color: #ffdbb5;
      letter-spacing: 4px;
      font-weight: 300;
      text-transform: uppercase;
      border-top: 1px solid rgba(255, 200, 100, 0.7);
      padding-top: 1.5rem;
      display: inline-block;
    }

    @keyframes finalMessageGlow {
      0% { 
        opacity: 0; 
        transform: translate(-50%, -30%);
        filter: blur(8px);
      }
      100% { 
        opacity: 1; 
        transform: translate(-50%, -50%);
        filter: blur(0);
        text-shadow: 0 0 60px #ffaa33;
      }
    }

    /* progress bars – lighter/darker balance */
    .progress-tray {
      display: flex;
      gap: 6px;
      padding: 14px 16px 8px 16px;
      background: #121d26;           /* less deep black */
      border-bottom: 1px solid #304452;
    }

    .progress-bar-container {
      flex: 1;
      height: 4px;
      background: #3e5262;           /* more visible */
      border-radius: 4px;
      overflow: hidden;
      cursor: pointer;
    }

    .progress-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, #f0c27b, #e09d5e);
      border-radius: 4px;
      transition: width 0.1s linear;
    }

    .progress-bar-container.active .progress-fill {
      background: linear-gradient(90deg, #ffb85c, #ff8c42); /* page golde #D4AF37 */
      box-shadow: 0 0 12px #ffb347;
    }

    /* footer */
    .reel-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 18px;
      background: #121f29;
      border-top: 1px solid #2f4353;
      color: #bcd1e0;
      font-size: 0.8rem;
      letter-spacing: 1px;
      text-transform: uppercase;
    }

    .play-pause-btn {
      background: none;
      border: none;
      color: #ffdeb4;
      font-size: 1.2rem;
      cursor: pointer;
      padding: 0 8px;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: all 0.2s;
      font-family: inherit;
      letter-spacing: 1px;
    }

    .play-pause-btn:hover {
      color: #ffb347;
      transform: scale(1.05);
    }

    .play-pause-btn .icon {
      font-size: 1.4rem;
      line-height: 1;
    }

    .autoplay-badge {
      display: flex;
      align-items: center;
      gap: 4px;
      color: #b6cfde;
    }

.play-pause-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 8px;
  display: flex;
  align-items: center;
  transition: all 0.2s;
  font-size: 1.4rem;
}

.play-pause-btn i {
  color: white;
  transition: color 0.2s;
}

.play-pause-btn:hover i {
  color: #ffb347;
}

/***************************************************/

/* ONE BORDER AROUND ALL TEXT - SLIDES 1,2,3 */
.slide-1 .film-text,
.slide-2 .film-text,
.slide-3 .film-text {
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 30px 40px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
  max-width: 90%;
  width: fit-content;
  margin: 0 auto;
  text-align: center;
}

.slide-1 .film-text > *,
.slide-2 .film-text > *,
.slide-3 .film-text > * {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.film-headline-wrapper {
  display: flex;
  justify-content: center;  /* centers the long word inside the border */
}

/* Slide 4 - no border */
.slide-4 .film-text {
  border: none;
  background: transparent;
  backdrop-filter: none;
  padding: 2.2rem;
}








/* ============================================
   CENTER SLIDERS ON ALL DEVICES
   ============================================ */

/* Center Showreel Slider */
#showreel .vslider-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
/*
#showreel .vslider-wrapper {
    margin: 0 auto;
    width: min(90vw, 900px);
}
*/

/* Center Instagram Slider */
#insta_slider {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.slider-cinema {
    margin: 0 auto;
    width: 560px;
    max-width: 90vw;
}

/* Showreel section - ADD SPACE ABOVE & BELOW */
#showreel {
    padding-top: 120px;
    padding-bottom: 60px;
    min-height: 100vh;  /* Ensures vertical centering on tall screens */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Additional responsive centering for smaller devices */
@media (max-width: 768px) {
    .slider-cinema {
        width: 95vw;
        max-width: 95vw;
    }
    
    #showreel .vslider-wrapper {
        width: 95vw;
    }
    
    #showreel {
        padding-top: 80px;
        padding-bottom: 80px;
    }
}

/* Ensure the sections themselves have proper spacing */
#showreel,
#insta_slider {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Remove any left/right padding that might offset centering */
#showreel .glass-card,
#insta_slider .glass-card {
    padding-left: 0;
    padding-right: 0;
}

/* Optional: Add responsive container to keep sliders centered */
@media (max-width: 480px) {
    .slider-cinema {
        width: 98vw;
        border-radius: 20px;
    }
    
    .vslider-wrapper {
        width: 98vw;
    }
    
    .vslider-window {
        border-radius: 16px;
    }
    
    #showreel {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}
	
@media (max-width: 1000px) {
	#sliderRightButtons {
		display: none !important;
	}
}	
