/**
* @ Vidiom
* Responsive CSS
**/

/* Extra large */
@media screen and ( max-width: 1199.98px ) {

	.vidiom-main-content.icon-sidebar .vidiom-live-chat {
		grid-template-columns: 2fr 2fr 2fr;
	}

	.vidiom-main-content .vidiom-live-chat {
		grid-template-columns: 2fr 2fr;
	}

	.multi-product {
		margin-top: 0;
	}

	/* 16:9 aspect ratio for video containers */
	.vidiom-single-video .thumbnail-container iframe, 
	.vidiom-single-video .thumbnail-container video {
		aspect-ratio: 16/9;
		min-height: 180px;
	}

}

/* Large */
@media screen and ( max-width: 991.98px ) {

	.show-for-tab-mobile {
		display: flex;
		margin-left: -15px;
	}

	.carousel-caption.text-left {
		margin-left: 30px;
	}

	.carousel-caption.text-right {
		margin-right: 30px;
	}

	.hero-slide-inner-image {
		text-align: left;
		margin-top: 50px;
	}

	.movie-info {
		margin: 15px 0 30px;
	}

	.vidiom-main-slide .carousel-caption h1, 
	.vidiom-main-slide .carousel-caption h2 {
		font-size: 35px;
		margin-bottom: 30px;
	}

	.movie-slider .slide-video {
		width: 50%;
	}

	.cat-nav-link,
	.squire-item .cat-nav-link {
		margin: 0 55px 30px 50px;
	}
	
	.vidiom-main-content .vidiom-live-chat,
	.vidiom-main-content.icon-sidebar .vidiom-live-chat {
		grid-template-columns: 2fr 2fr;
	}

	.only-for-desktop,
	.audioPodcast-container table th:nth-child(2),
	.audioPodcast-container table td:nth-child(2),
	.audioPodcast-container table th:nth-child(3),
	.audioPodcast-container table td:nth-child(3),
	.audioPodcast-container table th:nth-child(4),
	.audioPodcast-container table td:nth-child(4),
	.vidiom-testimonial .slider-content::before,
	.vidiom-main-slide .carousel-caption p, 
	.movie-slider .carousel-caption p,
	.movie-grid-selector,
	.grid-selector {
		display: none;
	}

	.song-play-icon .song-artist {
		display: block
	}

	.cat-nav-link .bi-chevron-right.slick-arrow {
		right: -40px;
	}

	.vidiom-testimonial {
		padding: 50px 0
	}

	.vidiom-testimonial .slider-nav {
        padding: 0 30px;
    }

	.vidiom-testimonial .slider-content{
        padding: 0;
    }

	.author-assets .author-search {
		margin: 30px 0;
	}

	.author-assets .member-image img {
		max-height: 150px;
		min-height: 150px;
	}
	
	.editor-pick {
		display: block;
	}

	.editor-pick .post-item {
		margin-bottom: 30px
	}

	.editor-pick .post-item:nth-child(3) {
		margin-bottom: 0
	}

	.vidiom-alert .sale-image {
		opacity: 0.3;
	}

	.vidiom-main-navbar .navbar-nav {
		margin: 0
	}

	.subscribe-form {
		width: 100%;
	}

	.nav-search {
		width: 100%;
		margin-bottom: 30px
	}

	.nav-item .submenu{ 
		left: 30px; 
		top: 40px;
	}

	.nav-item .submenu-left{ 
		right: 30px; 
		left: auto;
	}

	.dropdown-menu > li:hover{ 
		background-color: #f1f1f1 
	}

	.vidiom-dark .dropdown-menu > li:hover {
		background-color: transparent
	}

	.dropdown-menu > li:hover > .submenu{ 
		display: block; 
	}

	.vidiom-main-navbar .main-nav-profile,
	.video-upload, 
	.mode-switcher {
		display: inline-block;
		margin-bottom: 15px
	}

	.video-upload {
		margin-left: 15px;
	}

	.vidiom-footer .useful-links {
		margin-top: 30px;
	}

	/* Mobile: sidebar is rendered only when expanded (Vue v-if).
	   Style it as an overlay and do NOT affect content width. */
	.vidiom-content-sidebar {
		position: fixed !important;
		left: 0 !important;
		top: 0 !important;
		bottom: 0 !important;
		z-index: 1035 !important;
		width: min(80vw, 320px) !important;
		max-width: 80vw !important;
		box-shadow: 6px 0 18px rgba(0, 0, 0, 0.35) !important;
		display: block !important;
		visibility: visible !important;
		height: auto !important;
		overflow: visible !important;
		opacity: 1 !important;
		pointer-events: auto !important;
	}

	.vidiom-content-body {
		width: 100% !important;
		margin-left: 0 !important;
	}

	/* Content body always full width on mobile */
	.vidiom-content-body,
	.vidiom-content-body-full {
		margin-left: 0 !important;
		width: 100% !important;
	}
}

