/* ===================================================================
   Dental Clinic - Main Stylesheet
   =================================================================== */

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ===================================================================
   Keyframe Animations
   =================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideRight {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

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

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

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* Animation Utility Classes */
.animate-fadeIn {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slideUp {
    animation: slideUp 0.5s ease-out forwards;
}

.animate-slideRight {
    animation: slideRight 0.5s ease-out forwards;
}

.animation-delay-200 {
    animation-delay: 0.2s;
    opacity: 0;
}

.animation-delay-400 {
    animation-delay: 0.4s;
    opacity: 0;
}

/* ===================================================================
   Carousel
   =================================================================== */
.carousel-slide {
    transition: opacity 1s ease-in-out;
}
.carousel-slide:not(.opacity-100) {
    pointer-events: none;
}

/* ===================================================================
   Card Hover Effects
   =================================================================== */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* ===================================================================
   Lightbox
   =================================================================== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

/* ===================================================================
   Toast Notification
   =================================================================== */
.toast {
    min-width: 300px;
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s ease-out forwards;
}
.toast.removing {
    animation: toastOut 0.3s ease-in forwards;
}
.toast-success {
    background: #10b981;
}
.toast-error {
    background: #ef4444;
}
.toast-info {
    background: #3b82f6;
}

/* ===================================================================
   Loading Spinner
   =================================================================== */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #2DD4A8;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ===================================================================
   Mobile Menu
   =================================================================== */
#mobile-menu {
    transition: opacity 0.3s ease;
}
#mobile-menu.active {
    display: block;
}
#mobile-menu-panel {
    transition: transform 0.3s ease;
}
#mobile-menu.active #mobile-menu-panel {
    transform: translateX(0);
}

/* ===================================================================
   Header
   =================================================================== */
#site-header {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
#site-header.scrolled {
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}
#site-header.scrolled .header-text {
    color: white;
}

/* ===================================================================
   Back to Top
   =================================================================== */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================================
   Article Content Typography (Prose-like)
   =================================================================== */
.article-content {
    line-height: 1.8;
    color: #374151;
}
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    color: #111827;
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}
.article-content h1 { font-size: 2em; }
.article-content h2 { font-size: 1.5em; }
.article-content h3 { font-size: 1.25em; }
.article-content p {
    margin-bottom: 1em;
}
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5em 0;
}
.article-content a {
    color: #2DD4A8;
    text-decoration: underline;
}
.article-content a:hover {
    color: #818CF8;
}
.article-content ul,
.article-content ol {
    margin: 1em 0;
    padding-left: 1.5em;
}
.article-content ul { list-style-type: disc; }
.article-content ol { list-style-type: decimal; }
.article-content li {
    margin-bottom: 0.5em;
}
.article-content blockquote {
    border-left: 4px solid #2DD4A8;
    padding: 0.5em 1em;
    margin: 1em 0;
    background: #f0fdf4;
    border-radius: 0 8px 8px 0;
    color: #065f46;
}
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}
.article-content th,
.article-content td {
    border: 1px solid #e5e7eb;
    padding: 0.75em;
    text-align: left;
}
.article-content th {
    background: #f9fafb;
    font-weight: 600;
}

/* ===================================================================
   Prose (Rich Text Content Typography)
   =================================================================== */
.prose {
    color: #374151 !important;
    line-height: 1.75 !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
.prose > * + * {
    margin-top: 1.25em !important;
}
.prose > p + p {
    margin-top: 0 !important;
    margin-bottom: 1em !important;
}
.prose br {
    display: inline !important;
}
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: #111827 !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-top: 1.5em !important;
    margin-bottom: 0.5em !important;
}
.prose h1 { font-size: 2em !important; }
.prose h2 { font-size: 1.5em !important; }
.prose h3 { font-size: 1.25em !important; }
.prose h4 { font-size: 1.125em !important; }
.prose p {
    margin-top: 0 !important;
    margin-bottom: 1em !important;
}
.prose a {
    color: #2DD4A8;
    text-decoration: underline;
}
.prose a:hover {
    color: #818CF8;
}
.prose strong {
    font-weight: 700;
    color: #111827;
}
.prose em {
    font-style: italic;
}
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5em 0;
}
.prose ul,
.prose ol {
    margin: 1em 0;
    padding-left: 1.5em;
}
.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }
.prose li {
    margin-bottom: 0.5em;
}
.prose li > * {
    margin-top: 0;
    margin-bottom: 0;
}
.prose blockquote {
    border-left: 4px solid #2DD4A8;
    padding: 0.5em 1em;
    margin: 1em 0;
    background: #f0fdf4;
    border-radius: 0 8px 8px 0;
    color: #065f46;
    font-style: italic;
}
.prose blockquote > * {
    margin-top: 0;
    margin-bottom: 0;
}
.prose code {
    background: #f1f5f9;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}
.prose pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1em 0;
}
.prose pre code {
    background: none;
    padding: 0;
    color: inherit;
}
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}
.prose th,
.prose td {
    border: 1px solid #e5e7eb;
    padding: 0.75em;
    text-align: left;
}
.prose th {
    background: #f9fafb;
    font-weight: 600;
}
.prose hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2em 0;
}
.prose-lg {
    font-size: 1.125em;
    line-height: 1.8;
}
.prose-lg h1 { font-size: 2.25em; }
.prose-lg h2 { font-size: 1.75em; }
.prose-lg h3 { font-size: 1.375em; }
.prose-lg img {
    border-radius: 12px;
}
.prose-lg blockquote {
    font-size: 1.125em;
}
.not-prose {
    color: #374151;
}

/* ===================================================================
   Form Input Focus
   =================================================================== */
input:focus,
textarea:focus,
select:focus {
    border-color: #2DD4A8;
    box-shadow: 0 0 0 3px rgba(45, 212, 168, 0.2);
    outline: none;
}

/* ===================================================================
   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;
}

/* ===================================================================
   Scrollbar Hide
   =================================================================== */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===================================================================
   Flash Message Auto-dismiss
   =================================================================== */
.flash-message {
    animation: slideUp 0.3s ease-out;
}
