/*
Theme Name: CCFRS
Description: Custom theme for the Cherryville Community Food and Resource Society.
Version: 1.0.0
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: ccfrs
*/

html{scroll-behavior:smooth}
body{overflow-x:clip}
.wp-site-blocks>*{margin-block:0}
.entry-content>.alignfull,.wp-block-post-content>.alignfull{margin-block:0}
a:focus-visible,.wp-element-button:focus-visible{outline:3px solid #1E3A33;outline-offset:2px;box-shadow:0 0 0 2px #fff}

/* Top notice */
.ccfrs-notice{background:#D9A441;color:#1E3A33;padding:12px clamp(16px,4vw,40px);text-align:center;font-weight:700}
.ccfrs-notice p{margin:0}
.ccfrs-notice a{color:#1E3A33;margin-left:12px}

/* Header */
.ccfrs-header{background:#fff;padding:18px clamp(16px,4vw,40px) 0}
.ccfrs-header-row,nav.ccfrs-nav{max-width:1240px;margin-inline:auto}
.ccfrs-brand{gap:16px}
.ccfrs-brand .wp-block-image{margin:0;flex:none}
.ccfrs-brand img{display:block;width:121px;height:68px}
.ccfrs-brand-name{margin:0;font-weight:700;font-size:22px;line-height:1.15;color:#2E5D50;max-width:330px}
.ccfrs-brand-name a{color:inherit;text-decoration:none}
.ccfrs-brand-tag{margin:3px 0 0;font-size:16px}
.ccfrs-hours{margin:0;font-size:16px}
nav.ccfrs-nav{border-top:1px solid #DAD5C7;margin-top:14px;padding:12px 0;font-weight:700}
nav.ccfrs-nav ul{border:0}
.ccfrs-nav .wp-block-navigation-item__content{color:#2E5D50;text-decoration:none;padding:6px 0}
.ccfrs-nav .wp-block-navigation-item__content:hover{text-decoration:underline;text-decoration-color:#D9A441;text-decoration-thickness:3px;text-underline-offset:6px}

/* Sections */
.ccfrs-sec{padding:64px clamp(16px,4vw,40px)}
.ccfrs-sec>*{margin-block-start:0}
.ccfrs-sec>*+*{margin-block-start:20px}
.ccfrs-green{background:#2E5D50;color:#fff}
.ccfrs-blue{background:#4A7C8C;color:#fff}
.ccfrs-white{background:#fff}
.ccfrs-green h2,.ccfrs-blue h2{color:#fff}
.ccfrs-green>p a,.ccfrs-blue>p a{color:#fff}
.ccfrs-intro{font-size:22px;max-width:720px;margin-left:max(0px,calc((100% - 1240px)/2)) !important;margin-right:auto !important}
.wp-block-column .ccfrs-intro{margin-left:0 !important}
.ccfrs-lead{font-size:20px;max-width:820px;margin-bottom:32px;margin-left:max(0px,calc((100% - 1240px)/2)) !important;margin-right:auto !important}
.wp-block-column .ccfrs-lead{margin-left:0 !important}

/* Pale mountains under page titles */
.ccfrs-hero{padding-top:48px;padding-bottom:170px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 300' preserveAspectRatio='none'%3E%3Cpath d='M0 170 L140 110 L260 150 L420 70 L560 130 L720 60 L880 125 L1040 75 L1200 135 L1320 95 L1440 140 L1440 300 L0 300 Z' fill='%23DCE7E6'/%3E%3Cpath d='M0 215 L180 150 L340 205 L520 135 L700 200 L860 145 L1040 205 L1230 150 L1440 200 L1440 300 L0 300 Z' fill='%23BFD4CD'/%3E%3Cpath d='M0 255 L220 195 L430 250 L640 190 L860 250 L1080 200 L1280 250 L1440 215 L1440 300 L0 300 Z' fill='%239DBDB2'/%3E%3Cpath d='M0 290 L260 240 L520 285 L800 235 L1100 285 L1440 245 L1440 300 L0 300 Z' fill='%23F7F5EF'/%3E%3C/svg%3E") left bottom/100% 190px no-repeat}
.ccfrs-hero-top{background-position:left 40px top 40px;padding-bottom:64px}
.ccfrs-hero .wp-block-columns{align-items:center;margin-bottom:0;gap:28px 48px}

/* Full mountains above the footer */
.ccfrs-ridge{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 300' preserveAspectRatio='none'%3E%3Cpath d='M0 170 L140 110 L260 150 L420 70 L560 130 L720 60 L880 125 L1040 75 L1200 135 L1320 95 L1440 140 L1440 300 L0 300 Z' fill='%23C5D9D6'/%3E%3Cpath d='M0 215 L180 150 L340 205 L520 135 L700 200 L860 145 L1040 205 L1230 150 L1440 200 L1440 300 L0 300 Z' fill='%238FB3A8'/%3E%3Cpath d='M0 255 L220 195 L430 250 L640 190 L860 250 L1080 200 L1280 250 L1440 215 L1440 300 L0 300 Z' fill='%234A7C8C'/%3E%3Cpath d='M0 290 L260 240 L520 285 L800 235 L1100 285 L1440 245 L1440 300 L0 300 Z' fill='%232E5D50'/%3E%3C/svg%3E") left bottom/100% 100% no-repeat;margin:0 0 -1px}
body:has(.wp-block-post-content>.ccfrs-blue:last-child) .ccfrs-ridge{background-color:#4A7C8C}
body:has(.wp-block-post-content>.ccfrs-white:last-child) .ccfrs-ridge{background-color:#fff}

/* Boxes with the gold strip */
.ccfrs-card{background:#fff;color:#1E3A33;border-top:6px solid #D9A441;border-radius:12px;padding:28px;display:flex;flex-direction:column;align-items:flex-start;gap:10px;box-sizing:border-box}
.ccfrs-card>*{margin:0}
.ccfrs-card h2,.ccfrs-card h3{color:#2E5D50;font-size:24px;line-height:1.2}
.ccfrs-card a{color:#2E5D50}
.ccfrs-card .wp-element-button{color:#fff}
.ccfrs-card .wp-block-buttons{margin-top:auto}
.ccfrs-card img{max-width:100%;height:auto}
.ccfrs-grid{gap:20px}
.ccfrs-grid:has(>:nth-child(2):last-child){grid-template-columns:repeat(auto-fit,minmax(min(26rem,100%),1fr)) !important}
.ccfrs-tile{position:relative}
.ccfrs-tile:hover{background:#EAF1EE}
.ccfrs-tile h3{font-size:26px}
.ccfrs-tile h3 a{text-decoration:none}
.ccfrs-tile h3 a::after{content:"";position:absolute;inset:0}
.ccfrs-tile svg{display:block}
.ccfrs-tag{font-weight:700;font-size:16px;background:#F7F5EF;border-radius:6px;padding:4px 10px}
.ccfrs-stat{font-size:40px;font-weight:700;line-height:1.1;color:#2E5D50}
.ccfrs-bigstat{font-size:clamp(64px,8vw,104px);font-weight:700;line-height:1}
.ccfrs-quote{font-size:clamp(34px,4.4vw,56px);font-weight:700;line-height:1.1;color:#2E5D50}

.ccfrs-todo{box-sizing:border-box;border:2px dashed #4A7C8C;border-radius:8px;padding:10px 14px;font-size:16px}
.ccfrs-crisis{font-size:20px;text-align:center;padding-block:24px}
.ccfrs-crisis p,.ccfrs-crisis .ccfrs-lead{margin:0 auto !important;max-width:none}

/* News */
.ccfrs-news .wp-block-post-template{gap:20px}
.ccfrs-news .wp-block-post-template>li{display:flex}
.ccfrs-news .ccfrs-card{width:100%}
.ccfrs-news .wp-block-post-title{font-size:23px;line-height:1.25}
.ccfrs-news .wp-block-post-date,.ccfrs-news .wp-block-post-terms{font-size:16px}
.ccfrs-news .wp-block-post-excerpt__excerpt{margin:0}
.ccfrs-news .wp-block-query-pagination{margin-top:32px;font-weight:700}

/* Articles */
.ccfrs-article{padding:48px clamp(16px,4vw,40px) 64px}
.ccfrs-article img{max-width:100%;height:auto}

/* Footer */
.ccfrs-footer{background:#2E5D50;color:#fff;padding:56px clamp(16px,4vw,40px)}
.ccfrs-footer a{color:#fff}
.ccfrs-footer h2{color:#fff;font-size:20px;margin:0 0 10px}
.ccfrs-footer p{margin:0}
.ccfrs-footer-inner{max-width:1240px;margin-inline:auto;gap:32px 48px;align-items:center}
.ccfrs-footer-logo{flex:none;margin:0;width:180px;height:180px;background:#F7F5EF;border-radius:12px;display:flex;align-items:center;justify-content:center}
.ccfrs-footer-logo img{width:170px;height:170px;display:block}
.ccfrs-footer-cols{flex:1 1 560px;gap:32px}

@media (max-width:781px){
  .ccfrs-hero{padding-bottom:130px;background-size:100% 130px}
  .ccfrs-ridge{height:130px !important}
  .ccfrs-footer-cols{flex-basis:100%}
}

.ccfrs-tight-top{padding-top:0}

.wp-block-navigation__responsive-container.is-menu-open{padding:24px !important}
