/**
 * Cloud Surfing Block Theme — Custom Styles
 * theme.json で表現しきれないスタイルをここに記述
 */

/* ===== HEADER ===== */
.site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  width: 100%;
  backdrop-filter: blur(16px);
  background: rgba(255,255,255,0.95) !important;
  border-bottom: 1px solid rgba(226,232,240,0.6);
  transition: box-shadow 0.3s;
  z-index: 1000;
}
.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(10,22,40,0.08);
}
.btn-contact-header .wp-block-navigation-item__content {
  display: inline-flex;
  align-items: center;
  padding: 10px 28px;
  background: linear-gradient(135deg, #0a1628 0%, #0f2440 100%);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50px;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(10,22,40,0.2);
}
.btn-contact-header .wp-block-navigation-item__content:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(10,22,40,0.3);
}

/* ===== HERO ===== */
.hero-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(170deg, #0a1628 0%, #0f2440 40%, #164b78 100%) !important;
  margin-top: 0;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 70px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 70' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,35 C180,70 360,0 540,35 C720,70 900,0 1080,35 C1260,70 1440,18 1440,18 L1440,70 L0,70 Z' fill='%23ffffff'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  z-index: 1;
}
.hero-label {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  padding: 12px 32px;
  margin-left: auto;
  margin-right: auto;
  border: 2px solid rgba(59,164,224,0.4);
  border-radius: 50px;
  background: rgba(59,164,224,0.1) !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  color: #ffffff !important;
}
.hero-heading {
  color: #ffffff !important;
  margin-bottom: 0 !important;
}
.hero-heading-highlight {
  background: linear-gradient(135deg, #3ba4e0 0%, #60d5fa 40%, #e8f4fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  color: #94a3b8 !important;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== WAVE DIVIDERS ===== */
.wave-divider {
  overflow: hidden;
  line-height: 0;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 40px 32px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #0a8ff0, #3ba4e0);
  opacity: 0;
  transition: opacity 0.4s;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(10,143,240,0.1);
  border-color: transparent;
}
.service-card:hover::before {
  opacity: 1;
}
.service-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #e8f4fd 0%, #d0ecfb 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== SLIDESHOW ===== */
.slideshow-container {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.slideshow-container .wp-block-image {
  position: absolute;
  inset: 0;
  margin: 0;
}
.slideshow-container .wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
              transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.04);
}
.slideshow-container .wp-block-image.active img,
.slideshow-container .slideshow-img.active img {
  opacity: 1;
  transform: scale(1);
}
.slideshow-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.slideshow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: all 0.4s;
  padding: 0;
}
.slideshow-dot.active {
  background: #ffffff;
  width: 24px;
  border-radius: 4px;
}

/* ===== PHILOSOPHY ===== */
.section-philosophy {
  position: relative;
  overflow: hidden;
}
.philosophy-emphasis {
  line-height: 1.8;
}
.wave-name {
  display: inline-block;
  transition: opacity 0.4s, transform 0.4s;
}
.wave-name.switching {
  opacity: 0;
  transform: translateY(8px);
}

/* ===== NEWS ITEMS ===== */
.news-query .wp-block-post {
  margin-bottom: 14px;
}
.news-item {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  position: relative;
}
.news-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(180deg, #0a8ff0, #3ba4e0);
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 14px 0 0 14px;
}
.news-item:hover {
  transform: translateX(8px);
  box-shadow: 0 6px 28px rgba(10,143,240,0.1);
}
.news-item:hover::before {
  opacity: 1;
}

/* ===== COMPANY TABLE ===== */
.company-table table {
  border-collapse: collapse;
  width: 100%;
}
.company-table table,
.company-table table tbody,
.company-table table tr,
.company-table table td {
  background: transparent !important;
  border: none !important;
}
.company-table tr {
  border-bottom: 1px solid rgba(59,164,224,0.15) !important;
  transition: background 0.3s;
}
.company-table tr:hover {
  background: rgba(59,164,224,0.05) !important;
}
.company-table td {
  padding: 20px 24px !important;
  font-size: 14px;
  line-height: 1.9;
  color: #cbd5e1;
}
.company-table td:first-child {
  width: 300px;
  white-space: nowrap;
  vertical-align: top;
}

