/*----------------------------------------
  RESET & GLOBALS
----------------------------------------*/
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #ff6f61;
  --secondary-color: #333;
  --bg-color: #f9f9f9;
  --text-color: #444;
  --form-bg: #fff;
  --card-bg: #fff;
  --radius: 5px;
  --transition: 0.3s ease;
  --font: 'Helvetica Neue', Arial, sans-serif;
}

body {
  font-family: var(--font);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  min-height: 100vh;
}

#login {
  background: url("images/a.jpg") center/cover no-repeat fixed;
  overflow: hidden;
}

img {
  display: block;
  width: 100%;        /* fill its container’s width */
  height: auto;       /* preserve aspect ratio */
  object-fit: cover;  /* crop if container’s aspect ratio differs */
}

/*----------------------------------------
  TYPOGRAPHY
----------------------------------------*/
h1, h2, h3 {
  color: var(--secondary-color);
  margin-bottom: 0.5em;
}

p, label {
  margin-bottom: 0.75em;
  display: block;
}

/*----------------------------------------
  LINKS & BUTTONS
----------------------------------------*/
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: darken(var(--primary-color), 10%);
  text-decoration: underline;
}

button, .view-btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.6em 1.2em;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  text-align: center;
}

button:hover, .view-btn:hover {
  background-color: #e65b50;
}

/*----------------------------------------
  FORMS
----------------------------------------*/
form {
  background-color: var(--form-bg);
  padding: 1.5em;
  border-radius: var(--radius);
}

.form-group {
  margin-bottom: 2em;
}

input[type="text"],
input[type="password"],
select,
textarea {
  margin-bottom: 1.5em;
  width: 100%;
  padding: 0.6em;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: 1em;
  transition: border var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-color);
  outline: none;
}

/*----------------------------------------
  AUTH PAGE
----------------------------------------*/
.auth-container {
  max-width: 380px;
  margin: 4em auto;
  padding: 2em;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.auth-container h1 {
  text-align: center;
  margin-bottom: 1em;
}

.auth-container > div {
  transition: opacity 0.3s ease;
}

.auth-container .hidden {
  display: none;
  opacity: 0;
}

/*----------------------------------------
  HEADER & NAV
----------------------------------------*/
header {
  background: #fff;
  padding: 1em 2%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-bottom: 1.5em;
  gap: 1rem;
}

nav {
  display: flex;
  justify-content: flex-end;
  gap: 1.5em;
}

nav a {
  font-weight: 500;
}

.site-brand {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-brand img {
  max-height: 1.5rem;  /* or e.g. 24px, 32px—whatever fits your bar */
  width: 1.5rem;         /* maintain aspect ratio */
  display: block;      /* remove any inline gaps */
  object-fit: contain;
}

.welcome {
  margin: 1rem auto;
  padding: 1.5rem 2rem;
  font-size: 1.25rem;
  background-color: var(--primary-color);
  color: #fff;
  text-align: center;
}


/*----------------------------------------
  SEARCH & GRID (Overview)
----------------------------------------*/
.search-bar {
  width: 90%;
  max-width: 600px;
  margin: 0 auto 1.5em;
  display: flex;
  gap: 0.5em;
}
.search-bar input {
  flex: 1;
}

.restaurant-grid {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto 2em;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5em;
}

.restaurant-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: center;
  padding-bottom: 1em;
}
.restaurant-card img {
  width: 100%;
  display: block;
  object-fit: cover;
  height: 250px;
}
.restaurant-card h2 {
  margin: 0.8em 0 0.4em;
}
.restaurant-card p {
  font-size: 0.95em;
  color: #666;
}

/*----------------------------------------
  DETAIL PAGE
----------------------------------------*/
.details-container {
  width: 90%;
  max-width: 800px;
  margin: 0 auto 2em;
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

.info p {
  margin-bottom: 0.3em;
}

.gallery {
  display: flex;
  gap: 0.5em;
  overflow-x: auto;
}

.ratings-summary table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.8em;
}
.ratings-summary th,
.ratings-summary td {
  padding: 0.6em;
  border: 1px solid #ddd;
  text-align: left;
}
.ratings-summary th {
  background: #f3f3f3;
}

.reviews .review-card {
  background: #fff;
  padding: 1em;
  margin-bottom: 1em;
  border-left: 4px solid var(--primary-color);
}
.review-card small {
  display: block;
  margin-top: 0.6em;
  color: #999;
}

/*----------------------------------------
  REVIEW FORM PAGE
----------------------------------------*/
.review-form-container {
  max-width: 500px;
  margin: 2em auto;
}
fieldset {
  border: 1px solid #ccc;
  padding: 1em;
  border-radius: var(--radius);
  margin-bottom: 1em;
}
legend {
  padding: 0 0.5em;
  font-weight: bold;
}

/*----------------------------------------
  RESPONSIVE ADJUSTMENTS
----------------------------------------*/
@media (max-width: 768px) {
  .details-container {
    padding: 0 1em;
  }
  nav {
    justify-content: center;
    flex-wrap: wrap;
  }
  .search-bar {
    flex-direction: column;
  }
}

/*----------------------------------------
  SETTING
----------------------------------------*/

/*----------------------------------------
  OTHER?
----------------------------------------*/
#snackbar {
  visibility: hidden;
  min-width: 250px;
  background-color: #333;
  color: #fff;
  padding: 16px;
  border-radius: 4px;
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

#snackbar.show {
  visibility: visible;
  opacity: 1;
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 30px; opacity: 1;}
}

@keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 30px; opacity: 1;}
}

@-webkit-keyframes fadeout {
  from {bottom: 30px; opacity: 1;}
  to {bottom: 0; opacity: 0;}
}

@keyframes fadeout {
  from {bottom: 30px; opacity: 1;}
  to {bottom: 0; opacity: 0;}
}