/* ══════════════════════════════════════════════
   CORE.CSS — shared across every page
   Theme variables, reset, scrollbar, nav, breadcrumb,
   buttons, the hero "stage" visual component (shared by
   index.html and robot.html), shared section-header
   pattern (.sec-eyebrow/.sec-title/.gallery-header),
   the products/projects card-grid component
   (.projects-section/.projects-grid/.project-card*,
   used by index.html's project list and by
   galym_robots/index.html's robot catalog),
   fade-up scroll animation, footer + social buttons.
   Load this on every page, before any page-specific CSS.
══════════════════════════════════════════════ */

:root {
    --bg:     #ffffff;
    --bg2:    #f5f5f5;
    --bg3:    #ededed;
    --accent:  #2D6A4F;
    --accent2: #1F4D38;
    --accent-foreground: #ffffff;
    --text:    #1B3A2F;
    --muted:   rgba(27, 58, 47, 0.65);
    --border:  rgba(45, 106, 79, 0.15);
    --glow:    rgba(45, 106, 79, 0.12);
    --nav-bg:  rgba(255, 255, 255, 0.98);
    --drawer-bg: rgba(255, 255, 255, 0.99);
    --logo-text: #1B3A2F;
    --logo-stroke: #ffffff;

    --hero-card-bg: rgba(255,255,255,0.92);
    --hero-ctrl-bg: rgba(255,255,255,0.95);
    --hero-ctrl-border: rgba(45,106,79,0.25);
    --hero-text-shadow: 0 2px 12px rgba(255,255,255,0.85);

}

[data-theme="dark"] {
    --bg:     #0F1A15;
    --bg2:    #16231C;
    --bg3:    #1C2C23;
    --accent:  #4CAF7D;
    --accent2: #79C99E;
    --accent-foreground: #0F1A15;
    --text:    #EAF3EE;
    --muted:   rgba(234, 243, 238, 0.55);
    --border:  rgba(255, 255, 255, 0.08);
    --glow:    rgba(76, 175, 125, 0.22);
    --nav-bg:  rgba(15, 26, 21, 0.98);
    --drawer-bg: rgba(15, 26, 21, 0.98);
    --logo-text: #EAF3EE;
    --logo-stroke: #0F1A15;

    --hero-card-bg: rgba(15,26,21,0.88);
    --hero-ctrl-bg: rgba(22,35,28,0.88);
    --hero-ctrl-border: rgba(255,255,255,0.1);
    --hero-text-shadow: none;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h, 64px) + 12px);
}

html.theme-changing,
html.theme-changing * {
    transition-property: color, background-color, border-color, box-shadow, fill, stroke, outline-color, text-shadow !important;
    transition-duration: 350ms !important;
    transition-timing-function: ease !important;
}

@media (prefers-reduced-motion: reduce) {
    html.theme-changing,
    html.theme-changing * {
        transition-duration: 0.01ms !important;
    }
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent2);
    outline-offset: 3px;
    border-radius: 4px;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    position: relative;
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 2px;
}

#mainNav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    isolation: isolate;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 0.5px solid var(--border);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03), 0 8px 24px -12px rgba(0, 0, 0, 0.12);
    transition: padding 0.3s, background 0.3s;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
}

#mainNav > .nav-logo {
    flex: 0 0 auto;
    min-width: 0;
    position: relative;
    z-index: 1011;
}

.nav-right {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: auto;
}

.nav-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.nav-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 0.65rem;
    font-size: 11px;
    font-weight: 500;
    font-family: var(--font-body);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.25s, color 0.25s, background 0.25s;
}

.nav-auth-btn:hover {
    border-color: var(--accent);
    color: var(--accent2);
    background: var(--glow);
}

.nav-auth-label-full { display: none; }

.nav-auth-label-short { display: inline; }

@media (min-width: 1280px) {
.nav-auth-label-full { display: inline; }

.nav-auth-label-short { display: none; }
}

.nav-session {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.nav-session[hidden] { display: none; }

#navAuthLogin[hidden], .nav-auth-btn[hidden] { display: none !important; }

.nav-session-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: none;
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: all 0.3s;
}

