/* ==================== CSS VARIABLES & ROOT ====================  */

:root {
    --gold: #d4af37;
    --gold-light: #f0c040;
    --silver: #e8e8e8;
    --silver-dark: #b0b0b0;
    --black: #0a0a0a;
    --black-light: #1a1a1a;
    --white: #ffffff;
    --white-off: #f5f5f5;
    --dark-bg: #0f0f0f;
    --card-bg: var(--gold); /* تم التعديل إلى ذهبي */
    --card-hover: var(--gold-light); /* تم التعديل إلى ذهبي فاتح */
}

/* ==================== GLOBAL STYLES ====================  */

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

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--black);
    color: var(--white);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* ==================== TEXT UTILITIES ====================  */

.gold-text {
    color: var(--gold);
}

.silver-text {
    color: var(--silver);
}

/* ==================== BUTTONS ====================  */

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--black);
    padding: 12px 24px;
    border: 2px solid var(--gold);
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--gold);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-secondary:hover {
    background: var(--gold);
    color: var(--black);
}

/* ==================== NAVIGATION ====================  */

nav {
    background-color: #f5f5f5 !important;
    border-bottom: 2px solid var(--gold);
}

nav * {
    color: var(--black) !important;
}

nav .nav-btn {
    color: var(--black) !important;
}

nav .nav-btn:hover {
    color: var(--gold) !important;
}

nav .nav-btn.active {
    color: var(--gold) !important;
}

.nav-btn {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-bottom: 2px solid transparent;
    font-weight: bold;
    font-size: 14px;
    color: var(--black);
    background: none;
    border: none;
}

.nav-btn:hover {
    color: var(--gold);
}

.nav-btn.active {
    border-bottom: 2px solid var(--gold);
    color: var(--gold);
}

/* ==================== FOOTER ====================  */


/* ==================== FOOTER SECTIONS ====================  */

.footer-section {
    padding: 2rem 1rem;
    text-align: center;
}

.footer-quick-links {
    background-color: var(--gold);
    color: var(--black);
}

.footer-quick-links a {
    color: var(--black);
    text-decoration: none;
    font-weight: bold;
    margin: 0 1rem;
}

.footer-quick-links a:hover {
    color: var(--black-light);
    text-decoration: underline;
}

.footer-social-media {
    background-color: var(--black);
    color: var(--white);
}

.footer-social-media a {
    color: var(--gold);
    margin: 0 1rem;
    font-size: 1.5rem;
}

.footer-social-media a:hover {
    color: var(--gold-light);
}

.footer-platforms {
    background-color: var(--black);
    color: var(--white);
}

.footer-platforms a {
    color: var(--gold);
    margin: 0 1rem;
    font-size: 1.5rem;
}

.footer-platforms a:hover {
    color: var(--gold-light);
}

.footer-copyright {
    background-color: var(--gold);
    color: var(--black);
    font-weight: bold;
}

.footer-copyright a {
    color: var(--black);
    text-decoration: none;
}

.footer-copyright a:hover {
    text-decoration: underline;
}

footer {
    background-color: #f5f5f5 !important;
    border-top: 2px solid var(--gold);
    color: var(--black) !important;
}

footer * {
    color: var(--black) !important;
}

footer a {
    color: var(--gold) !important;
}

footer a:hover {
    color: var(--gold-light) !important;
}

/* ==================== TABS ====================  */

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.active-tab {
    display: block;
}

.admin-tab-content {
    display: none;
}

.active-admin-tab {
    display: block;
}

.admin-tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    border-bottom: 2px solid transparent;
}

.admin-tab-btn:hover {
    color: var(--gold);
}

.admin-tab-btn.active {
    color: var(--gold);
    border-bottom: 2px solid var(--gold);
}

/* ==================== MODALS ====================  */

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
}

.unit-card-container {
    background: var(--gold); /* تم التعديل إلى ذهبي */
    border: 2px solid var(--black); /* تم التعديل إلى أسود للتباين */
    max-width: 500px;
    margin: 20px auto;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.unit-card-container * {
    color: var(--black) !important; /* ضمان أن الخط أسود داخل الكارت */
}

/* ==================== FORMS ====================  */

.form-input {
    width: 100%;
    background: var(--white); /* تم التعديل ليكون أسهل في القراءة */
    border: 2px solid var(--gold);
    border-radius: 8px;
    padding: 12px;
    color: var(--black);
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--black);
    background: var(--white-off);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.filter-input {
    background: var(--white);
    border: 2px solid var(--gold);
    border-radius: 8px;
    padding: 10px;
    color: var(--black);
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-input:hover,
.filter-input:focus {
    border-color: var(--black);
    background: var(--white-off);
    outline: none;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* ==================== CARDS & SPECS ====================  */

.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 15px;
    background: var(--gold-light); /* تم التعديل ليتناسب مع الكارت الذهبي */
}

.spec-box {
    background: var(--gold);
    border: 2px solid var(--black);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    color: var(--black);
}

.spec-box:hover {
    border-color: var(--white);
    background: var(--gold-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.spec-box * {
    color: var(--black) !important;
}

/* ==================== ANIMATIONS ====================  */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==================== RESPONSIVE ====================  */

@media (max-width: 768px) {
    .nav-btn {
        padding: 8px 10px;
        font-size: 12px;
    }

    .spec-grid {
        grid-template-columns: 1fr;
    }

    .unit-card-container {
        max-width: 90%;
    }

    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }
}

/* ==================== SCROLLBAR ====================  */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f0c040;
}

/* ==================== UTILITY CLASSES ====================  */

.container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.text-right {
    text-align: right;
}

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }

.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

.border { border: 1px solid; }
.border-gold { border-color: var(--gold); }
.border-gold\/30 { border-color: rgba(212, 175, 55, 0.3); }

.bg-black { background-color: var(--black); }
.bg-zinc-900 { background-color: #18181b; }

/* كلاسات مخصصة للكروت الذهبية */
.bg-gold-card {
    background-color: var(--gold) !important;
    color: var(--black) !important;
}

.bg-gold-card * {
    color: var(--black) !important;
}

.text-gold-card {
    color: var(--gold) !important;
}

.text-gold {
    color: var(--gold) !important;
}

.bg-gold {
    background-color: var(--gold) !important;
}

.bg-gold-light {
    background-color: var(--gold-light) !important;
}

/* Admin Table Styling */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--black);
    border: 2px solid var(--gold);
    border-radius: 8px;
    overflow: hidden;
}

