/* =============================================================
   MIND MONTH — Enhancement Stylesheet (v1.0.1)
   Critical CSS is inlined in index.php
   This file adds: animations, preloader, bg blobs, cursor glow,
   module chrome, alerts, print styles, etc.
   ============================================================= */

/* -------------------------------------------------------------
   1) Animated Background Mesh (Blobs)
   ------------------------------------------------------------- */
.mm-bg-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.mm-bg-mesh .mm-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: mm-blob-move 22s ease-in-out infinite;
}
.mm-blob-1 {
    width: 480px; height: 480px;
    background: var(--mm-peach);
    top: -120px; left: -120px;
    animation-delay: 0s;
}
.mm-blob-2 {
    width: 520px; height: 520px;
    background: var(--mm-sky);
    bottom: -180px; right: -140px;
    animation-delay: -7s;
}
.mm-blob-3 {
    width: 380px; height: 380px;
    background: var(--mm-sage);
    top: 40%; left: 50%;
    opacity: 0.22;
    animation-delay: -14s;
}
@keyframes mm-blob-move {
    0%, 100% { transform: translate(0,0) scale(1); }
    33% { transform: translate(40px,-30px) scale(1.08); }
    66% { transform: translate(-30px,40px) scale(0.95); }
}

/* -------------------------------------------------------------
   2) Page Preloader
   ------------------------------------------------------------- */
.mm-preloader-inner {
    position: relative;
    width: 160px;
    height: 120px;
}
.mm-cloud {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    animation: mm-float-cloud 3s ease-in-out infinite;
}
.mm-cloud-1 { width: 48px; height: 48px; top: 10px; left: 10px; animation-delay: 0s; }
.mm-cloud-2 { width: 36px; height: 36px; top: 40px; right: 20px; animation-delay: .4s; }
.mm-cloud-3 { width: 28px; height: 28px; bottom: 20px; left: 50%; transform: translateX(-50%); animation-delay: .8s; }
@keyframes mm-float-cloud {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.mm-preloader-logo {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.mm-preloader-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--mm-peach);
    animation: mm-dot-bounce 1.2s ease-in-out infinite;
}
.mm-preloader-dot:nth-child(2) { background: var(--mm-sage); animation-delay: .2s; }
.mm-preloader-dot:nth-child(3) { background: var(--mm-clay); animation-delay: .4s; }
@keyframes mm-dot-bounce {
    0%,100% { transform: translateY(0); opacity: .6; }
    50% { transform: translateY(-10px); opacity: 1; }
}

/* -------------------------------------------------------------
   3) Cursor Glow (desktop only)
   ------------------------------------------------------------- */
.mm-cursor-glow {
    position: fixed;
    top: 0; left: 0;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244,162,140,0.25) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: transform .15s ease-out;
    mix-blend-mode: multiply;
    opacity: 0;
}
@media (hover: none), (max-width: 1024px) {
    .mm-cursor-glow { display: none !important; }
}

/* -------------------------------------------------------------
   4) Module Chrome
   ------------------------------------------------------------- */
.mm-module {
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(74,74,74,0.05);
    border: 1px solid var(--mm-sand-40);
    margin-bottom: 20px;
}
.mm-module-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--mm-dark) !important;
    margin: 0 0 16px !important;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--mm-peach);
    display: inline-block;
}

.mm-floating-modules {
    position: fixed;
    bottom: 24px; left: 24px;
    z-index: 100;
}

/* -------------------------------------------------------------
   5) System Messages / Alerts
   ------------------------------------------------------------- */
.mm-site #system-message-container {
    max-width: 1280px;
    margin: 20px auto;
    padding: 0 24px;
}
.mm-site .alert {
    border-radius: 16px;
    padding: 14px 20px;
    margin-bottom: 14px;
}
.mm-site .alert-success { background: var(--mm-sage-10); color: var(--mm-sage); border-left: 4px solid var(--mm-sage); }
.mm-site .alert-danger  { background: #fee; color: #c53030; border-left: 4px solid #c53030; }
.mm-site .alert-info    { background: var(--mm-sky-10); color: #3b6a85; border-left: 4px solid var(--mm-sky); }
.mm-site .alert-warning { background: #fef5e7; color: #b7791f; border-left: 4px solid #d69e2e; }

/* -------------------------------------------------------------
   6) SP Page Builder content wrapper fix
   ------------------------------------------------------------- */
.mm-content .sppb-section { position: relative; z-index: 2; }
.mm-content .sppb-row-container { max-width: 1280px; }

/* Fix SPPB default font inheritance */
.mm-content .sppb-addon-text-block,
.mm-content .sppb-addon-title,
.mm-content .sppb-addon-content,
.mm-content .sppb-btn {
    font-family: 'Kanit', sans-serif !important;
}

/* -------------------------------------------------------------
   7) Focus states (accessibility)
   ------------------------------------------------------------- */
.mm-site a:focus-visible,
.mm-site button:focus-visible,
.mm-site input:focus-visible,
.mm-site textarea:focus-visible,
.mm-site select:focus-visible {
    outline: 3px solid var(--mm-peach);
    outline-offset: 3px;
    border-radius: 6px;
}

/* -------------------------------------------------------------
   8) Joomla edit/com_content defaults — keep readable
   ------------------------------------------------------------- */
.mm-site .page-header h1,
.mm-site .page-header h2,
.mm-site .item-page h1,
.mm-site .item-page h2 {
    font-family: 'Kanit', sans-serif !important;
}
.mm-site .item-page {
    padding: 40px 0;
}

/* Pagination */
.mm-site .pagination {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    gap: 6px;
    justify-content: center;
    margin: 30px 0;
}
.mm-site .pagination a,
.mm-site .pagination span {
    display: inline-flex;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--mm-sand-40);
    border-radius: 12px;
    color: var(--mm-dark) !important;
    text-decoration: none !important;
    transition: all .2s ease;
    font-size: 14px;
}
.mm-site .pagination a:hover {
    background: var(--mm-peach);
    border-color: var(--mm-peach);
    color: #fff !important;
}
.mm-site .pagination .active span {
    background: var(--mm-peach);
    border-color: var(--mm-peach);
    color: #fff !important;
}

/* -------------------------------------------------------------
   9) Print styles
   ------------------------------------------------------------- */
@media print {
    .mm-header,
    .mm-footer,
    .mm-to-top,
    .mm-bg-mesh,
    .mm-preloader,
    .mm-cursor-glow,
    .mm-offcanvas,
    .mm-floating-modules { display: none !important; }
    body.mm-site { background: #fff !important; }
    .mm-main { padding: 0 !important; }
}
