/*
Theme Name: Büetikofer Racing Light
Theme URI: https://buetikofer-racing.ch/
Author: webelart / OpenAI
Description: Helles WordPress-Theme für Büetikofer Racing mit Seiten-, News-, Über-uns-, Resultate- und Kontakt-Templates. Optimiert für Contact Form 7.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: buetikofer-racing
*/

:root{
  --br-red:#ed1c24;
  --br-orange:#f77f00;
  --br-dark:#111827;
  --br-text:#374151;
  --br-muted:#6b7280;
  --br-bg:#ffffff;
  --br-soft:#f8fafc;
  --br-line:#e5e7eb;
  --br-shadow:0 18px 45px rgba(17,24,39,.08);
  --br-radius:22px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--br-bg);
  color:var(--br-text);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:16px;
  line-height:1.65;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--br-red);text-decoration:none}
a:hover{text-decoration:underline}
.container{width:min(1160px,calc(100% - 40px));margin-inline:auto}

/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(18px);
  border-bottom:1px solid var(--br-line);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:32px;
  min-height:92px;
  padding:12px 0;
}

/* Logo Anpassung: verhindert riesiges Logo */
.site-branding{
  flex:0 0 auto;
  min-width:0;
}
.site-branding a{
  display:flex;
  align-items:center;
  gap:12px;
  color:var(--br-dark);
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-size:1.05rem;
}
.site-branding .custom-logo-link{
  display:block;
}
.site-branding img,
.custom-logo{
  max-height:62px;
  width:auto;
  height:auto;
  display:block;
}
.site-tagline{
  color:var(--br-muted);
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.18em;
  text-transform:uppercase;
  white-space:nowrap;
}

