/* TeleCard light-classic — tokens, gradients, polish */
:root {
  --tc-primary: #7b2cbf;
  --tc-primary-strong: #6a1fa8;
  --tc-accent: #9d4edd;
  --tc-text: #1f1633;
  --tc-muted: #7d7499;
  --tc-gradient-main: linear-gradient(
    145deg,
    #6a1fa8 0%,
    #7b2cbf 38%,
    #9d4edd 72%,
    #6366f1 100%
  );
  --tc-gradient-soft: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
  --tc-gradient-glow-a: radial-gradient(ellipse at 15% 0%, rgba(157, 78, 221, 0.32), transparent 58%);
  --tc-gradient-glow-b: radial-gradient(ellipse at 85% 100%, rgba(99, 102, 241, 0.18), transparent 55%);
  --tc-shadow-soft: 0 10px 30px rgba(31, 22, 51, 0.08);
  --tc-shadow-purple: 0 18px 40px rgba(123, 44, 191, 0.22);
  --tc-radius: 16px;
  --tc-radius-lg: 24px;
}

html,
body,
h1, h2, h3, h4, h5, h6,
.form-group .form-control,
.btn, button, input, textarea, select {
  font-family: 'YekanBakh', Tahoma, sans-serif !important;
}

body.tc-theme-light-classic {
  background:
    var(--tc-gradient-glow-a),
    var(--tc-gradient-glow-b),
    #f3f0f8 !important;
  color: var(--tc-text);
}

body.tc-theme-light-classic a {
  color: var(--tc-primary);
}

/* ---------- Page shell gradients ---------- */

body.tc-theme-light-classic .lm-animated-bg {
  opacity: 0.55;
  filter: saturate(1.08) hue-rotate(-4deg);
}

body.tc-theme-light-classic .page-content {
  background: var(--tc-gradient-main) !important;
  box-shadow:
    0 0 100px -5px rgba(31, 22, 51, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06) !important;
}

body.tc-theme-light-classic .content-area {
  background: transparent;
}

body.tc-theme-light-classic .animated-section {
  background: var(--tc-gradient-soft);
  border: 1px solid rgba(123, 44, 191, 0.08);
  box-shadow: var(--tc-shadow-soft);
}

body.tc-theme-light-classic .page .header {
  border-radius: var(--tc-radius-lg);
}

/* ---------- Avatar ---------- */

.header-photo {
  aspect-ratio: 1 / 1;
}

.header-photo img,
.header-photo .tc-avatar-fallback {
  border-radius: 999px !important;
}

.header-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tc-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #fff 0%, #f3e8ff 40%, #9d4edd 100%);
  color: var(--tc-primary-strong);
  font-size: 2.4rem;
  font-weight: 900;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* ---------- Header buttons ---------- */

.header-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px !important;
}

.tc-header-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0 !important;
  padding: 0.78em 1.2em !important;
  border-radius: 14px !important;
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  text-decoration: none !important;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.tc-header-btn i {
  font-size: 1.05rem;
  flex-shrink: 0;
}

.tc-header-btn--primary {
  background: #fff !important;
  color: var(--tc-primary-strong) !important;
  border: 2px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.tc-header-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  color: var(--tc-primary) !important;
}

.tc-header-btn--phone {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.38) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.tc-header-btn--phone:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.55) !important;
}

/* ---------- AI assistant button (high contrast on purple sidebar) ---------- */

.tc-ai-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0 !important;
  padding: 0.78em 1.2em !important;
  border-radius: 14px !important;
  border: 2px solid rgba(255, 255, 255, 0.75) !important;
  cursor: pointer;
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  color: var(--tc-primary-strong) !important;
  background: linear-gradient(180deg, #ffffff 0%, #f3e8ff 100%) !important;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.14),
    0 0 0 3px rgba(255, 255, 255, 0.22);
  position: relative;
  overflow: hidden;
  animation: tcAiShake 2.8s ease-in-out infinite;
}

.tc-ai-btn::after {
  content: '';
  position: absolute;
  inset: -40% auto auto -30%;
  width: 40%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(157, 78, 221, 0.22), transparent);
  transform: rotate(20deg);
  animation: tcAiShine 3.2s ease-in-out infinite;
}

