﻿/* ==========================================================================
   1. GLOBAL STYLES & FONTS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: playpen, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@font-face {
    font-family: noto-sans-arabic;
    src: url(/fonts/noto-sans-arabic.ttf);
}
@font-face{
    font-family: playpen;
    src: url(/fonts/playpen-hebrew.ttf)
}

body {
    background-color: #f4f7f6; /* Softer grey-blue background */
    direction: rtl;
}

.mainTitle {
    font-size: 36px;
    font-weight: 800;
    text-align: center;
    width: 100%;
    margin: 40px 0 20px 0;
    color: #2c3e50;
    text-shadow: 1px 1px 0px white;
}

/* ==========================================================================
   2. GRADE SELECTION (Main Page Cards - UPDATED)
   ========================================================================== */
/* The Grid Wrapper */
.container {
    display: grid;
    /* This creates a responsive grid: fit as many 250px cards as possible */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 50px auto;
    padding: 20px;
}

/* The Link Wrapper */
.cardLink {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* The Individual Card */
.contained {
    background-color: white;
    border-radius: 20px;
    height: 300px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    overflow: hidden; /* Ensures image doesn't poke out of rounded corners */
    display: flex;
    flex-direction: column;
    border: 1px solid #fff;
}

    .contained:hover {
        transform: translateY(-8px); /* Lifts up on hover */
        box-shadow: 0 15px 30px rgba(52, 152, 219, 0.2);
        border-color: #a9d7de;
    }

/* Special style for "All Words" card to make it stand out */
.specialCard {
    background: linear-gradient(135deg, #ffffff 0%, #f0faff 100%);
    border: 2px solid #a9d7de;
}

/* Card Title */
.cardHeader {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    padding: 20px 0;
    background-color: #fff;
    border-bottom: 1px solid #f1f1f1;
    z-index: 2;
}

.contained:hover .cardHeader {
    color: #3498db;
}

/* Image Area */
.imgWrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
    padding: 20px;
}

.contained img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.contained:hover img {
    transform: scale(1.1);
}

/* ==========================================================================
   3. WORD LIST VIEW (Vocabulary Browser)
   ========================================================================== */
.wordsContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 30px auto;
    width: 90%;
    max-width: 1000px;
    padding: 20px;
}

.containerWords {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    width: 100%;
}

.wordPair {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
    text-align: center;
}

    .wordPair:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 18px rgba(0,0,0,0.1);
    }

.arabic {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #1e3a8a;
    font-family: noto-sans-arabic;
    margin-bottom: 8px;
}

.hebrew {
    display: block;
    font-size: 18px;
    color: #065f46;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wordPair:hover .hebrew {
    opacity: 1;
}

.searchBox {
    width: 300px;
    padding: 12px 20px;
    font-size: 18px;
    margin-bottom: 25px;
    border-radius: 50px;
    border: 1px solid #ccc;
    direction: rtl;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.subBtn {
    border-radius: 50px;
    background-color: aliceblue;
    font-size: 18px;
    padding: 0 20px;
    height: 50px;
    border: 1px solid #ccc;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0 15px;
    width: 100px;
}

    .subBtn:hover {
        background-color: #d4e0ff;
        transform: scale(1.05);
    }

/* ==========================================================================
   4. QUIZ INTERFACE (The Card Style)
   ========================================================================== */
.questionCont {
    width: 700px;
    min-height: 480px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    background-color: white;
    margin: 10px auto;
    padding: 35px;
    text-align: center;
    position: relative;
    user-select: none;
}

.questionNum {
    display: block;
    font-size: 16px;
    color: #7f8c8d;
    font-weight: bold;
    margin-bottom: 15px;
}

.pairContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin: 40px 0;
}

.mainWord {
    font-size: 42px;
    font-weight: bold;
    font-family: noto-sans-arabic;
    color: #3498db;
}

.hebrewWord {
    width: 220px;
    height: 45px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    font-size: 22px;
    text-align: center;
    background-color: #f8f9fa;
    color: #2c3e50;
}

.btnContainer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 50px;
}

.quizBtn {
    height: 55px;
    border-radius: 12px;
    border: 2px solid #a9d7de;
    background-color: #ffffff;
    color: #2c3e50;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .quizBtn:hover {
        background-color: #a9d7de;
        transform: translateY(-2px);
    }

.selectedBtn {
    height: 55px;
    border-radius: 12px;
    background-color: #cfdde0;
    border: 3px solid #7cc4cb;
    font-size: 18px;
    font-weight: bold;
}

.contBtn {
    width: 180px;
    height: 50px;
    border-radius: 25px;
    border: none;
    background-color: #2db7cc;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s ease;
}

    .contBtn:hover:not(:disabled) {
        background-color: #1aa4b3;
    }

    .contBtn:disabled {
        background-color: #e2e6e8;
        color: #999;
        cursor: not-allowed;
    }

/* ==========================================================================
   5. RESULTS & FEEDBACK
   ========================================================================== */
.correct {
    background-color: #d4edda !important;
    border: 2px solid #28a745 !important;
    color: #155724 !important;
}

