/* ===============================================
   פעילויות קידום בריאות התלמיד - עיצוב מודרני
   =============================================== */

/* ===== הגדרות בסיסיות ===== */
* {
    font-family: 'Heebo', Arial, sans-serif;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    max-width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    background: #ffffff;
    min-height: 100vh;
}

/* ===== כפתור הדפסה צף ===== */
.print-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff8fab 0%, #ff6b9d 100%);
    color: white;
    border: none;
    border-radius: 50px;
    width: 11%;

    padding: 15px 25px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 143, 171, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(100px);
}

.print-button.visible {
    opacity: 1;
    transform: translateY(0);
}

.print-button:hover {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff5085 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.5);
    transform: translateY(-2px);
}

.print-button:active {
    transform: translateY(0);
}

/* ===== Container לתוכן ===== */
.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ===== דף שער ===== */
.cover-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 40px 20px;
    margin: 0;
    width: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff5f8 100%);
}

.cover-page img {
    width: 100%;
    max-width: 900px;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* אינדיקטור גלילה */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #666;
    font-weight: 500;
    animation: bounce 2s infinite;
}

.arrow-down {
    font-size: 1.5em;
    margin-top: 5px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===== כותרת ===== */
.header {
    text-align: center;
    margin-bottom: 40px;
    background: #ffffff;
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom: 3px solid #ff8fab;
}

.header h1 {
    color: #333333;
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 10px;
}

.header .subtitle {
    color: #666666;
    font-size: 1.1em;
    font-weight: 400;
    margin-top: 8px;
}

/* ===== תוכן עניינים ===== */
.table-of-contents {
    background: #ffffff;
    padding: 60px 0;
    margin: 40px 0;
}

.table-of-contents h2 {
    text-align: center;
    color: #333333;
    font-size: 2em;
    margin-bottom: 15px;
}

.toc-intro {
    text-align: center;
    color: #666666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.toc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 30px;
}

.toc-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fafafa;
    border-radius: 8px;
    border-right: 3px solid #e0e0e0;
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 12px;
    cursor: pointer;
}

.toc-item:hover {
    background: #fff5f8;
    border-right-color: #ff8fab;
    transform: translateX(-3px);
}

.toc-number {
    background: #ff8fab;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9em;
    flex-shrink: 0;
}

.toc-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.toc-title {
    flex: 1;
    color: #333333;
    font-weight: 500;
    font-size: 0.95em;
}

.toc-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
    color: white;
    flex-shrink: 0;
}

/* תגיות תוכן עניינים */
.physical-badge {
    background: #999999;
}

.emotional-badge {
    background: #ff8fab;
}

.nutrition-badge {
    background: #95e1d3;
}

.promotion-badge {
    background: #ffa07a;
}

.sleep-badge {
    background: #c7b3e5;
}

.violence-badge {
    background: #ff8fab;
}

.safety-badge {
    background: #f7b731;
}

.hygiene-badge {
    background: #81d4fa;
}

.cognitive-badge {
    background: #ffa8c5;
}

/* כפתור חזרה לראש */
.back-to-top {
    text-align: center;
    margin-top: 20px;
}

.back-to-top button {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    padding: 12px 30px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    color: #666666;
    transition: all 0.2s ease;
}

.back-to-top button:hover {
    background: #fff5f8;
    border-color: #ff8fab;
    color: #ff8fab;
}

/* ===== רשת פעילויות ===== */
.activities-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 40px 0 60px 0;
}

/* ===== כרטיס פעילות ===== */
.activity-card {
    background: #fafafa;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-right: 4px solid #ff8fab;
    scroll-margin-top: 20px;
}

/* גבולות צבעוניים לפי סוג פעילות */
.activity-card.physical {
    border-right-color: #4ecdc4;
}

.activity-card.emotional {
    border-right-color: #ff6b9d;
}

.activity-card.nutrition {
    border-right-color: #95e1d3;
}

.activity-card.promotion {
    border-right-color: #ffa07a;
}

.activity-card.sleep {
    border-right-color: #c7b3e5;
}

.activity-card.violence-prevention {
    border-right-color: #ff8fab;
}

.activity-card.safety {
    border-right-color: #f7b731;
}

.activity-card.hygiene {
    border-right-color: #81d4fa;
}

.activity-card.cognitive {
    border-right-color: #ffa8c5;
}

/* ===== כותרת פעילות ===== */
.activity-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.activity-icon {
    font-size: 2em;
    margin-left: 12px;
}

.activity-title {
    flex: 1;
}

