/*
Theme Name: Aston Magna
Theme URI: https://astonmagna.org/
Author: SWorks
Author URI: https://sworks.tech/
Description: Block theme for the Aston Magna Music Festival: navy, gold and ivory, with editable templates and patterns.
Version: 1.0.5
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aston-magna
*/

/* Most styling lives in theme.json. This file holds only what theme.json can't express. */

/* ---------- Header ---------- */
.am-masthead .wp-block-site-logo { display: flex; justify-content: center; }
.am-navbar { position: relative; z-index: 20; }
.am-nav { color: var(--wp--preset--color--ivory); font-family: var(--wp--preset--font-family--cinzel); font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; }
.am-navbar > .am-nav { max-width: var(--wp--style--global--wide-size) !important; }
.am-nav .wp-block-navigation-item__content { padding: .25em 0; }
.am-nav .wp-block-navigation-item__content.wp-block-navigation-item__content { color: var(--wp--preset--color--ivory); }
.am-nav .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.am-nav .wp-block-navigation-item__content.wp-block-navigation-item__content:focus,
.am-nav .current-menu-item > .wp-block-navigation-item__content.wp-block-navigation-item__content,
.am-nav .current-menu-ancestor > .wp-block-navigation-item__content.wp-block-navigation-item__content,
.am-nav .am-nav-donate > .wp-block-navigation-item__content.wp-block-navigation-item__content { color: var(--wp--preset--color--gold-light); }
.wp-block-image .wp-element-caption { text-align: left; }
.wp-block-post-content iframe, .wp-block-post-content table, .wpcf7-form p { max-width: 100%; }
.wpcf7-form .wpcf7-form-control-wrap { display: block; }
.am-nav .wp-block-navigation__submenu-container { background: var(--wp--preset--color--navy) !important; border: 0 !important; padding: .5rem 0; min-width: 15rem !important; }
.am-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .5rem 1rem; }
.am-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--navy) !important; color: var(--wp--preset--color--ivory) !important; }
.am-nav .wp-block-navigation__responsive-container-open { color: var(--wp--preset--color--ivory); margin-inline: auto; }

/* ---------- Small labels ---------- */
.is-style-eyebrow {
	color: var(--wp--preset--color--bronze);
	font-family: var(--wp--preset--font-family--cinzel);
	font-size: .8125rem;
	letter-spacing: .2em;
	line-height: 1.5;
	text-transform: uppercase;
}
.is-style-eyebrow:empty { display: none; }
.has-navy-background-color .is-style-eyebrow,
.is-style-card-navy .is-style-eyebrow,
.wp-block-cover .is-style-eyebrow { color: var(--wp--preset--color--gold-light); }

.is-style-lead {
	color: var(--wp--preset--color--navy);
	font-family: var(--wp--preset--font-family--cormorant-garamond);
	font-size: var(--wp--preset--font-size--big);
	font-weight: 500;
	line-height: 1.35;
}
.is-style-muted { color: var(--wp--preset--color--muted); }

