/**
 * Media CSS
 */

/* -----------------------------------

    1. Media Queries
    2. Print
    
----------------------------------- */

/**
 * 1. Media Queries _______________________________________________________________________________
 */

/* Extra small devices (watches, 420px and down) */
@media only screen and (max-width: 420px) {
  html {
    font-size: 48%;
  }
  nav {
    width: 80vw;
  }
  #site-name {
    display: none;
  }
  .share i {
    width: 3rem;
    height: 3rem;
    line-height: 3rem;
    margin: 0 1rem;
    font-size: 1rem;
  }
  /* Responsive for social icons */
  .social-icons-container i {
    font-size: 1.8rem;
    width: 4rem;
    height: 4rem;
    line-height: 4rem;
  }
  .social-icons-container {
    gap: 0.8rem;
  }
  /* Responsive for project list */
  .project-list-item {
    flex-direction: column; /* Stack image and content */
    align-items: flex-start; /* Align content to the start */
    width: 100%; /* Take full width of the grid column */
  }
  .project-list-item img {
    margin-bottom: 1rem;
    margin-right: 0; /* Remove right margin when stacked */
  }
  .project-list-item.feature-project-item {
    flex-direction: column; /* Stack content and button vertically */
    align-items: flex-start; /* Align content to the start */
    justify-content: flex-start; /* Align to top */
    padding: 1rem;
  }
  .project-list-item.feature-project-item .project-content {
    margin-bottom: 1rem; /* Space between content and button */
  }
  .project-list-item.feature-project-item button {
    align-self: flex-start; /* Align button to the start */
  }
  /* Responsive for swiper slide */
  .swiper-slide ul {
    grid-template-columns: 1fr; /* 1 column */
  }
}

/* Small devices (portrait tablets and phones, 600px and up) */
@media only screen and (min-width: 420px) and (max-width: 600px) {
  html {
    font-size: 54%;
  }
  nav {
    width: 80vw;
  }
  #site-name {
    display: none;
  }
  .share i {
    width: 4rem;
    height: 4rem;
    line-height: 4rem;
    margin: 0 1.4rem;
    font-size: 1.8rem;
  }
  /* Responsive for social icons */
  .social-icons-container i {
    font-size: 2.2rem;
    width: 5rem;
    height: 5rem;
    line-height: 5rem;
  }
  .social-icons-container {
    gap: 1rem;
  }
  /* Responsive for project list */
  .project-list-item {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  .project-list-item img {
    margin-bottom: 1rem;
    margin-right: 0;
  }
  .project-list-item.feature-project-item {
    flex-direction: column; /* Stack content and button vertically */
    align-items: flex-start; /* Align content to the start */
    justify-content: flex-start; /* Align to top */
    padding: 1rem;
  }
  .project-list-item.feature-project-item .project-content {
    margin-bottom: 1rem; /* Space between content and button */
  }
  .project-list-item.feature-project-item button {
    align-self: flex-start; /* Align button to the start */
  }
  /* Responsive for swiper slide */
  .swiper-slide ul {
    grid-template-columns: 1fr; /* 1 column */
  }
}

/* Medium devices (landscape tablets, 768px and down) */
@media only screen and (min-width: 600px) and (max-width: 768px) {
  html {
    font-size: 60%;
  }
  nav {
    width: 80vw;
  }
  .share {
    font-size: 2.6rem;
    letter-spacing: 1.4rem;
  }
  .share i {
    width: 5rem;
    height: 5rem;
    line-height: 5rem;
    margin: 0 2rem;
    font-size: 2.2rem;
  }
  /* Responsive for project list */
  .project-list-item {
    width: 100%;
  }
  /* Responsive for swiper slide */
  .swiper-slide ul {
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
  }
}

/**
 * 2. Print _______________________________________________________________________________
 */

@media print {
  *,
  *:before,
  *:after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }

  abbr[title]:after {
    content: " (" attr(title) ")";
  }

  a[href^="#"]:after,
  a[href^="javascript:"]:after {
    content: "";
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  thead {
    display: table-header-group;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  img {
    max-width: 100% !important;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
