/* ========================================================= */
/* PUBLIC PAGES - ISOLATED STYLES                            */
/* ========================================================= */

/* إزالة أي ارتفاع قسري للصفحة عند استخدام هذا الملف */
body.page-public .main-content-area {
    min-height: auto !important;
    height: auto !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.page-public {
    background-color: #f8fafc;
    overflow-x: hidden;
}

/* ========================================================= */
/* 1. الهيرو (قصير ومضبوط)                                   */
/* ========================================================= */
.pub-hero {
    position: relative;
    padding: 60px 20px 100px; /* ارتفاع ثابت، ليس نسبة من الشاشة */
    text-align: center;
    overflow: hidden;
    background: #f0f9ff;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
}

/* الكرات الضوئية */
.pub-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}
.pub-orb-1 { width: 400px; height: 400px; background: rgba(14, 165, 233, 0.3); top: -100px; left: -100px; animation: float1 10s infinite alternate ease-in-out; }
.pub-orb-2 { width: 300px; height: 300px; background: rgba(59, 130, 246, 0.3); bottom: -50px; right: -50px; animation: float2 12s infinite alternate ease-in-out; }

@keyframes float1 { 0% { transform: translate(0, 0); } 100% { transform: translate(50px, 50px); } }
@keyframes float2 { 0% { transform: translate(0, 0); } 100% { transform: translate(-50px, -50px); } }

.pub-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.pub-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: #fff;
    color: #0284c7;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.1);
}

.pub-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.pub-title span {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pub-subtitle {
    font-size: 1.15rem;
    color: #475569;
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.pub-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pub-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(14, 165, 233, 0.5);
}

/* ========================================================= */
/* 2. الإحصائيات (بطاقات 3D Tilt)                            */
/* ========================================================= */
.pub-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: -40px auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
    perspective: 800px;
}

.pub-stat-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    transform-style: preserve-3d;
}

.pub-stat-num {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    transform: translateZ(30px);
}

.pub-stat-lbl {
    color: #64748b;
    font-weight: 600;
    transform: translateZ(20px);
}

@media (max-width: 992px) { .pub-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .pub-stats { grid-template-columns: 1fr; } }

/* ========================================================= */
/* 3. بطاقات القلب (Flip Cards)                              */
/* ========================================================= */
.pub-flip-section {
    max-width: 1100px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.pub-flip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    perspective: 1000px;
}

.pub-flip-card {
    height: 250px;
    perspective: 1000px;
}

.pub-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.pub-flip-card:hover .pub-flip-inner {
    transform: rotateY(180deg);
}

.pub-flip-front, .pub-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.pub-flip-front {
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.pub-flip-front i {
    font-size: 2.5rem;
    color: #0ea5e9;
    margin-bottom: 15px;
}

.pub-flip-front h4 {
    color: #0f172a;
    font-size: 1.1rem;
}

.pub-flip-back {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    color: #fff;
    transform: rotateY(180deg);
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.3);
}

.pub-flip-back p {
    font-size: 0.95rem;
    line-height: 1.7;
}

@media (max-width: 992px) { .pub-flip-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .pub-flip-grid { grid-template-columns: 1fr; } }

/* ========================================================= */
/* 4. تأثير الظهور                                           */
/* ========================================================= */
.pub-reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.pub-reveal.is-visible { opacity: 1; transform: translateY(0); }
/* ========================================================= */
/* EXTRA SECTIONS FOR ABOUT PAGE                             */
/* ========================================================= */

/* تصغير الهيرو أكثر */
.pub-hero {
    padding: 40px 20px 60px !important; /* مسافة أقل */
}
.pub-title {
    font-size: clamp(2rem, 4vw, 3rem) !important; /* خط أصغر */
    margin-bottom: 15px !important;
}
.pub-subtitle {
    font-size: 1rem !important;
    margin-bottom: 25px !important;
}

/* الأقسام العامة */
.pub-section {
    max-width: 1100px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.pub-section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
}

/* قسم القصة */
.pub-story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.pub-story-text h2 {
    font-size: 2rem;
    color: #0f172a;
    margin-bottom: 20px;
}
.pub-story-text p {
    color: #475569;
    line-height: 1.9;
    margin-bottom: 15px;
}
.pub-story-visual {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    padding: 40px;
    border-radius: 24px;
    color: #fff;
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.3);
    transition: transform 0.4s ease;
}
.pub-story-visual h3 { color: #fff; font-size: 1.6rem; margin-bottom: 15px; }
.pub-story-visual p { color: rgba(255,255,255,0.9); line-height: 1.8; }

@media (max-width: 900px) { .pub-story-grid { grid-template-columns: 1fr; } }

/* المهمة والرؤية */
.pub-mv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.pub-mv-card {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-top: 4px solid #0ea5e9;
    transition: all 0.3s ease;
}
.pub-mv-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(14, 165, 233, 0.15); }
.pub-mv-card i { font-size: 2.5rem; color: #0ea5e9; margin-bottom: 20px; }
.pub-mv-card h3 { font-size: 1.5rem; color: #0f172a; margin-bottom: 12px; }
.pub-mv-card p { color: #475569; line-height: 1.8; }

@media (max-width: 768px) { .pub-mv-grid { grid-template-columns: 1fr; } }

/* صندوق CTA */
.pub-cta {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    padding: 60px 40px;
    border-radius: 30px;
    text-align: center;
    color: #fff;
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.4);
    transition: transform 0.4s ease;
}
.pub-cta h2 { color: #fff; font-size: 2.2rem; margin-bottom: 15px; }
.pub-cta p { color: rgba(255,255,255,0.9); font-size: 1.1rem; margin-bottom: 25px; }

.pub-cta { position: relative; overflow: hidden; }
.pub-cta::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.2), transparent 30%);
    animation: spin 4s linear infinite;
    pointer-events: none;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.pub-cta h2, .pub-cta p, .pub-cta a { position: relative; z-index: 2; }