.nav-session-avatar:hover,
.nav-session-avatar[aria-expanded="true"] {
    background: var(--glow);
    border-color: var(--accent);
}

.nav-session-avatar svg { width: 16px; height: 16px; }

.nav-session-dropdown {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    min-width: 160px;
    padding: 0.75rem;
    background: var(--nav-bg, var(--bg));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 0.5px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.25);
    z-index: 1012;
}

.nav-session-dropdown.open { display: flex; }

.nav-session-name {
    color: var(--text);
    font-weight: 600;
    font-size: 13px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-session-logout {
    background: none;
    border: 1px solid var(--muted);
    border-radius: 100px;
    padding: 0.35rem 0.8rem;
    font-size: 12px;
    cursor: pointer;
    color: inherit;
    flex-shrink: 0;
    width: 100%;
}

.nav-session-logout:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.nav-cta {
    background: var(--accent);
    color: var(--accent-foreground);
    border: none;
    padding: 0.55rem 1.3rem;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: opacity 0.2s;
}

.nav-cta:hover { opacity: 0.85; }

.nav-logo {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    height: 34px;
    font-size: 15px;
}

.nav-logo span {
    background: var(--accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-logo svg.logo-text {
    width: 68px !important;
    height: 26px !important;
    flex-shrink: 0;
}

.logo-img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    object-fit: contain;
}

.logo-text {
    width: 68px;
    height: 26px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 0;
    position: fixed;
    top: 0;
    right: 0;
    width: min(75vw, 280px);
    height: 100dvh;
    background: var(--drawer-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 5rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    border-left: 0.5px solid var(--border);
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px !important;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    padding: 0.85rem 0;
    width: 100%;
    border-bottom: 0.5px solid var(--border);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover::after { width: 100%; }

.nav-links a:hover { color: var(--accent2); }

.nav-hamburger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1010;
    flex-shrink: 0;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }

.nav-hamburger.open span:nth-child(2) { opacity: 0; }

.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 23, 48, 0.35);
    z-index: 998;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nav-overlay.active { display: block; }

.svg-logo-text {
    letter-spacing: 0;
    fill: var(--logo-text);
    stroke: var(--logo-stroke);
    stroke-width: 4px;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--glow);
    border-color: var(--accent);
    transform: scale(1.1);
}

.nav-search-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.nav-search-btn:hover {
    background: var(--glow);
    border-color: var(--accent);
    transform: scale(1.1);
}

.nav-actions .theme-toggle,
.nav-actions .nav-hamburger,
.nav-actions .nav-search-btn {
    flex-shrink: 0;
}

.search-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 10vh 1rem 2rem;
}

.search-modal-overlay[hidden] { display: none; }

.search-modal {
    width: 100%;
    max-width: 560px;
    background: var(--bg);
    border: 0.5px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.search-modal-input-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 0.5px solid var(--border);
    flex-shrink: 0;
    color: var(--muted);
}

.search-modal-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 15px;
    color: var(--text);
    font-family: inherit;
    min-width: 0;
}

.search-modal-input::placeholder { color: var(--muted); }

.search-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
    flex-shrink: 0;
    padding: 0.2rem;
}

.search-modal-close:hover { color: var(--accent2); }

.search-modal-results {
    overflow-y: auto;
    padding: 0.5rem 0;
}

.search-modal-group-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0.6rem 1.1rem 0.3rem;
}

.search-modal-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.6rem 1.1rem;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
}

.search-modal-item.active,
.search-modal-item:hover { background: var(--bg2); }

.search-modal-item-title {
    font-size: 14px;
    font-weight: 600;
}

