/* styles.css */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  text-align: center;
  background-color: #fff;
  color: #000;
}

header {
  padding: 0;
  background-color: #2c2c2c;
}

.logo {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 10px;
}

.hebrew-header {
  font-size: 1.5em;
  font-weight: bold;
  direction: rtl;
  font-family: 'Frank Ruhl Libre', 'Noto Sans Hebrew', serif;
  margin: 0 auto 20px;
  color: #d4af37;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
  max-width: 90%;
  padding: 0 10px;
}

/* NAVIGATION */
.main-nav {
  background-color: #f9f4e6;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  position: relative;
  flex-wrap: wrap;
  justify-content: center;
}

.menu {
  list-style: none;
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 0;
  padding: 0;
  align-items: center;
}

.menu a.active {
  font-weight: bold;
  color: #0074cc;
}

.menu li a {
  text-decoration: none;
  font-weight: bold;
  color: #333;
  font-family: 'Lato', sans-serif;
}

.menu li a:hover {
  color: #d4af37;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: #333;
  cursor: pointer;
}

/* MAIN */
main {
  padding: 20px;
}

.editor-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

.editor-content table {
  width: auto;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
}

.dvar-torah {
  list-style: none;
  padding: 0;
  text-align: center;
}

.dvar-torah li {
  margin: 16px 0;
  cursor: pointer;
  transition: color 0.3s;
}

/* FOOTER */
footer {
  background-color: #2c2c2c;
  color: white;
  padding: 20px 10px;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

footer ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

footer ul li a:hover {
  text-decoration: underline;
}

footer .bottom-sponsor {
  color: #d4af37;
  text-decoration: none;
  font-size: 0.8em;
}

/* CONTACT FORM STYLING */
#cont {
  max-width: 600px;
  margin: 40px auto;
  padding: 20px;
  background-color: #f9f4e6;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#cont h4 {
  margin-bottom: 20px;
  color: #b30000;
}

.row {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
  text-align: left;
}

.col_lbl {
  font-weight: bold;
  margin-bottom: 5px;
  color: #333;
}

.col_txt {
  padding: 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  transition: border-color 0.2s ease-in-out;
}

.col_txt:focus {
  border-color: #d4af37;
  outline: none;
  box-shadow: 0 0 3px #d4af37;
}

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

/* ERROR STYLING */
.err_frm {
  color: red;
  font-weight: bold;
}

.col_lbl.err,
input.col_txt.err,
textarea.col_txt.err,
select.col_txt.err {
  color: red;
  border-color: red;
}

/* BUTTONS */
#buttons {
  text-align: center;
}

#submit {
  background-color: #2c2c2c;
  color: #fff;
  border: none;
  padding: 12px 25px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease-in-out;
}

#submit:hover {
  background-color: #444;
}

.success-message {
  color: #2c662d;
  background-color: #dff0d8;
  border: 1px solid #c3e6cb;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 20px;
}

/* MOBILE */
@media (max-width: 768px) {
  .main-nav {
    justify-content: space-between;
  }

  .menu {
    display: none;
    flex-direction: column;
    align-items: center;
    background-color: #f9f4e6;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 1000;
    padding: 10px 0;
  }

  .menu.open {
    display: flex;
  }

  .menu.open li a:hover,
  .menu.open li a:focus,
  .menu.open li a:active {
    color: #d4af37;
  }

  .menu-toggle {
    display: block;
  }
}

@media (min-width: 769px) {
  .menu {
    display: flex !important;
    flex-direction: row;
    position: static;
  }
}

@media (max-width: 600px) {
  .editor-content {
    overflow-x: auto;
  }

  #cont {
    padding: 15px;
  }

  .col_txt {
    font-size: 1em;
  }

  footer ul {
    flex-direction: column;
  }
}
