.container {
    margin-top: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.container h2 {
    display: block;
    font-size: 1.5rem;
    margin: 10px 0;
    display: inline-block;
}

.container a {
    margin: 20px 100px 0 0;
    font-size: 1.3rem;
    border-bottom: 3px solid var(--main-color);
    text-align: right;
    align-self: flex-end;
}

.container a:hover {
    transform: translateY(10px);
}

/* グリッドコンテナ */
.gridContainer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 55px;
    padding: 20px;
    margin: 50px;
    border-radius: 20px;

}

.gridSection {
    display: grid;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.gridSection::before {
    content: none;
    display: none;
}

.overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(30, 30, 30, 0.5);
    transition: opacity 0.3s ease;
    border-radius: inherit;
    z-index: 1;


}

.gridSection:hover .overlay {
    opacity: 0;
}


.gridSection img {
    width: 100%;
    height: 100%;
    margin: auto;
    max-width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 20px;

}

.gridSection a {
    position: relative;
    display: block;
}

.gridSection p {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-align: center;
    line-height: 1.5;
    writing-mode: vertical-rl;
    white-space: nowrap;
    font-size: 32px;
    z-index: 10;
}

/* ホバー効果 */
.gridSection:hover img {
    transform: translateY(-10px);
    transform-origin: center center;
}

.gridSection:hover::before {
    opacity: 0;
}

@media (max-width: 1024px) {
    .gridSection p {
        font-size: 18px
    }
}

@media (max-width: 600px) {


    .container {
        width: 100%;
    }

    .container h2 {
        font-size: 14px;
    }

    .container a {
        font-size: 14px;
        margin-right: 60px;
        border-bottom: 1px solid var(--main-color);
    }

    .gridContainer {
        /* grid-template-columns: repeat(1, 1fr); */
        gap: 20px;
        margin: 80px 5%;
        padding: 15px;
    }

    .gridSection p {
        font-size: 14px
    }

    .gridSection {
        /* aspect-ratio: 16 / 9; */
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 5%;
}

.card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    list-style: none;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid black;
    height: 150px;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

.cardTitle {
    z-index: 1;
    font-size: 18px;

}

.cardTitle2 {
    font-size: 12px;
}

.cardLink {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 10px;
    color: var(--main-color);
    border: 1px solid var(--main-color);
    border-radius: 20px;
    padding: 4px 8px;
    text-decoration: none;
    transition: background-color 0.8s ease, color 0.8s ease;
}

.cardLink:hover {
    background-color: var(--main-color);
    color: white;
}

.descriptionText {
    text-align: center;
    margin: 60px auto;
}

.descriptionFooter {
    text-align: center;
    font-size: 1.8rem;
    margin-top: 80px;
    padding-bottom: 160px;
    padding: 0 8% 160px;

}

@media (max-width: 1024px) {

    .cardTitle {
        font-size: 14px;
    }

    .cardLink {
        font-size: 8px;
    }

    .descriptionFooter {
        font-size: 1rem;

    }

}

@media (max-width: 600px) {


    .list {
        grid-template-columns: repeat(2, 1fr);
    }

    .list li {
        font-size: 18px;
    }

    .list li a::after {
        font-size: 10px;
        margin-left: 3px;
    }

}

/* ご祈祷 */
.gokitouSection {
    padding: 0 10%;
}

.gokitouSection h2 {
    margin: 60px auto;
    text-align: center;
    color: var(--main-color);
    font-weight: bold;
    letter-spacing: 1.2rem;
}


.gokitouSection dl {
    text-align: center;
    margin: 80px auto;
}

.gokitouSection dt {
    font-size: 2.8rem;
}

.gokitouSection dd {
    font-size: 2rem;
    margin-top: 30px;
}

[id]::before {
    content: "";
    display: block;
    height: 180px;
    margin-top: -80px;
    visibility: hidden;
}

.textImageWrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 100px auto;
    flex-wrap: wrap;
    gap: 10px;
}

