/* ================================
   SPECIAL CERTIFICATE - MAIN CSS
   ================================ */

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Prevent horizontal scroll */
#navbar,
main,
footer,
section,
header {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #3B82F6;
    color: white;
}

/* Scrollbar - Light */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #3B82F6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1E3A5F;
}

/* Scrollbar - Dark */
.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

.dark ::-webkit-scrollbar-thumb {
    background: #3B82F6;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #60A5FA;
}

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Form Focus */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Dark mode inputs */
.dark input,
.dark textarea,
.dark select {
    background-color: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: #9ca3af;
}

/* Animations */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.animate-bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* Transition for dark mode */
body,
header,
main,
footer,
section,
div,
a,
p,
h1, h2, h3, h4, h5, h6,
span,
input,
textarea,
button {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Back to Top Button */
#back-to-top {
    transition: all 0.3s ease;
}

/* Mobile theme toggle */
#mobile-theme-toggle {
    transition: all 0.3s ease;
}

/* Print */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}