/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 *= require_tree .
 *= require_self
 */

/* Custom Font Definition */
@font-face {
  font-family: 'SmartFontUI';
  src: url("/fonts/03SmartFontUI.ttf") format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'SmartFontUI', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: #f9fafb;
}

/* 管理者画面ではデフォルトフォントを使用 */
body.admin-body,
body.admin-body * {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #2563eb;
  color: white;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.25rem;
  margin-right: 0.5rem;
}

.badge-required {
  background-color: #dc2626;
  color: white;
}

.badge-optional {
  background-color: #2563eb;
  color: white;
}

.label-english {
  margin-left: 0.5rem;
  font-size: 0.875rem;
  color: #0891b2;
  font-weight: normal;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 1rem;
}

.form-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.name-inputs {
  display: flex;
  gap: 0.75rem;
}

.name-inputs input {
  flex: 1;
}

/* Card Styles */
.card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

/* Header Styles */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2563eb;
  text-decoration: none;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: #374151;
  font-weight: 500;
}

nav a:hover {
  color: #2563eb;
}

/* Footer Styles */
footer {
  background: #374151;
  color: white;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

/* Banner Carousel Styles */
.banner-carousel {
  position: relative;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.banner-slide.active {
  opacity: 1;
  position: relative;
}

.banner-layout {
  max-width: 650px;
  margin: 0 auto;
}

/* PC版バナーアイテム: 300×250px */
.banner-item-pc {
  width: 300px;
  height: 250px;
  flex-shrink: 0;
}

/* PC版バナー: 640px以上で表示 */
.banner-pc-layout {
  display: none;
}

@media (min-width: 640px) {
  .banner-pc-layout {
    display: block;
  }
}

/* スマホ版バナー: 640px未満で表示、画面横幅いっぱい */
.banner-mobile-layout {
  display: block;
  position: relative;
  margin-left: calc(-100vw / 2 + 50%);
  margin-right: calc(-100vw / 2 + 50%);
  width: 100vw;
}

@media (min-width: 640px) {
  .banner-mobile-layout {
    display: none;
  }
}

/* スマホ版バナー: 画面横幅いっぱいに表示 */
.banner-carousel-mobile {
  position: relative;
  margin-left: calc(-100vw / 2 + 50%);
  margin-right: calc(-100vw / 2 + 50%);
  width: 100vw;
}

/* タブレット・PC向け: バナーカルーセルのスタイル調整 */
@media (min-width: 1024px) {
  .banner-carousel-mobile {
    margin-left: 0;
    margin-right: 0;
    width: auto;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .name-inputs {
    flex-direction: column;
    gap: 1rem;
  }
  
  .container {
    padding: 0 0.5rem;
  }

  .banner-layout .flex-col.lg\\:flex-row {
    flex-direction: column !important;
    align-items: center;
    gap: 1rem;
  }

  /* モバイルでは各バナーを中央配置 */
  .banner-layout .flex-shrink-0 {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}


