/* CSS Variables palette, easily tweakable */
:root {
  --brand: #0b6aa6;
  --cert-img-h: 160px;
  --card-media-h: 160px;
  --card-media-radius: 12px;
  /* Default media look (cards/accordion/tab images) */
  --media-radius: var(--card-media-radius);
  --media-bg: var(--surface-alt);
  --media-border: 1px solid var(--header-border);
  /* Default desktop width for tab image column */
  --tab-img-col-w: 33%;
  /* Tabbed interface styling */
  --tab-outline-w: 2px;
  /* Neutral for tab panels */
  --tabs-bg: #ffffff;
  /* Mix ratios for tone tinting (mostly grey) */
  --tab-mix-grey: 90%;
  --tab-mix-tone: 10%;
  --tabs-shadow: 0 8px 24px rgba(0,0,0,0.2);
  --acc-item-shadow: 0 8px 24px rgba(0,0,0,0.18);
  /* Space after tab panel before accordion edge */
  --tab-panel-gap: 1.25rem;
}

html[data-theme="dark"] {
  /* Slightly darker neutral in dark too */
  --tabs-bg: var(--surface-alt);
  --tabs-shadow: 0 10px 28px rgba(0,0,0,0.45);
  --acc-item-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }
html, body { height: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
}

/* Floating WhatsApp Button */
.floating-whatsapp { position: fixed; z-index: 60; width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; background: #25D366; color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,0.28); border: 2px solid #fff; transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease; right: calc(clamp(0.6rem, 2.5vw, 1.1rem) + env(safe-area-inset-right, 0px)); bottom: calc(clamp(0.6rem, 2.5vw, 1.1rem) + env(safe-area-inset-bottom, 0px)); }
.floating-whatsapp:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,0.35); background: #20b459; }
.floating-whatsapp:active { transform: translateY(-1px); }
html[data-theme="dark"] .floating-whatsapp { border-color: var(--surface); }
@media (max-width: 640px){ .floating-whatsapp { width: 60px; height: 60px; } }
@media (max-width: 380px){ .floating-whatsapp { width: 56px; height: 56px; } }

/* Visually hidden (for screen-reader text) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { width: min(1200px, 92vw); margin: 0 auto; }

header.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--header-border);
}
.navbar { 
  --navbar-h: 64px; /* control height */
  display: flex; align-items: center; justify-content: space-between; 
  padding: 0; height: var(--navbar-h); color: var(--header-text); 
}
.navbar a { color: var(--header-text); text-decoration: none; margin: 0 0.75rem; }
.navbar a:hover { color: var(--accent); }

.navbar .nav-left { display: inline-flex; align-items: center; gap: 0.75rem; }
.navbar .brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; height: 100%; }
/* make logo scale with navbar height */
.navbar .brand .logo { height: calc(var(--navbar-h) * 0.6); width: auto; -o-object-fit: contain; object-fit: contain; display: block; }
.navbar .brand .brand-text { display: inline-block; }
.navbar .nav-center { display: none; }
.navbar .nav-right { display: inline-flex; align-items: center; gap: 0.5rem; }

/* Language dropdown */
.lang-dd { position: relative; }
.lang-dd .dd-btn { display: inline-flex; align-items: center; gap: 0.25rem; height: 36px; padding: 0 0.5rem; border: 1px solid var(--header-border); border-radius: 8px; background: transparent; color: var(--header-text); cursor: pointer; }
.lang-dd .caret { font-size: 0.8rem; opacity: 0.8; }
.lang-dd .dd-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: max(120px, 100%); width: -moz-max-content; width: max-content; background: var(--surface); color: var(--text); border: 1px solid var(--header-border); border-radius: 10px; padding: 0.25rem; box-shadow: 0 8px 24px rgba(0,0,0,0.25); display: none; z-index: 70; }
.lang-dd .dd-menu li { list-style: none; }
.lang-dd .dd-menu a { display: block; padding: 0.5rem 0.75rem; color: inherit; text-decoration: none; border-radius: 6px; white-space: nowrap; }
.lang-dd .dd-menu a:hover { background: var(--surface-alt); }
.lang-dd.open .dd-menu { display: block; }
.lang-dd.drawer .dd-menu { position: static; box-shadow: none; border: none; display: none; padding: 0.25rem 0; }
.lang-dd.drawer.open .dd-menu { display: block; }

/* Theme icon */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--header-border); border-radius: 8px; color: var(--header-text); }
.theme-toggle .icon { display: none; }
/* show icon for the theme you will switch to */
html[data-theme="light"] .theme-toggle .moon { display: block; }
html[data-theme="dark"] .theme-toggle .sun { display: block; }

.hamburger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 40px; height: 40px; border: 1px solid var(--header-border); border-radius: 8px;
  background: transparent; cursor: pointer; padding: 6px;
}
.hamburger span { display: block; height: 2px; width: 100%; background: var(--header-text); border-radius: 1px; }

@media (min-width: 900px) {
  .hamburger { display: none; }
  .navbar .nav-center { display: inline-flex; align-items: center; }
}

.lang-switch { display: inline-flex; gap: 0.25rem; }
.lang-switch a { padding: 0.25rem 0.5rem; border-radius: 0.375rem; border: 1px solid transparent; }
.lang-switch a.active { border-color: var(--accent); color: var(--accent); }

