@charset "UTF-8";

/* ==========================================================
   Ruangthong Pharmacy — Premium LIGHT Theme
   Brand: Navy + Red + Gold (from corporate logo)
   Font : LINE Seed Sans TH (local)
   ========================================================== */

/* ---------- @font-face: LINE Seed Sans TH ---------- */

@font-face {
    font-family: 'LINE Seed Sans TH';
    src: url('../../font/LINESeedSansTH_W_Th.woff2') format('woff2'),
         url('../../font/LINESeedSansTH_W_Th.woff')  format('woff');
    font-weight: 100 300; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'LINE Seed Sans TH';
    src: url('../../font/LINESeedSansTH_W_Rg.woff2') format('woff2'),
         url('../../font/LINESeedSansTH_W_Rg.woff')  format('woff');
    font-weight: 400 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'LINE Seed Sans TH';
    src: url('../../font/LINESeedSansTH_W_Bd.woff2') format('woff2'),
         url('../../font/LINESeedSansTH_W_Bd.woff')  format('woff');
    font-weight: 600 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'LINE Seed Sans TH';
    src: url('../../font/LINESeedSansTH_W_XBd.woff2') format('woff2'),
         url('../../font/LINESeedSansTH_W_XBd.woff')  format('woff');
    font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'LINE Seed Sans TH';
    src: url('../../font/LINESeedSansTH_W_He.woff2') format('woff2'),
         url('../../font/LINESeedSansTH_W_He.woff')  format('woff');
    font-weight: 900; font-style: normal; font-display: swap;
}

/* ---------- Base ---------- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

html, body, * {
    font-family: 'LINE Seed Sans TH', -apple-system, BlinkMacSystemFont,
                 'Segoe UI', system-ui, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background: #FAF7F0;
    color: #1B2D5E;
    overflow-x: hidden;
    font-weight: 400;
    letter-spacing: 0.005em;
    line-height: 1.65;
}

h1, h2, h3, h4, h5, h6, .font-display {
    color: #2B398F; /* ink-900 — rgb(43, 57, 143) */
    font-weight: 800;
    letter-spacing: -0.012em;
    line-height: 1.2;
}

/* Align with Tailwind theme.extend.colors.ink.900 (#2B398F) */
.text-ink-900 {
    --tw-text-opacity: 1;
    color: rgb(43 57 143 / var(--tw-text-opacity, 1));
}

.font-display.italic, em, i { font-style: normal; font-weight: 500; }

/* ---------- Scrollbar (brand red) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #FAF7F0; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #C8102E, #A50D25);
    border-radius: 10px;
    border: 2px solid #FAF7F0;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #E5334C, #C8102E);
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(200, 16, 46, 0.18);
    color: #2B398F;
}

/* ---------- Navbar scroll state ---------- */
#nav {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(27, 45, 94, 0.06);
}
#nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(200, 16, 46, 0.12);
    box-shadow: 0 8px 32px rgba(13, 22, 48, 0.08);
}

/* ---------- Filter buttons ---------- */
.filter-btn.active {
    background: linear-gradient(135deg, #E5334C 0%, #C8102E 50%, #A50D25 100%);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: 0 10px 40px -10px rgba(200, 16, 46, 0.45);
    font-weight: 700;
}

.branch-card.hidden { display: none; }
.branch-card.visible { animation: fadeUp 0.5s ease-out both; }

/* ---------- Form autofill ---------- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill {
    -webkit-text-fill-color: #1B2D5E;
    -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset;
    caret-color: #C8102E;
    transition: background-color 5000s ease-in-out 0s;
    font-family: 'LINE Seed Sans TH', system-ui, sans-serif;
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.show { opacity: 1; transform: translateY(0); }

/* ---------- Decorative network pattern (from logo) ---------- */
.network-bg {
    background-image:
        radial-gradient(circle at 20% 30%, rgba(200,16,46,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(27,45,94,0.06) 0%, transparent 50%);
}

/* ---------- Keyframes ---------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ---------- Hero floating icon playfulness ---------- */
@keyframes heroFloat {
    0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
    50%      { transform: translateY(-14px) rotate(calc(var(--rot, 0deg) + 3deg)); }
}
@keyframes heroFloatAlt {
    0%, 100% { transform: translate(0, 0) rotate(var(--rot, 0deg)); }
    50%      { transform: translate(8px, -10px) rotate(calc(var(--rot, 0deg) - 4deg)); }
}
@keyframes heroOrbit {
    from { transform: rotate(0deg) translateX(var(--r, 180px)) rotate(0deg); }
    to   { transform: rotate(360deg) translateX(var(--r, 180px)) rotate(-360deg); }
}
@keyframes heroPulseGlow {
    0%, 100% { box-shadow: 0 10px 30px -10px rgba(200,16,46,0.45), 0 0 0 0 rgba(255,255,255,0.0); }
    50%      { box-shadow: 0 14px 40px -10px rgba(200,16,46,0.65), 0 0 0 8px rgba(255,255,255,0.08); }
}
@keyframes heroSparkle {
    0%, 100% { opacity: 0.25; transform: scale(0.85) rotate(0deg); }
    50%      { opacity: 1;    transform: scale(1.15) rotate(45deg); }
}
@keyframes heroDrift {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(10px, -6px); }
    50%  { transform: translate(-6px, -12px); }
    75%  { transform: translate(-10px, -4px); }
    100% { transform: translate(0, 0); }
}

.hero-float      { animation: heroFloat 6s ease-in-out infinite; }
.hero-float-alt  { animation: heroFloatAlt 7.5s ease-in-out infinite; }
.hero-drift      { animation: heroDrift 9s ease-in-out infinite; }
.hero-pulse-glow { animation: heroPulseGlow 3.2s ease-in-out infinite; }
.hero-sparkle    { animation: heroSparkle 3s ease-in-out infinite; }
.hero-orbit      { animation: heroOrbit 18s linear infinite; }
.hero-spin-slow  { animation: spin 22s linear infinite; }

@media (prefers-reduced-motion: reduce) {
    .hero-float, .hero-float-alt, .hero-drift,
    .hero-pulse-glow, .hero-sparkle, .hero-orbit, .hero-spin-slow {
        animation: none !important;
    }
}

/* ---------- Thai word break ---------- */
[lang="th"], body { word-break: break-word; line-break: strict; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    body { font-size: 15px; }
    .font-display { letter-spacing: -0.005em; }
}

/* ---------- Tailwind utility overrides (loads after Tailwind CDN) ---------- */
@media (min-width: 1024px) {
    /* 20% smaller than previous 3.5rem cap */
    .lg\:text-7xl {
        font-size: 2.8rem;
        line-height: 1;
    }
}

/* ---------- Print ---------- */
@media print {
    #nav, footer, .no-print { display: none !important; }
    body { background: white; color: black; }
}
