/* Custom Properties */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #f0f2f5;
    --accent-color: #033679ce;
    --text-color: #333;
    --light-text-color: #666;
    --background-color: #e6f7ff;
    --card-background: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Global Styles */
body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    direction: rtl;
    text-align: right;
    padding-bottom: 60px; /* مسافة سفلية لتجنب تداخل المحتوى مع الفوتر الثابت */

}

h1, h2, h3 {
    color: var(--primary-color);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}
a:hover {
    color: var(--accent-color);
}

/* Header */
/* اجعل الصورة خلفية واحدة فقط */
.header {
  position: sticky;
  top: 0;
  z-index: 1100;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 6px var(--shadow);
  background: url('KC30.jpg') center bottom / cover no-repeat; /* الوضع الافتراضي للموبايل والتابلت */
  background-color: #ffffff;
  transition: padding .25s ease;
}

/* طبقة زينة رمضان فوق الهيدر (فوانيس + نجوم) */
/*
.header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background-image: url('ramadan-decor.png');
  background-repeat: repeat-x;
  background-position: center top;
  background-size: auto 120px;
  pointer-events: none;
  z-index: 1;
}
*/

/* تأكد أن عناصر الهيدر فوق الزينة */
.header > * {
  position: relative;
  z-index: 2;
}

/* موبايل: قلّل ارتفاع شريط الزينة عشان ما يأكلش مساحة كبيرة */
@media (max-width: 600px) {
  .header::after {
    height: 80px;
    background-size: auto 80px;
    background-position: center 0;
  }
}

/* شاشات لاب إلى متوسطة: كبّر الصورة الخلفية للهيدر قليلاً لتقليل الفراغات */
@media (min-width: 992px) and (max-width: 1199px) {
  .header {
    background-size: 110% auto;
    background-position: center 20%;
    min-height: 80px;
  }
}

/* شاشات كبيرة: تحكم مرن في حجم خلفية الهيدر (ليس الزينة) */
@media (min-width: 1200px) {
  .header {
    background-size: clamp(1200px, 90vw, 1800px) auto;
    background-position: center 20%;
    min-height: clamp(20px, 38vh, 20px);
  }
  .header.shrink {
    min-height: auto;
  }
}

/* حالة التصغير كما هي */
.header.shrink { padding: 10px 16px; }

/* كما هي */
.header .logo h1 { transition: font-size .25s ease; }
.header .logo p  { transition: font-size .25s ease, padding .25s ease; }
.header .header-buttons { transition: margin-top .25s ease, gap .25s ease; }
.header .icon-btn { transition: background-color .3s ease, width .25s ease, height .25s ease, font-size .25s ease; }

/* الحالة المصغّرة */
.header.shrink {
  padding: 10px 16px;
}
.header.shrink .logo h1 { font-size: 1.5rem; }
.header.shrink .logo p  { font-size: 0.9rem; padding: 4px 10px; }
.header.shrink .header-buttons { margin-top: 10px; gap: 6px; }
.header.shrink .icon-btn { width: 35px; height: 35px; font-size: 1.2rem; }

.logo h1 {
  color: #fff; 
  display: inline-block;
  padding: 6px 14px;
  border-radius: 22px;
  background: rgba(18, 18, 18, 0.25); /* نصف شفافة داكنة لتحسين التباين */
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  -webkit-backdrop-filter: blur(3px);
}

/* عند تصغير الهيدر قلّل الحشو قليلاً */
.header.shrink .logo h1 {
  padding: 4px 10px;
  border-radius: 10px;
}

.logo p {
    margin: 5px 0 0;
    font-size: 1rem;
    opacity: 0.8;
}

.header-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 20px;
}

.icon-btn {
    background-color: rgba(10, 0, 0, 0.345);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    transition: background-color 0.3s ease;
    position: relative;
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

/* Tooltip for icons */
.icon-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 60%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.icon-btn:hover[data-tooltip]::after {
    opacity: 1;
    visibility: visible;
}

/* Navigation Bar */
.nav-bar {
    background-color: #fff;
    padding: 10px 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 600px;
    position: relative;
}

.search-container {
    flex-grow: 1;
    display: flex;
    border: 1px solid #ccc;
    border-radius: 50px;
    overflow: hidden;
    background-color: #f0f2f5;

}

#search-input {
    border: none;
    padding: 10px 15px;
    outline: none;
    flex-grow: 1;
    background: transparent;
    text-align: right;
}

#search-button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#search-button:hover {
    background-color: #357bd1;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.info-bar {
    width: 100%;
    max-width: 1200px;
    background-color: var(--accent-color);
    color: #fff;
    text-align: center;
    padding: 8px 0;
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
}

.marquee span {
    margin-right: 55px;
}

.marquee:hover {
    animation-play-state: paused;
}

.marquee {
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    animation: marquee 50s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Main Content */
.main-content {
    padding: 20px 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

#services {
    margin-top: 0;
}

#services h2 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#services .services-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* التنسيق الجديد لحاوية البحث الخارجية */
.search-wrapper {
    position: relative;
    max-width: 300px; /* أو أي عرض تريده */
    margin-right: auto;
}

/* تنسيقات حقل البحث والزر داخله */
.search-container {
    flex-grow: 1;
    display: flex;
    border: 1px solid #ccc;
    border-radius: 50px;
    overflow: hidden; 
    background-color: #f0f2f5;
}

/* باقي التنسيقات كما هي */
.section-card {
    background-color: var(--card-background);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow);
    margin-top: 40px;
    text-align: center;
}

.content-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    width: 100%;
}

.images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    flex: 2;
}

.image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease;
}

.image:hover {
    transform: scale(1.05);
}

.buttons {
    flex: 1 1 50% !important;
    max-width: 50% !important;
    min-width: 50% !important;
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    direction: rtl;
}

.buttons li button {
    width: 100%;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.buttons li button:hover {
    background-color: #357bd1;
    transform: translateY(-2px);
}

/* Info Sections */
.info {
    display: none;
    margin-top: 40px;
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow);
}
.info h3 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.info ul {
    list-style: none;
    padding: 0;
}
.info ul li {
    background-color: var(--secondary-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    text-align: right;
}

.compound-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.compound-news-card {
    background-color: var(--secondary-color);
    padding: 20px 18px 14px 18px;
    border-radius: 12px;
    box-shadow: 0 2px 10px var(--shadow);
    position: relative;
    border-right: 5px solid #4a90e2;
    min-height: 120px;
    transition: box-shadow 0.2s;
}
.compound-news-card.important {
    border-right-color: #e53935;
    background: #ffeaea;
}
.compound-news-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}
.compound-news-card p {
    color: var(--text-color);
    font-size: 0.98em;
    margin-bottom: 8px;
}