/* Medium */
@media screen and ( max-width: 767.98px ) {

	.movie-slider .slide-content h3,
	.movie-slider .slide-video,
	.sidebar-following,
	.mode-switcher span,
	.side-nav ul.sidebar-footer,
	span.sidebar-copyright {
		display: none;
	}

	/* When sidebar is collapsed/hidden on mobile, hide link text */
	.vidiom-main-content.icon-sidebar .side-nav .dropdown a span,
	.vidiom-main-content.icon-sidebar .side-nav .nav-pills .nav-link span {
		display: none !important;
	}

	.movie-slider .slide-content {
		width: 100%;
	}

	.vidiom-cta img {
		margin-top: 30px;
	}

	.vidiom-main-content .vidiom-live-chat,
	.vidiom-main-content.icon-sidebar .vidiom-live-chat {
		grid-template-columns: 2fr 2fr 2fr 2fr;
	}

	.side-nav .dropdown a, 
	.side-nav .nav-pills .nav-link {
		display: block;
	}

	.vidiom-main-slide {
		margin-right: -14px;
		margin-bottom: 30px;
	}
	
	.vidiom-live-chat {
		grid-template-columns: 2fr 2fr 2fr;
	}

	.mega-menu-wrapper ul.large-menu-items {
		margin-bottom: 30px;
	}

	.blog-thumbnail img {
		margin-bottom: 30px;
	}

	/* Sidebar visibility on mobile is handled in the max-width: 991.98px block above.
	   Do NOT force a 55px icon sidebar here (it breaks mobile hide/show). */

	.side-nav .dropdown a svg, 
	.side-nav .nav-pills .nav-link svg {
		margin: 0;
	}
	
	.side-nav {
		text-align: center;
	}

	.menuToggleIcon {
		cursor: pointer;
		width: 44px;
		height: 44px;
		min-width: 44px;
		min-height: 44px;
	}

	.alert-content {
		padding: 15px;
	}
}

/* Small devices (landscape phones, 576px and up) */
@media ( max-width: 575.98px ) { 

	/* Ensure video players maintain good height on small screens */
	.thumbnail-container iframe,
	.thumbnail-container video,
	.vidiom-single-video .thumbnail-container iframe,
	.vidiom-single-video .thumbnail-container video {
		min-height: 150px; /* Optimized for 16:9 aspect ratio */
		aspect-ratio: 16/9;
	}

	.carousel-caption.text-left {
		margin-left: 15px;
	}

	.carousel-caption.text-right {
		margin-right: 15px;
	}

	.song-poster-box {
		width: 0
	}
	
	.premium-button .vidiom-primary {
		font-size: 13px;
		padding: 5px 15px
	}

	.subscribe-box .subscribe-image {
		display: none
	}

	.author-image,
	.movie-information li,
	.video-meta, 
	.video-author,
	.movie-information span:first-child,
	.author-content-container {
		display: block;
	}

	.social-links,
	.video-author-left,
	.author-image img {
		margin-bottom: 15px;
	}

	.author-assets .member-image img {
		max-height: 250px;
		min-height: 250px;
	}

	.sidebar-video .video-container {
		display: block;
	}

	.sidebar-video .thumbnail-container {
		margin-right: 0;
	}

	.sidebar-video .video-content h3 {
		margin: 25px 0 5px 0
	}
}

