:root {
    --bg-main: #1c1f26;
    --bg-card: #1c1c1c;
    --text-main: #ffffff;
    --text-secondary: #ffffff;
    --primary: #f4c430;
    --divider: #383838;
}

[data-theme="light"] {
    --bg-main: #ffffff;
    --bg-card: #f2f2f2;
    --text-main: #000000;
    --text-secondary: #000000;
    --primary: #f4c430;
    --divider: #dddddd;
}

body{
    margin:0;
    font-family:'Tajawal', Arial, sans-serif;
    background:var(--bg-main);
    color:var(--text-main);

    padding-top:55px;   /* مساحة للهيدر */
    padding-bottom:70px;
}

*{
    box-sizing:border-box;
}

header{
    display:flex;
    align-items:center;
    padding:14px 22px;
    background:var(--bg-main);
    position:sticky;
    top:0;
    z-index:300;
    justify-content:space-between;
}

.menu-btn{
width:24px;
height:18px;
display:flex;
flex-direction:column;
justify-content:space-between;
cursor:pointer;
}

.menu-btn span{
    height:2px;
    background:var(--text-main);
    border-radius:3px;
}

.logo-center{
    position:absolute;
    left:50%;
    transform:translateX(-50%);
    display:flex;
    align-items:center;
}

.logo-center img{
    height:30px;
    width:auto;
}

.sidebar{
    position:fixed;
    top:0;
    width:320px;
    height:100%;
    background:var(--bg-main);
    color:var(--text-main);

    transition:0.4s;
    z-index:2000;
    overflow-y:auto;
}

/* عربي → من اليمين */
html[dir="rtl"] .sidebar{
    right:-320px;
}

html[dir="rtl"] .sidebar.open{
    right:0;
}

/* إنجليزي → من الشمال */
html[dir="ltr"] .sidebar{
    left:-320px;
}

html[dir="ltr"] .sidebar.open{
    left:0;
}

.sidebar-content{
    padding:20px;
}

.sidebar-login{
    display:flex;
    align-items:center;
    gap:12px;
    background: var(--text-main);   /* أبيض في الدارك */
    color: var(--bg-main);          /* نص غامق */
    padding:14px;
    border-radius:14px;
    font-weight:bold;
    cursor:pointer;
    transition:0.3s;
}

.sidebar-login:hover{
    opacity:0.85;
}

.sidebar-login img{
    border-radius:50%;
    width:40px;
    height:40px;
}

.divider{
    height:1px;
    background:var(--divider);
    margin:15px 0;
}



.overlay{
    position:fixed;
    inset:0;
    background:rgba(37, 37, 37, 0.45);
    opacity:0;
    pointer-events:none;
    transition:0.3s;
    z-index:400;
}

.overlay.show{
    opacity:1;
    pointer-events:auto;
}


.hero-slider{
position:relative;
width:95%;
max-width:1250px;
aspect-ratio:16/6;   /* كمبيوتر */
overflow:hidden;
border-radius:18px;
margin:13px auto;
}

.hero-slider .slide{
position:absolute;
top:0;
left:0;
right:0;
bottom:0;
opacity:0;
transition:opacity 1s ease-in-out;
}

.hero-slider .slide.active{
opacity:1;
}

.hero-slider .slide img{
width:100%;
height:100%;
object-fit:cover;
display:block;
}

/* موبايل */
@media (max-width:768px){

.hero-slider{
aspect-ratio:1/1;   /* موبايل */
}

}

.events-section{
    width:95%;
    max-width:1250px; /* نفس الهيرو */
    margin:30px auto;
    padding:0;
}

.events-section h2{
    color:var(--text-main);
    margin-bottom:20px;
}

.events-grid{
display:flex;
gap:18px;
overflow-x:auto;
padding-bottom:20px;
scrollbar-width:none;
}

.events-grid::-webkit-scrollbar{
display:none;
}

/* الكرت */
.event-card{
flex-shrink:0;
width:160px;
text-decoration:none;
color:var(--text-main);
}

