/* Diplomas Section Styles */
.diplomas-section {
    margin: 4rem 0;
    padding: 0;
}

.diplomas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.diploma-card {
    background: rgba(30, 30, 60, 0.7);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(110, 69, 226, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.diploma-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(110, 69, 226, 0.5);
    border-color: var(--accent);
}

.diploma-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0.7;
}

.diploma-preview {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.diploma-svg {
    width: 200px;
    height: 250px;
    margin: 0 auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.diploma-card:hover .diploma-svg {
    transform: scale(1.05) rotate(2deg);
}

.diploma-info {
    text-align: center;
}

.diploma-degree {
    font-weight: 600;
    color: var(--secondary);
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.diploma-institution {
    color: white;
    margin: 0 0 0.3rem 0;
    font-weight: 500;
}

.diploma-year {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
}

.view-diploma-btn {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.view-diploma-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(110, 69, 226, 0.4);
}

/* Modal Styles */
.diploma-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 2000;
    padding: 20px;
}

.diploma-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.diploma-modal {
    background: rgba(26, 26, 46, 0.98);
    border-radius: 20px;
    padding: 2.5rem;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid var(--primary);
    box-shadow: 0 0 50px rgba(110, 69, 226, 0.8);
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.diploma-modal-overlay.active .diploma-modal {
    transform: scale(1);
}

.close-diploma-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 126, 95, 0.2);
    border: none;
    color: var(--accent);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-diploma-modal:hover {
    background: rgba(255, 126, 95, 0.4);
    transform: rotate(90deg);
}

.diploma-modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.diploma-image-container {
    text-align: center;
}

.diploma-modal-image {
    width: 100%;
    max-width: 350px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    border-radius: 10px;
}

.diploma-details {
    color: white;
}

.diploma-modal-title {
    color: var(--secondary);
    margin: 0 0 1rem 0;
    font-size: 1.8rem;
}

.diploma-modal-institution {
    color: white;
    margin: 0 0 0.5rem 0;
    font-weight: 500;
    font-size: 1.2rem;
}

.diploma-modal-year {
    color: var(--accent);
    margin: 0 0 2rem 0;
    font-weight: 600;
}

.diploma-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.skill-badge {
    background: rgba(110, 69, 226, 0.3);
    color: var(--secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid rgba(110, 69, 226, 0.5);
}

.diploma-description {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Анимации */
@keyframes diplomaAppear {
    from {
        opacity: 0;
        transform: translateY(30px) rotate(-5deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0);
    }
}

.diploma-card {
    animation: diplomaAppear 0.6s ease forwards;
    opacity: 0;
}

.diploma-card:nth-child(1) { animation-delay: 0.1s; }
.diploma-card:nth-child(2) { animation-delay: 0.3s; }

/* Адаптивность */
@media (max-width: 968px) {
    .diploma-modal-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .diploma-skills {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .diplomas-section {
        padding: 0 var(--safe-area);
        margin: var(--section-spacing) 0;
    }

    /* Добавьте это для секции дипломов */
    .diplomas-section {
        margin: var(--section-spacing) 0;
        padding: 0 var(--safe-area);
    }

    .diplomas-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .diploma-card {
        padding: 1.5rem;
    }

    .diploma-svg {
        width: 180px;
        height: 220px;
    }

    .diploma-modal {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .diploma-card {
        padding: 1.2rem;
    }

    .diploma-svg {
        width: 150px;
        height: 200px;
    }

    .diploma-modal {
        padding: 1rem;
    }

    .diploma-modal-title {
        font-size: 1.5rem;
    }
}

/* Расположение дипломов в ряд */
.diplomas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Адаптивность для мобильных */
@media (max-width: 968px) {
  .diplomas-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Эффект при наведении, указывающий на интерактивность */
.diploma-card {
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.diploma-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(110, 69, 226, 0.4);
}

.diploma-card::after {
  content: 'Нажмите для просмотра';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--secondary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.diploma-card:hover::after {
  opacity: 1;
}
