/*
html5doctor.com Reset Stylesheet
v1.6.1
Last Updated: 2010-09-17
Author: Richard Clark - http://richclarkdesign.com
Twitter: @rich_clark
*/
/* ブラウザによる「agent style sheet」の影響を無効化するコード。 */
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
    margin:0;
    padding:0;
    border:0;
    outline:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
}

body {
    line-height: 1.8;
}

article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section {
    display:block;
}

nav ul {
    list-style:none;
}

blockquote, q {
    quotes:none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content:'';
    content:none;
}

a {
    margin:0;
    padding:0;
    font-size:1.2rem;
    vertical-align:baseline;
    background:transparent;
}

/* change colours to suit your needs */
ins {
    background-color:#ff9;
    color:#000;
    text-decoration:none;
}

/* change colours to suit your needs */
mark {
    background-color:#ff9;
    color:#000;
    font-style:italic;
    font-weight:bold;
}

del {
    text-decoration: line-through;
}

abbr[title], dfn[title] {
    border-bottom:1px dotted;
    cursor:help;
}

table {
    border-collapse:collapse;
    border-spacing:0;
}

/* change border colour to suit your needs */
hr {
    display:block;
    height:1px;
    border:0;  
    border-top:1px solid #cccccc;
    margin:1em 0;
    padding:0;
}

input, select {
    vertical-align:middle;
}

/* 全てのページに適用される設定 */
html {
    font-size: 16px;
    font-family: serif;
    scroll-behavior: smooth;
}
body {
    margin: 0 0 0 0;
    font-family: serif;
    padding-top: 120px; /* ヘッダーの高さ分 */
}

p, li, td {
    line-height: 1.7;
}
p {
    font-size: 1.0rem;
    margin: 8px 55px;    
}
h1 {
    text-align: center;
    font-size: 1.7rem;
}
a:link {
    color: #f07d34;
    text-decoration: none;
}
a:visited {
    color: #f07d34;
    text-decoration: none;
}
a:hover {
    color: #f07d34;
    text-decoration: underline;
}
a:active {
    color: #f07d34;
    text-decoration: underline;
}
img {
    max-width: 100%;
}
/* 全ての画像を親要素の幅に合わせて伸縮させるコード

/* 全てのページに適用 -ヘッダー */  
.header {
  display: flex;
  justify-content: space-between; /* 左右に分ける */
  align-items: center;           /* 縦中央揃え */   
  padding: 0;
  padding-top: 20px;
  padding-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-bottom: 1px solid #eee;
  background: #fff;
  position: fixed;   /* ←画面に固定 */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.3s ease;
}
/* 隠す状態 */
.header.hide {
  transform: translateY(-100%);
}

.logo img {
  height: 60px;   /* サイズ調整 */
  width: auto;
} 

.nav {
    position: relative;
    z-index: 100;
}
.nav > ul {
  display: flex;
  gap: 25px;       /* メニュー間の余白 */
  list-style: none;
  margin: 0;
  padding: 20px 30px;
  align-items: center;
}
.nav a {
  text-decoration: none;
  color: #333;
  font-size: 15px;
  font-family: "Hiragino Mincho ProN", serif;
  letter-spacing: 0.05em;
  position: relative;
  transition: color 0.3s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background: #631db3;
  transition: width 0.3s;
}

.nav a:hover::after {
  width: 100%;
}

.nav a:hover {
  color: #631db3;
}

/* 親を基準にする */
.has-submenu {
  position: relative;
}
/* サブメニュー本体 */
.submenu {
  position: absolute;
  top: 100%; /* 親のすぐ下 */
  left: 0;
  z-index: 999; /* ← 重なり順を上に */
  background: #fff;
  padding: 10px 0;
  list-style: none;
  margin: 0;
  min-width: 160px;

  /* 初期状態は非表示 */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 各項目 */
.submenu li a {
  display: block;
  flex-direction: column;
  padding: 10px 20px;
  white-space: nowrap;
}
/* ホバーで表示 */
.has-submenu:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 768px) {

  /* サブメニューは最初閉じる */
  .submenu {
    position: absolute; /* ← static をやめる */
    top: 100%;
    left: 0;
    z-index: 999;

    display: none; /* ← JSで開く */
    width: 100%;
  }

  /* 開いた状態 */
  .has-submenu.active .submenu {
    display: block;
  }

  .submenu li a {
    padding-left: 30px;
  }
}