.site-footer { padding: 2rem 0; border-top: 1px solid var(--header-border); background: var(--surface); margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; align-items: start; }
.foot-brand { padding-top: 0.4rem; }
.foot-brand .logo { display: block; }
.foot-contact h4, .foot-socials h4 { margin-top: 0.4rem; }
.foot-brand .logo { height: 40px; width: auto; }
.foot-contact ul { margin: 0.5rem 0 0 0; padding: 0; list-style: none; }
.foot-contact li { margin: 0.25rem 0; }
.foot-socials .social-row { display: flex; gap: 0.75rem; align-items: center; }
.foot-socials .social { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--header-border); border-radius: 10px; color: var(--text); text-decoration: none; background: var(--surface-alt); transition: transform 150ms ease, background 150ms ease, color 150ms ease; }
.foot-socials .social:hover { background: var(--accent); color: #111; transform: translateY(-1px); }
@media (max-width: 900px){ .footer-grid { grid-template-columns: 1fr; } }

/* Mobile Drawer */
.mobile-drawer {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  transform: translateX(-100%);
  background: var(--drawer-bg);
  color: var(--drawer-text);
  z-index: 50; display: flex; flex-direction: column;
  transition: transform 250ms ease;
}
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-bottom: 1px solid var(--header-border); }
.drawer-header .brand { color: var(--drawer-text); }
.drawer-header .logo { width: 32px; height: 32px; }
.drawer-header .close { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--header-border); background: transparent; color: var(--drawer-text); cursor: pointer; }
.drawer-body { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem; }
.drawer-body a { color: var(--drawer-text); text-decoration: none; padding: 0.75rem 0.25rem; border-radius: 0.375rem; font-size: 1.125rem; }
.drawer-body a:hover { color: var(--accent); }
.drawer-row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 0.75rem; border-top: 1px solid var(--header-border); }

.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 40; opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
body[data-drawer="open"] { overflow: hidden; }
body[data-drawer="open"] .mobile-drawer { transform: translateX(0); }
body[data-drawer="open"] .backdrop { opacity: 1; pointer-events: auto; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; padding: 3rem 0; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 1rem 0; }
.hero .headline-slide { overflow: hidden; }
.hero .headline-slide p { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.hero .headline-slide .muted.big { font-size: clamp(1.05rem, 2.2vw, 1.25rem); font-weight: 600; }
/* Brand strip: keep logos on one line, scale down only if needed to preserve min gap */
.brand-strip { 
  --brand-max-h: 60px; /* configurable */
  --brand-min-gap: 32px; /* configurable desired space between logos */
  display: flex; align-items: center; justify-content: flex-start; gap: var(--brand-min-gap);
  margin-top: 1rem; /* increase separation without affecting surrounding flow */
  /* constrain to the width of the paragraph above for better alignment */
  max-width: -moz-fit-content;
  max-width: fit-content;
}
.brand-strip .brand { height: var(--brand-max-h); width: auto; -o-object-fit: contain; object-fit: contain; filter: drop-shadow(0 1px 6px rgba(0,0,0,0.12)); flex: 0 0 auto; }
/* When space is tight, allow logos to shrink but keep them on one line */
@container style(inline-size < 420px) { .brand-strip { gap: 20px; } }
@media (max-width: 520px){
  .brand-strip { gap: 20px; }
  .brand-strip .brand { height: clamp(36px, 12vw, var(--brand-max-h)); }
}
.hero .headline { transform: translateX(-30%); opacity: 0; animation: slideInLeft 800ms ease-out 100ms forwards; }
.stacked-images { position: relative; height: var(--stack-h, 280px); }
.stacked-images .img { position: absolute; inset: 0; width: 100%; height: 100%; -o-object-fit: contain; object-fit: contain; /* keep transparency */
  /* configurable transforms */
  z-index: var(--z, 1); opacity: 0;
  animation: stackIn 900ms ease-out var(--delay, 0ms) forwards; }
@keyframes stackIn {
  from {
    transform:
      translate(calc(var(--startX, 0px) + 40%), var(--startY, 0px))
      scale(var(--scale, 1))
      rotate(var(--rotate, 0deg));
    opacity: 0;
  }
  to {
    transform:
      translate(var(--endX, 0px), var(--endY, 0px))
      scale(var(--scale, 1))
      rotate(var(--rotate, 0deg));
    opacity: 1;
  }
}
@media (max-width: 900px) { .stacked-images { height: 200px; } }
/* Add breathing space after hero based on occupied image stack height */
.hero + .section { margin-top: calc(var(--stack-h, 280px) * 0.2); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
}

/* Cards grid */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 2rem 0; align-items: stretch; }
.cards { grid-template-columns: repeat(var(--cols, 4), 1fr); }
.card { background: var(--surface); border: 1px solid rgba(255,255,255,0.08); border-radius: 0.75rem; padding: 1rem; box-shadow: 0 8px 24px rgba(0,0,0,0.25); opacity: 0; transform: translateY(20%); display: flex; flex-direction: column; height: 100%; position: relative; }
.card.show { animation: riseIn 600ms ease-out forwards; }
.card h3 { margin-top: 0.75rem; margin-bottom: 0.25rem; color: var(--accent); }
.card img { width: 100%; height: var(--card-media-h, 160px); -o-object-fit: contain; object-fit: contain; display: block; border-radius: var(--card-media-radius, 12px); background: var(--surface-alt); }
.card p { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
/* Per-card toggle for image background */
.card.no-media-bg img { background: transparent; }
.card.link-card.no-media-bg { justify-content: center; align-items: center; }
.card.media-bg img { background: var(--surface-alt); }
/* Clickable card affordance */
.card.link-card { transition: transform 160ms ease, box-shadow 160ms ease; }
.card.link-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.28); }
.card .stretched { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.card .stretched:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  :root { --card-media-h: 140px; }
}

/* Split sections */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; margin: 3rem 0; }
.split > div > h2:first-child { margin-top: 0; }
.split > div { align-self: start; }
/* Contact page: ensure split columns stretch to equal height */
.contact-page .split { align-items: stretch !important; }
.contact-page .split > div { align-self: stretch !important; }
.card.media-bg p:last-child { margin-bottom: 0; }
@media (max-width: 900px){ .split { grid-template-columns: 1fr; } }
.split .from-left { opacity: 0; --from: -15%; }
.split .from-right { opacity: 0; --from: 15%; }
.split .show { animation: slideZero 700ms ease-out forwards; }

/* Contact page brand boxes: align logo centers across cards */
.social-cards .brand-box { height: 96px; width: 100%; display: flex; align-items: center; justify-content: center; }
.social-cards .brand-box img { max-height: 64px; width: auto; height: auto; display: block; }
/* Ensure right-side map card fills the available column height */
.contact-page .from-right .card.media-bg { height: 100%; min-height: 380px; }

/* Generic reveal helpers (used by accordion) */
.from-left { opacity: 0; --from: -15%; }
.from-right { opacity: 0; --from: 15%; }
.from-left.show, .from-right.show { animation: slideZero 700ms ease-out forwards; }

