/* Global Styles */
body > * {
  border-radius: 1rem;
  -webkit-box-shadow: -6px 6px 12px 0px rgba(186, 186, 186, 0.8);
  -moz-box-shadow: -6px 6px 12px 0px rgba(186, 186, 186, 0.8);
  box-shadow: -6px 6px 12px 0px rgba(186, 186, 186, 0.8);
  text-wrap: balance;
  font-family: 'Arial', sans-serif;
}

body {
  background-color: #f4f4f9;
}

/* Header */
header {
  grid-area: header;
  background: linear-gradient(135deg, #ff7e5f, #feb47b);
  color: #fff;
  padding: 10px;
  text-align: center;
  text-transform: uppercase;
  align-self: center;
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

/* Nav */
nav {
  grid-area: nav;
  background-color: #333;
  color: #fff;
  width: 100%;
  position: relative;
  border-bottom: 1px solid #444;
}
.menu-icon {
  display: none;
  cursor: pointer;
  padding: 14px;
  color: white;
  background-color: #333;
  font-size: 22px;
}
nav ul {
  display: flex;
  justify-content: space-around;
  padding: 0;
}

nav ul li {
  list-style: none;
}

nav ul li a {
  display: block;
  color: #fff;
  padding: 10px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.3s, color 0.3s;
}

nav ul li a:hover {
  background-color: #feb47b;
  color: #333;
}

/* Main */
main {
  grid-area: main;
  background-color: #ffffff;
  padding: 20px;
  border-radius: 0 0 1rem 1rem;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

/* Article */
article {
  display: grid;
  grid-template-columns: 30% auto auto;
  grid-template-rows: 10% 1fr 15%;
  gap: 24px;
  grid-template-areas:
    "subheader subheader subheader"
    "figure text_main text_main"
    "footer footer footer";
}

.subheader {
  grid-area: subheader;
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
}

figure {
  grid-area: figure;
  display: flex;
  flex-direction: column;
  align-items: center;
}

figure img {
  border-radius: 50%;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.text_main {
  grid-area: text_main;
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
}

/* Section */
section {
  grid-area: section;
  background-color: #f7f7f7;
  padding: 15px;
  border-radius: 1rem;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.05);
}

/* Aside */
.aside {
  grid-area: aside;
  background-color: #e6e6e6;
  padding: 10px;
  border-radius: 1rem;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
  grid-area: footer;
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 15px;
  border-radius: 0 0 1rem 1rem;
  box-shadow: 0px -4px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive Styles */

/* Smartphones */
@media only screen and (max-width: 480px) {
  body {
    grid-template-areas:
      "header"
      "nav"
      "main"
      "footer";
  }

  article {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "subheader"
      "figure"
      "text_main"
      "footer";
  }
}

/* Tablets */
@media only screen and (min-width: 768px) and (max-width: 1223px) {
  body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "nav"
      "aside"
      "main"
      "footer";
  }

  article {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
}

/* Desktops */
@media only screen and (min-width: 1224px) {
  body {
    grid-template-columns: 1fr 3fr;
    grid-template-areas:
      "header header"
      "nav nav"
      "aside main"
      "footer footer";
  }

  article {
    grid-template-columns: 1fr 2fr;
  }
}
@media (min-width: 768px) {
  .nav ul {
      display: flex;
  }
}

@media (max-width: 767px) {
  .nav ul {
      display: none;
      flex-direction: column;
      background-color: #333;
  }

  .nav ul.show {
      display: flex;
  }

  .menu-icon {
      display: block;
      text-align: center;
  }

  .nav ul li {
      text-align: center;
      padding: 10px;
  }

  .nav ul li a {
      padding: 10px;
  }
}




.device-buttons {
  position: fixed;
  top: 50%;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateY(-50%);
}

.device-buttons button {
  padding: 10px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.device-buttons button.active {
  background-color: #ff7e5f;
}

.device-buttons button:hover {
  background-color: #feb47b;
}
