/*
Theme Name: PSJ Style
Theme URI: https://psj.jo
Author: Husni Al-Quraan
Description: القالب الرسمي والاحترافي لمنصة PSJ الوطنية الشاملة. يتميز بنظام (SPA)، شاشة تحكم مطلقة، دعم AdSense، وبيئة تطوير خام للمبرمجين مع توافق الشورت كود.
Version: 1.1.3
Text Domain: psj-style
*/

:root {
    --header-bg: #000000;
    --footer-bg: #000000;
    --body-bg: #ffffff;
    --menu-bg: #ffffff;
    --text-light: #ffffff;
    --text-dark: #1a1a1a;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    /* إعدام التظليل الأزرق المزعج عند الضغط في الجوال */
    -webkit-tap-highlight-color: transparent; 
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-dark);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    direction: rtl;
}

/* Header */
.psj-header {
    background-color: var(--header-bg);
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    color: var(--text-light);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 100;
    padding-top: env(safe-area-inset-top, 0px);
}
.header-right { font-size: 22px; font-weight: 700; flex: 1; text-align: right; }
.header-center { flex: 1; text-align: center; }
.header-center img, .header-center h1 { max-height: 55px; max-width: 180px; object-fit: contain; margin: 0; color: var(--text-light); font-size: 24px;}
.header-left { flex: 1; text-align: left; }
.header-left img { max-height: 70px; width: auto; border-radius: 4px; object-fit: contain; }

/* Main Body */
.psj-main {
    flex: 1;
    background-color: var(--body-bg);
    overflow-y: auto;
    position: relative;
    padding: 40px;
}
#dynamic-content {
    max-width: 1200px;
    margin: 0 auto;
    animation: psjFadeIn 0.4s ease-out forwards;
}
@keyframes psjFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Magic Menu */
.magic-menu {
    position: fixed;
    bottom: calc(115px + env(safe-area-inset-bottom, 0px)); 
    left: 50%;
    transform: translateX(-50%) scale(0);
    transform-origin: bottom center;
    background: #000000;
    border: 1px solid var(--menu-bg);
    border-radius: 20px;
    width: 320px;
    max-width: 90%;
    max-height: 60vh;
    overflow-y: auto;
    box-shadow: 0 15px 35px rgba(0,0,0,0.8);
    padding: 15px;
    z-index: 999;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}
.magic-menu.active {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    pointer-events: auto;
    animation: aladdinLamp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
@keyframes aladdinLamp {
    0% { transform: translateX(-50%) scaleX(0.1) scaleY(0.1) translateY(40px); opacity: 0; filter: blur(5px); }
    60% { transform: translateX(-50%) scaleX(1.1) scaleY(0.9) translateY(-5px); filter: blur(2px); }
    100% { transform: translateX(-50%) scale(1) translateY(0); opacity: 1; filter: blur(0); }
}
.magic-menu ul { list-style: none; padding: 0; margin: 0; }
.magic-menu ul li a {
    display: block;
    padding: 12px 20px;
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.magic-menu ul li:last-child a { border-bottom: none; }
.magic-menu ul li a:hover {
    background-color: var(--menu-bg);
    color: #000000;
    transform: scale(1.03);
}
/* تأثير الضغط للقائمة السحرية */
.magic-menu ul li a:active {
    transform: scale(0.95);
}

/* Footer */
.psj-footer {
    background-color: var(--footer-bg);
    height: calc(85px + env(safe-area-inset-bottom, 0px));
    padding: 0 10px env(safe-area-inset-bottom, 0px) 10px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    z-index: 1000;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.15);
}
.footer-btn {
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    gap: 4px;
    outline: none; /* إخفاء أي حدود افتراضية */
}
.footer-btn i { 
    font-size: 22px; 
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* حركة سلسة للأيقونة */
}
.footer-btn span { font-size: 13px; font-weight: 700; }

.footer-btn:hover {
    color: var(--menu-bg);
    transform: translateY(-3px);
}
/* تأثير الضغط (النبض) للأزرار زي التطبيقات */
.footer-btn:active {
    transform: scale(0.92);
}
.footer-btn:active i {
    transform: scale(1.3);
    color: #ffffff;
}

.center-menu-container { flex: 1; display: flex; justify-content: center; align-items: center; position: relative; height: 100%; }
.center-btn {
    background-color: #ffffff;
    color: #000000;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -25px; 
    border: none;
    box-shadow: 0 5px 15px rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}
.center-btn i { font-size: 26px; transition: transform 0.3s ease; }

.center-btn:hover {
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #ffffff;
    transform: scale(1.1) rotate(90deg);
}
/* تأثير الضغط للزر المركزي */
.center-btn:active {
    transform: scale(0.95);
}
.center-btn:active i {
    transform: scale(0.8);
}

/* Responsive */
@media (max-width: 768px) {
    .psj-header { padding: 0 20px; padding-top: env(safe-area-inset-top, 0px); }
    .header-right { font-size: 18px; }
    .header-center img { max-height: 45px; }
    .header-left img { max-height: 55px; }
    .psj-main { padding: 20px; }
    .footer-btn span { display: none !important; }
    .footer-btn i { font-size: 24px; }
    .center-btn { width: 60px; height: 60px; top: -20px; }
}