* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f5f7fb;
    padding: 40px;
}

h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.search-box {
    max-width: 500px;
    margin: 0 auto 30px;
}

.search-box input {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .08);
    font-size: 15px;
    outline: none;
}

.services {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    background: #fff;
    border-radius: 15px;
    padding: 22px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .08);
    transition: .3s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, .15);
}

.card h3 {
    margin-bottom: 10px;
    color: #222;
}

.card p {
    color: #666;
    line-height: 1.8;
    font-size: 14px;
}



.pagination{
    display:flex;
    justify-content:center;
    gap:8px;
    margin-top:30px;
    flex-wrap:wrap;
}

.pagination button{
    background: #e5e7eb;
    color:#3c4043;
    border:1px solid #585b61;
    padding:8px 14px;
    border-radius:8px;
    cursor:pointer;
    transition:.3s;
}
.pagination button.active {
    background: #2563eb;
    color: #fff;
}

.pagination button:hover {
    background: #2563eb;
    color: #fff;
}

body.dark {
    background: #121212;
    color: #fff;
}

body.dark .card {
    background: #1f1f1f;
    color: #fff;
}
body.dark .card h3{
    color: #fff;
}
body.dark .search-box input {
    background: #222;
    color: #fff;
}

/* ===== Header ===== */

header {
   
    top: 0;
    z-index: 999;
    background: #fff;
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 15px rgba(0, 0, 0, .08);
    margin: -40px -40px 35px;
}
footer{
    margin: -40px -40px -40px; 
    padding: 18px 25px;
}
header a{
    color: black;
}
.logo {
    font-size: 22px;
    font-weight: bold;
    color: #2563eb;
}

.header-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.header-buttons a,
.header-buttons button {

    border: none;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    padding: 11px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: .3s;
    font-size: 14px;
}
.header-buttons .support{
    background: #0f9d58;
}
.header-buttons a:hover,
.header-buttons button:hover {

    background: #2054e6;
    transform: translateY(-2px);
    color: white;

}
.header-buttons .support:hover{
    background: #11ac61;
    color: white;
}




/* ===== حالت تاریک ===== */

body.dark {

    background: #121212;
    color: #fff;

}

body.dark header{

    background: #1e1e1e;
    box-shadow: none;

}
body.dark header h2{
    color: white;
}
body.dark header a{
    color: white;
}

body.dark .logo {

    color: #60a5fa;

}

body.dark .header-buttons a,
body.dark .header-buttons button {

    color: white;

}

body.dark .header-buttons a:hover,
body.dark .header-buttons button:hover{

    color: rgb(190, 190, 190);

}



/* ===== موبایل ===== */

@media(max-width:768px) {

    header {

        flex-direction: column;
        gap: 15px;
        text-align: center;

    }

    .header-buttons {

        justify-content: center;

    }

}

  .ecfRules-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.55);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:99999;
    padding:20px;
}

.ecfRules-modal.ecfRules-hide{
    display:none;
}

.ecfRules-box{
    width:100%;
    max-width:480px;
    background:#fff;
    border-radius:15px;
    overflow:hidden;
    box-shadow:0 15px 40px rgba(0,0,0,.2);
    animation:ecfRulesPopup .25s ease;
}

@keyframes ecfRulesPopup{
    from{
        opacity:0;
        transform:scale(.9);
    }
    to{
        opacity:1;
        transform:scale(1);
    }
}

.ecfRules-header{
    background:#2563eb;
    color:#fff;
    padding:18px;
    font-size:20px;
    font-weight:bold;
}

.ecfRules-body{
    padding:25px;
    line-height:2;
    color:#444;
}

.ecfRules-link{
    display:inline-block;
    margin-top:15px;
    color:#2563eb;
    text-decoration:none;
    font-weight:bold;
}

.ecfRules-link:hover{
    text-decoration:underline;
}

.ecfRules-footer{
    padding:20px;
    border-top:1px solid #eee;
    text-align:left;
}

#ecfRulesAcceptBtn{
    border:none;
    background:#2563eb;
    color:#fff;
    padding:12px 22px;
    border-radius:8px;
    cursor:pointer;
    font-family:inherit;
    transition:.2s;
}

#ecfRulesAcceptBtn:hover{
    background:#1d4ed8;
}

.card{
    position:relative;
}

.favorite{
    position:absolute;
    top:10px;
    left:10px;
    cursor:pointer;
    font-size:18px;
    color:#999;
    z-index:5;
}

.favorite.active{
    color:#f5b301;
}