/*
Theme Name: ربحاوي - Reb7awy
Theme URI: https://reb7awy.online
Author: Tarek Mohamed
Author URI: https://to2mor.net
Description: ثيم مخصص لمنصة ربحاوي للتسويق بالعمولة - خفيف وسريع ومحسّن للأداء
Version: 3.3.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: reb7awy
Tags: rtl-language-support, custom-menu, featured-images, theme-options, translation-ready, woocommerce

This theme is built specifically for Reb7awy affiliate marketing platform.
*/

/* ==========================================
   قواعد CSS أساسية
========================================== */

:root {
    /* Reb7awy Dark Theme - Based on Logo Colors */
    --primary-color: #0055FF;
    --primary-hover: #0096C8;
    --secondary-color: #283C78;
    --secondary-dark: #1E2C4D;
    
    /* Background Colors */
    --dark-bg: #0A1428;
    --dark-bg-light: #151F33;
    --dark-bg-lighter: #1E2C4D;
    
    /* Accent Colors */
    --accent-blue: #0096C8;
    --accent-light: #0055FF;
    
    /* Text Colors */
    --text-white: #FFFFFF;
    --text-light: #CBD3E0;
    --text-gray: #98A2B3;
    --text-dark: #F8F9FA;
    
    /* Status Colors */
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #0096C8;
    
    /* UI Elements */
    --border-color: #283C78;
    --card-bg: #151F33;
    --hover-bg: #1E2C4D;
    
    /* Gradients */
    --reb7awy-gradient: linear-gradient(135deg, #0055FF 0%, #0096C8 100%);
    --reb7awy-gradient-dark: linear-gradient(135deg, #283C78 0%, #0055FF 100%);
    --reb7awy-shadow: 0 4px 20px rgba(0, 85, 255, 0.3);
    
    /* Legacy compatibility */
    --white: #FFFFFF;
    --light-bg: #0A1428;
    
    --shadow-sm: 0 2px 8px rgba(0, 85, 255, 0.15);
    --shadow-md: 0 3px 12px rgba(0, 85, 255, 0.25);
    --shadow-lg: 0 8px 20px rgba(0, 85, 255, 0.35);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
    background: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    font-size: 16px;
}

/* ==========================================
   Typography
========================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* ==========================================
   Container & Layout
========================================== */

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

.site-content {
    min-height: calc(100vh - 200px);
    padding: 40px 0 60px 0;
    background: var(--dark-bg);
}

#page {
    background: var(--dark-bg);
    min-height: 100vh;
}

/* ==========================================
   Buttons
========================================== */

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ==========================================
   Cards
========================================== */

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

/* ==========================================
   Forms
========================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--card-bg);
    color: var(--text-light);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(0, 85, 255, 0.3);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-white);
}

/* ==========================================
   Utilities
========================================== */

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

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

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

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* ==========================================
   Responsive
========================================== */

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .container {
        padding: 0 15px;
    }
    
    .site-content {
        padding: 20px 0;
    }
}

/* ==========================================
   Homepage Professional Styles
========================================== */

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0A1428 0%, #283C78 50%, #0055FF 100%);
    padding: 100px 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: white;
    margin-bottom: 24px;
    font-size: 3rem;
    font-weight: 900;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.8;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #0055FF 0%, #0096C8 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 85, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 85, 255, 0.5);
}

.btn-success {
    background: white;
    color: #0055FF;
}

.btn-success:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* Features Section */
.features {
    padding: 80px 0;
    background: #0A1428;
}

.features h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5rem;
    color: #FFFFFF;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.feature-card {
    text-align: center;
    padding: 40px 30px;
    border-radius: 20px;
    background: #151F33;
    border: 2px solid #283C78;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 85, 255, 0.3);
    border-color: #0055FF;
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 16px;
    color: #0055FF;
    font-size: 1.5rem;
}

.feature-card p {
    color: #CBD3E0;
    line-height: 1.8;
}