.tc-ai-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.16),
    0 0 0 3px rgba(255, 255, 255, 0.32);
}

.tc-ai-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.tc-ai-btn-icon {
  font-size: 1.1rem;
}

@keyframes tcAiShake {
  0%, 82%, 100% { transform: translateX(0) rotate(0); }
  84% { transform: translateX(-3px) rotate(-1.5deg); }
  86% { transform: translateX(3px) rotate(1.5deg); }
  88% { transform: translateX(-2px) rotate(-1deg); }
  90% { transform: translateX(2px) rotate(1deg); }
  92% { transform: translateX(0) rotate(0); }
}

@keyframes tcAiShine {
  0%, 55% { left: -40%; opacity: 0; }
  60% { opacity: 1; }
  75% { left: 120%; opacity: 0; }
  100% { left: 120%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .tc-ai-btn,
  .tc-ai-btn::after {
    animation: none;
  }
}

/* ---------- Site footer (outside header; quiet, on light page background) ---------- */

.tc-site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  line-height: 1.5;
  text-align: center;
}

.tc-site-footer .tc-footer-brand {
  margin: 0;
  color: var(--tc-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.tc-site-footer .tc-footer-brand a {
  color: var(--tc-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.tc-site-footer .tc-footer-brand a:hover {
  color: var(--tc-primary);
}

.tc-site-footer .tc-footer-year {
  color: rgba(125, 116, 153, 0.7);
  font-weight: 600;
}

.tc-site-footer .tc-footer-cta {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 5px 13px;
  border-radius: 999px;
  color: var(--tc-primary);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  background: rgba(123, 44, 191, 0.06);
  border: 1px solid rgba(123, 44, 191, 0.14);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tc-site-footer .tc-footer-cta:hover {
  color: var(--tc-primary-strong);
  background: rgba(123, 44, 191, 0.12);
  border-color: rgba(123, 44, 191, 0.28);
  text-decoration: none;
}

/* ---------- Simple fade for desktop tab transitions (PageTransitions anim #9) ---------- */

@keyframes tcSectionFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes tcSectionFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

body.tc-theme-light-classic .animated-section.animated-section-moveFromRightFade,
body.tc-theme-light-classic .animated-section.animated-section-moveFromLeftFade {
  animation: tcSectionFadeIn 0.34s ease both !important;
}

body.tc-theme-light-classic .animated-section.animated-section-moveToLeftFade,
body.tc-theme-light-classic .animated-section.animated-section-moveToRightFade {
  animation: tcSectionFadeOut 0.34s ease both !important;
}

/* ---------- Main menu link-text tooltip ---------- */

ul.main-menu .link-text {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* ---------- Social links in header ---------- */

.social-links ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

/* Higher specificity than the base theme's `.social-links ul li a` (30px)
   so our larger size actually wins. */
body.tc-theme-light-classic .social-links ul li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px !important;
  height: 64px !important;
  padding: 0 !important;
  line-height: 1 !important;
  border-radius: 18px;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
  overflow: visible;
  transition: transform 0.2s ease, filter 0.2s ease;
}

body.tc-theme-light-classic .social-links ul li a:hover {
  transform: translateY(-3px) scale(1.04);
  filter: brightness(1.06);
  background-color: transparent !important;
}

.social-links .tc-social-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.22));
  border-radius: 18px;
}

.tc-social-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- Tab SVG icons ---------- */

.menu-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 0 !important;
}

.tc-tab-svg {
  width: 22px;
  height: 22px;
  display: block;
}

.tc-home-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: inherit;
}

.tc-home-nav-icon .tc-tab-svg {
  width: 18px;
  height: 18px;
}

/* ---------- Content panels ---------- */

.content-area,
.animated-sections,
.animated-section {
  border-radius: var(--tc-radius-lg);
}

