/*
 * Convex End-to-End colour layer (2027 redesign).
 * Loaded after main.css. Colours from the title sponsor's palette (convexin.com).
 * Remove this file and its enqueue line in functions.php to return to the old look.
 */
:root {
  --cx-primary: #145049;   /* deep teal: main brand colour */
  --cx-dark:    #04322d;   /* darker teal: hover, overlays, footer */
  --cx-teal:    #248f87;   /* bright teal: large text, icons, borders only */
  --cx-mint:    #82c7af;   /* mint: buttons and highlights on dark */
  --cx-slate:   #192322;   /* near-black text */
  --cx-grey:    #efecec;   /* light panels */
  --cx-text-muted: #4a5654;
}

/* Page background: replaces the light green gradient (white text was hard to read on it) */
body,
.color-gradient,
footer {
  background-image: linear-gradient(160deg, #1d6f66 0%, var(--cx-primary) 40%, var(--cx-dark) 100%) !important;
  background-color: var(--cx-primary) !important;
}
.home nav { background: var(--cx-primary) !important; }
nav .main-menu { background-color: var(--cx-dark) !important; opacity: 0.98; }
section.home-section { background-color: var(--cx-primary) !important; }

/* Headings on dark backgrounds */
section.home-section h1 { color: var(--cx-mint) !important; }
section.about h2 { color: #ffffff; }

/* Buttons */
.primary-btn {
  background-color: var(--cx-mint) !important;
  color: var(--cx-dark) !important;
  font-weight: 700 !important;
}
.primary-btn:hover, .primary-btn:focus-visible { background-color: #ffffff !important; color: var(--cx-dark) !important; }

/* News cards (white) */
article.col-4 h3, article.col-4 h3 a { color: var(--cx-primary) !important; }
article.col-4 p { color: var(--cx-text-muted) !important; }
article.col-4 .primary-btn { background-color: var(--cx-primary) !important; color: #ffffff !important; }
article.col-4 .primary-btn:hover { background-color: var(--cx-dark) !important; }

/* Highlighted icons that were orange */
section.home-section a.white-anchor i { color: var(--cx-mint) !important; }

/* Sponsor wall: headings and links readable on dark teal */
footer .main-block h3,
section.sponsors h3 { color: var(--cx-mint) !important; }
footer .main-block li a { color: #e3f2ec !important; }
footer .main-block li a:hover { color: #ffffff !important; text-decoration: underline; }

/* Menu overlay: grouped sub-menus */
nav .menu-content .col-6 ul li a:hover { color: var(--cx-mint) !important; }
nav .menu-content .col-6 ul.sub-menu { list-style: none; margin: 0 0 10px 0; padding: 0 0 0 2px; }
nav .menu-content .col-6 ul.sub-menu li a {
  font-size: 1em !important;
  font-weight: 300 !important;
  text-transform: none !important;
  letter-spacing: 0.02em;
  padding: 6px 0 !important;
  color: var(--cx-mint) !important;
}
nav .menu-content .col-6 ul.sub-menu li a:hover { color: #ffffff !important; }

/* Keyboard focus: the theme removed all focus outlines */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--cx-mint) !important;
  outline-offset: 2px;
}

/* End-to-End logo: its black lettering disappears on dark teal, so show it in white.
   Interim until a proper white (reversed) logo file is supplied. */
nav .logo img,
.second-footer-seccion .main-block img,
section.about img.wp-image-1916 {
  filter: brightness(0) invert(1);
}

/* Title and platinum sponsors: their logos are dark, so sit them on a light panel */
footer section.sponsors {
  background: var(--cx-grey) !important;
  max-width: 1100px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-top: 1.75em !important;
  border-radius: 12px;
  border-bottom: none !important;
}
footer section.sponsors h3 { color: var(--cx-primary) !important; }

/* Instagram feed header and button (Smash Balloon plugin) */
#sb_instagram .sbi_header_text h3,
#sb_instagram .sbi_header_text .sbi_bio { color: #ffffff !important; }
#sb_instagram .sbi_follow_btn a {
  background: var(--cx-mint) !important;
  color: var(--cx-dark) !important;
  font-weight: 700;
}
#sb_instagram .sbi_follow_btn a:hover { background: #ffffff !important; }

/* Footer small print */
.second-footer-seccion span { color: #e3f2ec; }

/* Inner-page banner titles (FAQs, Event, ...) over the tinted photo */
section.single-section h1 { color: #ffffff !important; text-shadow: 0 2px 12px rgba(4, 50, 45, 0.45); }

/* Notify-me sign-up form (CiviCRM profile notify_me_2027) */
.crm-profile-name-notify_me_2027 .crm-section .label { font-weight: 600; color: var(--cx-slate); }
.crm-profile-name-notify_me_2027 input.crm-form-text,
.crm-profile-name-notify_me_2027 .select2-container { width: 100% !important; max-width: 360px; min-height: 44px; font-size: 16px; }
.crm-profile-name-notify_me_2027 .messages.help {
  background: #e3f2ec !important; border: 1px solid var(--cx-mint) !important; color: var(--cx-slate) !important; border-radius: 10px;
}
.crm-profile-name-notify_me_2027 .crm-submit-buttons button,
.crm-profile-name-notify_me_2027 .crm-submit-buttons .crm-button {
  background: var(--cx-primary) !important; border: none !important; color: #ffffff !important;
  font-size: 16px !important; font-weight: 700 !important; padding: 12px 24px !important; border-radius: 999px !important; min-height: 44px;
}
.crm-profile-name-notify_me_2027 .crm-submit-buttons button:hover { background: var(--cx-dark) !important; }
.crm-container .crm-profile-name-notify_me_2027 input.crm-form-text { max-width: 360px !important; }

/* Home hero: event date under SAVE THE DATE, and the reminder button */
section.home-section .hero-date {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  font-weight: 800;
  color: #ffffff !important;
  line-height: 1.15;
  margin: -0.2em 0 0.6em 0;
}
section.home-section .hero-cta { margin-top: 0.5em; }
section.home-section .hero-cta .primary-btn { font-size: 16px; padding: 12px 22px; }

/* Keep "End-to-End" as written: news headlines were forced into capitals */
article.col-4 h3 { text-transform: none !important; }

/* Second hero button and the volunteer form */
section.home-section .hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
section.home-section .hero-cta .hero-volunteer {
  background: transparent !important; color: #ffffff !important; box-shadow: inset 0 0 0 2px var(--cx-mint);
}
section.home-section .hero-cta .hero-volunteer:hover { background: #ffffff !important; color: var(--cx-dark) !important; }
.volunteer-cta .primary-btn { background: var(--cx-primary) !important; color: #ffffff !important; font-size: 16px; padding: 12px 22px; }
.crm-profile-name-volunteer_2027 .crm-section .label { font-weight: 600; color: var(--cx-slate); }
.crm-container .crm-profile-name-volunteer_2027 input.crm-form-text { width: 100% !important; max-width: 360px !important; min-height: 44px; font-size: 16px; }
.crm-profile-name-volunteer_2027 .messages.help { background: #e3f2ec !important; border: 1px solid var(--cx-mint) !important; color: var(--cx-slate) !important; border-radius: 10px; }
.crm-profile-name-volunteer_2027 .crm-submit-buttons button { background: var(--cx-primary) !important; border: none !important; color: #ffffff !important; font-size: 16px !important; font-weight: 700 !important; padding: 12px 24px !important; border-radius: 999px !important; min-height: 44px; }

/* Charities page: 2027 recipients as cards with "See more" */
.recipients-2027 { color: var(--cx-slate); }
.recipients-2027 .award-tier { text-align: center; color: var(--cx-primary); font-size: 1.8em; margin: 0.4em 0 0.8em; }
.recipients-2027 .charity-grid + .award-tier { margin-top: 1.6em; }
.recipients-2027 .charity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-bottom: 1em; }
.recipients-2027 .charity-card { background: #ffffff; border: 1px solid #d9d4d4; border-top: 4px solid var(--cx-primary); border-radius: 10px; padding: 18px 20px 14px; display: flex; flex-direction: column; text-align: left; }
.recipients-2027 .charity-name { margin: 0 0 8px; font-size: 1.15em; line-height: 1.25; color: var(--cx-primary); }
.recipients-2027 .charity-summary { margin: 0 0 10px; color: var(--cx-slate); line-height: 1.45; }
.recipients-2027 .charity-more { margin: 0 0 10px; }
.recipients-2027 .charity-more summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; color: var(--cx-primary); }
.recipients-2027 .charity-more summary::-webkit-details-marker { display: none; }
.recipients-2027 .charity-more summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -4px; transition: transform 0.2s; }
.recipients-2027 .charity-more[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.recipients-2027 .charity-more .less { display: none; }
.recipients-2027 .charity-more[open] .more { display: none; }
.recipients-2027 .charity-more[open] .less { display: inline; }
.recipients-2027 .charity-more p { margin: 0 0 6px; line-height: 1.55; color: var(--cx-text-muted); }
.recipients-2027 .charity-link { margin: auto 0 0; padding-top: 6px; font-size: 0.9em; }
.recipients-2027 .charity-link a { color: var(--cx-primary); }
.charities-intro { max-width: 46em; margin: 2.2em auto 1.5em; text-align: center; color: var(--cx-text-muted); }
@media (prefers-reduced-motion: reduce) { .recipients-2027 .charity-more summary::after { transition: none; } }

/* Recipient cards: $50K as a 2x2 block, $10K three across with the last row centred */
.recipients-2027 .charity-grid { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 20px; }
.recipients-2027 .charity-card { flex: 0 1 calc((100% - 40px) / 3); min-width: 260px; box-sizing: border-box; }
.recipients-2027 .award-tier:first-child + .charity-grid .charity-card { flex-basis: calc((100% - 20px) / 2); }
@media (max-width: 640px) { .recipients-2027 .charity-card, .recipients-2027 .award-tier:first-child + .charity-grid .charity-card { flex-basis: 100%; min-width: 0; } }
.recipients-2027 .charity-grid { align-items: flex-start; }
.recipients-2027 .charity-link { margin-top: 0; }

/* Front page: corporate team line under the hero buttons; corporate form */
section.home-section .hero-corporate { margin-top: 14px; font-size: 0.95em; color: #e3f2ec; }
section.home-section .hero-corporate a { color: var(--cx-mint) !important; font-weight: 700; text-decoration: underline; }
section.home-section .hero-corporate a:hover { color: #ffffff !important; }
.crm-profile-name-corporate_team_2027 .crm-section .label { font-weight: 600; color: var(--cx-slate); }
.crm-container .crm-profile-name-corporate_team_2027 input.crm-form-text { width: 100% !important; max-width: 360px !important; min-height: 44px; font-size: 16px; }
.crm-profile-name-corporate_team_2027 .messages.help { background: #e3f2ec !important; border: 1px solid var(--cx-mint) !important; color: var(--cx-slate) !important; border-radius: 10px; }
.crm-profile-name-corporate_team_2027 .crm-submit-buttons button { background: var(--cx-primary) !important; border: none !important; color: #ffffff !important; font-size: 16px !important; font-weight: 700 !important; padding: 12px 24px !important; border-radius: 999px !important; min-height: 44px; }

/* Footer sponsor lists (Gold, Silver, Bronze, Patron): plain names, no links */
footer .menu-footer li .sponsor-name { color: #e3f2ec; }