/* ---------- Photo heroes ---------- */
.am-hero { align-items: flex-end; }
.am-hero .wp-block-cover__background {
	background: linear-gradient(to bottom, rgba(11, 34, 64, .05) 20%, rgba(11, 34, 64, .72) 58%, rgba(11, 34, 64, .94) 100%) !important;
	opacity: 1 !important;
}
.am-hero .wp-block-cover__inner-container { margin-inline: auto !important; max-width: var(--wp--style--global--wide-size); width: 100% !important; }
.am-hero .wp-block-cover__inner-container > * { margin-inline: 0 !important; max-width: none; }
.am-hero h1, .am-hero .wp-block-post-title { color: #fff; }
.am-hero-copy { max-width: 42rem; }
.am-hero .is-style-eyebrow { text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }

/* ---------- Cards ---------- */
.is-style-card { background: #fff; border: 1px solid var(--wp--preset--color--rule); border-radius: 4px; padding: clamp(1.25rem, 2.5vw, 2rem); }
.is-style-card-navy { background: var(--wp--preset--color--navy); border-radius: 4px; color: var(--wp--preset--color--ivory); padding: clamp(1.25rem, 2.5vw, 2rem); }
.is-style-card-navy h2, .is-style-card-navy h3 { color: #fff; }
.is-style-card-navy a:not(.wp-element-button) { color: var(--wp--preset--color--gold-light); }
.is-style-card, .is-style-card-navy { height: 100%; }
.wp-block-image img, .wp-block-post-featured-image img { border-radius: 3px; }

/* ---------- Navy sections: links must stay readable ---------- */
.has-navy-background-color a:not(.wp-element-button),
.has-navy-deep-background-color a:not(.wp-element-button) { color: var(--wp--preset--color--gold-light); }

/* ---------- Edge-to-edge photo strip ---------- */
.am-photo-strip { gap: 4px !important; }
.am-photo-strip .wp-block-image { margin: 0; }
.am-photo-strip img { aspect-ratio: 1; border-radius: 0; object-fit: cover; width: 100%; }

/* ---------- Concert rows ---------- */
.am-concerts { list-style: none; margin: 0; padding: 0; }
.am-concert { align-items: baseline; border-top: 1px solid var(--wp--preset--color--rule); gap: 1rem 2rem; padding-block: 1.1rem; }
.am-concert:last-child { border-bottom: 1px solid var(--wp--preset--color--rule); }
.am-concert > .is-style-eyebrow { flex: 0 0 9rem; margin: 0; }
.am-concert > h3 { margin: 0; }

/* ---------- Artists ---------- */
.am-artist-grid .wp-block-post-featured-image img { object-position: 50% 20%; }
.am-artist-grid .wp-block-post-featured-image { background: var(--wp--preset--color--rule); margin-bottom: .75rem; }
.am-artist-grid .wp-block-post-title { font-size: 1.5rem; margin: 0 0 .25rem; }
.am-artist-grid .wp-block-post-title a { text-decoration: none; }
.am-artist-grid .wp-block-post-title a:hover { color: var(--wp--preset--color--bronze); }
.am-artist-role { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); margin: 0; }
.am-artist-role:empty { display: none; }

/* ---------- Page sections ---------- */
.wp-site-blocks > * + * { margin-block-start: 0; }
main:has(> .wp-block-post-content > .alignfull:last-child) { padding-bottom: 0 !important; }
h1, h2, h3, h4 { overflow-wrap: break-word; }
[class*="tribe-tickets"] a:not([class*="btn"]) { color: var(--wp--preset--color--navy); }
.is-style-card, .is-style-card-navy { overflow-wrap: anywhere; }
.am-hero + .wp-block-post-content, .wp-block-post-content > .alignfull { margin-top: 0; }
.wp-block-post-content > .alignfull { margin-bottom: 0; }
.wp-block-post-content > .alignfull + * { margin-top: 0; }
.am-band-copy { max-width: 36rem; }
.am-band h2 { color: #fff; }
.am-facts { border-top: 2px solid var(--wp--preset--color--gold); padding-top: var(--wp--preset--spacing--40); }
.am-facts .is-style-eyebrow { margin-bottom: 0; }
.am-facts .is-style-lead { margin-top: .25rem; }
.am-photo-strip { grid-template-columns: repeat(4, 1fr) !important; }
.wp-block-post-template.is-layout-grid { gap: var(--wp--preset--spacing--40); }
.wp-block-heading a { text-decoration: none; }
.wp-block-heading a:hover { color: var(--wp--preset--color--bronze); }
.wp-block-group:has(> .am-concerts) { margin-top: 0; }

/* ---------- Footer ---------- */
.am-footer img { display: block; }
.am-footer p { margin: 0; }

/* ---------- Older content ---------- */
.am-col { box-sizing: border-box; float: left; padding-inline-end: 1.5rem; width: 100%; }
.am-col-end { clear: right; }
.am-col-clear { clear: both; }
@media (min-width: 700px) {
	.am-col-1-2 { width: 50%; }
	.am-col-1-3 { width: 33.33%; }
	.am-col-2-3 { width: 66.66%; }
	.am-col-1-4 { width: 25%; }
	.am-col-3-4 { width: 75%; }
}
.entry-content::after, .wp-block-post-content::after { clear: both; content: ""; display: table; }
.wp-block-post-content img { height: auto; max-width: 100%; }
.wp-block-post-content { overflow-wrap: break-word; }
.wp-block-post-content .wp-caption, .wp-block-post-content figure { max-width: 100% !important; }
.wp-block-post-content [style*="width"]:not(img):not(.wp-block-column) { max-width: 100%; }
.wp-block-post-content .wp-caption-text { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--x-small); }
.alignleft:not(.wp-block-image) { float: left; margin: .25rem 1.5rem 1rem 0; }
.alignright:not(.wp-block-image) { float: right; margin: .25rem 0 1rem 1.5rem; }

/* ---------- Forms: Contact Form 7, comments, search ---------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"], input[type="number"], select, textarea {
	background: #fff;
	border: 1px solid var(--wp--preset--color--rule);
	border-radius: 3px;
	box-sizing: border-box;
	font: inherit;
	max-width: 100%;
	padding: .6rem .75rem;
}
.wpcf7-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), .wpcf7-form textarea { width: 100%; }
input[type="submit"], .wpcf7-submit, button.tribe-common-c-btn {
	background: var(--wp--preset--color--gold) !important;
	border: 0;
	border-radius: 3px;
	color: var(--wp--preset--color--navy) !important;
	cursor: pointer;
	font: 600 .9375rem var(--wp--preset--font-family--inter);
	padding: .8rem 1.5rem;
}
input[type="submit"]:hover, .wpcf7-submit:hover, button.tribe-common-c-btn:hover { background: var(--wp--preset--color--gold-light) !important; }

/* ---------- The Events Calendar and Event Tickets ---------- */
.tribe-common, .tribe-events, .tribe-tickets__tickets-form {
	--tec-color-accent-primary: var(--wp--preset--color--gold);
	--tec-color-accent-primary-hover: var(--wp--preset--color--gold-light);
	--tec-color-accent-primary-active: var(--wp--preset--color--gold-light);
	--tec-color-text-primary: var(--wp--preset--color--ink);
	--tec-color-link-primary: var(--wp--preset--color--navy);
	--tec-color-link-accent: var(--wp--preset--color--bronze);
	--tec-color-background-events: var(--wp--preset--color--ivory);
	--tec-font-family-sans-serif: var(--wp--preset--font-family--inter);
	--tec-font-family-base: var(--wp--preset--font-family--inter);
}
.tribe-events-single-event-title, .tribe-events-calendar-list__event-title, .tribe-events-calendar-list__event-title a, .tribe-events-pro-summary__event-title, .tribe-events-calendar-latest-past__event-title, .tribe-events-calendar-latest-past__event-title a, .tribe-events-calendar-latest-past__heading {
	color: var(--wp--preset--color--navy);
	font-family: var(--wp--preset--font-family--cormorant-garamond) !important;
	font-weight: 500 !important;
}

/* ---------- Small screens ---------- */
@media (max-width: 781px) {
	.am-photo-strip { grid-template-columns: repeat(2, 1fr) !important; }
	.wp-block-post-template.is-layout-grid { grid-template-columns: repeat(2, 1fr) !important; }
	.am-concert { flex-wrap: wrap !important; gap: .25rem; }
	.am-concert > .is-style-eyebrow { flex-basis: 100%; }
	.am-footer > .wp-block-group { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; }
}