/* Government Procedures Section */
.accordion {
    max-width: 800px;
    margin: 30px auto 0;
    text-align: right;
}
.accordion-item {
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
}
.accordion-header {
    width: 100%;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 15px;
    text-align: right;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}
.accordion-header:hover, .accordion-header.active {
    background-color: #e9ecef;
}
.accordion-content {
    background-color: #fff;
    padding: 0 15px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease-in-out;
}
.accordion-content ol {
    padding: 15px 30px;
}
.accordion-content ol li {
    margin-bottom: 8px;
}
.accordion-header i {
    transition: transform 0.3s ease;
}
.accordion-header.active i {
    transform: rotate(180deg);
}

/* Videos Section */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}
.video-card {
    position: relative;
    background-color: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.video-card a {
    display: block;
    position: relative;
}
.video-card img {
    width: 100%;
    height: auto;
    display: block;
}
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.video-card:hover .video-overlay {
    opacity: 1;
}
.video-overlay i {
    color: #fff;
    font-size: 3rem;
}
.video-card p {
    padding: 15px;
    margin: 0;
    text-align: center;
    color: var(--text-color);
    font-weight: 700;
}

/* Responsive Design */
/* ===== تنسيقات أساسية عامة ===== */
.content-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
}

/* منطقة الصور المتغيرة */
.image-slideshow {
    flex: 1 1 50%;
    max-width: 50%;
    min-width: 50%;
    height: auto;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: stretch;
}

.image-slideshow img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

/* منطقة الأزرار */
.buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    flex: 1 1 50%;
    max-width: 50%;
    min-width: 50%;
}

/* الأزرار نفسها */
.buttons li button {
    padding: 10px 5px;
    font-size: 15px;
    border-radius: 6px;
    background-color: #2980b9;
    color: white;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.buttons li button:hover {
    background-color: #1c5984;
}

/* أول صورة في السلايدر تظهر تلقائيًا */
.image-slideshow .slide:first-child {
    opacity: 1;
}



/* ===== الوضع العمودي للموبايل ===== */
@media screen and (max-width: 768px) {
    .content-container {
        flex-direction: column !important;
        gap: 12px;
        align-items: stretch;
    }

    .buttons {
        order: 1;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        grid-template-columns: repeat(3, 1fr); /* صفين في كل سطر */
        gap: 8px;
        margin-bottom: 15px;
        justify-content: center;
    }

    .image-slideshow {
        order: 2;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin: 0 auto;
    }

    .buttons li button {
        padding: 12px 6px;
        font-size: 13px;
    }
}



/* ===== الوضع الأفقي للموبايل ===== */
@media screen and (max-width: 915px) and (orientation: landscape) {
    .content-container {
        flex-direction: row;
        gap: 15px;
    }

    .image-slideshow {
        flex: 1 1 50%;
        max-width: 50%;
        min-width: 50%;
    }

    .buttons {
        flex: 1 1 50%;
        max-width: 50%;
        min-width: 50%;
    }
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== نظام التقييم بالنجوم والتعليقات ===== */
.star-rating-comment {
    margin-top: 10px;
    background: #f7f7f7;
    padding: 10px;
    border-radius: 8px;
}
.star-rating {
    direction: ltr;
    unicode-bidi: bidi-override;
    display: inline-block;
}
.star-rating .star {
    font-size: 24px;
    color: #844e4e5b;
    cursor: pointer;
    transition: color 0.2s;
    margin-left: 2px;
}
.star-rating .star.selected,
.star-rating .star.hovered {
    color: #04c204;
}
.comment-text {
    width: 98%;
    min-height: 40px;
    margin-top: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    resize: vertical;
    font-family: 'Cairo', sans-serif;
    padding: 5px;
}
.submit-rating {
    margin-top: 8px;
    background: #4CAF50;
    color: #fff;
    border: none;
    padding: 7px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
}
.all-comments {
    margin-top: 12px;
}
.all-comments .user-comment {
    background: #fafafa;
    border-radius: 4px;
    border: 1px solid #eee;
    margin-bottom: 6px;
    padding: 6px 10px;
    font-size: 14px;
    color: #222;
}
.like-dislike {
    display: flex;
    align-items: center;
    margin-top: 10px;
}
.like-dislike i {
    cursor: pointer;
    margin-right: 15px;
    font-size: 18px;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}
.like-dislike i:hover {
    transform: scale(1.1);
}
.like-dislike .fa-thumbs-up {
    color: green;
    background-color: #e0ffe0;
}
.like-dislike .fa-thumbs-down {
    color: red;
    background-color: #ffe0e0;
}
.like-dislike span {
    font-size: 16px;
    margin-left: 10px;
}
.like-dislike span.like-count {
    color: green;
}
.like-dislike span.dislike-count {
    color: red;
}
.like-dislike i[style*="pointer-events: none;"] {
    opacity: 0.5;
    cursor: not-allowed;
}
.old-likes-info {
    margin-top: 7px;
    font-size: 15px;
    text-align: right;
    direction: rtl;
}
.old-likes-info small {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

/* نافذة منبثقة للتعليقات */
#comments-modal {
    display: none;
    position: fixed;
    top: 0; right: 0; left: 0; bottom: 0;
    z-index: 9999;
}
#comments-modal .modal-backdrop {
    position: absolute;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.25);
    top: 0; left: 0;
}
#comments-modal .modal-content {
    position: absolute;
    right: 50%;
    transform: translateX(50%);
    top: 10%;
    background: #fff;
    border-radius: 12px;
    padding: 24px 20px 18px 20px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.15);
    min-width: 340px;
    max-width: 95vw;
    max-height: 80vh;
    overflow-y: auto;
    direction: rtl;
}
#comments-modal .close-modal {
    position: absolute;
    left: 16px;
    top: 10px;
    font-size: 26px;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}
