/* Yitzhak Rabin Memorial Plugin - Frontend Styles */

/* Caravan Font from Rabin Center - Production will have it loaded already */

/* Apply Heebo font only to plugin elements */
.yrm-plugin-container,
.yrm-plugin-container *,
.yrm-plugin-container *::before,
.yrm-plugin-container *::after,
#yrm-memorial-form-container,
#yrm-memorial-form-container *,
#yrm-memorial-form-container *::before,
#yrm-memorial-form-container *::after,
.yrm-gallery,
.yrm-gallery *,
.yrm-gallery *::before,
.yrm-gallery *::after,
.yrm-memorial-marquee,
.yrm-memorial-marquee *,
.yrm-memorial-marquee *::before,
.yrm-memorial-marquee *::after,
.yrm-memorial-modal,
.yrm-memorial-modal *,
.yrm-memorial-modal *::before,
.yrm-memorial-modal *::after {
    font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Use Caravan font for headings, buttons and important elements - only within plugin containers */
.yrm-plugin-container h1, 
.yrm-plugin-container h2, 
.yrm-plugin-container h3, 
.yrm-plugin-container h4, 
.yrm-plugin-container h5, 
.yrm-plugin-container h6,
#yrm-memorial-form-container h1,
#yrm-memorial-form-container h2,
#yrm-memorial-form-container h3,
#yrm-memorial-form-container h4,
#yrm-memorial-form-container h5,
#yrm-memorial-form-container h6,
.yrm-form-header h2,
.yrm-result-header h3,
.yrm-modal-title,
.yrm-gallery-header h3,
.yrm-memorial-name,
.yrm-plugin-container button,
.yrm-submit-btn,
.yrm-load-more-btn,
.yrm-modal-share-btn,
.yrm-modal-close,
.yrm-plugin-container input[type="submit"],
.yrm-plugin-container input[type="button"] {
    font-family: 'caravan-180-aaa', 'Caravan', 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

:root {
    --yrm-primary-color: #1a237e;
    --yrm-secondary-color: #3949ab;
    --yrm-accent-color: #ffd700;
    --yrm-text-color: #333;
    --yrm-border-color: #e8e8e8;
    --yrm-success-color: #4caf50;
    --yrm-error-color: #f44336;
    --yrm-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --yrm-border-radius: 0px;
}

/* Memorial Form Container */
#yrm-memorial-form-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    padding-bottom: 10rem;
    /* background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(26, 35, 126, 0.9)), 
                url('../../assets/images/rabin-bg.jpg'); */
    background-size: cover;
    background-position: center;
    /* background-attachment: fixed; */
    /* border-radius: var(--yrm-border-radius); */
    /* box-shadow: var(--yrm-shadow); */
    /* overflow: hidden; */
    direction: rtl;
    text-align: right;
    /* min-height: 80vh; */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Form overlay content */
.yrm-form-overlay {
    /* max-width: 800px; */
    margin: 0 auto;
    padding: 2rem;
}

.yrm-form-header {
    margin-bottom: 1rem;
}

.yrm-logo {
    text-align: right;
    margin-bottom: 1.5rem;
}

.yrm-header-logo,
.yrm-result-logo {
    max-height: 120px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.yrm-form-header h2 {
    color: #fff;
    margin-bottom: 0.5rem;
    margin-top: 0;

    font-size: 1.8rem;
}

.yrm-form-header p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

/* Form Styles */
.yrm-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.yrm-form-group {
    display: flex;
    flex-direction: column;
}

.yrm-form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

/* Placeholder styling for better visibility */
.yrm-form-group input::placeholder,
.yrm-form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.yrm-form-group input,
.yrm-form-group textarea {
    padding: 0.75rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid #fff;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
    color: #fff;
}

/* focus */
.yrm-form-group input:focus,
.yrm-form-group textarea:focus {
    outline: none;
    border-bottom: 2px solid #fff;
}

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

/* Email and Phone field styling */
.yrm-form-group input[type="email"],
.yrm-form-group input[type="tel"] {
    direction: ltr;
    text-align: right;
}

.yrm-form-group input[type="tel"]::placeholder {
    text-align: right;
    direction: rtl;
}

/* RTL placeholder support */
.yrm-form-group input[type="text"]::placeholder,
.yrm-form-group textarea::placeholder {
    text-align: right;
    direction: rtl;
}

.yrm-char-counter {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #fff;
    text-align: start;
}

/* Consent Checkbox */
.yrm-consent-group {
    margin: 1rem 0;
}

.yrm-consent-info {
    /* background: rgba(255, 255, 255, 0.1); */
    /* border: 1px solid rgba(255, 255, 255, 0.2); */
    /* border-radius: 8px; */
    /* padding: 1rem; */
    margin-bottom: 1rem;
}

.yrm-consent-info p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}
.yrm-form-flex-group {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}

.yrm-form-flex-group .yrm-form-group {
    flex: 1;
}
.yrm-consent-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--yrm-border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.yrm-consent-notice p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #856404;
}

.yrm-consent-notice strong {
    color: #856404;
}

.yrm-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: normal;
}

