/*
 * Contact Page Styles
 * くるま買取ケイヴィレッジ
 * お問い合わせページ専用スタイル
 */

/* ========================================
   Page Hero Section
   ======================================== */

.contact-hero.page-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #ffffff;
  overflow: hidden;
}

.contact-hero.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  opacity: 0.6;
}

.contact-hero .page-hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: clamp(4rem, 8vw, 6rem) var(--l-padding-side);
}

.contact-hero .page-hero__content h1 {
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.contact-hero .page-hero__content p {
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .contact-hero.page-hero {
    min-height: 70vh;
  }
}

/* ========================================
   Section Content Base
   ======================================== */

.section-content {
  padding: var(--l-section-margin-vertical) 0;
  position: relative;
}

.section-content.bg-white {
  background-color: var(--color-bg-white);
  color: var(--color-text-primary);
}

.section-content__inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 6%;
}

@media (min-width: 768px) {
  .section-content__inner {
    flex-direction: row;
    gap: clamp(3rem, 8vw, 7.375rem);
  }
}

.section-label {
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .section-label {
    width: clamp(200px, 25%, 330px);
  }
}

.l-content-full {
  width: 100%;
}

/* ========================================
   Contact Section
   ======================================== */

.contact-section .contact-intro {
  margin-bottom: 3rem;
  text-align: center;
}

.contact-section .contact-intro p {
  line-height: 1.8;
  color: var(--color-text-primary);  
  margin-bottom: 2rem;
}

.contact-section .contact-phone {
  background: linear-gradient(135deg, var(--color-primary), #005a8a);  /* プライマリカラーのグラデーション */
  color: #ffffff;
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
}

.contact-section .contact-phone__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.contact-section .contact-phone__link:hover {
  opacity: 0.8;
}

.contact-section .contact-phone__number {
  font-size: 1.5rem;
  font-weight: 700;
}

.contact-section .contact-phone__note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #ffffff !important;
  font-weight: var(--font-weight-medium);
}

/* ========================================
   Contact Form
   ======================================== */

.contact-form {
  max-width: 700px;
  margin: 3rem auto 0;
}

/* アラート */
.alert {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert i {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.alert__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.alert__message {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.alert--success {
  background: linear-gradient(135deg, rgba(34, 181, 115, 0.1), rgba(26, 138, 90, 0.05));
  border: 1px solid rgba(34, 181, 115, 0.3);
  color: #22b5b9;
}

.alert--success i {
  color: #22b573;
}

.alert--error {
  background: linear-gradient(135deg, rgba(224, 0, 18, 0.1), rgba(180, 0, 14, 0.05));
  border: 1px solid rgba(224, 0, 18, 0.3);
  color: #b4000e;
}

.alert--error i {
  color: #e00012;
}

/* フォームグループ */
.form__group {
  margin-bottom: 2rem;
}

/* 2カラムレイアウト（姓名） */
.form__group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.form__group-row .form__group {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .form__group-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.form__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
}

.form__label i {
  font-size: 1rem;
  color: var(--color-text-secondary);
}

.form__required {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: linear-gradient(135deg, #e00012, #b4000e);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 4px;
  margin-left: 0.5rem;
}

.form__optional {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: #e5e5e5;
  color: var(--color-text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 4px;
  margin-left: 0.5rem;
}

.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-body-ja);
  color: var(--color-text-primary);
  background: var(--color-bg-white);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 113, 185, 0.1);
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--color-text-light);
}

.form__input.is-invalid,
.form__select.is-invalid,
.form__textarea.is-invalid {
  border-color: #e00012;
  background: rgba(224, 0, 18, 0.02);
}

.form__input.is-invalid:focus,
.form__select.is-invalid:focus,
.form__textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(224, 0, 18, 0.1);
}

.form__select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23333' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 3rem;
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form__error {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: #e00012;
  font-weight: 500;
}

/* チェックボックス */
.form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.form__checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 0.125rem;
  cursor: pointer;
  accent-color: var(--color-primary);
  appearance: auto;
  -webkit-appearance: checkbox;
  -moz-appearance: checkbox;
}

.form__checkbox label {
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-primary);  
  cursor: pointer;
}

.form__checkbox label a {
  color: #0071b9;
  text-decoration: underline;
  transition: opacity 0.3s ease;
}

.form__checkbox label a:hover {
  opacity: 0.7;
}

/* 送信ボタン */
.form__submit {
  margin-top: 3rem;
  text-align: center;
}

.form__submit .btn {
  min-width: 250px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form__submit .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.form__submit .btn:disabled:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ユーティリティ */
.text-center {
  text-align: center;
}

.mt-lg {
  margin-top: 3rem;
}

@media (max-width: 767px) {
  .contact-form {
    margin-top: 2rem;
  }

  .form__group {
    margin-bottom: 1.5rem;
  }

  .form__label {
    font-size: 0.875rem;
  }

  .form__input,
  .form__select,
  .form__textarea {
    font-size: 1rem; /* モバイルでズームしないように16px以上 */
  }

  .form__submit {
    margin-top: 2rem;
  }

  .form__submit .btn {
    width: 100%;
    min-width: auto;
  }

  .alert {
    padding: 1rem;
    gap: 0.75rem;
  }

  .alert i {
    font-size: 1.25rem;
  }

  .alert__title {
    font-size: 1rem;
  }
}

/* ========================================
   Typography Overrides
   ======================================== */

.contact-hero .t-headline-l-en,
.contact-hero .t-combined-400_500-12-14 {
  color: #ffffff;
}

.section-content h2,
.section-content h3 {
  color: var(--color-primary);
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 767px) {
  .section-content {
    padding: clamp(3rem, 8vw, 4rem) 0;
  }

  .contact-section .contact-phone__number {
    font-size: 1.25rem;
  }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
  .contact-hero.page-hero {
    min-height: auto;
    background: var(--color-bg-white);
    color: var(--color-text-primary);
  }

  .contact-hero.page-hero::before {
    display: none;
  }

  .contact-phone {
    background: #f5f5f5;
    color: var(--color-text-primary);
  }

  .contact-form {
    display: none;
  }
}
