/* border animat */
.border-animate-blue,
.border-animate-orange,
.border-animate-green,
.border-animate-purple {
  position: relative;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.5s;
}

.border-animate-blue::before,
.border-animate-blue::after,
.border-animate-orange::before,
.border-animate-orange::after,
.border-animate-green::before,
.border-animate-green::after,
.border-animate-purple::before,
.border-animate-purple::after {
    pointer-events: none; /* Permite interacțiunea cu elementele din interior */
}

/* Stiluri când elementele devin vizibile */
.border-animate-blue.visible,
.border-animate-orange.visible,
.border-animate-green.visible,
.border-animate-purple.visible {
  opacity: 1;
}

/* Coloana albastră */
.border-animate-blue.visible::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  width: 0;
  height: 0;
  border: 2px solid transparent;
  border-top-color: #007BFF;
  border-right-color: #007BFF;
  animation: border-growing 2s linear forwards 0s;
}

.border-animate-blue.visible::after {
  content: '';
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 0;
  height: 0;
  border: 2px solid transparent;
  border-bottom-color: #007BFF;
  border-left-color: #007BFF;
  animation: border-growing 2s linear forwards 1s;
}

/* Coloana portocalie */
.border-animate-orange.visible::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  width: 0;
  height: 0;
  border: 2px solid transparent;
  border-top-color: #FF6200;
  border-right-color: #FF6200;
  animation: border-growing 2s linear forwards 1s;
}

.border-animate-orange.visible::after {
  content: '';
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 0;
  height: 0;
  border: 2px solid transparent;
  border-bottom-color: #FF6200;
  border-left-color: #FF6200;
  animation: border-growing 2s linear forwards 2s;
}

/* Coloana verde */
.border-animate-green.visible::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  width: 0;
  height: 0;
  border: 2px solid transparent;
  border-top-color: #04a94f;
  border-right-color: #04a94f;
  animation: border-growing 2s linear forwards 2s;
}

.border-animate-green.visible::after {
  content: '';
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 0;
  height: 0;
  border: 2px solid transparent;
  border-bottom-color: #04a94f;
  border-left-color: #04a94f;
  animation: border-growing 2s linear forwards 3s;
}

/* Coloana purpurie */
.border-animate-purple.visible::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  width: 0;
  height: 0;
  border: 2px solid transparent;
  border-top-color: #9c27b0;
  border-right-color: #9c27b0;
  animation: border-growing 2s linear forwards 3s;
}

.border-animate-purple.visible::after {
  content: '';
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 0;
  height: 0;
  border: 2px solid transparent;
  border-bottom-color: #9c27b0;
  border-left-color: #9c27b0;
  animation: border-growing 2s linear forwards 4s;
}

/* Animația pentru toate border-urile */
@keyframes border-growing {
  0% {
    width: 0;
    height: 0;
  }
  50% {
    width: calc(100% - 10px);
    height: 0;
  }
  100% {
    width: calc(100% - 10px);
    height: calc(100% - 10px);
  }
}

/* Stiluri pentru cercuri cu efect de umplere */
.progress-row {
    display: flex;
    justify-content: space-around; /* Spațiu între elemente */
    flex-wrap: wrap; /* Elemente în rânduri multiple */
    gap: 20px; /* Spațiu între cercuri */
    margin: 20px auto;
}

.progress-container {
    position: relative;
    width: 200px; /* Dimensiune implicită pe desktop */
    height: 200px;
    margin: 10px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.progress-container.visible {
    opacity: 1;
}

.progress-svg {
    width: 100%; /* SVG se va adapta la container */
    height: auto; /* Păstrează proporțiile */
    display: block; /* Elimină eventualele spații albe */
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: #e6e6e6;
    stroke-width: 15;
}

.progress-bar {
    fill: none;
    stroke-width: 15;
    stroke-dasharray: 565.48; /* Circumferința cercului cu rază 90: 2 * PI * 90 */
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 2s ease-in-out;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
    color: #333;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.progress-text.visible {
    visibility: visible;
    opacity: 1;
}

/* Variații de dimensiuni */
.progress-container-small {
    width: 150px;
    height: 150px;
}

.progress-container-large {
    width: 250px;
    height: 250px;
}

/* Pentru a face cercurile responsive */
@media (max-width: 768px) {
    .progress-container {
        width: 180px; /* Dimensiune mai mică pentru mobil */
        height: 180px;
        margin: 5px;
    }
    
    .progress-row {
        gap: 5px; /* Spațiu mai mic între cercuri pe mobil */
    }
    
    .progress-text {
        font-size: 14px;
    }
    
    .progress-container-small {
        width: 120px; 
        height: 120px;
    }
    
    .progress-container-large {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .progress-container {
        width: 100px; /* Dimensiune și mai mică pentru telefoane mici */
        height: 100px;
    }
    
    .progress-text {
        font-size: 12px;
    }
    
    .progress-container-small {
        width: 80px; 
        height: 80px;
    }
    
    .progress-container-large {
        width: 150px;
        height: 150px;
    }
}