/*
Theme Name: Teamsters Local 127
Template: astra
Description: Plain Astra child keeping teamsters127.org's Drupal page frame (TW #4789): banner with search, navy horizontal menu, left sidebar, main column, light-blue footer, credit. Colours sampled from the Drupal theme `client` and the live page.
Version: 0.2.0
Author: Prometheus Labor Communications
Text Domain: teamsters127-child
*/

:root {
	--t127-page: #28456c;        /* the navy page behind the white box */
	--t127-box: #fff;
	--t127-nav: #064a7b;         /* menu bar, dropdowns */
	--t127-nav-on: #3d6ba7;      /* current / hover menu item */
	--t127-block: #a0c7e6;       /* sidebar blocks, footer */
	--t127-block-title: #6b8fb2; /* sidebar title band, tagline */
	--t127-card: #e6f1fa;        /* main-column cards */
	--t127-link: #0e4f87;
	--t127-text: #111;
	--d2w-card: var(--t127-card);    /* plc-d2w album cards */
	--d2w-accent: var(--t127-nav);
}

body.t127-frame,
.t127-frame #page,
.t127-frame .site-content,
.t127-frame.ast-plain-container,
.t127-frame .ast-plain-container {
	background: var(--t127-page);
}
body.t127-frame {
	font-family: Arial, Helvetica, Verdana, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--t127-text);
}
.t127-frame a { color: var(--t127-link); }
.t127-frame a:hover, .t127-frame a:focus { color: var(--t127-nav-on); }

/* The white page box: header, menu, columns and footer all sit inside it, 940 wide with a 10px margin */
.t127-wrap { max-width: 960px; margin: 0 auto; background: var(--t127-box); padding: 10px 10px 0; }
.t127-footer .t127-wrap { padding-bottom: 0; }