.yrm-checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Submit Button */
.yrm-submit-btn {
    background: linear-gradient(135deg, var(--yrm-primary-color) 0%, var(--yrm-secondary-color) 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.yrm-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

.yrm-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.yrm-btn-loading {
    display: none;
}

.yrm-submit-btn.loading .yrm-btn-text {
    display: none;
}

.yrm-submit-btn.loading .yrm-btn-loading {
    display: inline;
}

/* Response Messages */
.yrm-response {
    padding: 1rem;
    margin-top: 1rem;
    font-weight: 500;
    border-left: 4px solid;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
}

.yrm-response.success {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    color: var(--yrm-success-color);
    border-left-color: var(--yrm-success-color);
    border-top: 1px solid #c3e6c3;
    border-bottom: 1px solid #c3e6c3;
    border-right: 1px solid #c3e6c3;
}

.yrm-response.error {
    background: linear-gradient(135deg, #ffebee 0%, #fdf2f2 100%);
    color: var(--yrm-error-color);
    border-left-color: var(--yrm-error-color);
    border-top: 1px solid #ffcdd2;
    border-bottom: 1px solid #ffcdd2;
    border-right: 1px solid #ffcdd2;
}

/* Memorial Result - Dark Theme */
.yrm-memorial-result,
#yrm-memorial-result.yrm-memorial-result {
    max-width: 600px;
    margin: 2rem auto;
    padding: 3rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%) !important;
    border: 1px solid #333 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
    text-align: center;
    direction: rtl;
    position: relative;
    color: #fff !important;
}

.yrm-memorial-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--yrm-primary-color), var(--yrm-secondary-color));
}

.yrm-memorial-result .yrm-result-header h3,
#yrm-memorial-result .yrm-result-header h3 {
    color: #fff !important;
    margin-bottom: 0.5rem;
}

.yrm-memorial-result .yrm-result-header p,
#yrm-memorial-result .yrm-result-header p {
    color: #ccc !important;
}

.yrm-memorial-result .yrm-sharing-buttons h4,
#yrm-memorial-result .yrm-sharing-buttons h4 {
    color: #fff !important;
    margin-bottom: 1rem;
}

.yrm-image-container {
    margin: 2rem 0;
}

.yrm-image-container img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid var(--yrm-border-color);
}

/* Sharing Buttons */
.yrm-sharing-buttons {
    margin: 2rem 0;
}

.yrm-sharing-buttons h4 {
    color: var(--yrm-text-color);
    margin-bottom: 1rem;
}

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

.yrm-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    color: var(--yrm-text-color);
    text-decoration: none;
    border: 1px solid var(--yrm-border-color);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    font-family: 'caravan-180-aaa', 'Caravan', 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.yrm-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--yrm-shadow);
    text-decoration: none;
}

.yrm-share-facebook:hover {
    border-color: #1877f2;
    color: #1877f2;
}

.yrm-share-twitter:hover {
    border-color: #1da1f2;
    color: #1da1f2;
}

.yrm-share-whatsapp:hover {
    border-color: #25d366;
    color: #25d366;
}

.yrm-copy-link:hover {
    border-color: var(--yrm-secondary-color);
    color: var(--yrm-secondary-color);
}

