/*
Theme Name:   Doylestown Rugby
Theme URI:    https://doylestownrugby.com
Description:  Child theme of Hello Elementor for Doylestown Rugby Football Club. Holds club brand tokens and small site-wide rules; page layouts live in Elementor.
Author:       Doylestown Website Design
Template:     hello-elementor
Version:      0.1.18
Requires at least: 6.0
Requires PHP: 7.4
License:      GNU General Public License v3 or later
License URI:  https://www.gnu.org/licenses/gpl-3.0.html
Text Domain:  doylestown-rugby
*/

/*
 * Brand tokens measured from the live source site (see migration/MIGRATION-PLAN.md,
 * "Initial design specification"). Elementor's Site Settings (global colors and
 * fonts) are the primary source for widgets; these variables cover theme output
 * and custom CSS so both stay in sync.
 */
:root {
	--drfc-green: #11582d;
	--drfc-yellow: #f1d94e;
	--drfc-text: #666666;
	--drfc-white: #ffffff;
	--drfc-font-body: "Lato", sans-serif;
	--drfc-font-heading: "Titillium Web", sans-serif;
	--drfc-row-max: 1100px;
}

body {
	color: var(--drfc-text);
	font-family: var(--drfc-font-body);
	font-size: 16px;
	line-height: 1.45;
	/* Live site: club photo pinned top-centre at natural size over black. */
	background: #000 url("/wp-content/uploads/2023/01/DRFC-Website-backgroud.jpeg") no-repeat 50% 0;
	/* Live site: content scrolls over a fixed background photo. */
	background-attachment: fixed;
}

/* Hello Elementor wraps content in .site-main; let Elementor own widths. */
.page-content > .elementor,
.site-main { max-width: none; padding: 0; }

/* Header main menu: live site shows no dropdown carets; dropdown is a 240px black panel. */
.elementor-location-header .elementor-nav-menu--main .sub-arrow { display: none; }
.elementor-location-header .elementor-nav-menu--main .sub-menu { min-width: 240px !important; padding: 10px 0; }

