/*
Theme Name: صندوق المزيني
Theme URI: https://almozainy.com
Author: Almozainy Family Fund
Author URI: https://almozainy.com
Description: قالب ووردبريس عربي احترافي وبسيط لصندوق عائلة المزيني، متجاوب ومتوافق مع WooCommerce
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
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: almozainy-theme
Tags: rtl-language-support, custom-menu, featured-images, threaded-comments, translation-ready, woocommerce, responsive-layout, arabic
*/

/* ========================================
   CSS Variables - الألوان والمتغيرات
======================================== */
:root {
    --primary-green: #1a5f4f;
    --primary-gold: #b8985f;
    --dark-green: #0f3d32;
    --light-green: #e8f5f1;
    --light-gold: #f5f0e8;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --transition: all 0.3s ease;
}

/* ========================================
   Reset & Base Styles
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

/* ========================================
   Typography - الخطوط والعناوين
======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-dark);
    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; }

p {
    margin-bottom: 1rem;
}

/* ========================================
   Container & Layout
======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* ========================================
   Header Styles
======================================== */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-top {
    background: var(--primary-green);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.9rem;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-top-left {
    display: flex;
    align-items: center;
}

.header-top .user-account-area {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-top .user-account-link {
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    font-weight: 500;
}

.header-top .user-account-link:hover {
    color: var(--primary-gold);
}

.btn-topbar {
    padding: 6px 15px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-topbar:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.btn-topbar-primary {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
}

.btn-topbar-primary:hover {
    background: var(--dark-green);
    border-color: var(--dark-green);
}

.header-main {
    padding: 15px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.site-logo {
    flex-shrink: 0;
}

.site-logo img {
    max-height: 60px;
    max-width: 200px;
    width: auto;
    height: auto;
}

@media (max-width: 768px) {
    .site-logo img {
        max-height: 50px;
        max-width: 150px;
    }
}

/* ========================================
   Navigation Menu
======================================== */
.main-navigation {
    flex-grow: 1;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 25px;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 5px;
    display: block;
    white-space: nowrap;
}

.main-navigation a:hover {
    color: var(--primary-green);
}

.main-navigation .current-menu-item > a {
    color: var(--primary-green);
    border-bottom: 2px solid var(--primary-gold);
}

/* Submenu */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
}

.main-navigation li:hover > ul {
    display: flex;
}

.main-navigation ul ul a {
    padding: 10px 20px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-green);
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle i {
    font-size: 1.5rem;
}

/* ========================================
   User Account Area (Removed from main header)
======================================== */

.btn {
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--dark-green);
    border-color: var(--dark-green);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary-green);
    border-color: var(--primary-green);
}

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

.user-account-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-green);
    font-weight: 600;
}

.user-account-link:hover {
    color: var(--primary-gold);
}

/* ========================================
   Hero Slider
======================================== */
.hero-slider {
    position: relative;
    overflow: hidden;
    background: var(--light-green);
}

.slider-item {
    min-height: 500px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.slider-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 95, 79, 0.9) 0%, rgba(26, 95, 79, 0.7) 100%);
}

.slider-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 600px;
}

.slider-content h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.slider-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease 0.2s;
    animation-fill-mode: both;
}

.slider-content .btn {
    animation: fadeInUp 0.8s ease 0.4s;
    animation-fill-mode: both;
}

/* ========================================
   About Section - من نحن
======================================== */
.about-section {
    padding: 80px 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background: var(--primary-gold);
}

.section-description {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 20px auto 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-text h3 {
    color: var(--primary-green);
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ========================================
   Features Section
======================================== */
.features-section {
    padding: 80px 0;
    background: var(--light-green);
}

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

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--light-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2rem;
    color: var(--primary-gold);
}

.feature-card h3 {
    color: var(--primary-green);
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-light);
    margin: 0;
}

/* ========================================
   News Section - الأخبار
======================================== */
.news-section {
    padding: 80px 0;
    background: var(--white);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.news-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.news-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.news-image {
    height: 220px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.news-content {
    padding: 25px;
}

.news-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.news-content h3 {
    margin-bottom: 15px;
}

.news-content h3 a {
    color: var(--text-dark);
}

.news-content h3 a:hover {
    color: var(--primary-green);
}

.news-excerpt {
    color: var(--text-light);
    margin-bottom: 20px;
}

.read-more {
    color: var(--primary-green);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    color: var(--primary-gold);
}

/* ========================================
   Footer
======================================== */
.site-footer {
    background: var(--dark-green);
    color: var(--white);
    padding: 60px 0 0;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widget h3 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.footer-widget p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-widget ul {
    list-style: none;
}

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

.footer-widget ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-widget ul li a:hover {
    color: var(--primary-gold);
    padding-right: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
    font-size: 0.9rem;
}

.social-links a:hover {
    background: var(--primary-gold);
    transform: translateY(-2px);
}

.header-top .social-links {
    display: flex;
    gap: 10px;
}

.header-top .social-links a {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}

.footer-bottom {
    padding: 25px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 992px) {
    .header-main .container {
        flex-direction: row-reverse;
    }
    
    .site-logo {
        order: 1;
    }
    
    .mobile-menu-toggle {
        display: block;
        order: 3;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--white);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        padding: 20px;
        order: 2;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation a {
        white-space: normal;
    }
    
    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        padding-right: 20px;
    }
    
    .header-top .social-links {
        display: none;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .slider-content h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .header-top .social-links {
        display: none !important;
    }
    
    .header-top-left {
        display: none;
    }
    
    .header-top .container {
        justify-content: flex-end;
    }
    
    .btn-topbar {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
    
    .header-top .user-account-area {
        gap: 10px;
    }
    
    .slider-item {
        min-height: 400px;
    }
    
    .about-section,
    .features-section,
    .news-section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* ========================================
   Animations
======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Utility Classes
======================================== */
.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; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