.page-title h2 span {
  background: linear-gradient(90deg, var(--tc-primary), var(--tc-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Home tab ---------- */

/* Desktop: vendor uses 60px which is oversized for Persian/English names */
body.tc-theme-light-classic .title-block h2 {
  font-size: 2.35rem !important;
  line-height: 1.25 !important;
  margin: 0 0 8px !important;
}

.tc-home-lead {
  max-width: 720px;
  margin: 0 auto 28px;
  color: #5b5270;
  font-size: 1rem;
  line-height: 1.95;
  text-align: justify;
}

.tc-prose {
  color: var(--tc-text);
  font-size: 0.95rem;
  line-height: 1.95;
  text-align: justify;
}

.tc-prose img {
  max-width: 100%;
  border-radius: var(--tc-radius);
}

.tc-prose a {
  color: var(--tc-primary);
  text-decoration: underline;
}

.tc-video-wrap {
  margin-top: 28px;
  border-radius: 20px;
  overflow: hidden;
  background: #100a24;
  box-shadow: var(--tc-shadow-purple);
  line-height: 0;
}

.tc-video-wrap video {
  width: 100%;
  display: block;
  border-radius: 20px;
}

.tc-home-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 8px;
}

.tc-home-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(123, 44, 191, 0.16);
  color: var(--tc-primary-strong);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--tc-shadow-soft);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

.tc-home-nav-btn i {
  font-size: 0.95rem;
  opacity: 0.85;
}

.tc-home-nav-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(123, 44, 191, 0.35);
  box-shadow: var(--tc-shadow-purple);
  background: linear-gradient(180deg, #fff, #faf5ff);
  color: var(--tc-primary);
}

/* ---------- Items grid (masonry) ---------- */

.tc-items-grid {
  column-count: 1;
  column-gap: 16px;
}

@media (min-width: 640px) {
  .tc-items-grid {
    column-count: 2;
  }
}

@media (min-width: 1100px) {
  .tc-items-grid.tc-items-grid--wide {
    column-count: 3;
  }
}

.tc-item-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 0 16px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  background: var(--tc-gradient-soft);
  border: 1px solid rgba(123, 44, 191, 0.1);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--tc-shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tc-item-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tc-shadow-purple);
}

.tc-item-media {
  aspect-ratio: 4 / 3;
  background: #faf5ff;
  overflow: hidden;
}

.tc-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tc-item-card:hover .tc-item-media img {
  transform: scale(1.05);
}

.tc-item-body {
  padding: 16px 18px 18px;
}

.tc-item-body h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--tc-text);
}

.tc-item-body p {
  margin: 8px 0 0;
  color: var(--tc-muted);
  font-size: 0.86rem;
  line-height: 1.8;
  text-align: justify;
}

/* ---------- Contact tab ---------- */

.tc-contact-block {
  margin-bottom: 28px;
}

.tc-contact-block h3 {
  position: relative;
  margin: 0 0 14px;
  padding-bottom: 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--tc-primary-strong);
}

.tc-contact-block h3::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tc-primary), var(--tc-accent));
}

.tc-social-contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 540px) {
  .tc-social-contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .tc-social-contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tc-social-contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--tc-radius);
  background: var(--tc-gradient-soft);
  border: 1px solid rgba(123, 44, 191, 0.12);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--tc-shadow-soft);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.tc-social-contact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(123, 44, 191, 0.28);
  box-shadow: var(--tc-shadow-purple);
}

.tc-social-contact-card .tc-social-icon-wrap {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(31, 22, 51, 0.1);
}

.tc-social-contact-card .tc-social-meta {
  min-width: 0;
  flex: 1;
}

.tc-social-contact-card .tc-social-label {
  display: block;
  color: var(--tc-muted);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.tc-social-contact-card .tc-social-value {
  display: block;
  color: var(--tc-text);
  font-size: 0.86rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tc-contact-vcard-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--tc-primary), var(--tc-accent));
  color: #fff !important;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: var(--tc-shadow-purple);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tc-contact-vcard-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(123, 44, 191, 0.28);
  color: #fff !important;
}

.tc-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tc-contact-list li a,
.tc-contact-list li > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--tc-radius);
  background: var(--tc-gradient-soft);
  border: 1px solid rgba(123, 44, 191, 0.1);
  color: inherit;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tc-contact-list li a:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: var(--tc-shadow-soft);
}