/* Secondary Button */
.yrm-secondary-btn {
    background: transparent;
    color: var(--yrm-secondary-color);
    border: 1px solid var(--yrm-secondary-color);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

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

/* Memorial Gallery */
.yrm-gallery {
    max-width: 100%;
    margin: 0 auto;
    /* padding: 2rem; */
    direction: rtl;
}

.yrm-gallery-header {
    text-align: center;
    margin-bottom: 2rem;
}

.yrm-gallery-header h3 {
    color: var(--yrm-primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.yrm-memorial-count {
    color: #666;
    font-size: 1.1rem;
}

.yrm-no-memorials {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

/* Memorial Grid */
.yrm-memorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.yrm-memorial-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    /* box-shadow: 0 2px 8px rgba(0,0,0,0.08); */
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.yrm-memorial-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--yrm-primary-color), var(--yrm-secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.yrm-memorial-item:hover {
    /* transform: translateY(-3px); */
    /* box-shadow: 0 8px 30px rgba(0,0,0,0.12); */
    border-color: #d0d0d0;
}

.yrm-memorial-item:hover::before {
    opacity: 1;
}

.yrm-memorial-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.yrm-memorial-content {
    padding: 2rem;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
}

.yrm-memorial-name {
    color: var(--yrm-primary-color);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.yrm-memorial-message {
    color: var(--yrm-text-color);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    text-align: justify;
    position: relative;
    padding-inline-start: 1rem;
}

.yrm-memorial-message::before {
    content: "";
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5MiIgaGVpZ2h0PSI3MiI+PHBhdGggZmlsbD0iI2ZmZDcwMCIgZD0iTS4yOTYgNzEuOTg4aDMwLjYzTDQ2LjI3LjA1NUgxNS42NDJ6bTQ1LjY2NSAwaDMwLjYzTDkxLjkzNi4wNTVINjEuMzA4eiIgb3BhY2l0eT0iLjYiLz48L3N2Zz4=');
    background-size: contain;
    background-repeat: no-repeat;
    width: 23px;
    height: 18px;
    position: absolute;
    top: -10px;
    left: -5px;
    opacity: 0.8;
}

.yrm-memorial-date {
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
    text-align: left;
    direction: ltr;
}

.yrm-memorial-share {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e8e8e8;
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    text-align: center;
}

.yrm-share-memorial-btn {
    background: linear-gradient(135deg, var(--yrm-secondary-color) 0%, var(--yrm-primary-color) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.yrm-share-memorial-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.yrm-share-memorial-btn:hover::before {
    left: 100%;
}

.yrm-share-memorial-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

/* Load More */
.yrm-load-more {
    text-align: center;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    #yrm-memorial-form-container {
        margin: 0;
        min-height: 70vh;
        background-attachment: scroll; /* Fix for mobile */
    }
    
    .yrm-form-overlay {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .yrm-memorial-result {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .yrm-gallery {
        padding: 0;
    }
    
    .yrm-memorials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .yrm-share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .yrm-share-btn {
        width: 200px;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .yrm-form-flex-group {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .yrm-form-header h2 {
        font-size: 1.5rem;
    }
    
    .yrm-submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .yrm-memorial-content {
        padding: 1rem;
    }
}

/* Animation for form submission */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.yrm-memorial-result {
    animation: fadeInUp 0.5s ease-out;
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.yrm-submit-btn.loading::after {
    content: "";
    width: 16px;
    height: 16px;
    margin-inline-start: 8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
}

/* Swiper Slider Styles */
.yrm-memorials-swiper {
    width: 100%;
    height: auto;
    margin: 2rem 0;
    overflow: hidden;
}

.yrm-memorials-swiper .swiper-wrapper {
    transition-timing-function: linear;
}

.yrm-memorials-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: stretch;
    height: auto;
    width: 350px; /* Fixed width for marquee effect */
}

.yrm-memorials-swiper .yrm-memorial-item {
    width: 100%;
    max-width: none;
    margin: 0;
    min-height: 400px;
}

/* Custom Swiper Navigation Buttons */
.yrm-memorials-swiper .swiper-button-next,
.yrm-memorials-swiper .swiper-button-prev {
    background: rgba(44, 62, 80, 0.8);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.yrm-memorials-swiper .swiper-button-next:hover,
.yrm-memorials-swiper .swiper-button-prev:hover {
    background: rgba(44, 62, 80, 1);
    transform: scale(1.1);
}

.yrm-memorials-swiper .swiper-button-next::after,
.yrm-memorials-swiper .swiper-button-prev::after {
    font-size: 18px;
    font-weight: bold;
}

/* Custom Swiper Pagination */
.yrm-memorials-swiper .swiper-pagination {
    position: relative;
    margin-top: 1rem;
}

.yrm-memorials-swiper .swiper-pagination-bullet {
    background: #2c3e50;
    opacity: 0.3;
    width: 12px;
    height: 12px;
    margin: 0 6px;
    transition: all 0.3s ease;
}

.yrm-memorials-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: #e74c3c;
    transform: scale(1.2);
}

/* RTL Support for Swiper */
[dir="rtl"] .yrm-memorials-swiper .swiper-button-next {
    left: 10px;
    right: auto;
}

[dir="rtl"] .yrm-memorials-swiper .swiper-button-prev {
    right: 10px;
    left: auto;
}

/* Responsive Design for Swiper */
@media (max-width: 768px) {
    .yrm-memorials-swiper .swiper-slide {
        width: 280px; /* Smaller width on mobile */
    }
    
    .yrm-memorials-swiper .swiper-button-next,
    .yrm-memorials-swiper .swiper-button-prev {
        width: 36px;
        height: 36px;
    }
    
    .yrm-memorials-swiper .swiper-button-next::after,
    .yrm-memorials-swiper .swiper-button-prev::after {
        font-size: 14px;
    }
}

@media (min-width: 1200px) {
    .yrm-memorials-swiper .swiper-slide {
        width: 400px; /* Larger width on desktop */
    }
}

/* Memorial Marquee Styles */
.yrm-memorial-marquee {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    /* background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); */
    /* border-top: 3px solid var(--yrm-primary-color); */
    /* border-bottom: 3px solid var(--yrm-secondary-color); */
    /* box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); */
    direction: rtl;
}

.yrm-marquee-track {
    display: flex;
    align-items: center;
    animation: marqueeScroll linear infinite;
    white-space: nowrap;
    gap: 1.5rem;
    padding: 0 2rem;
    height: 100%;
}

/* RTL Support - Animation moves right to left by default */
@keyframes marqueeScroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* LTR Support - Animation moves left to right when direction is reversed */
[data-direction="ltr"] .yrm-marquee-track {
    animation-direction: reverse;
}

.yrm-marquee-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(26, 35, 126, 0.1);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    min-width: 300px;
    max-width: 500px;
    cursor: pointer;
    position: relative;
}

.yrm-marquee-item:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.15);
    transform: translateY(-2px);
}

.yrm-marquee-item:focus {
    outline: 2px solid var(--yrm-primary-color);
    outline-offset: 2px;
}


/* Pause animation on hover if enabled */
.yrm-memorial-marquee[data-pause="true"]:hover .yrm-marquee-track {
    animation-play-state: paused;
}

.yrm-marquee-image {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--yrm-primary-color);
}

.yrm-marquee-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yrm-marquee-content {
    flex: 1;
    text-align: right;
    direction: rtl;
    overflow: hidden;
}

.yrm-marquee-message {
    font-size: 0.95rem;
    color: var(--yrm-text-color);
    line-height: 1.4;
    margin-bottom: 0.25rem;
    font-style: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 400px;
}

.yrm-marquee-author {
    font-size: 0.8rem;
    color: var(--yrm-primary-color);
    font-family: 'caravan-180-aaa', 'Caravan', 'Heebo', sans-serif;
    font-weight: 600;
    white-space: nowrap;
}

/* Gradient fade effect on edges */
.yrm-memorial-marquee::before,
.yrm-memorial-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    z-index: 2;
    pointer-events: none;
}

.yrm-memorial-marquee::before {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.85), transparent);
}

.yrm-memorial-marquee::after {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.85), transparent);
}

/* LTR direction adjustments */
[data-direction="ltr"] .yrm-marquee-content {
    text-align: left;
    direction: ltr;
}

[data-direction="ltr"] .yrm-memorial-marquee::before {
    left: 0;        
    right: auto;
    background: linear-gradient(to right, rgba(0,0,0,0.85), transparent);
}

[data-direction="ltr"] .yrm-memorial-marquee::after {
    right: 0;
    left: auto;
    background: linear-gradient(to left, rgba(0,0,0,0.85), transparent);
}

/* Responsive Design for Marquee */
@media (max-width: 768px) {
    .yrm-marquee-item {
        min-width: 250px;
        max-width: 350px;
        padding: 0.5rem 1rem;
        gap: 0.75rem;
    }
    
    .yrm-marquee-image {
        width: 32px;
        height: 32px;
    }
    
    .yrm-marquee-message {
        font-size: 0.85rem;
        max-width: 200px;
    }
    
    .yrm-marquee-author {
        font-size: 0.75rem;
    }
    
    .yrm-marquee-track {
        gap: 2rem;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .yrm-marquee-item {
        min-width: 200px;
        max-width: 280px;
        padding: 0.4rem 0.8rem;
    }
    
    .yrm-marquee-message {
        font-size: 0.8rem;
        max-width: 150px;
    }
    
    .yrm-marquee-track {
        gap: 1.5rem;
    }
}

/* Alternative marquee styles for different themes */
.yrm-memorial-marquee.yrm-marquee-minimal {
    background: transparent;
    border: none;
    box-shadow: none;
}

.yrm-memorial-marquee.yrm-marquee-minimal .yrm-marquee-item {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0.5rem 0;
}

.yrm-memorial-marquee.yrm-marquee-dark {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-color: var(--yrm-accent-color);
}

.yrm-memorial-marquee.yrm-marquee-dark .yrm-marquee-item {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.yrm-memorial-marquee.yrm-marquee-dark .yrm-marquee-message {
    color: rgba(255, 255, 255, 0.9);
}

.yrm-memorial-marquee.yrm-marquee-dark .yrm-marquee-author {
    color: var(--yrm-accent-color);
}

/* Memorial Modal Styles */
.yrm-memorial-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.yrm-memorial-modal.yrm-modal-open {
    opacity: 1;
    visibility: visible;
}

.yrm-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    direction: rtl;
    text-align: right;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.yrm-memorial-modal.yrm-modal-open .yrm-modal-content {
    transform: scale(1);
}

.yrm-modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 2px solid var(--yrm-primary-color);
    position: relative;
}

.yrm-modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.yrm-modal-close:hover {
    background: #f0f0f0;
    color: var(--yrm-primary-color);
}

.yrm-modal-title {
    color: var(--yrm-primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    padding-left: 3rem;
}

.yrm-modal-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
    padding-left: 3rem;
}

.yrm-modal-body {
    padding: 2rem;
}

.yrm-modal-image {
    text-align: center;
    margin-bottom: 1.5rem;
}

.yrm-modal-image img {
    max-width: 150px;
    height: auto;
    border-radius: 50%;
    border: 3px solid var(--yrm-primary-color);
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.2);
}

.yrm-modal-message {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--yrm-text-color);
}

