@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary: #ff4d4d;
    --primary-dark: #e63939;
    --dark: #111111;
    --dark2: #1e1e2e;
    --whatsapp: #25D366;
    --whatsapp-dark: #1da851;
    --bg: #f5f7fa;
    --card-shadow: 0 8px 30px rgba(0,0,0,0.10);
    --radius: 16px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: #333;
}

/* ===== NAVBAR ===== */
.navbar {
    background: var(--dark2);
    padding: 0 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 65px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.3);
}

.logo { color: #fff; font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.logo span { color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: 5px; }

.nav-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.lang-switch { display: flex; gap: 5px; margin-left: 10px; }

.lang-switch a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s;
}

.lang-switch a:hover, .lang-switch a.active-lang {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.menu-toggle {
    display: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

/* ===== HERO ===== */
.hero {
    padding: 90px 6% 80px;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,77,77,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,77,77,0.2);
    color: var(--primary);
    border: 1px solid rgba(255,77,77,0.4);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 { font-size: 42px; font-weight: 700; line-height: 1.2; margin-bottom: 15px; }

.hero p {
    max-width: 580px;
    line-height: 1.7;
    color: rgba(255,255,255,0.75);
    font-size: 16px;
    margin-bottom: 30px;
}

.hero-btns { display: flex; gap: 15px; flex-wrap: wrap; }

.btn {
    display: inline-block;
    padding: 14px 28px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,77,77,0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
    box-shadow: none;
}

/* ===== FEATURES ===== */
.features {
    padding: 50px 6%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.feature-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: transform 0.2s;
}

.feature-card:hover { transform: translateY(-4px); }
.feature-icon { font-size: 36px; margin-bottom: 12px; }
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: #666; line-height: 1.5; }

/* ===== SECTION HEADER ===== */
.section-header {
    padding: 10px 6% 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.section-title { font-size: 26px; font-weight: 700; }
.section-title span { color: var(--primary); }

/* ===== GRID ===== */
.grid {
    padding: 25px 6% 60px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* ===== CARD ===== */
.card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.14);
}

/* ===== SLIDER ===== */
.slider {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: #eee;
}

.slider img.slide {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: none;
}

.slider img.slide.active { display: block; }

.slider-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.slider-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.2s;
}

.slider-dot.active { background: white; }

.slider-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
}

.card-body { padding: 18px; }

.card-body h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: #222; }
.card-desc { font-size: 13px; color: #888; margin-bottom: 12px; line-height: 1.4; }

.price { color: var(--primary); font-weight: 700; font-size: 20px; margin-bottom: 14px; }
.price small { font-size: 13px; font-weight: 500; }

/* ===== WHATSAPP ===== */
.whatsapp {
    background: var(--whatsapp);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
}

.whatsapp svg { width: 15px; height: 15px; }

.whatsapp:hover {
    background: var(--whatsapp-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,211,102,0.4);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark2);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 30px 6%;
    font-size: 13px;
}

.footer strong { color: white; }

/* ===== TITLE (legacy) ===== */
.title { padding: 40px 6% 0; font-size: 26px; font-weight: 700; }

/* ===== ADMIN ===== */
.admin-container { width: 92%; max-width: 1100px; margin: 30px auto; }

.admin-form {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 35px;
}

.admin-form h2 { margin-bottom: 20px; font-size: 20px; color: var(--dark); }

.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 14px;
    border-radius: 10px;
    border: 1.5px solid #e0e0e0;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s;
    outline: none;
}

.admin-form input:focus, .admin-form textarea:focus { border-color: var(--primary); }
.admin-form textarea { height: 90px; resize: vertical; }

.admin-form button, .btn-admin {
    background: var(--dark);
    color: white;
    padding: 13px 25px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s;
}

.admin-form button:hover, .btn-admin:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    text-align: center;
}

.stat-card .stat-icon { font-size: 32px; margin-bottom: 8px; }
.stat-card h4 { font-size: 13px; color: #888; font-weight: 500; margin-bottom: 5px; }
.stat-card .stat-num { font-size: 28px; font-weight: 700; color: var(--dark); }

.table-container {
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow-x: auto;
}

.table-container h2 { margin-bottom: 20px; font-size: 18px; }

table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 2px solid #f0f0f0; }

th {
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 14px 12px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

.badge-views {
    background: #f0f0f0;
    color: #555;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.action-btn {
    padding: 6px 14px;
    border-radius: 7px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-block;
    margin-right: 5px;
}

.btn-edit { background: #f0f0f0; color: #333; }
.btn-edit:hover { background: #e0e0e0; }
.delete, .btn-delete { background: #fff0f0; color: #e00; }
.btn-delete:hover, .delete:hover { background: #ffe0e0; }

/* Login */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
}

.login-box {
    background: white;
    padding: 40px 35px;
    border-radius: 20px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}

.login-box .logo { color: var(--dark); font-size: 24px; margin-bottom: 8px; }
.login-box p { color: #888; font-size: 14px; margin-bottom: 25px; }
.login-error { color: var(--primary); font-size: 13px; margin-bottom: 12px; }

/* ===== RTL ===== */
html[dir="rtl"] body { direction: rtl; text-align: right; }
html[dir="rtl"] .navbar { flex-direction: row-reverse; }
html[dir="rtl"] .nav-links { flex-direction: row-reverse; }
html[dir="rtl"] th { text-align: right; }
html[dir="rtl"] .action-btn { margin-right: 0; margin-left: 5px; }
html[dir="rtl"] .slider-badge { left: auto; right: 12px; }

/* ===== MOBILE ===== */
@media(max-width: 768px) {
    .menu-toggle { display: block; }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 65px; right: 0;
        background: var(--dark2);
        width: 220px;
        padding: 15px;
        border-radius: 0 0 0 16px;
        box-shadow: -5px 10px 30px rgba(0,0,0,0.3);
    }

    .lang-switch {
        position: absolute;
        top: 65px; left: 0;
        margin: 15px;
        display: none;
    }

    .nav-links.active { display: flex; }
    .lang-switch.active { display: flex; }

    .hero { text-align: center; padding: 60px 6% 50px; }
    .hero h1 { font-size: 28px; }
    .hero-btns { justify-content: center; }
    .hero::before { display: none; }

    .grid { grid-template-columns: 1fr; padding: 20px 5% 40px; }
    .features { grid-template-columns: 1fr 1fr; padding: 30px 5%; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
