﻿/*
Theme Name: Yad Biyad - يداً بيد
Theme URI: https://handbyhandps.com
Author: Hand by Hand Foundation
Description: قالب خيري عربي احترافي لمؤسسة يداً بيد - موقع صفحة واحدة متجاوب
Version: 2.0.0
Text Domain: yadbiyad
*/

:root {
    --primary: #1B7A4B;
    --primary-light: #2E9B63;
    --primary-dark: #145A38;
    --secondary: #C9A227;
    --secondary-light: #D4B84A;
    --background: #FFFFFF;
    --foreground: #1A1A1A;
    --muted: #F5F5F5;
    --muted-foreground: #666666;
    --card: #FFFFFF;
    --card-foreground: #1A1A1A;
    --border: #E5E5E5;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--foreground);
    background: var(--background);
    direction: rtl;
    text-align: right;
}

a { color: inherit; text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; }

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

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 28px; font-size: 1rem; font-weight: 600;
    border-radius: var(--radius); border: 2px solid transparent;
    cursor: pointer; transition: all 0.3s ease; text-decoration: none;
    font-family: inherit;
}
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: white; border-color: white; }
.btn-outline:hover { background: white; color: var(--primary); }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-danger { background: #dc3545; color: white; border-color: #dc3545; }
.btn-danger:hover { background: #c82333; }
.btn-secondary { background: #6c757d; color: white; border-color: #6c757d; }
.btn-sm { padding: 6px 16px; font-size: 0.85rem; }

/* Header */
.site-header {
    position: fixed; top: 0; right: 0; left: 0; z-index: 1000;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
    box-shadow: var(--shadow); transition: all 0.3s ease;
}
.header-content { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.site-logo img { height: 60px; width: auto; border-radius: 8px; }
.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a { font-weight: 600; color: var(--foreground); position: relative; padding: 8px 0; }
.main-nav a::after { content: ''; position: absolute; bottom: 0; right: 0; width: 0; height: 2px; background: var(--primary); transition: width 0.3s ease; }
.main-nav a:hover::after, .main-nav a.current::after { width: 100%; }
.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 10px; }
.menu-toggle span { width: 25px; height: 3px; background: var(--foreground); border-radius: 2px; transition: all 0.3s ease; }

/* Hero Section */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; color: white; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(27, 122, 75, 0.85) 0%, rgba(20, 90, 56, 0.95) 100%); }
.hero-content { position: relative; z-index: 10; max-width: 800px; padding: 0 20px; }
.hero-title { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; margin-bottom: 16px; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); }
.hero-subtitle { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 600; margin-bottom: 24px; opacity: 0.95; }
.hero-description { font-size: 1.2rem; max-width: 600px; margin: 0 auto 32px; opacity: 0.9; line-height: 1.8; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.scroll-indicator { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); width: 30px; height: 50px; border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 20px; display: flex; justify-content: center; padding-top: 8px; }
.scroll-dot { width: 6px; height: 6px; background: white; border-radius: 50%; animation: scrollBounce 2s infinite; }
@keyframes scrollBounce { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(15px); opacity: 0.3; } }

/* Stats Section */
.stats { background: var(--primary); padding: 60px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; color: white; }
.stat-item { padding: 20px; }
.stat-icon { font-size: 3rem; margin-bottom: 16px; }
.stat-number { font-size: 2.5rem; font-weight: 800; margin-bottom: 8px; }
.stat-label { font-size: 1.1rem; opacity: 0.9; }

/* Campaigns Section */
.campaigns { padding: 100px 0; background: var(--muted); }
.section-title { font-size: 2.5rem; text-align: center; margin-bottom: 16px; color: var(--foreground); }
.section-subtitle { text-align: center; color: var(--muted-foreground); font-size: 1.1rem; margin-bottom: 50px; }
.campaigns-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.campaign-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all 0.3s ease; }
.campaign-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.campaign-image { width: 100%; height: 200px; object-fit: cover; }

