/* @override
   https://quebecquiltregistry.org/demo/assets/style.css
   https://borduas.concordia.ca/demo/assets/style.css
*/

/* --------------------------------
   Asta Sans (self-hosted via jsDelivr)
-----------------------------------*/
@font-face {
  font-family: 'Asta Sans';
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-Light.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-Light.woff') format('woff'),
       url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-Light.ttf') format('truetype');
}
@font-face {
  font-family: 'Asta Sans';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-Regular.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-Regular.woff') format('woff'),
       url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Asta Sans';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-Medium.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-Medium.woff') format('woff'),
       url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'Asta Sans';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-SemiBold.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-SemiBold.woff') format('woff'),
       url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-SemiBold.ttf') format('truetype');
}
@font-face {
  font-family: 'Asta Sans';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-Bold.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-Bold.woff') format('woff'),
       url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Asta Sans';
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-ExtraBold.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-ExtraBold.woff') format('woff'),
       url('https://cdn.jsdelivr.net/gh/fonts-archive/AstaSans/AstaSans-ExtraBold.ttf') format('truetype');
}

/* --------------------------------
   Root / Base
-----------------------------------*/
:root{
  --brand: #891c1c;
  --brand-dark: #5b1313;
  --container: 1200px;
  --pad-x: 20px;
  --gap-lg: 40px;
  --h2-size: 24px;
  --text: #891c1c;
}

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

html, body {
  margin: 0; padding: 0;
  height: 100%;
  display: flex;           /* keep your original layout */
  flex-direction: column;
}

/* Ensure Asta Sans applies everywhere */
html, body, * {
  font-family: 'Asta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-size: 100%;
  color: var(--text);
}

/* Links */
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Sections */
header, main, footer { width: 100%; }

/* --------------------------------
   Top Bar
-----------------------------------*/
.top-bar {
  background-color: #f1f1f1;
  color: var(--brand);
  padding: 12px 0;
  font-size: 15px;
}
.top-bar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.right-group { display: flex; align-items: center; gap: 20px; }

/* --------------------------------
   Header / Logo / Lang Button
-----------------------------------*/
.main-header { background-color: #fff; padding-top: 20px; }

.logo-nav {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
}

/* Restore fixed logo size & spacing */
.logo-nav img {
  height: 140px !important;
  width: auto;
  max-width: 100%;
}

/* Français button */
.fr-button {
  position: absolute;
  top: 24px;
  right: 20px;
  background-color: var(--brand);
  color: #fff;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
}
.fr-button:hover { background-color: var(--brand-dark); }

/* --------------------------------
   Primary Nav
-----------------------------------*/
.nav-menu {
  padding: 14px var(--pad-x);
  max-width: var(--container);
  margin: 10px auto 0;
  display: flex;
  flex-wrap: wrap;
  font-size: 23px;
  justify-content: flex-start;
  gap: 60px;               /* replaces margin-right on anchors */
}
.nav-menu a { color: var(--brand); }
.nav-menu a:last-child { margin-right: 0; } /* harmless with gap */
.current { text-decoration: underline; text-underline-offset: 2px; }

/* --------------------------------
   Main Content
-----------------------------------*/
main {
  flex: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px var(--pad-x);
}

/* Normalize first-child spacing so titles align with subtabs */
main > *:first-child { margin-top: 0; }
.intro-section:first-child, .page-section:first-child { margin-top: 0; }

/* Prevent margin collapse at top of sections */
.intro-section, .page-section { display: flow-root; }

/* Section layout */
.intro-section, .page-section {
  gap: var(--gap-lg);
  font-size: 20px;
}

/* Text blocks */
.intro-text, .page-text { color: var(--text); }
.intro-text h2, .page-text h2 {
  font-size: var(--h2-size);
  margin: 0 0 16px 0;
  line-height: 1.25;
  font-weight: 700;
}
.intro-text p, .page-text p {
  margin: 0 0 16px 0;
  line-height: 1.5;
}
.intro-image img { max-width: 100%; height: auto; border-radius: 8px; }

/* --------------------------------
   Subtabs (ARIA tabs)
   - start at same left edge as H2
   - same size as H2
   - bold active
-----------------------------------*/
.subtabs { margin: 0; }

.subtabs [role="tablist"] {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;                 /* match nav spacing */
  margin: 0 0 16px 0;        /* same bottom space as h2 */
  padding: 0;
}

.subtabs [role="tab"] {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--brand);
  font-size: var(--h2-size); /* equal to h2 */
  font-weight: 400;          /* normal by default */
  text-decoration: none;     /* no underline */
  cursor: pointer;
}

.subtabs [role="tab"][aria-selected="true"] {
  font-weight: 700;          /* bold active tab */
  text-decoration: underline;
}

.subtabs [role="tabpanel"][hidden] { display: none; }

/* --------------------------------
   Airtable Embeds
-----------------------------------*/
.airtable { border-radius: 10px; }
iframe.airtable-embed { border: none !important; }

/* --------------------------------
   Footer
-----------------------------------*/
.main-footer {
  background-color: #fff;
  padding: 40px var(--pad-x);
  text-align: center;
}
.main-footer .tagline {
  margin-top: 8px;
  font-size: 18px;
  color:  #000;
}
.main-footer .credits {
  margin-left: auto;
  margin-right: auto;
  width: 600px;
  max-width: 100%;
  font-size: 6px;
}
.main-footer .credits img {
  width: 600px;
  max-width: 80%;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* --------------------------------
   Responsive
-----------------------------------*/
@media (min-width: 768px) {
  .intro-section, .page-section { flex-direction: row; }
  .page-text { width: 100%; }
  .intro-text { width: 65%; }
  .intro-image { width: 35%; }
}

@media (max-width: 1024px) {
  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px var(--pad-x);
    gap: 10px;
    background-color: #f6f6f6;
    margin-top: 28px;
    margin-bottom: -30px;
    font-size: 19px;
  }
  .logo-nav img { max-width: 70%; height: auto; } /* keep proportionate on small screens */
  .subtabs [role="tablist"] { gap: 20px; }
  .subtabs [role="tab"] { font-size: 20px; }
}

/* --------------------------------
   Motion Preferences
-----------------------------------*/
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}