/* CSS */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* page */
body {
  font-family: Arial, sans-serif;
  line-height: 1.5;
  color: #111;
  background-color: #f4f4f4;
  padding: 0 1rem;
}

main,
header,
footer {
  max-width: 1200px;
  margin: 0 auto;
}

/* header & nav */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
}

header img {
  max-width: 150px;
  height: auto;
}


header nav {
  flex: 1;         
  display: flex;    
}


.nav {
  list-style: none;
  display: flex;
  justify-content: space-evenly; 
  align-items: center;
  width: 100%;
  padding: 0;
  margin: 0;
}

.nav li a {
  text-decoration: none;
  color: #111;
  font-weight: bold;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;

  background-color: #fff;     
  border: 1px solid #111;     
}

.nav li a:hover {
  background-color: #111;      
  color: #fff;                
}

.nav li a:focus {
  outline: 3px solid #ffbf47;   
  outline-offset: 2px;
  background-color: #111;
  color: #fff;
}

/* hero */
.hero {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1rem;
  margin-bottom: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

button,
.hero button,
.form-group button[type="submit"] {
  background-color: #111;    
  color: #fff;               
  border: 2px solid #111;    
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
}


button:hover,
.hero button:hover,
.form-group button[type="submit"]:hover {
  background-color: #333;    
  border-color: #333;
  color: #fff;
}

button:focus,
.hero button:focus,
.form-group button[type="submit"]:focus {
  outline: 3px solid #ffbf47; 
  outline-offset: 3px;
}


/* about */
#about {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 2rem;
  padding: 3rem 1.5rem;  
  color: #fff;

  background-image: url("https://images.unsplash.com/photo-1530406472580-81dc39c4babe?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=846");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;    
  background-color: #000;      
  min-height: 80vh;          
}


/* services */
#services {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
}

#services h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
}

/* 3-columns pc */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-grid article h3 {
  font-size: 1.125rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.service-grid article p {
  font-size: 1rem;
  line-height: 1.4;
}

/* contact */
#contact {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
}

#contact h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: #000;
}

/* form */
form {
  max-width: 400px;
  background-color: #fff;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form-group label {
  font-weight: bold;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  color: #222;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid #aaa;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.4;
}

.form-group input,
.form-group textarea {
  background-color: #fff;
  color: #111;
  border: 1px solid #444;  /
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 3px solid #ffbf47; 
  outline-offset: 2px;
  border-color: #ffbf47;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group button[type="submit"] {
  background-color: #111;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  width: 100%;
}

/* footer */
footer {
  text-align: center;
  padding: 1rem 0 3rem;
  color: #555;
  font-size: 0.9rem;
}

/* Mobile phone (600px) */
@media (max-width: 600px) {

  body {
    padding: 0 0.75rem;
  }

  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  header img {
    max-width: 70px;
  }

  .nav {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }

  .nav li a {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    display: block;
  }

  .hero {
    text-align: left;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  /* services: 1 column */
  .service-grid {
    grid-template-columns: 1fr;
  }

  #services h2,
  #about h2,
  #contact h2 {
    font-size: 1.25rem;
  }

  form {
    width: 100%;
  }

  footer {
    font-size: 0.8rem;
  }
}