#comments-modal .close-modal:hover {
    color: #d32f2f;
}
#comments-modal .modal-comments-list .user-comment {
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 7px;
}
.show-comments-btn {
    background: #eee;
    color: #0288d1;
    border: none;
    cursor: pointer;
    margin: 5px 0 0 0;
    padding: 4px 15px;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.2s;
}
.show-comments-btn:hover { background: #e0e0e0; }

/* ===== تنسيق بطاقات الخدمات (التقييم المنخفض والقائمة السوداء) ===== */
.service-card.low-rating {
    background-color: rgba(255, 0, 0, 0.06);
    border: 1px solid rgba(255, 0, 0, 0.25);
    box-shadow: 0 2px 6px rgba(255, 0, 0, 0.15);
    position: relative;
    transition: all 0.3s ease-in-out;
}
.service-card.low-rating:hover {
    background-color: rgba(255, 0, 0, 0.1);
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.25);
}
.service-card .blacklist-icon {
    position: absolute;
    top: 8px;
    right: 8px; /* بدلاً من left: 8px; */
    font-size: 22px;
    color: #e60000;
    font-weight: bold;
    cursor: default;
    user-select: none;
    z-index: 5;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
    animation: popIn 0.3s ease-out;
}
/* استايل التلميح (Tooltip) للقائمة السوداء */
.service-card .blacklist-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e60000;
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    visibility: hidden;
}
.service-card .blacklist-icon::before {
    content: "";
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #e60000 transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out;
}
.service-card .blacklist-icon:hover::after,
.service-card .blacklist-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ===== أيقونات وروابط سريعة ===== */
.quick-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px;
}
.icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: white;
    border-radius: 12px;
    padding: 15px;
    width: 120px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: #5403b8;
}
.icon-link i {
    font-size: 32px;
    margin-bottom: 10px;
}
.icon-link span {
    font-weight: bold;
    font-size: 14px;
    text-align: center;
}
.icon-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* ===== الرسوم المتحركة الجديدة ===== */
@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    80% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}
@keyframes waveAnimation {
    0% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.2) rotate(5deg);
    }
    50% {
        transform: scale(1) rotate(0deg);
    }
    75% {
        transform: scale(0.8) rotate(-5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* ===== تنسيق خاص بـ `mark` ===== */
mark {
    background-color: #ffde54;
    color: #000;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

/* ===== أنماط البطاقة العائمة للأيقونات ===== */

/* حاوية الأيقونة والبطاقة العائمة لضبط الموضع */
.icon-with-card-container {
    position: relative;
    display: inline-block;
}

.floating-info-card {
    display: none; /* إخفاؤها في البداية */
    position: absolute;
    z-index: 1000;
    color: #333333; /* لون النص: رمادي غامق */
    top: 60px; /* المسافة من الأعلى */
    right: 50%;
    transform: translateX(50%);
    width: 300px;
    max-height: 80vh;
    overflow-y: auto;
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    padding: 15px;
    direction: rtl;
    text-align: right;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    opacity: 0;
}

/* نمط ظهور البطاقة */
.floating-info-card.show {
    display: block;
    opacity: 1;
    transform: translateX(50%) translateY(0);
}

.floating-info-card .close-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.2rem;
    color: var(--light-text-color);
    cursor: pointer;
    transition: color 0.2s;
}

.floating-info-card .close-btn:hover {
    color: #d32f2f;
}

.floating-info-card h3 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 15px;
}

.floating-info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.floating-info-card ul li {
    background-color: var(--secondary-color);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
}


#autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 1000 !important;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
}
.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}
.autocomplete-item:hover {
    background-color: #f0f0f0;
}
.icon-btn {
    border: none;
}
/* تنسيق خاص لأيقونة التواصل */
.contact-icon {
    background-color: #f1f732; /* خلفية فاتحة أو أي لون آخر */
    border: 2px solid #014e16; /* إطار بلون مميز */
    border-radius: 50%;
    width: 45px; /* حجم أكبر */
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem; /* حجم الأيقونة أكبر */
    color: #014e16;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.contact-icon:hover {
    background-color: #014e16;
    color: #fff;
    transform: scale(1.1); /* تأثير تكبير عند المرور عليها */
}
.compound-news-card ul {
    list-style: none; /* لإزالة النقاط السوداء الافتراضية للقائمة */
    padding: 0;
    margin: 0;
}

.compound-news-card li {
    margin-bottom: 20px; /* مسافة بين كل نقطة والنقطة التي تليها */
    border-bottom: 1px dashed #ddd; /* خط رفيع فاصل بين النقاط */
    padding-bottom: 15px; /* مسافة أسفل الخط الفاصل */
}

.compound-news-card li:last-child {
    border-bottom: none; /* لإزالة الخط الفاصل من آخر نقطة في القائمة */
    margin-bottom: 0;
}

.compound-news-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.compound-news-card ul li {
    display: flex; /* جعل عنصر القائمة حاوية مرنة */
    flex-direction: column; /* ترتيب العناصر بداخلها عمودياً */
    align-items: flex-start; /* محاذاة العناصر إلى اليمين */
    margin-bottom: 20px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 15px;
}

.compound-news-card ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.compound-news-card .news-date {
    margin-top: 5px; /* إضافة مسافة بين النص والتاريخ */
    font-size: 0.9em;
    color: #f80606;
    font-weight: normal;
}
.contact-icon[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -40px; 
    right: 50%;
    transform: translateX(50%);
    background: #333;
    color: #fff;
    font-size: 12px;   /* حجم الخط أصغر وموحد */
    padding: 4px 6px;  /* حواف أصغر تناسب حجم النص */
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 99;
}

.contact-icon:hover[data-tooltip]::after {
    opacity: 1;
}

/* --- بداية التعديل المخصص للموبايل --- */
@media screen and (max-width: 768px) {
    .content-container {
        flex-direction: column !important;
        gap: 16px;
        align-items: stretch;
        width: 100%;
    }

    .buttons {
        order: 1;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-bottom: 16px;
        justify-content: center;
    }

    .buttons li button {
        padding: 14px 8px;
        font-size: 14px;
    }

    .image-slideshow {
        order: 2;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        aspect-ratio: 1 / 2; /* مربع تمامًا */
        position: relative;
        display: block !important;
        margin: 0 auto;
        border-radius: 10px;
        background: transparent;
    }

    .slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        min-height: 220px;
        height: 100%;
        max-height: 260px;
        opacity: 0;
        transition: opacity 1s ease-in-out;
        display: block;
        justify-content: center;
        align-items: center;
    }

    .slide.active {
        opacity: 1;
        z-index: 2;
    }

    .slide img {
        width: 100%;
        min-height: 220px;
        height: 100%;
        max-height: 260px;
        object-fit: cover;
        border-radius: 10px;
        display: block;
    }
}

