/* ==========================================================================
   ECFF polish pass: layout and spacing only.
   No fonts, font sizes of headings, colors or wording change here. It evens out
   the gutters, the vertical rhythm between labels, headings, copy and blocks,
   and the alignment the Drupal theme left loose.
   ========================================================================== */
:root{
  --pg-gut: 22px;                               /* side margin, phone */
  --pg-sec: 64px;                               /* space above/below a section, phone */
  --pg-max: 1200px;                             /* widest content column */
}
@media (min-width:768px){ :root{ --pg-gut: 40px; --pg-sec: 88px; } }
@media (min-width:1200px){ :root{ --pg-gut: 48px; --pg-sec: 104px; } }

/* ---- 1. No sideways wobble: the Drupal row hung 12px past both edges ---- */
html,body{overflow-x:clip}
#main > .row,.row-offcanvas{margin-left:0;margin-right:0}
#main .main-content.col{padding-left:0;padding-right:0}

/* ---- 2. One set of gutters everywhere ---- */
#main .container,.featured-bottom .container,.site-footer .container{
  padding-left:var(--pg-gut);padding-right:var(--pg-gut);max-width:calc(var(--pg-max) + 2*var(--pg-gut));
}
@media (min-width:1400px){ #main .container,.featured-bottom .container,.site-footer .container{max-width:calc(1320px + 2*var(--pg-gut))} }

/* ---- 3. Banners (hero blocks) ---- */
.paragraph--type--hero > .hero-content{padding:var(--pg-sec) 0 calc(var(--pg-sec) + 24px)}
.paragraph--type--hero > .hero-content{align-self:stretch;display:flex;flex-direction:column;justify-content:center}
.paragraph--type--hero .hero-padding p{margin:0}
.paragraph--type--hero .photo-credit{right:var(--pg-gut);bottom:20px;line-height:1.3}
.paragraph--type--hero .photo-credit small{display:block;margin-bottom:2px}
/* later banners: a steady height, words centered in the frame */
.field--name-field-content > .field__item ~ .field__item .paragraph--type--hero{min-height:clamp(460px,64vh,700px)}
.field--name-field-content > .field__item ~ .field__item .paragraph--type--hero .hero-content{padding-top:var(--pg-sec);padding-bottom:var(--pg-sec)}
.paragraph--type--hero h2{margin:0 0 28px}
.paragraph--type--hero h2:last-child{margin-bottom:0}

/* the top banner: festival facts with even spacing */
.path-frontpage .field--name-field-content > .field__item:first-child .hero-padding .container > p:first-child{margin-bottom:18px}
.path-frontpage .field--name-field-content > .field__item:first-child .hero-padding .container > p:nth-child(2){margin-bottom:36px}
.paragraph--type--hero .hero-padding .d-flex{column-gap:clamp(28px,4vw,56px);row-gap:20px}
.paragraph--type--hero .hero-padding .ecff-col{padding:0}
.paragraph--type--hero .hero-padding .ecff-col > div:first-child{margin-bottom:6px}
.paragraph--type--hero .hero-padding .ecff-col > p{margin:6px 0 0}
.paragraph--type--hero .hero-padding .d-flex + .d-flex{margin-top:36px}
.paragraph--type--hero .hero-padding .d-flex + p{margin-top:36px}
.paragraph--type--hero .hero-padding .d-flex + p small{display:block;margin-bottom:6px}
@media (max-width:767px){
  .paragraph--type--hero .hero-padding .d-flex.flex-wrap{flex-direction:column;row-gap:22px}
  .paragraph--type--hero .photo-credit{left:var(--pg-gut);right:auto;text-align:left}
  .paragraph--type--hero > .hero-content{padding-bottom:calc(var(--pg-sec) + 56px)}
}

/* ---- 4. Red carpet link + gallery ---- */
.ecff-redcarpet-link{padding:56px var(--pg-gut) 0;margin-bottom:22px!important}
.ecff-redcarpet-link a{text-underline-offset:6px;text-decoration-thickness:1px}
.ecff-gallery{max-width:var(--pg-max);margin:0 auto var(--pg-sec);padding:0 var(--pg-gut);box-sizing:content-box}
.ecff-gal-thumbs{margin-top:14px}
@media (max-width:767px){ .ecff-redcarpet-link{padding-top:40px} .ecff-gallery{padding:0} .ecff-gal-thumbs{padding:0 var(--pg-gut)} }

/* ---- 5. White blocks: About ECFF and friends ---- */
.bg-ecff-white > .container.py-5,.bg-ecff-white > .container{padding-top:var(--pg-sec)!important;padding-bottom:var(--pg-sec)!important}
.bg-ecff-white .row{--bs-gutter-x:0;margin-left:0;margin-right:0}
.bg-ecff-white .row > *{padding-left:0;padding-right:0}
.bg-ecff-white .row:first-child > .col-md-12:first-child small{display:block;margin-bottom:12px}
.bg-ecff-white .row:first-child .justify-content-between{align-items:flex-end;gap:24px}
.bg-ecff-white .row:first-child h2{margin:0}
.bg-ecff-white .row:first-child small.text-end{display:block;padding-bottom:10px}
@media (min-width:768px){ .bg-ecff-white .row:first-child small.text-end{white-space:nowrap} }
@media (max-width:767px){ .bg-ecff-white .row:first-child .justify-content-between{flex-direction:column;align-items:flex-start;gap:14px} .bg-ecff-white .row:first-child small.text-end{text-align:left!important;padding:0} }
.bg-ecff-white .row:first-child hr{margin:32px 0 48px;opacity:.18}
.bg-ecff-white .row + .row{display:grid;grid-template-columns:minmax(0,1fr);gap:28px}
.bg-ecff-white .row + .row > [class*=col-]{width:auto;max-width:100%;min-width:0}
@media (min-width:768px){
  .bg-ecff-white .row + .row{grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:clamp(40px,5vw,72px);align-items:start}
  .bg-ecff-white .row + .row > [class*=col-]{width:auto;max-width:none;flex:none}
}
.bg-ecff-white .row + .row img{display:block;width:100%;height:auto}
@media (min-width:768px){ .bg-ecff-white .row + .row img{aspect-ratio:4/5;object-fit:cover} }
.bg-ecff-white .row + .row .col-md-6{max-width:620px}
.bg-ecff-white .col-md-6 > p:first-child{margin:0 0 14px}
.bg-ecff-white .col-md-6 h3{margin:0 0 16px}
.bg-ecff-white .col-md-6 p{margin:0 0 24px}
.bg-ecff-white .col-md-6 hr{margin:32px 0;opacity:.18}
.bg-ecff-white .col-md-6 .ecff-callout{margin:4px 0 28px}
.bg-ecff-white .col-md-6 hr + .d-flex{display:flex!important;flex-wrap:wrap;column-gap:clamp(28px,3.4vw,44px);row-gap:22px}
.bg-ecff-white .col-md-6 hr + .d-flex > div{margin:0;padding:0}
.bg-ecff-white .col-md-6 hr + .d-flex p{margin:4px 0 0;white-space:nowrap}
@media (max-width:575px){ .bg-ecff-white .col-md-6 hr + .d-flex{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px} }

/* wine sponsor strip */
.wine-sponsor-logo img{max-width:180px;height:auto;margin:0 auto;display:block}
.field__item > .row[style*="f7f5f0"]{margin:0}
.field__item > .row[style*="f7f5f0"] > .col-md-12{padding:48px var(--pg-gut)!important}
.field__item > .row[style*="f7f5f0"] p{margin:0 0 18px}

/* ---- 6. Friends of the Festival: a tidy, centered logo wall ---- */
.featured-bottom .view-ecff-sponsors{margin-top:0!important;margin-bottom:0!important;padding-top:var(--pg-sec);padding-bottom:var(--pg-sec)}
.featured-bottom .view-header small{display:block;margin-bottom:12px}
.featured-bottom .view-header h2{margin:0 0 clamp(36px,5vw,56px)!important}
.featured-bottom .row,.featured-bottom .view-content.row{margin:0}
.featured-bottom > aside.container-fluid{padding-left:0;padding-right:0}
.featured-bottom .item-list{padding:0;width:100%}
#ecff-sponsor-list{display:flex!important;flex-wrap:wrap;justify-content:center;align-items:center;
  gap:clamp(28px,3.5vw,44px) clamp(24px,3.2vw,40px);margin:0;padding:0;list-style:none}