/* ===== CONTACT FORM ===== */
.contact-form-wrapper {
  max-width: 100%;
}
.section-contact .contact-form-wrapper .contact-form,
.post-contact-section .contact-form,
.contact-form {
  background: #ffffff !important;
  border-radius: 24px !important;
  padding: 48px !important;
  box-shadow: 0 8px 40px rgba(10,22,40,0.06);
  border: 1px solid #e2e8f0;
}
.form-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 24px !important;
  margin-bottom: 24px;
}
.form-row .form-group {
  margin-bottom: 0 !important;
}
.form-group {
  margin-bottom: 24px;
}
.form-group:last-of-type {
  margin-bottom: 32px;
}
.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #0a1628;
}
.form-label .icon {
  font-size: 16px;
  color: #94a3b8;
}
.form-label .required {
  font-size: 11px;
  font-weight: 700;
  color: #e86a5a;
  background: #fef2f2;
  padding: 2px 8px;
  border-radius: 4px;
}
.form-input,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  font-size: 14px;
  font-family: 'Noto Sans JP', sans-serif;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
  background: #ffffff !important;
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: #bbb;
}
.form-input:focus,
.form-textarea:focus {
  border-color: #0a8ff0;
  box-shadow: 0 0 0 4px rgba(10,143,240,0.08);
}
.form-textarea {
  min-height: 160px;
  resize: vertical;
}
.btn-submit {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #0a1628 0%, #0f2440 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Sans JP', sans-serif;
  transition: all 0.3s;
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(10,22,40,0.2);
}
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.field-error {
  font-size: 12px;
  color: #dc2626;
  margin-top: 6px;
  display: none;
}
.field-error.show {
  display: block;
}
.form-input.input-error,
.form-textarea.input-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
}
.form-result {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  display: none;
}
.form-result.show-success {
  display: block;
  background: #d1fae5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

/* ===== POST HERO (single.html) ===== */
.post-hero {
  position: relative;
  background: linear-gradient(170deg, #0a1628 0%, #0f2440 40%, #164b78 100%) !important;
}
.post-hero-title {
  color: #ffffff !important;
}

/* ===== ARCHIVE / SEARCH HERO ===== */
.archive-hero {
  background: linear-gradient(170deg, #0a1628 0%, #0f2440 40%, #164b78 100%) !important;
}
.archive-hero-title {
  color: #ffffff !important;
}
.post-category-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 50px;
  background: rgba(59,164,224,0.2);
  color: #3ba4e0;
}
.breadcrumb-bar a {
  color: #64748b;
  transition: color 0.3s;
}
.breadcrumb-bar a:hover {
  color: #0a8ff0;
}

/* ===== POST CONTENT TYPOGRAPHY ===== */
.wp-block-post-content h2 {
  padding-bottom: 12px;
  border-bottom: 3px solid #0a8ff0;
  margin-top: 56px;
}
.wp-block-post-content h3 {
  padding-left: 16px;
  border-left: 4px solid #3ba4e0;
  margin-top: 40px;
}
.wp-block-post-content blockquote {
  background: #f7f9fb;
  border-left: 4px solid #0a8ff0;
  border-radius: 0 12px 12px 0;
  padding: 24px 28px;
  font-style: italic;
}

/* ===== RELATED CARDS ===== */
.related-card {
  transition: all 0.4s;
}
.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(10,143,240,0.1);
  border-color: transparent;
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
}
.fade-up.is-visible {
  animation: fadeUpIn 0.7s ease forwards;
}
@keyframes fadeUpIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #0a1628 0%, #0f2440 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(10,22,40,0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.4s, visibility 0.4s, transform 0.4s, background 0.3s;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: linear-gradient(135deg, #164b78 0%, #0a8ff0 100%);
  transform: translateY(-3px);
}
.back-to-top svg {
  width: 22px;
  height: 22px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .service-card {
    max-width: 500px;
    margin: 0 auto;
  }
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
  .form-row .form-group {
    margin-bottom: 24px !important;
  }
  .company-table td:first-child {
    width: 120px;
  }
}
@media (max-width: 768px) {
  .section-contact .contact-form-wrapper .contact-form,
  .post-contact-section .contact-form,
  .contact-form {
    padding: 32px 24px !important;
  }
  .company-table td {
    display: block;
    width: 100%;
    padding: 8px 16px;
  }
  .company-table td:first-child {
    padding-bottom: 0;
    width: 100%;
  }
}

/* ===== FOOTER GAP FIX ===== */
.site-footer {
  margin-top: 0 !important;
}
/* Remove template-level block gap (white space between sections) */
body > .wp-site-blocks > * + * {
  margin-block-start: 0 !important;
}
body > .wp-site-blocks {
  gap: 0 !important;
}