.sns img {
  height: 30px;
  width: 30px;
  display: block;
  
}
.sns a {
  display: flex;
  justify-content: center;
  align-items: center;
   width: 44px;   /* ←サイズUP */
  height: 44px;

  border-radius: 50%; /* ←丸にする */

  background: #fff;
  border: 1px solid #ddd;

  box-shadow: 0 2px 6px rgba(0,0,0,0.1);

  transition: all 0.3s ease;
}
.sns a:hover img {
  filter: brightness(0) invert(1); /* 白アイコン化 */
}

.sns img:hover {
  opacity: 0.7;
  background: #631db3;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 0;
    margin: 0 auto;
    text-align: center;
    max-width: 100%;
    padding: 0; 
    padding-top: 30px;
  }
  .logo {
    margin: 0 auto;
    text-align: center;
  }
  .nav {
    margin:20px auto;
    margin-top: 10px;
  }
}

/* 全てのページに適用 -メイン */
main {
    margin: 50px auto 90px auto;
    max-width: 1000px;
}
main h2 {
    font-size: 1.4rem;
    color: #253958;
    padding: 0 30px 5px 0;
    border-bottom: 2px solid #253958;
}
rt {
    font-size: 0.65rem;
}

/* 全てのページに適用 -フッター */
.endlogo {
    text-align: center;
}
.endlogo img {
    margin: 5px 0 0 0;
    padding-top: 30px;
    width: 300px;
    margin: 10px auto 40px auto;
}
.copyright {
    padding-top: 30px;
    padding-bottom: 30px;
    margin-top: 0px;
    margin-bottom: 0px;
    text-align: center;
    background-color: bisque;
}