.search-modal-item-excerpt {
    font-size: 12.5px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-modal-empty {
    padding: 2.2rem 1.1rem;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.search-modal-empty a { color: var(--accent2); }

@media (min-width: 1280px) {
#mainNav {
        padding: 0.55rem 1.5rem;
        gap: 1rem;
    }

.nav-right {
        gap: 1rem;
    }

.nav-links {
        position: static;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        width: auto;
        height: auto;
        min-width: 0;
        flex: 1 1 auto;
        gap: clamp(0.75rem, 1.4vw, 1.75rem);
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0;
        border-left: none;
        transform: none;
        transition: none;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
        font-size: 12px;
        letter-spacing: 0.04em;
        padding: 0.35rem 0;
        width: auto;
        border-bottom: none;
        white-space: nowrap;
        flex-shrink: 0;
    }

.nav-overlay { display: none !important; }

.nav-hamburger { display: none; }

.nav-logo { height: 44px; }

.nav-logo svg.logo-text,
    .logo-text {
        width: 110px !important;
        height: 42px !important;
    }

.logo-img { width: 40px; height: 40px; }

.nav-auth-btn {
        padding: 0.4rem 0.9rem;
        font-size: 12.5px;
    }

.nav-session-avatar {
        width: 34px;
        height: 34px;
    }
}

@media (min-width: 1440px) {
#mainNav { padding: 0.6rem 2rem; }

.nav-links { gap: clamp(1rem, 1.6vw, 2rem); }

.nav-links a { font-size: 12.5px; }
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  flex-wrap: wrap;
  max-width: 100%;
  /* Explicit resets — cannot inherit fixed-header chrome */
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: auto !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  isolation: auto !important;
  transform: none !important;
}

.breadcrumb a {
  color: var(--accent2);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb > span[aria-hidden="true"] {
  color: var(--muted);
  opacity: 0.7;
  flex-shrink: 0;
}

.breadcrumb [aria-current="page"] {
  color: var(--muted);
  min-width: 0;           /* allow flex item to shrink */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(42vw, 28rem);
}

.news-page-header .breadcrumb,
.article-wrap .breadcrumb {
  margin-bottom: 1.1rem;
}

@media (max-width: 768px) {
.breadcrumb {
    font-size: 12px;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
  }

.breadcrumb [aria-current="page"] {
    max-width: 70vw;
  }
}

@media (min-width: 401px) {
#mainNav {
        padding: 0.5rem 1rem;
        gap: 0.75rem;
    }

.nav-logo {
        gap: 6px;
        height: 40px;
    }

.nav-logo svg.logo-text,
    .logo-text {
        width: 100px !important;
        height: 38px !important;
    }

.logo-img {
        width: 36px;
        height: 36px;
    }

.nav-right {
        gap: 0.75rem;
    }

.nav-actions {
        gap: 0.5rem;
    }

.nav-auth-btn {
        padding: 0.5rem 1.1rem;
        font-size: 13px;
    }

.theme-toggle,
    .nav-search-btn,
    .nav-hamburger {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }

.nav-session-avatar {
        width: 38px;
        height: 38px;
    }

.nav-session-avatar svg { width: 18px; height: 18px; }
}

@media (max-width: 480px) {
.breadcrumb {
    font-size: 11px;
    gap: 0.3rem;
    margin-bottom: 1rem;
  }

.breadcrumb [aria-current="page"] {
    max-width: 100%;
    white-space: normal;   /* allow wrap on very small screens */
  }
}

.hero-visual {
    order: 2;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 0.82;
    border-radius: 4px;
    overflow: hidden;
    /* Soft neutral that blends with typical robot product shots */
    background: #eef2f0;
    border: 1px solid var(--border);
    isolation: isolate;
}

[data-theme="dark"] .hero-visual {
    background: #1a2820;
}

.hero-stage-glow {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 40%, rgba(45, 106, 79, 0.12), transparent 70%);
}

[data-theme="dark"] .hero-stage-glow {
    background: radial-gradient(ellipse at 50% 40%, rgba(76, 175, 125, 0.15), transparent 70%);
}

.ctrl-wrap {
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0.9rem;
    order: 3;
    z-index: 35;
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    justify-content: center;
    box-sizing: border-box;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

.ctrl-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--hero-ctrl-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--hero-ctrl-border);
    color: var(--muted);
    padding: 0.55rem 0.5rem;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
}

.ctrl-btn:hover,
.ctrl-btn.active {
    border-color: var(--accent);
    color: var(--accent2);
}

section {
    padding: 2.25rem 4vw;
    scroll-margin-top: calc(var(--nav-h, 64px) + 8px);
}

