/*
Theme Name: Tsuruta Seco Kawara
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: 鶴田セコー瓦工業のコーポレートサイトテーマ
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tsuruta
*/

/* Tailwind依存を削除し、完全なカスタムCSSを実装 */

/* ヘッダーのコンテナ幅を狭くし、モバイルの文字サイズを大幅に縮小 */

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  line-height: 1.6;
  color: #333;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

html {
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header Styles */
header {
  background-color: #1e3a8a;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1200px;
}

header .text-2xl {
  font-size: 1.25rem;
  font-weight: bold;
}

header nav {
  display: none;
  gap: 2rem;
  align-items: center;
}

header nav a {
  color: white;
  transition: color 0.3s;
  font-weight: 500;
  font-size: 1rem;
}

header nav a:hover {
  color: #bfdbfe;
  text-decoration: none;
}

header .inline-block {
  background-color: white;
  color: #1e3a8a;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-weight: bold;
  transition: all 0.3s;
}

header .inline-block:hover {
  background-color: #f0f0f0;
}

@media (min-width: 768px) {
  header nav {
    display: flex;
  }

  header .text-2xl {
    font-size: 1.5rem;
  }
}

/* Hero Section */
.hero-section {
  height: 700px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-text-container {
  max-width: 800px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  color: white;
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
  color: white;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-btn {
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
  min-width: 180px;
}

.hero-btn-primary {
  background-color: #1e3a8a;
  color: white;
}

.hero-btn-primary:hover {
  background-color: #1e40af;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.4);
}

.hero-btn-secondary {
  background-color: white;
  color: #1e3a8a;
}

.hero-btn-secondary:hover {
  background-color: #f3f4f6;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.4);
}

/* デスクトップの文字サイズを全体的に縮小して最適化 */
@media (min-width: 768px) {
  .hero-section {
    height: 700px;
  }

  /* デスクトップでのヒーローセクションの文字サイズを縮小 */
  .hero-title {
    font-size: 2.75rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .hero-btn {
    font-size: 1rem;
    padding: 0.875rem 1.75rem;
    min-width: 180px;
  }
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.text-white {
  color: white;
}

section[style*="height: 700px"] {
  height: 500px;
}

section[style*="height: 700px"] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

section[style*="height: 700px"] h1 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

section[style*="height: 700px"] p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

section[style*="height: 700px"] .flex {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

section[style*="height: 700px"] .flex a {
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.3s;
  display: inline-block;
}

section[style*="height: 700px"] .flex a:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  section[style*="height: 700px"] {
    height: 700px;
  }

  section[style*="height: 700px"] h1 {
    font-size: 3.5rem;
  }

  section[style*="height: 700px"] p {
    font-size: 1.25rem;
  }

  section[style*="height: 700px"] .flex a {
    font-size: 1.125rem;
    padding: 1.5rem 2rem;
  }
}

/* Section Styles */
/* セクション見出しと本文のサイズを最適化 */
section h2 {
  font-size: 1.75rem;
  font-weight: bold;
  color: #1e3a8a;
  margin-bottom: 1rem;
  line-height: 1.4;
  text-align: center;
}

section h3 {
  font-size: 1.375rem;
  font-weight: bold;
  color: #1e3a8a;
  margin-bottom: 1rem;
}

section p {
  line-height: 1.75;
  color: #4b5563;
  font-size: 0.95rem;
}

.text-center {
  text-align: center;
}

.mb-12 {
  margin-bottom: 3rem;
}

.mb-16 {
  margin-bottom: 4rem;
}

.py-20 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* Grid Styles */
.grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .grid.md\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid.md\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Service Section */
/* サービスセクションのレイアウトをプレビューと完全に一致させる */
.service-section {
  padding: 5rem 0;
  background-color: white;
}

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

.service-section .text-center h2 {
  font-size: 1.875rem;
  font-weight: bold;
  color: #1e3a8a;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.service-section .text-center p {
  font-size: 1rem;
  color: #4b5563;
  line-height: 1.75;
  max-width: 48rem;
  margin: 0 auto 3rem auto;
}

/* サービスアイテムを2列グリッドレイアウトで表示 */
.service-section > div > div > div {
  display: grid;
  gap: 3rem;
  align-items: center;
  margin-bottom: 5rem;
}

.service-section > div > div > div:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .service-section > div > div > div {
    grid-template-columns: 1fr 1fr;
  }
}

.service-section img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.service-section img:hover {
  transform: scale(1.02);
}

@media (min-width: 768px) {
  .service-section img {
    height: 400px;
  }
}

.service-section h3 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #1e3a8a;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .service-section h3 {
    font-size: 1.875rem;
  }
}

.service-section p {
  font-size: 1rem;
  color: #374151;
  line-height: 1.75;
}

@media (min-width: 768px) {
  .service-section p {
    font-size: 1.125rem;
  }
}

/* モバイルでのサービスセクションの最適化 */
@media (max-width: 767px) {
  body {
    font-size: 14px;
  }

  .container {
    padding: 0 1rem;
  }

  /* ヘッダーの文字サイズをさらに縮小 */
  header .text-2xl {
    font-size: 0.95rem;
  }

  header .inline-block {
    padding: 0.4rem 0.875rem;
    font-size: 0.75rem;
  }

  /* モバイルヒーローセクションのスタイルを完成 */
  .hero-section {
    height: 500px !important;
    padding: 1rem 0 !important;
  }

  .hero-content {
    padding: 0 1rem !important;
  }

  .hero-text-container {
    max-width: 100% !important;
  }

  .hero-title,
  section[style*="height: 700px"] h1 {
    font-size: 1.125rem !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.4 !important;
  }

  .hero-subtitle,
  section[style*="height: 700px"] p {
    font-size: 0.75rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.6 !important;
  }

  .hero-buttons {
    display: flex !important;
    gap: 0.75rem !important;
  }

  /* モバイルでヒーローボタンを横並びに（全幅表示にしない） */
  .hero-btn,
  section[style*="height: 700px"] .flex a {
    padding: 0.5rem 1rem !important;
    font-size: 0.7rem !important;
    min-width: auto !important;
    flex: 0 1 auto !important;
  }

  /* セクション見出しと本文の文字サイズを縮小 */
  section h2 {
    font-size: 1.125rem !important;
    margin-bottom: 0.75rem !important;
  }

  section h3 {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
  }

  section p {
    font-size: 0.8rem !important;
    line-height: 1.6 !important;
  }

  .py-20 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  /* モバイルでサービスセクションを1列にして画像→テキストの順番に統一 */
  .service-section > div > div > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  /* すべてのサービスアイテムで画像を常に先頭に */
  .service-section > div > div > div > div:has(img) {
    order: -1 !important;
  }

  .service-section > div > div > div > div:not(:has(img)) {
    order: 1 !important;
  }

  .service-section h3 {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
  }

  .service-section p {
    font-size: 0.75rem !important;
  }

  /* 実績セクションの文字サイズを縮小 */
  #results .grid.md\:grid-cols-3 > div div:first-child,
  #results .grid.md\:grid-cols-3 > div .text-6xl {
    font-size: 1.875rem !important;
  }

  #results .grid.md\:grid-cols-3 > div p,
  #results .grid.md\:grid-cols-3 > div .text-xl {
    font-size: 0.8rem !important;
  }

  /* 施工の流れの番号とテキストサイズを縮小 */
  #flow .flex-shrink-0,
  #flow div[style*="width: 6rem"],
  #flow div[style*="width: 5.5rem"],
  #flow div[style*="width: 5rem"] {
    width: 3.5rem !important;
    height: 3.5rem !important;
    font-size: 1rem !important;
  }

  #flow .flex-1 h3,
  #flow div[class*="flex-1"] h3 {
    font-size: 0.95rem !important;
    margin-bottom: 0.375rem !important;
  }

  #flow .flex-1 p,
  #flow div[class*="flex-1"] p {
    font-size: 0.75rem !important;
    line-height: 1.5 !important;
  }

  /* 会社情報セクションの文字サイズを縮小 */
  #company .text-center h2 {
    font-size: 1.125rem !important;
  }

  #company div[style*="background-color: #1e3a8a"] p {
    font-size: 1.125rem !important;
  }

  #company ul.space-y-4 li {
    font-size: 0.75rem !important;
    line-height: 1.6 !important;
  }

  /* お問い合わせセクションの文字サイズを縮小 */
  footer h2 {
    font-size: 1.25rem !important;
    margin-bottom: 1.5rem !important;
  }

  footer .grid.md\:grid-cols-2 > div h3 {
    font-size: 0.95rem !important;
  }

  footer .grid.md\:grid-cols-2 > div p {
    font-size: 0.75rem !important;
  }

  footer .grid.md\:grid-cols-2 > div .text-5xl {
    font-size: 1.375rem !important;
  }

  footer form label {
    font-size: 0.75rem !important;
  }

  footer form input,
  footer form select,
  footer form textarea {
    font-size: 0.8rem !important;
    padding: 0.625rem 0.875rem !important;
  }

  footer form button {
    font-size: 0.875rem !important;
    padding: 0.75rem 1.5rem !important;
  }
}

