/*
Theme Name: D9112 Rotary
Theme URI: https://rotarydistrict9112.org/
Author: Rotary District 9112
Description: Elementor theme for Rotary International District 9112 (Lagos and Ogun States). Built for Elementor and Elementor Pro: every page, the header, footer and the club, project, event, leader and news templates are Elementor designs. Works with the D9112 Core plugin (bundled), which adds the District widgets, encrypted member records, Paystack/Flutterwave payments and security hardening.
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: d9112-rotary
Tags: elementor, custom-logo, custom-menu, featured-images, accessibility-ready, translation-ready
*/

/* Colours and fonts are set in Elementor → Site Settings (applied by the importer).
   This file only holds small refinements and the fallback layout used before Elementor Pro is active. */

:root {
	--d9112-royal: #17458F;
	--d9112-royal-dark: #0F3270;
	--d9112-azure: #0067C8;
	--d9112-gold: #F7A81B;
	--d9112-gold-ink: #2B1C00;
	--d9112-ink: #13213A;
	--d9112-muted: #55627A;
	--d9112-line: #DFE5EE;
	--d9112-mist: #F2F5FA;
}

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--d9112-ink); font-family: "Open Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--d9112-azure); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--d9112-gold); outline-offset: 2px; }
h1, h2, h3, h4 { text-wrap: balance; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100000; clip: auto; clip-path: none; width: auto; height: auto; padding: 10px 16px; background: var(--d9112-gold); color: var(--d9112-gold-ink); font-weight: 700; }

/* ===================================================== Elementor refinements */

.d9112-eyebrow .elementor-heading-title { margin: 0; }
.d9112-more p, .d9112-more { margin: 0; }
.d9112-arrow { font-weight: 700; text-decoration: none; color: inherit; }
.d9112-arrow::after { content: " →"; }
.d9112-arrow:hover { text-decoration: underline; }
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }

/* Hero */
.d9112-hero-el .elementor-heading-title { text-wrap: balance; }
.d9112-hero-cap { border-top: 1px solid rgba(255, 255, 255, .22); padding-top: 14px; max-width: 760px; }

/* District at a glance */
.d9112-glance-row { border-top: 1px solid var(--d9112-line); border-bottom: 1px solid var(--d9112-line); }
.d9112-stat { border-right: 1px solid var(--d9112-line); }
.d9112-stat:last-child { border-right: 0; }
.d9112-stat .elementor-counter { justify-content: flex-start; }
@media (max-width: 1024px) { .d9112-stat { border-bottom: 1px solid var(--d9112-line); } .d9112-stat:nth-child(2n) { border-right: 0; } }
@media (max-width: 767px) { .d9112-stat { border-right: 0; } }

/* RI band */
.d9112-ri-yr .d9112-ri-year { margin: 0; font-weight: 800; font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: .95; letter-spacing: -0.02em; }
.d9112-ri-text h3 { color: #fff; font-size: 1.2rem; line-height: 1.35; margin: 0 0 6px; }

/* Explore / For Rotarians panels */
.d9112-paths-row { border: 1px solid var(--d9112-line); border-radius: 6px; overflow: hidden; }
.d9112-path .elementor-icon-list-item { padding: 10px 0 !important; border-bottom: 1px solid var(--d9112-line); }
.d9112-path.is-dark .elementor-icon-list-item { border-color: rgba(255, 255, 255, .2); }
.d9112-path .elementor-icon-list-text { font-weight: 600; }

/* Page heads */
.d9112-page-head .elementor-heading-title { color: #fff; }
.d9112-page-head .d9112-eyebrow .elementor-heading-title { color: var(--d9112-gold); }
.d9112-page-head .elementor-widget-theme-post-excerpt p, .d9112-lede p { max-width: 62ch; }

/* Content helpers used in pages */
.d9112-plain-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.d9112-plain-table th, .d9112-plain-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--d9112-line); vertical-align: top; }
.d9112-plain-table th { background: var(--d9112-mist); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--d9112-muted); }
.elementor-widget-text-editor:has(.d9112-plain-table) { overflow-x: auto; }
.d9112-notice-box { padding: 14px 16px; background: var(--d9112-mist); border-left: 3px solid var(--d9112-gold); border-radius: 4px; }
.d9112-serif { font-family: "Source Serif 4", Georgia, serif; font-size: 1.4rem; margin: 0; }
.d9112-steps-row .elementor-widget-heading:first-child .elementor-heading-title { line-height: 1; }
.d9112-article .elementor-widget-theme-post-content { font-size: 1.08rem; }