@media screen and (max-width: 480px) {
    .image-slideshow {
        min-height: 140px;
        height: 40vw;
        max-height: 180px;
    }
    .slide,
    .slide img {
        min-height: 140px;
        height: 100%;
        max-height: 180px;
    }

    /* تقليل تصغير الهيدر أكثر على الشاشات الصغيرة لسهولة النقر */
    .header.shrink {
        padding: 10px 12px;
    }
    .header.shrink .logo h1 { font-size: 1.35rem; }
    .header.shrink .logo p  { font-size: 0.85rem; }
    .header.shrink .icon-btn { width: 30px; height: 30px; font-size: 1.1rem; }
}
/* --- نهاية التعديل --- */

/* حركة خاصة بالموبايل للإنفو بار */
@media (max-width: 600px) {
    .marquee {
        animation: moveTextMobile 65s linear infinite;
    }

    @keyframes moveTextMobile {
        from {
            transform: translateX(-15%); /* يبدأ مختفي من أقصى اليسار */
        }
        to {
            transform: translateX(100%);  /* يتحرك لحد أقصى اليمين */
        }
    }
}
@media (max-width: 2900px) {
    .marquee {
        animation: moveTextMobile 75s linear infinite;
    }

    @keyframes moveTextMobile {
        from {
            transform: translateX(-30%); /* يبدأ مختفي من أقصى اليسار */
        }
        to {
            transform: translateX(100%);  /* يتحرك لحد أقصى اليمين */
        }
    }
}
/* ====== مشروعات الكنزاوية (القسم المبسّط في الصفحة الرئيسية) ====== */
.project-hub-simple{
  position:relative;
  background:linear-gradient(135deg,hsl(0, 0%, 100%),#ffffff);
  border:1px solid #c9deee;
  border-radius:18px;
  padding:34px 28px 38px;
  margin-top:38px;
  box-shadow:0 8px 28px -6px rgba(45,110,170,.25);
  overflow:hidden;
}
.project-hub-simple:before,
.project-hub-simple:after{
  content:"";
  position:absolute;
  width:420px;
  height:420px;
  background:radial-gradient(circle at center,rgba(255,255,255,.7),rgba(255,255,255,0));
  top:-140px;
  right:-160px;
  pointer-events:none;
  mix-blend-mode:overlay;
}
.project-hub-simple:after{
  width:300px;
  height:300px;
  top:auto;
  bottom:-120px;
  right:auto;
  left:-120px;
  opacity:.65;
}
.project-hub-simple h2{
  margin:0 0 14px;
  font-size:1.55rem;
  color:#1e649e;
  display:flex;
  align-items:center;
  justify-content:center;   /* تجعل الأيقونة والنص في منتصف عرض القسم */
  gap:10px;
  text-align:center;        /* احتياطياً لو تم لفّ النص لسطرين */
  width:100%;               /* لضمان احتلال العنوان العرض الكامل */
}
.project-hub-simple p{
  margin: 0 0 26px;
  font-size: 1.02rem;
  line-height: 1.7;
  text-align: center;     /* محاذاة أفقية للنص داخل الفقرة */
  color: #284b61;
  max-width: 760px;
}
.project-cta-min{
  background:#c0a104;
  color:#fff;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:15px 34px 16px;
  border-radius:50px;
  font-size:1rem;
  font-weight:800;
  letter-spacing:.7px;
  box-shadow:0 8px 22px -4px rgba(0, 179, 255, 0.55);
  position:relative;
  overflow:hidden;
  transition:.28s;
}
.project-cta-min:before{
  content:"";
  position:absolute;
  top:0;left:-40%;
  width:40%;height:100%;
  background:linear-gradient(105deg,rgba(255,255,255,.65),rgba(255,255,255,0));
  transform:skewX(-25deg);
  transition:.65s;
}
.project-cta-min:hover{
  transform:translateY(-4px);
  box-shadow:0 12px 28px -6px rgba(255,152,0,.65);
}
.project-cta-min:hover:before{left:115%;}
.project-cta-min i{font-size:1.15rem;}
/* ===== ضبط زر صفحة المشروعات في الموبايل فقط ===== */
@media (max-width: 640px){
  .project-cta-min{
    /* تصغير الحجم والمساحات */
    font-size: .9rem;          /* كان أكبر */
    padding: 10px 18px 11px;
    line-height: 1.35;

    /* منع أن يأخذ عرض الكارت بالكامل */
    width: auto;
    max-width: 88%;

    /* تمركز */
    margin-inline: auto;
    text-align: center;

    /* تقليل البروز */
    box-shadow: 0 6px 16px -4px rgba(255,152,0,.55);
    border-radius: 40px;

    /* السماح بالتفاف النص سطرين بدون ضغط */
    white-space: normal;
  }
  .project-cta-min i{
    font-size: 1em;
  }
}

/* موبايل أصغر جداً (اختياري) */
@media (max-width: 400px){
  .project-cta-min{
    font-size: .82rem;
    padding: 9px 16px 10px;
    max-width: 92%;
  }
}

.eb-content {
  position: relative;
  border-radius: 14px;
  z-index: 1;
  padding: 32px 24px;
  background: rgba(248, 212, 158, 0.94);
  text-align: center; /* يوسّط كل النص والعناصر داخله */
}

.shiny-text {
  /* أزل اللون العادي */
  color: transparent;
  background: linear-gradient(
    120deg,
    #1d3342 0%,
    #1d3342 40%,
    #fff 50%,
    #1d3342 60%,
    #1d3342 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 6s linear infinite;
}
@keyframes shine {
  0% { background-position: -100%; }
  100% { background-position: 100%; }
  
}

/* ==== حركة السلايد التلقائية لأخبار الكمبوند ==== */
.news-slide.auto-slide {
  animation: autoSlideLeft 0.6s cubic-bezier(.4,.2,.2,1);
  will-change: transform, opacity;
}
@keyframes autoSlideLeft {
  0%   { transform: translateX(100%); opacity: 0; }
  60%  { opacity: .4; }
  100% { transform: translateX(0); opacity: 1; }
}

/* ==== حركة قلب الصفحة (flip) عند التبديل اليدوي فقط ==== */
.news-slide.auto-slide {
    animation: autoSlideLeft 0.6s cubic-bezier(.4,.2,.2,1);
    will-change: transform, opacity;
}
@keyframes autoSlideLeft {
    0%   { transform: translateX(100%); opacity: 0; }
    60%  { opacity: .4; }
    100% { transform: translateX(0); opacity: 1; }
}

.news-slide.flip-news {
    animation: flipNews 0.6s cubic-bezier(.4,.2,.2,1);
    backface-visibility: hidden;
    transform-style: preserve-3d;
}
@keyframes flipNews {
    0%   { transform: rotateY(0deg); opacity: 1; }
    50%  { transform: rotateY(-90deg); opacity: 0.2; }
    51%  { opacity: 0; }
    100% { transform: rotateY(0deg); opacity: 1; }
}

.project-card {
  position: relative; /* ضروري ليعمل الزر بشكل مطلق داخل الكارت */
}

.show-more-btn {
  position: absolute;
  bottom: 20px;      /* المسافة من أسفل الكارت */
  right: 16px;       /* المسافة من يمين الكارت */
  width: 40px;
  height: 32px;
  background: #faf138;
  color: #0e06ea;
  border: none;
  border-radius: 30%;
  box-shadow: 0 4px 14px rgba(74,144,226,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.18rem;
  transition: background 0.2s, box-shadow 0.2s, transform 0.18s;
  z-index: 2;
  outline: none;
}

.show-more-btn:hover,
.show-more-btn:focus {
  background: #3579c6;
  box-shadow: 0 8px 22px rgba(74,144,226,.25);
  transform: scale(1.08);
}

/* ايقونات التواصل السريعة على جانب الشاشة */
.floating-contact-icons {
  position: fixed;
  top: 70%;
  left: 3px;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: opacity 0.3s, visibility 0.3s;
}

.contact-icon-btn {
  width: 54px;
  height: 54px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  color: #25d366; /* واتساب */
  border: 2px solid #e3e8f3;
  transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
  cursor: pointer;
}
.contact-icon-btn.email {
  color: #1a75e8;
}
.contact-icon-btn:hover {
  background: #f1f5fa;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  transform: scale(1.08);
}
.floating-contact-icons.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@media (max-width:600px) {
  .floating-contact-icons {
    position: fixed;
    top: 45%;
    left: 3px;
    width: 44px;
  }
  .contact-icon-btn {
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
  }
}
.project-note {
  margin: 18px 0 12px;
  padding: 14px 18px;
  background: linear-gradient(90deg, #fffbe7 75%, #ffe0b2 100%);
  border: 1.5px solid #ffc107;
  border-radius: 12px;
  color: #bc7300;
  font-size: 1em;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 14px rgba(255,193,7,.10);
}
.project-note i {
  font-size: 1.5em;
  color: #ffa000;
}
.project-note strong {
  color: #d35400;
  font-weight: 900;
}
/* ===== شريط نصف شفاف تحت نص وصف الهيدر (.logo p) ===== */
.logo {
  position: relative;
  z-index: 3;
  margin: 0px 0 0;        /* تصغير المسافة فوق الفقرة لتصبح أقرب للـ h1 */
  text-align: center;
  display: flex;             /* جديد */
  flex-direction: column;    /* جديد: عمودي */
  align-items: center;       /* تمركز أفقي للعنصرين */
  gap: 4px;                  /* مسافة بسيطة بين العنوان والجملة */
}

.logo p {
  position: relative;       /* لتموضع الشريط بشكل صحيح */
  z-index: 4;               /* أعلى من أي لون تغطية داخل الخلفية */
  display: inline-block;    /* يسمح بالحشو ويجعل العرض حسب النص */
  margin: 6px 0 0;
  padding: 2px 20px;        /* عدّل الحشو لو عايز الشريط أعرض/أضيق */
  border-radius: 10px;
  background: #0d040436; /* خلفية نصف شفافة داكنة لتحسين وضوح النص */
  color: #fff;
  font-size: 1rem;
  line-height: 1.25;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  backdrop-filter: blur(4px);      /* طمس خلفي خفيف (اختياري، مدعوم جزئياً) */
  -webkit-backdrop-filter: blur(4px);
  white-space: nowrap; /* يمنع انقسام الجملة إذا اخترت هذا السلوك */
}

/* لو تحب الشريط فاتح بدل داكن (اختياري) */
.logo p.light {
  background: rgba(255,255,255,0.75);
  color: #11446a; /* لون نص مناسب مع الخلفية الفاتحة */
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* استجابة للموبايل: تقليل الحشو وحجم الخط */
@media (max-width: 480px) {
  .logo p {
    padding: 5px 10px;
    font-size: 1.1rem;
    border-radius: 8px;
    white-space: normal; /* يسمح باللف للسطرين إذا احتاج */
  }
}

.logo p {
    margin: 0px 0 0;        /* تصغير المسافة فوق الفقرة لتصبح أقرب للـ h1 */
    font-size: 1.05rem;     /* زيادـة حجم النص قليلاً */
    opacity: 0.9;           /* اختياري: زيادة وضوح النص */
}

/* ===== تنسيق قسم الإعلانات ===== */
.ads-section {
  margin: 40px auto;
  padding: 20px;
  text-align: center;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.ads-section h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.ads-carousel-container {
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.ads-carousel {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 10px;
}

.ad-card {
  flex: 0 0 auto;
  width: 250px;
  background: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ad-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.ad-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.ad-card p {
  padding: 10px;
  font-size: 0.9rem;
  color: var(--text-color);
}


/* ===== تحسين العرض على الشاشات الصغيرة ===== */
@media (max-width: 600px) {
  .ads-section {
    padding: 15px;
  }

  .ads-carousel {
    gap: 10px;
  }

  .ad-card {
    min-width: 90%; /* اجعل العرض ممتدًا تقريبًا لكامل الشاشة */
    max-width: 100%;
    margin: 0 auto;
  }

  .ad-title {
    font-size: 1rem;
  }

  .carousel-button {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

/* ===== تخصيص الكروت لفيسبوك ===== */
.ad-card.facebook {
  border: 2px solid #1877F2;
  position: relative;
}


/* زر مخصص لزيارة صفحة فيسبوك */
.ad-card.facebook .facebook-button {
  display: inline-block;
  background-color: #1877F2;
  color: #fff;
  border: none;
  padding: 5px 14px;
  border-radius: 6px;
  margin-top: 10px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: bold;
  transition: background-color 0.2s;
}

.ad-card.facebook .facebook-button:hover {
  background-color: #145dbf;
}
/* ===== تنسيق منطقة الهاتف ===== */
.ad-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.9rem;
}

.ad-phone i {
  color: #4caf50; /* لون أيقونة الهاتف */
  font-size: 1rem;
}

.ad-phone .phone-numbers {
  font-weight: bold;
  color: #333;
  text-align: center;
}
/* تعديل صورة بابا نويل */
#static-santa {
  width: 100%; /* عرض الحاوية بالكامل */
  text-align: center; /* توسيط الصورة */
  margin: 1px 0; /* مساحة صغيرة أعلى وأسفل */
  background: linear-gradient(to bottom, #123456, #000); /* خلفية جذابة */
  padding: 20px 0; /* مسافة إضافية حول الصورة */
}

#static-santa img {
  max-width: 80%; /* تحديد عرض الصورة كنسبة مئوية */
  height: auto; /* الحفاظ على النسبة الأصلية للصورة */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); /* إضافة ظل للصورة */
  border-radius: 10px; /* جمالية دائرية للصورة */
}

/* استهداف الشاشات الكبيرة */
@media (min-width: 992px) {
  #static-santa img {
    max-width: 60%; /* تصغير الصورة قليلاً للشاشات الكبيرة */
  }
}

/* ===== قسم العدّاد التنازلي لرمضان ===== */
.ramadan-section {
  padding: 0;
  overflow: hidden;
}

.ramadan-bg {
  position: relative;
  min-height: 210px;
  background: url('ramadan1.png') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ramadan-overlay {
  background: rgba(0, 0, 0, 0.6);
  padding: 22px 16px 24px;
  border-radius: 18px;
  max-width: 650px;
  width: 92%;
  text-align: center;
  color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

.ramadan-overlay h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  color: #ffe082;
}

.ramadan-dua {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: #fcefd2;
}

#ramadan-timer {
  display: flex;
  justify-content: center;
  gap: 10px;    /* قلّل المسافة */
  flex-wrap: nowrap; /* مهم: عدم السماح بالنزول لسطر جديد */
  margin-bottom: 8px;
}

#ramadan-timer .time-box {
  background: rgba(0,0,0,0.35);
  border-radius: 10px;
  padding: 6px 8px;   /* حشو أقل */
  min-width: 60px;    /* أصغر */
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

#ramadan-timer .time-box span {
  display: block;
  font-size: 1.2rem;  /* أصغر من قبل */
  font-weight: 800;
  color: #ffeb3b;
}

#ramadan-timer .time-box label {
  display: block;
  margin-top: 1px;
  font-size: 0.75rem;
  color: #f5f5f5;
}

.ramadan-message {
  margin-top: 8px;
  font-size: 0.95rem;
  color: #ffeb3b;
}

/* موبايل */
@media (max-width: 600px) {
  .ramadan-bg {
    min-height: 180px;
  }

  .ramadan-overlay {
    padding: 16px 10px 18px;
    border-radius: 14px;
    width: 96%;
  }

  #ramadan-timer {
    gap: 6px;
  }

  #ramadan-timer .time-box {
    min-width: 52px;
    padding: 5px 6px;
  }

  #ramadan-timer .time-box span {
    font-size: 1rem;
  }

  #ramadan-timer .time-box label {
    font-size: 0.7rem;
  }

  .ramadan-overlay h2 {
    font-size: 1.2rem;
  }

  .ramadan-dua {
    font-size: 0.85rem;
  }
}

