/**
 * Completed Sefer Torah Projects - Frontend Styles
 * סגנון זהוב-קלף אלגנטי
 */

:root {
    --cstp-parchment-bg: #F9F4E8;
    --cstp-gold: #E6BE3A;
    --cstp-gold-dark: #8B6417;
    --cstp-brown: #8B6F47;
    --cstp-brown-dark: #6B5437;
    --cstp-text-dark: #3E2F1C;
    --cstp-border: #D4C4A8;
    --cstp-shadow: rgba(139, 111, 71, 0.15);
}

/* איפוס כללי */
.cstp-container * {
    box-sizing: border-box;
}

/* קונטיינר ראשי */
.cstp-container {
    background-color: var(--cstp-parchment-bg);
    padding: 0px;
    font-family: 'Heebo', 'Arial', sans-serif;
    direction: rtl;
    color: var(--cstp-text-dark);
}

/* כותרת עליונה */
.cstp-page-header {
    text-align: center;
    margin-bottom: 60px;
}

.cstp-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--cstp-brown-dark);
    margin: 0 0 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.cstp-page-subtitle {
    font-size: 1.3rem;
    color: var(--cstp-brown);
    font-weight: 400;
}

/* סקשן כותרות */
.cstp-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cstp-brown-dark);
    text-align: center;
    margin: 50px 0 40px 0;
    position: relative;
    padding-bottom: 15px;
}

.cstp-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to left, var(--cstp-gold), var(--cstp-gold-dark));
}

/* רשת פרויקטים */
.cstp-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* כרטיס פרויקט */
.cstp-project-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F9F4E8 100%);
    border: 2px solid var(--cstp-border);
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--cstp-shadow);
    overflow: hidden;
    position: relative;
}

.cstp-project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(139, 111, 71, 0.25);
    border-color: var(--cstp-gold);
}

/* תווית סטטוס */
.cstp-status-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--cstp-gold);
    color: var(--cstp-text-dark);
    padding: 5px 15px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border-radius: 32px;
}

.cstp-status-badge.active {
    background: #FF6B35;
    color: white;
    border-radius: 32px;
}

/* תמונת הפרויקט */
.cstp-project-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
    border-bottom: 3px solid var(--cstp-gold);
}

.cstp-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cstp-project-card:hover .cstp-project-image img {
    transform: scale(1.05);
}

/* תוכן הכרטיס */
.cstp-project-content {
    padding: 25px;
}

.cstp-project-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--cstp-brown-dark);
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.cstp-deceased-name {
    font-size: 1.1rem;
    color: var(--cstp-brown);
    margin: 0 0 15px 0;
    font-weight: 500;
}

.cstp-quote {
    font-size: 1rem;
    color: var(--cstp-text-dark);
    line-height: 1.6;
    font-style: italic;
    margin: 0 0 20px 0;
    padding: 15px;
    background: rgba(230, 190, 58, 0.1);
    border-right: 3px solid var(--cstp-gold);
}

/* מד גיוס */
.cstp-fundraising-meter {
    margin: 20px 0;
}

.cstp-fundraising-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.cstp-raised-amount {
    font-weight: 700;
    color: var(--cstp-brown-dark);
    font-size: 1.1rem;
}

.cstp-target-amount {
    color: var(--cstp-brown);
}

.cstp-percentage {
    font-weight: 700;
    color: var(--cstp-gold-dark);
    font-size: 1.2rem;
}

.cstp-progress-bar {
    width: 100%;
    height: 12px;
    background-color: #E8E0D0;
    overflow: hidden;
    position: relative;
}

.cstp-progress-fill {
    height: 100%;
    background: linear-gradient(to left, var(--cstp-gold), var(--cstp-gold-dark));
    transition: width 1s ease;
    position: relative;
}

.cstp-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.cstp-donors-count {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--cstp-brown);
    text-align: center;
}

/* כפתור */
.cstp-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--cstp-gold) 0%, var(--cstp-gold-dark) 100%);
    color: var(--cstp-text-dark);
    padding: 14px 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 10px rgba(230, 190, 58, 0.3);
    width: 100%;
    border-radius: 32px;
}

.cstp-button:hover {
    background: linear-gradient(135deg, var(--cstp-gold-dark) 0%, var(--cstp-gold) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(230, 190, 58, 0.4);
    color: var(--cstp-text-dark);
}

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

/* כפתור ראשי גדול */
.cstp-cta-section {
    text-align: center;
    margin: 60px auto;
    padding: 40px 20px;
}

.cstp-cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--cstp-gold) 0%, var(--cstp-gold-dark) 100%);
    color: var(--cstp-text-dark);
    padding: 20px 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(230, 190, 58, 0.4);
}

