/*
Theme Name: Alfikr Academy
Theme URI: https://alfikracademy.com
Author: Jehad Ali
Author URI: https://alfikracademy.com
Description: نظام تعليمي احترافي مع واجهة عصرية وتفاعلية
Version: 2.0
License: GPL v2 or later
Text Domain: alfikr
*/

@tailwind base;
@tailwind components;
@tailwind utilities;

/* المكونات المخصصة */
@layer components {
    .course-card {
        @apply bg-white rounded-xl shadow-lg overflow-hidden transition-all duration-300 hover:shadow-2xl hover:-translate-y-1;
    }
    
    .course-card-image {
        @apply w-full h-56 object-cover;
    }
    
    .course-card-content {
        @apply p-6;
    }
    
    .btn-primary {
        @apply bg-blue-600 hover:bg-blue-700 text-white font-semibold py-3 px-6 rounded-lg transition duration-300;
    }
    
    .btn-outline {
        @apply border-2 border-blue-600 text-blue-600 hover:bg-blue-600 hover:text-white font-semibold py-3 px-6 rounded-lg transition duration-300;
    }
    
    .section-title {
        @apply text-4xl font-bold text-gray-900 mb-4;
    }
    
    .section-subtitle {
        @apply text-xl text-gray-600 mb-8;
    }
    
    .dashboard-glass {
        @apply backdrop-blur-lg bg-white/80 border border-white/20 shadow-xl;
    }
}

/* تخصيصات عامة */
body {
    @apply antialiased text-gray-900 bg-gray-50 font-sans;
}

.container-custom {
    @apply max-w-7xl mx-auto px-4 sm:px-6 lg:px-8;
}

/* أنيميشن للعناصر */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}
/* ============================================================
   [FIX FOOTER GAP] - إصلاح الفجوة بين المحتوى والفوتر
   ============================================================ */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

#main-content {
    min-height: calc(100vh - 64px - 200px);
    display: flex;
    flex-direction: column;
}

#main-content > * {
    flex-shrink: 0;
}

.site-footer {
    margin-top: 0 !important;
    padding: 30px 20px 25px !important;
    border-top: 1px solid rgba(201, 168, 76, 0.15) !important;
    background: rgba(15, 23, 42, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    position: relative !important;
    z-index: 1 !important;
}

/* إصلاح للصفحات التي تحتوي على محتوى قصير */
.page-template-template-dashboard .site-footer,
.page-template-page-shop .site-footer,
.page-template-page-all-courses .site-footer,
.page-template-page-blog .site-footer {
    margin-top: 0 !important;
}
/* ===== أزرار محسّنة ===== */
.btn-continue-shopping {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 12px 28px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Cairo', 'Inter', sans-serif;
}

.btn-continue-shopping:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-continue-shopping i {
    font-size: 14px;
    color: #C9A84C;
}

.btn-go-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.12);
    border-radius: 50px;
    padding: 12px 28px;
    color: #C9A84C;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Cairo', 'Inter', sans-serif;
}

.btn-go-home:hover {
    background: rgba(201, 168, 76, 0.15);
    color: #FDCB6E;
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-go-home i {
    font-size: 14px;
}

.btn-update-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 12px 28px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'Cairo', 'Inter', sans-serif;
    border: none;
}

.btn-update-cart:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-2px);
}

.btn-update-cart i {
    color: #C9A84C;
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.cart-actions-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 480px) {
    .cart-actions-bottom {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-continue-shopping,
    .btn-update-cart,
    .btn-go-home {
        justify-content: center;
        padding: 12px 20px;
        width: 100%;
    }
    .empty-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
/* ===== تنسيق Payment Options بشكل زجاجي ===== */
.woocommerce-checkout #payment {
    background: rgba(15, 26, 44, 0.4) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
}

.woocommerce-checkout #payment ul.payment_methods {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}

.woocommerce-checkout #payment ul.payment_methods li {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    margin-bottom: 8px !important;
    transition: all 0.3s ease !important;
}

.woocommerce-checkout #payment ul.payment_methods li:hover {
    border-color: rgba(201, 168, 76, 0.2) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

.woocommerce-checkout #payment ul.payment_methods li label {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600 !important;
}

.woocommerce-checkout #payment ul.payment_methods li input[type="radio"] {
    accent-color: #C9A84C !important;
    width: 18px !important;
    height: 18px !important;
}

/* تنسيق payment_box */
.woocommerce-checkout #payment div.payment_box {
    background: rgba(15, 26, 44, 0.6) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    padding: 18px 20px !important;
    margin-top: 10px !important;
    margin-left: 0 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 13px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15) !important;
    width: 100% !important;
}

.woocommerce-checkout #payment div.payment_box::before {
    display: none !important;
}

/* تنسيق حقول Stripe */
.woocommerce-checkout #payment div.payment_box .form-row input,
.woocommerce-checkout #payment div.payment_box .form-row select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: white !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    width: 100% !important;
}

.woocommerce-checkout #payment div.payment_box .form-row input:focus,
.woocommerce-checkout #payment div.payment_box .form-row select:focus {
    border-color: #C9A84C !important;
    box-shadow: 0 0 30px rgba(201, 168, 76, 0.05) !important;
    outline: none !important;
}

.woocommerce-checkout #payment div.payment_box .form-row label {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
}

.woocommerce-checkout #payment div.payment_box .form-row {
    margin-bottom: 12px !important;
}