/* 紹介ページ共通設定 */
.headline {
    background-image: url(../images/ajikan-re70.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    text-align: center;
    padding-top: 100px;
    margin: 70px auto 100px auto;
    width: 100%;
    height: 220px;
    background-color:rgba(235, 234, 234, 0.2);
    background-blend-mode:lighten;
}
.headline h1 {
    padding-top: 38px;
}
.intro {
    margin: 70px 15%;
}
.intro p {
    margin: 0 auto;
}
.sub h2 {
    padding-left: 10px;
    border-left: 8px solid #631db3;
}
.article {
    margin: 70px 12%;
}
.content a:link {
    color: #063c62;
    text-decoration: none;
}
.content a:visited {
    color: #063c62;
    text-decoration: none;
}
.content a:hover {
    color: none;
    text-decoration: underline;
}
.content a:active {
    color: none;
    text-decoration: underline;
}
.back-to-pre {
    text-align: center;
    margin: 50px auto;
}
.back-to-pre a:link {
    color: #063c62;
    text-decoration: none;
}
.back-to-pre a:visited {
    color: #063c62;
    text-decoration: none;
}
.back-to-pre a:hover {
    color: none;
    text-decoration: underline;
}
.back-to-pre a:active {
    color: none;
    text-decoration: underline;
}

/* index.html */
.heroimg {
    text-align: center;
    margin-top: 70px;
    width: 100%;
}
.heroimg img {
    width: 100%;
    height: 500px;
    object-fit: cover;   
}
/* 画像はインラインデータなので配置の指示（ここではtextalign）が適用されない。そこでdivタグを使い、これをボックス要素として扱えるようにする。画像そのもののサイズに関して(widthやheight)はimgに対して行い(.top img)、センタリングの指示はdivタグに対して出す。(.top)*/


.carousel-wrapper {
  background-color: black; /* 左右の余白が黒になる */
}
.carousel {
    position: relative;
    max-width: 800px;
    max-height: 450px;
    margin: 0 auto;
    overflow: hidden;
}

.slide {
    display: none;
    width: 100%;
}
.slides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide.active {
  display: block;
}

button {
    font-size: 2rem;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    cursor: pointer;
}

.prev { 
    left: 10px; 
}
.next { 
    right: 10px; 
}

.myname {
    padding: 40px 0;
    padding-top: 60px;
}
.myname h1 {
    font-size: 1.4rem;
}
.invitation {
    margin: 0 18%;
}
.invitation p {
    margin-inline: auto;
    max-inline-size: max-content;
}

.verse {
    text-align: center;
    margin: 50px 0 60px 0
}

.midimage {
    text-align: center;
    margin: 30px auto;
    
}
.midimage img {
    width:600px;
    height: 400px;
    object-fit: scale-down;
    border-radius: 7%;
}

.sub {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
    justify-content: center;
}
.topics {
    display: grid;
    max-width: 80%;
    place-content: center;
    place-items: center;
    grid-template-columns: 1fr 1fr 1fr;
    margin: 100px auto;
    column-gap: 0; 
}
.topics h3 {
    text-align: center;
    padding-top: 30px;
    font-size: 1.6rem;
}
.topics p {
    text-align: center;
    margin: 10px auto 10px auto;
    width: 16em;
    font-size: 0.9rem;
    font-family: Arial, Helvetica, sans-serif;
}
.knowledge {
    background-image:
        linear-gradient(rgba(255,255,255,0.8), rgba(255,255,255,0.8)),
        url(../images/mani320.jpg);
    background-size: 40%;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 30%;
    background-color: transparent;
    background-blend-mode:lighten;
}
.destination {
    background-image:
        linear-gradient(rgba(255,255,255,0.8), rgba(255,255,255,0.8)),
        url(../images/mani320.jpg);
    background-size: 40%;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 30%;
    background-color: transparent;
    background-blend-mode:lighten;
}
.encounter {
    background-image:
        linear-gradient(rgba(255,255,255,0.8), rgba(255,255,255,0.8)),
        url(../images/mani320.jpg);
    background-size: 40%;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 30%;
    background-color: transparent;
    background-blend-mode:lighten;
}

.access-info {
    border-collapse: collapse;
    margin: 60px auto;
}
.access-info th, .access-info td {
    border: 1px solid #dbdbdb;
    padding: 20px;
}
.access-info th {
    width: 90px;
    text-align: center;
}
.access-info td {
    text-align: left;
}

/* access.html */
.article.access {
    font-size: 1.6rem;
}
.article.adress {
    font-size: 1.4rem;
}

/* about.html */
.content {
    margin: 0 auto;
    margin-bottom: 50px;
    width: 340px;
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 10%;
    background-color:rgba(235, 234, 234, 0.7);
    background-blend-mode:lighten;
    /* 末尾の２つは背景画像を疑似的に透明化させる処理 */
}
.content.greet {
    background-image: url(../images/hondo-taiko-fudodo.JPG);
    border-radius: 50%;
    margin-bottom: 50px;
}
.greetsub {
    max-width: 800px;
    margin: 5px auto;
    padding: 0 20px;
    justify-content: center;
}
.content.greet h3 {
    text-align: center; 
    padding-top: 90px;
    font-size: 1.6rem;
}
.abouts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 auto;
    max-width: 80%
}
.abouts h3 {
    text-align: center;
    padding-top: 60px;
    font-size: 1.6rem;
}
.content.history {
    background-image: url(../images/fromfudodo.JPG)
}
.content.svadeva {
    background-image: url(../images/vairocana-frontside.JPG)
}
.content.narrative {
    background-image: url(../images/honoezoom-cropped.jpg)
}
.content.goshuin {
    background-image: url(../images/goshuin-inukiri.jpg);
    background-color:rgba(246, 243, 219, 0.93);
}
.content.event {
    background-image: url(../images/fromfudodo.JPG)
}
.signature {
    text-align: center;
}
.abst {
    text-align: center;
    margin: 10px auto 0 auto;
    width: 20em;
    font-family: Arial, Helvetica, sans-serif;
}
.jump {
    padding: 0 0 0 0;
    margin: 0 0 0 0;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
}