/* Certs row with separator */
.certs-row { grid-template-columns: 1fr auto 1fr; align-items: start; }
.certs-row .row { display: grid; grid-template-columns: 1fr auto; gap: 1.25rem; align-items: center; }
.certs-row .row.rev { grid-template-columns: auto 1fr; }
/* Ensure images have a consistent, configurable height and don't overflow */
.certs-row .row img { height: var(--cert-img-h, 160px); width: auto; max-width: 100%; -o-object-fit: contain; object-fit: contain; display: block; }
.certs-row .row p { margin: 0; }
@media (min-width: 901px){
  .certs-row .row { align-items: start; }
}
.separator { width: 2px; background: linear-gradient(to bottom, transparent, var(--muted), transparent); height: 100%; opacity: 0; transform: translateY(20%); }
.separator.show { animation: riseIn 600ms ease-out 200ms forwards; }
@media (max-width: 900px){ .certs-row { grid-template-columns: 1fr; }
  .separator { height: 2px; width: 100%; background: linear-gradient(to right, transparent, var(--muted), transparent); }
  .certs-row .row, .certs-row .row.rev { grid-template-columns: 1fr; }
  /* Keep height but prevent horizontal overflow */
  .certs-row .row img { max-width: 100%; }
}

/* Brand color accents */
.certs-row h2 { color: var(--ath-yellow); }
.accent-title { color: var(--ath-yellow); }

/* Contact */
.contact { background: var(--surface-alt); border-radius: 0.75rem; padding: 1.25rem; }
.contact a { color: var(--accent); }
.contact.center { text-align: center; }

