/* General layout */

body {
  font-family: Arial, sans-serif;
  margin: 20px;
  background: #fafafa;
  color: #333;
}

h1 {
  text-align: center;
  margin-bottom: 18px;
}

/* Controls */

form {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

form input {
  padding: 8px;
  min-width: 220px;
}

form button {
  padding: 8px 10px;
  cursor: pointer;
}

/* Filters */

#filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0;
  flex-wrap: wrap;
}

#filters select {
  padding: 6px;
  border-radius: 4px;
}

/* Alphabet navigation */

#alphabet {
  text-align: center;
  margin-bottom: 16px;
}

#alphabet button {
  margin: 2px;
  padding: 6px 8px;
  border-radius: 4px;
  border: none;
  background: #e6e6e6;
  cursor: pointer;
}

#alphabet button:hover {
  background: #d1d1d1;
}

/* Recipe grid (side-by-side) */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
}

.card h3 {
  font-size: 1.05rem;
  margin: 10px 0 6px;
}

/* Buttons inside cards */

.card button {
  margin: 4px 6px;
  padding: 6px 8px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #f0f0f0;
}

.card .fav-btn.saved {
  background: #ffd86a;
}

/* Pagination */

#pagination {
  text-align: center;
  margin-top: 10px;
}

/* Modal */

.modal {
  display: none;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 18px;
  border-radius: 8px;
  max-width: 760px;
  width: 94%;
  max-height: 90%;
  overflow-y: auto;
}

.close {
  float: right;
  font-size: 1.4em;
  cursor: pointer;
}

/* Lifetime stats */

#lifetimeStats {
  margin: 14px auto;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  max-width: 720px;
}

#lifetimeStats h2 {
  margin-top: 0;
}

#lifetimeStats ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#lifetimeStats li {
  margin: 6px 0;
}

/* Calculator Widget Styles */

.calculator-widget {
  max-width: 320px;
  margin: 20px auto;
  background-color: #212529;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
  border: 1px solid #444;
}

.calc-display {
  background-color: #111;
  color: #fff;
  padding: 15px;
  border-radius: 8px;
  text-align: right;
  margin-bottom: 20px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  word-break: break-all;
  border: 1px solid #333;
}

.calc-prev {
  font-size: 0.85rem;
  color: #888;
  height: 1.2rem;
  margin-bottom: 5px;
}

.calc-curr {
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1;
}

.calc-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.calc-btn {
  background-color: #3a3f44;
  border: none;
  color: #fff;
  padding: 18px 0;
  font-size: 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
}

.calc-btn:hover {
  background-color: #4e555b;
  transform: translateY(-2px);
}

.calc-btn:active {
  background-color: #2c3135;
  transform: translateY(0);
}

.calc-op {
  background-color: #fd7e14;
  font-weight: bold;
}

.calc-op:hover {
  background-color: #e86b00;
}

.calc-func {
  background-color: #dc3545;
  font-size: 1rem;
}

.calc-func:hover {
  background-color: #c82333;
}

.calc-equals {
  background-color: #198754;
}

.calc-equals:hover {
  background-color: #157347;
}

.calc-zero {
  grid-column: span 1;
}

/* Fix Hero Image */

.clean-hero.tech {
  background-image: url("../../assets/img/tech/image4.jpg?h=0adc0de9a17a7caea6b8641f5d6ae02c");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.clean-hero.tech::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.clean-hero.tech .text {
  position: relative;
  z-index: 2;
}

