@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

:root {
  --primary-color: #a855f7;
  --primary-color-dark: #9333ea;
  --secondary-color: #ca8a04;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --extra-light: rgba(255,255,255,0.9);
  --bg-color: #081b29;
  --second-bg-color:  #112e42;
  --text-color: #ededed;
  --main-color: #00abf0;
  --max-width: 1200px;
}

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

a {
  text-decoration: none;
}

body {
  font-family: "Poppins", sans-serif;
}

/* ================>  SPINNER */
.container{
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: white;
  height: 100vh;
  inset: 0px;
  z-index: 100;
  visibility: hidden;
  animation: spinner 1s linear;
}

.ring{
  width: 100px;
  height: 100px;
  border: 0px solid white;
  border-radius: 50%;
  position: absolute;
  visibility: hidden;
}

.ring:nth-child(1){
  border-bottom-width: 8px;
  border-color: #c90a4e;
  animation: rotate1 1s linear;
}

@keyframes rotate1{
  from{
      transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
      visibility: visible;
      opacity: 1;
  }
  to{
      transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
      visibility: hidden;
      opacity: 0;
  }
}

.ring:nth-child(2){
  border-right-width: 8px;
  border-color: var(--main-color);
  animation: rotate2 1s linear;
}

@keyframes rotate2{
  from{
      transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg);
      visibility: visible;
      opacity: 1;
  }
  to{
      transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg);
      visibility: hidden;
      opacity: 0;
  }
}

.ring:nth-child(3){
  border-top-width: 8px;
  border-color: rgb(0, 247, 13);
  animation: rotate3 1s linear;
}

@keyframes rotate3{
  from{
      transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg);
      visibility: visible;
      opacity: 1;
  }
  to{
      transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg);
      visibility: hidden;
      opacity: 0;
  }
}

@keyframes spinner {
  0% {
    visibility: visible;
    opacity: 0.9;
  }
  70% {
    visibility: visible;
    opacity: 0.9;
  }
  100% {
    visibility: hidden;
    opacity: 0;
  }
}

/* ===============> NAV */
nav {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: #ffffff;
  z-index: 99;
}