.admin-table thead {
    background: var(--gold);
    color: var(--black);
}

.admin-table th {
    padding: 12px;
    font-weight: bold;
    text-align: right;
    border-right: 1px solid var(--black);
}

.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gold);
    border-right: 1px solid var(--gold);
    color: var(--white);
}

.admin-table tr:hover {
    background: var(--black-light);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-6xl { font-size: 3.75rem; }
.text-8xl { font-size: 6rem; }

.font-bold { font-weight: bold; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.h-40 { height: 10rem; }
.h-64 { height: 16rem; }

.max-w-xs { max-width: 20rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-4xl { max-width: 56rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }

.cursor-pointer { cursor: pointer; }
.transition { transition: all 0.3s ease; }

.hover\:border-gold:hover { border-color: var(--gold); }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.hover\:shadow-gold\/20:hover { box-shadow: 0 10px 25px rgba(212, 175, 55, 0.2); }
.hover\:bg-black\/50:hover { background-color: rgba(0, 0, 0, 0.5); }
.hover\:bg-green-700:hover { background-color: #15803d; }
.hover\:bg-red-700:hover { background-color: #b91c1c; }
.hover\:text-red-700:hover { color: #b91c1c; }
.hover\:text-gold:hover { color: var(--gold); }
.hover\:bg-gold:hover { background-color: var(--gold); }
.hover\:bg-gold-light:hover { background-color: var(--gold-light); }

.text-white { color: var(--white); }
.text-black { color: var(--black); }
.text-red-500 { color: #ef4444; }
.text-green-600 { color: #16a34a; }
.text-green-200 { color: #bbf7d0; }
.text-yellow-200 { color: #fef08a; }
.text-blue-200 { color: #bfdbfe; }

.bg-red-800 { background-color: #991b1b; }
.bg-red-600 { background-color: #dc2626; }
.bg-green-600 { background-color: #16a34a; }
.bg-blue-900 { background-color: #1e3a8a; }
.bg-yellow-900 { background-color: #713f12; }
.bg-green-900 { background-color: #14532d; }

.border-b { border-bottom: 1px solid; }
.border-gold { border-color: var(--gold); }

/* ==================== RESPONSIVE GRID ====================  */

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:flex-row { flex-direction: row; }
    .md\:mb-0 { margin-bottom: 0; }
    .md\:w-64 { width: 16rem; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}


/* ==================== IMAGE CAROUSEL ====================  */

.image-carousel {
    position: relative;
    overflow: hidden;
}

.image-carousel img {
    transition: opacity 0.3s ease;
}

.image-carousel .absolute {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    padding: 4px 8px;
}

.image-carousel .w-2 {
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-carousel .w-2:hover {
    transform: scale(1.3);
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.bottom-2 {
    bottom: 0.5rem;
}

.left-2 {
    left: 0.5rem;
}

.right-2 {
    right: 0.5rem;
}


/* ==================== SOCIAL MEDIA LINKS ====================  */

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 28px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
    border-color: currentColor;
}

/* Facebook */
.facebook-link {
    color: #1877F2;
}

.facebook-link:hover {
    background-color: rgba(24, 119, 242, 0.15);
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.4);
}

/* Instagram */
.instagram-link {
    color: #E4405F;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.instagram-link:hover {
    background-color: rgba(228, 64, 95, 0.15);
    box-shadow: 0 8px 25px rgba(228, 64, 95, 0.4);
}

/* TikTok */
.tiktok-link {
    color: #000000;
}

.tiktok-link:hover {
    background-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* YouTube */
.youtube-link {
    color: #FF0000;
}

.youtube-link:hover {
    background-color: rgba(255, 0, 0, 0.15);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.4);
}

/* Twitter/X */
.twitter-link {
    color: #000000;
}

.twitter-link:hover {
    background-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* LinkedIn */
.linkedin-link {
    color: #0077B5;
}

.linkedin-link:hover {
    background-color: rgba(0, 119, 181, 0.15);
    box-shadow: 0 8px 25px rgba(0, 119, 181, 0.4);
}

/* WhatsApp */
.whatsapp-link {
    color: #25D366;
}

.whatsapp-link:hover {
    background-color: rgba(37, 211, 102, 0.15);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .social-link {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}
