/* ===================== success_stories.css ===================== */

/* ===================== المتغيرات العامة ===================== */
:root {
    --primary-color: #2980b9; 
    --accent-color: #f39c12; 
    --background-light: #f4f6f9;
    --text-color: #34495e;
    --success-color: #2ecc71;
}

/* ===================== الجسم والحاوية العامة ===================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* يمنع التمرير الأفقي */
    font-family: 'Tajawal', sans-serif;
    background-color: var(--background-light);
    color: var(--text-color);
    line-height: 1.7;
    text-align: right;
    box-sizing: border-box;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

/* ===================== تأثير الظهور عند التمرير ===================== */
.animated-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
    width: 100%; 
}
.animated-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================== قسم العنوان المؤثر ===================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #2c3e50);
    color: #fff;
    padding: 60px 20px; 
    margin-bottom: 40px;
    border-radius: 0 0 15px 15px;
    text-align: center;
}
.hero-section h1 {
    font-size: 3.5rem; 
    margin-bottom: 10px;
    font-weight: 800;
}
.hero-section p {
    font-size: 1.5rem; 
    opacity: 0.9;
}

/* ===================== شريط قصص إنستغرام ===================== */
.insta-stories-slider {
    max-width: 1100px; 
    margin: 20px auto;
    display: flex;
    overflow-x: auto; 
    padding: 10px 10px; 
    gap: 20px; 
    justify-content: flex-start;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    scroll-behavior: smooth; 
    -webkit-overflow-scrolling: touch;
}
.insta-stories-slider::-webkit-scrollbar {
    height: 0; 
}
.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    min-width: 80px; 
    cursor: pointer;
    transition: transform 0.3s;
    flex-shrink: 0;
}
.story-item:hover, .story-item:active {
    transform: scale(1.05); 
    color: var(--primary-color);
}
.story-item img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color); 
    padding: 2px;
    margin-bottom: 5px;
}
.story-item span {
    font-size: 0.9rem; 
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

/* ===================== قسم الإحصائيات ===================== */
.stats-section {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: 40px;
    text-align: center;
}
.stat-box {
    background-color: #fff;
    padding: 20px 30px; 
    border-radius: 10px;
    margin: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
    min-width: 250px; 
    max-width: 30%;
}
.stat-box .number {
    font-size: 2.8rem; 
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 5px;
}
.stat-box .label {
    font-size: 1.1rem; 
    font-weight: 700;
    color: var(--text-color);
}

/* ===================== نداء العمل CTA ===================== */
.cta-inline {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background-color: #ecf0f1;
    border-radius: 8px;
}
.cta-inline p {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* ===================== الإحصائية التفاعلية ===================== */
/* ===================== الإحصائية التفاعلية ===================== */
.interactive-stat {
    /* الخلفية والألوان */
    background: var(--primary-color);
    color: #fff;
    
    /* الحشو الداخلي والتوسيط الافتراضي */
    padding: 40px 20px;
    margin: 50px auto; /* هذا يوسع العنصر في الشاشات الكبيرة */
    max-width: 700px;
    
    /* الشكل العام */
    border-radius: 15px;
    text-align: center;
}
.interactive-stat h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 800;
}
.age-input-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}
.age-input-group input {
    padding: 10px 15px;
    border-radius: 8px;
    border: none;
    font-size: 1.2rem;
    width: 150px;
    text-align: center;
}
.age-input-group button {
    background-color: var(--success-color);
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
}
.age-input-group button:hover {
    background-color: #27ae60;
}
#interactiveResult {
    font-size: 1.4rem;
    font-weight: 700;
    min-height: 40px;
}


/* ===================== حاوية الشرائح الرئيسية Carousel ===================== */
.stories-carousel {
    position: relative;
    max-width: 800px; 
    margin: 0 auto;
    padding: 20px 0; 
    min-height: 450px; 
    background: linear-gradient(to top, rgba(255, 255, 255, 0.5), transparent);
    border-radius: 15px;
}
.story-slide {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0; 
    transition: opacity 0.8s ease-in-out; 
    display: flex; 
    justify-content: center;
    align-items: center; 
    height: 100%;
}
.story-slide.active { opacity: 1; }
.story-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 25px; 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-top: 5px solid var(--success-color);
    width: 100%; 
    max-width: 500px; 
    text-align: center;
}
.story-card img {
    width: 120px; 
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px auto;
    border: 4px solid var(--background-light); 
    display: block;
}
.story-card .name {
    font-size: 1.8rem; 
    font-weight: 800;
    margin: 5px 0;
    color: var(--primary-color);
}
.story-card .field {
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 20px;
}
.story-card .quote {
    font-style: italic;
    color: #555;
    position: relative;
    padding: 15px 0;
    font-size: 1.2rem; 
    line-height: 1.8; 
}
.story-card .quote:before, .story-card .quote:after {
    font-size: 3rem; 
    color: #ddd;
    position: absolute;
    line-height: 0;
}
.story-card .quote:before { content: '❝'; right: 0; top: 5px; }
.story-card .quote:after { content: '❞'; left: 0; bottom: 5px; }

/* ===================== حث على العمل النهائي CTA ===================== */
.cta-section {
    text-align: center;
    padding: 50px 20px; 
    background-color: #fff;
    margin-top: 50px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}
.cta-section h2 {
    font-size: 2.5rem; 
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 800;
}
.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    padding: 15px 40px; 
    font-size: 1.3rem; 
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}
.cta-button:hover {
    background-color: #e67e22;
    transform: scale(1.05) translateY(-3px); 
    box-shadow: 0 8px 20px rgba(243, 156, 18, 0.6);
}

/* ===================== تجاوب كامل Media Queries ===================== */
@media (max-width: 1024px) {
    .hero-section h1 { font-size: 3rem; }
    .hero-section p { font-size: 1.3rem; }
    .stat-box { max-width: 45%; flex: 1 1 45%; margin: 10px 5px; }
}

@media (max-width: 768px) {
    .hero-section h1 { font-size: 2.5rem; }
    .hero-section p { font-size: 1.2rem; }
    .stat-box { max-width: 100%; flex: 1 1 100%; margin: 10px 0; }
    .age-input-group { flex-direction: column; gap: 10px; }
    .age-input-group input, .age-input-group button { width: 100%; }
    .stories-carousel { min-height: 500px; }
    .insta-stories-slider { gap: 10px; padding: 5px; }
    .story-item img { width: 60px; height: 60px; }
    .story-item span { font-size: 0.8rem; }
}

@media (max-width: 480px) {
    .hero-section h1 { font-size: 2rem; }
    .hero-section p { font-size: 1rem; }
    .stat-box .number { font-size: 2rem; }
    .story-card { max-width: 90%; padding: 20px; }
}


.insta-stories-wrapper {
    overflow: hidden;
    width: 100%;
    padding: 10px 0;
    background: #fefefe;
}

.insta-stories-slider {
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    text-align: center;
    font-family: 'Tajawal', sans-serif;
    font-size: 12px;
    color: #333;
}

.story-item img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
}