/**
 * ملف الستايل الرئيسي - Main CSS
 * تصميم مبهر واحترافي
 */

/* variables.css and Google Fonts are loaded in header-luxury.php */

/* ========== إعدادات عامة ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family-arabic);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--bg-white);
    overflow-x: hidden;
    position: relative;
}

/* ========== تأثيرات الخلفية المتحركة ========== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
        rgba(212, 170, 64, 0.03) 0%,
        rgba(255, 107, 53, 0.03) 100%);
    pointer-events: none;
    z-index: -1;
}

/* ========== شكل موجي متحرك في الخلفية ========== */
.wave-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%232ECC71' fill-opacity='0.1' d='M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,213.3C1248,235,1344,213,1392,202.7L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    animation: wave 20s linear infinite;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========== اتجاه RTL/LTR ========== */
[dir="rtl"] {
    font-family: var(--font-family-arabic);
    text-align: right;
}

[dir="ltr"] {
    font-family: var(--font-family-english);
    text-align: left;
}

/* ========== الحاوية ========== */
.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

@media (min-width: 576px) {
    .container { max-width: var(--container-sm); }
}
@media (min-width: 768px) {
    .container { max-width: var(--container-md); }
}
@media (min-width: 992px) {
    .container { max-width: var(--container-lg); }
}
@media (min-width: 1200px) {
    .container { max-width: var(--container-xl); }
}
@media (min-width: 1400px) {
    .container { max-width: var(--container-xxl); }
}

/* ========== العناوين ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    position: relative;
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

/* ========== عنوان مميز مع خط متحرك ========== */
.section-title {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
    position: relative;
    animation: fadeInUp 1s ease;
}

.section-title h2 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-black);
    background: linear-gradient(135deg, #D4AA40, #BF9835, #A58230);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    margin-bottom: var(--spacing-lg);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    border-radius: 20px;
    box-shadow: 0 1px 6px rgba(212, 170, 64, 0.3);
}

/* Section title on h2 directly - line matches text width */
h2.section-title {
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    padding-bottom: 12px;
}

h2.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    border-radius: 20px;
    box-shadow: 0 1px 6px rgba(212, 170, 64, 0.3);
    transform: none;
}

/* Mobile: centered proportional line when text wraps */
@media (max-width: 768px) {
    h2.section-title {
        width: auto;
        text-align: center;
    }
    h2.section-title::after {
        width: 50%;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    h2.section-title::after {
        width: 40%;
    }
}

/* ========== الأزرار المبهرة ========== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

/* زر أساسي */
.btn-primary {
    background: linear-gradient(135deg, #D4AA40, #BF9835, #A58230);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(212, 170, 64, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(212, 170, 64, 0.4);
}

/* زر ثانوي */
.btn-secondary {
    background: var(--white);
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.btn-secondary:hover {
    background: var(--primary-green);
    color: var(--white);
    transform: translateY(-3px);
}

/* ========== البطاقات المبهرة ========== */
.card {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-base);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, #D4AA40, #BF9835, #A58230);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.card:hover::before {
    transform: scaleX(1);
}

/* ========== تأثيرات الحركة ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== تأثير Parallax ========== */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.parallax::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

/* ========== Loader مبهر ========== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-circle {
    width: 60px;
    height: 60px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-green);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* ========== Scroll To Top ========== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #D4AA40, #BF9835, #A58230);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ========== تأثيرات النص ========== */
.gradient-text {
    color: #D4AA40 !important;
    text-shadow: none !important;
}

.glow-text {
    text-shadow: none;
}

/* ========== خط فاصل مبهر ========== */
.divider {
    position: relative;
    height: 2px;
    background: linear-gradient(90deg, transparent, #D4AA40, #BF9835, #A58230, transparent);
    margin: var(--spacing-3xl) 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--white);
    border: 3px solid var(--primary-green);
    border-radius: 50%;
}

/* ========== تأثير Hover للصور ========== */
.image-hover {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
}

.image-hover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.image-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(212, 170, 64, 0.8),
        rgba(255, 107, 53, 0.8));
    opacity: 0;
    transition: opacity 0.3s;
}

.image-hover:hover::after {
    opacity: 0.7;
}

/* ========== شريط التقدم المتحرك ========== */
.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--gray-200);
    border-radius: var(--border-radius-pill);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #D4AA40, #BF9835, #A58230);
    border-radius: var(--border-radius-pill);
    position: relative;
    animation: fillProgress 2s ease-out;
}

@keyframes fillProgress {
    from { width: 0; }
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}