.sec-eyebrow {
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent2);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sec-eyebrow::before {
    content: "";
    width: 20px;
    height: 1px;
    background: var(--accent2);
}

.sec-title {
    font-family: var(--font-display);
    font-size: clamp(20px, 6vw, 32px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.05;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 0.9rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-family: inherit;
    line-height: 1;
    /* mobile-first: share the row equally, shrink instead of wrap */
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}

.btn span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn:focus-visible {
    outline: 2.5px solid var(--accent2);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-foreground);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.25);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(45, 106, 79, 0.2);
}

/* ══════════════════════════════════════════════
   .btn-hero — SHARED
   Moved here from home.css: originally built for
   index.html's hero CTA, now also used by the
   robots hub cards/CTA (galym_robots/index.html)
   and about.html's contact link. Any hero-specific
   show/hide behavior (e.g. hiding this button on
   mobile inside .hero) stays in home.css — only the
   button's own look lives here.
══════════════════════════════════════════════ */
.btn-hero {
    display: inline-flex;
    background: var(--accent);
    color: var(--accent-foreground);
    font-weight: 700;
    font-size: 13.5px;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-hero:hover,
.btn-hero:focus-visible {
    background: var(--accent2);
    color: var(--accent-foreground);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.25);
}

.btn-hero svg {
    transition: transform 0.2s ease;
}

.btn-hero:hover svg {
    transform: translateY(3px);
}

@media (min-width: 768px) {
    .btn-hero {
        font-size: 14.5px;
        padding: 0.95rem 1.9rem;
    }
}