/* الصورة */
.event-card img{
width:100%;
aspect-ratio:1/1;
object-fit:cover;
border-radius:16px;
}
/* وقت البحث */
body.search-active .event-card{
    width:100% !important;
}

/* العنوان */
.event-title{
margin-top:8px;
font-size:14px;
font-weight:500;
color:var(--text-main);
text-align:center;
}

.event-title a{
text-decoration:none;
color:var(--text-main);
}


/* لابتوب وكمبيوتر */
@media (min-width:768px){

.event-card{
width:210px;
}

}

.bottom-bar{
    position:fixed;
    bottom:0;
    left:0;
    width:100%;
    height:60px;

    background:var(--bg-main);

    display:flex;
    align-items:center;
    justify-content:space-around; /* هذا هو السر */

    z-index:700;
    border-top:1px solid rgba(255,255,255,0.06);
}



.bar-item{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;

    gap:3px;
    font-size:11px;
    color:var(--text-main);
    cursor:pointer;
}

.bar-item i{
    font-size:20px;
}

.bar-item.active,
.bar-item:hover {
    color: var(--primary);
}

.bar-item img,
.bar-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
}
.bar-icon svg {
    width: 100%;
    height: 100%;
}

.bar-item span {
    color: var(--text-main);
    font-size: 11px;
    line-height: 12px;
    text-transform: capitalize;
}


.bottom-bar .bar-item i {
    font-size: 17px;
    transition: 0.2s;
}