.yrm-modal-message::before {
    content: "";
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5MiIgaGVpZ2h0PSI3MiI+PHBhdGggZmlsbD0iI2ZmZDcwMCIgZD0iTS4yOTYgNzEuOTg4aDMwLjYzTDQ2LjI3LjA1NUgxNS42NDJ6bTQ1LjY2NSAwaDMwLjYzTDkxLjkzNi4wNTVINjEuMzA4eiIgb3BhY2l0eT0iLjYiLz48L3N2Zz4=');
    background-size: contain;
    background-repeat: no-repeat;
    width: 30px;
    height: 23px;
    position: absolute;
    top: -10px;
    right: 10px;
    opacity: 0.8;
}

.yrm-modal-message::after {
    content: "";
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5MiIgaGVpZ2h0PSI3MiI+PHBhdGggZmlsbD0iI2ZmZDcwMCIgZD0iTS4yOTYgNzEuOTg4aDMwLjYzTDQ2LjI3LjA1NUgxNS42NDJ6bTQ1LjY2NSAwaDMwLjYzTDkxLjkzNi4wNTVINjEuMzA4eiIgb3BhY2l0eT0iLjYiLz48L3N2Zz4=');
    background-size: contain;
    background-repeat: no-repeat;
    width: 30px;
    height: 23px;
    position: absolute;
    bottom: -20px;
    left: 10px;
    opacity: 0.8;
    transform: rotate(180deg);
}

