/*
Theme Name: ORIN
Description: 就労継続支援B型事業所「ORIN」のオリジナルテーマ。ポップでクリエイティブなデザイン。
Author: Antigravity
Version: 1.0.0
*/

:root {
  --color-primary: #FF6B00; /* オレンジ */
  --color-primary-light: #FF8E3D;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F8F9FA;
  --color-text: #333333;
  --color-text-muted: #666666;
  --font-base: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 8px;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 15px rgba(255, 107, 0, 0.15);
  --shadow-hover: 0 12px 25px rgba(255, 107, 0, 0.25);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

ul {
  list-style: none;
}

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

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background-color: var(--color-primary);
  border-radius: 2px;
}

/* Layout */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-text);
}

.logo-svg {
  width: 40px;
  height: 40px;
}

.main-nav {
  display: flex;
}

.nav-list {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-weight: bold;
}

.nav-link:hover {
  color: var(--color-primary);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger-line {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--color-text);
  transition: var(--transition);
  border-radius: 3px;
}

/* Hero Section */
.hero {
  padding-top: 120px;
  padding-bottom: 5rem;
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  right: -10%;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle, var(--color-primary-light) 0%, rgba(255,255,255,0) 70%);
  opacity: 0.1;
  z-index: -1;
  border-radius: 50%;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-text {
  flex: 1;
}

.hero-title {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(45deg, var(--color-primary), #FF3B00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--color-text-muted);
}

.hero-image-wrap {
  flex: 1;
  position: relative;
}

.hero-image {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transform: rotate(3deg);
  transition: var(--transition);
}

.hero-image:hover {
  transform: rotate(0deg) scale(1.02);
}

/* Features/Services on Front Page */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: #fff;
  border-radius: var(--border-radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
  border: 2px solid transparent;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-primary-light);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.card-icon--photo {
  font-size: unset;
  width: clamp(10.5rem, 22vw, 15.5rem);
  height: clamp(10.5rem, 22vw, 15.5rem);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 3px solid rgba(255, 107, 0, 0.2);
}

.card-icon--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.gallery-item img {
  transition: var(--transition);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Footer */
.site-footer {
  background-color: var(--color-text);
  color: #fff;
  padding: 3rem 0 1.5rem;
  text-align: center;
}

.footer-nav {
  margin-bottom: 2rem;
}

.footer-nav-list {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav-link:hover {
  color: var(--color-primary);
}

.copy {
  color: #aaa;
  font-size: 0.9rem;
}

/* Page Header (Subpages) */
.page-header {
  padding: 150px 0 50px;
  position: relative;
  isolation: isolate;
  background-color: var(--color-bg-alt);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-align: center;
  margin-bottom: 3rem;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.78);
  z-index: -1;
}

.page-header--services {
  background-image: url('https://images.unsplash.com/photo-1498050108023-c5249f4df085?auto=format&fit=crop&w=1600&q=80');
}

.page-header--message {
  background-image: url('assets/images/message.png');
}

.page-header--company {
  background-image: url('https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=1600&q=80');
}

.page-header--access {
  background-image: url('https://images.unsplash.com/photo-1524661135-423995f22d0b?auto=format&fit=crop&w=1600&q=80');
}

.page-header--contact {
  background-image: url('https://images.unsplash.com/photo-1556740738-b6a63e27c4df?auto=format&fit=crop&w=1600&q=80');
}

.page-header .container {
  position: relative;
  z-index: 1;
}

.page-title {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin: -0.75rem 0 0;
  text-align: center;
}

/* Content Area */
.content-area {
  margin-bottom: 5rem;
}

/* Company Table */
.company-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  background: #fff;
  box-shadow: var(--shadow-sm);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.company-table th, .company-table td {
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.company-table th {
  background-color: var(--color-bg-alt);
  width: 30%;
  font-weight: bold;
}

.company-table tr:last-child th, .company-table tr:last-child td {
  border-bottom: none;
}

/* Message Section */
.message-wrap {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.message-image {
  flex: 1;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.message-text {
  flex: 2;
}

/* Access / Map */
.map-wrap {
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-top: 2rem;
}

.map-wrap iframe {
  width: 100%;
  height: 450px;
  border: none;
  display: block;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  padding: 3rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-label .required {
  color: #ff0000;
  font-size: 0.8em;
  margin-left: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2);
}

.form-error {
  color: #ff0000;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
}

/* Contact Form 7（テーマのフォーム見た目に近づける） */
.contact-form .wpcf7 {
  margin: 0;
}

.contact-form .wpcf7-form {
  margin: 0;
}

.contact-form .wpcf7-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form .wpcf7-form .form-group:last-of-type {
  margin-bottom: 0;
}

.contact-form .wpcf7-form-control:not(.wpcf7-submit) {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.contact-form .wpcf7-form-control:not(.wpcf7-submit):focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2);
}

.contact-form .wpcf7-not-valid-tip {
  color: #ff0000;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: block;
}

.contact-form .wpcf7-response-output {
  margin: 1.5rem 0 0;
  padding: 1rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.95rem;
}

.contact-form .wpcf7-mail-sent-ok {
  border: 1px solid #398f14;
  background: #f0f8ec;
}

.contact-form .wpcf7-validation-errors,
.contact-form .wpcf7-mail-sent-ng {
  border: 1px solid #c00;
  background: #fff5f5;
}

.contact-form .wpcf7-spinner {
  margin-left: 0.75rem;
  vertical-align: middle;
}

.contact-form .wpcf7-submit {
  display: inline-block;
  width: 100%;
  max-width: 300px;
  margin-top: 0.5rem;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  background-color: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.contact-form .wpcf7-submit:hover {
  transform: translateY(-3px);
}

.contact-form .submit-wrap {
  text-align: center;
  margin-top: 2rem;
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-title.fade-up {
  transform: translateX(-50%) translateY(30px);
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title.fade-up.is-visible {
  transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    align-items: flex-start;
    padding-top: max(9.5rem, 120px + env(safe-area-inset-top, 0px));
  }

  .hero-text {
    padding-top: 0.75rem;
  }

  .hero-content, .message-wrap {
    flex-direction: column;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    padding: 80px 2rem 2rem;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
  }
  
  .main-nav.is-active {
    right: 0;
  }
  
  .nav-list {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .hamburger {
    display: block;
  }
  
  .hamburger.is-active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  .hamburger.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .company-table th, .company-table td {
    display: block;
    width: 100%;
  }
  .company-table th {
    border-bottom: none;
  }
}