/* ===== زر إمساكية رمضان داخل العداد ===== */
.imsakiya-btn {
  margin-top: 10px;
  background: rgba(255, 235, 59, 0.12);
  color: #ffeb3b;
  border: 1px solid rgba(255, 235, 59, 0.5);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}
.imsakiya-btn:hover {
  background: rgba(255, 235, 59, 0.25);
  box-shadow: 0 2px 8px rgba(0,0,0,0.45);
  transform: translateY(-1px);
}
.imsakiya-btn:active {
  transform: translateY(1px) scale(0.98);
}

/* ===== نافذة (Modal) إمساكية رمضان ===== */
.imsakiya-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(7, 11, 15, 0.65);
  z-index: 13000;
  padding: 20px;
}
.imsakiya-modal.open {
  display: flex;
}

.imsakiya-panel {
  width: min(900px, 96vw);
  max-height: 90vh;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  direction: rtl;
  display: flex;
  flex-direction: column;
}

.imsakiya-header {
  padding: 10px 14px;
  background: linear-gradient(90deg, #0b66b3, #4a90e2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.imsakiya-header h3 {
  margin: 0;
  font-size: 1rem;
}

.imsakiya-close {
  background: transparent;
  border: 0;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.imsakiya-close:hover {
  background: rgba(255,255,255,0.12);
}

.imsakiya-body {
  padding: 14px;
  overflow: auto;
  background: #f8fbff;
}

/* موبايل */
@media (max-width: 600px) {
  .imsakiya-panel {
    width: 100%;
    max-height: 94vh;
  }
  .imsakiya-body {
    padding: 10px;
  }
}

/* زر فتح PDF داخل نافذة الإمساكية */
.imsakiya-open-pdf-btn {
  display: inline-block;
  margin-bottom: 10px;
  background: #0b66b3;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}
.imsakiya-open-pdf-btn:hover {
  background: #084e87;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}
.imsakiya-open-pdf-btn:active {
  transform: translateY(1px) scale(0.98);
}

/* غلاف iframe لمعاينة PDF */
.imsakiya-pdf-frame-wrapper {
  width: 100%;
  max-height: 70vh;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 16px rgba(0,0,0,0.25);
  background: #fff;
}
.imsakiya-pdf-frame-wrapper iframe {
  width: 100%;
  height: 60vh;
  border: none;
}

/* موبايل */
@media (max-width: 600px) {
  .imsakiya-pdf-frame-wrapper iframe {
    height: 65vh;
  }
}

/* ===== سكشن إعلانات الشقق في الصفحة الرئيسية ===== */
.apartments-highlight {
  background: linear-gradient(135deg, #fff3f8 0%, #fce4ec 40%, #f8f9ff 100%);
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(194, 24, 91, 0.15);
  margin-top: 26px;
}

.apartments-highlight .eb-content h2 {
  color: #c2185b; /* لون مختلف عن مشروعات الكنزاوية */
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}

.apartments-highlight .apartments-text {
  margin: 0 0 14px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #5b2940;
  text-align: center;
}

.apartments-cta-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.apartments-cta-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #c2185b, #e91e63);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(233, 30, 99, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
}

.apartments-cta-main:hover {
  background: linear-gradient(135deg, #ad1457, #d81b60);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(233, 30, 99, 0.45);
}

.apartments-hint {
  margin: 0;
  font-size: 0.8rem;
  color: #7b425a;
  text-align: center;
}

/* موبايل */
@media (max-width: 600px) {
  .apartments-highlight {
    padding: 24px 16px;
  }
  .apartments-highlight .apartments-text {
    font-size: 0.9rem;
  }
  .apartments-cta-main {
    width: 100%;
    justify-content: center;
    font-size: 0.88rem;
  }
}
/* ===== أنماط المساعد الذكي عم عارف (نسخة محسّنة كاملة) ===== */
:root {
    --garef-primary: #1e40af;
    --garef-primary-light: #3b82f6;
    --garef-accent-orange: #f59e0b;
    --garef-accent-yellow: #fbbf24;
    --garef-bg: #f8fafc;
    --garef-border: #e2e8f0;
}

/* ===== زر تشغيل المساعد ===== */
#chat-widget-launcher {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1150;
    cursor: pointer;
    pointer-events: auto !important;
}

/* ✅ تعديل مهم: تطبيق ستايل الدائرة على زر الأيقونة فقط (أول div) */
#chat-widget-launcher > div:first-child {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.35);
    border: 3px solid #fff;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    pointer-events: auto !important;
}

/* ✅ hover على زر الأيقونة فقط */
#chat-widget-launcher > div:first-child:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(30, 64, 175, 0.5);
}

/* ✅ النبض المتوهج على زر الأيقونة فقط */
#chat-widget-launcher.attention > div:first-child::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 64, 175, 0.5), transparent 70%);
    animation: pulse-glow 2s ease-in-out infinite;
    z-index: -1;
    pointer-events: none !important;
}

@keyframes pulse-glow {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.7;
    }
    50% { 
        transform: scale(1.4);
        opacity: 0;
    }
}

