/* KEYFRAMES FOR GOLDEN ADS */
@keyframes gold-shine {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}
@keyframes zoom-bg {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}
@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}
@keyframes hand-click {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(0.95) translateY(2px); }
}
@keyframes phone-shake {
    0% { transform: rotate(0deg); }
    15% { transform: rotate(5deg); }
    30% { transform: rotate(-5deg); }
    45% { transform: rotate(5deg); }
    60% { transform: rotate(0deg); }
}

/* FEATURED (GOLD) ADS STYLES */
.section-title-glitch {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    background: linear-gradient(90deg, #f0ad4e, #fceabb, #f8b500, #fceabb, #f0ad4e);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: gold-shine 3s linear infinite;
    text-shadow: 0 2px 3px rgba(0,0,0,0.3);
}

.section-title-glitch .sparkle-icon {
    color: #f8b500;
    animation: sparkle 1.5s infinite linear;
}

.featured-ad-card-v3 {
    border-radius: 12px;
    padding: 20px 15px;
    min-height: 220px;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 2px solid #f8b500;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    z-index: 1;
    /* Fallback --bg-image with root-relative URL */
    --bg-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.8)), url('/assets/img/slider/default.jpg');
}
.featured-ad-card-v3::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    animation: zoom-bg 10s infinite alternate ease-in-out;
    z-index: -2;
}

.ad-visit-btn .visit-icon {
    animation: hand-click 1.5s infinite ease-in-out;
}
.ad-call-btn .phone-icon {
    animation: phone-shake 1.5s infinite;
}


/* Sand Beige Colors Definition (Needed for job cards) */
:root {
    --sand-beige: #F4A460;
    --dark-sand: #CD853F;
}

/* Keyframes for Tiny Bounce Effect */
@keyframes tiny-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px); /* Small upward movement */
    }
}

/* Sand Beige Title Color */
.sand-beige-title {
    color: #F4A460 !important; /* Sand Beige color */
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 1px;
    /* Added dark shadow for depth */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4), 0 0 10px rgba(244, 164, 96, 0.5); 
    
    /* Apply tiny bounce animation */
    animation: tiny-bounce 4s ease-in-out infinite alternate;

    /* Mobile responsive font size */
    font-size: 1.8rem;
}
@media (min-width: 768px) {
    .sand-beige-title {
        font-size: 2.5rem;
    }
}

/* Keyframes for Glowing Effect (kept for consistency with other files and icons) */
@keyframes sand-glow {
    0%, 100% {
        /* Base color + subtle shadow */
        text-shadow: 0 0 5px rgba(244, 164, 96, 0.5), 0 0 10px rgba(205, 133, 63, 0.3);
    }
    50% {
        /* Brighter glow */
        text-shadow: 0 0 10px rgba(244, 164, 96, 0.8), 0 0 20px rgba(205, 133, 63, 0.6);
    }
}

/* 1. Apply light gradient to input group icons */
.input-group-text {
    /* Set light sandy gradient background and border */
    background: linear-gradient(145deg, #FFF8E1, #FAFAD2) !important; /* Light sand gradient */
    border-color: #F4A460 !important;
    
    /* توحيد الارتفاع */
    height: 50px !important;
    display: flex;
    align-items: center;
}

.input-group-text .fas {
    color: #CD853F; /* Darker Sand/Peruvian Brown */
    animation: sand-glow 3s ease-in-out infinite alternate;
}

/* 2. Style Input fields and Select menus with gradient */
.form-control, .form-select {
    border-radius: 0.25rem; /* Standard rounded corners */
    border: 1px solid #D2B48C; /* Tan border */
    /* Use important to override Bootstrap's white background */
    background: linear-gradient(to right, #FFFBF5, #FFF8DC) !important; /* Very light, subtle gradient */
    color: #4B3621; /* Dark text */
    
    /* توحيد الارتفاع */
    height: 50px !important;
    font-size: 1rem;
}

/* Style Select menus (Dropdown Button) to match inputs */
#category-btn {
    border-radius: 0.25rem !important;
    text-align: right;
    padding-right: 1.5rem !important; /* Ensure text alignment is good */
    
    /* توحيد الارتفاع والمرونة */
    height: 50px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* توحيد ارتفاع زر البحث */
.search-under .btn, 
form.row .btn-primary {
    height: 50px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border-radius: 0.25rem !important;
}

/* Focus state for input and select */
.form-control:focus, .form-select:focus, #category-btn:focus {
    border-color: #CD853F;
    box-shadow: 0 0 0 0.25rem rgba(244, 164, 96, 0.4);
    background-color: white !important; /* Clear white on focus for better visibility */
}


/* Card item hover effect - kept existing style but ensured no conflict */
.hover-shadow { transition: transform .2s, box-shadow .2s; }
.hover-shadow:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.15)!important; }