.incorrect, .wrong {
    background-color: #f8d7da !important;
    border: 2px solid #dc3545 !important;
    color: #721c24 !important;
}

.correctAndWrong {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    border-top: 3px solid #dee2e6;
    border-bottom: 3px solid #dee2e6;
    height: 150px;
    margin-top: 30px;
}

    .correctAndWrong div {
        font-size: 30px;
        font-weight: bold;
        padding: 10px;
    }

.linkBtn {
    display: inline-block;
    text-decoration: none;
    color: black;
    background-color: #f5f7ff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .linkBtn:hover {
        background-color: #d4e0ff;
        transform: scale(1.05);
    }
/* --- New Layout Elements --- */

.subTitle {
    text-align: center;
    color: #7f8c8d;
    font-size: 18px;
    margin-bottom: 40px;
}

.sectionHeader {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto 20px auto;
    font-size: 26px;
    color: #2c3e50;
    border-bottom: 2px solid #e1e8ed;
    padding-bottom: 10px;
    direction: rtl;
}

/* --- Special Card Styles --- */

/* Style for the Future Binyan Card (Purple Theme?) */
.binyanCard {
    border-bottom: 4px solid #9b59b6; /* Purple accent */
}

    .binyanCard:hover {
        box-shadow: 0 15px 30px rgba(155, 89, 182, 0.2);
        border-color: #9b59b6;
    }

    .binyanCard .cardHeader {
        color: #8e44ad;
    }

/* Style for "Coming Soon" / Disabled Cards */
.disabledCard {
    background-color: #f8f9fa;
    cursor: default;
    border: 1px dashed #ccc;
    box-shadow: none;
}

    .disabledCard:hover {
        transform: none; /* Don't move up on hover */
        box-shadow: none;
    }

    .disabledCard .cardHeader {
        color: #aaa;
        background-color: transparent;
        border: none;
    }
/* ==========================================================================
   6. BINYANIM PAGE STYLES (Quiz-Themed)
   ========================================================================== */

.binyan {
    background: #fff;
    border-radius: 20px; /* Matching your quiz cards */
    padding: 25px;
    margin: 0 auto 35px auto;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05); /* Matching quiz card shadow */
    border: 1px solid #f1f1f1;
}

    .binyan h2 {
        color: #3498db; /* Quiz Blue */
        font-family: playpen, noto-sans-arabic;
        border-bottom: 3px solid #a9d7de; /* Lighter Quiz Blue */
        padding-bottom: 8px;
        font-size: 28px;
    }

    .binyan .heb {
        font-size: 18px;
        color: #7f8c8d;
        margin: 10px 0;
    }

.binyan-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    border-radius: 12px;
    overflow: hidden; /* Rounds the table corners */
    border: 1px solid #a9d7de;
}

    .binyan-table th {
        background-color: #a9d7de; /* Quiz Button Color */
        color: #2c3e50; /* Darker text for readability */
        padding: 12px;
        font-size: 16px;
        border: 1px solid #94c8cf;
    }

    .binyan-table td {
        border: 1px solid #e1e8ed;
        padding: 15px;
        text-align: center;
        font-size: 22px;
        font-family: noto-sans-arabic !important;
        color: #1e3a8a;
    }

    .binyan-table tr:nth-child(even) {
        background-color: #f0faff; /* Very light blue striping */
    }

/* Action area for the button */
.action-area {
    text-align: center;
    margin: 20px 0 40px 0;
}
/* עיצוב הדיאלוג המודרני */
.custom-dialog {
    border: none;
    border-radius: 20px;
    padding: 0;
    width: 95%;
    max-width: 500px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    outline: none;
    animation: fadeIn 0.3s ease-out;
}

    .custom-dialog::backdrop {
        background: rgba(44, 62, 80, 0.7);
        backdrop-filter: blur(5px);
    }

.dialog-card {
    background: white;
    overflow: hidden;
}

.dialog-header {
    background: #3498db;
    color: white;
    padding: 20px;
    text-align: center;
}

    .dialog-header i {
        font-size: 30px;
        margin-bottom: 10px;
        display: block;
    }

    .dialog-header h3 {
        margin: 0;
        font-size: 24px;
    }

.dialog-body {
    padding: 25px;
}

/* גריד של כפתורים - 2 בעמודה */
.grid-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.selection-btn {
    text-decoration: none;
    background: #f8f9fa;
    color: #2c3e50;
    padding: 15px;
    text-align: center;
    border-radius: 12px;
    font-weight: bold;
    border: 2px solid #eef2f3;
    transition: all 0.2s ease;
}

    .selection-btn:hover {
        background: #a9d7de;
        border-color: #3498db;
        transform: translateY(-2px);
    }

.special-btn {
    grid-column: span 2; /* תופס את כל הרוחב */
    background: #eef2f3;
    color: #3498db;
}

.dialog-close-btn {
    width: 100%;
    padding: 15px;
    border: none;
    background: transparent;
    color: #95a5a6;
    font-weight: bold;
    cursor: pointer;
    border-top: 1px solid #eee;
}

    .dialog-close-btn:hover {
        color: #e74c3c;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}