#service {
  padding: 5rem 0;
  background-color: white;
}

#service .text-center {
  text-align: center;
  margin-bottom: 3rem;
}

#service .text-center h2 {
  font-size: 1.875rem;
  font-weight: bold;
  color: #1e3a8a;
  margin-bottom: 1rem;
  line-height: 1.4;
}

#service .text-center p {
  font-size: 1rem;
  color: #4b5563;
  line-height: 1.75;
  max-width: 64rem;
  margin: 0 auto;
}

#service .service-container {
  max-width: 72rem;
  margin: 0 auto;
}

#service .service-item {
  display: grid;
  gap: 3rem;
  align-items: center;
  margin-bottom: 5rem;
}

#service .service-item:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  #service .service-item {
    grid-template-columns: repeat(2, 1fr);
  }
}

#service .service-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

#service .service-image:hover {
  transform: scale(1.02);
}

@media (min-width: 768px) {
  #service .service-image {
    height: 400px;
  }
}

#service .service-content h3 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #1e3a8a;
  margin-bottom: 1rem;
}

#service .service-content p {
  font-size: 1rem;
  color: #4b5563;
  line-height: 1.75;
}

/* Service 2 - 画像とテキストの順序を逆にする */
@media (min-width: 768px) {
  #service .service-item:nth-child(2) .service-image-wrapper {
    order: 2;
  }

  #service .service-item:nth-child(2) .service-content {
    order: 1;
  }
}

