:root {
  /* Primary Colors */
  --red: hsl(0, 78%, 62%);
  --cyan: hsl(180, 62%, 55%);
  --orange: hsl(34, 97%, 64%);
  --blue: hsl(212, 86%, 64%);

  /* Neutral Colors */
  --grey-500: hsl(234, 12%, 34%);
  --grey-400: hsl(212, 6%, 44%);
  --white: hsl(0, 0%, 100%);

  /* Typography */
  --font-family: "Poppins";
}

body{
    font-family: var(--font-family);
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 30px;
}

main p {
    color: var(--grey-400);
    font-size: 22px;
    text-align: center;
    font-weight: 200;
    margin-bottom: -1rem;
}

main h1 {
   color: var(--grey-500);
   text-align: center;
   font-weight: 600;
   margin-bottom: 1rem;
}

main h2 {
    color: var(--grey-500);
    font-weight: 400;
    font-size: 12px;
    margin-bottom: 2rem;
    text-align: center;
}

.container{
    background-color: var(--white);
    box-sizing: border-box;
    margin-bottom: 4rem;
    padding: 0px 30px 40px 30px;
    border-top: 4px solid;
    border-bottom: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.container:hover {
    transform: scale(1.1);
}

.container h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--grey-500);
    margin-bottom: -5px;
}

.container p {
    font-size: 12px;
    font-weight: 400;
   color:  var(--grey-400);
   margin-bottom: 2rem;
}

.container:nth-last-of-type(4) {
    border-top-color: var(--cyan);
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.container:nth-last-of-type(3) {
    border-top-color: var(--red);
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.container:nth-last-of-type(2) {
    border-top-color: var(--orange);
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.container:nth-last-of-type(1) {
    border-top-color: var(--blue);   
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.container img {
    margin-left: auto;
    display: block;
    margin-bottom: 1rem;
}

.attribution { 
    font-size: 11px; 
    text-align: center; 
}

.attribution a {
     color: var(--blue); 
}

.attribution a:hover {
    color: var(--orange);
}


/* Desktop layout */
@media (min-width: 900px) {
    body{
        max-height: 600px;

    }
    main h2{
        width: 500px;
        text-align: center;
    }

    section {
         display: grid;
        align-items: center;
         justify-content: center;
         grid-template-columns: repeat(3, 1fr);
         grid-template-rows: repeat(4, 1fr);
         gap: 1.5rem;
        max-height: 500px; 
}

.container{
    width: 290px;
     margin: 0 auto;
     height: 200px;
    }

.container:nth-child(1) {
    grid-row: 2 / 4;
}

 .container:nth-child(2) {
     grid-column: 2;
     grid-row: 1 / 3;

}

.container:nth-child(3) {
     grid-column: 2;
     grid-row: 3 / 5;
}

 .container:nth-child(4) {
        grid-row: 2 / 4;
    }
}