/* ============================================================
   WDC Studio — Main Stylesheet
   ============================================================ */

:root {
  --color-primary:      #0f172a;
  --color-secondary:    #334155;
  --color-muted:        #64748b;
  --color-accent:       #6366f1;
  --color-accent-hover: #4f46e5;
  --color-bg:           #ffffff;
  --color-bg-2:         #f8fafc;
  --color-border:       #e2e8f0;
  --header-height:      72px;
  --radius-sm:          6px;
  --radius-md:          10px;
  --radius-lg:          16px;
  --shadow-md:          0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:          0 12px 40px rgba(0,0,0,0.12);
  --font:               -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); color: var(--color-primary); background: var(--color-bg); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ============================================================
   HEADER
   ============================================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-container {
  max-width: 1640px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
}

/* Logo */
.logo { flex-shrink: 0; margin-right: 36px; }
.logo img { height: 40px; width: auto; }

/* Nav */
.nav { flex: 1; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; }

.nav-link,
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-secondary);
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-link:hover,
.nav-btn:hover { color: var(--color-primary); background: var(--color-bg-2); }

.nav-arrow {
  width: 14px;
  height: 14px;
  opacity: .55;
  transition: transform .2s;
  flex-shrink: 0;
}
.nav-item.is-open .nav-arrow { transform: rotate(180deg); }

/* ---- Small Dropdown (Company) ---- */
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 185px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 1002;
}
.dropdown.is-visible { display: block; }
.dropdown a {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--color-secondary);
  border-radius: var(--radius-sm);
  transition: background .12s, color .12s;
}
.dropdown a:hover { background: var(--color-bg-2); color: var(--color-primary); }

/* ---- Mega Menu (Services) ---- */
.mega-menu {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  max-height: calc(100vh - var(--header-height));
  overflow: hidden;
}
.mega-menu.is-visible { display: block; }

.mega-menu-inner {
  max-width: 1640px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  height: 100%;
}

/* Category sidebar */
.mega-cats {
  flex-shrink: 0;
  width: 235px;
  padding: 20px 0;
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
}

.mega-cat-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-secondary);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  text-align: left;
  transition: background .12s, color .12s;
  gap: 8px;
}
.mega-cat-btn:hover { background: var(--color-bg-2); color: var(--color-primary); }
.mega-cat-btn.active { background: rgba(99,102,241,.08); color: var(--color-accent); font-weight: 600; }

.mega-cat-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--color-muted);
  background: var(--color-bg-2);
  border-radius: 10px;
  padding: 1px 6px;
}
.mega-cat-btn.active .mega-cat-count { background: rgba(99,102,241,.12); color: var(--color-accent); }

/* Services right wrapper */
.mega-services-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Services panel */
.mega-services-panel {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
  min-height: 0;
}

.mega-services-grid {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.mega-services-grid.active { display: grid; }

.mega-service-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  transition: background .12s;
  color: var(--color-primary);
}
.mega-service-link:hover { background: var(--color-bg-2); }

.mega-service-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--color-bg-2);
}
.mega-service-text { min-width: 0; }
.mega-service-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mega-service-slogan { font-size: 11px; color: var(--color-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mega-menu-footer {
  border-top: 1px solid var(--color-border);
  padding: 12px 24px 12px 234px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  background: var(--color-bg-2);
}
.mega-menu-footer a {
  font-size: 13px;
  color: var(--color-accent);
  font-weight: 500;
  transition: color .12s;
}
.mega-menu-footer a:hover { color: var(--color-accent-hover); }

/* ============================================================
   HEADER ACTIONS
   ============================================================ */

/* ── HEADER PHONE ── */
.header-phone {
  display: inline-flex;
  height: 38px;
  border-radius: var(--radius-sm);
  padding: 2px;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899, #6366f1);
  background-size: 300% 300%;
  animation: hdr-border-spin 3s linear infinite;
  text-decoration: none;
  flex-shrink: 0;
}
@keyframes hdr-border-spin {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.header-phone-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 4px;
  border-radius: calc(var(--radius-sm) - 2px);
  background: #fff;
  transition: background .2s;
  white-space: nowrap;
  height: 100%;
}
.header-phone:hover .header-phone-inner {
  background: #f5f3ff;
}
.header-phone-icon {
  width: 26px;
  height: 26px;
  border-radius: calc(var(--radius-sm) - 2px);
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  flex-shrink: 0;
}
.header-phone-text {
  display: flex;
  flex-direction: column;
  gap: 0px;
}
.header-phone-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6366f1;
  line-height: 1.2;
}
.header-phone-num {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: .01em;
  line-height: 1.25;
  transition: color .2s;
}
.header-phone:hover .header-phone-num {
  color: #4f46e5;
}
@media (max-width: 1100px) {
  .header-phone-label { display: none; }
}
@media (max-width: 768px) {
  .header-phone { display: none; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 20px;
}

.lang-dropdown {
  position: relative;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 10px;
  background: var(--color-bg-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-secondary);
  cursor: pointer;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.lang-btn:hover,
.lang-dropdown.is-open .lang-btn { border-color: var(--color-accent); color: var(--color-accent); }
.lang-globe { width: 16px; height: 16px; flex-shrink: 0; }
.lang-current {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--color-primary);
}
.lang-chevron {
  width: 12px;
  height: 12px;
  opacity: .55;
  flex-shrink: 0;
  transition: transform .2s;
}
.lang-dropdown.is-open .lang-chevron { transform: rotate(180deg); }
.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  list-style: none;
  padding: 4px 0;
  z-index: 200;
}
.lang-dropdown.is-open .lang-menu { display: block; }
.lang-option {
  display: block;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-secondary);
  transition: background .1s, color .1s;
}
.lang-option:hover { background: var(--color-bg-2); color: var(--color-primary); }
.lang-option.is-active { color: var(--color-accent); }