/* Statistics */
.stats {
    padding: 80px 0;
    background: linear-gradient(135deg, #283C78 0%, #0055FF 100%);
    color: white;
}

.stats h2 {
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.stat-card {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: white;
}

.stat-label {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* CTA Section */
.cta {
    padding: 100px 0;
    text-align: center;
    background: #151F33;
}

.cta h2 {
    margin-bottom: 24px;
    font-size: 2.5rem;
    color: #FFFFFF;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #CBD3E0;
}

/* ============================================
   Navigation Menu Styles
   ============================================ */

.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
    align-items: center;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 12px 20px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.main-navigation a:hover {
    background: rgba(0, 85, 255, 0.15);
    color: #0055FF;
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    background: linear-gradient(135deg, #0055FF 0%, #0096C8 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 85, 255, 0.3);
}

/* Dropdown Menu */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1E2C4D;
    box-shadow: 0 10px 30px rgba(0, 85, 255, 0.3);
    border-radius: 12px;
    border: 1px solid #283C78;
    padding: 10px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
}

.main-navigation ul li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation ul ul li {
    width: 100%;
}

.main-navigation ul ul a {
    padding: 10px 20px;
    border-radius: 0;
    color: #CBD3E0;
}

.main-navigation ul ul a:hover {
    background: rgba(0, 85, 255, 0.2);
    padding-right: 25px;
    color: #0055FF;
}

/* Site Header */
.site-header {
    background: #151F33;
    box-shadow: 0 2px 10px rgba(0, 85, 255, 0.2);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #283C78;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: nowrap;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.2;
}

.site-title a {
    color: #0055FF;
    font-weight: 700;
}

.site-title a:hover {
    color: #0096C8;
}

.site-description {
    display: none;
}

.custom-logo-link {
    display: block;
    max-width: 140px;
}

.custom-logo-link img {
    max-height: 40px;
    width: auto;
    display: block;
}

/* User Account Info */
.user-account-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.user-name {
    font-weight: 600;
    color: #FFFFFF;
    font-size: 0.9rem;
    display: none;
}

.user-balance {
    background: linear-gradient(135deg, #0055FF 0%, #0096C8 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(0, 85, 255, 0.3);
    white-space: nowrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: 2px solid #0055FF;
    color: #0055FF;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.menu-toggle:hover {
    background: #0055FF;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 85, 255, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { 
        font-size: 2rem; 
    }
    .hero p { 
        font-size: 1.1rem; 
    }
    .features-grid, .stats-grid { 
        grid-template-columns: 1fr; 
    }
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* Header Mobile */
    .site-header {
        padding: 8px 0;
    }
    
    .site-header .container {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .site-branding {
        order: 1;
        flex: 0 0 auto;
    }
    
    .custom-logo-link {
        max-width: 100px;
    }
    
    .custom-logo-link img {
        max-height: 32px;
    }
    
    .site-title {
        font-size: 1.2rem;
    }
    
    .menu-toggle {
        display: block;
        order: 2;
        margin-right: auto;
    }
    
    .user-account-info {
        order: 3;
        gap: 5px;
        flex-wrap: nowrap;
    }
    
    .user-name {
        display: none !important;
    }
    
    .user-balance {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .user-account-info .btn-sm {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .main-navigation {
        width: 100%;
        order: 4;
        display: none;
        background: #1E2C4D;
        margin: 10px -20px 0;
        padding: 10px 0;
        border-radius: 0;
    }
    
    .main-navigation.toggled {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation li {
        width: 100%;
        border-bottom: 1px solid #283C78;
    }
    
    .main-navigation li:last-child {
        border-bottom: none;
    }
    
    .main-navigation a {
        padding: 12px 20px;
        border-radius: 0;
        display: block;
    }
    
    .main-navigation .current-menu-item > a,
    .main-navigation .current_page_item > a {
        background: rgba(0, 85, 255, 0.2);
        border-right: 3px solid #0055FF;
    }
    
    .main-navigation ul ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #151F33;
        padding: 0;
        border: none;
    }
    
    .main-navigation ul ul a {
        padding-right: 40px;
        background: #151F33;
    }
}

/* ==========================================
   WooCommerce My Account Full Width
========================================== */

body.woocommerce-account .site-content,
body.woocommerce-account #primary,
body.woocommerce-account .content-area,
body.woocommerce-account .site-main,
body.woocommerce-account .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.woocommerce-account .entry-meta,
body.woocommerce-account .entry-footer,
body.woocommerce-account .post-navigation,
body.woocommerce-account .entry-header {
    display: none !important;
}

body.woocommerce-account article {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ==========================================
   Footer Styles
========================================== */

.site-footer {
    background: #0A1428;
    color: #CBD3E0;
    padding: 60px 0 30px;
    border-top: 2px solid #283C78;
    margin-top: 80px;
}

.footer-widgets {
    margin-bottom: 50px;
}

.footer-widget-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.footer-column h3,
.footer-column .widget-title {
    color: #FFFFFF;
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: #CBD3E0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

/* ==========================================
   Compact Footer Styles
========================================== */

.compact-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    margin-top: 0;
    padding: 40px 0 0;
}

#content {
    min-height: calc(100vh - 200px);
    padding-bottom: 60px;
    background: var(--dark-bg);
}

.footer-content {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

/* Footer About */
.footer-about .footer-logo {
    color: var(--text-white);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-about .footer-logo i {
    color: #0096C8;
}

.footer-about .footer-desc {
    color: var(--text-gray);
    font-size: 14px;
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.footer-social a {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(0, 150, 200, 0.1);
    border: 1px solid rgba(0, 150, 200, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0096C8;
    transition: all 0.3s ease;
    font-size: 14px;
}

.footer-social a:hover {
    background: #0096C8;
    color: white;
    transform: translateY(-2px);
}

/* Footer Links Columns */
.footer-links-col h6,
.footer-contact h6 {
    color: var(--text-white);
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.footer-links-col ul,
.footer-contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-col ul li,
.footer-contact ul li {
    margin-bottom: 8px;
}

.footer-links-col ul li a,
.footer-contact ul li a,
.footer-contact ul li span {
    color: var(--text-light);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links-col ul li a:hover {
    color: #0096C8;
    padding-right: 4px;
}

.footer-contact ul li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.footer-contact ul li i {
    color: #0096C8;
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.footer-contact ul li a:hover {
    color: #0096C8;
}

/* Footer Bottom */
.footer-bottom {
    padding: 20px 0;
}

.footer-bottom p {
    color: var(--text-gray);
    font-size: 13px;
    margin: 0;
}

.footer-bottom strong {
    color: var(--text-white);
}

.footer-legal {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    font-size: 13px;
}

.footer-legal a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-legal a:hover {
    color: #0096C8;
}

.footer-legal span {
    color: var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .compact-footer {
        padding: 30px 0 0;
        margin-top: 40px;
    }
    
    .footer-content {
        padding-bottom: 20px;
    }
    
    .footer-about {
        text-align: center;
    }
    
    .footer-about .footer-logo {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        padding: 16px 0;
    }
    
    .footer-bottom .row {
        text-align: center;
    }
    
    .footer-legal {
        justify-content: center;
        margin-top: 8px;
    }
}