.cstp-cta-button:hover {
    background: linear-gradient(135deg, var(--cstp-gold-dark) 0%, var(--cstp-gold) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 190, 58, 0.5);
    color: var(--cstp-text-dark);
}

/* עמוד פרטי פרויקט בודד */
.cstp-single-project {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 50px;
    box-shadow: 0 0 30px var(--cstp-shadow);
}

.cstp-single-header {
    text-align: center;
    margin-bottom: 40px;
}

.cstp-single-image {
    width: 400px;
    height: 400px;
    margin: 0 auto 30px;
    overflow: hidden;
    border: 5px solid var(--cstp-gold);
    box-shadow: 0 8px 25px var(--cstp-shadow);
}

.cstp-single-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cstp-single-title {
    font-size: 2.5rem;
    color: var(--cstp-brown-dark);
    margin: 0 0 20px 0;
    font-weight: 700;
}

.cstp-single-deceased {
    font-size: 1.5rem;
    color: var(--cstp-brown);
    margin: 0 0 30px 0;
}

/* מילות המשפחה */
.cstp-family-words {
    background: rgba(249, 244, 232, 0.5);
    padding: 30px;
    margin: 40px 0;
    border-right: 5px solid var(--cstp-gold);
    line-height: 1.8;
    font-size: 1.1rem;
}

.cstp-family-words h3 {
    color: var(--cstp-brown-dark);
    margin-top: 0;
}

/* מד גיוס גדול */
.cstp-fundraising-large {
    background: linear-gradient(135deg, #FFFFFF 0%, #F9F4E8 100%);
    border: 2px solid var(--cstp-border);
    padding: 30px;
    margin: 40px 0;
}

.cstp-fundraising-large .cstp-fundraising-stats {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.cstp-fundraising-large .cstp-progress-bar {
    height: 20px;
}

.cstp-fundraising-large .cstp-raised-amount {
    font-size: 1.5rem;
}

.cstp-fundraising-large .cstp-percentage {
    font-size: 1.8rem;
}

/* תאריכים */
.cstp-dates {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    flex-wrap: wrap;
}

.cstp-date-item {
    text-align: center;
    padding: 15px;
}

.cstp-date-label {
    font-size: 0.9rem;
    color: var(--cstp-brown);
    margin-bottom: 5px;
}

.cstp-date-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--cstp-brown-dark);
}

/* גלריה - סלייד */
.cstp-gallery {
    margin: 50px 0;
}

.cstp-gallery h3 {
    font-size: 1.8rem;
    color: var(--cstp-brown-dark);
    margin-bottom: 25px;
    text-align: center;
}

/* קונטיינר הסלייד */
.cstp-slider-container {
    position: relative;
    max-width: 550px;
    margin: 0 auto;
    background: linear-gradient(135deg, #FFFFFF 0%, #F9F4E8 100%);
    border: 2px solid var(--cstp-gold);
    padding: 12px;
    box-shadow: 0 4px 15px var(--cstp-shadow);
}

.cstp-slider {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
}

.cstp-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cstp-slide.active {
    opacity: 1;
    z-index: 1;
}

.cstp-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: pointer;
}

/* חיצי ניווט */
.cstp-slider-prev,
.cstp-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(230, 190, 58, 0.9);
    color: var(--cstp-text-dark);
    border: none;
    font-size: 1.3rem;
    padding: 8px 12px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    font-weight: bold;
}

.cstp-slider-prev:hover,
.cstp-slider-next:hover {
    background: var(--cstp-gold) !important;
    color: var(--cstp-text-dark) !important;
    transform: translateY(-50%) scale(1.1);
}

.cstp-slider-prev:active,
.cstp-slider-prev:focus,
.cstp-slider-next:active,
.cstp-slider-next:focus {
    background: var(--cstp-gold) !important;
    color: var(--cstp-text-dark) !important;
    outline: none;
    border: none;
}

.cstp-slider-prev {
    right: 3px;
}

.cstp-slider-next {
    left: 3px;
}

/* נקודות ניווט */
.cstp-slider-dots {
    text-align: center;
    padding: 12px 0 6px;
}

.cstp-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 3px;
    background: #D4C4A8;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cstp-dot:hover {
    background: var(--cstp-gold);
    transform: scale(1.1);
}

.cstp-dot.active {
    background: var(--cstp-gold-dark);
    width: 20px;
}

/* מונה תמונות */
.cstp-slider-counter {
    text-align: center;
    font-size: 0.85rem;
    color: var(--cstp-brown);
    padding: 6px 0;
    font-weight: 600;
}