@media (min-width: 1024px) {
    .btn-hero {
        font-size: 15px;
        padding: 1rem 2.1rem;
    }
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

.video-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background-color: #000;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 900px;
    border-radius: 8px;
    position: relative;
    border: 0.5px solid var(--border);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

.close {
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    color: white;
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover { color: #ff0000; }

.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 4px;
}

.play-button--sm {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

.project-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.35rem 1.4rem 1.5rem;
    background: var(--accent);
    color: var(--bg);
}

.project-card-body .project-card-title-link,
.project-card-body .project-card-title-link:hover,
.project-card-body .project-card-title-link:focus-visible {
    color: var(--bg);
}

.project-card-body .project-card-desc {
    color: inherit;
    opacity: 0.8;
}

[data-theme="dark"] .project-card-body,
[data-theme="dark"] .project-card-body * {
    color: var(--bg);
}

@media (min-width: 768px) {
.project-card-body {
        padding: 1.6rem 1.7rem 1.8rem;
    }
}

.gallery-header {
    padding: 0 5vw;
    margin-bottom: 1.35rem;
}

.is-filtered-out {
    display: none !important;
}

.bridge-story > .sec-eyebrow { margin-bottom: 0.8rem; }

.bridge-story > .sec-title   { margin-bottom: 2rem; }

@keyframes bNodeIn {
    from { opacity: 0; transform: translateY(14px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@keyframes bDraw { to { stroke-dashoffset: 0; } }

.fade-up {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.55s ease,
        transform 0.55s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }

.delay-2 { transition-delay: 0.2s; }

.delay-3 { transition-delay: 0.3s; }

.delay-4 { transition-delay: 0.4s; }

.soc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    line-height: 0;
    flex-shrink: 0;
}

@media (hover: hover) {
    .soc-btn:hover {
        color: var(--accent2);
        border-color: var(--accent);
        background: var(--glow);
        transform: translateY(-2px);
    }
}

.soc-btn:focus-visible {
    outline: 2px solid var(--accent2);
    outline-offset: 2px;
}

.soc-btn svg {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}


footer {
    background: var(--bg2);
    border-top: 0.5px solid var(--border);
    padding: 2rem 4vw 1rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 0.5px solid var(--border);
}

.footer-brand .nav-logo { font-size: 20px; height: auto; }

.footer-brand .logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.footer-brand .logo-text,
.footer-brand .nav-logo svg.logo-text {
    width: 110px !important;
    height: 42px !important;
}

.footer-brand p {
    font-size: 12px;
    color: var(--muted);
    margin-top: 1rem;
    line-height: 1.7;
    max-width: 100%;
}

/* Footer social icons — mobile first.
   Base (phones): one centered row of 6; the buttons shrink slightly on very
   narrow screens instead of wrapping. */
.footer-social {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 40px));
    justify-content: center;
    gap: clamp(0.4rem, 2.5vw, 0.8rem);
    margin-top: 1.5rem;
}

.footer-social .soc-btn {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
}

/* Tablet: brand column is narrow → tidy 3 × 2 grid, left-aligned */
@media (min-width: 768px) {
    .footer-social {
        grid-template-columns: repeat(3, 40px);
        justify-content: start;
        gap: 0.8rem;
    }
}

/* Desktop: column is wide enough for a single row of 6 */
@media (min-width: 992px) {
    .footer-social {
        grid-template-columns: repeat(6, 40px);
        gap: 0.6rem;
    }
}

.footer-col h5 {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col a {
    white-space: nowrap;
    color: var(--muted);
    font-size: 11px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 10px;
    color: var(--muted);
    flex-direction: column;
    gap: 1rem;
}

.footer-bottom a {
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.footer-bottom a:hover { color: var(--text); }

@media (max-width: 767px) {
.footer-brand,
    .footer-col {
        text-align: center;
    }

.footer-brand .nav-logo {
        justify-content: center;
    }

.footer-social {
        justify-content: center;
    }

.footer-col ul {
        align-items: center;
    }

.footer-bottom {
        align-items: center;
        text-align: center;
    }
}

.nav-links.open {
    transform: translateX(0);
}

@media (min-width: 768px) {
.btn {
        flex: 0 1 auto;
        padding: 0.8rem 1.5rem;
        font-size: 14px;
    }

#mainNav {
        padding: 1rem 3rem;
    }

section {
        padding: 4rem 6vw;
    }

.footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        padding-bottom: 3rem;
    }

.nav-logo {
        height: 52px;
    }

.logo-text {
        width: 130px;
        height: 50px;
    }

.nav-logo svg.logo-text {
        width: 130px !important;
        height: 50px !important;
    }

.logo-img {
        width: 46px;
        height: 46px;
    }

.hero-visual {
        width: 100%;
        max-width: none;
        height: auto;
        max-height: 100%;
        aspect-ratio: 1 / 0.82;
        align-self: center;
    }

.ctrl-wrap {
        position: absolute;
        bottom: 1.1rem;
        right: 1rem;
        left: auto;
        justify-content: flex-end;
        flex-wrap: wrap;
        margin-top: 0;
        padding: 0;
        width: auto;
    }

.ctrl-btn {
        font-size: 12px;
        padding: 0.5rem 0.9rem;
    }

.sec-title {
        font-size: clamp(32px, 4vw, 54px);
    }

.gallery-header {
        padding: 0 8vw;
        margin-bottom: 1.5rem;
    }

footer {
        padding: 4rem 8vw 2rem;
    }

.footer-brand .nav-logo {
        font-size: 28px;
    }

.footer-brand p {
        font-size: 14px;
        max-width: 260px;
    }

.footer-col h5 {
        font-size: 14px;
        margin-bottom: 1.2rem;
    }

.footer-col a {
        font-size: 13px;
    }

.footer-bottom {
        align-items: center;
        font-size: 12px;
    }

.sec-eyebrow {
        font-size: 11px;
        margin-bottom: 1rem;
    }

.footer-col ul {
        gap: 0.7rem;
    }
}

@media (min-width: 1024px) {
#mainNav {
        padding: 0.6rem 4rem;
    }

section {
        padding: 5rem 8vw;
    }

.footer-top {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 3rem;
        padding-bottom: 3rem;
    }

.nav-logo {
        height: 58px;
    }

.logo-text {
        width: 150px;
        height: 56px;
    }

.nav-logo svg.logo-text {
        width: 150px !important;
        height: 56px !important;
    }

.logo-img {
        width: 50px;
        height: 50px;
    }

.hero-visual {
        width: 100%;
        max-width: none;
        height: auto;
        max-height: 100%;
        aspect-ratio: 1 / 0.82;
        align-self: center;
    }

.ctrl-wrap {
        position: absolute;
        bottom: 1.4rem;
        right: 1.5rem;
        left: auto;
        justify-content: flex-end;
        flex-wrap: wrap;
        margin-top: 0;
        padding: 0;
        width: auto;
    }

.ctrl-btn {
        font-size: 12px;
        padding: 0.5rem 0.9rem;
    }

.sec-title {
        font-size: clamp(32px, 4vw, 54px);
    }

.gallery-header {
        padding: 0 8vw;
        margin-bottom: 1.5rem;
    }

footer {
        padding: 4rem 8vw 2rem;
    }

.footer-brand .nav-logo {
        font-size: 28px;
    }

.footer-brand p {
        font-size: 14px;
        max-width: 260px;
    }

.footer-col h5 {
        font-size: 14px;
        margin-bottom: 1.2rem;
    }

.footer-col a {
        font-size: 13px;
    }

.footer-bottom {
        align-items: center;
        font-size: 12px;
    }

.sec-eyebrow {
        font-size: 11px;
        margin-bottom: 1rem;
    }

.footer-col ul {
        gap: 0.7rem;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
.hero-visual {
        width: 100%;
        max-width: 380px;
        height: auto;
        aspect-ratio: 1 / 0.82;
        align-self: center;
        margin: 0 auto;
    }

.ctrl-wrap {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        justify-content: center;
        flex-wrap: nowrap;
    }
}

.article-body {
    font-size: 15px;
    line-height: 1.85;
    color: var(--text);
}

.article-body p { margin-bottom: 1.1rem; }

.bridge-hero-header .sec-eyebrow { justify-content: center; }

.bridge-hero-header .sec-eyebrow::before { display: none; }

.bridge-hero-header .sec-title {
    font-size: clamp(24px, 7vw, 40px);
    margin: 0;
}

.contact-header .sec-title {
    font-size: clamp(20px, 7.2vw, 42px);
    line-height: 1.15;
    white-space: normal;
}

@media (min-width: 380px) {
.contact-header .sec-title { white-space: nowrap; }
}

.news-page-header .breadcrumb {
  margin-bottom: 1.25rem;
}

.news-page-header .sec-eyebrow {
  margin-bottom: 0.5rem;
}

.news-page-header .sec-title {
  margin: 0;
  font-size: clamp(24px, 5vw, 40px);
}

.news-filter-bar::-webkit-scrollbar { display: none; }

/* ══════════════════════════════════════════════
   Card grid component — SHARED
   Moved here from home.css: originally built for
   index.html's project list, now also used by
   galym_robots/index.html's robot catalog grid.
   Any page using this can just drop a
   .projects-section > .projects-header + .projects-grid
   of .project-card markup and it matches site style.
══════════════════════════════════════════════ */

.projects-section {
    padding: 1.1rem 5vw 1.75rem; /* same rhythm as old featured-section */
}

.projects-header {
    margin-bottom: 1.15rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    border: 0.5px solid var(--border);
    background: var(--bg2);
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s, border-color 0.35s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(45, 106, 79, 0.14);
    border-color: var(--accent2);
}

.project-card:focus-visible {
    outline: 2.5px solid var(--accent2);
    outline-offset: 3px;
}

.project-card-visual {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg3);
    text-decoration: none;
    color: inherit;
}

.project-card-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity 0.4s, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card-img--dark {
    display: none;
}

[data-theme="dark"] .project-card-img--light {
    display: none;
}

[data-theme="dark"] .project-card-img--dark {
    display: block;
}

.project-card:hover .project-card-img {
    opacity: 1;
    transform: scale(1.05);
}

/* Icon/logo-style visuals (e.g. Arduino IDE): show the full image,
   don't crop it like a 16:10 photo. */
.project-card-visual--icon {
    background: var(--bg3);
}

.project-card-visual--icon .project-card-img {
    width: 60%;
    height: 60%;
    margin: 20% auto;
    object-fit: contain;
    opacity: 1;
}

.project-card:hover .project-card-visual--icon .project-card-img {
    transform: scale(1.05);
}

.project-visual-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent2);
    background:
        radial-gradient(circle at 30% 25%, var(--glow), transparent 60%),
        var(--bg3);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-visual-placeholder {
    transform: scale(1.04);
}

