/*
Theme Name: Denryu Theme
Theme URI: https://denryu.co.jp
Author: Antigravity
Author URI: https://denryu.co.jp
Description: 株式会社電流 コーポレートサイト用 WordPress テーマ
Version: 1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: denryu
*/

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media screen and (max-width: 880px) {
  html {
    scroll-padding-top: 60px;
  }
}

:root {
  --color-primary: #4169E1;
  --color-primary-dark: #2B49B0;
  --color-text: #2C2C2C;
  /*--color-bg-light: #EEF3FA;*/
  --color-bg-light: #B2D2FF;
  --color-bg-dark: #1A2D5C;
  --color-accent: #FFD54F;
  --color-white: #ffffff;

  --font-base: "Noto Sans JP", sans-serif;
  --font-accent: "Fugaz One", sans-serif;
  --font-bold: "Anton", sans-serif;
}

/* -----------------------------
 * Reset / Base
 * ----------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  line-height: 1.875;
  background-color: var(--color-white);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s;
}

a:hover {
  opacity: 0.7;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* -----------------------------
 * Layout / Utilities
 * ----------------------------- */
.l-inner-lg {
  max-width: 1330px;
  margin: 0 auto;
  padding: 0 20px;
}

.l-inner-md {
  max-width: 1030px;
  margin: 0 auto;
  padding: 0 20px;
}

.l-inner-page {
  max-width: 1310px;
  margin: 0 auto;
  padding: 0 20px;
}

.l-section {
  padding: 100px 0;
}

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

/* -----------------------------
 * Component: Section Header
 * ----------------------------- */
.c-section-header {
  text-align: center;
  margin-bottom: 50px;
}

.c-section-title {
  font-family: var(--font-accent);
  font-size: 40px;
  color: var(--color-primary);
  margin: 0;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.c-section-subtitle {
  font-size: 14px;
  font-weight: bold;
  margin-top: 5px;
  color: var(--color-text);
}

/* -----------------------------
 * Header
 * ----------------------------- */
.l-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: all 0.3s ease;
}

.l-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.l-header__logo {
  margin: 0;
  font-family: var(--font-bold);
  font-size: 28px;
  color: var(--color-primary);
  letter-spacing: 0.05em;
}

.l-header__nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.l-header__nav ul {
  display: flex;
  gap: 30px;
  font-family: var(--font-accent);
  font-size: 16px;
  font-weight: 500;
}

.l-header__contact-btn {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: bold;
  font-family: var(--font-accent);
  box-shadow: 0 4px 10px rgba(42, 99, 164, 0.2);
}

.l-header__contact-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(42, 99, 164, 0.3);
}

.l-header__toggle {
  display: none;
}

/* -----------------------------
 * Main Visual (Hero)
 * ----------------------------- */
