﻿
/* ===== ROOT THEME ===== */
:root {
    --bg-dark: #0f172a;
    --bg-light: #f1f5f9;
    --glass: rgba(255,255,255,0.08);
    --border: rgba(255,255,255,0.2);
    --main: #9A0F0F;
    --text: #1f2937;
}

/* الوضع الليلي */
body.dark {
    background: linear-gradient(135deg, #0f172a, #020617);
}

/* الوضع الفاتح */
body.light {
    background: linear-gradient(135deg, #e2e8f0, #ffffff);
}

/* ===== CARD ===== */
.glass-x {
    perspective: 1000px;
}

.glass-x__inner {
    padding: 35px;
    border-radius: 25px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.3s;
    transform-style: preserve-3d;
    box-shadow: 15px 15px 40px rgba(0,0,0,0.2), -10px -10px 30px rgba(255,255,255,0.05);
}

    /* Hover Glow */
    .glass-x__inner::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
        opacity: 0;
        transition: 0.5s;
    }

.glass-x:hover .glass-x__inner::before {
    opacity: 1;
}

/* TITLE */
.glass-x__title {
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 800;
    color: var(--main);
    margin-bottom: 15px;
}

/* TEXT */
.glass-x__text {
    line-height: 1.8;
    color: var(--text);
}

/* ===== SCROLL ANIMATION ===== */
.glass-x {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.6s ease;
}

    .glass-x.show {
        opacity: 1;
        transform: translateY(0);
    }
/* عند hover يتغير لون الكرت */
.about-x .glass-x:hover .glass-x__inner {
    background: rgba(154, 15, 15, 0.15); /* لون شفاف */
    border-color: rgba(154, 15, 15, 0.4);
    box-shadow: 0 10px 30px rgba(154, 15, 15, 0.3), 0 0 20px rgba(154, 15, 15, 0.2);
}

/* تغيير لون العنوان */
.about-x .glass-x:hover .glass-x__title {
    color: rgb(154, 15, 15);
}

/* تغيير لون النص */
.about-x .glass-x:hover .glass-x__text {
    color: rgb(31, 41, 55);
    font-size: 16px;
}
/* ===== GLASS TITLE WITH SIDE BAR ===== */
.glass-x__title {
    position: relative;
    padding-inline-start: 15px; /* مساحة للخط */
}

    /* الخط الجانبي */
    .glass-x__title::before {
        content: "";
        position: absolute;
        inset-inline-start: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 5px;
        height: 45px;
        background: var(--main);
        border-radius: 5px;
        transition: 0.3s ease;
    }

/* Hover effect */
.glass-x:hover .glass-x__title::before {
    height: 60px;
    box-shadow: 0 0 10px rgba(154,15,15,0.5);
}

.about-x .glass-x__inner {
    height: 500px; /* 👈 اختر الارتفاع المناسب */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
/* ===== RESPONSIVE FOR MOBILE ===== */

/* الأجهزة الصغيرة (الهواتف) */
@media (max-width: 768px) {

    /* تقليل padding الكارت */
    .glass-x__inner {
        padding: 20px;
        border-radius: 18px;
        height: auto !important; /* إلغاء الارتفاع الثابت */
        min-height: 280px; /* حد أدنى */
    }

    /* تصغير العنوان */
    .glass-x__title {
        font-size: 20px;
        padding-inline-start: 12px;
        margin-bottom: 12px;
    }

        /* تصغير الخط الجانبي */
        .glass-x__title::before {
            width: 4px;
            height: 35px;
        }

    .glass-x:hover .glass-x__title::before {
        height: 40px;
    }

    /* تصغير النص */
    .glass-x__text {
        font-size: 14px;
        line-height: 1.6;
    }

    .about-x .glass-x:hover .glass-x__text {
        font-size: 14px; /* منع التكبير في الهاتف */
    }

    /* تقليل الظلال */
    .glass-x__inner {
        box-shadow: 8px 8px 20px rgba(0,0,0,0.15), -5px -5px 15px rgba(255,255,255,0.03);
    }

    /* إزالة تأثير الـ 3D في الهاتف */
    .glass-x {
        perspective: none;
    }

    /* تقليل المسافة بين الكروت */
    .about-x {
        gap: 20px; /* إذا كنت تستخدم Grid أو Flex */
    }
}

/* الأجهزة الصغيرة جدًا (أقل من 480px) */
@media (max-width: 480px) {

    .glass-x__inner {
        padding: 15px;
        min-height: 250px;
    }

    .glass-x__title {
        font-size: 18px;
    }

    .glass-x__text {
        font-size: 13px;
    }

    /* إلغاء الـ hover effects في الهواتف الصغيرة */
    .about-x .glass-x:hover .glass-x__inner {
        background: var(--glass);
        border-color: var(--border);
        box-shadow: 8px 8px 20px rgba(0,0,0,0.15);
    }
}

/* الأجهزة المتوسطة (Tablets) */
@media (min-width: 769px) and (max-width: 1024px) {

    .glass-x__inner {
        padding: 28px;
        height: 320px;
    }

    .glass-x__title {
        font-size: 24px;
    }

    .glass-x__text {
        font-size: 15px;
    }
}


