/* ============================================
   La Casa del Alfarero Totoracocha – Custom Styles
   ============================================ */

/* ----- Typography (Tailwind config handles the font stacks;
         these rules ensure consistent antialiasing) ----- */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 640px) {
    html {
        font-size: 15px;
    }
}

/* ----- Navbar ----------------------------------- */
#navbar {
    transition: box-shadow 0.3s ease;
}

#navbar.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ----- Dropdown transitions --------------------- */
.dropdown-panel {
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    opacity: 0;
}

.dropdown-panel.show {
    transform: translateY(0);
    opacity: 1;
}

/* Arrow rotations for dropdowns & accordions */
.dropdown-arrow,
.accordion-arrow {
    transition: transform 0.2s ease;
}

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

/* ----- Prose (content-page rich text) ----------- */
.prose h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

.prose h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

.prose p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.prose ul,
.prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose a {
    color: #2563eb;
    text-decoration: underline;
}

.prose a:hover {
    color: #1d4ed8;
}

.prose blockquote {
    border-left: 4px solid #2563eb;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6b7280;
}

.prose img {
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.prose hr {
    border-color: #e5e7eb;
    margin: 2rem 0;
}

/* ----- Scroll animations (via IntersectionObserver) --- */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* ----- Mobile menu slide ----------------------- */
#mobile-menu {
    transition: max-height 0.3s ease;
}

/* ----- Aspect-ratio polyfill ------------------- */
.aspect-w-16 {
    position: relative;
    padding-bottom: 56.25%;
}

.aspect-w-16>* {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ----- Custom scrollbar (Chromium) ------------- */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ----- Focus-visible for accessibility --------- */
*:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 4px;
}