/* reset */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: #fef9f0;
    color: #2c3e50;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}


/* navbar */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 10;
}

.logo h1 {
    font-size: 1.8rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f39c12;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    transition: 0.3s;
}

.logo-img:hover {
    transform: rotate(10deg) scale(1.08);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.35);
}

.logo-img:hover,
.footer-logo:hover {
    box-shadow: 0 0 12px #f39c12;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1.1rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: #f39c12;
}

.burger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}


/* hero header */

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://media.licdn.com/dms/image/v2/D561BAQEP53jBZ7DF7g/company-background_10000/company-background_10000/0/1654107773435/fooda_cover?e=2147483647&v=beta&t=S3QuYRrB38j_sGJPRR0pocdYYQpP9Fnyo-EWLoU9C8o') center/cover no-repeat;
    height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.3rem;
}


/* sub-header (للصفحات الفرعية) */

.sub-header {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://www.sheknows.com/wp-content/uploads/2020/06/best-picnic-food-cover-amazon.jpg') center/cover no-repeat;
    height: 35vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    position: relative;
}

.sub-header .navbar {
    background: rgba(0, 0, 0, 0.8);
    position: fixed;
    top: 0;
}

.page-title {
    margin-top: 80px;
}

.page-title h2 {
    font-size: 2.5rem;
}


/* الأقسام */

.section {
    padding: 4rem 5%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f1f1;
}

.section-header h2 {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.section-header h2 {
    border-right: 4px solid #e67e22;
    padding-right: 10px;
}

.section-header h2 i {
    color: #27ae60;
    font-size: 1.4rem;
}

.badge-section {
    background: #e67e22;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e67e22;
    font-weight: 600;
    transition: 0.3s;
}

.view-all:hover {
    color: #d35400;
    transform: translateX(-3px);
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all .3s ease;
}


/* حركة عند المرور */

.view-all:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}


/* حركة الأيقونة */

.view-all i {
    transition: transform .3s ease;
}

.view-all:hover i {
    transform: translateX(-6px);
}

.section-header .view-all {
    margin-top: 5px;
}


/* تأثير عند الضغط */

.view-all:active {
    transform: scale(.96);
}

@media (max-width:768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .view-all {
        font-size: 0.9rem;
    }
}


/* شبكة البطاقات */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}


/* تصميم البطاقة */

.card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #e67e22;
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}


/* ألوان مختلفة للشارات حسب النوع */

.card-badge.diet-loss {
    background-color: #27ae60;
}

.card-badge.diet-gain {
    background-color: #c0392b;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.ingredients {
    color: #7f8c8d;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    color: #95a5a6;
    font-size: 0.85rem;
    border-top: 1px solid #ecf0f1;
    padding-top: 0.8rem;
}

.card-footer i {
    margin-left: 0.3rem;
}


/* الفوتر */

footer {
    background-color: #2c3e50;
    color: white;
    padding: 3rem 5% 1rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #f39c12;
}

.footer-brand {
    text-align: center;
}

.footer-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 3px solid #f39c12;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    transition: 0.4s;
}

.footer-logo:hover {
    transform: scale(1.1) rotate(-5deg);
}

.footer-col p,
.footer-col ul {
    color: #bdc3c7;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a:hover {
    color: #f39c12;
}

.social-links {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.social-links a:hover {
    color: #f39c12;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}


/* تجاوب للهواتف */

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        right: 0;
        background-color: rgba(0, 0, 0, 0.9);
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
    }
    .nav-links.active {
        display: flex;
    }
    .burger {
        display: block;
    }
    .hero-content h2 {
        font-size: 2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .section-header h2 {
        font-size: 1.5rem;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }
}


/* تنسيقات النافذة المنبثقة */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: modalFadeIn 0.3s;
}

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

.close-modal {
    position: absolute;
    left: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #000;
}

.modal-body {
    margin-top: 20px;
}

.modal-body img {
    margin-bottom: 15px;
}

.modal-body ul {
    list-style-type: disc;
    padding-right: 20px;
    margin-bottom: 15px;
}

.author-info {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.video-container {
    margin: 15px 0;
    position: relative;
    padding-bottom: 56.25%;
    /* نسبة 16:9 */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}


/* تحسين استجابة البطاقات */

.card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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


/* تحسين عرض المقادير وطريقة التحضير داخل modal */

.ingredients-list {
    list-style-type: circle;
    padding-right: 20px;
    margin-bottom: 15px;
    columns: 2;
    /* عرض القائمة على عمودين لتوفير المسافة */
    column-gap: 30px;
}

.ingredients-list li {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.method-text {
    line-height: 1.7;
    background-color: #f9f9f9;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    white-space: pre-line;
    /* يحافظ على فواصل الأسطر */
}


/* محرك البحث  */

.top-bar {
    background-color: #f8f9fa;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container input {
    padding: 10px 40px 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 20px;
    font-family: 'Tajawal', sans-serif;
    width: 700px;
    font-size: 15px;
}

.search-container i {
    position: absolute;
    left: 12px;
    color: #6c757d;
}

.btn-submit {
    background-color: #d35400;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 15px;
}

.btn-submit:hover {
    background-color: #e67e22;
}


/* تحسين محرك البحث للهواتف */

@media (max-width:768px) {
    .top-bar {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .search-container {
        width: 100%;
    }
    .search-container input {
        width: 100%;
    }
    .btn-submit {
        justify-content: center;
        width: 100%;
    }
}


/* أزرار التصفية */

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 0;
    padding: 0 5%;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: white;
    border: 2px solid #e67e22;
    color: #e67e22;
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Tajawal', sans-serif;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #e67e22;
    color: white;
}


/* تحسين التوافق مع الهواتف */

@media (max-width:768px) {
    .filter-buttons {
        gap: 0.5rem;
        margin-top: 1.5rem;
        padding: 0 3%;
    }
    .filter-btn {
        flex: 1 1 calc(50% - 10px);
        text-align: center;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

.filter-btn {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.filter-btn:hover {
    transform: translateY(-2px);
}

header {
    position: relative;
    /* يسمح للعناصر المطلقة داخله بالتموضع بالنسبة للهيدر */
    height: 70px;
    /* ارتفاع الهيدر حسب تصميمك */
    background-color: #f8f8f8;
    /* أو لون الهيدر */
    display: flex;
    align-items: center;
    justify-content: center;
    /* يجعل محتوى الهيدر في الوسط */
}

.install-btn {
    background: #27ae60;
    /* لون الزر، يمكن تغييره لينسجم مع الهيدر */
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    position: absolute;
    /* بالنسبة للهيدر */
    top: 90%;
    /* منتصف ارتفاع الهيدر */
    left: 50%;
    /* منتصف عرض الهيدر */
    transform: translate(-90%, -50%);
    /* لضبطه تمامًا في الوسط */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.3s, transform 0.2s;
}

.install-btn:hover {
    background: #219150;
    transform: translate(-50%, -50%) scale(1.05);
}

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fef9f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#splash-screen img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 15px;
    animation: logoPulse 1.5s infinite;
}

#splash-screen h2 {
    font-family: 'Tajawal', sans-serif;
    color: #e67e22;
}

@keyframes logoPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
    }
}