/* رسالة التلميح */
#chat-widget-launcher .tooltip-hint {
    position: absolute;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #1e40af;
    color: white;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none !important;
    font-family: 'Cairo', sans-serif;
    z-index: 999;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#chat-widget-launcher .tooltip-hint::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #1e40af;
}

#chat-widget-launcher.attention .tooltip-hint {
    animation: tooltipPop 8s ease-in-out infinite;
}

@keyframes tooltipPop {
    0%, 100% { 
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    2%, 48% { 
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    50% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
}

/* ✅ إيقاف الـ glow عند hover على زر الأيقونة فقط */
#chat-widget-launcher:hover > div:first-child::before {
    animation: none;
    opacity: 0;
}

#chat-widget-launcher:hover .tooltip-hint {
    animation: none !important;
    opacity: 0 !important;
}

/* ===== نافذة المساعد ===== */
#garef-chat-widget {
    display: none;
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 400px;
    max-width: 90vw;
    height: 550px;
    max-height: 75vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    z-index: 1200;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--garef-border);
    font-family: 'Cairo', sans-serif;
}

#garef-chat-widget.active {
    display: flex;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== رأس المساعد ===== */
.chat-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

#garef-avatar-mini {
    background: white;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.3s;
}

.thinking-active #garef-avatar-mini {
    animation: bounce-mini 0.6s infinite alternate;
}