.p-hero {
  height: 100vh;
  min-height: 600px;
  background-color: var(--color-bg-light);
  /* ヒーロー背景画像はPHP側でインラインスタイルとして出力 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-start;
  padding-top: 15vh;
  position: relative;
  z-index: 1;
}

.p-hero__inner {
  height: 100%;
  width: 100%;
  text-align: center;
}

.p-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.4);
  z-index: -1;
}

.p-hero h2 {
  font-size: 56px;
  font-family: var(--font-base);
  font-weight: bold;
  margin-bottom: 32px;
  color: var(--color-primary-dark);
  line-height: 1.2;
}

.p-hero p {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-base);
  color: var(--color-primary);
  line-height: 1.6;
}

.p-hero__side-messages {
  position: absolute;
  right: 20px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 10;
}

.p-hero__side-messages span {
  background: var(--color-primary);
  color: #fff;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 16px;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  text-align: center;
}

@media screen and (max-width: 880px) {
  .p-hero__side-messages {
    position: static;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
  }

  .p-hero__side-messages span {
    font-size: 14px;
    padding: 8px 16px;
    width: 240px;
  }
}

/* -----------------------------
 * Utility
 * ----------------------------- */
.u-show-sp {
  display: none !important;
}

@media screen and (max-width: 880px) {
  .u-show-sp {
    display: block !important;
  }

  .u-hide-sp {
    display: none !important;
  }
}

/* -----------------------------
 * Service Section
 * ----------------------------- */
.p-service__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.p-service__card {
  background-color: var(--color-white);
  padding: 50px 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  border-top: 5px solid var(--color-primary);
  transition: transform 0.3s;
}

.p-service__card:hover {
  transform: translateY(-10px);
}

.p-service__card h3 {
  font-size: 22px;
  color: var(--color-primary);
  margin-top: 0;
  margin-bottom: 20px;
  font-family: var(--font-base);
  font-weight: 700;
}

/* -----------------------------
 * Works Section
 * ----------------------------- */
.p-works__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.p-works__item {
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}

.p-works__item:hover {
  transform: translateY(-5px);
}

.p-works__thumb {
  width: 100%;
  height: 220px;
  background-color: var(--color-accent);
}

.p-works__item:nth-child(2) .p-works__thumb {
  background-color: var(--color-bg-light);
}

.p-works__info {
  padding: 24px;
}

.p-works__info time {
  font-size: 13px;
  color: #777;
  font-family: var(--font-accent);
}

.p-works__info h3 {
  font-size: 16px;
  margin: 10px 0 0;
  line-height: 1.6;
  font-weight: 700;
}

/* -----------------------------
 * Footer
 * ----------------------------- */
.l-footer {
  background-color: var(--color-bg-dark);
  color: var(--color-white);
  padding: 80px 0 20px;
}

.l-footer__inner {
  display: flex;
  justify-content: space-between;
  max-width: 1030px;
  margin: 0 auto;
  padding: 0 20px;
  margin-bottom: 50px;
}

.l-footer__info p {
  margin-top: 15px;
  font-size: 14px;
}

.l-footer__nav ul {
  display: flex;
  gap: 30px;
  font-family: var(--font-accent);
}

.l-footer__copy {
  text-align: center;
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  font-family: var(--font-accent);
  color: #aaa;
}

/* -----------------------------
 * Animations Utilities
 * ----------------------------- */
.js-fadeUp {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.js-fadeUp.is-inview {
  opacity: 1;
  transform: translateY(0);
}

/* -----------------------------
 * Major Manufacturers
 * ----------------------------- */
.p-maker__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.p-maker__card {
  background: #fff;
  border: 1px solid #eee;
  padding: 24px;
  border-radius: 8px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
}

.p-maker__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
  border-color: var(--color-primary-light, #eee);
}

.p-maker__card img {
  max-height: 48px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

.p-maker__card span {
  font-weight: 700;
  color: var(--color-text);
}

/* -----------------------------
 * President Message
 * ----------------------------- */
.p-message__card {
  background: var(--color-bg-light);
  padding: 50px;
  border-radius: 12px;
  line-height: 2;
  display: flex;
  gap: 50px;
  align-items: flex-start;
}

.p-message__image {
  flex: 0 0 280px;
}

.p-message__image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.p-message__content {
  flex: 1;
}

/* -----------------------------
 * Company Information (Table & Timeline)
 * ----------------------------- */
.c-table {
  width: 100%;
  border-collapse: collapse;
}

.c-table th,
.c-table td {
  padding: 18px 25px;
  border-bottom: 1px solid #B4C6EE;
  text-align: left;
}

.c-table th {
  width: 250px;
  background-color: var(--color-bg-light);
  color: var(--color-primary-dark);
  font-weight: 700;
  border-right: 1px solid #B4C6EE;
}

.c-table td {
  background-color: #fff;
  color: var(--color-text);
}

.p-history {
  list-style: none;
  padding: 0;
}

.p-history__item {
  display: flex;
  gap: 40px;
  padding: 20px 0;
  border-bottom: 1px dashed #ddd;
}

.p-history__date {
  flex: 0 0 140px;
  font-weight: 700;
  color: var(--color-primary);
  font-size: 16px;
}

.p-history__content {
  flex: 1;
  font-size: 16px;
  line-height: 1.6;
}

.p-sales__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.p-sales__card {
  background: var(--color-white);
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  border: 1px solid #eee;
  text-align: center;
}

.p-sales__year {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.p-sales__amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.p-sales__amount span {
  font-size: 14px;
  font-weight: 500;
  margin-left: 2px;
}

.p-sales__lead {
  text-align: center;
  max-width: 840px;
  margin: 0 auto 48px;
  font-size: 18px;
  line-height: 2;
  font-weight: 500;
  color: var(--color-text);
}

.p-history__image {
  margin-top: 40px;
  text-align: center;
}

.p-history__image img {
  max-width: 1000px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* -----------------------------
 * CSR (Social Activities)
 * ----------------------------- */
.p-csr__container {
  max-width: 900px;
  margin: 0 auto;
}

.p-csr__subsection {
  margin-bottom: 60px;
  text-align: center;
}

.p-csr__subtitle {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--color-primary-dark);
}

.p-csr__image-cert {
  max-height: 500px;
  width: auto;
  max-width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin: 0 auto 30px;
  display: block;
}

.p-csr__image-logos {
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
}

.p-csr__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 30px;
  align-items: center;
}

.p-csr__grid img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.p-csr__awards {
  background: #fdfdfd;
  border: 1px solid #eee;
  padding: 30px;
  border-radius: 12px;
  text-align: left;
  margin-top: 40px;
}

/* -----------------------------
 * Welfare (Employee Activities)
 * ----------------------------- */
.p-welfare__gallery {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 40px;
}

.p-welfare__item {
  flex: 0 1 380px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  aspect-ratio: 4 / 3;
}

.p-welfare__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.p-welfare__item:hover img {
  transform: scale(1.1);
}

.p-welfare__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.p-welfare__futsal-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 50px;
}

.p-welfare__futsal-card {
  display: flex;
  gap: 40px;
  align-items: center;
  background: var(--color-white);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.p-welfare__futsal-img {
  flex: 0 0 320px;
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
}

.p-welfare__futsal-img img {
  width: 100%;
  height: auto;
}

.p-welfare__futsal-info {
  flex: 1;
}

/* -----------------------------
 * Responsive (SmartPhone)
 * ----------------------------- */
@media screen and (max-width: 880px) {
  body {
    font-size: 14px;
    line-height: 1.71;
  }

  .l-section {
    padding: 60px 0;
  }

  .l-header {
    height: 60px;
  }

  .l-header__logo {
    font-size: 20px;
  }

  .p-hero h2 {
    font-size: 28px;
    line-height: 1.4;
    margin-bottom: 20px;
  }

  .p-hero p {
    font-size: 16px;
  }

  .p-service__cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .p-service__card {
    padding: 30px 20px;
  }

  .l-footer__inner {
    flex-direction: column;
    gap: 40px;
  }

  .l-footer__nav ul {
    flex-direction: column;
    gap: 20px;
  }

  .p-maker__grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .p-message__card {
    flex-direction: column;
    padding: 30px;
    gap: 30px;
  }

  .p-message__image {
    flex: 0 0 auto;
    width: 220px;
    margin: 0 auto;
  }

  .p-message__content {
    text-align: left;
  }

  .c-table th {
    width: 100px;
    padding: 15px;
    font-size: 14px;
    white-space: nowrap;
  }

  .c-table td {
    padding: 15px;
    font-size: 14px;
  }

  .p-history__item {
    flex-direction: column;
    gap: 8px;
    padding: 15px 0;
  }

  .p-history__date {
    flex: 0 0 auto;
    font-size: 14px;
  }

  .p-history__content {
    font-size: 14px;
  }

  .p-sales__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .p-sales__amount {
    font-size: 18px;
  }

  .p-sales__lead {
    font-size: 15px;
    margin-bottom: 32px;
    text-align: left;
    padding: 0 10px;
  }

  .p-csr__subsection {
    margin-bottom: 40px;
  }

  .p-csr__subtitle {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .p-csr__grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .p-welfare__gallery {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .p-welfare__item {
    flex: 0 1 100%;
    width: 100%;
  }

  .p-welfare__futsal-card {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  .p-welfare__futsal-img {
    flex: 0 0 auto;
    width: 100%;
  }

  /* Drawer Toggle Button */
  .l-header__toggle {
    display: block;
    width: 30px;
    height: 24px;
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
  }

  .l-header__toggle span {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    left: 0;
    transition: all 0.3s;
  }

  .l-header__toggle span:nth-child(1) {
    top: 0;
  }

  .l-header__toggle span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
  }

  .l-header__toggle span:nth-child(3) {
    bottom: 0;
  }

  /* Active state for Toggle Button */
  .l-header__toggle.is-active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    background-color: var(--color-white);
  }

  .l-header__toggle.is-active span:nth-child(2) {
    opacity: 0;
  }

  .l-header__toggle.is-active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
    background-color: var(--color-white);
  }

  /* Drawer Navigation Menu */
  .l-header__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    height: 100vh;
    background-color: var(--color-primary);
    color: var(--color-white);
    flex-direction: column;
    justify-content: center;
    transition: all 0.4s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }

  .l-header__nav.is-active {
    right: 0;
  }

  .l-header__nav ul {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
  }

  .l-header__nav .l-header__contact-btn {
    border: 2px solid var(--color-white);
    background: transparent;
    box-shadow: none;
  }

  .l-header__nav .l-header__contact-btn:hover {
    box-shadow: none;
    transform: none;
    background: var(--color-white);
    color: var(--color-primary);
  }
}

/* -------------------------------------------
   Contact Form 7 カスタマイズ CSS
------------------------------------------- */

/* フォーム全体のコンテナ */
.wpcf7 {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px;
  background-color: #fcfcfc;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  color: #333;
  box-sizing: border-box;
}

/* 各項目の余白（段落） */
.wpcf7 p {
  margin-bottom: 24px;
}

/* ラベル（項目名）のスタイル */
.wpcf7 label {
  display: block;
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #444;
  line-height: 1.6;
}

/* ラベル内の br を非表示にして余白をコントロール */
.wpcf7 label br {
  display: none;
}

/* 入力欄をラベルの次の行に配置するための調整 */
.wpcf7-form-control-wrap {
  display: block;
  margin-top: 8px;
}

/* テキスト入力欄・テキストエリアの共通スタイル */
.wpcf7 input[type="text"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #fff;
  font-size: 16px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

/* 入力欄を選択したとき（フォーカス時）のスタイル */
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  outline: none;
}

/* テキストエリア固有の調整 */
.wpcf7 textarea {
  resize: vertical;
  min-height: 150px;
}

/* 送信ボタンのスタイル */
.wpcf7 input[type="submit"] {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 40px auto 0;
  padding: 16px 20px;
  background-color: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

/* 送信ボタンにマウスを乗せたとき（ホバー時） */
.wpcf7 input[type="submit"]:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* 送信ボタンをクリックしたとき */
.wpcf7 input[type="submit"]:active {
  transform: translateY(0);
  box-shadow: none;
}

/* エラーメッセージなどの調整 */
.wpcf7-not-valid-tip {
  font-size: 13px;
  margin-top: 4px;
}
.wpcf7-response-output {
  margin-top: 24px !important;
  border-radius: 6px;
}

/* -------------------------------------------
   レスポンシブ対応（スマホ向け）
------------------------------------------- */
@media screen and (max-width: 600px) {
  .wpcf7 {
    padding: 24px 16px;
    box-shadow: none;
    border: 1px solid #eaeaea;
  }
  
  .wpcf7 input[type="submit"] {
    max-width: 100%;
  }
}