/* גלילה חלקה */
html {
    scroll-behavior: smooth;
}

/* תיקון למלבן הכחול בצדדים */
body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

.md-main {
    overflow-x: hidden;
}

.md-content {
    overflow-x: hidden;
    max-width: 100%;
    background-color: transparent;
}

/* נגישות נאב-בר ותיקוני תצוגה */
nav {
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 1000;
    border-bottom: 1px solid #ddd;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

nav ul li a {
    color: #007bff;
    font-weight: bold;
    text-decoration: none;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-radius: 4px;
}

/* אפקט fading לסימן > */
@keyframes fading {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

.terminal-icon {
    animation: fading 2s infinite ease-in-out;
}

/* סרגל גלילה מותאם */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.05);
}

/* סגנונות מודל */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

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

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    padding: 5px;
}

.close-modal:hover {
    opacity: 1;
}

/* אנימציות לכרטיסי תעודות */
.certificate-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.certificate-card img {
    transition: transform 0.3s ease;
}

.certificate-card:hover img {
    transform: scale(1.05);
}

/* אנימציות לאייקונים חברתיים */
.social-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-icon:hover {
    transform: translateY(-3px);
    color: #60A5FA;
}

/* התאמות לספארי */
@supports (-webkit-touch-callout: none) {
    .modal-content {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    .certificate-card {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* התאמות למובייל */
@media (max-width: 768px) {
    nav {
        padding: 0;
    }
    
    .mobile-menu-active {
        display: block !important;
    }
    
    #mobile-menu {
        border-top: 1px solid #eee;
        transition: all 0.3s ease;
    }

    .modal-content {
        width: 95%;
    }
    
    .close-modal {
        top: -35px;
        right: 5px;
    }
}

/* Floating Resume Button */
.floating-resume-btn {
  position: fixed;
  left: 20px;
  bottom: 20%;
  background-color: #1E40AF;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
}

.floating-resume-btn:hover {
  background-color: #1E3A8A;
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .floating-resume-btn {
    left: 15px;
    bottom: 15%;
    padding: 10px;
  }
}