* { margin:0; padding:0; box-sizing:border-box; direction:rtl; font-family:David, "Times New Roman", Times, serif;/*:Verdana, Arial, Helvetica, sans-serif;*/ }
html { background:#CEEEED url(../images/background-header-01.png) repeat-x top; height:100%; }

body { height:100%; }
.fr_fullscreen{float: right;}
.fl_fullscreen{float: left;}
a { color:#5F4A38; }
a:hover { text-decoration:none; color:#D0BF61; }

#global { min-height:480px; width:100%; height:100%; background:url(../images/background-header-02.png) repeat-x 0 200px; }
#width { width:100%; max-width:980px; margin:0 auto; padding-bottom:60px; }
header { text-align:center; }
header img { display:inline-block; max-width:50%; }
header #yeled { margin:10px; float:left; width:330px; max-width:40%; }
header #hamelamed { margin:10px; float:right; }
header #sentence-line { margin:10px; float:right; }

footer { background:url(../images/footer.png) repeat-x top; position:relative; height:80px; width:100%; text-align:center; padding-top:38px; font-size:0.8em; color:#857957; }

nav { display:inline-block; }
nav a { height:50px; display:inline-block; margin:0 10px; }
nav a:first-child { margin:0 0 0 10px; }
nav a:last-child { margin:0 10px 0 0; }

nav a { background:url(../images/items-menu.png) 146px 0; width:140px; }
nav a#how { background:url(../images/items-menu.png) 406px 0; width:200px; }
nav a#links { background:url(../images/items-menu.png) 938px 0; width:133px; }
nav a#donation { background:url(../images/items-menu.png) 593px 0; width:120px; }
nav a#contact { background:url(../images/items-menu.png) 768px 0; width:118px; }

nav a:hover { background:url(../images/items-menu.png) 147px 50px; }
nav a#how:hover { background:url(../images/items-menu.png) 407px 50px; }
nav a#links:hover { background:url(../images/items-menu.png) 939px 50px; }
nav a#donation:hover { background:url(../images/items-menu.png) 594px 50px; }
nav a#contact:hover { background:url(../images/items-menu.png) 769px 50px; }

nav a.active { background:url(../images/items-menu.png) 146px 100px; }
nav a#how.active { background:url(../images/items-menu.png) 406px 100px; }
nav a#links.active { background:url(../images/items-menu.png) 938px 100px; }
nav a#donation.active { background:url(../images/items-menu.png) 593px 100px; }
nav a#contact.active { background:url(../images/items-menu.png) 768px 100px; }

a.ex { float:left; margin:10px 20px 20px 0; border:1px solid #CEEEED; }
a.ex:hover { border:1px solid #857957; }

content { margin:20px 20px; display:block; color:#8B0000; min-height:300px; text-align:center; }
content h1 { font-size:1.6em; text-align:center; margin:1em auto; }
content h2 { font-size:1.2em; text-align:right; }
content h3 {font-size:1.2em;text-align:right;margin-bottom: 25px;}
content p { font-size:1.1em; margin:10px 0; text-align:right; }
content ul { font-size:1.1em; width:48%; min-width:280px; display:inline-block; vertical-align:top; padding:10px 20px; margin:0; text-align:right; }

legend { font-size:1.2em; margin:10px; border-radius:15px; border:solid 1px #857957; text-align:center; padding:10px; display:inline-block }

form.paypal { margin:20px; }

/* div.parasha { display:inline-block; direction:rtl; padding:6px 80px 6px 8px; background:url(../images/parashiot/parashat.png) no-repeat right #fff; border:2px solid #3C5C70; border-radius:30px; margin:10px auto 20px; } */

div.parasha {
    display: flex; /* Use regular flex instead of inline-flex */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    width: fit-content; /* Only take the width needed */
    direction: rtl;
    padding: 12px 40px 6px 40px;    /* Use equal padding on both sides */
    background: url(../images/parashiot/parashat.png) no-repeat right #fff;
    border: 2px solid #3C5C70;
    border-radius: 30px;
    margin: 10px auto 20px;
}

div.parasha img {
    display: block;
    max-width: 100%;
    height: auto;
}

content div.links ul { font-size:1em; display:inline-block; width:45%; min-width:0; padding:10px 15px 10px 0; margin:0 10px 0 0; text-align:right; }
div.links li { list-style-image:url(../images/ex-sm.png); line-height:28px; }

content div.newsletter_box { font-size:0.8em;min-width:0; padding:10px 20px; margin:0 20px; text-align:right; }
content div.newsletter_box #newsletterForm fieldset {border:0 hidden; }


form#contactForm { border-radius:15px; padding:20px; border:1px solid #857957; background:#fff; margin:10px; }
form#contactForm fieldset { border:0 hidden; }
form#contactForm fieldset textarea, form#contactForm fieldset input:not([type="image"]) { width:100%; border-radius:5px; height:2em; border-color:#CCC; border-style:solid; border-shadow:#666; padding:0 4px; font-size:1.2em; }
form#contactForm fieldset div { margin:6px; }
form#contactForm fieldset textarea { height:7em; }
form#contactForm fieldset input[type="image"] { margin:1em auto; }
form#contactForm fieldset div label.error { color:#FF0000; margin:2px auto 6px; }

.form-index #newsletter-mail{float: right; width: 300px; height: 2em;}
.form-index .submit_btn{float: left; position: relative; bottom: 5px;}

@media screen and (min-width: 1024px) {
body { background:url(../images/background-side.jpg) no-repeat 0 380px; }
form#contactForm { width:50%; }
legend.legendFrame { max-width:100%; }
}

@media screen and (max-width: 980px) {
nav a { margin:0 4px; }
nav a:first-child { margin:0 0 0 4px; }
nav a:last-child { margin:0 4px 0 0; }
legend.legendFrame { max-width:100%; }
.fr_fullscreen{float: none; margin: 0 auto;}
.fl_fullscreen{float: none; margin: 0 auto; margin-top: 30px;}

}

@media screen and (max-width: 480px) {
a.ex { float:none; margin:10px auto; }
legend.legendFrame { max-width:100%; }
}

@media screen and (max-width: 380px) {
header #yeled { max-width:35%; }
nav a { margin:0 20px; display:block; }
nav a:first-child { margin:0 20px; }
nav a:last-child { margin:0 20px; }
legend.legendFrame { max-width:100%; }
}
