/**
 * Synagogue Display - Base Styles
 *
 * Base styles that apply to all themes
 *
 * @package    Synagogue_Display
 * @subpackage Synagogue_Display/public/css
 * @author     Your Name <email@example.com>
 * @since      1.0.0
 */

/* ========================================
   Reset & Base Styles
   ======================================== */

.synagogue-display-wrapper {
    width: 100%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

.synagogue-display {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    direction: rtl;
    text-align: right;
    transition: all 0.8s ease;
}

/* ========================================
   Header Section
   ======================================== */

.display-header {
    padding: 2rem 3rem;
    border-bottom: 3px solid rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.synagogue-logo {
    max-width: 120px;
    max-height: 120px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.synagogue-name {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.15);
    letter-spacing: 0.02em;
}

/* ========================================
   Update Indicator
   ======================================== */

.update-indicator {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(16, 185, 129, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
}

.update-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

.update-indicator::before {
    content: '✓';
    font-size: 18px;
    font-weight: bold;
}

/* ========================================
   Clock Section - Enhanced
   ======================================== */

.clock-section {
    text-align: left;
    direction: ltr;
}

.current-time {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.current-time.pulse {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.current-date {
    font-size: 1.8rem;
    opacity: 0.95;
    font-weight: 500;
}

/* ========================================
   Hebrew Date & Torah Section
   ======================================== */

.hebrew-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-top: 2px solid rgba(0,0,0,0.1);
}

.hebrew-date {
    font-size: 2rem;
    font-weight: 600;
}

.hebrew-day {
    margin-left: 1rem;
}

.torah-portion {
    font-size: 1.5rem;
}

.torah-label {
    opacity: 0.8;
    margin-left: 0.5rem;
}

.torah-name {
    font-weight: 700;
}

/* ========================================
   Main Content Grid
   ======================================== */

.display-main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem 3rem;
}

.left-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ========================================
   Section Styles
   ======================================== */

section {
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.title-icon {
    font-size: 2.5rem;
}

.no-data {
    text-align: center;
    padding: 2rem;
    opacity: 0.6;
    font-style: italic;
}

/* ========================================
   Prayer Times
   ======================================== */

.prayer-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.prayer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0,0,0,0.03);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.prayer-item:hover {
    background: rgba(0,0,0,0.06);
    transform: translateX(-5px);
}

.prayer-name {
    font-size: 1.5rem;
    font-weight: 600;
}

.prayer-time {
    font-size: 1.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    direction: ltr;
}

/* Shabbat Times */
.shabbat-times {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(0,0,0,0.1);
}

.shabbat-times h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.shabbat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.shabbat-label {
    font-weight: 600;
}

.shabbat-time {
    font-weight: 700;
    font-size: 1.2rem;
}

/* ========================================
   Lessons
   ======================================== */

.lessons-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lesson-item {
    padding: 1rem;
    background: rgba(0,0,0,0.03);
    border-radius: 10px;
    border-right: 4px solid #4CAF50;
}

.lesson-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.lesson-details {
    display: flex;
    gap: 1.5rem;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.lesson-time,
.lesson-teacher,
.lesson-location {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.icon {
    opacity: 0.7;
}

/* ========================================
   Zmanim (Halachic Times)
   ======================================== */

.zmanim-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.zman-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(0,0,0,0.03);
    border-radius: 8px;
}

.zman-name {
    font-weight: 600;
}

.zman-time {
    font-weight: 700;
    direction: ltr;
}

/* ========================================
   Events
   ======================================== */

.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0,0,0,0.03);
    border-radius: 10px;
    border-right: 4px solid #2196F3;
}

.event-date {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: #2196F3;
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.event-content {
    flex: 1;
}

.event-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.event-time,
.event-location {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.event-description {
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* ========================================
   Announcements
   ======================================== */

.announcements-scroll {
    max-height: 400px;
    overflow-y: auto;
    padding-left: 0.5rem;
}

.announcements-scroll::-webkit-scrollbar {
    width: 8px;
}

.announcements-scroll::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

.announcement-item {
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 10px;
    border-right: 4px solid #FFC107;
}

.announcement-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.announcement-content {
    line-height: 1.6;
}

/* ========================================
   Memorials
   ======================================== */

.memorials-scroll {
    max-height: 300px;
    overflow-y: auto;
    padding-left: 0.5rem;
}

.memorial-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: rgba(0,0,0,0.03);
    border-radius: 10px;
    border-right: 4px solid #9C27B0;
    text-align: center;
}

.memorial-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.memorial-date {
    font-size: 1rem;
    opacity: 0.8;
}

.memorial-relation {
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.7;
}

/* ========================================
   Image Slideshow
   ======================================== */

.images-section {
    position: relative;
}

.image-slideshow {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 10px;
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide-item.active {
    opacity: 1;
    z-index: 1;
}

.slide-item.slide-in {
    animation: slideIn 1s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 1rem;
    text-align: center;
}

.slideshow-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.prev-slide,
.next-slide {
    background: rgba(0,0,0,0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.prev-slide:hover,
.next-slide:hover {
    background: rgba(0,0,0,0.2);
    transform: scale(1.1);
}

.slide-indicators {
    display: flex;
    gap: 0.5rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: rgba(0,0,0,0.6);
    transform: scale(1.3);
}

/* ========================================
   Footer
   ======================================== */

.display-footer {
    padding: 1.5rem 3rem;
    border-top: 3px solid rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-message {
    font-size: 1.3rem;
    font-style: italic;
    opacity: 0.8;
}

.emergency-contact {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================
   Loading Overlay
   ======================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 1rem;
    color: white;
    font-size: 1.5rem;
}

/* ========================================
   Notifications
   ======================================== */

.synagogue-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 2rem;
    background: #4CAF50;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10000;
    font-size: 1.2rem;
    font-weight: 600;
}

.synagogue-notification.error {
    background: #f44336;
}

.synagogue-notification.warning {
    background: #ff9800;
}

/* ========================================
   Keyboard Help
   ======================================== */

.keyboard-help {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    z-index: 10001;
    max-width: 500px;
}

.keyboard-help h3 {
    margin-top: 0;
    text-align: center;
}

.keyboard-help ul {
    list-style: none;
    padding: 0;
}

.keyboard-help li {
    padding: 0.5rem 0;
    display: flex;
    justify-content: space-between;
}

.keyboard-help kbd {
    background: #333;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-family: monospace;
}

/* ========================================
   Theme Transition
   ======================================== */

.synagogue-display.theme-transition {
    animation: themeChange 1s ease;
}

@keyframes themeChange {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1200px) {
    .synagogue-name {
        font-size: 2.5rem;
    }
    
    .current-time {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .display-main-content {
        grid-template-columns: 1fr;
    }
    
    .header-top {
        flex-direction: column;
        gap: 1rem;
    }
    
    .clock-section {
        text-align: center;
    }
    
    .hebrew-section {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .loading-overlay,
    .synagogue-notification,
    .keyboard-help,
    .slideshow-controls,
    .theme-selector {
        display: none !important;
    }
}
