/**
 * Home Page Styles - Cima Club
 * Matches the design from home 1.png
 */

/* Container */
.container-wide {
	max-width: 1400px;
	margin: 0 auto;
	padding:20px;
}

/* ============================================
   CATEGORY BUTTONS SECTION
============================================ */
.category-buttons-section {
	background: #212342;
	padding: 20px 0;
	margin-bottom: 20px;
	padding: 20px;
}

.category-buttons {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
	max-width: 900px;
	margin: 0 auto;
}

.cat-btn {
	background: linear-gradient(135deg, #4978d2 0%, #3a5ba8 100%);
	border: none;
	border-radius: 12px;
	padding: 18px 20px;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-shadow: 0 4px 15px rgba(73, 120, 210, 0.3);
}

.cat-btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(73, 120, 210, 0.5);
	background: linear-gradient(135deg, #5a88e2 0%, #4a6bb8 100%);
}

.cat-btn:active {
	transform: translateY(-1px);
}

.cat-btn.active {
	background: linear-gradient(135deg, #2a5ba8 0%, #1a4078 100%);
	box-shadow: 0 2px 10px rgba(73, 120, 210, 0.8);
}

.cat-btn i {
	font-size: 20px;
}

@media (max-width: 768px) {
	.category-buttons {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	
	.cat-btn {
		padding: 15px 10px;
		font-size: 14px;
	}
	
	.cat-btn i {
		font-size: 18px;
	}
}

/* ============================================
   SECTION HEADERS & GRIDS
============================================ */
.section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 25px;
}

.section-title {
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}

.section-title i {
	color: #4978d2;
	font-size: 26px;
}

.movies-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 20px;
}

@media (max-width: 1200px) {
	.movies-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (max-width: 992px) {
	.movies-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.movies-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 15px;
	}
	
	.section-title {
		font-size: 20px;
	}
}

/* ============================================
   CATEGORY SECTIONS (HIDDEN)
============================================ */
.category-section {
	background: #1a1c30;
	padding: 30px 0;
	margin-bottom: 30px;
	animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.close-section {
	background: #dc3545;
	border: none;
	border-radius: 8px;
	color: #fff;
	padding: 10px 15px;
	cursor: pointer;
	font-size: 18px;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.close-section:hover {
	background: #c82333;
	transform: scale(1.05);
}

.category-section .section-header {
	border-bottom: 2px solid #4978d2;
	padding-bottom: 15px;
}

.category-section .movies-grid {
	grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1200px) {
	.category-section .movies-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (max-width: 992px) {
	.category-section .movies-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.category-section .movies-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Main Home Container */
.ciimaclub-home {
	background: #212342 !important;
	min-height: 100vh;
	padding: 0;
}

/* إزالة أي خلفية بيضاء */
.site-main,
main,
.container-wide,
body,
html {
	background: #212342 !important;
}

/* التأكد من عدم وجود خلفية بيضاء في الفوتر */
.site-footer,
footer {
	background: #1a1c30 !important;
	margin: 0 !important;
	padding-top: 0 !important;
}

/* إزالة الفجوة البيضاء بين الأقسام */
.ciimaclub-home::after,
.ciimaclub-home::before,
main::after,
main::before {
	display: none !important;
}

/* إزالة أي padding قد يسبب فجوة */
#primary {
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
}

.site-content {
	background: #212342 !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* ============================================
   FEATURED SLIDER SECTION - EXACT MATCH
============================================ */
.slider-outer {
	margin-bottom: 30px;
	background: #212342;
}

.content-wrapper {
	max-width: 100%;
	width: 100%;
}


/* أزرار التحكم */
.arrow-right,
.arrow-left {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 99;
	background: #4978d2;
	cursor: pointer;
	color: #fff;
	font-size: 19px;
	transition: .3s ease;
	width: 50px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.arrow-right {
	right: 0;
	border-radius: 50px 0 0 50px;
}

.arrow-left {
	left: 0;
	border-radius: 0 50px 50px 0;
}

.arrow-right:hover,
.arrow-left:hover {
	background: #3d65b8;
}

/* البطاقات */
.slides-main {
	overflow: hidden;
	direction: ltr;
}

.slides-item .block-item {
	width: 100%;
	margin: 0;
	padding: 0;
}

.block-item {
	display: inline-block;
	vertical-align: top;
	position: relative;
	flex: 1;
	margin: 0;
	overflow: hidden;
}

.block-item a {
	display: block;
	width: 100%;
	height: 100%;
	position: relative;
}

/* الصورة */
.block-item a .poster-block {
	display: block;
	width: 100%;
	height: 100%;
	padding-bottom: 150%;
	position: relative;
	overflow: hidden;
	border-radius: 4px;
}

.block-item a .poster-block img {
	object-fit: cover;
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: 100%;
	transition: .3s;
}

.block-item a:hover .poster-block img {
	transform: scale(1.1);
}

/* شريط الجودة المائل */
.ribbon {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 9;
	overflow: hidden;
	width: 110px;
	height: 110px;
	pointer-events: none;
}

.ribbon span {
	position: absolute;
	top: 30px;
	left: -61px;
	width: 200px;
	height: 27px;
	text-align: center;
	font-size: 13px;
	line-height: 27px;
	color: #ffffff;
	transform: rotate(-45deg);
	z-index: 9;
	box-shadow: 0 0 3px #563e7d;
	background: #563e7d;
	font-weight: 600;
	font-family: 'Cairo', sans-serif;
}

.block-item a:hover .ribbon span {
	opacity: 0;
	transition: .3s;
}

/* معلومات البطاقة */
.block-item a .block-info {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 100%;
	background: linear-gradient(180deg, #1d1d1d00, #000 70%);
	padding: 50px 8px 10px;
	transition: .3s .1s;
	opacity: 1;
}

.block-item a .block-info h3 {
	font-size: 14px;
	text-align: center;
	direction: rtl;
	font-weight: 400;
	color: #fff;
	margin: 0;
	font-family: 'Cairo', sans-serif;
	line-height: 1.4;
	min-height: 40px;
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition: none;
}

/* Year Badge */
.block-item .year-badge {
	display: inline-block;
	font-size: 11px;
	color: #29b5e8;
	background: rgba(41, 181, 232, 0.15);
	padding: 2px 8px;
	border-radius: 4px;
	margin-top: 4px;
	font-family: 'Cairo', sans-serif;
}

/* Responsive للسلايدر */
@media (max-width: 768px) {
	
	.arrow-right,
	.arrow-left {
		width: 40px;
		height: 36px;
		font-size: 16px;
	}
	
	.ribbon span {
		font-size: 11px;
		height: 24px;
		line-height: 24px;
		top: 25px;
	}
	
	.block-item a .block-info h3 {
		font-size: 13px;
		min-height: 35px;
	}
}

/* ============================================
   CONTENT SECTIONS
============================================ */
.content-section {
	padding: 30px 0;
	background: #212342;
}

.section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid #29b5e8;
}

.section-title {
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	margin: 0;
	font-family: 'Cairo', sans-serif;
}

.view-all-btn {
	background: #29b5e8;
	color: #fff;
	padding: 8px 20px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	font-family: 'Cairo', sans-serif;
	transition: all 0.3s ease;
	display: inline-block;
}
a.view-all-btn {
    color: #ffffff;
}

.view-all-btn:hover {
	background: #1f9fd1;
	transform: translateY(-2px);
	text-decoration: none;
	color: #fff;
}

/* ============================================
   CONTENT GRID
============================================ */
.content-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 15px;
}

/* Content Card */
.content-card {
	background: #34495e;
	border-radius: 8px;
	overflow: hidden;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.content-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.content-card .card-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

/* Card Image */
.card-image {
	position: relative;
	padding-top: 150%;
	background: #1a252f;
	overflow: hidden;
}

.card-image .poster-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.content-card:hover .poster-img {
	transform: scale(1.05);
}

/* No Image Placeholder */
.no-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #1a1d35 0%, #212342 100%);
}

.no-image-text {
	color: #7f8c8d;
	font-size: 14px;
}

/* Quality Badge */
.quality-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	background: #29b5e8;
	color: #fff;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: bold;
	z-index: 3;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Episode Number Badge */
.episode-number {
	position: absolute;
	top: 8px;
	right: 8px;
	background: #e74c3c;
	color: #fff;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: bold;
	z-index: 3;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
	font-family: 'Cairo', sans-serif;
}

/* Card Overlay */
.card-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 2;
}

.content-card:hover .card-overlay {
	opacity: 1;
}

.play-icon {
	font-size: 48px;
	color: #fff;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Card Title Overlay */
.card-title-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
	padding: 40px 12px 12px;
	z-index: 1;
	text-align: center;
}

.card-title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	line-height: 1.4;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	text-overflow: ellipsis;
	font-family: 'Cairo', sans-serif;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */

/* Extra Large Desktop - Full width slider */
@media (min-width: 1600px) {
	.featured-slider-wrapper {
		max-width: 1800px;
	}
}

/* Large Desktop */
@media (max-width: 1400px) {
	.container-wide {
		max-width: 1200px;
	}
	
	.featured-slider-wrapper {
		max-width: 1400px;
	}
}

/* Desktop */
@media (max-width: 1200px) {
	.content-grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 12px;
	}
	
	.slider-item {
		width: 160px;
	}
	
	.slider-image {
		height: 240px;
	}
}

/* Tablet */
@media (max-width: 992px) {
	.content-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 12px;
	}
	
	.section-title {
		font-size: 20px;
	}
	
	.featured-slider-wrapper {
		padding: 10px 40px;
	}
	
	.slider-btn {
		width: 38px;
		height: 38px;
	}
	
	.slider-btn svg {
		width: 20px;
		height: 20px;
	}
	
	.slider-image {
		height: 210px;
	}
	
	.card-title {
		font-size: 13px;
		height: 36px;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.ciimaclub-home {
		padding: 0;
	}
	
	.slider-title {
		font-size: 18px;
		margin-bottom: 15px;
	}
	
	.featured-slider-wrapper {
		padding: 10px 35px;
	}
	
	.slider-btn {
		width: 32px;
		height: 32px;
	}
	
	.slider-btn svg {
		width: 18px;
		height: 18px;
	}
	
	.content-section {
		padding: 20px 0;
	}
	
	.content-grid {
		grid-template-columns: repeat(1, 1fr);
		gap: 10px;
	}
	
	.section-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	
	.section-title {
		font-size: 18px;
	}
	
	.view-all-btn {
		width: 100%;
		text-align: center;
	}
	
	.slider-item {
		width: 120px;
	}
	
	.slider-image {
		height: 180px;
	}
	
	.slider-info h3 {
		font-size: 12px;
	}
	
	.card-title {
		font-size: 13px;
	}
	
	.quality-badge {
		font-size: 10px;
		padding: 3px 8px;
		top: 6px;
		left: 6px;
	}
	
	.episode-number {
		font-size: 11px;
		padding: 4px 8px;
		top: 6px;
		right: 6px;
	}
	
	.play-icon {
		font-size: 36px;
	}
}

/* Small Mobile */
@media (max-width: 480px) {
	.container-wide {
		padding: 0 15px;
	}
	
	.slider-title {
		font-size: 16px;
		margin-bottom: 12px;
	}
	
	.content-grid {
		gap: 8px;
	}
	
	.card-title {
		font-size: 12px;
	}
	
	.card-title-overlay {
		padding: 30px 10px 10px;
	}
	
	.quality-badge {
		font-size: 9px;
		padding: 2px 6px;
	}
	
	.episode-number {
		font-size: 10px;
		padding: 3px 6px;
	}
	
	.slider-item {
		width: 100px;
	}
	
	.slider-image {
		height: 150px;
	}
}

/* RTL Support */
body.rtl .content-grid {
	direction: rtl;
}

body.rtl .quality-badge,
body.rtl .slider-quality {
	left: auto;
	right: 8px;
}

body.rtl .episode-number {
	right: auto;
	left: 8px;
}

/* Smooth Scrolling */
html {
	scroll-behavior: smooth;
}

/* ============================================
   GLOBAL CARD STYLES - لجميع البطاقات في الموقع
============================================ */

/* تطبيق على أي بطاقة في الموقع */
.movie-card .card-info,
.series-card .card-info,
.episode-card .card-info,
.program-card .card-info,
.post-card .card-info,
.content-card-info {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	width: 100%;
	background: linear-gradient(180deg, transparent, #000 70%);
	padding: 50px 10px 10px;
	opacity: 1 !important;
	visibility: visible !important;
	transition: all 0.3s ease;
	z-index: 10;
}

.movie-card .card-info h3,
.series-card .card-info h3,
.episode-card .card-info h3,
.program-card .card-info h3,
.post-card .card-info h3,
.content-card-info h3,
.movie-card .card-info .title,
.series-card .card-info .title,
.episode-card .card-info .title,
.program-card .card-info .title,
.post-card .card-info .title,
.content-card-info .title {
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	color: #fff;
	line-height: 1.4;
	min-height: 40px;
	text-align: center;
	direction: rtl;
	font-family: 'Cairo', sans-serif;
	opacity: 1 !important;
	visibility: visible !important;
}

li.slides-item {
    list-style-type: none;
}

/* ============================================
   LOAD MORE BUTTON
============================================ */
.load-more-wrap { text-align: center; margin-top: 20px; }
.load-more-btn {
    background: linear-gradient(180deg, #2fbcee 0%, #29b5e8 100%);
    color: #fff;
    border: 1px solid rgba(41,181,232,.4);
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.load-more-wrap {
    margin-bottom: 20px;
}
.load-more-btn:hover { background: linear-gradient(180deg, #32c6f9 0%, #1f9fd1 100%); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(41,181,232,.32); }
.load-more-btn:active { transform: translateY(0); }
.load-more-btn:disabled { opacity: .6; cursor: default; transform: none; }
.load-more-btn.is-loading { position: relative; }
.load-more-btn.is-loading::after {
    content: '';
    display: inline-block;
    width: 16px; height: 16px;
    margin-right: 8px;
    border: 2px solid rgba(255,255,255,.6);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lm-rotate .8s linear infinite;
    vertical-align: middle;
}
@keyframes lm-rotate { to { transform: rotate(360deg); } }

/* Focus visibility for accessibility */
.load-more-btn:focus-visible {
    outline: 2px solid rgba(41,181,232,.9);
    outline-offset: 2px;
}

/* Mobile full-width option */
@media (max-width: 600px) {
    .load-more-btn { width: 100%; }
}