/* Import Google Fonts: Noto Sans Hebrew and Assistant */
@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;500;600;700&family=Noto+Sans+Hebrew:wght@300;400;500;700;900&display=swap');

:root {
    /* Brand Colors from Meyuchadim */
    --primary-blue: #037dca;
    --deep-blue: #0063a1;
    --pink: #dc3a74;
    --purple: #b22f8b;
    --indigo: #615dcb;
    --light-blue: #3ea7e9;
    --bg-light: #fff5f5;
    --text-main: #11133c;
    --text-muted: #647177;
    --border: #c3d4e0;
    --surface: #ffffff;
    --success: #39bc8d;
    --info-bg: #dbecf3;
    --info-border: #abc8d6;
    --info-text: #005589;
    
    /* Gradients from Meyuchadim */
    --primary-gradient: linear-gradient(67deg, var(--pink) -12.51%, var(--indigo) 41.48%, var(--primary-blue) 69.74%, var(--light-blue) 115.04%);
    --title-gradient: linear-gradient(88deg, var(--purple) -14.19%, var(--deep-blue) 101.89%);
    
    /* Shadows & Border Radius */
    --shadow-sm: 0 2px 4px rgba(0, 19, 41, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 19, 41, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 19, 41, 0.12);
    --font-sans: 'Noto Sans Hebrew', 'Assistant', system-ui, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background: linear-gradient(to bottom, #ffffff 0%, #fff1f2 400px, #fff0f5 100%);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Header & Navigation */
header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 48px;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

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

.nav-links a:hover {
    color: var(--deep-blue);
}

.nav-links a.btn-nav {
    background: var(--primary-gradient);
    color: white !important;
    padding: 8px 24px;
    border-radius: 9999px;
    font-weight: 600;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-links a.btn-nav:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

/* Main Container */
main {
    flex: 1;
    max-width: 1340px;
    width: 100%;
    margin: 2.5rem auto;
    padding: 0 16px;
}

/* Hero Section with Romantic Background Image */
.hero-wrapper {
    background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)), url('../images/romantic_bg.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    padding: 6rem 2rem;
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.hero-card {
    background: rgba(255, 241, 242, 0.96); /* Soft gentle pink */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3.5rem 2.5rem;
    border-radius: 20px;
    max-width: 950px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(254, 205, 211, 0.8); /* Light pink border */
    position: relative;
    overflow: visible; /* Allows hearts to float out slightly */
}

/* Floating Hearts Animations */
.heart-icon {
    position: absolute;
    font-size: 2rem;
    animation: heartFloat 4s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 5;
    filter: drop-shadow(0 2px 5px rgba(220, 58, 116, 0.15));
}

.heart-1 { top: -20px; right: 20px; animation-delay: 0s; }
.heart-2 { bottom: -20px; left: 40px; animation-delay: 0.7s; }
.heart-3 { top: 60px; left: -25px; animation-delay: 1.4s; }
.heart-4 { bottom: 60px; right: -25px; animation-delay: 2.1s; }

@keyframes heartFloat {
    0% { transform: translateY(0) scale(1) rotate(0deg); }
    100% { transform: translateY(-15px) scale(1.15) rotate(12deg); }
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--primary-gradient);
}

.hero-card h1 {
    font-size: 2.75rem;
    font-weight: 900;
    margin-bottom: 1.25rem;
    background: var(--title-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-card p.tagline {
    font-size: 1.35rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 2.5rem;
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 10px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white !important;
    box-shadow: 0 4px 15px rgba(97, 93, 203, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(97, 93, 203, 0.35);
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--deep-blue) !important;
    border: 2px solid var(--deep-blue);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
}

/* Info Cards & Sections */
.sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .sections-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.card h2 {
    font-size: 1.65rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--title-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

.card ul {
    list-style-position: inside;
    margin-right: 0.5rem;
    color: var(--text-muted);
}

.card li {
    margin-bottom: 0.6rem;
    font-size: 1.05rem;
}

/* Sensory Friendly Box */
.sensory-friendly-box {
    background-color: var(--info-bg);
    border: 1px solid var(--info-border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    color: var(--info-text);
}

.sensory-friendly-box h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--deep-blue);
}

.sensory-friendly-box p {
    font-size: 1.1rem;
}

.sensory-friendly-box ul {
    list-style-type: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .sensory-friendly-box ul {
        grid-template-columns: 1fr;
    }
}

.sensory-friendly-box li {
    position: relative;
    padding-right: 1.75rem;
    font-size: 1.05rem;
    font-weight: 500;
}

.sensory-friendly-box li::before {
    content: "✓";
    position: absolute;
    right: 0;
    color: var(--success);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Forms */
.form-container {
    max-width: 650px;
    margin: 0 auto;
    background: var(--surface);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.form-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-title h1 {
    font-size: 2.2rem;
    font-weight: 900;
    background: var(--title-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
}

.form-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

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

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-main);
    font-size: 1.05rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-family: var(--font-sans);
    transition: all 0.3s ease;
    background-color: #fcfdfe;
    color: var(--text-main);
}

.form-control:focus {
    outline: none;
    border-color: var(--deep-blue);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(3, 125, 202, 0.15);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 9l3 3 3-3' stroke='%230063a1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: left 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-left: 2.5rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    margin-top: 2.5rem;
    text-align: center;
}

.form-actions .btn {
    width: 100%;
    padding: 12px;
    font-size: 1.15rem;
}

/* Success State */
.success-card {
    text-align: center;
    background: var(--surface);
    padding: 4rem 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    max-width: 650px;
    margin: 2rem auto;
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    background: var(--title-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.success-card h1 {
    font-size: 2.20rem;
    font-weight: 900;
    background: var(--title-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.25rem;
}

.success-card p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

/* Admin Dashboard */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 1.25rem;
}

.admin-title {
    font-size: 2rem;
    font-weight: 900;
    background: var(--title-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.table-responsive {
    overflow-x: auto;
    background: var(--surface);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

table.admin-table th, table.admin-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

table.admin-table th {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.05rem;
}

table.admin-table tr:last-child td {
    border-bottom: none;
}

table.admin-table tr:hover td {
    background-color: var(--bg-light);
}

.badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-gender-male {
    background-color: #e0f2fe;
    color: #0369a1;
}

.badge-gender-female {
    background-color: #fce7f3;
    color: #be185d;
}

.badge-gender-other {
    background-color: #f1f5f9;
    color: #475569;
}

/* Footer */
footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1340px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 1.25rem;
    }
}

/* Floating Hearts & Falling Petals across Entire Page */
.rising-heart, .falling-blossom {
    position: fixed; /* Floats over the viewport, covering the entire page */
    pointer-events: none;
    z-index: 9999; /* Float in front, completely transparent to clicks */
    will-change: transform, opacity;
}

@keyframes riseParticle {
    0% {
        transform: translateY(110vh) translateX(0) rotate(0deg) scale(0.6);
        opacity: 0;
    }
    15% {
        opacity: 0.45; /* Soft opacity for readability */
    }
    85% {
        opacity: 0.45;
    }
    100% {
        transform: translateY(-10vh) translateX(60px) rotate(360deg) scale(1.15);
        opacity: 0;
    }
}

@keyframes fallParticle {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg) scale(0.6);
        opacity: 0;
    }
    15% {
        opacity: 0.45;
    }
    85% {
        opacity: 0.45;
    }
    100% {
        transform: translateY(110vh) translateX(-60px) rotate(-360deg) scale(1.15);
        opacity: 0;
    }
}

/* Responsive columns for Meyuchadim sections */
.meyuchadim-split {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2.5rem;
    align-items: center;
}

.meyuchadim-split.reverse {
    grid-template-columns: 0.8fr 1.2fr;
}

.meyuchadim-three-cols {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.meyuchadim-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .meyuchadim-split, .meyuchadim-split.reverse {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    .meyuchadim-split .image-wrapper {
        order: -1; /* Place image on top on mobile */
    }
    .meyuchadim-three-cols, .meyuchadim-two-cols {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    .meyuchadim-split img {
        max-width: 250px !important;
        margin: 0 auto;
        display: block;
    }
}

/* Media Cards for Meyuchadim in Media section */
.media-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-sm);
    display: flex;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 250px; /* Uniform height on desktop */
}

.media-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.media-card .media-image {
    width: 35%;
    height: 100%;
    object-fit: cover;
}

.media-card .media-body {
    width: 65%;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: right;
}

.media-card .media-body h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 0.4rem;
}

.media-card .media-body p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Limit description lines to prevent overflow */
    -webkit-box-orient: vertical;
}

.media-card .media-body a {
    color: var(--primary-blue);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.media-card .media-body a:hover {
    color: var(--deep-blue);
}

@media (max-width: 992px) {
    .meyuchadim-two-cols {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 576px) {
    .media-card {
        flex-direction: column !important;
        height: auto; /* Expand height on mobile */
    }
    .media-card .media-image {
        width: 100%;
        height: 180px;
    }
    .media-card .media-body {
        width: 100%;
        padding: 1.25rem;
    }
    .media-card .media-body p {
        -webkit-line-clamp: 3;
    }
}

/* Responsive adjustment for Sigalit Subtitle */
@media (max-width: 680px) {
    .sigalit-subtitle {
        display: none !important;
    }
}

/* Hero Action Row (Organizers & Register Button) */
.hero-actions-row {
    margin-top: 2.5rem;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    gap: 1.5rem;
    padding: 0 0.5rem;
}

.organizer-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.5rem 0.85rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: right;
    direction: rtl;
    width: 260px;
    height: 85px; /* Symmetrical aligned height */
    flex-shrink: 0;
}

.organizer-img {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pink);
    display: block;
    flex-shrink: 0;
}

.organizer-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
}

.organizer-name {
    font-family: 'Assistant', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.1;
}

.organizer-role {
    font-family: 'Assistant', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.organizer-desc {
    font-family: 'Assistant', sans-serif;
    font-weight: 500;
    font-size: 0.62rem;
    color: var(--text-muted);
    line-height: 1.15;
}

.hero-register-btn-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-hero-register {
    margin: 0 !important;
    padding: 1rem 2.5rem !important;
    font-size: 1.25rem !important;
}

.hero-register-notice {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: bold;
    white-space: nowrap;
}

@media (max-width: 960px) {
    .hero-actions-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    .organizer-card {
        width: 280px;
        height: auto;
    }
    .organizer-role {
        white-space: normal;
        text-overflow: unset;
        overflow: visible;
    }
}

/* Checkbox Group Layout */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 0.35rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    cursor: pointer;
    margin: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--pink);
    cursor: pointer;
}

/* --- Mobile Responsiveness and UI Tweaks --- */
.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.header-left-group {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.liat-header-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 1px solid var(--border);
    padding-left: 1.5rem;
}

.liat-header-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pink);
    display: block;
}

.liat-header-text {
    display: flex;
    flex-direction: column;
    text-align: right;
    line-height: 1.25;
}

.liat-header-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.liat-header-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .header-left-group {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
        width: 100%;
    }
    .liat-header-block {
        border-left: none;
        padding-left: 0;
        justify-content: center;
    }
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
    }
    .hero-wrapper {
        padding: 2.5rem 1rem;
        border-radius: 16px;
        margin-bottom: 1.5rem;
    }
    .hero-card {
        padding: 2rem 1.25rem;
        border-radius: 16px;
    }
    .hero-card h1 {
        font-size: 2rem;
    }
    .hero-card p.tagline {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    .form-container {
        padding: 2rem 1.25rem;
        border-radius: 16px;
    }
    .form-title h1 {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
    main {
        margin: 1.5rem auto;
    }
    .sections-grid {
        gap: 1.25rem;
    }
    .card {
        padding: 1.5rem;
        border-radius: 16px;
    }
}

@media (max-width: 576px) {
    .form-grid-2col {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .hero-card h1 {
        font-size: 1.75rem;
    }
    .btn {
        padding: 8px 24px;
        font-size: 1rem;
    }
}
