/* Custom Botanical Styling & Enhancements */

/* Touch & Mobile UX Optimizations */
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    background-color: #F4F7F4;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fast touch response without 300ms tap delay */
a, button, input, select, textarea {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Smooth custom scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f5f5f4;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #16a34a;
}

/* Botanical dark-mode scrollbars for green calendar cards */
.botanic-scrollbar::-webkit-scrollbar {
    width: 5px;
}
.botanic-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
}
.botanic-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 9999px;
}
.botanic-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.55);
}
.botanic-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.08);
}

/* Hide scrollbar for clean horizontal swiping on mobile */
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
    display: none;
}

/* Typography polish */
h1, h2, h3, h4, .font-serif {
    letter-spacing: -0.015em;
}

/* Full-width typography: Word-style justified text alignment across all screens */
.text-justify {
    text-align: justify !important;
    text-justify: inter-word !important;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    word-break: normal;
    overflow-wrap: break-word;
}

/* Glassmorphism helpers */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Transitions */
.transition-smooth {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Prevent header navigation items from wrapping */
header nav a, header nav button, header nav span {
    white-space: nowrap !important;
}

/* Mobile swipe hint animation */
@keyframes swipeHint {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-6px); }
}
.animate-swipe-hint {
    animation: swipeHint 1.8s ease-in-out infinite;
}

/* Mobile & Small Screen Responsive Polish (320px - 640px) */
@media (max-width: 640px) {
    .text-justify {
        -webkit-hyphens: auto;
        hyphens: auto;
    }
    /* Ensure images and tables never cause horizontal overflow on mobile */
    img, video, iframe, table {
        max-width: 100%;
    }
    /* Prevent iOS Safari auto-zoom on form inputs when focused */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Print styling */
@media print {
    header, footer, aside, .no-print, button, #back-to-top-btn {
        display: none !important;
    }
    main {
        max-width: 100% !important;
        padding: 0 !important;
    }
}