/* Results Section */
/* 実績カードのスタイルを明確に定義して文字が確実に表示されるようにする */
#results {
  background-color: #f4f6f9;
}

#results .grid.md\:grid-cols-3 > div {
  background-color: #1e3a8a !important;
  color: white !important;
  padding: 3rem !important;
  text-align: center !important;
  border-radius: 0.5rem !important;
  min-height: 200px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

#results .grid.md\:grid-cols-3 > div div {
  color: white !important;
}

/* 実績セクションの数値サイズを縮小 */
#results .grid.md\:grid-cols-3 > div div:first-child,
#results .grid.md\:grid-cols-3 > div .text-6xl {
  font-size: 2.75rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.75rem !important;
  color: white !important;
  line-height: 1 !important;
  display: block !important;
}

#results .grid.md\:grid-cols-3 > div p,
#results .grid.md\:grid-cols-3 > div .text-xl {
  font-size: 1rem !important;
  color: white !important;
  line-height: 1.5 !important;
  display: block !important;
  margin: 0 !important;
}

#results img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  #results img {
    height: 18rem;
  }
}

/* Flow Section */
#flow .space-y-12 {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

#flow .space-y-12 > div {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-direction: column;
}

@media (min-width: 768px) {
  #flow .space-y-12 > div {
    flex-direction: row;
  }
}

/* 施工の流れの番号とテキストサイズを調整 */
#flow .flex-shrink-0,
#flow div[style*="width: 6rem"] {
  flex-shrink: 0 !important;
  width: 5.5rem !important;
  height: 5.5rem !important;
  background-color: #1e3a8a !important;
  color: white !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.3) !important;
}

#flow .flex-1 h3,
#flow div[class*="flex-1"] h3 {
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.5rem !important;
  color: #333333 !important;
  display: block !important;
}

