/* Flexbox Transitions Styles - Practical Application */

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f7f7f7;
  color: #333;
}

header {
  background-color: #c8b3ee;
  color: #fff;
  padding: 1rem;
  text-align: center;
  transition: background-color 0.5s ease;
}

header:hover {
  background-color: #a58cd9;
}

.desktop-nav ul {
  display: flex;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.desktop-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem 1rem;
  transition: color 0.4s ease-in-out, border-bottom 0.4s ease-in-out;
  border-bottom: 2px solid transparent;
}

.desktop-nav a:hover {
  color: #d2b48c;
  border-bottom: 2px solid #d2b48c;
}

.container {
  display: flex;
  flex-wrap: wrap;
  padding: 2rem;
  gap: 2rem;
}

.sidebar {
  flex: 1 1 20%;
  background-color: #d2e5d2;
  padding: 1rem;
  transition: transform 0.3s ease-in-out;
}

.sidebar:hover {
  transform: translateX(10px);
}

.main-content {
  flex: 1 1 70%;
  background-color: #fff;
  padding: 1rem;
  transition: background-color 0.3s ease-in-out;
}

.main-content:hover {
  background-color: #f0f0f0;
}

.card {
  background-color: #c8b3ee;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 8px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition-delay: 0.1s;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #9ababb;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease-in-out, transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.button:hover {
  background-color: #7fa5a5;
  transform: scale(1.1);
  transition-delay: 0.2s;
}

.image-container {
  width: 100%;
  overflow: hidden;
  transition: opacity 0.5s ease-in;
}

.image-container:hover img {
  transform: scale(1.05);
  opacity: 0.9;
}

img.transition-img {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease, opacity 0.4s ease;
  display: block;
}

input[type="text"] {
  padding: 0.5rem;
  border: 2px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus {
  border-color: #c8b3ee;
  box-shadow: 0 0 5px #c8b3ee;
}

footer {
  text-align: center;
  padding: 1rem;
  background-color: #c8b3ee;
  color: #fff;
  margin-top: 2rem;
  transition: background-color 0.3s ease;
}

footer:hover {
  background-color: #a58cd9;
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .sidebar,
  .main-content {
    flex: 1 1 100%;
  }
}