/* Header and footer */
.d9112-main-header .elementor-nav-menu--main .elementor-item { white-space: nowrap; }
.d9112-main-header .elementor-sticky--effects { box-shadow: 0 6px 18px -10px rgba(10, 25, 55, .35); }
.d9112-util-text p, .d9112-util-text strong { margin: 0; }
.d9112-util-text strong { color: var(--d9112-gold); }
.d9112-foot-h .elementor-heading-title { letter-spacing: .12em; text-transform: uppercase; }
.d9112-footer .d9112-office, .d9112-footer .d9112-office a { color: #C9D6EE; }
.d9112-footer .d9112-office a:hover { color: #fff; }
.d9112-footer .d9112-social a { color: #fff; text-decoration: none; }
.d9112-footer .d9112-newsletter input[type=email] { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .3); color: #fff; }
.d9112-footer .d9112-newsletter input::placeholder { color: #AFC0DE; }
.d9112-footer .d9112-newsletter .d9112-check, .d9112-footer .d9112-nl-msg { color: #C9D6EE; }
@media (max-width: 767px) { .d9112-hide-m { display: none !important; } }

/* Mobile "Join Rotary / Find a Club" bar */
.d9112-mjoin { display: none; }
@media (max-width: 767px) {
	.d9112-mjoin { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; gap: 10px; background: #fff; border-top: 1px solid var(--d9112-line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
	.d9112-mjoin a { flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 6px; font-weight: 700; text-decoration: none; }
	.d9112-mjoin .is-join { background: var(--d9112-gold); color: var(--d9112-gold-ink); }
	.d9112-mjoin .is-club { border: 2px solid var(--d9112-line); color: var(--d9112-ink); }
	body.d9112-has-mjoin { padding-bottom: 70px; }
}

/* ===================================================== Fallback layout (no Elementor Pro yet) */

.d9112-fb-wrap { max-width: 1200px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)); box-sizing: border-box; }
.d9112-fb-header { background: #fff; border-bottom: 1px solid var(--d9112-line); position: sticky; top: 0; z-index: 50; }
.admin-bar .d9112-fb-header { top: 32px; }
.d9112-fb-bar { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.d9112-fb-logo img { height: 46px; width: auto; display: block; }
.d9112-fb-nav { margin-left: auto; }
.d9112-fb-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.d9112-fb-nav ul ul { display: none; }
.d9112-fb-nav a { color: var(--d9112-ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.d9112-fb-nav a:hover { color: var(--d9112-royal); }
.d9112-fb-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: 6px; background: var(--d9112-gold); color: var(--d9112-gold-ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.d9112-fb-menu-toggle { display: none; }
@media (max-width: 1024px) {
	.d9112-fb-nav { display: none; width: 100%; order: 3; }
	.d9112-fb-bar { flex-wrap: wrap; }
	.d9112-fb-menu-toggle { display: inline-flex; margin-left: auto; min-height: 44px; min-width: 44px; align-items: center; justify-content: center; border: 1px solid var(--d9112-line); border-radius: 6px; background: #fff; font: inherit; }
	.d9112-fb-header.is-open .d9112-fb-nav { display: block; padding-bottom: 16px; }
	.d9112-fb-nav ul { flex-direction: column; }
	.d9112-fb-nav ul ul { display: block; padding-left: 14px; }
}
.d9112-fb-head { background: var(--d9112-royal-dark); color: #fff; }
.d9112-fb-head .d9112-fb-wrap { padding-top: 56px; padding-bottom: 40px; }
.d9112-fb-head h1 { color: #fff; margin: 0; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.12; font-weight: 800; }
.d9112-fb-head p { color: #DCE5F5; max-width: 62ch; }
.d9112-fb-main { padding: 48px 0 72px; }
.d9112-fb-main .entry-content > * { max-width: 760px; }
.d9112-fb-main .entry-content > .d9112-detail, .d9112-fb-main .entry-content > div[class^="d9112-"] { max-width: none; }
.d9112-fb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
@media (max-width: 900px) { .d9112-fb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .d9112-fb-grid { grid-template-columns: minmax(0, 1fr); } }
.d9112-fb-footer { background: var(--d9112-royal-dark); color: #C9D6EE; padding: 40px 0 28px; font-size: .92rem; }
.d9112-fb-footer a { color: #fff; }
.d9112-fb-footer .d9112-fb-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.pagination, .nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.d9112-fb-bar .custom-logo-link img, .d9112-fb-bar .custom-logo { height: 46px; width: auto; display: block; }
.elementor .d9112-ri-text h3, .elementor .d9112-ri-text p { color: #fff; }
.elementor .d9112-ri-text p { color: #DCE5F5; }
