/*
Theme Name: Lindfield Uniting Church - GeneratePress Child
Theme URI: https://lindfieldunitingchurch.com.au/
Description: GeneratePress child theme for the Lindfield Uniting Church website migration.
Author: Digerati
Template: generatepress
Version: 0.10.0
Text Domain: luc-gp-child
*/

:root {
  --luc-red: #bb0a09;
  --luc-link: #97100f;
  --luc-width: 950px;
}

html {
  background: #aaa url('assets/images/background.png') top left / cover no-repeat fixed;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: #111;
  background: transparent;
}

a { color: var(--luc-link); }
a:hover { color: #6f0c0b; }

/* Hide GeneratePress chrome: this child theme supplies the legacy-style header/footer. */
.site-header,
.main-navigation,
.site-footer { display: none !important; }

.grid-container,
.site.grid-container,
#page.grid-container {
  max-width: var(--luc-width);
}

.site-content {
  padding: 0;
  background: transparent;
}

.content-area,
.site-main,
.inside-article {
  background: transparent !important;
}

.inside-article {
  padding: 28px 0 12px;
}

/* GeneratePress / Gutenberg padding reset for the legacy 950px layout.
   GP's separate-container padding and Gutenberg group inner padding otherwise
   narrow the homepage tiles and force the red captions to wrap incorrectly. */