#ecff-sponsor-list > li{margin:0!important;flex:0 0 108px;height:72px;display:flex;align-items:center;justify-content:center}
#ecff-sponsor-list img{width:auto!important;height:auto!important;max-width:108px!important;max-height:60px!important;object-fit:contain}
@media (max-width:575px){
  #ecff-sponsor-list{gap:30px 18px}
  #ecff-sponsor-list > li{flex:0 0 calc((100% - 36px)/3);height:60px}
  #ecff-sponsor-list img{max-width:100%!important;max-height:52px!important}
}
.featured-bottom .view-ecff-sponsors .view-header{padding:0}

/* ---- 7. Footer: even columns, steady rhythm ---- */
.site-footer > .container-fluid{padding-left:0;padding-right:0}
.site-footer .row.py-5{margin:0;padding-top:56px!important;padding-bottom:48px!important;row-gap:36px}
.site-footer .row.py-5 > [class*=col-]{padding-left:0;padding-right:16px}
.site-footer .col-md-3 > p{margin:0 0 10px}
.site-footer .col-md-3 .number{margin-bottom:2px}
.site-footer .col-md-3 .font-serif + .font-serif{margin-top:4px}
.site-footer .navbar-brand{padding:0;margin:0}
.site-footer hr{margin:0;opacity:.15}
.site-footer .row.py-5 + .row,.site-footer hr + .row.py-5{padding-top:28px!important;padding-bottom:36px!important}
@media (max-width:767px){
  .site-footer .row.py-5{row-gap:28px;padding-top:48px!important}
  .site-footer .row.py-5 > [class*=col-]{padding-bottom:0!important;margin-bottom:0!important}
}
.site-footer hr + .row.py-5{padding-left:0;padding-right:0}
.site-footer hr + .row.py-5 > small{padding-left:0}
.site-footer{padding-top:0}
.site-footer__bottom{margin-top:0}
.site-footer .col-md-3 > p{line-height:1.2}
.site-footer .col-md-3 > div{line-height:1.3}
.site-footer .col-md-3 .number{line-height:1.15}
.site-footer .col-md-3 small{display:block;margin:0}
.site-footer .col-md-3 > p:first-child{margin-top:0;padding-top:0}
