/* ============================================
   BESTCOURS - SHARED CONTENT UTILITIES
   Used by BOTH course and article pages
   Version: 1.0 - Smart Optimization
   ============================================ */

/* ============================================
   BUTTONS - Shared across pages
   ============================================ */

.button.is-info {
    background-color: #28a745 !important;
    color: #fff;
    border: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.button.is-info:hover {
    background-color: #1067a8 !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.2);
}

.button.is-info:active {
    transform: translateY(0);
}

.button:focus {
    outline: 3px solid #28a745;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ============================================
   ACCESSIBILITY - Selection & Focus
   ============================================ */

::selection {
    background-color: rgba(40, 167, 69, 0.2);
    color: #1a202c;
}

::-moz-selection {
    background-color: rgba(40, 167, 69, 0.2);
    color: #1a202c;
}

/* ============================================
   SMOOTH SCROLLING
   ============================================ */

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   SECTION DIVIDER - Used in both pages
   ============================================ */

.section-divider {
    margin: 2em 0;
    border: none;
    height: 1px;
    background: #e5e7eb;
}

/* ============================================
   SHARED ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ============================================
   COPY CODE BUTTON - Used in articles
   ============================================ */

.copy-code-button {
    position: absolute;
    top: 6px;
    right: 12px;
    background: white;
    border: 1px solid #28a745;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #28a745;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(40, 167, 69, 0.15);
}

.copy-code-button:hover {
    background: #28a745;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.25);
}

.copy-code-button:active {
    transform: scale(0.98);
}

.copy-code-button.copied {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.copy-code-button svg {
    width: 14px;
    height: 14px;
}

/* Fix Prism token conflicts */
.token.number {
    background-color: transparent !important;
    margin: 0;
    height: 1.25em;
    padding: 0;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media screen and (max-width: 768px) {
    .section-divider {
        margin: 1.5em 0;
    }
}

@media screen and (max-width: 480px) {
    .button.is-info {
        font-size: 0.9rem;
        padding: 0.5em 1.5em;
    }
}
