/* Global smooth scrolling */
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}
:root

/* Global page background (theme-aware) */
:root:not(.dark) body{
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fb 50%, #eef2f6 100%);
}
:root.dark body{
  background: linear-gradient(180deg, #0f1113 0%, #171a1d 40%, #1d2125 100%);
}
{ scroll-padding-top: 100px; } /* header offset */

/* Nav hover underline animation */
.navbar a{
  position: relative; text-decoration: none;
}
.navbar a::after{
  content:''; position:absolute; left:10%; right:10%; bottom:2px; height:2px;
  background: var(--accent); transform: scaleX(0); transform-origin:left;
  transition: transform .2s ease;
}
.navbar a:hover::after, .navbar a:focus::after{ transform: scaleX(1); }


:root{
  --blue:#1f6bae; --blue-700:#165a95; --blue-300:#5aa8ff;
  --orange:#f1662a; --orange-700:#d4511e; --orange-300:#ffa06f;
  --grey:#4a4a4a; --grey-200:#e9edf2;
  --bg:#ffffff; --text:#111319; --muted:#5f6b7a; --card:#ffffff; --border:rgba(0,0,0,.08);
  --ring: 0 0 0 3px rgba(31,107,174,.18); --shadow: 0 10px 30px rgba(0,0,0,.08);
}
:root.dark{
  --bg:#0f1115; --text:#e7edf3; --muted:#b7c2cf; --card:#151922; --border:rgba(255,255,255,.12);
  --blue:#5aa8ff; --blue-700:#3a83cf; --orange:#ffa06f; --orange-700:#f07d49;
  --grey:#c8ccd1; --grey-200:#232a35; --ring: 0 0 0 3px rgba(90,168,255,.22);
  --shadow: 0 14px 36px rgba(0,0,0,.5);
}
/* Prevent white flash by setting base bg right on html element */
html{background:var(--bg); color:var(--text)}
*{box-sizing:border-box}
body{margin:0; font-family:Inter,ui-sans-serif,system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif; line-height:1.6}
img{max-width:100%; height:auto; display:block}
a{color:var(--blue); text-decoration:none}
a:hover{opacity:.92}
.container{max-width:1200px; margin:0 auto; padding:20px}

.nav{position:sticky; top:0; z-index:50; border-bottom:1px solid var(--border);
  background:linear-gradient(180deg, color-mix(in oklab, var(--card) 92%, transparent), transparent);
  backdrop-filter: blur(10px);
}
.nav-inner{display:flex; align-items:center; justify-content:space-between; gap:14px; padding:10px 20px}
.brand{display:flex; align-items:center; gap:12px; min-width:0}
.brand img{height:56px; width:auto} /* bigger logo per request */
.brand .title{font-weight:900; letter-spacing:.2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}

.menu{display:flex; gap:8px; flex-wrap:wrap; align-items:center}
.menu a{padding:8px 12px; border-radius:12px; color:var(--text); font-weight:700}
.menu a.active, .menu a:hover{background:var(--card); border:1px solid var(--border); box-shadow:var(--shadow)}
.theme-toggle{cursor:pointer; padding:8px 12px; border:1px solid var(--border); border-radius:12px; background:var(--card); box-shadow:var(--shadow); color:var(--text); font-weight:800}

.hero{padding:80px 20px; border-bottom:1px solid var(--border);
  background:
    radial-gradient(900px 360px at 10% -10%, color-mix(in oklab, var(--blue) 20%, transparent), transparent 60%),
    radial-gradient(900px 360px at 90% -10%, color-mix(in oklab, var(--orange) 18%, transparent), transparent 60%);
}
.hero h1{margin:0 0 10px; font-size:42px; line-height:1.15; font-weight:900}
.hero p{max-width:900px; margin:0 0 18px; color:var(--muted); font-size:18px}
.cta{display:flex; gap:10px; flex-wrap:wrap}
.btn{display:inline-flex; align-items:center; gap:10px; padding:12px 16px; border-radius:14px; border:1px solid var(--border); background:var(--card); box-shadow:var(--shadow); font-weight:800; color:var(--text); transition:transform .06s}
.btn:hover{transform:translateY(-1px)}
.btn.primary{background:linear-gradient(135deg,var(--blue), var(--blue-700)); color:#fff; border-color:transparent}
.btn.accent{background:linear-gradient(135deg,var(--orange), var(--orange-700)); color:#fff; border-color:transparent}
.btn.ghost{background:transparent; border-color:var(--border)}

.section{padding:48px 20px; border-bottom:1px solid var(--border)}
.section h2{font-size:30px; margin:0 0 6px}
.section p.lead{color:var(--muted); max-width:900px; margin:0 0 12px}

.grid{display:grid; grid-template-columns:repeat(12,1fr); gap:14px}
.card{grid-column:span 4; background:var(--card); border:1px solid var(--border); border-radius:16px; box-shadow:var(--shadow); padding:16px}
.card h3{margin:8px 0 6px}
.kpi{font-weight:900; font-size:26px; color:var(--blue)}

.table{width:100%; border-collapse:collapse; background:var(--card); border:1px solid var(--border); border-radius:12px; overflow:hidden}
.table th,.table td{padding:10px 12px; border-bottom:1px solid var(--border); text-align:left}
.table th{background:linear-gradient(180deg, color-mix(in oklab, var(--blue) 12%, transparent), transparent); color:var(--text)}

.form{display:grid; gap:10px; max-width:720px}
.input, textarea, select{padding:12px 14px; border-radius:12px; border:1px solid var(--border); background:var(--card); color:var(--text)}
textarea{min-height:120px}
label{font-weight:800}
.footer{padding:18px; border-top:1px solid var(--border); color:var(--muted)}

.badge-row{display:flex; gap:8px; flex-wrap:wrap}
.pill{padding:6px 10px; border-radius:999px; border:1px solid var(--border); background:var(--card); box-shadow:var(--shadow); font-weight:700; color:var(--text)}

@media (max-width: 980px){
  .brand .title{font-size:14px; max-width:58vw}
  .brand img{height:48px}
  .card{grid-column:span 12}
  .hero h1{font-size:32px}
}
@media (max-width: 560px){
  .nav-inner{flex-wrap:wrap}
  .brand{width:100%}
  .menu{width:100%; justify-content:space-between}
  .brand .title{max-width:70vw}
}

/* Floating contact buttons */
.fab-wrap{position:fixed; right:14px; bottom:14px; display:flex; flex-direction:column; gap:10px; z-index:60}
.fab{width:52px; height:52px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; box-shadow:var(--shadow); border:none; cursor:pointer}
.fab.whatsapp{background:#25D366}
.fab.messenger{background:#0084FF}
.fab.viber{background:#7360F2}
.fab svg{width:26px; height:26px; fill:#fff}


/* Footer one-row layout */
.footer-row{display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 20px}
.footer-row a{margin-left:12px; white-space:nowrap}
.footer-row .foot-right{margin-left:auto; display:flex; align-items:center; gap:12px}
.footer-row .sep{opacity:.5}
/* Floating square dark/light toggle */
.floating-theme{
  position:fixed; right:16px; bottom:16px; z-index:1000;
  display:flex; align-items:center; justify-content:center;
  width:48px; height:48px; border-radius:12px;
  box-shadow: var(--shadow);
  border:1px solid var(--border);
  background:var(--card); color:var(--text); cursor:pointer;
}
.floating-theme:hover{transform:translateY(-1px)}
:root.dark .floating-theme{background:var(--card); color:var(--text)}


/* Footer stacked centered with mobile-friendly layout */
.footer-stack{display:flex; flex-direction:column; align-items:center; gap:8px; padding:18px 20px; text-align:center}
.footer-stack .foot-row a{margin:0 8px}
.footer-stack .sep{opacity:.55}

/* Contact form styling */
.contact-form input, .contact-form textarea{
  width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:10px;
  background:var(--card); color:var(--text);
}
.contact-form input:focus, .contact-form textarea:focus{outline:none; box-shadow: var(--ring)}

html{background:var(--bg); color:var(--text)} /* ensure no white flash */


/* Modern sitemap cards */
.sitemap-grid .card{display:block; border:1px solid var(--border); background:var(--card); color:var(--text);
  border-radius:14px; padding:16px; box-shadow: var(--shadow); transition:transform .12s ease;}
.sitemap-grid .card:hover{transform: translateY(-2px);}
.sitemap-grid h3{margin:0 0 6px 0}
.lead{color:var(--muted); margin-bottom:14px}


/* Lightweight sitemap link list */
.sitemap-links{list-style:none; margin:8px 0 0 0; padding:0; display:grid; gap:8px}
.sitemap-links li a{display:flex; align-items:baseline; gap:10px; padding:10px 0; border-bottom:1px solid var(--border); color:var(--text); text-decoration:none}
.sitemap-links li a:hover .title{transform: translateX(2px)}
.sitemap-links .title{font-weight:600; transition:transform .12s ease}
.sitemap-links .desc{color:var(--muted); font-size:.95rem}


/* Contact modern grid */
.contact-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:20px;margin-top:20px;text-align:center}
.contact-item{padding:20px;border-radius:12px;background:var(--card);box-shadow:var(--shadow)}
.contact-item h3{margin-bottom:8px}


/* Floating theme restored style */
.floating-theme{position:fixed;right:16px;top:4px;z-index:1000;width:44px;height:44px;border-radius:50%;
display:flex;align-items:center;justify-content:center;font-size:22px;line-height:1;
background:var(--card);color:var(--text);border:1px solid var(--border);box-shadow:var(--shadow);}
.floating-theme:hover{transform:translateY(-1px)}


/* Standards pill badges */
.badges{display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-top:12px}
.badge{display:inline-block; padding:8px 14px; border-radius:9999px; border:1px solid var(--border);
  background:rgba(255,255,255,0.04); font-weight:700; letter-spacing:.2px; white-space:nowrap}
:root.dark .badge{background:rgba(255,255,255,0.06)}


/* Sticky header */
header.nav{ position: sticky; top:0; z-index:1000; background:var(--bg); backdrop-filter:saturate(120%) blur(2px); border-bottom:1px solid var(--border); }
:target{ scroll-margin-top: 80px; }

/* Modern floating theme toggle */
I2px; z-index: 1200;
  padding: 10px 14px; border-radius: 9999px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: 22px; line-height: 1; display: inline-flex; align-items:center; justify-content:center;
  transition: transform .12s ease, background .2s ease;
}
.floating-theme.modern:hover{ transform: translateY(-1px); }
@media (max-width: 640px){
  I2px; right: 12px; padding: 9px 12px; font-size: 20px; }
}


/* Modern floating theme toggle with SVG icons */
I2px; z-index: 1200;
  padding: 10px 12px; border-radius: 9999px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  display: inline-flex; align-items:center; justify-content:center;
  transition: transform .12s ease, background .2s ease, border-color .2s ease;
}
.floating-theme.modern .icon{ width: 22px; height: 22px; display:block }
.floating-theme.modern:hover{ transform: translateY(-1px); border-color: var(--muted) }
@media (max-width: 640px){
  I2px; right: 12px; padding: 9px 10px; }
  .floating-theme.modern .icon{ width: 20px; height: 20px; }
}


/* Catchy theme toggle effects */
:root{ --toggle-glow: rgba(100,160,255,.35); }           /* light mode glow (cool) */
:root.dark{ --toggle-glow: rgba(255,184,28,.38); }       /* dark mode glow (warm) */

I2px; z-index: 1200;
  padding: 10px 12px; border-radius: 9999px;
  background: color-mix(in oklab, var(--card) 85%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0,0,0,.22), 0 0 22px var(--toggle-glow);
  display: inline-flex; align-items:center; justify-content:center;
  transition: transform .14s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
  cursor: pointer;
}
.floating-theme.modern .icon{ width: 22px; height: 22px; display:block }

/* Hover micro-interactions: subtle scale + tilt, slightly stronger glow */
.floating-theme.modern:hover{
  transform: translateY(-1px) scale(1.06) rotate(6deg);
  box-shadow: 0 12px 28px rgba(0,0,0,.26), 0 0 28px var(--toggle-glow);
  border-color: color-mix(in oklab, var(--border) 70%, var(--text));
}

/* Click spin animation */
@keyframes spinOnce { from{ transform: rotate(0deg) } to{ transform: rotate(360deg) } }
.floating-theme.modern.spin .icon{ animation: spinOnce .5s ease both; }

/* Idle breathing glow (very subtle) */
@keyframes breatheGlow { 0%,100%{ box-shadow: 0 10px 24px rgba(0,0,0,.22), 0 0 18px var(--toggle-glow);} 50%{ box-shadow: 0 10px 24px rgba(0,0,0,.22), 0 0 24px var(--toggle-glow);} }
.floating-theme.modern{ animation: breatheGlow 3.2s ease-in-out infinite; }

/* Icon color accents per theme (keeps currentColor approach) */
:root:not(.dark) .floating-theme.modern{ color:#5aa1ff; }  /* moon shown in light: cool blue */
:root.dark .floating-theme.modern{ color:#f6c453; }        /* sun shown in dark: warm gold */

/* Responsive */
@media (max-width: 640px){
  I2px; right: 12px; padding: 9px 10px; }
  .floating-theme.modern .icon{ width: 20px; height: 20px; }
}


/* Update available toast */
.update-toast{
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(20px);
  background: color-mix(in oklab, var(--card) 92%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
  padding: 10px 14px; border-radius: 12px; z-index: 1400;
  display: inline-flex; gap: 12px; align-items: center;
  opacity: 0; transition: opacity .2s ease, transform .2s ease;
}
.update-toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }
.update-toast .btn-refresh{
  background: var(--text); color: var(--bg);
  border: none; border-radius: 10px; padding: 8px 12px; cursor: pointer; font-weight: 700;
}
.update-toast .btn-refresh:hover{ filter: brightness(0.95); }


/* Brand accent */
:root{ --accent: #f6c453; }        /* warm gold */
:root.dark{ --accent: #f6c453; }

/* Update available toast (branded) */
.update-toast{
  border-color: color-mix(in oklab, var(--border) 70%, var(--accent) 30%);
  box-shadow: 0 10px 24px rgba(0,0,0,.22), 0 8px 20px color-mix(in oklab, var(--accent) 20%, transparent);
}
.update-toast .btn-refresh{
  background: var(--accent);
  color: #111;
}

/* Success toast */
.success-toast{
  position: fixed; left: 50%; bottom: 72px; transform: translateX(-50%) translateY(20px);
  background: color-mix(in oklab, var(--card) 95%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0,0,0,.22), 0 6px 16px color-mix(in oklab, var(--accent) 24%, transparent);
  padding: 10px 12px; border-radius: 10px; z-index: 1400;
  opacity: 0; transition: opacity .2s ease, transform .2s ease;
  font-weight: 700;
}
.success-toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }


/* Floating Back-to-Top button */
/* Back-to-Top refined docking */
.back-to-top{
  position: fixed; right: 16px; top: 50%; z-index: 1199;
  width: 44px; height: 44px; border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent, #f6c453); color: #111;
  border: none; box-shadow: 0 10px 24px rgba(0,0,0,.22), 0 0 16px rgba(246,196,83,.35);
  cursor: pointer; opacity: 0; transform: translateY(-45%); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
.back-to-top .icon{ width: 22px; height: 22px; display:block }
.back-to-top:hover{ filter: brightness(0.97); box-shadow: 0 12px 26px rgba(0,0,0,.26), 0 0 22px rgba(246,196,83,.5); }
.back-to-top.show{ opacity: 1; transform: translateY(-50%); pointer-events: auto; }

@media (max-width: 640px){
  .back-to-top{
  position: fixed; right: 16px; top: 50%; z-index: 1199;
  width: 44px; height: 44px; border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent, #f6c453); color: #111;
  border: none; box-shadow: 0 10px 24px rgba(0,0,0,.22), 0 0 16px rgba(246,196,83,.35);
  cursor: pointer; opacity: 0; transform: translateY(-45%); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
  .back-to-top .icon{ width: 20px; height: 20px; }
}

.back-to-top:focus{
  outline: 2px solid var(--accent); outline-offset: 2px;
}


/* Variant for cache-updated toast */
.update-toast.cache span::before{ content:"⟳ "; font-weight:700; margin-right: 2px; }