.yrm-modal-author-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e8e8e8;
    margin-top: 1rem;
}

.yrm-modal-author {
    font-weight: 600;
    color: var(--yrm-primary-color);
    font-size: 1.1rem;
}

.yrm-modal-date {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    direction: ltr;
    text-align: left;
}

.yrm-modal-actions {
    padding: 1rem 2rem 2rem;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.yrm-modal-share-btn {
    background: linear-gradient(135deg, var(--yrm-secondary-color) 0%, var(--yrm-primary-color) 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yrm-modal-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .yrm-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 1rem;
    }
    
    .yrm-modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .yrm-modal-title {
        font-size: 1.3rem;
        padding-left: 2.5rem;
    }
    
    .yrm-modal-subtitle {
        padding-left: 2.5rem;
    }
    
    .yrm-modal-body {
        padding: 1.5rem;
    }
    
    .yrm-modal-message {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .yrm-modal-actions {
        padding: 1rem 1.5rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .yrm-modal-content {
        width: 98%;
        margin: 0.5rem;
    }
    
    .yrm-modal-header {
        padding: 1rem;
    }
    
    .yrm-modal-title {
        font-size: 1.2rem;
        padding-left: 2rem;
    }
    
    .yrm-modal-subtitle {
        padding-left: 2rem;
    }
    
    .yrm-modal-body {
        padding: 1rem;
    }
    
    .yrm-modal-author-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Accessibility improvements for modal */
.yrm-memorial-modal[aria-hidden="true"] {
    display: none;
}

.yrm-modal-content:focus {
    outline: 2px solid var(--yrm-primary-color);
    outline-offset: -2px;
}