/* Header: the banner with the search box on its right */
.t127-header { padding: 12px 0 0; }
.t127-header .t127-wrap { padding-bottom: 0; display: flow-root; } /* keeps the menu bar's margin inside the white box */
.t127-banner { position: relative; line-height: 0; }
.t127-logo, .t127-logo img { display: block; width: 100%; height: auto; }
.t127-search { position: absolute; right: 16px; top: 52%; display: flex; gap: 6px; line-height: 1; }
.t127-search input[type="search"] { width: 160px; height: 24px; padding: 2px 6px; border: 1px solid #9fb6cf; border-radius: 0; font-size: 13px; background: #fff; }
.t127-frame .t127-search button {
	height: 24px; padding: 0 8px; border: 0; border-radius: 4px; background: #f39a2b; color: #fff;
	font: bold 14px/1 Arial, Helvetica, sans-serif; cursor: pointer;
}
.t127-frame .t127-search button:hover, .t127-frame .t127-search button:focus { background: #d97f12; }

/* Primary menu: the navy bar, uppercase white links, dropdowns on hover/focus, no motion */
.t127-nav { background: var(--t127-nav); margin: 10px 0 12px; padding: 0 8px; border-radius: 5px; position: relative; z-index: 97; }
.t127-menu, .t127-menu ul { list-style: none; margin: 0; padding: 0; }
.t127-menu { display: flex; flex-wrap: wrap; }
.t127-menu > li { position: relative; }
.t127-menu a {
	display: block; color: #fff; text-decoration: none;
	font-weight: bold; font-size: 13px; line-height: 1.5; text-transform: uppercase;
	padding: 7px 9px;
}
.t127-frame .t127-menu a:hover, .t127-frame .t127-menu a:focus { color: #fff; background: var(--t127-nav-on); }
.t127-menu > li.current-menu-item > a,
.t127-menu > li.current-menu-ancestor > a { background: var(--t127-nav-on); }
.t127-menu ul {
	display: none; position: absolute; left: 0; top: 100%; min-width: 240px;
	background: var(--t127-nav); z-index: 98;
}
.t127-menu li:hover > ul, .t127-menu li:focus-within > ul { display: block; }
.t127-menu ul a { text-transform: none; padding: 6px 12px; }
.t127-menu-toggle { display: none; }

/* The frame: left 220 | main, 20px gutter; no left blocks on a page lets the main column widen */
.t127-frame .site-content { padding: 0; display: flex; flex-direction: column; }
/* Astra stretches #content to the window on short pages: let the white box take that height, so the footer follows it */
.t127-frame .site-content > .ast-container {
	display: flex; align-items: flex-start; gap: 20px;
	max-width: 960px; width: 100%; flex: 1 0 auto; padding: 0 10px 10px; margin: 0 auto; background: var(--t127-box);
}
.t127-frame .site-content > .ast-container::before,
.t127-frame .site-content > .ast-container::after { display: none; }
.t127-sidebar-left { flex: 0 0 220px; width: 220px; order: 1; }
.t127-frame #primary { flex: 1 1 auto; min-width: 0; width: auto; order: 2; }
body.t127-frame #content #primary, body.t127-frame #content .site-main { margin: 0; padding: 0; } /* beats Astra's #primary margins */
.t127-front-blocks #primary > .site-main { display: none; }

/* Sidebar blocks: light-blue box, title on a darker band */
.t127-sidebar .t127-block { background: var(--t127-block); border-radius: 5px; padding: 5px; margin: 0 0 12px; }
.t127-block-title {
	margin: 0; background: var(--t127-block-title); color: #fff;
	font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 22px; line-height: 1.1;
	padding: 5px 10px;
}
.t127-sidebar .t127-block > :not(.t127-block-title) { padding: 8px 6px 4px; }
.t127-sidebar .t127-block p { margin: 0 0 .5em; }
.t127-sidebar .t127-block img { display: block; max-width: 100%; height: auto; margin: 0 auto 6px; }

/* Main column: light-blue cards; the tagline on the darker band; inner pages one card */
.t127-frame #primary .ast-article-single,
.t127-frame #primary article { background: var(--t127-card); border-radius: 5px; padding: 12px; margin: 0 0 16px; border: 0; }
/* A single page or post: the title in black above the card, the body in the card (Drupal's node page) */
.t127-frame #primary article.ast-article-single { background: none; padding: 0; }
.t127-frame #primary article.ast-article-single .entry-header { margin: 0 0 10px; }
.t127-frame #primary article.ast-article-single .entry-title { color: #000; font-weight: bold; font-size: 22px; }
.t127-frame #primary article.ast-article-single .entry-content { background: var(--t127-card); border-radius: 5px; padding: 12px; }
.t127-content-top .t127-block { margin: 0 0 6px; }
.t127-content-top .t127-block-title { display: none; }
.t127-content-region .t127-block { background: var(--t127-block-title); color: #fff; border-radius: 5px; padding: 10px 12px 14px; margin: 0 0 16px; }
.t127-content-region .t127-block-title { display: none; }
.t127-content-region p { margin: 0; font-style: italic; }
.t127-content-bottom .t127-block-title { background: none; color: #000; font-size: 22px; padding: 0 0 8px; }
.t127-content-bottom .textwidget, .t127-content-bottom .t127-card { background: var(--t127-card); border-radius: 5px; padding: 12px; }
.t127-frame #primary .entry-title,
.t127-frame #primary .entry-title a { color: var(--t127-link); font-size: 22px; line-height: 1.25; font-weight: normal; margin: 0 0 .4em; }
.t127-frame #primary h2, .t127-frame #primary h3 { color: var(--t127-link); }
.t127-frame #primary .entry-content { font-size: 14px; line-height: 1.5; }
.t127-frame #primary .entry-content p { margin: 0 0 1em; }
.t127-frame .posted-by, .t127-frame .author, .t127-frame .entry-meta .byline, .t127-frame .entry-meta a[rel="author"] { display: none; } /* never show an author; the post date stays (Astra meta = date only), TW 4797 */

/* Footer: the light-blue box; credit strip under it on the navy page */
.t127-footer { padding: 0 0 30px; }
.t127-footer-box { background: var(--t127-block); color: #000; margin: 0 -10px; padding: 1em 20px 1.2em; text-align: center; font-size: 14px; }
.t127-footer-box .t127-block { margin: 0; }
.t127-footer-box h4 { margin: 0 0 .4em; font-size: 16px; }
.t127-footer-box p { margin: 0 0 .2em; }
.t127-credit { background: var(--t127-page); margin: 0 -10px; }

/* Credit line (our standard) */
.plc-credit { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; padding: 14px 16px 18px; font-size: 16px; line-height: 1.4; color: #dfe8f2; text-align: center; }
.t127-frame .plc-credit-name { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: #fff; font-weight: 700; text-decoration: none; }
.t127-frame .plc-credit-name:hover, .t127-frame .plc-credit-name:focus { color: #fff; }
.plc-credit-name:hover span:last-child, .plc-credit-name:focus-visible span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.plc-fist-wrap { position: relative; display: inline-grid; place-items: center; width: 40px; height: 62px; }
.plc-fist-wrap::before { content: ""; position: absolute; inset: -10px -12px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,176,40,.55), rgba(255,120,20,.18) 60%, transparent); animation: plcGlow 2.4s ease-in-out infinite; }
.plc-fist { position: relative; overflow: visible; }
.plc-flare { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.plc-credit-name:hover .plc-flare, .plc-credit-name:focus-visible .plc-flare { transform: scale(1.07, 1.16); }
.plc-credit-name:hover .plc-fist-wrap::before { animation-duration: .9s; }
@keyframes plcGlow { 0%, 100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) {
	.plc-flame-img { filter: none; }
	.plc-fist-wrap::before { animation: none; opacity: .6; }
	.plc-flare { transition: none; }
}

/* Phone and tablet: one column (main, then left), search under the banner, menu behind a toggle */
@media (max-width: 921px) {
	.t127-header { padding-top: 0; }
	.t127-wrap { padding: 0; }
	.t127-search { position: static; padding: 10px 16px 0; }
	.t127-search input[type="search"] { flex: 1 1 auto; width: auto; height: 36px; font-size: 16px; }
	.t127-frame .t127-search button { height: 36px; padding: 0 14px; }
	.t127-nav { margin: 10px 0 14px; padding: 0 16px; border-radius: 0; }
	.t127-nav.t127-js .t127-menu-toggle {
		display: block; width: 100%; min-height: 44px; background: none; border: 0; color: #fff;
		font: bold 14px/1 Arial, Helvetica, sans-serif; text-transform: uppercase; text-align: left; padding: 0; cursor: pointer;
	}
	.t127-nav.t127-js .t127-menu-toggle::after { content: " \25BE"; }
	.t127-nav.t127-js:not(.is-open) .t127-menu { display: none; }
	.t127-menu { display: block; padding-bottom: 8px; }
	.t127-menu a { padding: 10px 0; font-size: 14px; }
	.t127-frame .t127-menu a:hover, .t127-frame .t127-menu a:focus { background: none; text-decoration: underline; }
	.t127-menu ul { display: block; position: static; min-width: 0; padding-left: 16px; background: none; }
	.t127-frame .site-content > .ast-container { flex-direction: column; align-items: stretch; gap: 0; padding: 0 16px 10px; }
	.t127-frame #primary { order: 1; width: 100%; }
	.t127-sidebar-left { order: 2; width: auto; flex: none; }
	.t127-footer-box { margin: 0 16px; }
	.t127-credit { margin: 0; }
}

/* Titles in the main column keep their block colours (beats `#primary h2`) */
.t127-frame #primary .t127-content-bottom .t127-block-title { color: #000; }
