/**
 * HostDheko - Public Website CSS
 * 
 * Custom styles for the public-facing website.
 * Works alongside Tailwind CSS utility classes.
 */

/* =========================================================================
   Global & Typography
   ========================================================================= */

::selection {
    background-color: #2563eb;
    color: #ffffff;
}

.prose h2 { margin-top: 2em; margin-bottom: 0.75em; }
.prose h3 { margin-top: 1.5em; margin-bottom: 0.5em; }
.prose p { margin-bottom: 1em; }
.prose ul, .prose ol { margin-bottom: 1em; padding-left: 1.5em; }
.prose li { margin-bottom: 0.25em; }
.prose blockquote {
    border-left: 4px solid #3b82f6;
    padding: 1em 1.5em;
    margin: 1.5em 0;
    background: #f8fafc;
    border-radius: 0 0.75rem 0.75rem 0;
}
.prose pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25em;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5em 0;
}
.prose code {
    background: #f1f5f9;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
}
.prose pre code {
    background: transparent;
    padding: 0;
}
.prose img {
    border-radius: 0.75rem;
    margin: 1.5em 0;
}
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}
.prose th, .prose td {
    border: 1px solid #e2e8f0;
    padding: 0.75em 1em;
    text-align: left;
}
.prose th {
    background: #f8fafc;
    font-weight: 600;
}

/* =========================================================================
   Navigation
   ========================================================================= */

.mega-menu {
    transform: translateY(4px);
    transition: all 0.2s ease;
}
.group:hover .mega-menu {
    transform: translateY(0);
}

.mega-link {
    display: block;
    padding: 0.375rem 0;
    font-size: 0.875rem;
    color: #475569;
    transition: color 0.15s ease;
}
.mega-link:hover {
    color: #2563eb;
}

/* =========================================================================
   Footer
   ========================================================================= */

.footer-link {
    display: block;
    font-size: 0.875rem;
    color: #94a3b8;
    transition: color 0.15s ease, transform 0.15s ease;
}
.footer-link:hover {
    color: #ffffff;
    transform: translateX(2px);
}

/* =========================================================================
   Pagination
   ========================================================================= */

.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
}
.pagination-page:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}
.pagination-active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

/* =========================================================================
   Buttons
   ========================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}
.btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 8px 15px -3px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
}
.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-accent {
    background: #16a34a;
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(22, 163, 74, 0.2);
}
.btn-accent:hover {
    background: #15803d;
    box-shadow: 0 8px 15px -3px rgba(22, 163, 74, 0.3);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}
.btn-outline:hover {
    background: #2563eb;
    color: #ffffff;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    border-radius: 0.875rem;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    border-radius: 0.5rem;
}

/* =========================================================================
   Cards & Components
   ========================================================================= */

.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.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; }

/* Glassmorphism utility */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* =========================================================================
   Tabs
   ========================================================================= */

.tab-btn {
    position: relative;
}
.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background 0.2s ease;
}
.tab-btn[aria-selected="true"]::after {
    background: #2563eb;
}

/* =========================================================================
   Animations
   ========================================================================= */

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

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade-in { animation: fadeIn 0.4s ease forwards; }
.animate-slide-up { animation: slideUp 0.5s ease forwards; }
.animate-scale-in { animation: scaleIn 0.3s ease forwards; }

/* Staggered animation */
.stagger > * { opacity: 0; animation: fadeIn 0.4s ease forwards; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }

/* =========================================================================
   Search Modal
   ========================================================================= */

.search-modal-active {
    overflow: hidden;
}

/* =========================================================================
   Scrollbar
   ========================================================================= */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =========================================================================
   Responsive Utilities
   ========================================================================= */

@media (max-width: 640px) {
    .container { padding-left: 1rem; padding-right: 1rem; }
}

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