/*
 Theme Name:   Edumoon Child Theme
 Theme URI:    https://getmasum.com/themes-wp/edumoon/
 Description:  This is Edumoon Child Theme
 Author:       themesvila
 Author URI:   https://themeforest.net/user/themesvila
 Template:     edumoon
 Version:      1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:  two-columns, right-sidebar
 Text Domain:  edumoon-child
*/

/* =============================================================================
   Mobile Loading Fixes - Sinjab Academy
   ============================================================================= */

/* Fix Preloader Background Color to Match Site Theme */
.preloader {
	background: linear-gradient(135deg, #e2b830 0%, #f4c844 100%) !important;
	min-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	position: fixed;
	width: 100%;
	height: 100%;
	z-index: 99999;
	transition: opacity 0.3s ease-out;
}

/* Ensure Preloader Animation Works on Mobile */
.preloader .book-style {
	--color: #fff;
	--duration: 3s; /* Reduced duration for better mobile experience */
	width: 32px;
	height: 12px;
	position: relative;
	margin: 32px 0 0 0;
	zoom: 2; /* Increased size for better mobile visibility */
}

/* Mobile-Specific Preloader Optimizations */
@media only screen and (max-width: 768px) {
	.preloader {
		background: linear-gradient(135deg, #e2b830 0%, #f4c844 100%) !important;
		/* Add subtle pattern for mobile loading indication */
		background-image:
			radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%),
			radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 0%, transparent 50%);
		background-size: 200px 200px;
		background-position: 0 0, 100px 100px;
		animation: preloader-bg 4s ease-in-out infinite;
	}

	.preloader .book-style {
		zoom: 1.8; /* Slightly smaller on mobile */
		--duration: 2.5s; /* Faster animation for mobile */
	}

	/* Add loading text for mobile accessibility */
	.preloader::after {
		content: "Loading...";
		position: absolute;
		bottom: 30%;
		left: 50%;
		transform: translateX(-50%);
		color: #fff;
		font-size: 18px;
		font-weight: 600;
		letter-spacing: 1px;
		animation: loading-pulse 1.5s ease-in-out infinite;
	}
}

@media only screen and (max-width: 480px) {
	.preloader .book-style {
		zoom: 1.5; /* Even smaller on small mobile screens */
		--duration: 2s;
	}

	.preloader::after {
		font-size: 16px;
		bottom: 25%;
	}
}

/* Background Animation for Mobile Loading */
@keyframes preloader-bg {
	0%, 100% {
		background-position: 0 0, 100px 100px;
	}
	50% {
		background-position: 100px 0, 0 100px;
	}
}

/* Loading Text Animation */
@keyframes loading-pulse {
	0%, 100% {
		opacity: 0.7;
		transform: translateX(-50%) scale(1);
	}
	50% {
		opacity: 1;
		transform: translateX(-50%) scale(1.05);
	}
}

/* Prevent Body Scroll During Loading */
body.loading {
	overflow: hidden !important;
	height: 100vh !important;
}

/* Ensure Smooth Transition After Loading */
.preloader.fadeOut {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

/* Fix for Mobile Safari Loading Issues */
@supports (-webkit-touch-callout: none) {
	.preloader {
		position: fixed !important;
		-webkit-transform: translateZ(0);
		transform: translateZ(0);
		will-change: transform, opacity;
	}
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
	.preloader {
		/* Faster loading for touch devices */
		animation-duration: 2s;
	}

	.preloader .book-style {
		--duration: 2s;
		/* Hardware acceleration for smooth animation */
		-webkit-transform: translateZ(0);
		transform: translateZ(0);
		will-change: transform;
	}
}

/* =============================================================================
   Sticky Header Implementation
   ============================================================================= */

/* Sticky Header Styles - Overridden by functions.php for transparency */

/* Logo resizing when sticky is active */
#navigation.sticky-header .site-logo img {
	max-height: 75px !important;
	width: auto !important;
	transition: all 0.3s ease !important;
}

/* Default logo size */
#navigation .site-logo img {
	max-height: 150px !important;
	width: auto !important;
	transition: all 0.3s ease !important;
}

/* Ensure smooth transitions */
#navigation {
	transition: all 0.3s ease !important;
}

/* Body padding handled by functions.php for overlay effect */