.main-navigation{
  flex:1 1 auto;
  display:flex;
  justify-content:flex-end;
}
.main-navigation ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:26px;
  align-items:center;
}
.main-navigation a{
  color:var(--br-dark);
  font-weight:900;
  font-size:.92rem;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a{
  color:var(--br-red);
  text-decoration:none;
}

/* START BURGER MENU */
.menu-toggle{
  display:none;
  width:46px;
  height:46px;
  padding:0;
  border-radius:999px;
  background:#fff !important;
  border:1px solid var(--br-line);
  box-shadow:none !important;
  cursor:pointer;
}

.menu-toggle span{
  display:block;
  width:22px;
  height:2px;
  background:var(--br-dark);
  border-radius:99px;
  transition:.25s ease;
}

.menu-toggle span + span{
  margin-top:5px;
}

.menu-toggle.is-open span:nth-child(1){
  transform:translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2){
  opacity:0;
}

.menu-toggle.is-open span:nth-child(3){
  transform:translateY(-7px) rotate(-45deg);
}

@media (max-width:960px){
  .header-inner{
    flex-direction:row;
    align-items:center;
    flex-wrap:wrap;
  }

  .menu-toggle{
    display:flex;
    align-items:center;
    justify-content:center;
    flex-direction:column;
  }

  .main-navigation{
    display:none;
    width:100%;
    flex-basis:100%;
  }

  .main-navigation.is-open{
    display:block;
  }

  .main-navigation ul{
    flex-direction:column;
    align-items:flex-start;
    gap:0;
    padding:14px 0 4px;
  }

  .main-navigation li{
    width:100%;
  }

  .main-navigation a{
    display:block;
    width:100%;
    padding:13px 0;
    border-bottom:1px solid var(--br-line);
    font-size:1rem;
  }
}
/*END BURGER MENU*/

/* Hero */
.hero{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at 80% 20%, rgba(237,28,36,.12), transparent 32%),
    linear-gradient(135deg,#fff 0%,#f8fafc 52%,#eef2f7 100%);
  padding:110px 0 90px;
  border-bottom:1px solid var(--br-line);
}
.hero:after{
  content:"";
  position:absolute;
  inset:auto -10% -40% 40%;
  height:420px;
  background:linear-gradient(120deg,rgba(237,28,36,.13),rgba(247,127,0,.08));
  transform:rotate(-8deg);
  border-radius:60px;
}
.hero-grid{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:54px;
  align-items:center;
}
.kicker{
  display:inline-flex;
  gap:8px;
  align-items:center;
  color:var(--br-red);
  font-weight:1000;
  text-transform:uppercase;
  letter-spacing:.16em;
  font-size:.78rem;
}
.hero h1,.page-hero h1{
  margin:.25em 0;
  font-size:clamp(2.5rem,6vw,5.8rem);
  line-height:.92;
  color:var(--br-dark);
  letter-spacing:-.07em;
}
.hero p{
  font-size:1.2rem;
  color:var(--br-muted);
  max-width:650px;
}
.hero-media{
  min-height:420px;
  border-radius:34px;
  background:linear-gradient(135deg,#111827,#374151);
  box-shadow:var(--br-shadow);
  position:relative;
  overflow:hidden;
}
.hero-media:before{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:linear-gradient(135deg,rgba(17,24,39,.14),rgba(237,28,36,.12));
}
.hero-media img,
.hero-image{
  width:100%;
  height:100%;
  min-height:420px;
  object-fit:cover;
  display:block;
}
.hero-media.no-image:after{
  content:"MTB RACING";
  position:absolute;
  right:24px;
  bottom:22px;
  color:#fff;
  font-size:clamp(2.4rem,5vw,5rem);
  font-weight:1000;
  letter-spacing:-.08em;
  opacity:.9;
}

/* Buttons */
.btn,.wp-block-button__link,input[type=submit],button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:999px;
  padding:13px 22px;
  background:var(--br-red);
  color:#fff!important;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 12px 28px rgba(237,28,36,.22);
}
.btn.secondary{
  background:#fff;
  color:var(--br-dark)!important;
  border:1px solid var(--br-line);
  box-shadow:none;
}
.btn-row{display:flex;flex-wrap:wrap;gap:12px;margin-top:28px}

/* Sections */
.section{padding:82px 0}
.section.soft{background:var(--br-soft);border-block:1px solid var(--br-line)}
.section-head{display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:30px}
.section h2{margin:0;color:var(--br-dark);font-size:clamp(2rem,4vw,3.5rem);letter-spacing:-.055em;line-height:1}
.section-lead{color:var(--br-muted);max-width:680px}

.grid{display:grid;gap:24px}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-2{grid-template-columns:repeat(2,1fr)}
.card,.post-card,.result-card{
  background:#fff;
  border:1px solid var(--br-line);
  border-radius:var(--br-radius);
  padding:28px;
  box-shadow:var(--br-shadow);
}
.card h3,.post-card h3,.result-card h3{margin-top:0;color:var(--br-dark);line-height:1.15}
.post-card .meta,.result-meta{color:var(--br-muted);font-size:.92rem;font-weight:700}
.post-card img{border-radius:16px;margin-bottom:18px;aspect-ratio:16/10;object-fit:cover;background:#eef2f7}

.page-hero{
  background:linear-gradient(135deg,#fff,#f8fafc);
  padding:82px 0 64px;
  border-bottom:1px solid var(--br-line);
}
.page-content{padding:70px 0}
.entry-content{max-width:860px}
.entry-content h2,.entry-content h3{color:var(--br-dark);letter-spacing:-.03em}
.entry-content table,.results-table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border:1px solid var(--br-line);
  border-radius:18px;
  overflow:hidden;
  box-shadow:var(--br-shadow);
}
.entry-content th,.entry-content td,.results-table th,.results-table td{
  padding:14px 16px;
  border-bottom:1px solid var(--br-line);
  text-align:left;
}
.entry-content th,.results-table th{background:var(--br-soft);color:var(--br-dark);font-weight:900}
.position{font-weight:1000;color:var(--br-red)}

/* Contact Form 7 */
.wpcf7 form{display:grid;gap:16px}
.wpcf7 label{font-weight:800;color:var(--br-dark)}
.wpcf7 input:not([type=submit]),.wpcf7 textarea,.wpcf7 select{
  width:100%;
  border:1px solid var(--br-line);
  background:#fff;
  border-radius:14px;
  padding:13px 15px;
  color:var(--br-dark);
  font:inherit;
}
.wpcf7 textarea{min-height:150px}
.contact-box{background:var(--br-soft);border:1px solid var(--br-line);border-radius:var(--br-radius);padding:28px}

/* ==========================================
   Partner Logos
   ========================================== */

.entry-content.page-partner{
  max-width:100%;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:40px;
  align-items:center;
}

.entry-content.page-partner p{
  margin:0;
  display:flex;
  align-items:center;
  justify-content:center;
}

.entry-content.page-partner a{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:160px;
  padding:20px;
  background:#fff;
  border:1px solid var(--br-line);
  border-radius:var(--br-radius);
  box-shadow:var(--br-shadow);
  transition:all .25s ease;
}

.entry-content.page-partner a:hover{
  transform:translateY(-4px);
  text-decoration:none;
}

.entry-content.page-partner img{
  width:100%;
  max-width:260px;
  max-height:120px;
  object-fit:contain;
  filter:grayscale(100%);
  opacity:.85;
  transition:all .25s ease;
}

.entry-content.page-partner a:hover img{
  filter:none;
  opacity:1;
}

@media (max-width:768px){
  .entry-content.page-partner{
    grid-template-columns:repeat(2,1fr);
    gap:20px;
  }

  .entry-content.page-partner a{
    min-height:120px;
    padding:15px;
  }

  .entry-content.page-partner img{
    max-height:80px;
  }
}

@media (max-width:520px){
  .entry-content.page-partner{
    grid-template-columns:1fr;
  }
}


/* Footer */
.site-footer{background:#111827;color:#d1d5db;padding:42px 0;margin-top:70px}
.footer-inner{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
.site-footer a{color:#fff}

/* Responsive */
@media (max-width:960px){
  .header-inner{
    min-height:auto;
    align-items:flex-start;
    flex-direction:column;
    gap:16px;
    padding:18px 0;
  }
  .site-branding img,
  .custom-logo{max-height:56px}
  .main-navigation{justify-content:flex-start;width:100%}
  .main-navigation ul{flex-wrap:wrap;gap:12px 18px}
  .hero-grid,.grid-2,.grid-3{grid-template-columns:1fr}
  .hero{padding:72px 0}
  .hero-media{min-height:280px}
  .hero-media img,.hero-image{min-height:280px}
  .section-head{display:block}
}
@media (max-width:520px){
  .container{width:min(100% - 28px,1160px)}
  .site-branding img,.custom-logo{max-height:48px}
  .site-tagline{display:none}
  .hero h1,.page-hero h1{font-size:2.5rem}
}
.news-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:28px;
}

.news-card{
  background:#fff;
  border:1px solid var(--br-line);
  border-radius:24px;
  overflow:hidden;
  box-shadow:var(--br-shadow);
  transition:transform .2s ease, box-shadow .2s ease;
}

.news-card:hover{
  transform:translateY(-4px);
  box-shadow:0 24px 60px rgba(17,24,39,.12);
}

.news-card-image{
  display:block;
  aspect-ratio:16/10;
  background:#eef2f7;
  overflow:hidden;
}

.news-card-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .35s ease;
}

.news-card:hover .news-card-image img{
  transform:scale(1.05);
}

.news-card-body{
  padding:24px;
}

.news-meta{
  color:var(--br-red);
  font-size:.8rem;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  margin-bottom:10px;
}

.news-card h2{
  margin:0 0 12px;
  font-size:1.35rem;
  line-height:1.15;
}

.news-card h2 a{
  color:var(--br-dark);
}

.news-card h2 a:hover{
  color:var(--br-red);
  text-decoration:none;
}

.news-excerpt{
  color:var(--br-muted);
  margin-bottom:18px;
}

.news-link{
  font-weight:900;
  color:var(--br-red);
}

@media (max-width:900px){
  .news-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width:600px){
  .news-grid{
    grid-template-columns:1fr;
  }
}
.footer-links{
    display:flex;
    align-items:center;
    gap:24px;
}

.footer-links a{
    color:#d1d5db;
    font-weight:700;
    transition:.2s;
}

.footer-links a:hover{
    color:#fff;
    text-decoration:none;
}

.instagram-link{
    color:#fff !important;
}

.instagram-link:hover{
    color:#fff !important;
    opacity:.8;
}
.instagram-link{
    display:flex;
    align-items:center;
    justify-content:center;
    width:42px;
    height:42px;
    border-radius:50%;
    background:rgba(255,255,255,.08);
    color:#fff;
    transition:.25s;
}

.instagram-link svg{
    width:22px;
    height:22px;
}

.instagram-link:hove