.activity-title h3 {
    color: #333333;
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.activity-number {
    background: #ff8fab;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 10px;
}

/* ===== תגיות בריאות ===== */
.health-domains {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.health-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    color: white;
    background: #ff8fab;
}

.health-badge.physical {
    background: #999999;
}

.health-badge.emotional {
    background: #ff8fab;
}

.health-badge.nutrition {
    background: #95e1d3;
}

.health-badge.promotion {
    background: #ffa07a;
}

.health-badge.sleep {
    background: #c7b3e5;
}

.health-badge.violence-prevention {
    background: #ff8fab;
}

.health-badge.safety {
    background: #f7b731;
}

.health-badge.hygiene {
    background: #81d4fa;
}

.health-badge.cognitive {
    background: #ffa8c5;
}

.health-badge.social {
    background: #a8dadc;
}

/* ===== סעיפי פעילות ===== */
.activity-section {
    margin-bottom: 15px;
}

.activity-section h4 {
    color: #424242;
    font-size: 0.95em;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.activity-section .icon {
    margin-left: 8px;
    font-size: 1.1em;
}

/* ===== רשימת מטרות ===== */
.goals-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.goals-list li {
    background: #ffffff;
    padding: 6px 10px;
    margin: 3px 0;
    color:#000;
    border-radius: 4px;
    border-right: 2px solid #e0e0e0;
    font-size: 0.9em;
    list-style-type: none;
}

/* ===== עיתוי ומשך ===== */
.timing-duration {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.timing,
.duration {
    flex: 1;
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 6px;
    border-right: 2px solid #e0e0e0;
}

.timing h4,
.duration h4 {
    margin: 0 0 4px 0;
    color: #666666;
    font-size: 0.9em;
}

.timing p,
.duration p {
    margin: 0;
    color: #333333;
    font-weight: 400;
    font-size: 0.9em;
}

/* ===== תיאור ===== */
.description {
    background: #ffffff;
    padding: 12px;
    border-radius: 6px;
    border-right: 2px solid #e0e0e0;
    margin-bottom: 12px;
    line-height: 1.5;
    color: #333333;
    font-size: 0.9em;
}

/* ===== ציוד ===== */
.equipment {
    background: #f5f5f5;
    padding: 10px 12px;
    border-radius: 6px;
    border-right: 2px solid #e0e0e0;
    margin-bottom: 12px;
}

.equipment h4 {
    color: #666666;
    margin: 0 0 4px 0;
    font-size: 0.9em;
}

.equipment p {
    margin: 0;
    color: #333333;
    font-weight: 400;
    font-size: 0.9em;
}

/* ===== מידע מטא ===== */
.meta-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.meta-item {
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 6px;
    border-right: 2px solid #e0e0e0;
}

.meta-item h4 {
    color: #666666;
    margin: 0 0 4px 0;
    font-size: 0.9em;
}

.meta-item p {
    margin: 0;
    color: #333333;
    font-weight: 400;
    font-size: 0.85em;
}

/* ===== הערות למורה ===== */
.teacher-notes {
    background: #fff8f9;
    padding: 12px;
    border-radius: 6px;
    border-right: 2px solid #ff8fab;
    margin-top: 12px;
}

.teacher-notes h4 {
    color: #666666;
    margin: 0 0 6px 0;
    font-size: 0.9em;
}

.teacher-notes p {
    margin: 0;
    color: #333333;
    line-height: 1.4;
    font-size: 0.85em;
}

/* ===== כפתור חזרה לתוכן עניינים ===== */
.back-to-toc {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.back-to-toc button {
    background: #ff8fab;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    color: white;
    transition: all 0.2s ease;
}

.back-to-toc button:hover {
    background: #ff6b9d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 143, 171, 0.3);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.footer p {
    color: #666;
    font-size: 1.1em;
    margin: 0;
}

/* ================================================
   עיצוב רספונסיבי לכל המכשירים
   ================================================ */

/* ===== טאבלטים (768px - 1024px) ===== */
@media screen and (max-width: 1024px) {
    .content-wrapper {
        padding: 0 30px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .table-of-contents h2 {
        font-size: 1.8em;
    }

    .cover-page {
        min-height: 60vh;
    }
}

/* ===== מכשירים ניידים (320px - 767px) ===== */
@media screen and (max-width: 767px) {
    .content-wrapper {
        padding: 0 20px;
    }

    .header {
        padding: 20px 15px;
        margin-bottom: 30px;
    }

    .header h1 {
        font-size: 1.5em;
    }

    .header .subtitle {
        font-size: 1em;
    }

    .table-of-contents {
        padding: 40px 0;
        margin: 30px 0;
    }

    .table-of-contents h2 {
        font-size: 1.6em;
    }

    .toc-intro {
        font-size: 1em;
        padding: 0 10px;
    }

    .toc-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .toc-number {
        width: 26px;
        height: 26px;
        font-size: 0.85em;
    }

    .toc-icon {
        font-size: 1.3em;
    }

    .toc-title {
        font-size: 0.9em;
    }

    .toc-badge {
        font-size: 0.7em;
        padding: 3px 8px;
    }

    .cover-page {
        min-height: 50vh;
        padding: 30px 15px;
    }

    .cover-page img {
        max-width: 100%;
        border-radius: 8px;
    }

    .scroll-indicator {
        font-size: 0.9em;
        bottom: 20px;
    }

    .activities-grid {
        gap: 15px;
        padding: 30px 0 50px 0;
    }

    .activity-card {
        padding: 15px;
        border-right-width: 3px;
    }

    .activity-header {
        margin-bottom: 15px;
    }

    .activity-number {
        width: 28px;
        height: 28px;
        font-size: 0.9em;
        margin-right: 8px;
    }

    .activity-icon {
        font-size: 1.6em;
        margin-left: 8px;
    }

    .activity-title h3 {
        font-size: 1.1em;
    }

    .health-domains {
        gap: 6px;
        margin-bottom: 15px;
    }

    .health-badge {
        font-size: 0.75em;
        padding: 3px 8px;
    }

    .timing-duration {
        flex-direction: column;
        gap: 10px;
    }

    .timing,
    .duration {
        padding: 6px 10px;
    }

    .timing h4,
    .duration h4 {
        font-size: 0.85em;
    }

    .timing p,
    .duration p {
        font-size: 0.85em;
    }

    .description {
        font-size: 0.85em;
        padding: 10px;
    }

    .equipment {
        padding: 8px 10px;
    }

    .equipment h4 {
        font-size: 0.85em;
    }

    .equipment p {
        font-size: 0.85em;
    }

    .meta-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .meta-item {
        padding: 6px 10px;
    }

    .meta-item h4 {
        font-size: 0.85em;
    }

    .meta-item p {
        font-size: 0.8em;
    }

    .teacher-notes {
        padding: 10px;
    }

    .teacher-notes h4 {
        font-size: 0.85em;
    }

    .teacher-notes p {
        font-size: 0.8em;
    }

    .back-to-toc {
        margin-top: 12px;
        padding-top: 12px;
    }

    .back-to-toc button {
        padding: 8px 20px;
        font-size: 0.85em;
    }

    .print-button {
        bottom: 15px;
        right: 15px;
        padding: 12px 20px;
        font-size: 1em;
        width: 30%;
    }

    .print-button span {
        
    }

    .back-to-top button {
        padding: 10px 25px;
        font-size: 0.95em;
    }
}

/* ===== מכשירים קטנים מאוד (320px - 480px) ===== */
@media screen and (max-width: 480px) {
    .content-wrapper {
        padding: 0 15px;
    }

    .header h1 {
        font-size: 1.3em;
    }

    .table-of-contents h2 {
        font-size: 1.4em;
    }

    .toc-item {
        flex-wrap: wrap;
    }

    .toc-badge {
        order: 4;
        margin-right: auto;
    }

    .activity-title h3 {
        font-size: 1em;
    }

    .goals-list li {
        font-size: 0.85em;
        padding: 5px 8px;
    }
}

/* ===== מסכים גדולים (1400px+) ===== */
@media screen and (min-width: 1400px) {
    .activities-grid {
        
        gap: 25px;
    }

    .content-wrapper {
        max-width: 1600px;
        padding: 0 50px;
    }
}

/* ===== לפטופים 13-14 אינץ' (1280px - 1440px) ===== */
@media screen and (min-width: 1280px) and (max-width: 1440px) {
    .content-wrapper {
        max-width: 1200px;
        padding: 0 40px;
    }

    .activity-card {
        padding: 18px;
    }

    .header h1 {
        font-size: 1.9em;
    }
}

/* ================================================
   עיצוב להדפסה
   ================================================ */
@media print {
    @page {
        size: A4;
        margin: 15mm;
    }

    body {
        max-width: 210mm;
        padding: 0;
        margin: 0 auto;
        background: white;
    }

    .content-wrapper {
        max-width: 100%;
        padding: 20mm;
    }

    .cover-page {
        height: 297mm;
        min-height: 297mm;
        page-break-after: always;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cover-page img {
        width: 100%;
        height: auto;
        max-width: 100%;
        max-height: 250mm;
        object-fit: contain;
    }

    .scroll-indicator {
        display: none;
    }

    .table-of-contents {
        page-break-after: always;
        padding: 20mm 0;
    }

    .activities-grid {
        padding: 0;
    }

    .activity-card {
        page-break-inside: avoid;
        margin-bottom: 15px;
    }

    .print-button {
        display: none !important;
    }

    .back-to-top {
        display: none;
    }

    .back-to-toc {
        display: none;
    }

    html {
        scroll-behavior: auto;
    }

    /* אופטימיזציה לצבעי הדפסה */
    .activity-card,
    .toc-item,
    .goals-list li,
    .description,
    .equipment,
    .meta-item,
    .teacher-notes {
        background: white !important;
        box-shadow: none !important;
    }

    .health-badge,
    .toc-badge,
    .activity-number,
    .toc-number {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ================================================
   אנימציות והשבחות נוספות
   ================================================ */

/* אנימציה חלקה לכפתורים */
button {
    transition: all 0.3s ease;
}

button:focus {
    outline: 2px solid #ff8fab;
    outline-offset: 2px;
}

/* שיפור נגישות */
a:focus,
button:focus {
    outline: 2px solid #ff8fab;
    outline-offset: 2px;
}

/* אנימציה לטעינת תמונות */
img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

/* אופטימיזציית ביצועים */
.activity-card,
.toc-item {
    will-change: transform;
}

/* שיפור ביצועים לגלילה */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
