/* CSS loaded successfully */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333333;
    --background-color: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --border-color: #dee2e6;
    --font-family: 'Roboto', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo img {
    height: 100px;
}

/* Larger logo for mobile */
@media (max-width: 768px) {
    .logo img {
        height: 80px;
    }
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--secondary-color);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--secondary-color);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 150px 0 100px;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Search and Filter */
.search-filter {
    background: var(--light-gray);
    padding: 2rem 0;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.search-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 300px;
    display: flex;
    background: white;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.search-box input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    outline: none;
}

.search-box button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
}

.filter-options {
    display: flex;
    gap: 1rem;
}

.filter-options select {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: white;
    font-size: 1rem;
    outline: none;
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 1rem auto;
}

/* Programs Section */
.programs {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 600px;
    position: relative;
}

.programs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(52, 152, 219, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(46, 204, 113, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(155, 89, 182, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.program-card {
    background: white;
    border-radius: 12px;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 3px 10px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

.program-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.program-card:hover .program-image {
    transform: scale(1.02);
}

.program-brief {
    color: var(--medium-gray);
    line-height: 1.4;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: max-height 0.3s ease;
    cursor: pointer;
}

.program-brief::after {
    content: ' (לחץ להרחבה...)';
    color: var(--secondary-color);
    font-weight: 500;
}

.program-card:hover {
    transform: translateY(-12px) translateZ(10px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.25),
        0 8px 16px rgba(0, 0, 0, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.1);
}

.program-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.program-card:hover .program-image {
    transform: scale(1.05);
}

.program-brief {
    color: var(--medium-gray);
    line-height: 1.4;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: max-height 0.3s ease;
    cursor: pointer;
}

.program-brief::after {
    content: ' (לחץ להרחבה...)';
    color: var(--secondary-color);
    font-weight: 500;
}

.program-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem;
    position: relative;
}

.program-number {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: white;
    /* White background */
    color: #333;
    /* Black text */
    border: 1px solid #ddd;
    /* Light border for definition */
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.program-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    padding-right: 80px;
    /* Space for program number */
}

.program-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.program-body {
    padding: 1rem;
}

.program-brief {
    color: var(--medium-gray);
    line-height: 1.4;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.program-description {
    color: var(--medium-gray);
    line-height: 1.6;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.program-video {
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.program-video iframe {
    width: 100%;
    height: 200px;
    border: none;
}

.program-card.expanded .program-brief {
    display: none;
}

.program-card.expanded {
    transform: translateY(-12px) translateZ(15px) scale(1.02);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 12px 24px rgba(0, 0, 0, 0.2),
        0 6px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.program-card.expanded .program-description {
    max-height: 500px;
}

.program-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.tag {
    background: var(--light-gray);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.load-more {
    text-align: center;
}

/* Gallery Section */
.gallery {
    padding: 80px 0;
    background: var(--light-gray);
}

.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background: white;
    border: 2px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.gallery-grid,
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 1.5rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    transform: translateY(0);
}

.video-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.video-item iframe {
    width: 100%;
    height: 250px;
    border: none;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    width: 40px;
    text-align: center;
}

.contact-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.contact-form {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--secondary-color);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background 0.3s ease;
}

.social-links a:hover {
    background: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .search-container {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-options {
        width: 100%;
        justify-content: space-between;
    }

    .programs-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .gallery-tabs {
        flex-direction: column;
        align-items: center;
    }

    .gallery-grid,
    .videos-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin Link */
.admin-link {
    background: var(--accent-color) !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 20px;
    font-size: 0.9rem;
}

.admin-link:hover {
    background: #c0392b !important;
}

/* Logo Display Section */
.logo-display {
    padding: 40px 0 60px;
    background-color: #fff;
    text-align: center;
}

.logo-display img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}