.textBlock {
    width: 55%;
    padding: 15px;
}

.sectionText {
    line-height: 1.8;
    margin-bottom: 1.2em;
}

.sectionTop {
    margin-bottom: 10px;
}

.imageBlock {
    width: 40%;
    display: flex;
    justify-content: center;
    padding: 15px;

}

.imageBlock img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    box-shadow: 15px 15px 10px rgba(0, 0, 0, 0.25);

}

.centerText {
    font-size: 1.7rem;
    text-align: center;
    margin: 40px auto 80px;

}

.gokitouImg {
    display: block;
    width: 50vw;
    height: auto;
    margin: 60px auto 0;
    padding-bottom: 120px;
    place-items: center;
}

.gokitouFooter {
    padding-bottom: 120px;
}

.businessHours h3 {
    font-size: 2.3rem;
    margin-bottom: 15px;
    letter-spacing: 0.2em;
    text-align: center;

}

.businessHours p {
    text-align: center;
}

.noShadowBox {
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.25) !important;

}

.gokitouNote {
    font-size: 1.5rem !important;
    text-align: center;
}

.gokitouNote img {
    width: 100%;
    max-width: 420px;
    height: auto;
    display: block;
    margin: 30px auto 0;
}





@media (max-width: 1024px) {

    .gokitouSection {
        padding: 0 8%;
    }

    .gokitouSection p {
        font-size: 1.5rem;
    }

    .gokitouSection dd {
        font-size: 1.6rem;
    }

    .textBlock,
    .imageBlock {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .textImageWrapper {
        max-width: 90vw;
    }

    .imageBlock img {
        margin: 80px auto;
        width: 70vw;
    }

    .textImageWrapper.reverse .imageBlock {
        order: 2;
    }

    .textImageWrapper.reverse .textBlock {
        order: 1;
    }



    .centerText {
        font-size: 1.2rem;
        margin-top: 0;
    }

    .gokitouImg {
        width: 70vw;
    }

    .sectionTop {
        margin-bottom: 40px;
    }

    /* .gokitouNote{
        margin-top: 40px;
    }

    .noShadowBox{
        margin: 0 auto !important;
    } */

}

@media (max-width: 600px) {
    .gokitouSection {
        padding: 0 5%;
    }

    .gokitouSection h2 {
        font-size: 2rem;
        /* margin: 30px auto; */
    }

    .gokitouSection p {
        font-size: 1rem;
    }

    .gokitouSection dt {
        font-size: 1.8rem;
    }

    .gokitouSection dd {
        font-size: 1.2rem;
    }

    .imageBlock img {
        margin: 40px auto;
    }

    .sectionTop {
        margin-bottom: 40px;
    }

    .businessHours h3 {
        font-size: 1.3rem;
    }

}


/* 初宮詣授与品 */
.giftSection {
    margin: 140px 12% 0;
}


.giftImage {
    display: block;
    width: 50vw;
    margin: 80px auto;
    border-radius: 8px;
    box-shadow: 15px 15px 10px rgba(0, 0, 0, 0.25);
}

.giftSection h3 {
    font-size: 2.5rem;
    text-align: center;
    color: var(--main-color);
    margin: 40px auto;
}

.gift h4 {
    font-size: 2rem;
    position: relative;
    color: var(--main-color);
    padding-left: 2.5rem;
    text-align: center;
    margin-top: 60px;
}

.gift h4::before {
    content: "◆";
    position: absolute;
    left: auto;
    top: 50%;
    transform: translate(-120%, -50%);
    color: var(--main-color);
    font-size: 2rem;
}

.gift p {
    padding: 15px 10%;
    text-align: center;
}


.giftWrapper {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
}


@media (max-width: 1024px) {

    .giftSection {
        margin: 0 auto;
        padding: 80px 0 100px;
    }


    .giftImage {
        width: 70vw;
    }

    .gift h4 {
        font-size: 1.5rem;
        margin: 40px auto 20px;
    }

    .gift p {
        padding: 15px 0;
        font-size: 1.2rem;
    }

    .gift h4::before {
        font-size: 1.3rem;
    }
}

@media (max-width: 600px) {

    .giftSection {
        margin: 0 auto;
        padding: 80px 0 100px;
    }


    .giftSection h3 {
        font-size: 1.4rem;
    }

    .gift h4::before {
        font-size: 1.3rem;
    }

    .gift h4 {
        font-size: 0.9rem;
    }

    .gift p {
        font-size: 0.8rem;
    }

}

/* イメージボックス */
.gokitouImageWrapper {
    padding: 80px 7%;
    margin: 0 auto;
    display: flex;
    gap: 25px;
    align-items: stretch;
    height: auto;

}

.gokitouImageBox {
    flex: 1 1 50%;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
    box-shadow: 15px 15px 10px rgba(0, 0, 0, 0.25);

}

.gokitouImageBox:hover {
    transform: scale(1.05);
}


@media (max-width: 1024px) {
    .gokitouImageWrapper {
        padding: 40px 3%;
    }
}


/* 家内安全 補足 */

.gokitouNote {
    margin: 0 10%;
    text-align: center;
    line-height: 2;
    padding-bottom: 200px;
}


.gokitouNote h4 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 50px;
    border-bottom: 1px dashed #c8bfb3;
    z-index: 5;
    padding: 20px;
    color: #B48A78;
}