/* history.html */
.intro.chro {
    margin: 50px 15%;
}
.table {
    width: 90%;
    border-collapse: collapse;
    margin: 30px auto;
    margin-inline: auto;
    max-inline-size: max-content;
}
.table th, .table td {
    border: 1px solid #dbdbdb;
    padding: 20px;
}
.chro-event {
    width: 30em;
}
/* narrative.html */
.gyao {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
}

/* legacy.html */
.cont {
    margin: 30px 10% 30px;
}
.cont h3 {
    margin: 30px auto;
    font-size: 1.1rem;
    line-height: 1.5;
}
.cont p {
    margin: 0 auto;
}
.contnote {
    font-size: 0.9rem;
}
.rt.dainichi {
    font-size: 0.55rem;
}
.sub.leg2 {
    margin-top: 100px;
}
.rt.kannon {
    font-size: 0.55rem;
}
.legimg {
    text-align: center;
    margin: 30px auto;
}
.cont.leg3 {
    margin-top: 100px;
}

/* goshuin.html */
.intro.sign {
    margin-bottom: 40px;
}
.signimg {
    text-align: center;
}
.signimg img {
    width: 90%;
    height: 90%;
}
.f-container {
    display: flex;
}
.cont.sign1 {
    margin-right: 40px;
}
.cont.sign2 {
    margin-left: 30px;
}

/* event.html */
.date.event {
    width: 150px;
}
.name.event {
    width: 300px;
}
.table.event td {
    text-align: center;
    vertical-align: middle;
}

/* モバイル対応のメディアクエリ */
@media (max-width: 768px)  {
/* 共通設定 */
    .header img {
        width: 70%;
        height: 70%;
    }
    .endlogo img {
        width: 70%;
        height: 70%;
    }
    .nav ul {
        flex-wrap: nowrap;
        gap: 10px;
        padding: 0;
    }
    li {
        font-size: 0.5rem;
    }
    h1 {
        font-size: 1.5rem;
    }
    p {
        font-size: 0.8rem;
    }
    .headline {
        background-image: url(../images/ajikan-re70.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    text-align: center;
    padding-top: 70px;
    margin: 50px auto 70px auto;
    width: 100%;
    height: 100px;
    background-color:rgba(235, 234, 234, 0.2);
    background-blend-mode:lighten;
    }
    .headline h1 {
        padding-top: 0;
    }

    body {
        padding-top: 240px;
    }

    main {
        padding: 0 5px;
        margin-top: 0;
    }
    .intro {
        margin: 50px 10%;
    }
    .article {
            margin: 50px 3%;
    }
    .back-to-pre {
        text-align: center;
        margin: 30px auto;
    }
    .back-to-pre p {
        font-size: 0.9rem;
    }
/* index.html */
    .index img {
        height: 250px;
    }
    .myname {
        padding: 40px 0;
    }
    .invitation {
        margin: 0 6%;
    }
    .midimage img {
        width: 80%;
        height: 80%;
    }
    .topics {
        grid-template-columns: 1fr;
        margin: 0 auto;
    }

/* abouts.html */
    .content h3 {
        font-size: 1.5rem;
    }
    .content.greet h3 {
        font-size: 1.5rem;
    }
    .abouts {
        grid-template-columns: 1fr;
        margin: 0 auto;
        justify-content: center;
    }
/* access.html */
.article.access {
    font-size: 1.3rem;
    margin: 50px 10%;
}
.article.adress {
    font-size: 1.0rem;
    margin: 50px 10%;
}
/* history.html */
    .table {
        width: 100%;
        border-collapse: collapse;
        margin: 10px auto;
        margin-inline: auto;
        max-inline-size: max-content;
        font-size: 0.6rem;
    }
    .table th, .table td {
        border: 1px solid #dbdbdb;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .chro-bozu {
        width: 80px;
    }
    /* signature.html */
    .intro.sign {
        margin-bottom: 20px;
    }
    .cont.sign1 {
        margin-top: 0;
        margin-bottom: 0;
    }
    .f-container {
        display: flex;
        flex-direction: column;
    }
    /* event.html */
    .table {
        width: 85%;
    }
}