.separate-containers .comments-area,
.separate-containers .inside-article,
.separate-containers .page-header,
.separate-containers .paging-navigation {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.site-main .wp-block-group__inner-container {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* The overlay itself must also remain true edge-to-edge inside each card. */
.site-main .luc-home-link__overlay .wp-block-group__inner-container {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.entry-header { margin-bottom: 20px; }
.entry-title { font-size: 32px; font-weight: 300; }
h1 { font-size: 32px; font-weight: 300; }
h2 { font-size: 24px; font-weight: 400; }

/* Header */
.luc-top {
  background: url('assets/images/header-background.png') center / cover no-repeat;
}

.luc-brand {
  max-width: var(--luc-width);
  min-height: 150px;
  margin: 0 auto;
  padding: 10px 10px 12px;
  text-align: center;
}

.luc-brand img {
  display: block;
  width: 237px;
  height: auto;
  margin: 0 auto;
}

.luc-vision {
  margin-top: 3px;
  color: #fff;
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 24px;
  line-height: 1.2;
  text-shadow: 0 1px 1px rgba(0,0,0,.3);
}

.luc-nav-wrap { background: var(--luc-red); }
.luc-nav {
  max-width: var(--luc-width);
  margin: 0 auto;
  padding: 0 10px;
}

.luc-nav ul { list-style: none; margin: 0; padding: 0; }
.luc-nav > ul { display: flex; justify-content: center; align-items: stretch; }
.luc-nav li { position: relative; margin: 0; }
.luc-nav a {
  display: block;
  padding: 10px 18px 9px;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 18px;
  font-weight: 300;
  line-height: 24px;
}
.luc-nav > ul > li.current-menu-item > a,
.luc-nav > ul > li.current-menu-ancestor > a,
.luc-nav a:hover { font-weight: 700; background: rgba(0,0,0,.08); }

.luc-nav .menu-item-has-children > a::after {
  content: "▾";
  margin-left: 7px;
  font-size: 11px;
  vertical-align: 2px;
}

.luc-nav ul ul {
  display: none;
  position: absolute;
  z-index: 1000;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--luc-red);
  box-shadow: 0 4px 9px rgba(0,0,0,.18);
}
.luc-nav ul ul a { font-size: 15px; text-transform: none; padding: 10px 14px; }
.luc-nav li:hover > ul,
.luc-nav li:focus-within > ul { display: block; }

.luc-menu-toggle { display: none; }

/* Homepage slider */
.luc-home-slider {
  max-width: var(--luc-width);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: #222;
}
.luc-home-slider .luc-slide { display: none; margin: 0; }
.luc-home-slider .luc-slide.is-active { display: block; }
.luc-home-slider img {
  display: block;
  width: 100%;
  aspect-ratio: 950 / 380;
  object-fit: cover;
}
.luc-slider-prev,
.luc-slider-next {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(187,10,9,.85);
  color: #fff;
  width: 38px;
  height: 52px;
  font-size: 24px;
  cursor: pointer;
}
.luc-slider-prev { left: 0; }
.luc-slider-next { right: 0; }

/* Standard content-page hero = Featured Image.
   Keep the legacy dark header texture behind the hero all the way down,
   while the image itself remains centred at the site content width. */
.luc-page-hero-wrap {
  width: 100%;
  background: url('assets/images/header-background.png') center / cover no-repeat;
}
.luc-page-hero {
  max-width: var(--luc-width);
  margin: 0 auto;
  overflow: hidden;
}
.luc-page-hero img {
  display: block;
  width: 100%;
  max-height: 410px;
  object-fit: cover;
}

/* The child theme owns page heroes. GeneratePress may also render the same
   Featured Image as a page-header/post image; suppress that duplicate. */
.page:not(.home) .page-header-image,
.page:not(.home) .featured-image,
.page:not(.home) .post-image {
  display: none !important;
}

/* Page content already carries its own migrated H1. Avoid a second WordPress
   page title such as "Room Hire" appearing above "Hall Hire". */
.page:not(.home) .inside-article > .entry-header {
  display: none !important;
}

/* Homepage Gutenberg content. */
.home .entry-header {
  display: none;
}
.home .inside-article {
  padding-top: 28px;
}

.luc-home-links {
  width: min(var(--luc-width), 100%) !important;
  max-width: var(--luc-width) !important;
  margin: 0 auto;
}
/* Gutenberg constrained groups otherwise narrow the card row below the legacy 950px content width. */
.luc-home-links > * {
  max-width: none !important;
}
.luc-home-links > h1,
.luc-home-links > h2 {
  margin: 0 0 25px;
  text-align: center;
  font-size: 36px;
  line-height: 1.2;
  font-weight: 100;
}
.luc-home-link-grid {
  width: 100% !important;
  max-width: var(--luc-width) !important;
  gap: 60px !important;
  margin: 0 !important;
}
.luc-home-link-grid > .wp-block-column {
  margin: 0 !important;
  min-width: 0;
}

/* Exact legacy home-link geometry from the original site:
   275px tile, 90px red band, 30px from bottom, 60px between tiles. */
.luc-home-link.wp-block-cover {
  position: relative;
  width: 100%;
  height: 275px !important;
  min-height: 275px !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  overflow: hidden;
}
.luc-home-link .wp-block-cover__image-background {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
.luc-home-link > .wp-block-cover__background {
  display: none !important;
}
.luc-home-link > .wp-block-cover__inner-container {
  position: static !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}
.luc-home-link__overlay.wp-block-group {
  position: absolute !important;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 30px;
  width: 100% !important;
  max-width: none !important;
  height: 90px !important;
  min-height: 90px !important;
  box-sizing: border-box;
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
  margin: 0 !important;
  padding: 10px 8px 0 !important;
  background: rgba(187,10,9,.75) !important;
}
.luc-home-link__overlay > * {
  max-width: none !important;
}
.luc-home-link__overlay p {
  width: 100%;
  margin: 0 !important;
  color: #fff !important;
  font-size: 20px;
  font-weight: 100;
  line-height: 22px;
  text-align: center;
}
.luc-home-link__overlay strong {
  display: inline;
  font-size: inherit;
  line-height: inherit;
  font-weight: 700;
}
.luc-home-link__overlay a,
.luc-home-link__overlay a:visited,
.luc-home-link__overlay a:hover,
.luc-home-link__overlay a:focus {
  color: #fff !important;
  text-decoration: none !important;
}

/* Gallery embeds */
.luc-gallery-embed { margin: 28px 0; }
.luc-gallery-embed > h2 { margin-bottom: 16px; }

/* Footer */
.luc-footer {
  max-width: var(--luc-width);
  margin: 0 auto;
  padding: 42px 10px 36px;
  font-size: 11px;
}
.luc-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.luc-footer img { width: 93px; height: auto; opacity: .72; }

@media (max-width: 768px) {
  .luc-brand { min-height: 120px; }
  .luc-brand img { width: 210px; }
  .luc-vision { font-size: 20px; }
  .luc-menu-toggle {
    display: block;
    width: 100%;
    border: 0;
    padding: 11px 15px;
    background: var(--luc-red);
    color: #fff;
    text-align: left;
    font-size: 17px;
  }
  .luc-nav { padding: 0; }
  .luc-nav > ul { display: none; flex-direction: column; }
  .luc-nav.is-open > ul { display: flex; }
  .luc-nav ul ul {
    display: block;
    position: static;
    min-width: 0;
    box-shadow: none;
    background: rgba(0,0,0,.09);
  }
  .luc-nav a { padding: 10px 15px; font-size: 16px; }
  .luc-nav ul ul a { padding-left: 30px; }
  .luc-home-slider img { aspect-ratio: 16 / 8; }
  .luc-page-hero { margin: 0 10px; }
  .inside-article { padding: 24px 10px 10px; }
  .luc-home-link-grid { gap: 15px !important; }
  .luc-home-links > h1,
  .luc-home-links > h2 { font-size: 28px; }
  .luc-home-link.wp-block-cover { height: 300px !important; min-height: 300px !important; }
  .luc-home-link__overlay.wp-block-group { bottom: 30px; }
  .luc-footer-inner { align-items: flex-start; }
}


/* Gallery CPT archive + single presentation. */
.post-type-archive-luc_gallery .inside-article,
.single-luc_gallery .inside-article {
  padding-top: 34px;
}

.luc-gallery-archive {
  width: min(var(--luc-width), 100%);
  margin: 0 auto;
}

.luc-gallery-archive h1,
.single-luc_gallery .luc-gallery-single h1 {
  margin: 0 0 36px;
  font-size: 38px;
  line-height: 1.15;
  font-weight: 700;
}

.luc-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 250px);
  gap: 34px 38px;
  align-items: start;
  justify-content: start;
}

.luc-gallery-card {
  width: 250px;
  margin: 0;
  text-align: center;
}

.luc-gallery-card a {
  display: block;
  color: var(--luc-red);
  text-decoration: none;
}

.luc-gallery-card__image {
  display: block;
  width: 250px;
  height: 250px;
  overflow: hidden;
  background: #ddd;
}

.luc-gallery-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.luc-gallery-card__title {
  display: block;
  padding-top: 5px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 300;
}

.luc-gallery-card a:hover .luc-gallery-card__title,
.luc-gallery-card a:focus .luc-gallery-card__title {
  text-decoration: underline;
}

.luc-gallery-single {
  width: min(var(--luc-width), 100%);
  margin: 0 auto;
}

/* The imported post content will be a native Gutenberg Gallery block. */
.single-luc_gallery .wp-block-gallery {
  gap: 16px !important;
}

.single-luc_gallery .wp-block-gallery .wp-block-image img {
  width: 100%;
  height: auto;
}

@media (max-width: 860px) {
  .luc-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 250px));
  }
}