/* Mobile responsive adjustments for sticky header */
@media only screen and (max-width: 768px) {
	#navigation.sticky-header {
		padding: 8px 20px !important;
	}

	#navigation.sticky-header .site-logo img {
		max-height: 60px !important;
	}

	#navigation .site-logo img {
		max-height: 120px !important;
	}

	body.sticky-active {
		padding-top: 80px !important;
	}
}

@media only screen and (max-width: 480px) {
	#navigation.sticky-header {
		padding: 5px 15px !important;
	}

	#navigation.sticky-header .site-logo img {
		max-height: 50px !important;
	}

	#navigation .site-logo img {
		max-height: 100px !important;
	}

	body.sticky-active {
		padding-top: 70px !important;
	}
}

/* ===== CF7 file upload row ONLY ===== */
.wpcf7 .file-upload {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;                  /* filename sits a bit below the row */
  }

  /* hide native input but keep accessible */
  .wpcf7 .file-upload .file-hidden {
	position: absolute;
	inset: 0;
	width: 0.1px; height: 0.1px;
	opacity: 0;
	pointer-events: none;
  }

  /* the visible pill row (acts like "Browse…") */
  .wpcf7 .file-upload .file-btn {
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 18px;
	border: 1.5px solid #D7DCE6;      /* light outline */
	border-radius: 999px;              /* pill */
	background: #fff;
	color: #1E1E2F;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	transition: border-color .2s, box-shadow .2s, background .2s;
  }

  /* subtle hover */
  .wpcf7 .file-upload .file-btn:hover {
	border-color: #C9D0DE;
  }

  /* focus ring when file input is keyboard-focused */
  .wpcf7 .file-upload:has(.file-hidden:focus-visible) .file-btn {
	outline: none;
	border-color: #9B5DE5;
	box-shadow: 0 0 0 4px rgba(155,93,229,.18);
  }

  /* add a “+” at the end like your screenshot */
  .wpcf7 .file-upload .file-btn::after {
	content: "+";
	font-size: 1.1rem;
	line-height: 1;
	opacity: .85;
  }

  /* filename under the row */
  .wpcf7 .file-upload .file-name {
	display: block;
	font-size: .9rem;
	color: #6B7280;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
  }

  /* (optional) drag-over effect if you enable drop in JS */
  .wpcf7 .file-upload.dragover .file-btn {
	border-color: #9B5DE5;
	box-shadow: 0 0 0 4px rgba(155,93,229,.18);
  }

/* =============================================================================
   Banner Video Controls
   ============================================================================= */

/* Video controls container */
.video-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Show controls on hover */
.home-banner[data-show-controls="true"]:hover .video-controls {
    opacity: 1;
    visibility: visible;
}

/* Video control buttons */
.video-controls button {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.video-controls button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.video-controls button i {
    font-size: 18px;
    line-height: 1;
}

/* Video overlay adjustments */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
}

/* Ensure video controls are above overlay */
.video-controls {
    z-index: 15;
}

/* Prevent video from blocking clicks to content */
.banner-video-bg {
    pointer-events: none;
}

/* Never show controls if disabled */
.home-banner[data-show-controls="false"] .video-controls {
    display: none !important;
}

/* Mobile responsive video controls */
@media only screen and (max-width: 768px) {
    .video-controls {
        bottom: 15px;
        right: 15px;
        gap: 8px;
    }

    .video-controls button {
        width: 40px;
        height: 40px;
    }

    .video-controls button i {
        font-size: 16px;
    }
}

@media only screen and (max-width: 480px) {
    .video-controls {
        bottom: 10px;
        right: 10px;
        gap: 6px;
    }

    .video-controls button {
        width: 35px;
        height: 35px;
    }

    .video-controls button i {
        font-size: 14px;
    }
}

/* Video loading state */
.banner-video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

/* Video container positioning */
.home-banner {
    position: relative;
    overflow: hidden;
}

/* Ensure video doesn't interfere with content */
.home-banner .container {
    position: relative;
    z-index: 5;
}

/* Ensure banner content and buttons are always clickable */
.home-banner .banner-content,
.home-banner .banner-content-inner,
.home-banner .bbtns,
.home-banner .bbtns a {
    position: relative;
    z-index: 20;
    pointer-events: auto;
}

/* Decorative layers should not capture clicks */
.home-banner .banner_img,
.home-banner .banner_img_inner,
.home-banner .bg_shapes,
.home-banner .tpshape,
.home-banner .btmshape,
.home-banner .bwavehape,
.home-banner .book_icon,
.home-banner .circle_shape {
    pointer-events: none;
}
  
