/*
Theme Name: Raffle Pro Rotary
Theme URI: https://raffle.rotarydistrict3780.org/
Author: Rotary International District 3780
Description: A clean, premium, Astra-free WordPress theme for the Raffle Pro fundraising platform.
Version: 1.0.2
Requires at least: 6.1
Requires PHP: 7.4
Text Domain: rafflepro-rotary
*/

:root {
  --rp-blue: #17458f;
  --rp-blue-dark: #10346d;
  --rp-sky: #0067c5;
  --rp-gold: #f7a81b;
  --rp-navy: #0f172a;
  --rp-ink: #172b4d;
  --rp-muted: #5f769a;
  --rp-mist: #f0f6ff;
  --rp-border: #d9e3f1;
  --rp-white: #ffffff;
  --rp-radius: 18px;
  --rp-shadow: 0 14px 40px rgba(23, 69, 143, 0.10);
  --rp-content: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--rp-ink);
  background: var(--rp-mist);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--rp-blue); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover, a:focus { color: var(--rp-sky); }
button, input, select, textarea { font: inherit; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  z-index: 100000; top: 12px; left: 12px; width: auto; height: auto;
  padding: 10px 14px; margin: 0; color: var(--rp-white); background: var(--rp-blue);
  clip: auto; white-space: normal; border-radius: 8px;
}

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-main { flex: 1 0 auto; padding: 36px 0 72px; }
.site-content { width: min(calc(100% - 40px), var(--rp-content)); margin: 0 auto; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.alignfull { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); }
.entry-content .wp-block-button__link, .entry-content .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
  padding: 10px 20px; color: var(--rp-white); background: var(--rp-blue);
  border: 1px solid var(--rp-blue); border-radius: 10px; font-weight: 750;
  text-decoration: none; box-shadow: 0 8px 18px rgba(23, 69, 143, .16);
}
.entry-content .wp-block-button__link:hover, .entry-content .wp-block-button__link:focus-visible,
.entry-content .button:hover, .entry-content .button:focus-visible { color: var(--rp-white); background: var(--rp-blue-dark); }
.entry-content input:not([type="checkbox"]):not([type="radio"]), .entry-content select, .entry-content textarea {
  width: 100%; max-width: 100%; padding: 11px 13px; color: var(--rp-ink); background: var(--rp-white);
  border: 1px solid var(--rp-border); border-radius: 9px;
}

