/* ============================= Variables Globales ============================= */
:root {
  --primary-color: #29a2ef;
  --secondary-color: #d1d1d1;
  --hover-color: #12c52a;
  --text-color: #333;
  --secondary-text-color: #666;
  --background-color: #f4f4f4;
  --card-background: #fff; /*  # e8e8e8 */
  --shadow-color: rgba(0, 0, 0, 0.1);
  --gradient-start: rgba(0, 0, 0, 1);
  --gradient-end: rgba(0, 0, 0, 0);
  --footer-bg: rgba(255, 255, 255, 0.8);
  --icon-color: #007bff;
}

/* =============================  General rules  ============================= */
html {
  *::-webkit-scrollbar,
  ::-webkit-scrollbar-track-piece,
  *::-webkit-scrollbar-track,
  ::-webkit-scrollbar-corner,
  *::-webkit-scrollbar:horizontal,
  *::-webkit-scrollbar-button {
    background-color: transparent;
    color: transparent;
    display: none;
  }
  *::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border-radius: 1rem;
  }
}

/* ===========================================================  Intro ===================================== */

@media screen and (max-width: 980px) {
  .spotlight .image {
    display: none;
  }
}
p {
  margin: 0;
}
a i {
  font-size: 2rem;
}
.intro {
  margin-bottom: 2vh;
}

/* =========================================================  Form for Intro ========================== */
.highlight {
  font-weight: bold;
}
form .form-group {
  margin-bottom: 20px;
}

/* =========================================================  Icon Style Intro ========================== */

header .fa-github,
header .fa-linkedin,
header .fa-download {
  font-size: 50px;
  margin: 20px 20px;
  border-bottom: none;
}

/* =========================================================  BTS ======================= */
.specialties {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 4vw;
  margin-top: 20px;
}

.specialty {
  text-align: center;
  div {
    margin-bottom: 20px;
    height: 300px;
    box-shadow: 0 4px 8px var(--shadow-color);
  }
}

/*===============================================   Image Logo  ==============================*/

.image__logo {
  border-radius: 50%;
}

/*=====================================================================  Projects Section  ================================*/
.gallery {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
  margin-bottom: 100px;
}

.project-card {
  background-color: var(--background-color);
  padding: 20px;
  width: 300px;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 8px var(--shadow-color);
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-card .icon {
  font-size: 3em;
  margin-bottom: 10px;
  color: var(--icon-color);
}

.project-card h3 {
  margin: 15px 0;
  font-size: 1.5em;
  color: var(--text-color);
}

.project-card p {
  color: var(--secondary-text-color);
}

.button {
  font-weight: bold;
}

.primary {
  background-color: var(--primary-color) !important;
  transition: background-color ease 1s;
}
.primary:hover {
  background-color: var(--hover-color) !important;
}

/*====================== Card ============================*/
.card {
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  height: 200px;
  box-shadow: 0 4px 6px var(--shadow-color);
  position: relative;
}

.card-image {
  height: 100%;
  object-fit: cover;
  width: 100%;
  display: block;
  z-index: 1;
  transition: transform 0.8s ease;
  transform-origin: center;
}
.card-image:hover {
  transform: scale(1.1);
}
.card-shadow::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 2;
  background: linear-gradient(
    360deg,
    var(--gradient-start),
    var(--gradient-end)
  );
  pointer-events: none;
}

/* ==================================  Particles Section  ========================= */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
}

/*======================================== Veille Technologique Section ==================================*/
.veille-wrapper {
  display: flex;
  flex-direction: column;
  margin-top: 10vh;
  gap: 10vh;
}

.veille {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.veille-wrapper .veille:nth-child(even) {
  flex-direction: row-reverse;
}

.img {
  flex: 1 1 50%;
  min-width: 300px;
  max-width: 600px;
  height: auto;
  img {
    max-width: 100%;
  }
}

.veille--text1,
.veille--text2,
.veille--text3,
.veille--text4 {
  flex: 1 1 20%;
  min-width: 300px;
  padding: 20px;
  color: var(--text-color);
  background-color: var(--footer-bg);
  border-radius: 5px;
}

/*======================================== Footer Section ==================================*/
#map {
  height: 280px;
  width: 100%;
  border-radius: 10px;
  margin-bottom: 3vh;
}

#footer {
  margin: 0;
  width: 100%;
  justify-content: space-between;
  margin-top: 2vh;
  border-radius: 10px;
  backdrop-filter: blur(5px);
}

#footer > * {
  margin-left: 0;
}

/* ========================= Generic Section ========================================= */
.main > .card {
  height: 500px;
}

.main > p {
  font-size: 25px;
  margin: 3vh 0;
  color: var(--text-color);
}

#langs {
  width: 100%;
}

/*=================================== Carousel ==============================*/
.carousel {
  position: relative;
  pointer-events: none;
  width: 100%;
  padding: 1% 1%;
  box-sizing: border-box;
  overflow: hidden;
  margin: 20px auto;
}

.carousel-track {
  display: flex;
  width: auto;
  flex-direction: row;
  gap: 1%;
  animation: scroll-left 20s linear infinite;
}

.c_card {
  min-width: 19.2%;
  box-sizing: border-box;
  padding: 20px;
  text-align: center;

  /*
  background-color: var(--card-background);
  border-radius: 10px;
  box-shadow: 0 4px 6px var(--shadow-color);

  */
}

.c_card img {
  max-width: 100px;
  margin-bottom: 15px;
}

.c_card h3 {
  font-size: inherit;
  font-weight: bold;
  color: var(--text-color);
}

/* Animación */
@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
/* ===========================================Estilos para la galería de GitHub =========================*/
/* Animaciones generales */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilos para la sección #projects */
#projects {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px; /* Espaciado interno */
  overflow: hidden; /* Evita problemas de desbordamiento durante las animaciones */
}

#projects h3 {
  align-self: flex-start;
  margin-bottom: 20px;
  font-size: 2rem;
  color: var(--text-color); /* Usa variables globales si están definidas */
  animation: fadeIn 0.8s ease-out forwards; /* Animación para el título */
}

/* Estilos para las tarjetas de proyectos */
.project-card {
  background-color: var(--background-color);
  padding: 20px;
  width: 300px;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 8px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* Transición suave para hover */
  opacity: 0; /* Inicialmente oculto */
  transform: translateY(20px); /* Comienza ligeramente desplazado hacia abajo */
  animation: fadeIn 0.8s ease-out forwards; /* Animación para las tarjetas */
}

.project-card:hover {
  transform: translateY(-10px); /* Efecto de elevación al pasar el ratón */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Sombra más pronunciada */
}

/* Animación escalonada para las tarjetas */
.project-card:nth-child(1) {
  animation-delay: 0.2s;
}
.project-card:nth-child(2) {
  animation-delay: 0.4s;
}
.project-card:nth-child(3) {
  animation-delay: 0.6s;
}
.project-card:nth-child(4) {
  animation-delay: 0.8s;
}
.project-card:nth-child(5) {
  animation-delay: 1s;
}
.project-card:nth-child(6) {
  animation-delay: 1.2s;
}
