/*
Theme Name: Correre in Puglia 2026
Theme URI: https://www.correreinpuglia.it/
Author: Correre in Puglia
Description: Correre in Puglia 5.4.1 — ripristino robusto della hero home con sfondo blu, overlay e fotografia indipendenti dalla cache CSS.
Version: 5.4.1
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: correreinpuglia
*/

:root{
  --cip-navy:#082846;
  --cip-navy-2:#041a30;
  --cip-lime:#b7f21f;
  --cip-lime-2:#d3ff5f;
  --cip-blue:#1d69d5;
  --cip-teal:#0ea5a8;
  --cip-text:#10233a;
  --cip-muted:#68788c;
  --cip-line:#dce5ee;
  --cip-bg:#f5f8fb;
  --cip-white:#fff;
  --cip-radius:18px;
  --cip-shadow:0 12px 35px rgba(4,26,48,.08);
  --cip-container:1240px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:#fff;color:var(--cip-text);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;line-height:1.55}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}
button,input,select,textarea{font:inherit}
.cip-container{width:min(calc(100% - 40px),var(--cip-container));margin-inline:auto}
.cip-section{padding:34px 0}
.cip-section.alt{background:var(--cip-bg)}
.cip-section-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:20px}
.cip-section-title{display:flex;align-items:center;gap:10px;margin:0;font-size:clamp(1.35rem,2vw,2rem);line-height:1.15}
.cip-section-title .icon{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#eaf2fb}
.cip-link{color:var(--cip-blue);font-weight:800;font-size:.94rem}
.cip-link:hover{text-decoration:underline}
.cip-card{background:#fff;border:1px solid var(--cip-line);border-radius:var(--cip-radius);box-shadow:0 6px 20px rgba(4,26,48,.04);overflow:hidden}
.cip-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:10px;padding:12px 18px;font-weight:900;cursor:pointer;transition:.2s ease;white-space:nowrap}
.cip-btn:hover{transform:translateY(-1px)}
.cip-btn-primary{background:var(--cip-lime);color:#08203b}
.cip-btn-primary:hover{background:var(--cip-lime-2)}
.cip-btn-dark{background:var(--cip-navy);color:#fff}
.cip-btn-outline{border-color:#9fb0c2;background:#fff;color:var(--cip-navy)}
.cip-pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;background:#edf2f7;color:#35506a;padding:5px 9px;font-size:.78rem;font-weight:800}
.cip-pill.open{background:#dfff81;color:#17330b}
.cip-pill.soon{background:#dceeff;color:#0c4b79}

/* Header */
.site-header{position:sticky;top:0;z-index:1000;background:rgba(4,26,48,.97);color:#fff;border-bottom:1px solid rgba(255,255,255,.08);backdrop-filter:blur(12px)}
.cip-header-row{min-height:92px;display:flex;align-items:center;gap:28px}
.cip-brand{display:flex;align-items:center;gap:12px;width:clamp(220px,19vw,310px);min-width:0;flex:0 0 auto}
.custom-logo-link img{max-height:46px;width:auto}
.cip-theme-logo,.cip-preserve-logo{display:block;width:100%;height:auto;max-height:76px;object-fit:contain;object-position:left center;background:transparent!important;border:0!important;box-shadow:none!important}
.cip-brand-mark{width:42px;height:42px;border-radius:14px;background:var(--cip-lime);display:grid;place-items:center;color:var(--cip-navy);font-weight:1000;font-size:1.4rem}
.cip-brand-text{line-height:1}
.cip-brand-title{font-weight:1000;letter-spacing:-.04em;font-size:1.18rem;text-transform:uppercase}
.cip-brand-title span{color:var(--cip-lime)}
.cip-brand-tagline{font-size:.72rem;opacity:.82;margin-top:6px}
.primary-nav{margin-left:auto}
.primary-nav ul{display:flex;align-items:center;gap:22px;list-style:none;margin:0;padding:0}
.primary-nav a{font-size:.9rem;font-weight:800;opacity:.94}
.primary-nav a:hover{color:var(--cip-lime)}
.cip-header-actions{display:flex;align-items:center;gap:10px}
.cip-icon-btn{width:42px;height:42px;border:0;border-radius:12px;background:rgba(255,255,255,.08);color:#fff;display:grid;place-items:center;cursor:pointer}
.cip-menu-toggle{display:none}

/* Hero */
.cip-hero{position:relative;isolation:isolate;background:linear-gradient(90deg,rgba(2,22,39,.95) 0%,rgba(4,37,65,.78) 45%,rgba(4,37,65,.32) 100%),linear-gradient(135deg,#0a3559,#0b567c);color:#fff;overflow:hidden}
.cip-hero.has-image{background-position:center;background-size:cover}
.cip-hero::after{content:"";position:absolute;inset:auto 0 0;height:110px;background:linear-gradient(transparent,rgba(3,24,43,.16));z-index:-1}
.cip-hero-inner{min-height:470px;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(330px,.9fr);gap:54px;align-items:center;padding:62px 0}
.cip-kicker{display:inline-flex;align-items:center;gap:8px;font-weight:900;color:var(--cip-lime);text-transform:uppercase;letter-spacing:.09em;font-size:.76rem}
.cip-hero h1{font-size:clamp(3.15rem,6vw,5.8rem);line-height:.91;letter-spacing:-.065em;margin:14px 0 18px;max-width:700px}
.cip-hero h1 span{color:var(--cip-lime)}
.cip-hero p{max-width:620px;font-size:clamp(1rem,1.8vw,1.22rem);color:rgba(255,255,255,.92);margin:0 0 28px}
.cip-hero-actions{display:flex;flex-wrap:wrap;gap:12px}
.cip-hero .cip-btn-outline{background:transparent;border-color:rgba(255,255,255,.75);color:#fff}
.cip-next-race{padding:20px;background:rgba(255,255,255,.97);color:var(--cip-text);border-radius:20px;box-shadow:0 24px 65px rgba(0,0,0,.2)}
.cip-next-top{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:12px}
.cip-next-race h2{font-size:2rem;line-height:1.05;margin:8px 0 14px;letter-spacing:-.035em}
.cip-race-meta{display:flex;flex-wrap:wrap;gap:8px 14px;color:#4b6074;font-size:.93rem;margin-bottom:12px}
.cip-race-tags{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0 18px}
.cip-next-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.cip-next-actions .cip-btn{padding:10px 8px;font-size:.82rem}
.cip-empty-next{padding:12px 0;color:var(--cip-muted)}

/* Quick access */
.cip-quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;padding:20px 0}
.cip-quick{padding:20px;display:flex;align-items:center;gap:15px;min-height:108px;transition:.2s ease}
.cip-quick:hover{transform:translateY(-3px);box-shadow:var(--cip-shadow)}
.cip-quick-icon{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:#edf4fb;font-size:1.5rem}
.cip-quick strong{display:block;font-size:1.05rem}
.cip-quick small{color:var(--cip-muted)}

/* Race cards */
.cip-race-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.cip-race-card{position:relative;display:flex;flex-direction:column;min-height:100%}
.cip-race-image{aspect-ratio:16/9;background:linear-gradient(135deg,#dbe7f2,#f2f6fa);overflow:hidden}
.cip-race-image img{width:100%;height:100%;object-fit:cover;transition:.35s ease}
.cip-race-card:hover .cip-race-image img{transform:scale(1.04)}
.cip-race-date{position:absolute;top:14px;left:14px;background:#fff;color:var(--cip-navy);border-radius:12px;box-shadow:0 8px 25px rgba(0,0,0,.14);padding:8px 11px;text-align:center;line-height:1}
.cip-race-date small{font-size:.68rem;font-weight:900}
.cip-race-date b{display:block;font-size:1.6rem;margin:4px 0}
.cip-race-content{padding:18px;display:flex;flex-direction:column;flex:1}
.cip-race-content h3{font-size:1.22rem;margin:0 0 8px;letter-spacing:-.02em}
.cip-race-location{color:var(--cip-muted);font-size:.9rem;margin-bottom:12px}
.cip-race-actions{display:flex;gap:10px;margin-top:auto;padding-top:16px}
.cip-race-actions .cip-btn{flex:1;padding:10px 12px;font-size:.85rem}

/* Results */
.cip-results-grid{display:grid;grid-template-columns:2fr 1fr;gap:18px}
.cip-result-featured{padding:20px;display:grid;grid-template-columns:150px 1fr;gap:20px}
.cip-result-thumb{border-radius:14px;overflow:hidden;min-height:190px;background:#e8eef5}
.cip-result-thumb img{width:100%;height:100%;object-fit:cover}
.cip-result-main h3{font-size:1.5rem;margin:0 0 4px}
.cip-result-meta{font-size:.9rem;color:var(--cip-muted);margin-bottom:20px}
.cip-winners{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:18px}
.cip-winner{padding:16px;border-radius:14px;background:var(--cip-bg);text-align:center}
.cip-medal{font-size:1.5rem;display:block;margin-bottom:5px}
.cip-winner strong{display:block}
.cip-time{font-size:1.35rem;font-weight:1000;color:var(--cip-navy)}
.cip-result-buttons{display:flex;flex-wrap:wrap;gap:8px}
.cip-result-side{padding:20px;display:flex;flex-direction:column;gap:12px}
.cip-stat-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.cip-stat{padding:16px;border-radius:14px;background:var(--cip-bg);text-align:center}
.cip-stat b{font-size:1.45rem;display:block}

/* Stats shortcuts */
.cip-stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.cip-stat-card{padding:20px;min-height:120px;display:flex;align-items:center;gap:14px}
.cip-stat-card .ico{font-size:1.8rem}
.cip-stat-card strong{display:block}
.cip-stat-card small{color:var(--cip-muted)}

/* News */
.cip-news-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.cip-news-card .thumb{aspect-ratio:16/9;background:#eaf0f5;overflow:hidden}
.cip-news-card .thumb img{width:100%;height:100%;object-fit:cover}
.cip-news-body{padding:18px}
.cip-news-date{color:var(--cip-muted);font-size:.78rem;font-weight:800}
.cip-news-body h3{font-size:1.2rem;line-height:1.18;margin:7px 0 10px}
.cip-news-body p{color:#53677b;font-size:.93rem;margin:0 0 14px}

/* Gallery */
.cip-gallery-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.cip-gallery-card .thumb{aspect-ratio:4/3;background:#eaf0f5;overflow:hidden}
.cip-gallery-card img{width:100%;height:100%;object-fit:cover;transition:.35s ease}
.cip-gallery-card:hover img{transform:scale(1.04)}
.cip-gallery-body{padding:14px 16px}
.cip-gallery-body strong{display:block}
.cip-gallery-body small{color:var(--cip-muted)}

/* Timing promo */
.cip-timing{background:linear-gradient(110deg,#041a30,#09395e);color:#fff;padding:36px 0}
.cip-timing-grid{display:grid;grid-template-columns:.8fr 1.6fr auto;gap:30px;align-items:center}
.cip-timing-brand{font-size:1.6rem;font-weight:1000;font-style:italic;letter-spacing:-.03em}
.cip-timing-brand span{opacity:.75;font-weight:500}
.cip-timing h2{font-size:1.6rem;margin:0 0 6px}
.cip-timing p{opacity:.82;margin:0 0 13px}
.cip-checks{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:.86rem}
.cip-checks span::before{content:"✓";display:inline-grid;place-items:center;width:17px;height:17px;margin-right:6px;border-radius:50%;background:var(--cip-lime);color:var(--cip-navy);font-weight:1000}

/* Content templates */
.cip-page-header{background:linear-gradient(135deg,#06213c,#0b436b);color:#fff;padding:54px 0}
.cip-page-header h1{font-size:clamp(2.3rem,5vw,4rem);letter-spacing:-.045em;margin:0}
.cip-page-header p{max-width:760px;margin:10px 0 0;color:rgba(255,255,255,.78)}
.cip-content-wrap{padding:42px 0 70px}
.cip-content-grid{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:32px}
.entry-content{font-size:1.05rem}
.entry-content > *{max-width:100%}
.entry-content a{color:var(--cip-blue);text-decoration:underline}
.entry-content table{width:100%;border-collapse:collapse}
.entry-content th,.entry-content td{border:1px solid var(--cip-line);padding:10px}
.entry-content iframe{max-width:100%}
.cip-sidebar{display:flex;flex-direction:column;gap:18px}
.cip-widget{padding:20px}
.cip-widget h3{margin-top:0}
.cip-post-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.cip-pagination{margin-top:30px;display:flex;gap:8px;flex-wrap:wrap}
.cip-pagination .page-numbers{border:1px solid var(--cip-line);padding:8px 12px;border-radius:9px}
.cip-pagination .current{background:var(--cip-navy);color:#fff}

/* Single race */
.cip-race-hero{background:linear-gradient(135deg,#041a30,#0d4d78);color:#fff;padding:54px 0}
.cip-race-hero-grid{display:grid;grid-template-columns:1.3fr .7fr;gap:28px;align-items:center}
.cip-race-hero h1{font-size:clamp(2.5rem,5vw,4.6rem);line-height:.96;letter-spacing:-.055em;margin:8px 0 18px}
.cip-race-facts{display:flex;flex-wrap:wrap;gap:10px 18px;color:rgba(255,255,255,.86)}
.cip-race-hero-img{aspect-ratio:4/3;border-radius:20px;overflow:hidden;background:#163f60;box-shadow:0 18px 55px rgba(0,0,0,.22)}
.cip-race-hero-img img{width:100%;height:100%;object-fit:cover}
.cip-race-tabs{position:sticky;top:78px;z-index:20;background:#fff;border-bottom:1px solid var(--cip-line)}
.cip-race-tabs .cip-container{display:flex;overflow-x:auto;gap:4px}
.cip-race-tabs a{padding:15px 14px;font-weight:900;font-size:.9rem;white-space:nowrap}
.cip-race-tabs a:hover{color:var(--cip-blue)}
.cip-race-sections{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:26px;padding:34px 0 70px}
.cip-race-info-card{padding:20px;position:sticky;top:144px}
.cip-race-info-list{display:grid;gap:12px}
.cip-race-info-list div{padding-bottom:12px;border-bottom:1px solid var(--cip-line)}
.cip-race-info-list small{display:block;color:var(--cip-muted);font-weight:800}
.cip-race-link-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}
.cip-race-link-grid .cip-btn{padding:10px;font-size:.82rem}

/* Footer */
.site-footer{background:#03182b;color:#fff;padding:42px 0 105px}
.cip-footer-grid{display:grid;grid-template-columns:1.45fr 1fr 1fr;gap:42px}
.cip-footer-brand p{color:rgba(255,255,255,.68);max-width:360px}
.cip-footer-col h3{font-size:.9rem;text-transform:uppercase;letter-spacing:.08em;color:#b9c7d5}
.cip-footer-col ul{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.cip-footer-col a{color:rgba(255,255,255,.78)}
.cip-footer-col a:hover{color:var(--cip-lime)}
.cip-footer-bottom{margin-top:34px;padding-top:22px;border-top:1px solid rgba(255,255,255,.1);display:flex;justify-content:space-between;gap:20px;color:rgba(255,255,255,.55);font-size:.82rem}
.cip-mobile-nav{display:none}

/* Forms */
.search-form{display:flex;gap:8px}
.search-field{min-width:0;flex:1;border:1px solid var(--cip-line);border-radius:10px;padding:11px 12px}
.search-submit{border:0;border-radius:10px;background:var(--cip-navy);color:#fff;padding:10px 14px;font-weight:900}

@media (max-width:1080px){
  .primary-nav{display:none;position:absolute;left:0;right:0;top:92px;background:#041a30;padding:18px 20px;border-top:1px solid rgba(255,255,255,.1)}
  .primary-nav.is-open{display:block}
  .primary-nav ul{align-items:stretch;flex-direction:column;gap:4px}
  .primary-nav a{display:block;padding:11px 6px}
  .cip-menu-toggle{display:grid}
  .cip-hero-inner{grid-template-columns:1fr;gap:30px}
  .cip-next-race{max-width:720px}
  .cip-timing-grid{grid-template-columns:1fr;align-items:start}
}
@media (max-width:900px){
  .cip-quick-grid,.cip-stats-grid{grid-template-columns:repeat(2,1fr)}
  .cip-race-grid,.cip-news-grid{grid-template-columns:1fr 1fr}
  .cip-results-grid{grid-template-columns:1fr}
  .cip-gallery-grid{grid-template-columns:repeat(2,1fr)}
  .cip-footer-grid{grid-template-columns:1fr 1fr}
  .cip-content-grid,.cip-race-sections,.cip-race-hero-grid{grid-template-columns:1fr}
  .cip-race-info-card{position:static}
  .cip-post-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:640px){
  body{padding-bottom:68px}
  .cip-container{width:min(calc(100% - 28px),var(--cip-container))}
  .cip-header-row{min-height:76px;gap:12px}
  .cip-brand-tagline{display:none}
  .cip-brand-title{font-size:1rem}
  .cip-brand-mark{width:36px;height:36px;border-radius:11px}
  .cip-header-actions .cip-calendar-cta{display:none}
  .primary-nav{top:76px}
  .cip-hero-inner{min-height:auto;padding:42px 0}
  .cip-hero h1{font-size:3.15rem}
  .cip-hero-actions{display:grid;grid-template-columns:1fr 1fr}
  .cip-next-actions{grid-template-columns:1fr 1fr}
  .cip-section{padding:26px 0}
  .cip-quick-grid,.cip-race-grid,.cip-news-grid,.cip-gallery-grid,.cip-stats-grid,.cip-post-grid{grid-template-columns:1fr}
  .cip-quick{min-height:auto}
  .cip-result-featured{grid-template-columns:1fr}
  .cip-result-thumb{min-height:220px}
  .cip-section-head{align-items:start}
  .cip-section-head .cip-link{display:none}
  .cip-footer-grid{grid-template-columns:1fr}
  .cip-footer-bottom{flex-direction:column}
  .site-footer{padding-bottom:36px}
  .cip-mobile-nav{position:fixed;display:grid;grid-template-columns:repeat(5,1fr);left:0;right:0;bottom:0;z-index:1200;background:#fff;border-top:1px solid var(--cip-line);box-shadow:0 -8px 25px rgba(4,26,48,.09)}
  .cip-mobile-nav a{display:grid;place-items:center;padding:9px 2px 8px;color:#38506a;font-size:.66rem;font-weight:800}
  .cip-mobile-nav a span{font-size:1.12rem;line-height:1;margin-bottom:3px}
  .cip-mobile-nav a:hover{color:var(--cip-blue)}
  .cip-race-tabs{top:76px}
}

/* v1.1 legacy/plugin compatibility */
.cip-pill.legacy{background:#eef2f7;color:#526174;border:1px solid #dbe2ea}
.wpem-main,.wpem-event-listings,.wpem-single-event-wrapper,.qcopd-list-wrapper,.qc-grid-item{max-width:100%}
.wpem-main img,.wpem-event-listings img,.qcopd-list-wrapper img{max-width:100%;height:auto}
.entry-content .wpem-main a,.entry-content .wpem-event-listings a{text-decoration:none}

/* v2.2 historical archive */
.cip-race-date-badge.is-year strong{font-size:1.05rem;line-height:1.1}.cip-race-date-badge.is-year small,.cip-race-date-badge.is-year span{font-size:.58rem;letter-spacing:.05em}

/* === Correre in Puglia 3.8 — pagina Classifiche e Gallery === */
.cip38-results-page{background:#f4f8fb}
.cip38-results-hero{position:relative;overflow:hidden;background:linear-gradient(90deg,#082846,#0a456e);color:#fff;min-height:300px;background-size:cover;background-position:center}
.cip38-results-hero.has-photo{background-image:linear-gradient(90deg,rgba(3,22,39,.94),rgba(5,41,70,.62)),var(--cip38-hero)}
.cip38-results-overlay{position:absolute;inset:0;background:linear-gradient(180deg,rgba(3,19,34,.08),rgba(3,19,34,.22))}
.cip38-results-hero-inner{position:relative;z-index:1;padding:28px 0 42px}
.cip38-results-hero .cip-race-breadcrumb{color:rgba(255,255,255,.82);margin-bottom:34px}.cip38-results-hero .cip-race-breadcrumb a{color:#fff}
.cip38-hero-copy{display:flex;align-items:center;gap:24px}.cip38-hero-copy h1{font-size:clamp(2.8rem,5.4vw,5.4rem);line-height:.93;letter-spacing:-.055em;margin:9px 0 10px}.cip38-hero-copy p{font-size:1.08rem;margin:0;color:rgba(255,255,255,.9)}
.cip38-date-badge{width:104px;min-width:104px;min-height:104px;border-radius:16px;background:#fff;color:var(--cip-navy);display:flex;align-items:center;justify-content:center;gap:8px;padding:12px;box-shadow:0 12px 32px rgba(0,0,0,.18)}.cip38-date-badge b{font-size:2.1rem;line-height:1}.cip38-date-badge small{font-size:.68rem;font-weight:950;line-height:1.15;letter-spacing:.03em}
.cip38-results-tabs{background:#fff;border-bottom:1px solid var(--cip-line);box-shadow:0 8px 25px rgba(4,26,48,.05);position:sticky;top:78px;z-index:90}.cip38-results-tabs .cip-container{display:flex;overflow-x:auto}.cip38-results-tabs a{min-width:max-content;padding:17px 22px;font-size:.82rem;font-weight:900;color:#526980;border-right:1px solid #edf1f5}.cip38-results-tabs a.is-active,.cip38-results-tabs a:hover{background:#1670d2;color:#fff}
.cip38-results-main{padding:28px 0 74px}.cip38-summary-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,.8fr);gap:18px;margin-bottom:18px}.cip38-winners-card,.cip38-info-card,.cip38-classifications,.cip38-gallery-section,.cip38-top-card,.cip38-original{padding:20px 22px}.cip38-card-title{display:flex;align-items:center;gap:9px}.cip38-card-title>span{color:#155fae;font-size:1.15rem}.cip38-card-title h2{font-size:1rem;text-transform:uppercase;letter-spacing:.01em;margin:0;color:#0c4d8c}
.cip38-winners-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px}.cip38-winner{display:grid;grid-template-columns:64px 1fr;align-items:center;gap:14px;padding:17px;border:1px solid #e2e9f0;border-radius:14px;background:#fff}.cip38-avatar{width:58px;height:58px;border-radius:18px;background:#e7f3ff;color:#1670d2;display:grid;place-items:center;font-size:1.6rem;font-weight:900}.cip38-winner.female .cip38-avatar{background:#ffe4ef;color:#d81b60}.cip38-winner small,.cip38-winner strong,.cip38-winner em,.cip38-winner b{display:block}.cip38-winner small{font-size:.68rem;font-weight:950;color:#806b00}.cip38-winner strong{font-size:1.05rem;color:#0d4d8e;margin-top:2px}.cip38-winner em{font-style:italic;color:#657688;font-size:.82rem;margin:2px 0}.cip38-winner b{font-size:.95rem;color:#243a51}
.cip38-info-card dl{display:grid;gap:10px;margin:18px 0}.cip38-info-card dl>div{display:grid;grid-template-columns:125px 1fr;gap:10px;padding-bottom:9px;border-bottom:1px solid #edf1f5}.cip38-info-card dt{font-size:.78rem;font-weight:850;color:#36516b}.cip38-info-card dd{margin:0;font-size:.82rem;font-weight:850;color:#172f47}.cip38-registration-state{padding:13px 15px;border-radius:12px;background:#e8fbdc;color:#205b25}.cip38-registration-state.is-closed{background:#e5f6e9;color:#187236}.cip38-registration-state strong,.cip38-registration-state small{display:block}.cip38-registration-state small{margin-top:2px;font-size:.72rem}
.cip38-classifications{margin-bottom:18px}.cip38-classification-links{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:16px}.cip38-classification-links a{display:flex;align-items:center;gap:10px;min-height:62px;border:1px solid #cbd9e6;border-radius:11px;padding:11px 13px;background:#fff;color:#155da9}.cip38-classification-links a.primary{background:#1670d2;color:#fff;border-color:#1670d2}.cip38-classification-links a span{font-size:1.1rem}.cip38-classification-links strong{font-size:.78rem;line-height:1.15}
.cip38-top-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}.cip38-top-card h2{font-size:.84rem;text-transform:uppercase;color:#0c4d8c;margin:0 0 13px}.cip38-top-card.female h2{color:#b21a4d}.cip38-top-table{border:1px solid #e1e8ef;border-radius:10px;overflow:hidden}.cip38-top-table>div{display:grid;grid-template-columns:48px 1.2fr 1.3fr 90px;gap:8px;align-items:center;padding:9px 10px;border-bottom:1px solid #e8eef3;font-size:.76rem}.cip38-top-table>div:last-child{border-bottom:0}.cip38-top-table .head{background:#edf4fb;color:#274b6d;font-size:.68rem;font-weight:950}.cip38-top-table strong{font-size:.77rem}.cip38-top-table time{text-align:right;font-weight:900}
.cip38-section-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.cip38-section-head>span{font-size:.75rem;color:#71869a;font-weight:850}.cip38-gallery-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin-top:17px}.cip38-gallery-grid>a{display:block;border:1px solid #dce5ee;border-radius:13px;overflow:hidden;background:#fff}.cip38-gallery-thumb{display:block;aspect-ratio:16/10;background:linear-gradient(135deg,#0a3b64,#1370ac);background-size:cover;background-position:center}.cip38-gallery-grid strong,.cip38-gallery-grid small{display:block;padding-inline:12px}.cip38-gallery-grid strong{font-size:.86rem;padding-top:10px;color:#173b5c}.cip38-gallery-grid small{font-size:.72rem;color:#1670d2;font-weight:900;padding-top:2px;padding-bottom:11px}
.cip38-empty-inline{padding:24px;border:1px dashed #c6d4e2;border-radius:12px;margin-top:15px;background:#f7fafc}.cip38-empty-inline strong,.cip38-empty-inline span{display:block}.cip38-empty-inline span{font-size:.78rem;color:#73879a;margin-top:2px}.cip38-original{margin-top:18px}.cip38-original summary{cursor:pointer;font-weight:900;color:#31516f}.cip38-original .entry-content{margin-top:18px}.cip38-sync-note{display:flex;gap:12px;align-items:flex-start;margin-top:18px;padding:14px 17px;border-radius:12px;background:#e7f3ff;color:#15558f}.cip38-sync-note>span{font-size:1.2rem}.cip38-sync-note strong,.cip38-sync-note small{display:block}.cip38-sync-note small{font-size:.74rem;margin-top:2px;color:#4f7190}
@media(max-width:1050px){.cip38-summary-grid{grid-template-columns:1fr}.cip38-classification-links{grid-template-columns:repeat(3,1fr)}.cip38-gallery-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.cip38-results-tabs{top:66px}.cip38-hero-copy{align-items:flex-start}.cip38-date-badge{width:84px;min-width:84px;min-height:84px}.cip38-date-badge b{font-size:1.6rem}.cip38-winners-grid,.cip38-top-grid{grid-template-columns:1fr}.cip38-classification-links{grid-template-columns:1fr 1fr}.cip38-gallery-grid{grid-template-columns:1fr 1fr}.cip38-top-table>div{grid-template-columns:38px 1fr 82px}.cip38-top-table>div span:nth-child(3),.cip38-top-table>div.head span:nth-child(3){display:none}.cip38-info-card dl>div{grid-template-columns:1fr}}
@media(max-width:520px){.cip38-hero-copy{display:block}.cip38-date-badge{margin-bottom:16px}.cip38-results-hero-inner{padding-bottom:30px}.cip38-results-tabs a{padding:14px 16px}.cip38-winners-card,.cip38-info-card,.cip38-classifications,.cip38-gallery-section,.cip38-top-card{padding:16px}.cip38-winner{grid-template-columns:50px 1fr}.cip38-avatar{width:48px;height:48px}.cip38-classification-links,.cip38-gallery-grid{grid-template-columns:1fr}.cip38-section-head{align-items:flex-start;flex-direction:column}}


/* 5.2.3 — media ICRON distinti: foto classifica vs locandina */
.cip-race-poster{margin:0 0 24px;text-align:center}
.cip-race-poster img{display:block;max-width:min(100%,760px);height:auto;margin:0 auto;border-radius:18px;box-shadow:0 16px 42px rgba(5,35,61,.12)}
.cip-race-poster iframe,.cip-race-poster object{width:100%;min-height:720px;border:0;border-radius:18px;background:#fff}
.cip-home-result-photo img{object-fit:cover}


/* === Correre in Puglia 5.2.4 — responsive hardening === */
@media (max-width:1080px){
  .cip-brand{width:clamp(210px,28vw,280px)}
}
@media (max-width:640px){
  .cip-brand{width:min(54vw,205px)}
  .cip-theme-logo,.cip-preserve-logo{max-height:60px}
}
@media (max-width:390px){
  .cip-brand{width:min(50vw,175px)}
  .cip-icon-btn{width:38px;height:38px}
}

.cip-home-result-card.no-result-photo{grid-template-columns:1fr}
.cip-home-result-card.no-result-photo .cip-home-result-content{grid-column:1/-1;min-height:310px}
.cip-home-result-card .cip-home-result-main,
.cip-home-result-card .cip-home-result-content,
.cip-home-result-card .cip-result-podiums>div{min-width:0}
.cip-home-result-card h3,
.cip-result-podiums strong,
.cip-result-podiums b{overflow-wrap:anywhere}
.cip-home-result-photo{display:block;background:#edf3f7}
.cip-home-result-photo img{background:#fff;object-position:center top}

.cip-race-poster{overflow:hidden}
.cip-race-poster img{width:auto;max-width:100%;max-height:none}
.cip-race-poster iframe,.cip-race-poster object{max-width:100%}

html,body{max-width:100%}
body{overflow-x:clip}
.entry-content img,.entry-content video,.entry-content iframe,.entry-content embed,.entry-content object,
.cip-article-surface img,.cip-article-surface video,.cip-article-surface iframe{max-width:100%}
.entry-content table,.cip-article-surface table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
pre,code{max-width:100%}
pre{overflow-x:auto}
.wp-caption,.gallery,.blocks-gallery-grid{max-width:100%}

@media (max-width:1180px){
  .cip-home-result-content{grid-template-columns:minmax(0,1fr)}
  .cip-home-result-stats{grid-template-columns:repeat(3,minmax(0,1fr));min-width:0}
  .cip-home-result-stats .cip-btn{grid-column:auto}
}
@media (max-width:760px){
  .cip-home-result-card.no-result-photo .cip-home-result-content{min-height:0}
  .cip-home-result-stats{grid-template-columns:1fr 1fr}
  .cip-home-result-stats .cip-btn{grid-column:1/-1}
  .cip-race-poster iframe,.cip-race-poster object{min-height:70vh}
}
@media (max-width:460px){
  .cip-result-podiums{grid-template-columns:1fr}
  .cip-home-hero-actions{grid-template-columns:1fr}
  .cip-race-detail-facts{grid-template-columns:1fr}
  .cip-page-hero-stats{grid-template-columns:1fr}
  .cip-classifica-kpis{grid-template-columns:1fr}
}

/* === 5.2.5 — anteprima ICRON locale: niente servizi screenshot esterni === */
.cip-home-result-photo img{object-fit:cover;object-position:center;background:#06223d}
.cip-home-result-photo>span{background:rgba(4,26,48,.9)}

/* 5.4.0 — final go-live responsive safeguards */
.cip-container,.cip-header-row,.cip-footer-grid,.cip-race-detail-grid,.cip-home-results-grid{min-width:0}
iframe,object,embed,video,canvas,svg{max-width:100%}
@media(max-width:430px){
  .cip-brand{width:min(220px,68vw)}
  .cip-theme-logo{width:100%;height:auto}
  .cip-btn{max-width:100%}
  .cip-race-info-v2 dl>div{gap:8px}
  .cip-race-info-v2 dd{overflow-wrap:anywhere}
}

/* 5.4.1 — fallback anti-regressione hero home */
.cip-home-hero{background-color:#031b31}
.cip-home-hero-overlay{pointer-events:none}