.project-visual-trigger {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: block;
}

.project-visual-trigger:focus-visible {
    outline: 2.5px solid var(--accent2);
    outline-offset: -4px;
}

.project-card-badge {
    position: absolute;
    top: 0.9rem;
    left: 0.9rem;
    z-index: 2;
    background: var(--accent);
    color: var(--accent-foreground);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-weight: 600;
    pointer-events: none;
}

/* Muted variant of the badge — for states that aren't a hard sell,
   e.g. "Жақында" (coming soon) on a robot that isn't orderable yet.
   Added for galym_robots/index.html; safe to reuse anywhere else
   that needs a lower-emphasis badge than the solid accent one. */
.project-card-badge--muted {
    background: var(--bg3);
    color: var(--muted);
    border: 0.5px solid var(--border);
}

.project-card-title {
    font-family: var(--font-display);
    font-size: clamp(17px, 3.6vw, 20px);
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.25;
    margin-bottom: 0.65rem;
}

.project-card-title-link {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.project-card-title-link:hover,
.project-card-title-link:focus-visible {
    color: var(--accent2);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.project-card-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 1.1rem;
}

/* Body copy for a card that isn't a link yet (e.g. "Жақында") —
   same rhythm as .project-card-desc but without cursor/hover cues,
   since .project-card itself gets cursor:pointer by default. */
.project-card--disabled {
    cursor: default;
}

.project-card--disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
}

