/*
Theme Name: Tower Racing v4.2
Author: Tower Racing
Version: 4.9
*/
*{box-sizing:border-box}html,body{margin:0;padding:0}body{font-family:Arial,Helvetica,sans-serif;background:#d8effb;color:#063d72;font-size:14px}
a{color:#07549a;text-decoration:none}img{max-width:100%;height:auto}.site{width:min(1200px,100%);margin:0 auto;background:#fff;box-shadow:0 0 16px #78a8c4}
.toplinks{height:35px;background:linear-gradient(#0b72b7,#004d8d);color:#fff;padding:8px 16px;font-size:13px;border-bottom:4px solid #8ed6fb}
.toplinks a{color:#fff;margin:0 9px}.masthead{height:114px;background:#bfe8fb url("assets/masthead-project.jpg") center center/100% 100% no-repeat;border-bottom:4px solid #fff}
.navbar{height:51px;background:linear-gradient(#0874bc,#00467f);display:flex;align-items:stretch;border-bottom:4px solid #e23c34}
.navbar a{display:flex;align-items:center;padding:0 30px;color:#fff;font-weight:bold;font-size:17px;border-right:1px solid #2b83ba}
.navbar a:first-child{background:#147cc0}.search{margin-left:auto;display:flex;align-items:center;padding:0 10px}.search input{width:210px;height:30px;border:0;padding:0 12px}.search button{height:30px;width:38px;border:0;background:#004a89;color:#fff}
.content{display:grid;grid-template-columns:230px minmax(0,1fr) 230px;gap:10px;padding:10px 10px 12px;background:#f8fdff}
.panel{border:1px solid #9fc9e2;background:#f6fbfe;margin-bottom:10px}.panel h3,.section-title{margin:0;color:#fff;background:linear-gradient(#0872b8,#005091);padding:8px 12px;font-size:17px}.panel-body{padding:12px;line-height:1.45}
.quick a,.recommend a{display:block;padding:8px 12px;border-top:1px solid #d4e7f1;font-weight:bold;background:#fff}.quick a:before{content:"›";margin-right:8px;color:#1681c4}.recommend a{text-align:center;padding:5px 8px;font-family:Georgia,serif;font-size:16px}
.hero{height:390px;position:relative;background:url("assets/hero.jpg") center/cover no-repeat;border:5px solid #d6eaf4;box-shadow:inset 0 0 0 1px #8fb8d0;overflow:hidden}.hero:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,27,51,.70) 0%,rgba(0,27,51,.23) 53%,rgba(0,27,51,0) 76%)}.hero-copy{position:absolute;z-index:2;left:22px;bottom:26px;width:55%;color:#fff;text-shadow:0 2px 2px #000}.eyebrow{font-size:13px;font-weight:bold;margin-bottom:5px}.hero h1{font-size:31px;line-height:1.05;margin:0 0 12px}.hero p{font-size:15px;line-height:1.35;margin:0 0 12px}.button{display:inline-block;color:#fff;background:linear-gradient(#1681c6,#005092);border:1px solid #65b8e6;padding:8px 14px;font-weight:bold}
.section-title{margin-top:8px;display:flex;justify-content:space-between;align-items:center;padding:6px 10px}.section-title a{color:#fff;font-size:12px;font-weight:normal}.news-grid,.shots-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:8px 0}.card{border-right:1px solid #d5e3eb;padding:0 6px}.card:first-child{padding-left:0}.card:last-child{border-right:0}.card img{width:100%;height:90px;object-fit:cover}.date{font-size:11px;color:#687d8d;margin-top:5px}.card h4{font-size:14px;line-height:1.1;margin:5px 0;color:#063f77}.card p{font-size:12px;line-height:1.25;margin:0;color:#455e6f}.shots-grid img{width:100%;height:92px;object-fit:cover;border:1px solid #b9d1df}
.forum-item{padding:8px 10px;border-bottom:1px solid #d1e3ee;background:#fff}.forum-item strong{display:block;color:#07549a;font-size:14px}.forum-item small{display:block;color:#61798a;margin-top:2px}.archive-photo{height:105px;background:url("assets/shot-3.jpg") center/cover no-repeat;margin-bottom:8px}.archive a{display:block;padding:2px 0}
.footer{background:linear-gradient(#07528b,#003c70);color:#fff;border-top:4px solid #7bc8f1;padding:18px 20px}.footer-inner{display:flex;align-items:center;justify-content:space-between}.footer-logo{font-family:Georgia,serif;font-size:22px;font-weight:bold}.footer a{color:#fff;margin:0 10px}.copyright{border-top:1px solid rgba(255,255,255,.25);margin-top:12px;padding-top:10px;font-size:12px}
@media(max-width:850px){.site{width:100%}.toplinks{height:auto;line-height:1.8}.masthead{height:auto;aspect-ratio:1240/114;background-size:100% 100%}.navbar{height:auto;flex-wrap:wrap}.navbar a{padding:12px 15px;font-size:14px}.search{width:100%;padding:7px 10px}.search input{flex:1}.content{grid-template-columns:1fr}.leftcol,.rightcol{display:grid;grid-template-columns:1fr 1fr;gap:10px}.hero{height:320px}.hero-copy{width:72%}.news-grid,.shots-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:520px){.masthead{height:auto;aspect-ratio:1240/114;background-size:100% 100%}.leftcol,.rightcol{display:block}.hero{height:300px}.hero-copy{width:88%;left:16px}.hero h1{font-size:25px}.news-grid,.shots-grid{grid-template-columns:1fr 1fr}.navbar a{padding:10px}.footer-inner{display:block}.footer nav{margin-top:10px}.footer a{margin:0 8px 0 0}}

/* v0.6: korekty nagłówka i stopki + galopujący folblut */
.masthead{position:relative}
.masthead:after{display:none}
.masthead-slogan{display:none}
.footer-inner{min-height:46px}
.footer-brand{display:flex;align-items:center;gap:10px;font-family:Georgia,serif;font-size:24px;font-weight:bold;letter-spacing:.3px}

@media(max-width:850px){.masthead-slogan{display:none}.masthead:after{display:none}.footer-brand{font-size:20px}}
@media(max-width:520px){.masthead-slogan{display:none}.masthead:after{display:none}.footer-brand{font-size:18px}.footer-inner nav{margin-top:10px}}

/* Tower Racing v1.5 — większe zdjęcia w treści artykułów */
.single .tr-article-content img,
.single .entry-content img,
.single article img {
  height: auto;
  max-width: 100%;
}
.tr-single-wrap{padding:25px 30px;background:#fff}
.tr-article-content{font-size:16px;line-height:1.48}
.tr-article-content img.alignnone,
.tr-article-content img.aligncenter,
.tr-article-content a img.alignnone,
.tr-article-content a img.aligncenter{
  width:auto;
  max-width:min(100%,1000px);
  height:auto;
}
.tr-article-content .aligncenter{display:block;margin:16px auto}
.tr-article-content .alignleft{float:left;margin:6px 20px 14px 0;max-width:48%}
.tr-article-content .alignright{float:right;margin:6px 0 14px 20px;max-width:48%}
.tr-article-content figure.wp-caption{max-width:100%}
.tr-article-content figure.wp-caption img{width:100%;height:auto}
.tr-article-content:after{content:"";display:block;clear:both}
@media(max-width:700px){.tr-single-wrap{padding:18px 14px}.tr-article-content img,.tr-article-content .alignleft,.tr-article-content .alignright{float:none;display:block;max-width:100%;margin:14px auto}}


/* Tower Racing v2.1 — pełne, duże zdjęcia w artykułach */
.single .tr-article-content img[class*="wp-image-"] {
  display: block !important;
  float: none !important;
  width: 100% !important;
  max-width: 1000px !important;
  height: auto !important;
  margin: 20px auto !important;
}
.single .tr-article-content a:has(> img[class*="wp-image-"]) {
  display: block;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}
.single .tr-article-content p:has(> img[class*="wp-image-"]) {
  width: 100%;
}

/* Tower Racing v2.3 — dopracowane Najnowsze aktualności */
.news-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(0,1fr));
  gap:0;
  padding:8px 0 12px;
  width:100%;
}
.news-grid .card{
  min-width:0;
  padding:0 10px;
  border-right:1px solid #d5e3eb;
}
.news-grid .card:first-child{padding-left:0}
.news-grid .card:last-child{padding-right:0;border-right:0}
.news-grid .card img{
  display:block;
  width:100%;
  height:118px;
  object-fit:cover;
  object-position:center;
}
.news-grid .date{margin-top:7px;font-size:11px;line-height:1.2;color:#687d8d}
.news-grid .card h4{font-size:15px;line-height:1.15;margin:6px 0 6px;color:#063f77}
.news-grid .card h4 a{color:#063f77}
.news-grid .card p{
  font-size:12px;
  line-height:1.3;
  margin:0;
  color:#455e6f;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:4;
  overflow:hidden;
}
@media(max-width:850px){.news-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 0}.news-grid .card:nth-child(2n){border-right:0}.news-grid .card img{height:150px}}
@media(max-width:520px){.news-grid{grid-template-columns:1fr}.news-grid .card{padding:0 0 14px;border-right:0;border-bottom:1px solid #d5e3eb;margin-bottom:14px}.news-grid .card:last-child{border-bottom:0;margin-bottom:0}.news-grid .card img{height:auto;max-height:260px}}

/* v2.4 — prawdziwe tematy forum */
.forum-item a{color:inherit;text-decoration:none}.forum-item a:hover{text-decoration:underline}.forum-item small{display:block;margin-top:4px}

/* Tower Racing v2.5 — dynamiczne archiwum */
.archive .panel-body>a{display:block;padding:4px 0}
.archive-count{float:right;min-width:22px;text-align:center;font-size:12px;font-weight:700;background:#e3f1f9;border:1px solid #b9d8e9;border-radius:10px;padding:0 6px;line-height:18px}
.tr-archive-page{padding:24px 30px 36px;background:#fff}
.tr-archive-page h1{margin:0 0 6px;color:#07549a}
.tr-archive-lead{margin:0 0 20px;color:#4e6472}
.tr-archive-category-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:0 0 28px}
.tr-archive-category{display:flex;flex-direction:column;padding:14px;border:1px solid #b9d8e9;background:#f4fbff;text-decoration:none}
.tr-archive-category strong{font-size:17px;color:#07549a}.tr-archive-category span{margin-top:4px;font-size:13px;color:#607581}
.tr-archive-list article{padding:13px 0;border-top:1px solid #d5e5ee}.tr-archive-list h3{margin:2px 0 4px}.tr-archive-list p{margin:0}.tr-archive-list .date{font-size:12px;color:#6a7e88}
@media(max-width:800px){.tr-archive-category-grid{grid-template-columns:repeat(2,1fr)}}

/* Tower Racing v2.7 — strony kategorii Archiwum */
.tr-category-main{min-width:0;background:#fff}
.tr-category-title{margin-top:0}
.tr-category-lead{margin:12px 12px 6px;color:#526b7b;font-size:14px}
.tr-category-list{padding:0 12px 18px}
.tr-category-item{display:grid;grid-template-columns:210px minmax(0,1fr);gap:16px;padding:16px 0;border-bottom:1px solid #cbdfe9}
.tr-category-thumb{display:block}
.tr-category-thumb img,.tr-category-noimg{display:block;width:210px;height:125px;object-fit:cover;background:#e8f2f7}
.tr-category-copy h2{font-size:20px;line-height:1.12;margin:4px 0 7px}.tr-category-copy h2 a{color:#07549a}
.tr-category-copy p{font-size:14px;line-height:1.4;color:#425d6d;margin:0 0 8px}
.tr-category-more{font-weight:bold;color:#07549a}
.tr-category-pagination{padding:16px 0 4px}.tr-category-pagination .nav-links{display:flex;gap:6px;flex-wrap:wrap}.tr-category-pagination .page-numbers{padding:5px 9px;border:1px solid #b8d5e6;background:#f4fbff}.tr-category-pagination .current{background:#075fa0;color:#fff}
.tr-category-empty{padding:18px 0}
@media(max-width:1050px){.tr-category-item{grid-template-columns:170px minmax(0,1fr)}.tr-category-thumb img,.tr-category-noimg{width:170px;height:110px}}
@media(max-width:520px){.tr-category-item{grid-template-columns:1fr}.tr-category-thumb img,.tr-category-noimg{width:100%;height:190px}.tr-category-lead,.tr-category-list{margin-left:0;margin-right:0}}

/* Tower Racing v2.8 — ujednolicenie nagłówka i dopracowanie stron kategorii */
body.category .site{width:min(1200px,100%) !important;margin:0 auto !important}
body.category .toplinks{height:35px !important;padding:8px 16px !important;font-size:13px !important;line-height:15px !important;white-space:nowrap;overflow:hidden}
body.category .toplinks a{display:inline !important;margin:0 9px !important;padding:0 !important;font-size:13px !important;font-weight:400 !important}
body.category .masthead{height:114px !important;aspect-ratio:auto !important;background-size:100% 100% !important}
body.category .navbar{height:51px !important;display:flex !important;align-items:stretch !important;flex-wrap:nowrap !important}
body.category .navbar>a{display:flex !important;align-items:center !important;padding:0 30px !important;font-size:17px !important;line-height:1 !important;font-weight:700 !important;white-space:nowrap !important}
body.category .navbar .search{margin-left:auto !important;display:flex !important;align-items:center !important;padding:0 10px !important;width:auto !important}
body.category .navbar .search input{width:210px !important;height:30px !important}
body.category .content{grid-template-columns:230px minmax(0,1fr) 230px !important;gap:10px !important;padding:10px 10px 12px !important}

.tr-category-main{border:1px solid #d3e5ef;background:#fff}
.tr-category-title{margin:0;font-size:18px;padding:8px 12px}
.tr-category-lead{margin:14px 16px 4px;font-size:14px;line-height:1.45}
.tr-category-list{padding:0 16px 24px}
.tr-category-item{grid-template-columns:240px minmax(0,1fr);gap:20px;padding:20px 0}
.tr-category-thumb img,.tr-category-noimg{width:240px;height:150px;border:1px solid #c4dce9;object-fit:cover}
.tr-category-copy .date{margin:2px 0 6px;font-size:12px}
.tr-category-copy h2{font-size:21px;line-height:1.16;margin:0 0 8px}
.tr-category-copy p{font-size:14px;line-height:1.48;margin:0 0 10px}
.tr-category-more{display:inline-block;font-size:14px;font-weight:700}

@media(max-width:850px){
 body.category .toplinks{height:auto !important;white-space:normal;line-height:1.8 !important}
 body.category .masthead{height:auto !important;aspect-ratio:1240/114 !important}
 body.category .navbar{height:auto !important;flex-wrap:wrap !important}
 body.category .navbar>a{padding:12px 15px !important;font-size:14px !important}
 body.category .navbar .search{width:100% !important;padding:7px 10px !important}
 body.category .navbar .search input{width:auto !important;flex:1}
 body.category .content{grid-template-columns:1fr !important}
 .tr-category-item{grid-template-columns:200px minmax(0,1fr)}
 .tr-category-thumb img,.tr-category-noimg{width:200px;height:130px}
}
@media(max-width:520px){
 .tr-category-item{grid-template-columns:1fr;gap:10px}
 .tr-category-thumb img,.tr-category-noimg{width:100%;height:190px}
 .tr-category-list{padding:0 12px 18px}
}
\n/* Tower Racing v2.9 — glowna strona Archiwum */
.tr-main-archive{min-width:0}
.tr-archive-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px 16px 18px}
.tr-archive-box{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 14px;border:1px solid #c7dfec;background:#f5fbfe;font-size:16px;font-weight:700}
.tr-archive-box span{font-size:12px;font-weight:400;color:#557080;white-space:nowrap}
.tr-archive-latest-title{margin:0 16px;padding:8px 0;border-bottom:1px solid #c7dfec;color:#07549a;font-size:19px}
@media(max-width:520px){.tr-archive-sections{grid-template-columns:1fr}}

/* Tower Racing v3.1 — Migawki według dni wyścigowych */
.shots-grid a{display:block;min-width:0}.shots-grid a img{width:100%;height:100%;object-fit:cover}
.tr-migawki-days{padding:8px 16px 24px}.tr-migawki-day{display:grid;grid-template-columns:220px minmax(0,1fr);gap:18px;padding:14px 0;border-bottom:1px solid #cbdfe9;align-items:center}.tr-migawki-cover{width:220px;height:135px;object-fit:cover}.tr-migawki-day h2{margin:4px 0 7px;color:#07549a;font-size:20px}.tr-migawki-day span{font-size:13px;color:#607581}.tr-migawki-heading{padding:14px 16px 4px;display:flex;justify-content:space-between;gap:15px;align-items:center}.tr-migawki-heading h2{margin:0;color:#07549a}.tr-photo-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:14px 16px 28px}.tr-photo-gallery a{display:block}.tr-photo-gallery img{display:block;width:100%;height:180px;object-fit:cover;border:1px solid #c5dce8}
@media(max-width:850px){.tr-photo-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.tr-migawki-day{grid-template-columns:180px minmax(0,1fr)}.tr-migawki-cover{width:180px;height:115px}}
@media(max-width:520px){.tr-migawki-day{grid-template-columns:1fr}.tr-migawki-cover{width:100%;height:190px}.tr-photo-gallery{grid-template-columns:1fr}.tr-photo-gallery img{height:auto}.tr-migawki-heading{align-items:flex-start;flex-direction:column}}

/* Tower Racing v3.3 — lightbox Migawek ze strzałkami */
html.tr-lightbox-open,html.tr-lightbox-open body{overflow:hidden}
.tr-lightbox{position:fixed;inset:0;z-index:999999;background:rgba(5,8,10,.96);display:none;align-items:center;justify-content:center;padding:60px 120px 50px}
.tr-lightbox.is-open{display:flex}
.tr-lightbox-stage{max-width:min(1200px,calc(100vw - 260px));max-height:calc(100vh - 110px);display:flex;align-items:center;justify-content:center}
.tr-lightbox-stage img{display:block;max-width:100%;max-height:calc(100vh - 110px);width:auto;height:auto;object-fit:contain;box-shadow:0 0 0 1px rgba(255,255,255,.12)}
.tr-lightbox-prev,.tr-lightbox-next{position:fixed;top:50%;transform:translateY(-50%);width:68px;height:68px;border:0;border-radius:50%;background:rgba(255,255,255,.15);color:#fff;font:400 58px/58px Arial,sans-serif;cursor:pointer;z-index:2;padding:0 0 7px}
.tr-lightbox-prev{left:32px}.tr-lightbox-next{right:32px}.tr-lightbox-prev:hover,.tr-lightbox-next:hover{background:rgba(255,255,255,.27)}
.tr-lightbox-close{position:fixed;right:25px;top:14px;border:0;background:transparent;color:#fff;font:300 52px/1 Arial,sans-serif;cursor:pointer;z-index:3}
.tr-lightbox-info{position:fixed;left:28px;top:24px;color:#fff;z-index:2;display:flex;flex-direction:column;gap:3px;max-width:260px}.tr-lightbox-info strong{font-size:18px}.tr-lightbox-title{font-size:17px;font-weight:700}.tr-lightbox-date{font-size:14px;color:#d7d7d7}
@media(max-width:800px){.tr-lightbox{padding:55px 15px 65px}.tr-lightbox-stage{max-width:100%;max-height:calc(100vh - 120px)}.tr-lightbox-stage img{max-height:calc(100vh - 120px)}.tr-lightbox-prev,.tr-lightbox-next{width:48px;height:48px;font-size:42px;line-height:40px;background:rgba(0,0,0,.45)}.tr-lightbox-prev{left:8px}.tr-lightbox-next{right:8px}.tr-lightbox-info{left:14px;top:12px;max-width:70%;}.tr-lightbox-close{right:12px;top:4px;font-size:44px}}

/* Tower Racing v3.4 — poprawny nagłówek na stronie Wszystkie dni wyścigowe */
body.post-type-archive-tr_migawka .site{width:min(1200px,100%) !important;margin:0 auto !important}
body.post-type-archive-tr_migawka .toplinks{height:35px !important;padding:8px 16px !important;font-size:13px !important;line-height:15px !important;white-space:nowrap;overflow:hidden}
body.post-type-archive-tr_migawka .toplinks a{display:inline !important;margin:0 9px !important;padding:0 !important;font-size:13px !important;font-weight:400 !important}
body.post-type-archive-tr_migawka .masthead{height:114px !important;aspect-ratio:auto !important;background-size:100% 100% !important}
body.post-type-archive-tr_migawka .navbar{height:51px !important;display:flex !important;align-items:stretch !important;flex-wrap:nowrap !important}
body.post-type-archive-tr_migawka .navbar>a{display:flex !important;align-items:center !important;padding:0 30px !important;font-size:17px !important;line-height:1 !important;font-weight:700 !important;white-space:nowrap !important}
body.post-type-archive-tr_migawka .navbar .search{margin-left:auto !important;display:flex !important;align-items:center !important;padding:0 10px !important;width:auto !important}
body.post-type-archive-tr_migawka .navbar .search input{width:210px !important;height:30px !important}
body.post-type-archive-tr_migawka .content{grid-template-columns:230px minmax(0,1fr) 230px !important;gap:10px !important;padding:10px 10px 12px !important}
@media(max-width:850px){
 body.post-type-archive-tr_migawka .toplinks{height:auto !important;white-space:normal;line-height:1.8 !important}
 body.post-type-archive-tr_migawka .masthead{height:auto !important;aspect-ratio:1240/114 !important}
 body.post-type-archive-tr_migawka .navbar{height:auto !important;flex-wrap:wrap !important}
 body.post-type-archive-tr_migawka .navbar>a{padding:12px 15px !important;font-size:14px !important}
 body.post-type-archive-tr_migawka .navbar .search{width:100% !important;padding:7px 10px !important}
 body.post-type-archive-tr_migawka .navbar .search input{width:auto !important;flex:1}
 body.post-type-archive-tr_migawka .content{grid-template-columns:1fr !important}
}


/* Tower Racing v3.5 — Kontakt */
.tr-contact-main{min-width:0}
.tr-contact-wrap{padding:18px 22px 30px}
.tr-contact-wrap h1{margin:0 0 8px;color:#07549a;font-size:24px}
.tr-contact-lead{margin:0 0 20px;color:#4c6574;font-size:14px;line-height:1.5}
.tr-contact-form{display:grid;gap:14px;max-width:680px}
.tr-contact-form label{display:grid;gap:5px;font-size:14px;font-weight:700;color:#27495f}
.tr-contact-form label span{color:#b21f2d}
.tr-contact-form input,.tr-contact-form textarea{box-sizing:border-box;width:100%;border:1px solid #b9d3e2;background:#fff;padding:9px 10px;font:14px Arial,sans-serif;color:#243d4d;border-radius:2px}
.tr-contact-form input:focus,.tr-contact-form textarea:focus{outline:2px solid #b9dff2;border-color:#4d94bb}
.tr-contact-form textarea{resize:vertical;min-height:170px}
.tr-contact-form button{justify-self:start;border:0;background:#075b97;color:#fff;font-weight:700;font-size:15px;padding:10px 20px;cursor:pointer;border-radius:2px}
.tr-contact-form button:hover{background:#064a7b}
.tr-contact-success,.tr-contact-error{padding:11px 13px;margin:0 0 18px;border:1px solid #b8d7c0;background:#effaf2;color:#245c31;font-size:14px}
.tr-contact-error{border-color:#e2b9bd;background:#fff2f3;color:#8b202b}.tr-contact-error ul{margin:6px 0 0 20px}
.tr-contact-hp{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}
body.page .site{width:min(1200px,100%);margin:0 auto}
@media(max-width:520px){.tr-contact-wrap{padding:15px 12px 24px}.tr-contact-wrap h1{font-size:21px}}

/* Tower Racing v3.8 — dopracowane kafelki „Najnowsze aktualności” */
.news-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  align-items:stretch;
  padding:10px 0 14px;
}
.news-grid .card{
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  min-width:0;
  padding:0 11px;
}
.news-grid .card img{
  width:100%;
  height:125px;
  object-fit:cover;
  object-position:center;
  border:0;
}
.news-grid .date{
  margin:7px 0 0;
  min-height:14px;
  font-size:11px;
  line-height:1.25;
}
.news-grid .card h4{
  margin:6px 0 6px;
  font-size:15px;
  line-height:1.18;
}
.news-grid .card p{
  margin:0;
  font-size:12px;
  line-height:1.35;
  -webkit-line-clamp:3;
}
@media(max-width:850px){
  .news-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .news-grid .card{padding-bottom:14px}
  .news-grid .card:nth-child(2n){border-right:0}
  .news-grid .card img{height:150px}
}
@media(max-width:520px){
  .news-grid{grid-template-columns:1fr}
  .news-grid .card{padding:0 0 14px}
  .news-grid .card img{height:auto;max-height:260px}
}


/* Tower Racing v3.9 — aktualności wykorzystują całą szerokość zależnie od liczby wpisów */
@media(min-width:851px){
  .news-grid.news-count-1{grid-template-columns:minmax(0,1fr)}
  .news-grid.news-count-2{grid-template-columns:repeat(2,minmax(0,1fr))}
  .news-grid.news-count-3{grid-template-columns:repeat(3,minmax(0,1fr))}
  .news-grid.news-count-4{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* Tower Racing v4.0 — dopracowana lewa kolumna */
.leftcol .panel{overflow:hidden}
.leftcol .panel h3{padding:9px 13px;font-size:17px;line-height:1.2}
.leftcol .quick a{
  position:relative;
  display:flex;
  align-items:center;
  min-height:37px;
  padding:8px 12px 8px 31px;
  border-top:1px solid #d4e7f1;
  background:#fff;
  font-size:14px;
  line-height:1.2;
  font-weight:700;
  transition:background .15s ease,color .15s ease,padding-left .15s ease;
}
.leftcol .quick a:before{
  content:"›";
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-52%);
  margin:0;
  color:#1681c4;
  font-size:18px;
  line-height:1;
  font-weight:700;
}
.leftcol .quick a:hover{background:#eef8fd;color:#003f76;padding-left:34px}
.leftcol .recommend a{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:31px;
  padding:5px 10px;
  border-top:1px solid #d4e7f1;
  background:#fff;
  text-align:center;
  font-family:Georgia,"Times New Roman",serif;
  font-size:15px;
  line-height:1.15;
  font-weight:700;
  transition:background .15s ease,color .15s ease;
}
.leftcol .recommend a:hover{background:#eef8fd;color:#003f76}
.leftcol .recommend a:first-of-type,.leftcol .quick a:first-of-type{border-top:0}
@media(max-width:850px){.leftcol .quick a,.leftcol .recommend a{min-height:38px}}

/* Tower Racing v4.1 — dopracowana prawa kolumna */
.rightcol .panel{overflow:hidden}
.rightcol .panel h3{padding:9px 13px;font-size:17px;line-height:1.2}
.rightcol .forum-item{
  padding:9px 11px;
  border-bottom:1px solid #d4e7f1;
  background:#fff;
  transition:background .15s ease;
}
.rightcol .forum-item:hover{background:#f1f9fd}
.rightcol .forum-item strong{
  display:block;
  font-size:13.5px;
  line-height:1.25;
  font-weight:700;
}
.rightcol .forum-item strong a{color:#07549a;text-decoration:none}
.rightcol .forum-item strong a:hover{color:#003f76;text-decoration:underline}
.rightcol .forum-item small{
  display:block;
  margin-top:4px;
  color:#657d8c;
  font-size:11px;
  line-height:1.25;
}
.rightcol .panel>.panel-body{padding:10px 12px}
.rightcol .panel>.panel-body>b>a{font-size:13.5px}
.rightcol .archive .panel-body{padding:10px 12px 12px}
.rightcol .archive-photo{
  height:112px;
  margin:0 0 10px;
  border:1px solid #d4e7f1;
}
.rightcol .archive .panel-body>b{
  display:block;
  margin:0 0 6px;
  font-size:13px;
  line-height:1.35;
}
.rightcol .archive .panel-body>a{
  position:relative;
  display:flex;
  align-items:center;
  min-height:30px;
  padding:5px 37px 5px 10px;
  border-top:1px solid #e1edf4;
  font-size:13px;
  line-height:1.2;
  transition:background .15s ease,color .15s ease;
}
.rightcol .archive .panel-body>a:hover{background:#eef8fd;color:#003f76}
.rightcol .archive-count{
  position:absolute;
  right:2px;
  top:50%;
  transform:translateY(-50%);
  float:none;
  min-width:27px;
  padding:0 5px;
  line-height:18px;
}
@media(max-width:850px){
  .rightcol .forum-item{padding:10px 12px}
  .rightcol .archive .panel-body>a{min-height:36px}
}


/* Tower Racing v4.2 — prosta stopka */
.tr-footer-v42{padding:14px 20px 12px;background:linear-gradient(#07528b,#003c70);border-top:4px solid #7bc8f1;color:#fff}
.tr-footer-v42 .footer-inner{min-height:0;display:block}
.tr-footer-v42 .footer-brand{font-family:Georgia,serif;font-size:21px;font-weight:bold;letter-spacing:.3px;line-height:1.2}
.tr-footer-v42 .copyright{margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.25);font-size:12px;line-height:1.3;color:#fff}
@media(max-width:520px){.tr-footer-v42{padding:12px 14px 10px}.tr-footer-v42 .footer-brand{font-size:18px}}

/* Tower Racing v4.3 — pełna wersja mobilna */
@media (max-width:700px){
  html,body{max-width:100%;overflow-x:hidden}
  body{background:#dff3fc}
  .site{width:100%;max-width:100%;margin:0;box-shadow:none}

  .toplinks{height:auto;padding:6px 10px;white-space:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;font-size:11px;line-height:1.5}
  .toplinks b{display:inline}
  .toplinks a{margin:0 6px}

  .masthead{height:92px;aspect-ratio:auto;background-size:auto 100%;background-position:center center}

  .navbar{height:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
  .navbar>a{min-width:0;justify-content:center;padding:11px 5px;font-size:14px;line-height:1.15;text-align:center;border-right:1px solid #2b83ba;border-bottom:1px solid #2b83ba}
  .navbar>a:first-child{grid-column:1 / -1}
  .navbar .search{grid-column:1 / -1;width:auto;margin:0;padding:7px 8px;display:flex}
  .navbar .search input{min-width:0;width:auto;flex:1;height:34px;font-size:16px}
  .navbar .search button{height:34px}

  .content,
  body.category .content,
  body.post-type-archive-tr_migawka .content{display:flex !important;flex-direction:column;gap:10px;padding:8px !important}
  .content>main{order:1;min-width:0;width:100%}
  .content>.leftcol{order:2;width:100%}
  .content>.rightcol{order:3;width:100%}
  .leftcol,.rightcol{display:block !important}
  .leftcol .panel,.rightcol .panel{margin-bottom:10px}

  .hero{height:270px;border-width:3px;background-position:center center}
  .hero-copy{left:14px;right:14px;bottom:16px;width:auto}
  .eyebrow{font-size:11px}
  .hero h1{font-size:25px;line-height:1.04;margin-bottom:9px}
  .hero p{font-size:13px;line-height:1.3;margin-bottom:10px;max-width:92%}
  .button{padding:7px 11px;font-size:13px}

  .section-title{gap:8px;padding:7px 8px;line-height:1.2}
  .section-title b{font-size:15px}
  .section-title a{font-size:11px;text-align:right}

  .news-grid{grid-template-columns:1fr !important;gap:0;padding:8px 0}
  .news-grid .card{padding:0 0 14px !important;margin:0 0 14px;border-right:0;border-bottom:1px solid #d5e3eb}
  .news-grid .card:last-child{margin-bottom:0;border-bottom:0}
  .news-grid .card img{width:100%;height:auto;max-height:280px;object-fit:cover}
  .news-grid .card h4{font-size:16px}
  .news-grid .card p{font-size:13px;line-height:1.35}

  .shots-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:7px 0}
  .shots-grid img{height:120px}

  .panel h3,.rightcol .panel h3{font-size:16px;padding:8px 11px}
  .panel-body{font-size:14px;line-height:1.45}
  .leftcol .quick a,.leftcol .recommend a{min-height:40px}
  .rightcol .forum-item{padding:10px 11px}
  .rightcol .forum-item strong{font-size:14px}
  .rightcol .forum-item small{font-size:11px}

  .tr-migawki-days{padding:6px 10px 18px}
  .tr-migawki-day{grid-template-columns:1fr;gap:8px;padding:12px 0}
  .tr-migawki-cover{width:100%;height:190px}
  .tr-migawki-heading{padding:12px 10px 2px;align-items:flex-start}
  .tr-migawki-heading h2{font-size:19px}
  .tr-photo-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:10px 10px 20px}
  .tr-photo-gallery img{height:145px}

  .tr-category-lead,.tr-category-list{margin-left:0;margin-right:0}
  .tr-category-item{grid-template-columns:1fr !important}
  .tr-category-thumb img,.tr-category-noimg{width:100% !important;height:190px !important}
  .tr-archive-category-grid,.tr-archive-sections{grid-template-columns:1fr !important}

  .tr-single-wrap{padding:16px 12px}
  .tr-single-wrap h1{font-size:24px;line-height:1.1}
  .tr-article-content{font-size:15px;line-height:1.5}
  .tr-article-content img,.tr-article-content .alignleft,.tr-article-content .alignright{float:none;display:block;max-width:100%;height:auto;margin:12px auto}

  .tr-contact-wrap{padding:14px 10px 22px}
  .tr-contact-wrap input,.tr-contact-wrap textarea{max-width:100%;box-sizing:border-box}

  .tr-footer-v42{padding:12px 12px 10px;text-align:left}
  .tr-footer-v42 .footer-brand{font-size:18px}
  .tr-footer-v42 .copyright{font-size:11px}
}

@media (max-width:390px){
  .masthead{height:82px}
  .navbar>a{font-size:13px;padding:10px 4px}
  .hero{height:250px}
  .hero h1{font-size:22px}
  .hero p{font-size:12px}
  .shots-grid{grid-template-columns:1fr 1fr}
  .shots-grid img{height:105px}
  .tr-photo-gallery img{height:125px}
}

/* Tower Racing v4.4 — odchudzona wersja mobilna */
@media (max-width:700px){
  /* Na telefonie zostawiamy treść główną; panele boczne są dostępne z menu. */
  .toplinks{display:none !important}
  .content>.leftcol,
  .content>.rightcol{display:none !important}

  /* Banner bez brutalnego kadrowania — cała grafika mieści się w szerokości ekranu. */
  .masthead{
    height:auto !important;
    aspect-ratio:1200 / 132;
    min-height:72px;
    background-size:100% 100% !important;
    background-position:center center !important;
    background-repeat:no-repeat !important;
  }
  .masthead-slogan{display:none !important}

  /* Aktualności mają być zwarte, żeby jedno zdjęcie nie zajmowało prawie całego ekranu. */
  .news-grid .card img{
    width:100%;
    height:210px !important;
    max-height:210px !important;
    object-fit:cover;
    object-position:center;
  }

  /* Po ukryciu kolumn bocznych nie zostawiamy dodatkowych odstępów. */
  .content{padding-bottom:8px !important}
  .tr-footer-v42{margin-top:0}
}
@media (max-width:390px){
  .masthead{height:auto !important;min-height:64px}
  .news-grid .card img{height:190px !important;max-height:190px !important}
}
\n\n/* Tower Racing v4.5 — poprawka klikalności menu na telefonach */
@media (max-width:700px){
  .navbar{position:relative !important;z-index:100 !important;isolation:isolate}
  .navbar>a{
    position:relative !important;
    z-index:102 !important;
    pointer-events:auto !important;
    touch-action:manipulation;
    cursor:pointer;
  }
  .navbar .search{position:relative !important;z-index:101 !important}
}

/* v4.9 — archiwum przygotowane pod stare materiały Website X5 */
.tr-archive-filters{display:grid;grid-template-columns:minmax(190px,1.5fr) minmax(110px,.7fr) minmax(150px,1fr);gap:10px 12px;margin:14px 16px 4px;padding:14px;border:1px solid #c7dfec;background:#f5fbfe}
.tr-archive-filters>div{min-width:0}.tr-archive-filters label{display:block;margin:0 0 4px;font-size:12px;font-weight:700;color:#31566c}
.tr-archive-filters input,.tr-archive-filters select{box-sizing:border-box;width:100%;height:36px;padding:6px 8px;border:1px solid #abcbdc;background:#fff;font:inherit;color:#233f50}
.tr-archive-filter-actions{grid-column:1/-1;display:flex;align-items:center;gap:12px}.tr-archive-filter-actions button{border:0;background:#075fa0;color:#fff;font-weight:700;padding:8px 14px;cursor:pointer}.tr-archive-filter-actions a{font-size:13px;font-weight:700}
@media(max-width:700px){.tr-archive-filters{grid-template-columns:1fr;margin:12px;padding:12px}.tr-archive-filter-actions{grid-column:auto}.tr-archive-filter-actions button{min-height:40px}}

/* v5.1 — czytelne przyciski lat w Archiwum */
.tr-archive-years{margin:18px 0 12px}
.tr-archive-years-label{display:block;margin-bottom:9px;font-weight:700;color:#174f7d}
.tr-archive-years-links{display:flex;flex-wrap:wrap;gap:7px}
.tr-archive-years-links a{display:inline-flex;align-items:center;justify-content:center;min-width:58px;padding:8px 12px;background:#eef8fd;border:1px solid #9fcbe5;color:#00589d;font-weight:700;text-decoration:none;line-height:1;border-radius:2px;transition:background .15s ease,color .15s ease,border-color .15s ease}
.tr-archive-years-links a:hover,.tr-archive-years-links a:focus{background:#0a6eae;border-color:#0a6eae;color:#fff;text-decoration:none}
.tr-archive-years-links a.is-active{background:#075b99;border-color:#075b99;color:#fff}
@media(max-width:700px){.tr-archive-years{margin-top:15px}.tr-archive-years-links{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.tr-archive-years-links a{min-width:0;padding:9px 5px}}

/* Search results */
body.search .tr-category-main{min-width:0}
body.search .tr-search-empty{padding:24px 18px;background:#f5fbff;border:1px solid #c9dfec}
body.search .tr-search-empty h2{margin:0 0 8px;color:#064f88;font-size:22px}
body.search .navbar .search{margin-left:auto;display:flex;align-items:center;padding:0 10px;width:auto}
body.search .navbar .search input{width:210px;height:30px}
@media(max-width:850px){body.search .navbar .search{width:100%;padding:7px 10px}body.search .navbar .search input{width:auto;flex:1}}