.nav__content {
  max-width: var(--max-width);
  margin: auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__content img{
  width: 200px;
  margin-right: 50px;
}


nav .checkbox {
  display: none;
}

nav input {
  display: none;
}
nav .checkbox i {
  font-size: 2rem;
  color: var(--main-color);
  cursor: pointer;
}

ul {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  transition: left 0.3s;
}

ul li a {
  padding: 0.5rem 1rem;
  border: 2px solid transparent;
  text-decoration: none;
  font-weight: 500;
  color: var(--text-dark);
  transition: 0.3s;
}

ul li a:hover {
  border-top-color: var(--main-color);
  border-bottom-color: var(--main-color);
  color: var(--main-color);
}


/* SECTION BANNER */
section{
    width: 100%;
}

section .banner_Img{
    width: 100%;
    height: 600px;
    object-fit: cover;
    animation: slide .5s linear forwards;
    transition: .5s all ease;
}

@keyframes slide{
    0%{
        transform: translateX(500px);
    }
    100%{
        transform: translateX(0px);
    }
}

/* SECTION CATEGORY */
.text{
  margin-top: 20px;
  text-align: center;
  position: relative;
}

.hr-lines:before{
  content:" ";
  height: 2px;
  width: 7%;
  background: black;
  display: block;
  position: absolute;
  top: 30%;
  left: 32%;
}

.hr-lines:after{
  content:" ";
  height: 2px;
  width: 7%;
  background: black;
  display: block;
  position: absolute;
  top: 30%;
  right: 32%;
}
article{
    width: 90%;
    height: auto;
    overflow: hidden;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 20px;
    margin: 30px auto 0 auto;
}

.article_category{
    width: 26%;
    height: 400px;
    position: relative;
    margin-bottom: 20px;
}

.article_data{
    width: 90%;
    background-color: hsl(0, 0%, 100%);
    border-radius: 20px;
    box-shadow: 0 8px 24px hsla(0, 0%, 0%, .15);
    padding: 1rem;
    position: absolute;
    bottom: -9rem;
    left: 0;
    right: 0;
    margin-inline: auto;
    opacity: 0;
}

.img_box{
    width: 100%;
    height: 300px;
    object-fit: cover;
    overflow: hidden;
    margin-bottom: 10px;
}

.img_box img{
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: all 1s linear;
}

.img_box img:hover{
    cursor: pointer;
    transform: scale(1.2);
    opacity: 0.5;
    border-radius: 20px;
}

/*   =================>   */

.card-articles{
  width: 90%;
  height: auto;
  overflow: hidden;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 20px;
  margin: 30px auto;
}

.card{
  position: relative;
  width: 30%;
  height: 300px;
  box-shadow: 1px 3px 8px #e2e2e2;
  margin-bottom: 20px;
}

.card .face{
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  overflow: hidden;
  transition: 0.7s ease;
  transform-style: preserve-3d;
}

.card .front{
  transform: perspective(600px) rotateY(0deg);
  width: 100%;
  height: 100%;
}

.card .front img{
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 15px 15px 10px 15px;
}

.card .back{
  width: 100%;
  position: absolute;
  transform: perspective(600px) rotateY(180deg);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card .back h2{
  text-align: center;
  font-size: 18px;
  padding: 10px;
  color: #6b7280;
}

.card .back h3{
  text-transform: uppercase;
  color: #00abf0;
  font-style: italic;
  font-size: 16px;
}

.card .back p{
  margin-top: 20px;
  font-weight: 600;
}

.card .back p:hover{
  color: #00abf0;
}

.card:hover .front{
  transform: perspective(600px) rotateY(180deg);
}

.card:hover .back{
  transform: perspective(600px) rotateY(0deg);
}

/* ====================================> SECTION POPUP */
.popup{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(0, 0, 0, .95);
  height: 100vh;
  width: 100%;
  z-index: 200;
  overflow: hidden;
  border-radius: 20px;
  transition: 1s;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.6s; 
  opacity: 0;
}

.popup.active{
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  
}

.popup.active .close-btn,
.popup.active .image-name,
.popup.active .index,
.popup.active .large-image,
.popup.active .active-data,
.popup.active .arrow-btn{
  opacity: 1;
   
}

.top-bar{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: #000;
  color: #fff;
  text-align: center;
  line-height: 50px;
  font-weight: 300;
}

.close-btn{
  position: absolute;
  top: 0;
  right: 15px;
  font-size: 60px;
  font-weight: bolder;
  cursor: pointer;
  color: #fff;
  z-index: 100;
  opacity: 0;
}

.close-btn:hover{
  cursor: pointer;
  animation: pulse 1s infinite;
  transition: .3s;
}

.arrow-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  opacity: 0;
  
}

.left-arrow{
  left: 10px;
}

.right-arrow{
  right: 10px;
}

.index{
  width: 30%;
  display: flex;
  gap: 5px;
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 18px;
  font-weight: 100;
  color: white;
  opacity: 0;
}

.large-image{
  width: 75%;
  height: 75%;
  object-fit: contain;
  margin-bottom: 30px;
  opacity: 0;
}

.text-largeImg{
  position: absolute;
  bottom: 50px;
  left: 0;
  width: 100%;
  height: 50px;
  /*background: #000;*/
  color: #fff;
  text-align: center;
  line-height: 50px;
  font-weight: 300;
}

.text-largeImg h2{
  font-size: 19px;
  height: 40px;
}


/* ======================> SECTION FOOTER */
footer{
    width: 100%;
    height: 230px;
    background-color: #081b29;
    padding:40px;
    margin-top: 10px;
}

.footer_icon{
    margin: 0 auto;
    padding: 20px;
    width: 100px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: .8rem;
}

i{
  color: white;
  background-color: #333;
  border-radius: 50%;
  font-size: 25px;
  padding: 15px;
}

i:hover{
  background-color: white;
  color: black;
  transition: .3s;
}

.footer_icon .icon:hover{
  cursor: pointer;
  animation: pulse 1s infinite;
  transition: .3s;
}


@keyframes pulse {
  0% { 
    transform: scale(1); 
  }
  70% { 
    transform: scale(.9); 
  }
  100% { 
    transform: scale(1);
  }
}

footer p{
  color: white;
  font-weight: 600;
  font-size: 17px;
  text-align: center;
  margin-top: 40px;
}

/* ====================> MEDIA QUERIES <=====================  */
@media (width < 1100px) {
    
  article, .card-articles{
    height: auto;
  }
    
  .article_category, .card{
      width: 46%;
      margin-bottom: 20px;
  }
}

@media (width < 900px) {  
  .hr-lines::before, .hr-lines:after{
    display: none;
  }
}

@media (width < 800px) {  
  .large-image{
    width: 95%;
    height: 95%;
  }
  
  .text-largeImg h2, .text-largeImg p{
    font-size: 16px;
  }
}

@media (width < 750px) {
    article, .card-articles{
        flex-direction: column;
        flex-wrap: wrap;
        height: auto;
    }

    .article_category, .card{
        margin: 0 auto 20px auto;
        width: 375px;
    }
}

@media (width < 475px) {
 
  .card{
      margin: 0 0 20px 0;
      width: 100%;
  }
}

@media (width < 1060px) {
  nav .checkbox {
    display: block;
  }

  ul {
    position: absolute;
    width: 100%;
    height: calc(100vh - 85px);
    left: -100%;
    top: 84px;
    background-color: var(--extra-light);
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
  }

  nav #check:checked ~ ul {
    left: 0;
  }

  ul li a {
    font-size: 1.25rem;
  }
}