/* Mobile menu toggle: undo Hello Elementor's pink button hover/focus fill. */
.elementor-location-header button,
.elementor-location-header button:hover,
.elementor-location-header button:focus { background-color: transparent; color: #fff; }
.elementor-location-header button:focus-visible { outline: 2px solid var(--drfc-yellow); outline-offset: 2px; }

/* Off-canvas menu (popup): indent submenu items. */
.elementor-location-popup .elementor-nav-menu--dropdown .sub-menu a { padding-left: 30px !important; }

/* Footer link lists inherit white text (theme link colour would make them green). */
.elementor-location-footer a { color: inherit; }
.elementor-location-footer a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6,
.elementor-button {
	font-family: var(--drfc-font-heading);
}

/* Yellow dotted divider used between homepage sections on the source site. */
.drfc-dotted-divider {
	border: 0;
	border-top: 8px dotted var(--drfc-yellow);
	margin: 0;
}

/* Green team buttons with white text. */
.drfc-team-button .elementor-button,
a.drfc-team-button {
	background-color: var(--drfc-green);
	color: var(--drfc-white);
	font-family: var(--drfc-font-heading);
}

/* Button with a trailing arrow (live "WORLD RUGBY RULES →"). Applied via the drfc-btn-arrow global class. */
.drfc-btn-arrow::after { content: "\2192"; margin-left: 10px; font-weight: 700; font-size: 1.3em; line-height: 1; vertical-align: -1px; }

/* Team sub-navigation label ("MEN ›"). Applied via the drfc-chevron global class. */
.drfc-chevron::after { content: "\203A"; margin-left: 10px; font-size: 1.5em; line-height: 0; vertical-align: -2px; color: #666; }

/* Footer credit bar: links green, as on the live site's credit line. */
.elementor-location-footer .drfc-credit a { color: var(--drfc-green); }

/* Original rich text (Text Editor widgets inside a drfc-rich placeholder), matching the live Beaver typography. */
.drfc-rich .elementor-widget-text-editor { color: inherit; font: inherit; text-align: inherit; }
.drfc-rich p { margin: 0 0 10px; }
.drfc-rich ul, .drfc-rich ol { margin: 0 0 10px; padding-left: 40px; }
.drfc-rich a { color: var(--drfc-green); }
.drfc-rich a:hover { text-decoration: underline; }
.drfc-rich h1, .drfc-rich h2, .drfc-rich h3, .drfc-rich h4, .drfc-rich h5, .drfc-rich h6 { font-family: var(--drfc-font-heading); font-weight: 600; color: var(--drfc-green); margin: 10px 0; }
.drfc-rich h1 { font-size: 36px; line-height: 1.15; }
.drfc-rich h2 { font-size: 30px; line-height: 1.15; }
.drfc-rich h3 { font-size: 27px; line-height: 1.15; }
.drfc-rich h4 { font-size: 24px; line-height: 1.15; }
.drfc-rich h5 { font-size: 20px; line-height: 1.15; }
.drfc-rich h6 { font-size: 14px; line-height: 1.15; }
.drfc-rich h1, .drfc-rich h3 { margin: 20px 0 10px; }
@media (max-width: 767px) {
	.drfc-rich h1 { font-size: 30px; }
	.drfc-rich h4 { font-size: 22px; }
	.drfc-rich h3 { font-size: 24px; }
}
.drfc-rich strong, .drfc-rich b { font-weight: 700; }

/* Team news grids (live Beaver post grid): pagination links. */
.drfc-news-loop .e-pagination a { color: var(--drfc-green); }

/* Team/section subnav: let the menu shrink and long items wrap on phones instead of overflowing. */
.drfc-subnav .elementor-widget-nav-menu { min-width: 0; }
@media (max-width: 767px) {
	.drfc-subnav .elementor-nav-menu--main .elementor-item { white-space: normal; }
}

/* Keep the header (and its dropdowns) above page content such as the team subnav menus. */
.elementor-location-header { position: relative; z-index: 1000; }
.elementor-location-header .elementor-nav-menu--main .sub-menu { z-index: 1001; }

/* Single posts (Elementor single-post template + drfc_post_meta_wrap), matching the live Beaver post layout. */
.drfc-post-meta-top { margin: 0 0 25px; }
.drfc-post-meta a, .drfc-post-body a { color: var(--drfc-green); }
.drfc-post-meta a:hover, .drfc-post-body a:hover { text-decoration: underline; }
.drfc-post-meta-bottom { margin-top: 20px; padding-top: 10px; }
.drfc-post-body p { margin: 0 0 10px; }
.drfc-post-body ul, .drfc-post-body ol { margin: 0 0 10px; padding-left: 40px; }
.drfc-post-body img { max-width: 100%; height: auto; }
.drfc-post-body .alignleft { float: left; margin: 5px 20px 20px 0; }
.drfc-post-body .alignright { float: right; margin: 5px 0 20px 20px; }
.drfc-post-body .aligncenter { display: block; margin: 5px auto 20px; }
.drfc-post-body::after { content: ""; display: table; clear: both; }
.drfc-post-body h1, .drfc-post-body h2, .drfc-post-body h3, .drfc-post-body h4, .drfc-post-body h5, .drfc-post-body h6 { font-family: var(--drfc-font-heading); font-weight: 600; color: var(--drfc-green); margin: 10px 0; }
.drfc-post-sidebar .wp-block-search__label { display: block; font-weight: 700; margin: 0 0 5px; }
.drfc-post-sidebar .wp-block-search__inside-wrapper { display: block; }
.drfc-post-sidebar .wp-block-search__input { display: block; width: 100%; font: 14px/20px var(--drfc-font-body); color: var(--drfc-text); padding: 6px 12px; background: #fcfcfc; border: 1px solid #e6e6e6; border-radius: 0; }
.drfc-post-sidebar .wp-block-search__button { margin: 0; font: 14px/16.1px var(--drfc-font-body); color: #fff; padding: 6px 12px; background: var(--drfc-green); border: 1px solid #072513; border-radius: 0; cursor: pointer; }

/* Subnav: the current page link stays green like the others (live behaviour). */
.drfc-subnav .elementor-nav-menu--main .elementor-item.elementor-item-active { color: var(--drfc-green); }
/* Google Drive album embeds keep the browser-default inset frame the live site shows. */
.elementor iframe[src*="drive.google.com/embeddedfolderview"] { border: 2px inset var(--drfc-text); }

/* Phones: long button labels and long link text (URLs, emails) wrap instead of widening the page. */
.elementor a.drfc-btn, .elementor a.drfc-caption-btn, .elementor .e-button-base { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.drfc-rich a, .drfc-post-body a { overflow-wrap: anywhere; }

/* Live styles link-less <a> in rich text like links (e.g. an email address with no href). */
.drfc-rich a:not([href]) { color: var(--drfc-green); }