#flow .flex-1 p,
#flow div[class*="flex-1"] p {
  font-size: 0.95rem !important;
  line-height: 1.7 !important;
  color: #4b5563 !important;
  display: block !important;
}

/* Company Section */
/* 会社情報セクションのスタイルをプレビューと完全に一致させる */
#company {
  background-color: #f4f6f9;
}

/* 会社情報セクションの見出しサイズを縮小 */
#company .text-center h2 {
  font-size: 1.75rem !important;
  font-weight: bold !important;
  color: #1e3a8a !important;
  margin-bottom: 1rem !important;
  line-height: 1.4 !important;
  text-align: center !important;
}

@media (min-width: 768px) {
  #company .text-center h2 {
    font-size: 2rem !important;
  }
}

#company .bg-white.p-8 {
  background-color: white !important;
  padding: 2rem !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

#company ul.space-y-4 {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#company ul.space-y-4 li {
  display: flex !important;
  gap: 1rem !important;
  margin-bottom: 1.25rem !important;
  font-size: 1rem !important;
  line-height: 1.8 !important;
  color: #4b5563 !important;
}

#company ul.space-y-4 li:last-child {
  margin-bottom: 0 !important;
}

#company ul.space-y-4 li span {
  color: #4b5563 !important;
}

#company ul.space-y-4 li span:first-child {
  color: #1e3a8a !important;
  font-weight: 700 !important;
  flex-shrink: 0 !important;
}

/* ミッションステートメントのスタイルを明確に設定 */
/* ミッションステートメントの文字サイズを縮小 */
#company div[style*="background-color: #1e3a8a"] {
  background-color: #1e3a8a !important;
  color: white !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#company div[style*="background-color: #1e3a8a"] p {
  color: white !important;
  font-size: 1.375rem !important;
  font-weight: 700 !important;
  line-height: 1.6 !important;
  text-align: center !important;
}

@media (min-width: 768px) {
  #company div[style*="background-color: #1e3a8a"] p {
    font-size: 1.5rem !important;
  }
}

footer {
  background-color: #1e3a8a;
  color: white;
  padding: 5rem 0;
}

/* フッターとお問い合わせセクションの文字サイズを最適化 */
footer h2 {
  color: white;
  font-size: 1.75rem;
  font-weight: bold;
  margin-bottom: 2rem;
  text-align: center;
}

footer h3 {
  color: white;
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

footer .grid > div {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 0.5rem;
  text-align: center;
}

footer .text-5xl {
  font-size: 3rem;
  font-weight: bold;
  margin: 1.5rem 0;
}

/* Contact Form Styles */
/* お問い合わせセクションのカードとフォームの文字サイズを最適化 */
footer .grid.md\:grid-cols-2 > div {
  background-color: rgba(255, 255, 255, 0.1) !important;
  padding: 1.5rem !important;
  border-radius: 0.5rem !important;
  text-align: center !important;
  min-height: 160px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
}

footer .grid.md\:grid-cols-2 > div h3 {
  color: white !important;
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.75rem !important;
  line-height: 1.3 !important;
}

footer .grid.md\:grid-cols-2 > div p {
  color: #bfdbfe !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
  margin-bottom: 0.5rem !important;
}

footer .grid.md\:grid-cols-2 > div p:last-child {
  margin-bottom: 0 !important;
}

footer .grid.md\:grid-cols-2 > div .text-5xl {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  margin: 0.75rem 0 !important;
  color: white !important;
  line-height: 1 !important;
}

footer .bg-white {
  background-color: white;
  padding: 2rem;
  border-radius: 0.75rem;
}

footer form {
  display: grid;
  gap: 1.5rem;
}

footer form label {
  font-size: 0.875rem;
  font-weight: bold;
  color: #374151;
  margin-bottom: 0.5rem;
}

footer form input,
footer form select,
footer form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  color: #111827;
}

footer form button {
  background-color: #1e3a8a;
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  font-weight: bold;
  font-size: 0.95rem;
  transition: all 0.3s;
}

footer form button:hover {
  background-color: #1e40af;
  transform: translateY(-2px);
}