/* Image Slider */
.card-slider { position: relative; width: 100%; height: 220px; overflow: hidden; background: #e8e8e8; }
.card-slider .slides { position: relative; width: 100%; height: 100%; }
.card-slider .slides img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s ease; }
.card-slider .slides img.active-slide { opacity: 1; }
.card-slider .slider-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 10; }
.card-slider .slider-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); border: none; cursor: pointer; transition: all 0.3s; }
.card-slider .slider-dot.active { background: white; width: 20px; border-radius: 4px; }
.card-slider .slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); color: white; border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; z-index: 10; font-size: 18px; transition: background 0.3s; display: flex; align-items: center; justify-content: center; }
.card-slider .slider-arrow:hover { background: rgba(0,0,0,0.7); }
.card-slider .slider-arrow.prev { right: 8px; }
.card-slider .slider-arrow.next { left: 8px; }
.card-slider .slide-count { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,0.5); color: white; padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; z-index: 10; }

/* Single image fallback */
.card-slider.single-image .slides img { opacity: 1; }
.campaign-content { padding: 24px; }
.campaign-title { font-size: 1.3rem; margin-bottom: 12px; color: var(--foreground); }
.campaign-description { color: var(--muted-foreground); margin-bottom: 20px; line-height: 1.7; }
.campaign-progress { margin-bottom: 16px; }
.progress-bar { height: 8px; background: var(--muted); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 10px; transition: width 0.5s ease; }
.progress-info { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.9rem; color: var(--muted-foreground); }

