/* Shared styles for beef pages - Optimized with inline fonts */
:root {
  --primary-color: #0a2540;
  --secondary-color: #00a3e0;
  --accent-color: #635bff;
  --light-color: #f8fafc;
  --dark-color: #0f172a;
  --gray-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --kabira-red: #d63384;
  --kabira-gold: #ffc107;
  --wagyu-red: #d63384;
  --wagyu-gold: #ffc107;
}

/* Font loading now handled by Google Fonts CSS API to avoid CORS issues */
/* @import will be loaded via JavaScript to prevent render blocking */

/* Progressive enhancement font loading strategy */
body, * {
  font-family: 
    'Hiragino Sans',
    'Hiragino Kaku Gothic ProN', 
    'Yu Gothic',
    'Meiryo',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Roboto',
    'Helvetica Neue',
    'Arial',
    sans-serif !important;
}

.fonts-loaded body,
.fonts-loaded * {
  font-family: 
    'Noto Sans JP',
    'Hiragino Sans',
    'Hiragino Kaku Gothic ProN', 
    'Yu Gothic',
    'Meiryo',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Roboto',
    'Helvetica Neue',
    'Arial',
    sans-serif !important;
}

/* Critical Bootstrap CSS - Only used classes for these pages */
.container{max-width:1320px;margin:0 auto;padding:0 15px;contain:layout style}
.row{display:flex;flex-wrap:wrap;margin:0 -15px}
.col-12,.col-lg-8{position:relative;width:100%;padding:0 15px}
@media (min-width:992px){.col-lg-8{flex:0 0 66.666667%}}
.d-flex{display:flex!important}
.align-items-center{align-items:center!important}
.text-center{text-align:center!important}
.text-muted{color:#4a5568!important}
.text-white{color:#fff!important}
.text-success{color:#198754!important}
.text-primary{color:#0d6efd!important}
.text-warning{color:#ffc107!important}
.text-danger{color:#dc3545!important}
.mb-0{margin-bottom:0!important}
.mb-3{margin-bottom:1rem!important}
.mb-4{margin-bottom:1.5rem!important}
.me-2{margin-right:0.5rem!important}
.mt-2{margin-top:0.5rem!important}
.mt-5{margin-top:3rem!important}
.p-4{padding:1.5rem!important}
.h3{font-size:1.75rem;font-weight:500}
.lead{font-size:1.25rem;font-weight:300}
.navbar{position:fixed;top:0;left:0;right:0;z-index:1030;padding:0.5rem 0;background-color:#fff!important;box-shadow:0 2px 4px rgba(0,0,0,0.1)}
.navbar-brand{font-size:1.25rem;font-weight:600;color:#0a2540;text-decoration:none;display:flex;align-items:center}
.breadcrumb{display:flex;flex-wrap:wrap;padding:0.75rem 0;margin-bottom:1rem;list-style:none;background-color:transparent;contain:layout style;min-height:2rem}
.breadcrumb-item{color:#4a5568}
.breadcrumb-item + .breadcrumb-item::before{content:">";padding:0 0.5rem;color:#4a5568}
.breadcrumb-item.active{color:#0a2540}
.bg-light{background-color:#f8fafc!important}
.rounded-3{border-radius:0.375rem!important}
.text-decoration-none{text-decoration:none!important}
.d-block{display:block!important}
.img-fluid{max-width:100%;height:auto}
.alert{position:relative;padding:0.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:0.375rem}
.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}
.alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeaa7}
.card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,0.125);border-radius:0.375rem}
.card-body{flex:1 1 auto;padding:1rem}
.btn{display:inline-block;font-weight:400;line-height:1.5;color:#212529;text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;user-select:none;background-color:transparent;border:1px solid transparent;padding:0.375rem 0.75rem;font-size:1rem;border-radius:0.375rem;transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out}
.btn-primary{color:#fff;background-color:#0d6efd;border-color:#0d6efd}
.btn-primary:hover{color:#fff;background-color:#0b5ed7;border-color:#0a58ca}
.btn-outline-secondary{color:#6c757d;border-color:#6c757d}
.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}
.btn-outline-primary{color:#0d6efd;border-color:#0d6efd}
.btn-outline-primary:hover{color:#fff;background-color:#0d6efd;border-color:#0d6efd}
.btn-lg{padding:0.5rem 1rem;font-size:1.25rem;border-radius:0.5rem}

/* Lightweight icon system - using emoji fallbacks instead of FontAwesome fonts */
.fas{font-family:sans-serif;font-weight:normal;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1;display:inline-block}
.fas.fa-home::before{content:"🏠"}
.fas.fa-thermometer-half::before{content:"🌡️"}
.fas.fa-clock::before{content:"⏰"}
.fas.fa-exclamation-triangle::before{content:"⚠️"}
.fas.fa-utensils::before{content:"🍴"}
.fas.fa-info-circle::before{content:"ℹ️"}
.fas.fa-times::before{content:"❌"}
.fas.fa-shopping-cart::before{content:"🛒"}
.fas.fa-arrow-left::before{content:"←"}
.fas.fa-certificate::before{content:"📜"}
.fas.fa-award::before{content:"🏆"}
.fas.fa-expand::before{content:"🔍"}
.fas.fa-download::before{content:"💾"}
.fas.fa-check::before{content:"✅"}
.fas.fa-eye::before{content:"👁️"}
.fas.fa-fingerprint::before{content:"👤"}
.fas.fa-barcode::before{content:"📊"}
.fas.fa-id-card::before{content:"🪪"}
.fas.fa-calendar-alt::before{content:"📅"}
.fas.fa-dna::before{content:"🧬"}
.fas.fa-medal::before{content:"🏅"}
.fas.fa-shield-alt::before{content:"🛡️"}
.fas.fa-image::before{content:"🖼️"}

/* Enhanced body styles with optimized font loading */
body{
  contain: layout style;
  color: var(--dark-color);
  background-color: var(--light-color);
  overflow-x: hidden;
  line-height: 1.7;
  font-feature-settings: "kern";
  text-rendering: optimizeSpeed;
  font-stretch: 100%;
  will-change: scroll-position;
  transform: translateZ(0);
}

/* Prevent layout shifts from navigation and headings */
.navbar {
  min-height: 80px;
  contain: layout style;
}

.navbar-brand {
  min-height: 40px;
  contain: layout style;
}

.section-title {
  contain: layout style;
  height: auto;
  min-height: 1.2em;
}

.ms-auto {
  contain: layout style;
}

/* Lazy loading optimization with GPU acceleration */
.lazy-load{opacity:0;transition:opacity 0.3s;transform:translateZ(0)}
.lazy-load.loaded{opacity:1}

/* Image optimization with GPU acceleration */
img{max-width:100%;height:auto;display:block;transform:translateZ(0)}

/* Critical rendering optimizations */
.navbar,.breadcrumb{transform:translateZ(0)}

/* Minimize paint operations */
*{box-sizing:border-box}

/* Optimize text rendering */
h1,h2,h3,h4,h5,h6,.lead{text-rendering:optimizeSpeed}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.3;
}

/* Explicit font-size for H1 to avoid deprecation warning */
h1 {
  font-size: 2.5rem;
}

/* Responsive H1 font sizes */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
}

/* Specific styling for display-4 heading */
.display-4 {
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1.2;
}

.section-title {
  position: relative;
  margin-bottom: 3rem;
  font-weight: 700;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -15px;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
  border-radius: 2px;
}

.navbar {
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
}

.hero-section {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(10, 37, 64, 0.9), rgba(214, 51, 132, 0.8));
  color: white;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><pattern id="grain" patternUnits="userSpaceOnUse" width="100" height="20"><circle cx="25" cy="10" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="5" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="20" fill="url(%23grain)"/></svg>');
}

.explanation-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-left: 5px solid var(--accent-color);
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 200px;
}

.explanation-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 20px -3px rgba(0, 0, 0, 0.15);
}

.explanation-card .d-flex {
  display: flex !important;
  align-items: flex-start;
  height: 100%;
}

.explanation-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0;
  margin-right: 1rem;
  flex-shrink: 0;
}

.explanation-card .flex-grow-1 {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.explanation-card h3 {
  margin-bottom: 1rem;
  line-height: 1.3;
}

.explanation-card p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.explanation-card p:last-child {
  margin-bottom: 0;
}

.back-to-home {
  background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
  border: none;
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.back-to-home:hover {
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1);
}

.breadcrumb {
  background: transparent;
  padding: 0.125rem 0;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.breadcrumb-item+.breadcrumb-item::before {
  content: ">";
  color: var(--gray-color);
}

@media (max-width: 768px) {
  .explanation-card {
    padding: 1.5rem;
    min-height: auto;
  }

  .explanation-card .d-flex {
    flex-direction: column;
    text-align: center;
  }

  .explanation-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    margin-right: 0;
    margin-bottom: 1rem;
    align-self: center;
  }

  .explanation-card .flex-grow-1 {
    align-items: center;
    text-align: center;
  }

  .hero-section {
    min-height: 50vh;
    text-align: center;
    padding: 2rem 0;
  }
}

@media (max-width: 576px) {
  .explanation-card {
    padding: 1rem;
  }

  .explanation-card h3 {
    font-size: 1.1rem;
  }

  .explanation-card p {
    font-size: 0.95rem;
  }

  .hero-section h1.display-4 {
    font-size: 2rem;
  }
}

/* Main content area */
main {
  padding-top: 60px;
}