:root {
    /* פלטת צבעים רגועה וממוקדת שמתאימה לתוכנית */
    --primary-color: #2c3e50; /* כחול-אפור עמוק לכותרות */
    --secondary-color: #4a90e2; /* כחול רך לכפתורים והדגשות */
    --text-color: #333333;
    --card-bg: #ffffff; /* צבע אחיד לבן ונקי לאריחים */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
    background: none; 
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* החלפנו לצל שחור חצי-שקוף כדי להעמיק את הצבעים במקום להבהיר אותם */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('collage-bg.png');
    background-size: 50%; 
    background-repeat: repeat;
    background-position: center top;
    filter: blur(3px); /* הורדתי טיפ-טיפה את הטשטוש כדי שהצבעים יהיו ברורים יותר */
    z-index: -1; 
}

header {
    text-align: center;
    padding: 3rem 1rem;
    background-color: var(--primary-color);
    color: white;
}

header h1 {
    margin: 0 0 10px 0;
}

/* עיצוב רשת האריחים - עמוד ראשי */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.bot-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.bot-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.15);
}

.card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding-top: 0; /* מבטל ריפוד פנימי בחלק העליון של אזור הטקסט */
}

.card-content h2 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

/* עיצוב העמוד הפנימי של הבוט */
.bot-page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
}

.bot-details {
    display: flex;
    gap: 3rem;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.bot-illustration {
    flex: 1;
}

.bot-illustration img {
    width: 100%;
    border-radius: 8px;
}

.bot-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 0; /* הוסף את השורה הזו כדי לבטל את הריפוד העליון גם כאן */
}

.bot-info h1 {
    color: var(--primary-color);
    margin-top: 0;
}

/* 1. מקטינים את הרווח הראשי בין האזורים */
.info-section {
    margin-bottom: 0.5rem; /* במקור היה פה 1.5rem, שזה רווח גדול מאוד. הקטנתי ל-0.5 */
}

/* 2. מבטלים את הרווח שהדפדפן דוחף אוטומטית *מעל* הכותרת הקטנה */
.info-section h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    margin-top: 0; /* חובה להוסיף את זה! */
}

/* 3. מבטלים את הרווח שהדפדפן דוחף אוטומטית *מתחת* לפסקאות הטקסט */
.info-section p {
    margin-top: 0;
    margin-bottom: 0; /* מונע מהפסקה הקודמת לדחוף את הכותרת הבאה */
}

.gem-btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem 2rem;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: auto;
    transition: background-color 0.2s;
}

.gem-btn:hover {
    background-color: #2980b9;
}

/* התאמה למסכים קטנים */
@media (max-width: 768px) {
    .bot-details {
        flex-direction: column;
    }
}


/* הרקע שמחשיך את האתר מסביב לחלון */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7); /* רקע שחור חצי-שקוף */
    backdrop-filter: blur(4px); /* טשטוש קל של האתר מאחורה (אופציונלי, נראה מעולה) */
    z-index: 99999; /* מספר גבוה מבטיח שזה יסתיר הכל */
    
    /* מוסתר כברירת מחדל */
    display: none; 
    justify-content: center;
    align-items: center;
}

/* כשהחלון פעיל (הקלאס הזה מתווסף ע"י ה-JavaScript) */
.modal-overlay.show {
    display: flex;
}

/* העיצוב של החלון עצמו - בדיוק כמו ה- bot-card שלך! */
.modal-content {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 12px; /* תואם לכרטיסיות שלך */
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    
    /* אנימציית קפיצה חלקה */
    animation: popUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-content h2 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 2rem;
}

.modal-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* אנימציה */
@keyframes popUp {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}