@media (max-width: 560px) {
  .luc-gallery-grid {
    grid-template-columns: 1fr;
  }
  .luc-gallery-card,
  .luc-gallery-card__image {
    width: 100%;
  }
  .luc-gallery-card__image {
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

/* v0.9 - legacy gallery layout: four thumbnails wide, no captions. */
.single-luc_gallery .wp-block-gallery.has-nested-images {display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:36px !important;align-items:start;}
.single-luc_gallery .wp-block-gallery.has-nested-images > .wp-block-image {width:100% !important;margin:0 !important;}
.single-luc_gallery .wp-block-gallery.has-nested-images > .wp-block-image img {display:block;width:100% !important;height:250px !important;object-fit:cover;}
.single-luc_gallery .wp-block-gallery figcaption,.single-luc_gallery .wp-element-caption {display:none !important;}
@media (max-width:860px){.single-luc_gallery .wp-block-gallery.has-nested-images{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}}
@media (max-width:560px){.single-luc_gallery .wp-block-gallery.has-nested-images{grid-template-columns:1fr !important;}}

/* v0.10 sermon archive */
.luc-sermon-archive,
.luc-sermon-single {
    max-width: 1040px;
    margin: 0 auto;
    padding: 38px 0 55px;
}
.luc-sermon-list-item {
    padding: 0 0 22px;
    margin: 0 0 22px;
    border-bottom: 1px solid rgba(0,0,0,.14);
}
.luc-sermon-list-item h2 { margin: 0 0 6px; font-size: 24px; }
.luc-sermon-occasion { font-weight: 700; margin-bottom: 3px; }
.luc-sermon-preacher { font-style: italic; margin-bottom: 5px; }
.luc-sermon-excerpt p { margin: 5px 0 8px; }
.luc-sermon-read { color: #c50000; font-weight: 700; }
@media (max-width: 1080px) {
    .luc-sermon-archive, .luc-sermon-single { padding-left: 24px; padding-right: 24px; }
}