.site-header {
  position: relative;
  z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid rgba(23, 69, 143, .10);
  box-shadow: 0 5px 22px rgba(15, 23, 42, .06);
}
.site-header__inner {
  width: min(calc(100% - 40px), var(--rp-content));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-branding { flex: 0 0 auto; display: flex; align-items: center; min-width: 220px; }
.site-branding .custom-logo-link { display: inline-flex; align-items: center; }
.site-branding .custom-logo { display: block; width: auto; max-width: min(275px, 42vw); max-height: 70px; }
.site-branding__fallback { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; color: var(--rp-blue); }
.site-branding__mark { width: 40px; height: 40px; display: grid; place-items: center; color: var(--rp-gold); border: 3px solid var(--rp-gold); border-radius: 50%; font-weight: 800; }
.site-branding__title { display: block; font-size: 1.05rem; font-weight: 800; line-height: 1.1; letter-spacing: .01em; }
.site-branding__tagline { display: block; margin-top: 3px; color: var(--rp-muted); font-size: .75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.site-navigation { margin-left: auto; }
.site-navigation ul { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.site-navigation li { margin: 0; }
.site-navigation a { display: block; padding: 10px 13px; color: var(--rp-ink); text-decoration: none; border-radius: 10px; font-size: .96rem; font-weight: 550; }
.site-navigation a:hover, .site-navigation .current-menu-item > a, .site-navigation a:focus-visible { color: var(--rp-blue); background: var(--rp-mist); }
.site-header__action { flex: 0 0 auto; }
.site-header__action a { display: inline-flex; align-items: center; justify-content: center; min-width: 122px; min-height: 48px; padding: 10px 17px; color: var(--rp-white); background: var(--rp-blue); border: 1px solid var(--rp-blue); border-radius: 10px; font-weight: 750; text-decoration: none; box-shadow: 0 8px 18px rgba(23, 69, 143, .18); }
.site-header__action a:hover, .site-header__action a:focus-visible { color: var(--rp-white); background: var(--rp-blue-dark); }
.site-menu-toggle { display: none; margin-left: auto; padding: 8px; color: var(--rp-blue); background: transparent; border: 1px solid var(--rp-border); border-radius: 9px; cursor: pointer; }
.site-menu-toggle__bars, .site-menu-toggle__bars::before, .site-menu-toggle__bars::after { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.site-menu-toggle__bars { position: relative; }
.site-menu-toggle__bars::before, .site-menu-toggle__bars::after { position: absolute; content: ""; left: 0; }
.site-menu-toggle__bars::before { top: -7px; }
.site-menu-toggle__bars::after { top: 7px; }

.site-footer { margin-top: auto; color: rgba(255,255,255,.84); background: var(--rp-blue); }
.site-footer__inner { width: min(calc(100% - 40px), var(--rp-content)); margin: 0 auto; padding: 44px 0 28px; }
.site-footer__grid { display: grid; grid-template-columns: 1.2fr 2fr; gap: 42px; align-items: start; }
.site-footer__brand { color: var(--rp-white); font-size: 1.05rem; font-weight: 800; }
.site-footer__brand p { max-width: 340px; margin: 8px 0 0; color: rgba(255,255,255,.72); font-size: .9rem; font-weight: 400; }
.site-footer__nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.site-footer__nav a { color: var(--rp-white); text-decoration: none; font-size: .92rem; }
.site-footer__nav a:hover, .site-footer__nav a:focus-visible { color: var(--rp-gold); }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 30px; padding-top: 19px; border-top: 1px solid rgba(255,255,255,.20); color: rgba(255,255,255,.66); font-size: .8rem; }
.site-footer__bottom p { margin: 0; }

/* Gentle defaults for non-RafflePro WordPress content. RafflePro's own component
   styles remain authoritative inside .rp-app/.rafflepro-app. */
.entry-title, .page-title { margin: 0 0 16px; color: var(--rp-blue); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 500; line-height: 1.12; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 { color: var(--rp-blue); font-family: Georgia, "Times New Roman", serif; line-height: 1.2; }
.entry-content h2 { margin-top: 2.1em; font-size: clamp(1.55rem, 2.3vw, 2.25rem); }
.entry-content h3 { margin-top: 1.7em; font-size: 1.35rem; }
.entry-content blockquote { margin: 28px 0; padding: 18px 24px; color: var(--rp-blue-dark); background: var(--rp-white); border-left: 4px solid var(--rp-gold); border-radius: 0 12px 12px 0; box-shadow: var(--rp-shadow); }
.entry-content table { width: 100%; border-collapse: collapse; background: var(--rp-white); border: 1px solid var(--rp-border); border-radius: 12px; overflow: hidden; }
.entry-content th, .entry-content td { padding: 12px 14px; border-bottom: 1px solid var(--rp-border); text-align: left; }
.entry-content th { color: var(--rp-blue); background: var(--rp-mist); }

/* Plugin-generated pages use their own responsive card system. These small
   guardrails keep them centered when Astra is removed. */
.rafflepro-generated-page .site-main { padding-top: 32px; }
.rafflepro-generated-page .entry-header { display: none; }
.rafflepro-generated-page .entry-content { width: 100%; }
.rafflepro-generated-page .entry-content > .rp-app,
.rafflepro-generated-page .entry-content > .rafflepro-app,
.rafflepro-generated-page .entry-content > [class*="rafflepro"] { width: 100%; max-width: var(--rp-content); margin-right: auto; margin-left: auto; }

@media (max-width: 960px) {
  .site-header__inner { min-height: 78px; gap: 16px; }
  .site-branding { min-width: 0; }
  .site-branding .custom-logo { max-width: 230px; max-height: 58px; }
  .site-navigation { display: none; position: absolute; top: 100%; right: 20px; left: 20px; padding: 12px; background: var(--rp-white); border: 1px solid var(--rp-border); border-radius: 14px; box-shadow: var(--rp-shadow); }
  .site-navigation.is-open { display: block; }
  .site-navigation ul { display: block; }
  .site-navigation a { padding: 12px 13px; }
  .site-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; }
  .site-header__action { margin-left: 0; }
  .site-header__action a { min-width: 104px; min-height: 42px; padding: 8px 12px; font-size: .86rem; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 22px; }
  .site-footer__nav ul { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .site-content, .site-header__inner, .site-footer__inner { width: min(calc(100% - 28px), var(--rp-content)); }
  .site-main { padding: 24px 0 48px; }
  .site-branding .custom-logo { max-width: 190px; max-height: 50px; }
  .site-header__action a { min-width: 0; }
  .site-footer__bottom { display: block; }
  .site-footer__bottom p + p { margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}


/* Responsive automatic YouTube embeds (URL or safe iframe input). */
.rafflepro-youtube-embed{position:relative;width:100%;aspect-ratio:16/9;margin:1.5rem 0;background:#050b16;border-radius:18px;overflow:hidden;box-shadow:0 10px 28px rgba(15,23,42,.14)}
.rafflepro-youtube-embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}


/* v1.0.2 — prevent WordPress responsive-embed wrappers from adding a second
   aspect-ratio spacer above our own responsive YouTube container. */
.entry-content .wp-block-embed-youtube,
.entry-content .wp-block-embed.is-provider-youtube{margin-top:0}
.entry-content .wp-block-embed-youtube .wp-block-embed__wrapper,
.entry-content .wp-block-embed.is-provider-youtube .wp-block-embed__wrapper{padding-top:0!important;height:auto!important}
.entry-content .wp-block-embed-youtube .wp-block-embed__wrapper::before,
.entry-content .wp-block-embed.is-provider-youtube .wp-block-embed__wrapper::before{content:none!important;display:none!important;padding-top:0!important}
.entry-content .wp-block-embed-youtube .rafflepro-youtube-embed,
.entry-content .wp-block-embed.is-provider-youtube .rafflepro-youtube-embed{margin-top:0}
.entry-header + .entry-content > .rafflepro-youtube-embed:first-child,
.entry-header + .entry-content > .wp-block-embed-youtube:first-child,
.entry-header + .entry-content > .wp-block-embed.is-provider-youtube:first-child{margin-top:0}