.btn-login {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-login:hover { border-color: var(--color-accent); color: var(--color-accent); }

.btn-register {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.btn-register:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }

/* ============================================================
   HAMBURGER & MOBILE NAV
   ============================================================ */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  padding: 4px;
  margin-left: 12px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  overflow-y: auto;
  z-index: 999;
  padding: 8px 20px 32px;
}
.mobile-nav.is-open { display: block; }

.mobile-nav-item { border-bottom: 1px solid var(--color-border); }

.mobile-nav-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-primary);
  background: none;
  border: none;
  text-align: left;
}
.mobile-nav-trigger a {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-primary);
  flex: 1;
  padding: 14px 0;
  display: block;
}
.mobile-nav-trigger.is-plain { justify-content: flex-start; padding: 0; }

.mobile-chevron {
  width: 18px;
  height: 18px;
  color: var(--color-muted);
  transition: transform .2s;
  flex-shrink: 0;
}
.mobile-nav-trigger.is-open .mobile-chevron { transform: rotate(180deg); }

.mobile-submenu { display: none; padding-bottom: 10px; }
.mobile-submenu.is-open { display: block; }

.mobile-submenu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--color-secondary);
  border-radius: var(--radius-sm);
  transition: background .12s;
}
.mobile-submenu-link:hover { background: var(--color-bg-2); }
.mobile-submenu-link img { width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0; }

.mobile-cat-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-muted);
  padding: 12px 10px 6px;
}

.mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 0;
}
.mobile-btn-login {
  display: block;
  text-align: center;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.mobile-btn-register {
  display: block;
  text-align: center;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  border-radius: var(--radius-md);
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, #eef2ff 0%, #f8fafc 60%, #fff 100%);
  padding: 80px 24px;
  text-align: center;
}

.hero-inner { max-width: 680px; }

.hero-tag {
  display: inline-block;
  padding: 4px 13px;
  background: rgba(99,102,241,.1);
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-radius: 20px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-primary);
  margin-bottom: 20px;
  letter-spacing: -.025em;
}

.hero p {
  font-size: 18px;
  color: var(--color-secondary);
  margin-bottom: 36px;
  line-height: 1.65;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  border-radius: var(--radius-md);
  transition: background .15s, transform .1s;
}
.hero-btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); }

.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color .15s, color .15s, transform .1s;
}
.hero-btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent); transform: translateY(-1px); }

/* ============================================================
   FOOTER
   ============================================================ */

.footer { background: var(--color-bg-2); color: var(--color-muted); border-top: 1px solid var(--color-border); }

/* ── Brand row ── */
.footer-brand-row {
  max-width: 1280px; margin: 0 auto;
  padding: 48px 24px 36px;
  display: flex; align-items: flex-start;
  gap: 48px; justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.footer-brand { flex: 0 0 auto; max-width: 280px; }
.footer-logo { display: inline-block; margin-bottom: 14px; }
.footer-logo img { height: 28px; }
.footer-desc { font-size: 14px; line-height: 1.7; color: var(--color-muted); margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; background: var(--color-bg);
  border: 1px solid var(--color-border); border-radius: 50%;
  color: var(--color-muted); transition: background .15s, color .15s, border-color .15s;
}
.footer-social a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.footer-social svg { width: 15px; height: 15px; fill: currentColor; }

.footer-links-right { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-info-col h4 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--color-primary); margin-bottom: 14px;
}
.footer-info-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-info-col ul li a { font-size: 13px; color: var(--color-muted); transition: color .12s; }
.footer-info-col ul li a:hover { color: var(--color-primary); }

/* ── Services section ── */
.footer-services-section {
  max-width: 1280px; margin: 0 auto;
  padding: 36px 24px;
  
}
.footer-services-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--color-muted); margin-bottom: 24px;
}
.footer-svc-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 28px 24px; margin-bottom: 28px;
}
.footer-svc-grid:last-child { margin-bottom: 0; }
.footer-svc-cat h4 {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--color-muted);
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}
.footer-svc-list { display: flex; flex-direction: column; gap: 1px; }
.footer-service-link {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px; font-size: 12.5px; color: var(--color-muted);
  border-radius: 5px; transition: color .12s, background .12s;
}
.footer-service-link:hover { color: var(--color-primary); background: var(--color-bg); }
.footer-service-icon {
  width: 18px; height: 18px; border-radius: 4px;
  flex-shrink: 0; object-fit: cover;
}

/* ── Bottom bar ── */
.footer-bottom { border-top: 1px solid var(--color-border); padding: 16px 24px; background: var(--color-bg); }
.footer-bottom-inner {
  max-width: 1280px; margin: 0 auto; display: flex;
  align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-bottom p { font-size: 13px; color: var(--color-muted); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 13px; color: var(--color-muted); transition: color .12s; }
.footer-bottom-links a:hover { color: var(--color-primary); }
.footer-powered {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--color-muted);
}
.footer-powered img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .mega-services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
  .header-actions .btn-login,
  .header-actions .btn-register { display: none; }
  .hamburger { display: flex; }

  .footer-brand-row { flex-direction: column; gap: 24px; }
  .footer-links-right { gap: 24px; }
  .footer-svc-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .header-container { padding: 0 16px; }
  .footer-svc-grid { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero { padding: 60px 20px; }
}