/* X-Small */
@media screen and ( max-width: 479.98px ) {

	.title-left h4, 
	.title-left h3, 
	.title-left h2, 
	.mega-menu-wrapper .menu-title {
		font-size: 17px;
	}

	/* Ensure video players maintain good height on small screens */
	.thumbnail-container iframe,
	.thumbnail-container video,
	.vidiom-single-video .thumbnail-container iframe,
	.vidiom-single-video .thumbnail-container video {
		min-height: 170px; /* Increased from 150px to 170px */
	}

	.vidiom-cta {
		padding: 30px
	}

	.vidiom-main-content .vidiom-live-chat,
	.vidiom-main-content.icon-sidebar .vidiom-live-chat {
		grid-template-columns: 2fr 2fr;
	}

	.children {
		margin-left: 0;
		padding-left: 15px;
	}

	.editor-pick .post-details a {
		font-size: 20px;
		line-height: 25px;
	}

	.menu-toggle {
		display: none;
	}

	.main-navigation ul {
		display: flex;
	}

	.alert-content {
		padding: 5px;
	}

	button, input[type="button"], 
	input[type="reset"], 
	input[type="submit"], 
	.wp-block-search .wp-block-search__button, 
	a.vidiom-primary {
		padding: 10px
	}
}

/* Devices between 992 and 1320 */
@media (min-width: 991.98px ) and (max-width: 1320px) {

	.sidebar-video .video-container {
		display: block;
	}

	.sidebar-video .thumbnail-container {
		margin-right: 0;
	}

	.sidebar-video .video-content h3 {
		margin: 25px 0 5px 0
	}

}

/* Touch optimizations for all mobile devices */
@media screen and ( max-width: 767.98px ) {
	/* Touch action properties for better mobile performance */
	.embla__container,
	.carousel,
	.slider {
		touch-action: pan-x pan-y;
		-webkit-overflow-scrolling: touch;
	}

	/* Optimize hover states for touch - reduce or disable */
	.embla__slide:hover .video-container {
		transform: none;
		box-shadow: none;
	}

	/* Use active states for touch feedback */
	.embla__slide:active .video-container {
		opacity: 0.9;
		transform: scale(0.98);
	}

	/* Touch-friendly interactive elements */
	button,
	.btn,
	a,
	.nav-link,
	.dropdown-item,
	.carousel-control-prev,
	.carousel-control-next,
	.carousel-indicators button {
		touch-action: manipulation;
		-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
	}

	/* Prevent accidental zoom on double tap */
	* {
		touch-action: manipulation;
	}

	/* Re-enable pan for scrollable containers */
	.vidiom-content-body,
	.vidiom-content-body-full,
	.embla__container,
	.carousel-inner {
		touch-action: pan-y;
	}

	/* Horizontal scroll containers */
	.embla__container {
		touch-action: pan-x pan-y;
	}
}