.cstp-current-slide {
    color: var(--cstp-gold-dark);
    font-size: 1rem;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .cstp-slider {
        height: 240px;
    }
    
    .cstp-slider-prev,
    .cstp-slider-next {
        font-size: 1.1rem;
        padding: 6px 10px;
    }
    
    .cstp-slider-container {
        padding: 8px;
    }
    
    .cstp-dot {
        width: 7px;
        height: 7px;
    }
    
    .cstp-dot.active {
        width: 16px;
    }
}

/* Lightbox לגלריה */
.cstp-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.cstp-lightbox.active {
    display: flex;
}

.cstp-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.cstp-lightbox-close {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: none;
    border: none;
    width: 50px;
    height: 50px;
    line-height: 1;
}

.cstp-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 50px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 60px;
    height: 60px;
    line-height: 1;
}

.cstp-lightbox-prev {
    right: 20px;
}

.cstp-lightbox-next {
    left: 20px;
}

/* מילות תודה */
.cstp-thanks {
    background: linear-gradient(135deg, var(--cstp-gold) 0%, var(--cstp-gold-dark) 100%);
    color: var(--cstp-text-dark);
    padding: 40px;
    margin: 40px 0;
    text-align: center;
    line-height: 1.8;
    font-size: 1.1rem;
}

.cstp-thanks h3 {
    margin-top: 0;
    font-size: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .cstp-page-title {
        font-size: 1.8rem;
    }
    
    .cstp-page-subtitle {
        font-size: 1.1rem;
    }
    
    .cstp-projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .cstp-single-project {
        padding: 20px;
    }
    
    .cstp-single-image {
        width: 100%;
        height: 300px;
    }
    
    .cstp-single-title {
        font-size: 1.8rem;
    }
    
    .cstp-dates {
        flex-direction: column;
    }
    
    .cstp-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* אנימציות כניסה */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cstp-project-card {
    animation: fadeInUp 0.6s ease-out;
}

.cstp-project-card:nth-child(1) { animation-delay: 0.1s; }
.cstp-project-card:nth-child(2) { animation-delay: 0.2s; }
.cstp-project-card:nth-child(3) { animation-delay: 0.3s; }
.cstp-project-card:nth-child(4) { animation-delay: 0.4s; }
.cstp-project-card:nth-child(5) { animation-delay: 0.5s; }
.cstp-project-card:nth-child(6) { animation-delay: 0.6s; }

/* תמיכה ב-RTL */
[dir="rtl"] .cstp-quote {
    border-right: 3px solid var(--cstp-gold);
    border-left: none;
}

[dir="rtl"] .cstp-family-words {
    border-right: 5px solid var(--cstp-gold);
    border-left: none;
}

/* סגנונות נוספים לממשק */
.cstp-no-projects {
    text-align: center;
    padding: 60px 20px;
    color: var(--cstp-brown);
    font-size: 1.2rem;
}

.cstp-divider {
    height: 2px;
    background: linear-gradient(to left, transparent, var(--cstp-gold), transparent);
    margin: 60px auto;
    max-width: 300px;
}

/* רשימת תורמים */
.cstp-donors-section {
    margin: 50px 0;
}

.cstp-donors-list table {
    width: 100%;
    border-collapse: collapse;
}

.cstp-donors-list thead tr {
    background: var(--cstp-gold);
    color: var(--cstp-text-dark);
}

.cstp-donors-list th {
    padding: 15px;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--cstp-gold-dark);
    font-weight: 700;
}

.cstp-donors-list tbody tr {
    border-bottom: 1px solid var(--cstp-border);
    transition: background 0.3s ease;
}

.cstp-donors-list tbody tr:hover {
    background: rgba(230, 190, 58, 0.1);
}

.cstp-donors-list td {
    padding: 12px;
    font-size: 1rem;
}

.cstp-donors-list tfoot tr {
    background: rgba(230, 190, 58, 0.2);
    font-weight: bold;
}

.cstp-donors-list tfoot td {
    padding: 15px;
    font-size: 1.2rem;
}

/* Responsive לטבלת תורמים */
@media (max-width: 768px) {
    .cstp-donors-list table {
        font-size: 0.9rem;
    }
    
    .cstp-donors-list th,
    .cstp-donors-list td {
        padding: 8px;
    }
}

.cstp-cta-section a {
    color: #6B5437 !important;
    border-radius: 32px;
}
.elementor a,
.elementor a:visited {
    color: #6B5437;
}

.elementor a:hover,
.elementor a:focus {
    color: #6B5437;
}/* אם הפוסט-טייפ הוא sefer_torah_project */
body.single-sefer_torah_project {
    background-color: #F9F4E8;
}

/* אם הפוסט-טייפ הוא completed_sefer */
body.single-completed_sefer {
    background-color: #F9F4E8;
}

/* ליתר ביטחון – עוטף העמוד הפנימי */
.sefer-single-wrapper {
    background-color: #F9F4E8;
}
body {
    background-color: #F9F4E8;
}