.project-card--disabled .project-card-img {
    opacity: 0.5;
    filter: grayscale(0.4);
}

.project-card--disabled:hover .project-card-img {
    opacity: 0.5;
    transform: none;
}

@media (min-width: 768px) {
.projects-section {
        padding: 1.25rem 0 2rem;
    }

.projects-header {
        margin-bottom: 1.35rem;
        padding: 0 8vw;
    }

.projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.4rem;
        padding: 0 8vw;
    }
}

@media (min-width: 1024px) {
.projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.6rem;
    }
}

/* ══════════════════════════════════════════════
   Page header (breadcrumb + eyebrow + title) — SHARED
   Moved here from galym_robots/robot_style.css: used by
   the robots hub page and every robot detail page.
   Must sit BELOW the fixed #mainNav:
   - padding-top uses --nav-h (set by components.js after nav mounts)
   - z-index: 0 keeps it under the nav stacking context
   so the breadcrumb never paints on top of the header.
   The --guide-pad-x fallback below matches robot_style.css's own
   :root value so spacing stays identical whether or not that
   page-specific file is also loaded.
══════════════════════════════════════════════ */

.page-header-section {
  position: relative;
  z-index: 0;
  padding-top: calc(var(--nav-h, 96px) + 1.5rem);
  padding-bottom: 1.25rem;
  padding-left: var(--guide-pad-x, clamp(1.75rem, 6vw, 4rem));
  padding-right: var(--guide-pad-x, clamp(1.75rem, 6vw, 4rem));
  box-sizing: border-box;
}

.page-header-section .breadcrumb {
  margin-bottom: 0;
}

/* ── Author credit — same look as on the app page:
   12px, muted color, no extra weight or color on the names. ── */
.app-author-credit {
  font-size: 12px;
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.page-header-section .sec-eyebrow {
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.page-header-section .sec-eyebrow::before {
  background: var(--accent2);
}
.page-header-section .page-header-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 7vw, 44px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.12;
  color: var(--accent2);
  margin: 0 0 0.25rem;
  text-align: left;
}
@media (min-width: 640px) {
  .page-header-section .page-header-title {
    white-space: nowrap;
  }
}
@media (max-width: 768px) {
  .page-header-section .page-header-title {
    font-size: clamp(24px, 7.5vw, 32px);
  }
}
/* Skip link (keyboard / screen-reader users) */
.skip-link {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2000;
    padding: 0.6rem 1rem;
    background: var(--accent);
    color: var(--accent-foreground, #fff);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }
main:focus { outline: none; }

/* Nav: shrink on scroll (class toggled by components.js) + current page */
#mainNav.scrolled {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after { width: 100%; }