/*
Theme Name: Kenz Lejdoud
Theme URI: https://kenzlejdoud.ma
Author: Kenz Lejdoud Dev Team
Author URI: https://kenzlejdoud.ma
Description: قالب ووردبريس مخصص لمتحف التراث المغربي "كنز الجدود". يجمع بين أصالة المعمار المغربي (الرياض، الزليج) وبساطة التصميم الحديث (Neo-Heritage).
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kenz-lejdoud
Tags: morocco, heritage, rtl, cultural, museum, custom-theme
*/

/* =========================================
   1. Imports & Fonts
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Aref+Ruqaa:wght@400;700&family=Tajawal:wght@300;400;500;700&display=swap');

/* =========================================
   2. CSS Variables (The Palette)
   ========================================= */
:root {
    /* Primary Colors */
    --color-majorelle: #0055A4;       /* أزرق ماجوريل */
    --color-royal-green: #00695C;     /* أخضر ملكي */
    --color-clay-red: #C62828;        /* أحمر طيني */
    
    /* Metallic/Precious */
    --color-copper: #B87333;          /* نحاسي */
    --color-gold: #D4AF37;            /* ذهبي */
    
    /* Base */
    --color-off-white: #F9F7F2;       /* أبيض جصي/ورقي */
    --color-text-dark: #2D2D2D;       /* أسود فاحم */
    --color-text-light: #757575;      /* رمادي حجري */

    /* Typography */
    --font-heading: 'Aref Ruqaa', serif;
    --font-body: 'Tajawal', sans-serif;
    --font-traditional: 'Amiri', serif;
}

/* =========================================
   3. Base Styles & Typography
   ========================================= */
body {
    background-color: var(--color-off-white);
    color: var(--color-text-dark);
    font-family: var(--font-body);
    line-height: 1.6;
    direction: rtl;
    /* Subtle Zellige Texture Overlay */
    background-image: url('https://www.transparenttextures.com/patterns/arabesque.png');
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-royal-green);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-majorelle);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* =========================================
   4. Proverb Card & 3D Flip Styles
   ========================================= */

/* The Container */
.perspective-1000 {
    perspective: 1000px;
}

/* The 3D Space wrapper */
.transform-style-3d {
    transform-style: preserve-3d;
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Snappy easing */
}

/* The Flip Action */
.rotate-y-180 {
    transform: rotateY(180deg);
}

/* Face Visibility */
.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Specific styling for the Back Face to ensure it layers correctly */
.bg-royalGreen.rotate-y-180 {
    transform: rotateY(180deg);
}

/* Decorative Pattern for Cards */
.card-pattern {
    background-image: radial-gradient(var(--color-gold) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
}

/* =========================================
   5. Custom Scrollbar (Desktop)
   ========================================= */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-off-white);
}

::-webkit-scrollbar-thumb {
    background-color: var(--color-copper);
    border-radius: 6px;
    border: 3px solid var(--color-off-white);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-royal-green);
}

/* =========================================
   6. Utilities
   ========================================= */
.text-gold { color: var(--color-gold); }
.text-copper { color: var(--color-copper); }
.bg-majorelle { background-color: var(--color-majorelle); }

/* Animation for rare items */
@keyframes shine {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.rare-badge {
    background: linear-gradient(to right, var(--color-copper) 20%, var(--color-gold) 40%, var(--color-copper) 60%, var(--color-gold) 80%);
    background-size: 200% auto;
    color: #fff;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
    font-weight: bold;
}