.tc-contact-list .tc-contact-row-start {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tc-contact-list .tc-contact-type-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(123, 44, 191, 0.1);
  color: var(--tc-primary);
  font-size: 1rem;
}

.tc-contact-list .title {
  color: var(--tc-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.tc-contact-list .value {
  color: var(--tc-text);
  font-weight: 800;
  font-size: 0.9rem;
  text-align: left;
  word-break: break-word;
}

/* ---------- Location navigation cards ---------- */

.tc-nav-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--tc-radius);
  background: linear-gradient(135deg, #fff 0%, #f3e8ff 100%);
  border: 1px solid rgba(123, 44, 191, 0.16);
  color: inherit;
  font-family: inherit;
  text-align: right;
  cursor: pointer;
  box-shadow: var(--tc-shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tc-nav-open:hover {
  transform: translateY(-2px);
  border-color: rgba(123, 44, 191, 0.32);
  box-shadow: var(--tc-shadow-purple);
}

.tc-contact-type-icon--nav {
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.18), rgba(99, 102, 241, 0.16));
}

.tc-nav-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tc-nav-hint {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--tc-primary);
}

.tc-nav-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  max-width: 48%;
}

.tc-nav-cta strong {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--tc-primary), var(--tc-accent));
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
}

/* ---------- Maps chooser sheet ---------- */

.tc-nav-sheet[hidden] {
  display: none !important;
}

.tc-nav-sheet {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.tc-nav-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 10, 40, 0.48);
  backdrop-filter: blur(4px);
}

.tc-nav-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 18px max(18px, env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, #fff, #faf5ff);
  box-shadow: 0 -16px 40px rgba(31, 22, 51, 0.18);
  animation: tcSheetUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.tc-nav-sheet-handle {
  width: 42px;
  height: 4px;
  margin: 4px auto 14px;
  border-radius: 999px;
  background: rgba(123, 44, 191, 0.2);
}

.tc-nav-sheet-title {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--tc-text);
}

.tc-nav-sheet-sub {
  margin: 6px 0 16px;
  text-align: center;
  color: var(--tc-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.tc-nav-sheet-actions {
  display: grid;
  gap: 8px;
}

.tc-nav-sheet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(123, 44, 191, 0.14);
  color: var(--tc-primary-strong);
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--tc-shadow-soft);
}

.tc-nav-sheet-btn:hover {
  border-color: rgba(123, 44, 191, 0.3);
  background: #faf5ff;
}

.tc-nav-sheet-btn--muted {
  color: var(--tc-muted);
}