/* ---------------- ميزة النسخ (من index.php) ---------------- */
/* جعل رابط النسخ يبدو تفاعليًا وبلون رمادي/مُعتدل */
.phone-copy-link {
    cursor: pointer;
    color: #6c757d !important; /* رمادي لتبدو كمعلومة وليس رابطًا رئيسيًا */
    border-bottom: 1px dotted #ced4da; /* خط منقط خفيف */
    transition: color 0.2s ease;
}

.phone-copy-link:hover {
    color: #495057 !important; /* لون رمادي أغمق عند التمرير */
}

/* جعل الأيقونة والرقم أصغر قليلاً لمظهر أكثر أناقة */
.phone-copy-link i, .phone-copy-link .phone-display {
    font-size: 0.85rem; 
}
.phone-copy-link .phone-display {
    font-weight: 600 !important; 
}

/* Call Button Style (to match index.php) */
.btn-call {
    background: linear-gradient(to bottom, #F4A460, #CD853F) !important;
    border: 1px solid #CD853F;
    color: #4B3621 !important; 
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
    padding: 4px 8px !important;
    font-size: 0.8rem !important;
    border-radius: 0.5rem !important;
}

/* ---------------------------------------------------- */
/* ============== PAGINATION - THEMED STYLES ============== */
/* ---------------------------------------------------- */

/* الحاوية العامة */
.pagination {
    margin-top: 2rem;
    gap: 0.5rem; /* مسافة بين الأزرار */
}

/* تصميم عناصر الترقيم (li) */
.page-item {
    margin: 0 2px;
}

/* الروابط داخل الترقيم (a) */
.page-link {
    border: none;
    border-radius: 50% !important; /* شكل دائري */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2F2F2F; /* لون النص */
    font-weight: 600;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* عند التمرير (Hover) */
.page-link:hover {
    background: linear-gradient(to bottom, #D9913B, #B66A50);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* الصفحة النشطة (Active) */
.page-item.active .page-link {
    background: linear-gradient(to bottom, #D9913B, #B66A50);
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(217, 145, 59, 0.4);
    transform: scale(1.1);
    z-index: 1;
}

/* الأزرار المعطلة (Disabled) */
.page-item.disabled .page-link {
    background: #e9ecef;
    color: #6c757d;
    box-shadow: none;
    opacity: 0.6;
}

/* أزرار السابق والتالي (مستطيلة بحواف دائرية) */
.page-item:first-child .page-link, 
.page-item:last-child .page-link {
    border-radius: 20px !important;
    width: auto;
    padding: 0 1.2rem;
}

.btn-call:hover {
    background: linear-gradient(to top, #3CB371, #90EE90) !important; /* Oasis Green hover */
    border-color: #3CB371 !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 15px rgba(60, 179, 113, 0.5) !important;
    transform: scale(1.03);
}

/* ---------------- NOTICES (إشعارات نوع النشر) ---------------- */
.job-card-notice {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 10;
    line-height: 1.2;
}

/* Style for Job Post (نشر خدمة - بني فاتح/رملي) */
.notice-posted-job {
    background-color: var(--dark-sand); /* #CD853F */
}

/* Style for Seeking Worker (طلب عامل - أزرق/أخضر مائل للأزرق) */
.notice-seeking-worker {
    background-color: #17a2b8; /* Teal/Info Blue */
}