/* Galaxy S5 and similar small phones (360px width) */
@media screen and ( max-width: 360px ) {

	/* Typography - ensure minimum 16px base font to prevent iOS zoom */
	body {
		font-size: 16px;
		line-height: 1.5;
	}

	/* Heading sizes optimized for small screens */
	h1 {
		font-size: 24px;
		line-height: 1.3;
		margin: 10px 0;
	}

	h2 {
		font-size: 20px;
		line-height: 1.3;
		margin: 8px 0;
	}

	h3 {
		font-size: 18px;
		line-height: 1.3;
		margin: 8px 0;
	}

	h4 {
		font-size: 16px;
		line-height: 1.3;
		margin: 6px 0;
	}

	/* Touch targets - minimum 44px × 44px */
	button, 
	input[type="button"], 
	input[type="submit"], 
	input[type="reset"],
	.btn,
	.nav-link,
	.dropdown-item,
	a.vidiom-primary {
		min-height: 44px;
		min-width: 44px;
		padding: 10px 15px;
		font-size: 16px;
	}

	/* Navbar optimizations */
	.vidiom-main-navbar {
		padding: 6px 10px;
	}

	.vidiom-main-navbar .container-fluid {
		flex-wrap: nowrap !important;
		align-items: center !important;
	}

	.navbar-brand {
		padding: 0;
		margin: 0 5px 0 0;
		display: flex;
		align-items: center;
		justify-content: center;
		height: 40px;
		min-height: 40px;
	}

	.navbar-brand img {
		max-height: 34px;
		height: auto;
		width: auto;
		display: block;
		object-fit: contain;
		margin: 0;
		padding: 0;
	}

	/* Ensure only correct logo shows in dark mode */
	.vidiom-dark .navbar-brand:not(.logo-light) {
		display: none !important;
	}

	.vidiom-dark .navbar-brand.logo-light {
		display: flex !important;
		align-items: center;
		justify-content: center;
		height: 40px;
		min-height: 40px;
		padding: 0;
		margin: 0 5px 0 0;
	}

	.navbar-toggler {
		min-width: 44px;
		min-height: 44px;
		padding: 8px;
	}

	.nav-search {
		width: 100%;
		margin: 10px 0;
	}

	.nav-search .form-control {
		font-size: 16px;
		min-height: 44px;
		padding: 10px 15px;
	}

	.search-btn {
		min-width: 44px;
		min-height: 44px;
		padding: 10px;
	}

	.video-upload {
		min-width: 44px;
		min-height: 44px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.video-upload svg {
		width: 32px;
		height: 32px;
	}

	.main-nav-profile button {
		min-width: 44px;
		min-height: 44px;
		padding: 10px;
	}

	/* Dropdown menus - full width on mobile */
	.dropdown-menu {
		width: 100%;
		max-width: 100vw;
		left: 0 !important;
		right: 0 !important;
		margin: 0;
		border-radius: 0;
	}

	.dropdown-item {
		min-height: 44px;
		padding: 12px 15px;
		font-size: 16px;
	}

	/* Carousel optimizations */
	.vidiom-main-slide {
		max-height: 60vh;
		overflow: hidden;
	}

	.vidiom-main-slide img {
		object-fit: cover;
		height: 60vh;
		max-height: 400px;
	}

	.vidiom-main-slide .carousel-caption h1,
	.vidiom-main-slide .carousel-caption h2 {
		font-size: 18px;
		margin-bottom: 8px;
		line-height: 1.2;
	}

	.carousel-caption {
		padding: 8px;
		bottom: 5px;
		left: 5px;
		right: 5px;
		background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
		border-radius: 4px;
	}

	.carousel-caption p {
		font-size: 12px;
		line-height: 1.3;
		margin-bottom: 6px;
	}

	.carousel-indicators {
		bottom: 5px;
		margin-bottom: 5px;
		flex-wrap: wrap;
		justify-content: center;
	}

	.carousel-indicators button {
		min-width: 30px;
		min-height: 24px;
		font-size: 9px;
		padding: 3px 5px;
		margin: 0 2px;
		line-height: 1.2;
	}

	/* Spacing optimizations */
	.container {
		padding-left: 10px;
		padding-right: 10px;
	}

	.vidiom-cta {
		padding: 20px 15px;
	}

	.vidiom-cta h2 {
		font-size: 18px;
		margin-bottom: 10px;
	}

	.vidiom-cta p {
		font-size: 14px;
		margin-bottom: 15px;
	}

	/* Form inputs - ensure minimum 44px height for touch */
	input[type="text"],
	input[type="email"],
	input[type="password"],
	input[type="search"],
	input[type="tel"],
	input[type="url"],
	input[type="number"],
	input[type="date"],
	input[type="time"],
	textarea,
	select {
		min-height: 44px;
		font-size: 16px;
		padding: 10px 15px;
		-webkit-appearance: none;
		appearance: none;
		border-radius: 4px;
	}

	textarea {
		min-height: 88px;
		resize: vertical;
	}

	/* Form labels */
	label {
		font-size: 16px;
		margin-bottom: 8px;
		display: block;
	}

	/* Form groups - single column layout */
	.form-group,
	.mb-3,
	.mb-4 {
		margin-bottom: 20px;
		width: 100%;
	}

	/* Form rows - stack on mobile */
	.form-row,
	.row {
		flex-direction: column;
	}

	.form-row .col,
	.row .col,
	.form-row [class*="col-"],
	.row [class*="col-"] {
		width: 100%;
		margin-bottom: 15px;
	}

	/* Form buttons */
	.btn,
	button[type="submit"],
	button[type="button"],
	input[type="submit"],
	input[type="button"] {
		min-height: 44px;
		min-width: 44px;
		font-size: 16px;
		padding: 12px 20px;
		-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
		touch-action: manipulation;
	}

	/* Form controls in groups */
	.input-group {
		flex-direction: column;
		width: 100%;
	}

	.input-group .form-control {
		border-radius: 4px;
		margin-bottom: 10px;
	}

	.input-group-append,
	.input-group-prepend {
		width: 100%;
	}

	.input-group-append .btn,
	.input-group-prepend .btn {
		width: 100%;
		border-radius: 4px;
	}

	/* Checkboxes and radio buttons - larger touch targets */
	input[type="checkbox"],
	input[type="radio"] {
		min-width: 20px;
		min-height: 20px;
		width: 20px;
		height: 20px;
		margin-right: 10px;
	}

	.form-check-label {
		font-size: 16px;
		padding-left: 5px;
		display: flex;
		align-items: center;
		min-height: 44px;
	}

	/* Select dropdowns */
	select {
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
		background-repeat: no-repeat;
		background-position: right 12px center;
		background-size: 12px;
		padding-right: 40px;
	}

	/* Video thumbnails and cards */
	.video-container {
		padding: 8px;
	}

	.thumbnail-container {
		min-height: 180px;
	}

	/* Movie info spacing */
	.movie-info {
		margin: 10px 0 15px;
		font-size: 14px;
	}

	.movie-info span {
		margin-right: 8px;
	}

	/* Button wrapper spacing */
	.button-wrapper {
		margin: 15px 0;
	}

	.button-wrapper .vidiom-primary {
		font-size: 14px;
		padding: 12px 20px;
		min-height: 44px;
	}

	/* Hero slide inner image */
	.hero-slide-inner-image {
		margin-top: 20px;
	}

	.hero-slide-inner-image svg {
		width: 60px;
		height: 60px;
	}

	.hero-slide-inner-image h4 {
		font-size: 14px;
		margin-top: 10px;
	}

	/* Pricing plan text */
	.pricing-plan-ad {
		font-size: 18px;
		margin: 10px 0;
	}

	.pricing-plan-ad span {
		font-size: 20px;
	}

	.free-trial-text {
		font-size: 12px;
		margin-top: 10px;
	}

	/* Touch action optimizations */
	.embla__container {
		touch-action: pan-x pan-y;
	}

	/* Ensure proper spacing for mobile */
	.movie-slider .slide-content {
		padding: 10px;
	}

	/* Notification cards */
	.notification-card {
		margin-bottom: 10px;
	}

	.notification-card .card-body {
		padding: 12px;
	}

	.notification-message {
		font-size: 14px;
		line-height: 1.4;
	}

	/* User profile dropdown */
	.user-profile-dropdown {
		width: 100%;
		max-width: 100vw;
	}

	.user-name {
		padding: 12px 15px;
		font-size: 16px;
	}

	/* General touch optimizations */
	* {
		-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
	}

	/* Disable hover effects on touch devices - use :active instead */
	a:hover,
	button:hover,
	.btn:hover,
	.nav-link:hover {
		/* Hover effects disabled on small screens - use :active for touch feedback */
	}

	/* Active states for touch feedback */
	a:active,
	button:active,
	.btn:active,
	.nav-link:active,
	.dropdown-item:active {
		opacity: 0.7;
		transform: scale(0.98);
		transition: transform 0.1s ease, opacity 0.1s ease;
	}

	/* Ensure smooth scrolling */
	html {
		scroll-behavior: smooth;
		-webkit-overflow-scrolling: touch;
	}

	/* Prevent text selection on interactive elements during touch */
	button,
	.btn,
	.nav-link,
	.dropdown-item {
		-webkit-user-select: none;
		-moz-user-select: none;
		-ms-user-select: none;
		user-select: none;
		touch-action: manipulation;
	}
}