@keyframes bounce-mini {
    from { transform: scale(1) rotate(0deg); }
    to { transform: scale(1.15) rotate(5deg); }
}

.chat-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-title {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.chat-subtitle {
    font-size: 11px;
    opacity: 0.85;
}

.chat-close-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 22px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    border-radius: 8px;
}

.chat-close-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

/* زر محادثة جديدة */
.new-chat-btn {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    cursor: pointer;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.new-chat-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.new-chat-btn i {
    font-size: 12px;
}

/* ===== منطقة المحادثة ===== */
#chatWindow {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--garef-bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

#chatWindow::-webkit-scrollbar { width: 6px; }
#chatWindow::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 10px; }
#chatWindow::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
#chatWindow::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ===== رسائل المستخدم ===== */
.user-message {
  background: linear-gradient(135deg, #1e40af, #3b82f6) !important;
  color: #fff !important;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  align-self: flex-end;
  font-size: 14px;
  max-width: 80%;
  box-shadow: 0 3px 10px rgba(30, 64, 175, 0.25);
  font-weight: 500;
  line-height: 1.5;
}

/* ===== رسائل المساعد ===== */
.bot-message {
  background: #fff;
  color: #1f2937;
  padding: 14px 16px;
  border-radius: 18px 18px 18px 4px;
  align-self: flex-start;
  font-size: 14px;
  max-width: 85%;
  border: 1px solid var(--garef-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  line-height: 1.6;
  animation: fadeInUp 0.4s ease-out;
}

.bot-message p { margin: 8px 0; line-height: 1.7; }
.bot-message p:first-child { margin-top: 0; }
.bot-message p:last-child { margin-bottom: 0; }

.bot-message strong {
  color: #1e40af;
  font-weight: 700;
}

/* ===== روابط داخل نص البوت (ليست روابط الجدول) ===== */
.bot-message a:not(table a) {
  color: #1e40af;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.bot-message a:not(table a):hover {
  border-bottom-color: #3b82f6;
}

/* ===== تنسيق القوائم ===== */
.bot-message ul,
.bot-message ol {
  margin: 10px 0;
  padding-right: 20px;
}
.bot-message ul li,
.bot-message ol li {
  margin-bottom: 6px;
  line-height: 1.6;
}

/* ===== تنسيق الكود ===== */
.bot-message code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  color: #e11d48;
}

/* ===== Animation لرسائل البوت ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================================================
   ✅ تنسيق جدول "الخدمة + التليفون" (garef-table)
   الهدف: حدود الجدول تنتهي بعد رقم التليفون مباشرة بدون فراغ.
   ===================================================================================== */

/* ✅ الحاوية تكون على قد الجدول */
.bot-message .table-wrapper {
  display: inline-block;         /* يوقف تمدد الإطار */
  max-width: 100%;
  overflow-x: auto;
  margin: 12px 0;
  border-radius: 12px;
  border: 1px solid #e6eef8;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  -webkit-overflow-scrolling: touch;
  animation: tableSlideIn 0.4s ease-out;
}

/* ✅ الجدول نفسه لا يتمدد */
.bot-message table.garef-table {
  width: auto !important;
  display: inline-table;         /* مهم: الحدود على قد المحتوى */
  max-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.55;
  background: #fff;
  table-layout: auto;
  margin: 0;
}

/* head */
.bot-message table.garef-table th {
  background: #f7fbff;
  color: #0b66b3;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
  padding: 10px 9px;
  border-bottom: 1px solid #eef2f7;
}

/* cells */
.bot-message table.garef-table td {
  padding: 10px 9px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

/* rows */
.bot-message table.garef-table tbody tr:nth-child(even) { background: #fbfdff; }
.bot-message table.garef-table tbody tr:hover { background: #eaf4ff; }

/* ✅ عمود الاسم */
.bot-message table.garef-table th:first-child,
.bot-message table.garef-table td:first-child {
  min-width: 220px;
}

/* ✅ عمود التليفون: shrink-to-fit */
.bot-message table.garef-table th:last-child,
.bot-message table.garef-table td:last-child {
  width: 1%;
  white-space: nowrap;
  direction: ltr;
  text-align: right;
  font-weight: 700;
  color: #1f3347;
  font-variant-numeric: tabular-nums;
}

/* ✅ رابط اسم الخدمة */
.bot-message table.garef-table td a {
  color: #0b66b3 !important;
  font-weight: 800;
  text-decoration: none !important;
  border-bottom: 2px solid transparent;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
  padding: 2px 6px;
  border-radius: 7px;
  display: inline-block;
  max-width: 100%;
}
.bot-message table.garef-table td a:hover {
  color: #083a63 !important;
  background: rgba(245,158,11,0.14);
  border-bottom-color: #f59e0b;
}

/* Animation للجدول */
@keyframes tableSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Responsive للموبايل ===== */
@media (max-width: 600px) {
  .user-message,
  .bot-message {
    max-width: 90%;
    font-size: 13px;
  }

  #chatWindow {
    padding: 12px 8px;
  }

  /* في الموبايل: خلي الـ wrapper block لتفادي أي قص + اسكرول أفقي عند الحاجة */
  .bot-message .table-wrapper {
    display: block;
    margin: 10px -4px;
    border-radius: 10px;
  }

  .bot-message table.garef-table {
    font-size: 12px;
  }

  .bot-message table.garef-table th,
  .bot-message table.garef-table td {
    padding: 9px 8px;
  }

  .bot-message table.garef-table th:first-child,
  .bot-message table.garef-table td:first-child {
    min-width: 180px;
  }
}

/* ===== Fix Chat Input UI (placeholder: "اسأل عن بيانات اي خدمة...") ===== */
.chat-input-area{
  padding: 12px 12px !important;
  background: #fff;
  border-top: 1px solid var(--garef-border);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

/* خلي الفورم ياخد عرض الشات بالكامل */
#chatForm{
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 !important;
}

/* input ياخد المساحة كلها من غير ما ينكمش */
#userInput{
  flex: 1 1 auto !important;
  min-width: 0 !important;            /* ✅ مهم جدًا عشان مايكسرش الشكل في flex */
  height: 44px !important;
  border-radius: 999px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  background: #f8fafc !important;
  border: 2px solid #e2e8f0 !important;
  box-shadow: none !important;
}

/* placeholder واضح ومحاذاة صحيح�� بالعربي */
#userInput::placeholder{
  color: #64748b !important;
  font-size: 13px !important;
  opacity: 1 !important;
}

/* زر الإرسال يبقى دايرة ثابتة */
.chat-send-btn{
  flex: 0 0 44px !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.28) !important;
}

/* أيقونة الإرسال تتسنتر */
.chat-send-btn i{
  font-size: 16px !important;
  line-height: 1 !important;
}

/* موبايل: حافظ على نفس الشكل ومايطلعش صغير */
@media (max-width: 600px){
  #userInput{
    height: 42px !important;
    font-size: 13px !important;
  }
  .chat-send-btn{
    flex-basis: 42px !important;
    width: 42px !important;
    height: 42px !important;
  }
}
#garef-chat-widget.thinking-active #userInput{
  opacity: .7;
  cursor: not-allowed;
}
#garef-chat-widget.thinking-active .chat-send-btn{
  opacity: .7;
  cursor: not-allowed;
}

/* ===========================
   Fix: Chat launcher emoji rendering (mobile)
   Keep the exact icon from index.html (👴)
   =========================== */

/* ✅ تعديل مهم: استهداف زر الأيقونة فقط */
#chat-widget-launcher > div:first-child {
  width: 60px;
  height: 60px;
}

/* ✅ تثبيت عرض الإيموجي داخل زر الأيقونة فقط */
#chat-widget-launcher > div:first-child > span {
  font-size: 30px !important;
  line-height: 1 !important;
  display: block !important;
  transform: none !important;
  font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* موبايل: نفس الشكل بدون تغيير */
@media (max-width: 600px){
  #chat-widget-launcher {
    bottom: 20px;
    left: 20px;
  }
  #chat-widget-launcher > div:first-child {
    width: 60px;
    height: 60px;
  }
  #chat-widget-launcher > div:first-child > span {
    font-size: 30px !important;
  }
}

/* Twemoji only for assistant icons */
#chat-widget-launcher .garef-emoji img.emoji {
  width: 30px;
  height: 30px;
  display: block;
}

#garef-avatar-mini .garef-emoji img.emoji {
  width: 22px;   /* مناسب لحجم 38px بتاع الدائرة */
  height: 22px;
  display: block;
}