/* Contact Section */
.contact { padding: 100px 0; background: var(--muted); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 50px; }
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-item { display: flex; align-items: flex-start; gap: 16px; padding: 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-icon { font-size: 1.5rem; width: 50px; height: 50px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.contact-item h4 { font-size: 1rem; margin-bottom: 4px; }
.contact-item p { color: var(--muted-foreground); }
.whatsapp-btn { display: flex; align-items: center; gap: 16px; padding: 20px; background: #25D366; color: white; border-radius: var(--radius); transition: all 0.3s ease; }
.whatsapp-btn:hover { background: #1da851; color: white; transform: translateY(-2px); }
.whatsapp-icon { font-size: 2rem; }

/* Contact Form */
.contact-form-wrapper { background: var(--card); padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-form-wrapper h3 { font-size: 1.5rem; margin-bottom: 24px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 14px 18px; border: 2px solid var(--border); border-radius: var(--radius); font-family: inherit; font-size: 1rem; margin-bottom: 16px; transition: border-color 0.3s ease; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.donation-selector { background: var(--muted); padding: 20px; border-radius: var(--radius); margin-bottom: 16px; }
.donation-selector p { font-weight: 600; margin-bottom: 12px; }
.donation-amounts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.amount-btn { padding: 10px 20px; border: 2px solid var(--primary); background: white; color: var(--primary); border-radius: var(--radius); font-weight: 600; cursor: pointer; transition: all 0.3s ease; font-family: inherit; }
.amount-btn:hover, .amount-btn.active { background: var(--primary); color: white; }
.form-note { text-align: center; color: var(--muted-foreground); font-size: 0.9rem; margin-top: 12px; }

/* Footer */
.site-footer { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); color: white; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-about p { opacity: 0.8; line-height: 1.8; margin-top: 16px; }
.footer-logo { height: 70px; border-radius: 8px; }
.footer-links h4, .footer-social h4 { font-size: 1.2rem; margin-bottom: 20px; }
.footer-links a { display: block; padding: 8px 0; opacity: 0.8; transition: all 0.3s ease; }
.footer-links a:hover { opacity: 1; color: white; padding-right: 10px; }
.social-links { display: flex; gap: 12px; }
.social-link { width: 45px; height: 45px; background: rgba(255, 255, 255, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: all 0.3s ease; }
.social-link:hover { background: var(--secondary); transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 20px 0; text-align: center; opacity: 0.7; }

/* Scroll Animations */
.animate-element { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.animate-element.animate-in { opacity: 1; transform: translateY(0); }

/* Responsive Design */
@media (max-width: 992px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .main-nav { display: none; position: absolute; top: 100%; right: 0; left: 0; background: white; flex-direction: column; padding: 20px; box-shadow: var(--shadow); }
    .main-nav.active { display: flex; }
    .menu-toggle { display: flex; }
    .header-content .btn { display: none; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .stat-number { font-size: 2rem; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .social-links { justify-content: center; }
}
@media (max-width: 480px) {
    .container { padding: 0 15px; }
    .section-title { font-size: 2rem; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1.3rem; }
    .campaigns, .contact { padding: 60px 0; }
    .contact-form-wrapper { padding: 24px; }
}

/* ═══════════════════════════════════════════════════════════ */
/* Admin Dashboard Styles */
/* ═══════════════════════════════════════════════════════════ */
.admin-login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}
.login-box { background: white; padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 420px; }
.login-box h1 { text-align: center; margin-bottom: 8px; color: var(--primary); font-size: 1.8rem; }
.login-box .subtitle { text-align: center; color: var(--muted-foreground); margin-bottom: 30px; }
.login-box .form-group { margin-bottom: 20px; }
.login-box label { display: block; font-weight: 600; margin-bottom: 6px; }
.login-box input[type="text"], .login-box input[type="password"], .login-box input[type="email"] {
    width: 100%; padding: 12px 16px; border: 2px solid var(--border); border-radius: var(--radius);
    font-family: inherit; font-size: 1rem; transition: border-color 0.3s;
}
.login-box input:focus { outline: none; border-color: var(--primary); }
.login-box .btn-primary { width: 100%; padding: 14px; font-size: 1.1rem; }
.login-error { background: #fff3cd; color: #856404; padding: 12px; border-radius: var(--radius); margin-bottom: 20px; text-align: center; }

/* Admin Layout */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 260px; background: var(--primary-dark); color: white; padding: 0;
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
    overflow-y: auto;
}
.sidebar-header { padding: 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-header img { height: 50px; border-radius: 8px; margin-bottom: 8px; }
.sidebar-header h2 { font-size: 1.1rem; }
.sidebar-nav { padding: 10px 0; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px; padding: 14px 24px;
    color: rgba(255,255,255,0.7); transition: all 0.3s; font-weight: 500;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    background: rgba(255,255,255,0.1); color: white;
}
.sidebar-nav a .icon { font-size: 1.2rem; width: 24px; text-align: center; }
.admin-main { margin-right: 260px; flex: 1; background: #f8f9fa; min-height: 100vh; }
.admin-topbar {
    background: white; padding: 16px 30px; box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex; justify-content: space-between; align-items: center;
}
.admin-topbar h3 { font-size: 1.2rem; }
.admin-content { padding: 30px; }

/* Dashboard Cards */
.stats-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card {
    background: white; padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow);
    display: flex; align-items: center; gap: 16px;
}
.stat-card .icon { font-size: 2.5rem; }
.stat-card .info h4 { color: var(--muted-foreground); font-size: 0.9rem; font-weight: 500; }
.stat-card .info .number { font-size: 1.8rem; font-weight: 800; color: var(--foreground); }

/* Admin Tables */
.admin-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th { background: var(--primary); color: white; padding: 14px 16px; text-align: right; font-weight: 600; }
.admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.admin-table tr:hover { background: var(--muted); }
.admin-table img { width: 60px; height: 45px; object-fit: cover; border-radius: 8px; }

/* Admin Cards */
.admin-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.admin-card h3 { margin-bottom: 20px; font-size: 1.2rem; }

/* Admin Form */
.admin-form .form-group { margin-bottom: 20px; }
.admin-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.admin-form input[type="text"], .admin-form input[type="number"], .admin-form input[type="email"],
.admin-form input[type="url"], .admin-form input[type="password"], .admin-form textarea,
.admin-form select {
    width: 100%; padding: 12px 16px; border: 2px solid var(--border); border-radius: var(--radius);
    font-family: inherit; font-size: 1rem; transition: border-color 0.3s;
}
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus { outline: none; border-color: var(--primary); }
.admin-form textarea { resize: vertical; min-height: 120px; }
.admin-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Alert Messages */
.alert { padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 500; }
.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }

/* Status Badge */
.badge { padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }

/* Page Header */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.page-header h2 { font-size: 1.5rem; }

@media (max-width: 768px) {
    .admin-sidebar { width: 0; overflow: hidden; }
    .admin-main { margin-right: 0; }
    .admin-form .form-row { grid-template-columns: 1fr; }
}
