@import url('/fonts/fonts.css');
:root {
    --primary-bg: #f5f0e8;
    --text-color: #1a3a5c;
    --accent-color: #2c6e8a;
    --border-color: #4a90a8;
    --gold-accent: #c5a059;
}

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

body {
    font-family: 'Amiri', serif;
    background: linear-gradient(135deg, #e8f4f8 0%, #d0e8f0 50%, #c8e0e8 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    direction: rtl;
}

.container {
    background: linear-gradient(to bottom, #faf8f5, #f5f0e8);
    max-width: 900px;
    width: 100%;
    padding: 50px 60px;
    border-radius: 15px;
    box-shadow: 
        0 0 0 3px var(--border-color),
        0 0 0 6px #e8f4f8,
        0 0 0 9px var(--accent-color),
        0 15px 40px rgba(44, 110, 138, 0.3);
    position: relative;
}

.inner-border {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    pointer-events: none;
    opacity: 0.4;
}

.corner-decoration {
    position: absolute;
    width: 35px;
    height: 35px;
    border: 3px solid var(--accent-color);
    opacity: 0.7;
}

.corner-decoration.top-left {
    top: 25px;
    left: 25px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 12px;
}

.corner-decoration.top-right {
    top: 25px;
    right: 25px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 12px;
}

.corner-decoration.bottom-left {
    bottom: 25px;
    left: 25px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 12px;
}

.corner-decoration.bottom-right {
    bottom: 25px;
    right: 25px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 12px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
}

.top-nav {
    position: absolute;
    top: 35px;
    right: 35px;
    display: flex;
    gap: 15px;
}

.top-nav a {
    color: var(--accent-color);
    text-decoration: none;
    font-family: 'Frank Ruhl Libre', serif;
    font-size: 0.95rem;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.top-nav a:hover {
    background: var(--accent-color);
    color: white;
}

.book-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), #1a5a70);
    color: white;
    padding: 5px 20px;
    border-radius: 20px;
    font-family: 'Frank Ruhl Libre', serif;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

h1 {
    font-family: 'Frank Ruhl Libre', serif;
    color: var(--text-color);
    font-size: 2.8rem;
    font-weight: 700;
    margin: 15px 0;
    text-shadow: 1px 1px 2px rgba(44, 110, 138, 0.1);
}

.divider {
    margin: 15px 0;
}

.divider span {
    color: var(--accent-color);
    font-size: 1.8rem;
}

.chapter-content {
    padding: 20px 0;
}

.verse {
    font-size: 1.35rem;
    line-height: 2.2;
    margin-bottom: 12px;
    text-align: justify;
    color: #2a2a2a;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.verse:hover {
    background-color: rgba(44, 110, 138, 0.08);
}

.verse-num {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-color), #1a5a70);
    color: white;
    border-radius: 50%;
    font-family: 'Frank Ruhl Libre', serif;
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 12px;
}

.holy-name {
    color: var(--accent-color);
    font-weight: 700;
}

.footer {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
    text-align: center;
    font-family: 'Frank Ruhl Libre', serif;
    color: #5a7a8a;
    font-size: 0.95rem;
}

.footer p {
    margin: 8px 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--accent-color);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    background: var(--accent-color);
    color: white;
}

.ai-disclaimer {
    font-size: 0.8rem;
    color: #7a8a90;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    line-height: 1.6;
}

.hazak, .siyum-text {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin: 30px 0 20px;
    font-family: 'Frank Ruhl Libre', serif;
}

/* Focus styles for accessibility */
a:focus-visible, button:focus-visible, .chapter-link:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(44, 110, 138, 0.4);
}

/* Mobile styles */
@media (max-width: 600px) {
    .top-nav {
        position: static;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .container {
        padding: 30px 25px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .verse {
        font-size: 1.15rem;
        padding: 6px 10px;
    }
    
    .verse-num {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .footer {
        padding: 10px 15px;
        font-size: 0.8rem;
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 10px;
        margin: 8px 0;
    }
    
    .footer-links a {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .ai-disclaimer {
        font-size: 0.7rem;
        margin-top: 8px;
        padding-top: 8px;
    }
}

