/*
Theme Name: Fewer
Theme URI: https://wordpress.com/themes/fewer/
Description: Fewer is perfect for showcasing portfolios and blogs. With a clean and opinionated design, it offers excellent typography and style variations that make it easy to present your work or business. The theme is highly versatile, making it ideal for bloggers and businesses alike, and it offers a range of customizable options that allow you to tailor your site to your specific needs.
Version: 1.0.5
Author: Automattic
Author URI: https://automattic.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fewer
*/

/*
 * Font smoothing
 * https://github.com/WordPress/gutenberg/issues/35934
 */
body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

/*
 * Control the hover stylings of outline block style.
 * Unnecessary once block styles are configurable via theme.json
 * https://github.com/WordPress/gutenberg/issues/42794
 */
.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background):hover {
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--background);
	border-color: var(--wp--preset--color--secondary);
}

/**
 * Currently table styles are only available with 'wp-block-styles' 
 * theme support (block css) thus the following needs to be included
 * since 'wp-block-styles' aren't used for this theme.
 * https://github.com/WordPress/gutenberg/issues/45065
 */
.wp-block-table thead {
	border-bottom: 3px solid;
}
.wp-block-table tfoot {
	border-top: 3px solid;
}
.wp-block-table td,
.wp-block-table th {
	padding: var(--wp--preset--spacing--30);
	border: 1px solid;
	word-break: normal;
}
.wp-block-table figcaption {
	font-size: var(--wp--preset--font-size--small);
	text-align: center;
}

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: .02em !important;
	text-underline-offset: .25em;
}



/* スマホの時だけヘッダー下の不要な余白を非表示 */
@media screen and (max-width: 781px) {
  .wp-block-group.has-primary-color.has-text-color.has-link-color.wp-elements-91690d98135cef7e5b491a9e59b27b22.has-global-padding.is-content-justification-left.is-layout-constrained.wp-container-core-group-is-layout-47e85d9c.wp-block-group-is-layout-constrained.wp-container-2.is-position-sticky,
	.wp-block-group.has-primary-color.has-text-color.has-link-color.wp-elements-30d692d247e28b703fb5168dbd75b04d.has-global-padding.is-content-justification-left.is-layout-constrained.wp-container-core-group-is-layout-47e85d9c.wp-block-group-is-layout-constrained.wp-container-2.is-position-sticky {
    display: none !important;
  }
}



/* スマホの時だけコンテンツ内の不要な余白を非表示 */
@media screen and (max-width: 781px) {
  .entry-content.wp-block-post-content.is-layout-flow.wp-block-post-content-is-layout-flow p,
  .wp-block-heading {
    margin-top: 0 !important;
  }
}



/* フッターのPrivacy Policyの左アキ取る（SP版のみ） */
@media screen and (max-width: 781px) {
  .has-text-align-left {
    margin-left: 0 !important;
  }
}



/* ヘッダー上の不要な余白を非表示 */
.wp-block-columns {
  margin-top: 0 !important;
}



/* スマホ版ヘッダーのスタイル調整 */
@media screen and (max-width: 781px) {
  /* ヘッダー全体の高さを調整 */
  nav.is-responsive.wp-block-navigation {
	position: sticky;   /* スクロール時に追従 */
    top: 0;             /* 画面上部に固定 */
    z-index: 9999;      /* 他の要素より前面に */
    background: #fff;   /* 背景色を付けないと下の要素が透ける */
    padding: 20px 0;    /* 上下に余白 */
    min-height: 46px;   /* 高さ確保 */
  }

  /* ハンバーガーメニューアイコンのサイズ変更 */
  .wp-block-navigation__responsive-container-open svg {
    width: 32px;
    height: 32px;
  }

  /* 閉じるボタンのアイコンも同様に大きく */
  .wp-block-navigation__responsive-container-close svg {
    width: 50px;
    height: 50px;
  }

  /* SNSアイコンを大きくする */
  .wp-block-social-links .wp-block-social-link svg {
    width: 32px;
    height: 32px;
  }

  /* 必要なら、SNSアイコンのボタン枠も広げる */
  .wp-block-social-links .wp-block-social-link a {
    padding: 8px; /* デフォルトより広めに */
  }
}



/* コンテンツ内の不要な余白を非表示 */
.wp-block-columns {
  margin-top: 0 !important;
}



/* カラム全体の上下パディングを消す */
	@media screen and (max-width: 781px) {
	.wp-block-columns.is-layout-flex.wp-container-core-columns-is-layout-64541158 {
	  padding-top: 0 !important;
	  padding-bottom: 0 !important;
	}
}



/* その他トップページ調整 */
@media (max-width: 781px) {
  p[style*="margin-bottom:var(--wp--preset--spacing--80)"] {
    margin-bottom: 0 !important;
  }
}



/* WORKSのPC版余白調整 */
@media (min-width: 782px) {
  .wp-container-core-columns-is-layout-28f84493 {
    gap: 0 !important;   /* カラム間の余白を消す */
    margin-right: 0 !important; /* 念のため右マージンもリセット */
  }
}



/* PC専用ナビ内のサイトタイトルだけ大きくする */
nav[aria-label="PC menu"] .wp-block-site-title a {
  font-size: 1.7rem; /* お好みで調整 */
  font-weight: 700;  /* 太字にする場合 */
  text-decoration: none; /* 下線を消す */
  color: inherit; /* 色はテーマに従う */
}



/* カードのホバー調整 */
/* --------------------------------------
 * カードリンク化とホバーアニメーション
 * -------------------------------------- */

/* ホバー時にカーソルをポインターに変更（これは維持） */
.is-clickable-card {
    cursor: pointer;
    overflow: hidden; 
}

/* ホバーアニメーションのトランジション設定（トップページ以外に適用） */
/* :not(.home) や :not(.front-page) をbodyに追加 */
body:not(.home) .wp-block-cover img, 
body:not(.home) .wp-block-cover .wp-block-cover__background,
body:not(.home) .wp-block-cover .wp-block-cover__inner-container {
    /* 変化をスムーズにするための設定 */
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* ------------------------------------------- */
/* 2. 画像の縮小 (トップページ以外に適用) */
/* ------------------------------------------- */
body:not(.home) .is-clickable-card:hover .wp-block-cover__image-background {
    /* 画像を少し縮小 (97%) */
    transform: scale(0.99); 
}

/* 3. 暗さ（オーバーレイ）の非表示 (トップページ以外に適用) */
body:not(.home) .is-clickable-card:hover .wp-block-cover__background {
    /* 透明度をゼロにして非表示にする */
    opacity: 0 !important; 
}

/* 4. テキストの非表示 (トップページ以外に適用) */
body:not(.home) .is-clickable-card:hover .wp-block-cover__inner-container {
    /* テキストを含む要素の透明度をゼロにする */
    opacity: 0;
}



/* トップページ（body.home）に限定して、そのカードのクリック機能を無効化 */
body.home .is-clickable-card {
    /* クリックやホバー操作を完全に無視し、リンク先への遷移をブロック */
    pointer-events: none !important;
    /* クリック無効化に伴い、カーソル表示もデフォルトに戻す */
    cursor: default !important;
}

/* 念のため、そのカード内にあるaタグのリンク機能は維持（今回は内側にaタグがないため不要だが安全策） */
body.home .is-clickable-card a {
    pointer-events: auto !important;
}



/* Contact Form用CSS */
.required::after {
content: "obbligatorio";
color: #ffffff;
background: #FF3400;
font-size: 0.8em;
padding: 0.3em;
border-radius: 0.5em;
margin-left:0.3em;
}
.wpcf7-list-item {
	margin: 0 !important;
}