/*
Theme Name:   Astra Child — Narva-Jõesuu Jazz
Theme URI:    https://narva-joesuujazz.ee
Description:  Child theme of Astra. Home for custom CSS / PHP / template overrides for the Narva-Jõesuu Jazz festival site. The live site currently runs the Astra parent with no child theme, so there is nowhere for custom code — this fixes that (see narva-joesuujazz-cheatsheet.md §16).
Author:       Narva-Jõesuu Jazz
Template:     astra
Version:      1.0.1
Text Domain:  astra-child
*/

/* ---------------------------------------------------------------------------
   Custom CSS. The footer sponsor-logo styling below was MOVED here from
   Customize → Additional CSS so it is version-controlled and deploys with the
   theme. After activating this child theme on live, remove the same block from
   Customize → Additional CSS to avoid duplication.
--------------------------------------------------------------------------- */

/* Footer sponsor logos → one separated, centered row, sized PER LOGO so the
   lettering reads at a similar size. The emblem logos share a roughly common
   height; the Elme wordmark (pure text, ~8:1) is set much SHORTER on purpose
   so its letters match the others instead of stretching into a giant banner.

   Sizes are keyed to each logo's media id (img.wp-image-N). To resize one
   logo, change its height below (bigger number = bigger logo + bigger text).
   A newly added Image block uses the default height until it's tuned here. */
.site-primary-footer-wrap .ast-builder-grid-row{
  display:flex !important;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:30px 48px;          /* row-gap  column-gap (space between logos) */
}
/* flatten Astra's column-section + widget wrappers so EVERY logo becomes a
   direct flex item of the row. The .site-footer-section wrapper is the key one:
   logos that share a footer column (Kultuuriministeerium + Elme are both in
   section 3) would otherwise STACK instead of sitting side by side. */
.site-primary-footer-wrap .site-footer-section,
.site-primary-footer-wrap .footer-widget-area,
.site-primary-footer-wrap .footer-widget-area-inner,
.site-primary-footer-wrap .footer-widget-area .widget_block,
.site-primary-footer-wrap .footer-widget-area .widget_block > div{
  display:contents;
}
.site-primary-footer-wrap .footer-widget-area figure.wp-block-image{
  margin:0 !important;
  display:flex;
  align-items:center;
  justify-content:center;
}
/* default size for any logo (incl. newly added sponsors) */
.site-primary-footer-wrap .footer-widget-area figure.wp-block-image img{
  width:auto        !important;
  max-width:none    !important;
  height:86px       !important;
  aspect-ratio:auto !important;
}
/* per-logo heights (full selector so they win over the default above) */
.site-primary-footer-wrap .footer-widget-area figure.wp-block-image img.wp-image-1673{ height:86px !important; } /* Narva-Jõesuu town crest    */
.site-primary-footer-wrap .footer-widget-area figure.wp-block-image img.wp-image-2728{ height:96px !important; } /* Eesti Kultuurkapital        */
.site-primary-footer-wrap .footer-widget-area figure.wp-block-image img.wp-image-2730{ height:84px !important; } /* Kultuuriministeerium        */
.site-primary-footer-wrap .footer-widget-area figure.wp-block-image img.wp-image-2774{ height:28px !important; } /* Elme Messer Gaas (wordmark) */
.site-primary-footer-wrap .footer-widget-area figure.wp-block-image img.wp-image-2017{ height:122px !important; } /* Mariine Auto / Subaru (enlarged) */

/* extra breathing room between Kultuuriministeerium and Elme (desktop one-row) */
@media (min-width:922px){
  .site-primary-footer-wrap .footer-widget-area figure.wp-block-image:has(img.wp-image-2774){ margin-left:44px !important; }
}

/* tablet — same proportions, scaled down */
@media (max-width:921px){
  .site-primary-footer-wrap .ast-builder-grid-row{ gap:26px 40px; }
  .site-primary-footer-wrap .footer-widget-area figure.wp-block-image img{ height:70px !important; }
  .site-primary-footer-wrap .footer-widget-area figure.wp-block-image img.wp-image-1673{ height:70px !important; }
  .site-primary-footer-wrap .footer-widget-area figure.wp-block-image img.wp-image-2728{ height:78px !important; }
  .site-primary-footer-wrap .footer-widget-area figure.wp-block-image img.wp-image-2730{ height:68px !important; }
  .site-primary-footer-wrap .footer-widget-area figure.wp-block-image img.wp-image-2774{ height:23px !important; }
  .site-primary-footer-wrap .footer-widget-area figure.wp-block-image img.wp-image-2017{ height:99px !important; }
}
/* phone — wraps to 2–3 rows, stays centered */
@media (max-width:544px){
  .site-primary-footer-wrap .ast-builder-grid-row{ gap:18px 30px; }
  .site-primary-footer-wrap .footer-widget-area figure.wp-block-image img{ height:54px !important; }
  .site-primary-footer-wrap .footer-widget-area figure.wp-block-image img.wp-image-1673{ height:54px !important; }
  .site-primary-footer-wrap .footer-widget-area figure.wp-block-image img.wp-image-2728{ height:60px !important; }
  .site-primary-footer-wrap .footer-widget-area figure.wp-block-image img.wp-image-2730{ height:52px !important; }
  .site-primary-footer-wrap .footer-widget-area figure.wp-block-image img.wp-image-2774{ height:18px !important; }
  .site-primary-footer-wrap .footer-widget-area figure.wp-block-image img.wp-image-2017{ height:76px !important; }
}