/* تنسيق زر Place Order داخل payment */
.woocommerce-checkout #payment .place-order {
    padding: 0 !important;
    margin-top: 20px !important;
}

/* إخفاء رسائل WooCommerce المزعجة */
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-error {
    display: none !important;
}
/* ===== تنسيق شامل لكل payment_box ===== */
.woocommerce-checkout #payment div.payment_box {
    background: rgba(15, 26, 44, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    padding: 18px 20px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

.woocommerce-checkout #payment div.payment_box p {
    color: rgba(255, 255, 255, 0.6) !important;
}

.woocommerce-checkout #payment div.payment_box label {
    color: rgba(255, 255, 255, 0.5) !important;
}

.woocommerce-checkout #payment div.payment_box input,
.woocommerce-checkout #payment div.payment_box select {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: white !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    width: 100% !important;
}

.woocommerce-checkout #payment div.payment_box input:focus,
.woocommerce-checkout #payment div.payment_box select:focus {
    border-color: #C9A84C !important;
    outline: none !important;
}

.woocommerce-checkout #payment div.payment_box input::placeholder {
    color: rgba(255, 255, 255, 0.25) !important;
}

/* تنسيق الصفوف في payment_box */
.woocommerce-checkout #payment div.payment_box .form-row {
    margin-bottom: 12px !important;
}

/* إصلاح أيقونات البطاقات */
.woocommerce-checkout #payment div.payment_box .stripe-card-icons,
.woocommerce-checkout #payment div.payment_box .card-icons {
    display: flex !important;
    gap: 8px !important;
    margin: 8px 0 12px !important;
    flex-wrap: wrap !important;
}
/* ============================================================
   [AVATAR UPLOAD] - رفع الصورة الرمزية
   ============================================================ */

.avatar-upload-section {
    background: rgba(255,255,255,0.02);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 24px;
    margin-top: 20px;
}

.avatar-upload-section .avatar-preview {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.avatar-upload-section .avatar-preview .current-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #C9A84C;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
}

.avatar-upload-section .avatar-preview .current-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-section .avatar-preview .avatar-info h4 {
    color: white;
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 4px;
}

.avatar-upload-section .avatar-preview .avatar-info p {
    color: rgba(255,255,255,0.3);
    font-size: 13px;
    margin: 0;
}

.avatar-upload-section .avatar-upload-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.avatar-upload-section .avatar-upload-form .file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    flex: 1;
    min-width: 200px;
}

.avatar-upload-section .avatar-upload-form .file-input-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.avatar-upload-section .avatar-upload-form .file-input-wrapper .file-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.avatar-upload-section .avatar-upload-form .file-input-wrapper .file-label:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.avatar-upload-section .avatar-upload-form .file-input-wrapper .file-label i {
    color: #C9A84C;
    font-size: 16px;
}

.avatar-upload-section .avatar-upload-form .file-name {
    color: rgba(255,255,255,0.3);
    font-size: 13px;
    flex: 1;
}

.avatar-upload-section .avatar-upload-form .upload-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #C9A84C, #b8963e);
    border: none;
    border-radius: 10px;
    color: #0F1A2C;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', 'Inter', sans-serif;
}

.avatar-upload-section .avatar-upload-form .upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201,168,76,0.3);
}

.avatar-upload-section .avatar-upload-form .upload-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.avatar-upload-section .avatar-upload-form .upload-btn .spinner {
    display: none;
    animation: spin 0.8s linear infinite;
}

.avatar-upload-section .avatar-upload-form .upload-btn.loading .spinner {
    display: inline-block;
}

.avatar-upload-section .avatar-upload-form .upload-btn.loading .btn-text {
    display: none;
}

.avatar-upload-section .avatar-message {
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    display: none;
}

.avatar-upload-section .avatar-message.success {
    display: block;
    background: rgba(0, 184, 148, 0.08);
    border: 1px solid rgba(0, 184, 148, 0.15);
    color: #00B894;
}

.avatar-upload-section .avatar-message.error {
    display: block;
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.15);
    color: #FF6B6B;
}

.avatar-upload-section .avatar-message i {
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .avatar-upload-section .avatar-preview {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .avatar-upload-section .avatar-upload-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .avatar-upload-section .avatar-upload-form .file-input-wrapper {
        min-width: auto;
    }
}
/* ============================================================
   [FIX: FOOTER POSITION]
   ============================================================ */

/* التأكد من أن المحتوى الرئيسي يملأ المساحة */
.dashboard-wrapper {
    min-height: calc(100vh - 58px - 180px);
    display: flex;
    flex-direction: column;
}

.dashboard-container {
    flex: 1;
}

/* منع الفوتر من الصعود */
.dashboard-content .tab-content {
    padding-bottom: 20px;
}

/* إصلاح الفوتر */
.site-footer {
    margin-top: 0 !important;
    position: relative !important;
    clear: both !important;
}
/* ===== إصلاح الفوتر ومنع انسخاط الصفحة ===== */
.dashboard-wrapper {
    min-height: calc(100vh - 58px - 180px);
    background: #0F1A2C;
    padding: 30px 20px 60px;
    display: block;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    align-items: flex-start;
}

.dashboard-sidebar {
    position: sticky;
    top: 90px;
    align-self: flex-start;
    height: fit-content;
}

.dashboard-content {
    min-width: 0;
}

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

.dashboard-content .tab-content.active {
    display: block;
}

/* التأكد من أن الفوتر يبقى في الأسفل */
.site-footer {
    margin-top: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    clear: both !important;
}