/* الحاوية */
.header-left {
    position: absolute;
    inset-inline-start: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* العلم */
.country-flag {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--text-main);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.country-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Modern Toggle Switch ===== */

.toggle-row {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:18px;
}

/* ===== Centered Modern Toggle ===== */

.toggle-box{
    display:flex;
    align-items:center;
    justify-content:center;   /* في النص */
    gap:10px;                 /* مسافة أكبر بينهم */
    margin-top:20px;          /* نزول لتحت */
    width:100%;
}

.lang-label{
    font-size:17px;
    color:#cfcfcf;
    transition:0.3s;
}

.lang-label.left{
    opacity:0.7;
}

.lang-label.right{
    opacity:0.7;
}

/* السويتش */

.modern-switch{
  position: relative;
  width: 60px;
  height: 32px;
}

.modern-switch input{
  opacity: 0;
  width: 0;
  height: 0;
}

.modern-switch .slider{
  position: absolute;
  inset: 0;
  background-color: #2e3238;
  border-radius: 50px;
  cursor: pointer;
  transition: 0.3s;
}

.modern-switch .slider:before{
  content: "";
  position: absolute;
  height: 26px;
  width: 26px;
  left: 3px;
  top: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.modern-switch input:checked + .slider:before{
  transform: translateX(28px);
}
body{
    padding-bottom:70px;
}
/* في اللايت فقط خلي اللوجو أسود */
[data-theme="light"] .logo-center img{
    filter: brightness(0);
}
.search-container{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:15px;
}

/* اخفيه افتراضياً */
body:not(.search-active) .search-container{
    display: none;
}
.search-container form{
    width: 100%;
    max-width: 1200px;
    margin: auto;
    position: relative;
}
.search-container{
    padding: 0 20px;
}
.search-container input{
    width: 100%;
    padding: 16px 60px 16px 20px;
    border-radius: 14px;
    border: 1px solid var(--divider);
    outline: none;
    font-size: 15px;

    background: #2a2d36;
    color: var(--text-main);

    transition: 0.3s;
}

.search-container button{
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);

    width: 40px;
    height: 40px;
    border-radius: 50%;

    background: var(--primary);
    border: none;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}
.search-container i{
    color: #000;
    font-size: 16px;
}
[data-theme="light"] .search-container i{
    color: #000;
}
.search-container input:focus{
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(244,196,48,0.2);
}
.close-search{
    color:#fff;
    cursor:pointer;
    font-size:14px;
    opacity:0.7;
}


.close-search:hover{
    opacity:1;
}

body.search-active .search-container{
    display: flex; /* 🔥 أهم سطر */
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    z-index: 999;
    background: var(--bg-main);
    padding: 15px 0;
}
body.search-active .hero-slider {
    display: none;
}

body.search-active .events-section {
    margin-top: 90px;
}
.search-top{
    display:flex;
    align-items:center;
    gap:12px;
    width:100%;
    justify-content:center;
}


/* الحالة النشطة */
.filter-btn.active{
    border:1px solid rgba(255,255,255,0.2);
}

/* السيرش ياخد باقي المساحة */
.search-top form{
    display:flex;
    flex:1;
    max-width:600px;
}
[data-theme="light"] .search-container input{
    background: #ffffff;   /* أبيض */
    color: #000;           /* الكتابة سودا */
    border: 1px solid #ddd;
}
body.search-active .events-section > *:not(.events-grid){
    display: none !important;
}

/* الفورم نفسه */

.country-select{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    
    background:#2a2f3a;
    padding:6px 14px;
    border-radius:20px;
    
    width:fit-content;
    margin:10px auto 15px auto;

    box-shadow:0 3px 10px rgba(0,0,0,0.25);
}

.country-name{
    color:#fff;
    font-size:14px;
}

.kuwait-flag{
    width:22px;
    height:22px;
    border-radius:50%;
    object-fit:cover;
}
.theme-icon{
    font-size:25px;
    color:#ddd;
    width:25px;
    display:flex;
    justify-content:center;
}
.theme-toggle{
display:flex;
align-items:center;
justify-content:center;
gap:10px;
margin-top:15px;
}

.switch{
position:relative;
display:inline-block;
width:46px;
height:24px;
}

.switch input{
opacity:0;
width:0;
height:0;
}

.switch .slider{
position:absolute;
cursor:pointer;
inset:0;
background:#3a3a3a;
border-radius:50px;
transition:.3s;
}

.switch .slider:before{
content:"";
position:absolute;
height:18px;
width:18px;
left:3px;
top:3px;
background:#fff;
border-radius:50%;
transition:.3s;
}

.switch input:checked + .slider{
background:#ffd700;
}

.switch input:checked + .slider:before{
transform:translateX(22px);
}
.toggle-box i{
    font-size:20px;
    color:#cfcfcf;
}
.my-events{
border-top:1px solid rgba(255,255,255,0.08);
margin-top:6px;
}



.main-header{
display:flex;
align-items:center;
justify-content:center;
padding:8px 14px;

position:fixed;
top:0;
left:0;
width:100%;

background:var(--bg-main);

height:55px;
z-index:800;
}

.logo-box img{
height:40px;
}

.menu-btn{
    position:absolute;
    left:15px;
}

.header-actions{
    position:absolute;
    right:15px;
    display:flex;
    align-items:center;
    gap:6px;
}
/* يخلي الاتنين في نفس الخط بالظبط */
.header-actions > *{
    display:flex;
    align-items:center;
    justify-content:center;
}

.flag{
width:22px;
height:22px;
border-radius:50%;
object-fit:cover;
}


/* LOGIN MODAL - EVENTAT STYLE */

.login-modal{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
display:none;
align-items:center;
justify-content:center;
background:rgba(0,0,0,0.6);
backdrop-filter:blur(6px);
z-index:9999;
animation:fadeIn .3s ease;
}

.login-box{
width:350px;
background:#1f2228;
border-radius:16px;
padding:28px;
text-align:center;
position:relative;
animation:scaleIn .25s ease;
box-shadow:0 15px 50px rgba(0,0,0,0.7);
}

.logo{
color:#ffd400;
font-size:32px;
font-weight:800;
margin-bottom:4px;
}

.login-title{
color:#9aa0a6;
font-size:14px;
margin-bottom:18px;
}

.phone-input{
display:flex;
align-items:center;
background:#2b2e35;
padding:12px;
border-radius:30px;
margin-bottom:12px;
}

.phone-input span{
color:#fff;
margin-left:8px;
font-size:14px;
}

.phone-input input{
flex:1;
background:none;
border:none;
outline:none;
color:#fff;
font-size:14px;
}

.error-btn{
background:#e53935;
color:#fff;
border:none;
width:100%;
padding:11px;
border-radius:10px;
font-size:13px;
margin-bottom:12px;
}

.send-code{
background:#d6c300;
border:none;
width:100%;
padding:12px;
border-radius:30px;
font-weight:700;
cursor:pointer;
}

.password-login{
background:#3a3d44;
border:none;
width:100%;
padding:12px;
border-radius:30px;
margin-top:12px;
color:#fff;
cursor:pointer;
}

.close-login{
position:absolute;
top:14px;
left:16px;
font-size:20px;
color:#aaa;
cursor:pointer;
}

.close-login:hover{
color:white;
}

/* Animations */

@keyframes fadeIn{
from{opacity:0;}
to{opacity:1;}
}

@keyframes scaleIn{
from{
transform:scale(.9);
opacity:0;
}
to{
transform:scale(1);
opacity:1;
}
}
@media (max-width:768px){

.main-header{
height:50px;
padding:6px 12px;
}

.logo-center img{
height:24px;
}

.menu-btn{
width:18px;
height:10px;
}

.flag{
width:20px;
height:20px;
}

}
@media (min-width:769px){

.hero-slider .slide img{
object-fit: cover;
object-position: center 20%;
}

}
.my-events{
position: relative;
top:10px;
}

button:focus,
a:focus{
outline:none;
}

*{
-webkit-tap-highlight-color: transparent;
user-select:none;
-webkit-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
}
.ticket-icon{
    width: 26px !important;
    height: 26px !important;
    max-width: 22px !important;
    min-width: 22px !important;
    object-fit: contain;
}


/* دارك → أبيض */
[data-theme="dark"] .ticket-icon{
    filter: brightness(0) invert(1) !important;
}

/* لايت → أسود */
[data-theme="light"] .ticket-icon{
    filter: brightness(0) invert(0) !important;
}


.login-btn {
    display: flex;
    align-items: center;
    justify-content: center; /* 👈 أهم حاجة */

    gap: 10px;

    border-radius: 999px;
    padding: 8px 16px;

    width: 100%;

    font-size: 14px;
    font-weight: 500;

    cursor: pointer;
    transition: 0.3s;
}

/* الأيقونة */
.login-btn .icon-box {
    width: 32px;
    height: 32px;
    min-width: 26px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* حجم الأيقونة */
.login-btn svg {
    width: 22px;
    height: 22px;
}

/* النص */
.login-text {
    line-height: 1;
}

/* عربي → الأيقونة يمين */
html[dir="rtl"] .login-btn {
    flex-direction: row-reverse;
}

/* إنجليزي → الأيقونة شمال */
html[dir="ltr"] .login-btn {
    flex-direction: row;
}
html[dir="rtl"] .login-btn .icon-box {
    order: 2;
}

html[dir="rtl"] .login-text {
    order: 1;
}
/* دارك → أيقونة سودا */
[data-theme="dark"] .login-btn .icon-box {
    background: #f2f2f2;
}

[data-theme="dark"] .login-btn svg {
    color: #000;
}

/* لايت → أيقونة بيضا */
[data-theme="light"] .login-btn .icon-box {
    background: #2a2a2a;
}

[data-theme="light"] .login-btn svg {
    color: #fff;
}
/* دارك مود */
[data-theme="dark"] .login-btn {
    background: #ffffff;
    color: #000; /* النص أسود */
}

/* لايت مود */
[data-theme="light"] .login-btn {
    background: #000000;
    color: #ffffff; /* النص أبيض */
}
.side-item{
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 0;
    font-size:15px;
    cursor:pointer;
    width:100%;
}

/* الأيقونة */
.side-item i,
.side-item img{
    width:24px;
    height:24px;
    flex-shrink:0;
}



/* عربي */
html[dir="rtl"] .side-item{
    flex-direction: row;
}

html[dir="rtl"] .side-item span{
    text-align: right;
}

/* إنجليزي */
html[dir="ltr"] .side-item{
    flex-direction: row;
}

html[dir="ltr"] .side-item span{
    text-align: left;
}
.side-item .icon{
    width:24px;
    height:24px;
    flex-shrink:0;
}

.users-icon {
    width: 27px;
    height: 27px;
    display: inline-block;
    color: #fff; /* أو أي لون عندك */
}
.users-icon {
    width: 27px;
    height: 27px;
    display: inline-block;
    color: var(--text-main); /* 👈 المهم */
}
.bar-item svg {
    width: 22px !important;
    height: 22px !important;
}
.side-item svg{
    width:24px;
    height:24px;
    flex-shrink:0;
}
/* زر الهيدر فقط */
/* 🔥 FIX LOGIN ICON FINAL */
.login-icon {
    width: 32px;
    height: 32px;

    border-radius: 50%;
    background: var(--bg-card);

    display: grid; /* 👈 أهم تغيير */
    place-items: center; /* 👈 توسيط مظبوط */

    padding: 0;
    line-height: 0; /* 👈 يمنع أي فراغ غريب */

    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}


/* الأيقونة نفسها */
.login-icon svg {
    width: 22px;
    height: 22px;
}


.login-icon:hover{
    background: rgba(255,255,255,0.12);
    transform: scale(1.05);
}



/* لون حسب الثيم */
[data-theme="dark"] .login-icon svg {
    color: #fff;
}

[data-theme="light"] .login-icon svg {
    color: #000;
}
/* ===== Country Dropdown ===== */

.country-dropdown{
    position: relative;
}

/* القائمة */
.country-menu{
    position: absolute;
    top: 45px;
    right: 0;

    background: #1f2228;
    border-radius: 12px;

    width: 180px;
    padding: 8px 0;

    box-shadow: 0 10px 30px rgba(0,0,0,0.4);

    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;

    transition: 0.25s;
    z-index: 9999;
}

/* لما تفتح */
.country-menu.show{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* كل عنصر */
.country-item{
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 14px;
    cursor: pointer;
    transition: 0.2s;
}

.country-item:hover{
    background: rgba(255,255,255,0.05);
}

/* الصورة */
.country-item img{
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

/* نص */
.country-item span{
    color: #fff;
    font-size: 14px;
}

/* نسخة السايدبار */
.sidebar-menu{
    position: static;
    margin-top: 10px;
}
/* ===== FIX BOTTOM BAR FINAL ===== */

/* اللون الطبيعي */
.bar-item {
    color: var(--text-main);
}

/* النص تحت الأيقونة */
.bar-item span {
    color: var(--text-main);
}

/* عند التفعيل فقط */
.bar-item.active {
    color: var(--primary);
}

.bar-item.active span {
    color: var(--primary);
}

/* ===== الأيقونات ===== */

/* دارك مود → أبيض */
[data-theme="dark"] .bar-item img,
[data-theme="dark"] .bar-item svg {
    filter: brightness(0) invert(1);
}

/* لايت مود → أسود */
[data-theme="light"] .bar-item img,
[data-theme="light"] .bar-item svg {
    filter: brightness(0) invert(0);
}

/* عند التفعيل (أصفر) */
.bar-item.active img,
.bar-item.active svg {
    filter: brightness(0) saturate(100%) invert(84%) sepia(32%) saturate(749%) hue-rotate(2deg) brightness(103%) contrast(101%);
}

/* 🔥 مهم: امسح تأثير hover */
.bar-item:hover {
    color: var(--text-main);
}

.bar-item:hover img {
    filter: none;
}
.search-header {
    padding: 20px;
    background: #1c1f26;
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-header input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: #2a2d36;
    color: #fff;
}

body.search-active .events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 15px;
    overflow: visible;
}

body.search-active .event-card{
    width:100% !important;
}
.search-container form{
    display:flex;
    gap:10px;
    align-items:center;
    justify-content:center;
}

@media (min-width:1024px){

    .events-grid{
        display: grid;

        grid-template-columns: repeat(4, 1fr);

        gap: 20px;
        overflow: visible;

        justify-items: stretch; /* ✅ مهم */
    }

    .event-card{
        width: 100%; /* ✅ يملى العمود */
        max-width: 290px; /* 👈 نفس الحجم */
    }

    body.search-active .events-grid{
        grid-template-columns: repeat(4, 1fr);
    }

}