.tc-nav-sheet-cancel {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--tc-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

@keyframes tcSheetUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Desktop side-rail: hide mobile locale nav item */
body.tc-theme-light-classic ul.main-menu > li.tc-nav-locale {
  display: none;
}

/* Hide default FAB — AI opens from header button */
body.tc-theme-light-classic .tc-chat-fab {
  display: none !important;
}

/* Rounded corners consistency */
.preloader,
.preloader-spinner,
.lmpixels-arrows-nav > div {
  border-radius: 14px;
}

/* Always hide legacy hamburger */
body.tc-theme-light-classic .menu-toggle {
  display: none !important;
}

/* ---------- Mobile / tablet layout ---------- */

@media (max-width: 1024px) {
  html {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.tc-theme-light-classic {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.tc-theme-light-classic .page {
    height: auto !important;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible !important;
    padding: 14px 12px calc(100px + env(safe-area-inset-bottom)) !important;
  }

  /* .page-content is now just a layout wrapper: the purple header card and
     the white tab shell are two separate sibling cards, not nested boxes. */
  body.tc-theme-light-classic .page-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 720px;
    min-height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  /* Purple header card: sized to its own content, not stretched full height */
  body.tc-theme-light-classic #site_header.header,
  body.tc-theme-light-classic .header.mobile-menu-hide {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 24px 18px 20px !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    transform: none !important;
    background: var(--tc-gradient-main) !important;
    border-radius: 22px !important;
    box-shadow: 0 16px 36px rgba(31, 22, 51, 0.22) !important;
    z-index: 2;
  }

  body.tc-theme-light-classic .header-photo {
    width: 96px !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    margin: 0 auto 14px !important;
  }

  body.tc-theme-light-classic .header-titles h2 {
    font-size: 1.25rem !important;
    margin: 4px 0 4px !important;
  }

  body.tc-theme-light-classic .header-titles h4 {
    font-size: 0.85rem !important;
  }

  body.tc-theme-light-classic .tc-avatar-fallback {
    font-size: 1.8rem !important;
  }

  body.tc-theme-light-classic .header-buttons {
    margin-top: 16px !important;
    gap: 8px;
  }

  body.tc-theme-light-classic .tc-header-btn,
  body.tc-theme-light-classic .tc-ai-btn {
    font-size: 0.86rem !important;
    padding: 0.68em 1em !important;
  }

  /* White tab shell: one fixed card. Tab switches only swap the content
     inside it — the card itself never disappears or resizes abruptly. */
  body.tc-theme-light-classic .content-area {
    position: relative !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 50vh;
    padding: 0 !important;
    background: #fff !important;
    border-radius: 22px !important;
    border: 1px solid rgba(123, 44, 191, 0.08);
    box-shadow: 0 14px 34px rgba(31, 22, 51, 0.12) !important;
    overflow: hidden !important;
  }

  body.tc-theme-light-classic .animated-sections {
    position: relative !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    perspective: none !important;
  }

  body.tc-theme-light-classic .animated-section {
    position: relative !important;
    display: none !important;
    width: 100% !important;
    padding: 20px 16px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    /* Not !important: the mobile tab controller drives opacity inline. */
    opacity: 1;
    visibility: visible;
    animation: none !important;
  }

  body.tc-theme-light-classic .animated-section.section-active {
    display: block !important;
  }

  /* No second nested box: the shell (.content-area) already provides the
     white card, so section-content only carries inner spacing. */
  body.tc-theme-light-classic .animated-section .section-content {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  body.tc-theme-light-classic .title-block h2 {
    font-size: 1.7rem !important;
    line-height: 1.3 !important;
    margin: 0 0 6px !important;
  }

  body.tc-theme-light-classic .sp-subtitle {
    font-size: 0.98rem !important;
  }

  body.tc-theme-light-classic .tc-home-lead,
  body.tc-theme-light-classic .tc-prose {
    font-size: 0.9rem !important;
  }

  body.tc-theme-light-classic .page-title h2 {
    font-size: 1.3rem !important;
  }

  body.tc-theme-light-classic .tc-contact-block h3 {
    font-size: 0.98rem !important;
  }

  body.tc-theme-light-classic .tc-home-nav-btn {
    font-size: 0.82rem !important;
    padding: 10px 16px !important;
  }

  body.tc-theme-light-classic .lmpixels-arrows-nav {
    display: none !important;
  }

  /* Mobile footer: quiet column below the white shell, above the bottom nav */
  body.tc-theme-light-classic .tc-site-footer {
    position: relative;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 720px;
    margin: 24px auto 0;
    padding: 18px 12px 4px;
    border-top: 1px solid rgba(123, 44, 191, 0.1);
  }

  /* Bottom navigation from main-menu */
  body.tc-theme-light-classic ul.main-menu {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: 520px;
    margin: 0 auto 10px !important;
    padding: 8px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(123, 44, 191, 0.14);
    border-radius: 24px !important;
    box-shadow:
      0 18px 40px rgba(31, 22, 51, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    z-index: 1000 !important;
    list-style: none;
    padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
  }

  body.tc-theme-light-classic.tc-has-items ul.main-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.tc-theme-light-classic.tc-is-bilingual ul.main-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.tc-theme-light-classic.tc-has-items.tc-is-bilingual ul.main-menu {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.tc-theme-light-classic ul.main-menu > li.tc-nav-locale {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  body.tc-theme-light-classic ul.main-menu .tc-nav-locale-switcher {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    min-height: 58px;
    padding: 6px 4px;
    border-radius: 18px;
    background: rgba(123, 44, 191, 0.06);
    border: 1px solid rgba(123, 44, 191, 0.12);
  }

  body.tc-theme-light-classic ul.main-menu .tc-nav-locale-segment {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    min-width: 0;
    padding: 6px 4px;
    border: none;
    border-radius: 14px;
    background: transparent;
    color: #8b819f;
    font-family: inherit;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
      color 0.22s ease,
      background 0.22s ease,
      box-shadow 0.22s ease,
      transform 0.18s ease;
  }

  body.tc-theme-light-classic ul.main-menu .tc-nav-locale-segment.is-active {
    color: #fff;
    background: linear-gradient(145deg, #6a1fa8 0%, #7b2cbf 38%, #9d4edd 72%, #6366f1 100%);
    box-shadow: 0 6px 14px rgba(123, 44, 191, 0.28);
  }

  body.tc-theme-light-classic ul.main-menu .tc-nav-locale-segment:active {
    transform: scale(0.96);
  }

  body.tc-theme-light-classic ul.main-menu .tc-nav-locale-flag {
    display: inline-flex;
    width: 18px;
    height: 12px;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  }

  body.tc-theme-light-classic ul.main-menu .tc-nav-locale-flag svg {
    width: 100%;
    height: 100%;
    display: block;
  }

  body.tc-theme-light-classic ul.main-menu .tc-nav-locale-label {
    letter-spacing: 0.02em;
  }

  body.tc-theme-light-classic ul.main-menu > li {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
  }

  body.tc-theme-light-classic ul.main-menu a {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 58px;
    padding: 8px 6px !important;
    border-radius: 18px;
    color: #8b819f !important;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition:
      color 0.22s ease,
      background 0.22s ease,
      transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }

  body.tc-theme-light-classic ul.main-menu a:active {
    transform: scale(0.96);
  }

  body.tc-theme-light-classic ul.main-menu .menu-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: inherit;
    transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
  }

  body.tc-theme-light-classic ul.main-menu .tc-tab-svg {
    width: 20px;
    height: 20px;
  }

  body.tc-theme-light-classic ul.main-menu .link-text {
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
    font-size: 0.68rem !important;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    border-radius: 0 !important;
  }

  body.tc-theme-light-classic ul.main-menu a.active,
  body.tc-theme-light-classic ul.main-menu a:focus,
  body.tc-theme-light-classic ul.main-menu a:hover {
    color: var(--tc-primary) !important;
    background: linear-gradient(160deg, rgba(123, 44, 191, 0.12), rgba(157, 78, 221, 0.08));
  }

  body.tc-theme-light-classic ul.main-menu a.active .menu-icon {
    color: #fff;
    background: var(--tc-gradient-main);
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 10px 18px rgba(123, 44, 191, 0.28);
  }
}

@media (min-width: 1025px) {
  /* Menu lives outside .page; floating rail just outside the LEFT edge of
     .page-content. JS (syncDesktopMenu) refines top/left from the real box. */
  body.tc-theme-light-classic ul.main-menu {
    position: fixed !important;
    top: calc(10vh + 30px);
    left: max(12px, calc(50% - 640px - 90px));
    right: auto !important;
    z-index: 999 !important;
    margin: 0 !important;
    text-align: center;
  }

  body.tc-theme-light-classic ul.main-menu > li {
    text-align: center;
  }

  body.tc-theme-light-classic ul.main-menu a {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  body.tc-theme-light-classic ul.main-menu .menu-icon {
    display: inline-flex !important;
    margin: 0 auto;
    color: inherit;
  }

  /* Footer: outside header, pinned quietly at the bottom of the viewport
     inside the page's bottom margin strip. */
  body.tc-theme-light-classic .tc-site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: max(12px, calc(5vh - 14px));
    z-index: 5;
    margin: 0;
    padding: 0 16px;
    pointer-events: none;
  }

  body.tc-theme-light-classic .tc-site-footer .tc-footer-brand,
  body.tc-theme-light-classic .tc-site-footer .tc-footer-cta {
    pointer-events: auto;
  }
}