/* Tabs inside accordion */
.tabs { display: grid; gap: 0; }
.tab-headers { display: inline-flex; flex-wrap: nowrap; gap: 0.5rem; align-items: flex-end; border-bottom: none; position: relative; }
/* Pill-like tabs that visually connect with the panel (book-tab style) */
.tab-btn { border: none; border-bottom: none; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding: 0.55rem 1rem; font-weight: 800; cursor: pointer; color: #fff; opacity: 0.92; transition: transform 140ms ease, opacity 140ms ease; position: relative; margin-bottom: 0; overflow: hidden; min-width: 0;
  /* Natural hyphenation only when needed (avoid splitting short words) */
  hyphens: auto; -webkit-hyphens: auto; -ms-hyphens: auto; overflow-wrap: anywhere; word-break: normal; white-space: normal;
}
/* Label span for optional scrolling of unbreakable content */
.tab-btn .tab-text { display: inline-block; max-width: 100%; }
.tab-btn.is-overflowing .tab-text { white-space: nowrap; will-change: transform; animation: tab-scroll 7s linear infinite alternate; transform: translateX(0); }
.tab-btn.is-overflowing { 
  /* subtle edge fade; vendor prefix for iOS */
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 10px, black calc(100% - 10px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, black 10px, black calc(100% - 10px), transparent 100%);
}
@keyframes tab-scroll { from { transform: translateX(0); } to { transform: translateX(var(--scroll-x, -24px)); } }
.tab-btn:not(.active):hover { opacity: 1; transform: translateY(-1px); }
.tab-btn.active { opacity: 1; z-index: 4; border-width: var(--tab-outline-w); border-style: solid; border-bottom: none;
  /* Reduce lift to avoid clipping at container top */
  /* transform: translateY(-0.5px); */
  margin-bottom: calc(-1 * var(--tab-outline-w) + 1px);
  /* Create a micro top padding to ensure outline not cropped */
  padding-top: calc(0.55rem + 1px);
}
/* Seam mask: ensure panel top border fully hidden without cutting tab border */
.tab-btn.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: calc(-1 * var(--tab-outline-w) - 2px); height: calc(var(--tab-outline-w) + 8px); background: inherit; pointer-events: none; }
/* Active tab: neutral background + saturated outline */
.tab-btn.tone-1.active { background: var(--tabs-bg); background: color-mix(in srgb, var(--tabs-bg) var(--tab-mix-grey), var(--ath-red) var(--tab-mix-tone)); color: var(--text); border-color: var(--ath-red); }
.tab-btn.tone-2.active { background: var(--tabs-bg); background: color-mix(in srgb, var(--tabs-bg) var(--tab-mix-grey), var(--ath-yellow) var(--tab-mix-tone)); color: var(--text); border-color: var(--ath-yellow); }
.tab-btn.tone-3.active { background: var(--tabs-bg); background: color-mix(in srgb, var(--tabs-bg) var(--tab-mix-grey), var(--ath-lightblue-strong) var(--tab-mix-tone)); color: var(--text); border-color: var(--ath-lightblue-strong); }
.tab-btn.tone-4.active { background: var(--tabs-bg); background: color-mix(in srgb, var(--tabs-bg) var(--tab-mix-grey), var(--ath-blue) var(--tab-mix-tone)); color: var(--text); border-color: var(--ath-blue); }
/* Non-selected headers: fully saturated, no outline */
.tab-btn.tone-1 { background: var(--ath-red); }
.tab-btn.tone-2 { background: var(--ath-yellow); color: #111; }
.tab-btn.tone-3 { background: var(--ath-lightblue-strong); }
.tab-btn.tone-4 { background: var(--ath-blue); }

/* Wrapped state: fall back to rounded pill buttons that don't fuse with the panel */
.tabs.is-wrapped .tab-headers { border-bottom: none; }
.tabs.is-wrapped .tab-btn { border: none; border-radius: 999px; margin-bottom: 0; }
/* In wrapped fallback, round all panel corners */
.tabs.is-wrapped + .tab-panel, .tabs.is-wrapped .tab-panel { border-radius: 12px; border-top: var(--tab-outline-w) solid var(--header-border); }
/* Keep tone outline when wrapped */
.tabs.is-wrapped .tab-panel.tone-1 { border-color: var(--ath-red); }
.tabs.is-wrapped .tab-panel.tone-2 { border-color: var(--ath-yellow); }
.tabs.is-wrapped .tab-panel.tone-3 { border-color: var(--ath-lightblue-strong); }
.tabs.is-wrapped .tab-panel.tone-4 { border-color: var(--ath-blue); }

/* Panel fuses with the active tab; header bottom border provides the seam for inactive tabs */
.tab-panel { border-radius: 0 12px 12px 12px; padding: 1rem; background: var(--tabs-bg); color: var(--text); border: var(--tab-outline-w) solid var(--header-border); box-shadow: var(--tabs-shadow); margin-bottom: var(--tab-panel-gap); position: relative; z-index: 1; margin-top: -1px; }
.tab-panel.tone-1 { border-color: var(--ath-red); border-top-color: var(--ath-red); background: var(--tabs-bg); background: color-mix(in srgb, var(--tabs-bg) var(--tab-mix-grey), var(--ath-red) var(--tab-mix-tone)); }
.tab-panel.tone-2 { border-color: var(--ath-yellow); border-top-color: var(--ath-yellow); background: var(--tabs-bg); background: color-mix(in srgb, var(--tabs-bg) var(--tab-mix-grey), var(--ath-yellow) var(--tab-mix-tone)); }
.tab-panel.tone-3 { border-color: var(--ath-lightblue-strong); border-top-color: var(--ath-lightblue-strong); background: var(--tabs-bg); background: color-mix(in srgb, var(--tabs-bg) var(--tab-mix-grey), var(--ath-lightblue-strong) var(--tab-mix-tone)); }
.tab-panel.tone-4 { border-color: var(--ath-blue); border-top-color: var(--ath-blue); background: var(--tabs-bg); background: color-mix(in srgb, var(--tabs-bg) var(--tab-mix-grey), var(--ath-blue) var(--tab-mix-tone)); }
.tab-panel :where(h1,h2,h3,h4,h5,h6,p,li,ul,ol,a,strong,em) { color: inherit; }
.tab-panel a { text-decoration: underline; }

.tab-body { display: grid; grid-template-columns: 1fr var(--tab-img-col-w); gap: 1rem; align-items: center; }
.tab-body .img-col img { width: 100%; height: auto; -o-object-fit: contain; object-fit: contain; background: var(--media-bg); border-radius: var(--media-radius); border: var(--media-border); display: block; }
@media (max-width: 900px){
  .tab-body { grid-template-columns: 1fr; align-items: start; }
  .tab-body .text-col { order: 1; width: 100%; }
  .tab-body .img-col { order: 2; width: 100%; }
  .tab-body .img-col img { height: auto; }
}

/* Vertical right-side book tabs (clockwise text) */
.tabs.is-vertical { --vtabs-tab-w: 2.2rem; --vtabs-overlap: 0px; position: relative; }
.tabs.is-vertical .tab-headers { position: absolute; top: 0; right: 0; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; border: 0; }
.tabs.is-vertical .tab-btn { width: var(--vtabs-tab-w); display: block; border: none; border-left: none; border-top-left-radius: 0; border-bottom-left-radius: 0; border-top-right-radius: 12px; border-bottom-right-radius: 12px; padding: 0.5rem 0.4rem; margin: 0; writing-mode: vertical-rl; text-orientation: mixed; position: relative; right: 0; }
.tabs.is-vertical .tab-btn:hover { transform: none; }
/* Active tab moves left by overlap to fuse onto panel edge */
.tabs.is-vertical .tab-btn.active { right: var(--vtabs-overlap); z-index: 3; }
/* Shrink panel box to line up exactly with tab width minus overlap; keep a small internal padding */
.tabs.is-vertical .tab-panel { margin-right: calc(var(--vtabs-tab-w) - var(--vtabs-overlap)); padding-right: 0.5rem; border-right-width: var(--tab-outline-w); border-right-style: solid; border-right-color: var(--header-border); border-top: 1px solid var(--header-border); border-radius: 12px 0 12px 12px; }
/* Keep tone outline on vertical panel edge */
.tabs.is-vertical .tab-panel.tone-1 { border-right-color: var(--ath-red); border-top-color: var(--header-border); }
.tabs.is-vertical .tab-panel.tone-2 { border-right-color: var(--ath-yellow); border-top-color: var(--header-border); }
.tabs.is-vertical .tab-panel.tone-3 { border-right-color: var(--ath-lightblue-strong); border-top-color: var(--header-border); }
.tabs.is-vertical .tab-panel.tone-4 { border-right-color: var(--ath-blue); border-top-color: var(--header-border); }

/* Keyframes */
@keyframes slideInLeft { from { transform: translateX(-30%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(20%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes riseIn { from { transform: translateY(20%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideZero { from { transform: translateX(var(--from, 0)); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Utilities */
.muted { color: var(--muted); }
.section { padding: 2rem 0; }
.page-subtitle { margin: 0.25rem 0 0.75rem; color: var(--muted); font-weight: 600; font-size: clamp(1.05rem, 2.2vw, 1.25rem); }

/* Page Banner */
.page-banner { position: relative; width: 100%;
  /* Baseline heights via CSS vars (overridable by modifiers) */
  --banner-min: 220px; --banner-mobile-s: 40vw; --banner-max: 360px;
  --banner-desktop-min: 360px; --banner-desktop-s: 32vw; --banner-desktop-max: 640px;
  height: clamp(var(--banner-min), var(--banner-mobile-s), var(--banner-max));
  border-radius: 12px; overflow: hidden; margin: 1rem 0 1.5rem; box-shadow: 0 10px 28px rgba(0,0,0,0.22);
}
.page-banner .bg { position: absolute; inset: 0; width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; filter: saturate(1.02) contrast(1.02); }
.page-banner .scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.10) 20%, rgba(0,0,0,0.32) 100%); }
.page-banner .title { position: absolute; left: 1rem; right: 1rem; bottom: 0.75rem; color: #fff; font-weight: 900; font-size: clamp(1.6rem, 4.2vw, 2.4rem); text-shadow: 0 2px 10px rgba(0,0,0,0.5); margin: 0; }
@media (min-width: 900px){
  .page-banner { height: clamp(var(--banner-desktop-min), var(--banner-desktop-s), var(--banner-desktop-max)); }
}
/* Shallow variant: ~20% shorter */
.page-banner.shallow { --banner-min: 176px; --banner-max: 288px; --banner-desktop-min: 288px; --banner-desktop-max: 512px; }
/* Video banner (YouTube) cover fit */
.page-banner.video { background: #000; }
/* Cover the area; lift by a configurable bottom-crop percent to hide the lowest portion without cropping the top */
.page-banner.video .yt-embed { position: absolute; top: 50%; left: 50%; width: 177.78%; height: 100%; transform-origin: center center; transform: translate(-50%, calc(-50% + var(--video-crop-bottom, 20%))) scale(var(--video-scale, 1.18)); pointer-events: none; border: 0; }
/* Contact: rely on natural equal-height grid; no manual bottom offsets */
/* .contact-page .social-cards { margin-bottom: 10px; } */

/* Accordion */
.accordion { display: grid; gap: 0.5rem; margin: 1.25rem 0; }
.accordion { --acc-head-h: 340px; --acc-head-thumb-maxw: 40%; --acc-head-img-h: 300px; --acc-row-img-w: 50%; --acc-row-img-h: 200px; --acc-head-right-w: 360px; }
.acc-item { background: var(--surface); border: 1px solid var(--header-border); border-radius: 0.75rem; overflow: hidden; box-shadow: var(--acc-item-shadow); }
.acc-head { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: 0.75rem 1rem; background: var(--surface); color: var(--text); border: none; cursor: pointer; min-height: var(--acc-head-h); container-type: inline-size; transition: background 140ms ease; }
.acc-item:hover .acc-head { background: var(--surface-alt); }
.acc-head h3 { margin: 0; color: var(--ath-yellow); font-weight: 800; font-size: clamp(1.1rem, 2.2vw, 1.5rem); }
.acc-head .summary { margin-top: 0.35rem; color: var(--text); font-weight: 500; font-size: clamp(0.95rem, 1.7vw, 1.05rem); line-height: 1.55; }
.acc-head .card-hint { grid-column: 1 / -1; justify-self: center; text-align: center; margin-top: 0.6rem; font-size: clamp(0.95rem, 1.7vw, 1.05rem); font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--muted); display: inline-flex; align-items: center; gap: 0.5ch; opacity: 0.95; }
.acc-head .card-hint:before { content: "⇲"; font-size: 0.85rem; opacity: 0.75; transform: translateY(-1px); }
.acc-item:hover .acc-head .card-hint, .acc-head:focus-visible .card-hint { color: var(--ath-yellow); opacity: 1; }
/* Hide header hint when expanded; the close hint will appear in panel */
.acc-head[aria-expanded="true"] .card-hint { display: none; }
.acc-head .chev { transition: transform 220ms ease; opacity: 0.9; }
.acc-head .head-right { display: inline-flex; align-items: center; justify-content: space-between; gap: 0.5rem; overflow: hidden; justify-self: end; width: auto; }
.acc-head .thumb-box { height: auto; display: inline-flex; align-items: center; justify-content: center; width: min(40cqw, var(--acc-head-img-h)); flex: 0 0 min(40cqw, var(--acc-head-img-h)); }
.acc-head .acc-thumb { width: 100%; height: auto; max-width: 100%; max-height: var(--acc-head-img-h); -o-object-fit: contain; object-fit: contain; -o-object-position: center; object-position: center; display: block; border-radius: 0; background: transparent; }
.acc-head .thumb-wrap { display:inline-flex; align-items:center; justify-content:center; border-radius: 10px; padding: 0.25rem 0.4rem; width: 100%; }
/* Per-accordion modifiers: allow rounded/bg styling of main header image like cards */
.acc-item.media-bg .acc-head .acc-thumb { background: var(--media-bg); }
.acc-item.rounded .acc-head .acc-thumb { border-radius: var(--media-radius); border: var(--media-border); background: var(--media-bg); }
.acc-head .thumb-wrap .acc-thumb { width: 100%; height: auto; -o-object-fit: contain; object-fit: contain; border-radius: var(--media-radius); margin-right: 0.25rem; background: var(--media-bg); border: var(--media-border); display: block; }
.acc-item[open] .acc-head .chev, .acc-head[aria-expanded="true"] .chev { transform: rotate(180deg); }
/* Animated panel open/close using height transitions */
.acc-panel { padding: 0 1rem 0.5rem 1rem; overflow: hidden; height: 0; transition: height 260ms ease, padding-top 200ms ease, padding-bottom 200ms ease; }
.acc-panel[hidden] { display: block; height: 0 !important; padding-top: 0; padding-bottom: 0; }
.acc-panel.open { height: auto; }
/* Bottom hint when panel is open */
.acc-panel .panel-hint { margin: 0.95rem 0 0.45rem; text-align: center; font-size: clamp(0.95rem, 1.7vw, 1.05rem); font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--muted); cursor: pointer; -webkit-user-select: none; -moz-user-select: none; user-select: none; }
.acc-panel .panel-hint:before { content: "⇱"; margin-right: 0.4ch; opacity: 0.75; }
.acc-panel .panel-hint:hover { color: var(--ath-yellow); }
/* Subtle hover feedback on panel background (outside colored tab panels) */
.acc-panel { background: transparent; transition: background 140ms ease; }
.acc-item:hover .acc-panel { background: var(--surface-alt); }
.acc-rows { display: grid; gap: 1rem; }
.acc-row { display: grid; grid-template-columns: var(--acc-row-img-w) calc(100% - var(--acc-row-img-w)); gap: 1.25rem; align-items: center; border-radius: 0.75rem; padding: 1.25rem 1.25rem; }
.acc-row.tone-1 { --acc-img-bg: var(--surface-alt); --acc-outline: var(--ath-red); }
.acc-row.tone-2 { --acc-img-bg: var(--surface-alt); --acc-outline: var(--ath-yellow); }
.acc-row.tone-3 { --acc-img-bg: var(--surface-alt); --acc-outline: var(--ath-lightblue); }
/* Default surface background with standard border on card */
.acc-row { position: relative; background: var(--surface); color: var(--text); border: 1px solid var(--header-border); box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.acc-row .text-col p { color: var(--text); font-weight: 500; }
.acc-row .img-col img { background: var(--acc-img-bg); }
.acc-row.rev { grid-template-columns: calc(100% - var(--acc-row-img-w)) var(--acc-row-img-w); }
.acc-row.rev .text-col { order: 1; }
.acc-row.rev .img-col { order: 2; }
.acc-row .img-col img { width: 100%; height: var(--acc-row-img-h); -o-object-fit: contain; object-fit: contain; background: var(--media-bg); border-radius: var(--media-radius); border: var(--media-border); }
/* Optional toggle to enable background on accordion images */
/* Optional toggle to switch background via class if needed */
.acc-row.media-bg .img-col img { background: var(--media-bg); }
.acc-row .text-col p { margin: 0; }
.acc-row .text-col { padding: 0.75rem; }
.acc-row .img-col { padding: 0.75rem; }
/* Support markdown elements */
.acc-row .text-col :where(h3,h4,h5) { margin: 0 0 0.25rem 0; color: var(--text); }
.acc-row .text-col :where(ul,ol) { margin: 0.25rem 0 0.25rem 1.2rem; color: var(--text); }
.acc-row .text-col li { margin: 0.125rem 0; }
@media (max-width: 900px){
  .acc-row { grid-template-columns: 1fr; }
  .acc-row.rev { grid-template-columns: 1fr; }
  .acc-row .text-col { order: 0; }
  .acc-row.rev .text-col { order: 0; }
  .acc-row .img-col { order: 1; }
  .acc-row.rev .img-col { order: 1; }
}
@media (max-width: 900px){
  /* Stack header content and give image full width similar to tab panels' mobile layout */
  .acc-head { grid-template-columns: 1fr; grid-auto-rows: auto; min-height: auto; position: relative; padding-right: 3rem; }
  .acc-head .chev { position: absolute; top: 0.85rem; right: 0.85rem; }
  .acc-head .head-right { width: 100%; display: block; margin-top: 0.85rem; text-align: center; }
  .acc-head .thumb-box { width: 100%; flex: 0 0 100%; max-width: 100%; margin: 0.85rem 0 0 0; justify-content: center; display: flex; }
  .acc-head .acc-thumb { width: 100%; height: auto; max-height: none; display: block; margin: 0 auto; -o-object-fit: contain; object-fit: contain; }
  .acc-head .head-right:empty { display: none; }
}

/* Social section and carousel */
.social-section { padding-top: 2rem; padding-bottom: 2rem; }
.social-section h2 { margin-bottom: 1rem; }
.social-section .social-sub { margin-top: -0.5rem; margin-bottom: 1rem; }
.social-carousel { position: relative; --edgePad: 60px; --sliver: 56px; }
.social-carousel { padding: 0 var(--edgePad); }
.social-carousel .carousel-track { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 0.25rem 0.25rem 0.5rem; scrollbar-width: none; }
.social-carousel .carousel-track { -ms-overflow-style: none; }
.social-carousel .carousel-track::-webkit-scrollbar { display: none; height: 0; }
/* optional: if we ever show scrollbar, style it nicely */
.social-carousel .carousel-track.has-scrollbar::-webkit-scrollbar { height: 8px; }
.social-carousel .carousel-track.has-scrollbar::-webkit-scrollbar-thumb { background: var(--muted, #c7c7c7); border-radius: 4px; }
.social-carousel .slide { flex: 0 0 var(--slide-w, clamp(320px, 46vw, 540px)); scroll-snap-align: start; background: var(--surface, #f8f8f8); border-radius: 10px; padding: 0.5rem; box-shadow: 0 2px 14px rgba(0,0,0,0.08); }
.social-carousel .slide iframe,
.social-carousel .slide blockquote.instagram-media { width: 100%; }

/* LinkedIn iframe responsive height via wrapper with aspect ratio */
.li-embed-wrap { position: relative; width: 100%; }
.li-embed-wrap::before { content: ""; display: block; padding-top: calc(var(--ratio, 1.6) * 100% + var(--extra, 0px)); }
.li-embed-wrap > iframe { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 0; }
.li-embed-wrap > .embed-dimmer { position: absolute; inset: 0; pointer-events: none; z-index: 1; display: none; }
.li-embed-wrap > .li-overlay { position: absolute; inset: 0; z-index: 2; display: block; text-indent: -9999px; }

/* Instagram wrapper for consistent dimmer layering */
.ig-embed-wrap { position: relative; width: 100%; }
.ig-embed-wrap > .embed-dimmer { position: absolute; inset: 0; pointer-events: none; z-index: 1; display: none; }

/* Theme-aware dimmer: reduce glare from white iframes in dark mode */
html[data-theme="dark"] .social-carousel .slide { background: var(--surface); }
/* Dark mode: prefer a subtle non-interactive dimmer over inversion to preserve photos/logos */
html[data-theme="dark"] .social-section .embed-dimmer { display: block; background: rgba(0,0,0,0); mix-blend-mode: multiply; border-radius: 8px; }

/* Make it obvious there is more content; avoid arrow overlap */
.social-carousel .carousel-track {
  mask-image: linear-gradient(to right, black 0, black calc(100% - var(--edgePad)), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 0, black calc(100% - var(--edgePad)), transparent 100%);
}

@media (min-width: 900px) { .social-carousel .slide { flex-basis: var(--slide-w, clamp(360px, 32vw, 540px)); } }

/* Arrow buttons */
.social-carousel .carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--header-border); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.2); opacity: 0.92; }
.social-carousel .carousel-btn:hover { opacity: 1; }
.social-carousel .carousel-btn.prev { left: 8px; transform: translate(-50%, -50%); }
.social-carousel .carousel-btn.next { right: 8px; transform: translate(50%, -50%); }
/* Bottom controls row for narrow screens */
.social-carousel .carousel-btn-row { display: none; gap: 0.5rem; align-items: center; justify-content: center; margin-top: 0.75rem; }
.social-carousel .carousel-btn-row .carousel-btn { position: static; transform: none; box-shadow: 0 3px 10px rgba(0,0,0,0.15); }
@media (max-width: 720px){
  .social-carousel { --edgePad: 12px; }
  .social-carousel .carousel-btn.prev,
  .social-carousel .carousel-btn.next { display: none; }
  .social-carousel .carousel-btn-row { display: flex; }
}

/* Tools (cylinder sizer) */
.tool-cyl { display: grid; gap: 1.5rem; }
@media (min-width: 1100px){ .tool-cyl { grid-template-columns: 1fr; } }
/* Form styling */
.tool-form fieldset { border: 1px solid var(--header-border); border-radius: 0.75rem; padding: 0.75rem 1rem 1rem; margin: 0 0 1rem; background: var(--surface-alt); }
.tool-form fieldset legend { padding: 0 0.4rem; font-weight: 700; color: var(--ath-yellow); }
.tool-form .form-grid { display: grid; gap: 0.75rem 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tool-form .form-grid.small { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.tool-form label { display: flex; flex-direction: column; font-size: 0.85rem; gap: 0.25rem; font-weight: 500; }
.tool-form label span { color: var(--text); }
.tool-form input[type=number], .tool-form input[type=text] { -webkit-appearance: textfield; -moz-appearance: textfield; appearance: textfield; padding: 0.55rem 0.6rem; border-radius: 0.5rem; border: 1px solid var(--header-border); background: var(--surface); color: var(--text); font: inherit; }
.tool-form input:focus { outline: 2px solid var(--ath-lightblue-strong); outline-offset: 1px; }
.tool-form details.adv-block { border: 1px solid var(--header-border); border-radius: 0.75rem; background: var(--surface-alt); padding: 0.5rem 0.85rem 0.9rem; }
.tool-form details[open] > summary { margin-bottom: 0.75rem; }
.tool-form summary { cursor: pointer; font-weight: 600; color: var(--ath-lightblue-strong); list-style: none; }
.tool-form summary::-webkit-details-marker { display: none; }
.tool-form .note { font-size: 0.75rem; color: var(--muted); line-height: 1.3; }
.tool-form .full { grid-column: 1/-1; }
.actions-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 0.75rem; }
.actions-row button { padding: 0.6rem 1rem; border-radius: 0.6rem; border: 1px solid var(--header-border); background: var(--ath-lightblue-strong); color: #fff; font-weight: 600; cursor: pointer; transition: background 140ms ease, transform 140ms ease; }
/* primary now for CSV (yellow) */
.actions-row button.primary { background: var(--ath-yellow); color: #111; }
.actions-row button:hover { transform: translateY(-2px); }
.actions-row button:active { transform: translateY(-1px); }
.field-help { display:inline-flex; align-items:center; justify-content:center; width:1.25em; height:1.25em; border-radius:50%; background:var(--surface-alt); color:#fff; font-size:0.75rem; font-weight:600; cursor:help; position:relative; top:-1px; border:1px solid var(--header-border); box-shadow:0 1px 2px rgba(0,0,0,0.12) inset; }
.field-help:hover, .field-help:focus { background:var(--ath-lightblue-strong); outline:none; }
.field-help[data-tip]:hover::after, .field-help[data-tip]:focus::after { content:attr(data-tip); position:absolute; left:50%; bottom:115%; transform:translateX(-50%); background:var(--surface); color:var(--text); padding:0.65rem 0.7rem; border:1px solid var(--header-border); border-radius:0.6rem; width:280px; max-width:70vw; font-size:0.72rem; font-weight:400; line-height:1.35; z-index:40; box-shadow:0 6px 22px -4px rgba(0,0,0,0.32), 0 2px 6px rgba(0,0,0,0.18); }
.field-help[data-tip]:hover::before, .field-help[data-tip]:focus::before { content:''; position:absolute; bottom:105%; left:50%; transform:translateX(-50%); width:0; height:0; border:7px solid transparent; border-top:0; border-bottom-color:var(--header-border); }
.field-help[data-tip]:hover::after { animation:fadeInTip 120ms ease-out; }
@keyframes fadeInTip { from { opacity:0; transform:translate(-50%, 4px);} to { opacity:1; transform:translate(-50%, 0);} }
/* When JS enhancement active, hide pseudo tooltips */
body.tooltips-enhanced .field-help[data-tip]::after,
body.tooltips-enhanced .field-help[data-tip]::before { display:none !important; }
/* Global tooltip injected at body end */
#global-tooltip { position:fixed; z-index:10000; pointer-events:none; max-width:320px; background:var(--surface); color:var(--text); padding:0.7rem 0.75rem; border:1px solid var(--header-border); border-radius:0.6rem; font-size:0.72rem; line-height:1.35; box-shadow:0 10px 28px -6px rgba(0,0,0,0.38),0 3px 10px rgba(0,0,0,0.2); opacity:0; transform:translateY(4px); transition:opacity 140ms ease, transform 140ms ease; }
#global-tooltip.show { opacity:1; transform:translateY(0); }
.status { min-height: 1.1em; font-size: 0.8rem; color: var(--muted); }
.table-wrap { width: 100%; overflow-x: auto; }
table.tool-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.8rem; }
table.tool-table thead th { position: sticky; top: 0; background: var(--surface-alt); color: var(--text); padding: 0.4rem 0.5rem; text-align: left; font-weight: 600; border-bottom: 2px solid var(--header-border); }
table.tool-table tbody td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--header-border); white-space: nowrap; }
/* Zebra: white / light grey */
table.tool-table tbody tr:nth-child(even) td { background: var(--surface-alt); }
/* Hover: light blue tone */
table.tool-table tbody tr:hover td { background: color-mix(in srgb, var(--ath-lightblue) 20%, var(--surface-alt) 80%); }
html[data-theme="dark"] table.tool-table thead th { background: var(--surface); }
/* Dark mode: use same alt surface used in advanced fieldset for zebra rows */
html[data-theme="dark"] table.tool-table tbody tr:nth-child(even) td { background: var(--surface-alt); }
html[data-theme="dark"] table.tool-table tbody tr:hover td { background: color-mix(in srgb, var(--ath-lightblue) 25%, var(--surface-alt) 75%); }
/* Group column subtle left border */
/* Extend group-start vertical marker into body rows by applying class via JS or :not(:first-child) grouping */
table.tool-table th.group-start, table.tool-table td.group-start { border-left: 2px solid var(--ath-yellow); }
/* Remove leftmost first-column yellow border (pressure column) */
table.tool-table thead th:first-child, table.tool-table tbody td:first-child { border-left: none !important; }
/* Extend group-start markers + extra divider before notes (last column) */
table.tool-table tbody td.group-col { border-left: 2px solid var(--ath-yellow); }
/* Only apply last-column yellow divider on body rows (notes) and group header row, not on subheader row */
table.tool-table thead tr.group-row th:last-child, table.tool-table tbody td:last-child { border-left: 2px solid var(--ath-yellow); }
/* Reset buttons: low emphasis */
.actions-row button.reset { background: var(--surface-alt); color: var(--muted); border: 1px solid var(--header-border); font-weight:500; }
.actions-row button.reset:hover { background: var(--surface); }
/* Group header rows */
table.tool-table thead tr.group-row th { background: var(--surface-alt); font-size:0.72rem; text-align:center; border-bottom:1px solid var(--header-border); }
table.tool-table thead tr.group-row .grp-label { font-weight:700; letter-spacing:.5px; text-transform:uppercase; font-size:0.62rem; display:inline-flex; align-items:center; gap:0.35rem; }
table.tool-table thead tr.col-row th { border-top:0; }
/* Load highlighting */
table.tool-table td.load-dimmed { color: var(--muted); opacity: 1; }
table.tool-table td.load-limiting { font-weight: 400; color: var(--text); }
html[data-theme="dark"] table.tool-table td.load-dimmed { color: var(--muted); opacity: 1; }

/* Ensure consistent label heights so inputs align across rows (avoid tall labels pushing inputs down) */
.tool-form .form-grid.small label > span,
.tool-form .form-grid label > span { display: block; line-height: 1.25; min-height: calc(1.25em * 2); }

/* Developments */
.dev-card{ display:flex; flex-direction:column; gap:0.75rem; }
.dev-card .dev-card-body{ padding:0.75rem 0.75rem 0 0.75rem; }
/* Uniform 4:3 viewport for all media sliders */
.dev-card .dev-media{ position:relative; overflow:hidden; border-radius:10px; background:var(--surface-alt); aspect-ratio:4/3; }
.dev-slider{ position:relative; height:100%; }
.dev-slider .dev-track{ height:100%; display:flex; align-items:center; }
.dev-slider .dev-slide{ height:100%; flex:0 0 100%; display:flex; align-items:center; justify-content:center; }
.dev-slide img, .dev-slide video{ width:100%; height:100%; -o-object-fit:contain; object-fit:contain; display:block; background:var(--surface); }
/* Arrow buttons: white on photos, visible over any media */
.dev-slider .dev-prev, .dev-slider .dev-next{
  position:absolute; top:50%; transform:translateY(-50%);
  background:#ffffff; color:#111; border:1px solid rgba(0,0,0,0.15);
  width:40px; height:40px; border-radius:50%; cursor:pointer; box-shadow:0 8px 18px rgba(0,0,0,0.25);
  z-index:2; display:inline-flex; align-items:center; justify-content:center; opacity:.96;
}
.dev-slider .dev-prev:hover, .dev-slider .dev-next:hover{ opacity:1; box-shadow:0 10px 24px rgba(0,0,0,0.3); }
.dev-slider .dev-prev{ left:6px; }
.dev-slider .dev-next{ right:6px; }

/* Dev card headings/subtitle */
.dev-card h3.dev-title{ margin:0; }
.dev-card .dev-client{ margin:0.2rem 0 0.6rem; color:var(--muted); font-weight:600; }
.dev-card .dev-client a{ color:inherit; text-decoration:none; }
.dev-card .dev-client a:hover{ text-decoration:underline; text-underline-offset:2px; text-decoration-thickness:1px; }

/* Store (Tienda) */
.store-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0 2rem; }
@media (max-width: 980px){ .store-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px){ .store-grid { grid-template-columns: 1fr; } }
.store-card { background: var(--surface); border: 1px solid var(--header-border); border-radius: 0.75rem; padding: 0.75rem; box-shadow: 0 6px 18px rgba(0,0,0,0.18); display: grid; gap: 0.6rem; align-content: start; }
.store-card .card-head { display: grid; grid-template-columns: 96px 1fr; gap: 0.75rem; align-items: center; }
.store-card .media-wrap { width: 100%; height: 96px; display: flex; align-items: center; justify-content: center; }
.store-card .thumb { width: 100%; height: 100%; -o-object-fit: contain; object-fit: contain; background: var(--surface-alt); border-radius: 0.5rem; border: 1px solid var(--header-border); }
.store-card .prod-title { margin: 0 0 0.15rem; font-size: 1rem; color: var(--text); font-weight: 700; }
.store-card .price { margin: 0; font-weight: 800; color: var(--ath-yellow); }
.store-card .expand-btn, .store-card .collapse-btn { align-self: end; padding: 0.5rem 0.75rem; border-radius: 0.5rem; border: 1px solid var(--header-border); background: var(--surface-alt); color: var(--text); cursor: pointer; }
.store-card .expand-btn:hover, .store-card .collapse-btn:hover { background: var(--surface); }
.store-card .details { border-top: 1px solid var(--header-border); padding-top: 0.6rem; display: grid; gap: 0.6rem; }
.store-card .viewer { position: relative; background: var(--surface-alt); border: 1px solid var(--header-border); border-radius: 0.5rem; display: grid; place-items: center; overflow: hidden; }
.store-card .viewer .main { width: 100%; height: auto; -o-object-fit: contain; object-fit: contain; display: block; }
.store-card .viewer .nav { position: absolute; top: 50%; transform: translateY(-50%); background: #fff; border: 1px solid var(--header-border); width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.2); }
.store-card .viewer .prev { left: 8px; }
.store-card .viewer .next { right: 8px; }
.store-card .thumbs { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; }
.store-card .thumbs .thumb-btn { border: 1px solid var(--header-border); background: var(--surface); padding: 2px; border-radius: 6px; cursor: pointer; }
.store-card .thumbs img { width: 64px; height: 64px; -o-object-fit: contain; object-fit: contain; display: block; }
.store-card .desc { font-size: 0.92rem; color: var(--text); }
.store-card .desc p { margin: 0.25rem 0; }
.store-card .actions { display: flex; gap: 0.5rem; align-items: center; justify-content: flex-end; margin-top: 0.25rem; }
.store-card .buy-btn { text-decoration: none; padding: 0.55rem 0.9rem; border-radius: 0.55rem; border: 1px solid var(--header-border); background: var(--ath-yellow); color: #111; font-weight: 800; }
.store-card .buy-btn:hover { filter: saturate(1.05) brightness(1.02); }