.gokitouNote p {
    font-size: 1.5rem;
    text-indent: 1em;

    padding: 15px 0;
}

@media (max-width: 1024px) {

    .gokitouNote {
        font-size: 1.1rem;
        padding: 50px 0;
    }

    .gokitouNote p {
        font-size: 1rem;
    }
}


@media (max-width: 600px) {

    .gokitouNote h4 {
        font-size: 1rem;
        letter-spacing: 0.3rem;
        padding: 0 0 20px;
    }

    .gokitouNote p {
        font-size: 0.9rem;
    }

}


.businessTrip {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    /* border-radius: 5px; */
    /* border: 1.5px solid #333; */
}

.title {
    font-size: 2.4rem;
    text-align: center;
    margin-bottom: 40px;
    /* border-bottom: 2px dashed #333; */

    padding-bottom: 10px;
}

.group {
    margin-bottom: 40px;
}

.groupTitle {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
}

.itemList {
    list-style-type: disc;
    padding-left: 1.5em;
    margin-bottom: 20px;
}

.itemList li {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.note {
    font-size: 1.5rem;
    line-height: 1.8;
    text-align: center;
    margin-top: 20px;
}

@media (max-width: 1024px) {

    .businessTrip {
        max-width: 550px;
        margin: 0 15%;
        padding: 30px 10px;
    }

    .title {
        font-size: 1.6rem;
    }

    .groupTitle {
        font-size: 1.4rem;
    }

    .itemList li {
        font-size: 1rem;
    }

    .note {
        font-size: 1rem;
    }
}

@media (max-width: 600px) {

    .businessTrip {
        max-width: 300px;
        margin: 0 auto;
    }

    .title {
        font-size: 1.4rem;
    }

    .groupTitle {
        font-size: 1.2rem;
    }

    .itemList li {
        font-size: 0.7rem;
    }

    .note {
        font-size: 0.7rem;
    }

}

.gokitouCardGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 100px 0;
    height: auto;

  }
  
  .gokitouCard {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  
  .gokitouCardImage {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
  }
  
  .gokitouCardImage img {
    width: 100%;
    object-fit: cover; 
    display: block;
  }
  
  /* 下のテキスト */
  .gokitouCardText {
    margin-top: 6px;
    font-size: 0.8rem!important;;  
    line-height: 1.4;
    text-align: center;
    color: #333;
  }
  