/* --- Variables & Base --- */
:root {
    --primary: #b37e3d;
    --primary-dark: #8c5e2a;
    --bg-light: #fdfaf6;
    --text-main: #221f1d;
    --text-sub: #554e48;
    --border: #e0d8cf;
    --white-alpha: rgba(255, 255, 255, 0.8);
    --shadow-premium: 0 20px 40px rgba(0, 0, 0, 0.08);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    animation: fadeIn 1s ease forwards;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Zen Maru Gothic', sans-serif;
    color: var(--text-main);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    line-height: 1.8;
}

/* --- Header & Navigation --- */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid #eee;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.4rem;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-sns {
    display: flex;
    gap: 15px;
    align-items: center;
}

.sns-link {
    color: var(--primary);
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sns-link:hover {
    color: var(--primary-dark);
    transform: translateY(-2px);
}

@media (max-width: 500px) {
    .header-left {
        gap: 15px;
    }
    .header-sns {
        gap: 10px;
    }
    .sns-link {
        font-size: 1rem;
    }
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

/* --- Hamburger Menu --- */
.menu-btn {
    display: none;
    position: relative;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all .3s ease-in-out;
    z-index: 2100;
}

.menu-btn__burger {
    width: 24px;
    height: 2px;
    background: var(--text-main);
    border-radius: 5px;
    transition: all .3s ease-in-out;
}

.menu-btn__burger::before,
.menu-btn__burger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    border-radius: 5px;
    transition: all .3s ease-in-out;
}

.menu-btn__burger::before {
    transform: translateY(-8px);
}

.menu-btn__burger::after {
    transform: translateY(8px);
}

/* Animation */
.menu-btn.open .menu-btn__burger {
    transform: translateX(-50px);
    background: transparent;
}

.menu-btn.open .menu-btn__burger::before {
    transform: rotate(45deg) translate(35px, -35px);
}

.menu-btn.open .menu-btn__burger::after {
    transform: rotate(-45deg) translate(35px, 35px);
}

/* --- Section Layout --- */
section {
    padding: 100px 8%;
    max-width: 1100px;
    margin: 0 auto;
}

h2 {
    font-family: 'Noto Serif JP', serif;
    font-size: 2.2rem;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

@media (max-width: 850px) {
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.6rem !important;
        margin-bottom: 30px !important;
    }

    h3 {
        font-size: 1.4rem !important;
    }
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -15px;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

/* --- Top Page (index.html) Specific --- */
.hero {
    margin-top: 70px;
    height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    background-color: var(--bg-light);
    overflow: hidden;
}

.hero-img {
    position: absolute;
    right: 0;
    top: 0;
    width: 60%;
    height: 100%;
    background-image: url('../images/main.png');
    background-size: cover;
    background-position: center;
}

.hero-text {
    width: 50%;
    padding: 0 5% 0 8%;
    z-index: 10;
}

.hero-subtext {
    letter-spacing: 0.3em;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 15px;
}

.hero-desc {
    color: var(--text-sub);
    margin-bottom: 35px;
    font-size: 1.1rem;
}

/* --- Access Page Grid --- */
.access-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

@media (max-width: 850px) {
    .access-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.access-subtitle {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary);
}

@media (max-width: 850px) {
    .access-subtitle {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
}

/* --- Form Grid --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 850px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* --- Premium Card --- */
.premium-card {
    background: var(--bg-light);
    padding: 60px;
    border-radius: 40px;
    text-align: center;
    margin-bottom: 80px;
    border: 1px solid var(--border);
}

@media (max-width: 850px) {
    .premium-card {
        padding: 30px 20px !important;
        margin-bottom: 40px !important;
        border-radius: 20px !important;
    }
}

/* --- Primary Card --- */
.primary-card {
    background: var(--primary);
    color: #fff;
    padding: 60px;
    border-radius: 40px;
    box-shadow: var(--shadow-premium);
}

@media (max-width: 850px) {
    .primary-card {
        padding: 40px 20px !important;
        border-radius: 20px !important;
    }
}

@media (max-width: 850px) {
    .check-list {
        columns: 1 !important;
        padding: 20px !important;
    }
}

/* --- Feature Box --- */
.feature-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.feature-card {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border);
    text-align: left;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card .step-num {
    font-size: 2.5rem;
    color: var(--primary);
    display: block;
    margin-bottom: 20px;
    opacity: 0.3;
}

.feature-card h3 {
    font-family: 'Noto Serif JP', serif;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

@media (max-width: 850px) {
    .feature-box {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }

    .feature-card {
        padding: 25px 20px;
    }
}

/* --- Philosophy Section --- */
.philosophy-section {
	margin-top: 50px;
    background-color: var(--bg-light);
    border-radius: 80px 80px 0 0;
}

@media (max-width: 850px) {
    .philosophy-section {
        border-radius: 40px 40px 0 0;
    }
}

.mobile-only {
    display: none !important;
}

@media (max-width: 850px) {
    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }
}

/* --- Form Info Box --- */
.form-info-box {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 20px;
    margin: 50px 0;
}

@media (max-width: 850px) {
    .form-info-box {
        padding: 25px 15px !important;
        margin: 30px 0 !important;
    }
}

.hero-text h1 {
    font-family: 'Noto Serif JP', serif;
    font-size: 3rem;
    line-height: 1.5;
    margin: 0 0 20px 0;
    color: var(--text-main);
    text-shadow: 0 0 20px #fff;
}


/* --- About Page (about/index.html) Specific --- */
.page-header {
    margin-top: 60px;
    padding: 80px 5% 40px;
    background-color: var(--bg-light);
    text-align: center;
}

.page-header h1 {
    font-family: 'Noto Serif JP', serif;
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.page-header .en {
    color: var(--primary);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    font-weight: bold;
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
    align-items: center;
}

.intro-img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 10px 10px 0 var(--bg-light);
}

.intro-text h3 {
    color: var(--primary);
    font-size: 1.4rem;
}

/* --- Data Table --- */
.spec-table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
}

.spec-table th,
.spec-table td,
.data-table th,
.data-table td {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.data-table th:last-child,
.data-table td:last-child {
    text-align: right;
}

.spec-table th,
.data-table th {
    background-color: var(--bg-light);
    font-weight: bold;
    color: var(--primary);
}

.spec-table th {
    width: 30%;
}

@media (max-width: 850px) {

    .data-table,
    .spec-table {
        border: none;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        margin: 20px 0 !important;
        padding: 0 !important;
        background: transparent !important;
    }

    .data-table thead,
    .spec-table thead,
    .data-table tr:first-child:not(:last-child) {
        display: none !important;
    }

    /* Common Card Base Style */
    .data-table tr,
    .spec-table tr {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 20px;
        padding: 0;
        margin: 0 0 20px 0 !important;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
        box-sizing: border-box !important;
        position: relative;
    }

    .data-table td,
    .data-table th,
    .spec-table td,
    .spec-table th {
        display: block;
        width: 100% !important;
        border: none;
        padding: 15px 20px !important;
        text-align: left !important;
        box-sizing: border-box;
    }

    /* Primary Data Label (Item Name) */
    .data-table td[data-label="項目"] {
        background-color: var(--bg-light);
        font-family: 'Noto Serif JP', serif;
        font-weight: bold;
        color: var(--primary);
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border);
    }

    /* Secondary Label for internal cells (Amount, etc) */
    .data-table td:not([data-label="項目"]) {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        padding: 15px 20px !important;
        border-bottom: 1px solid var(--bg-light);
    }

    .data-table td::before {
        content: attr(data-label);
        display: inline-block !important;
        font-size: 0.8rem;
        color: #999;
        font-weight: bold;
        margin-bottom: 0 !important;
        flex-shrink: 0;
    }

    .data-table td[data-label="項目"]::before {
        display: none !important;
    }

    .data-table td[data-label="金額"],
    .data-table th[data-label="合計額"],
    .data-table td[data-label="合計額"],
    .data-table td[data-label="基本料金"],
    .data-table td[data-label="介護一割負担"],
    .data-table td[data-label="ベッド代"],
    .data-table td[data-label="合計月額"],
    .data-table td[data-label="料金目安"] {
        white-space: nowrap !important;
        text-align: right !important;
        border-bottom: 1px solid var(--border) !important;
        font-weight: bold;
    }

    .spec-table tr {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin-bottom: 0 !important;
        border-radius: 0 !important;
    }

    /* Total row styling for mobile */
    .data-table tr.total-row {
        display: flex !important;
        flex-direction: row !important;
        gap: 0 !important;
        padding: 0 !important;
        border-radius: 20px !important;
        overflow: hidden !important;
    }

    .data-table tr.total-row th[data-label="月額合計（税込）"] {
        background-color: #f5e6d3 !important;
        color: var(--text-main) !important;
        font-weight: bold !important;
        border: none !important;
        border-right: 1px solid var(--border) !important;
        display: flex !important;
        flex: 1 !important;
        align-items: center !important;
        padding: 15px 20px !important;
        margin: 0 !important;
    }

    .data-table tr.total-row th[data-label="月額合計（税込）"]::before {
        display: none !important;
    }

    .data-table tr.total-row td[data-label="金額"] {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: center !important;
        text-align: right !important;
        font-weight: bold !important;
        padding: 15px 20px !important;
        flex: 1 !important;
        border: none !important;
        margin: 0 !important;
        background: #fff !important;
    }

    .data-table tr.total-row td[data-label="金額"]::before {
        display: none !important;
    }

}

/* --- Timeline (Flow of Admission) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
    padding: 0;
    list-style: none;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
    left: 40px;
    margin-left: -1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding-left: 80px;
}

.timeline-marker {
    position: absolute;
    left: 0;
    width: 80px;
    text-align: center;
}

.timeline-marker span {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.timeline-content {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.timeline-content h3 {
    margin: 0 0 10px 0;
    color: var(--primary);
    font-size: 1.2rem;
}

.timeline-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Intro Grid Enhancements --- */
.intro-text-block {
    margin-bottom: 60px;
}

.intro-text-block h3 {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    margin-bottom: 15px;
    font-family: 'Noto Serif JP', serif;
}

.intro-images {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.intro-images img {
    width: calc(33.333% - 10px);
    border-radius: 10px;
    aspect-ratio: 4/3;
    object-fit: cover;
    border: 1px solid var(--border);
}

/* --- Premium Intro & Gallery --- */
.premium-section {
    padding: 120px 0;
    overflow: hidden;
}

.premium-section:nth-child(even) {
    background-color: var(--bg-light);
}

.premium-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.premium-section:nth-child(even) .premium-container {
    direction: rtl;
}

.premium-content {
    direction: ltr;
}

.premium-content .step-num {
    font-family: 'Noto Serif JP', serif;
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.15;
    line-height: 1;
    margin-bottom: -10px;
    display: block;
}

.premium-content h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.8rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.premium-content h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: var(--primary);
}

.premium-content p {
    color: var(--text-sub);
    font-size: 1rem;
    line-height: 2;
}

.premium-image-wrap {
    position: relative;
    z-index: 1;
}

.premium-image-wrap::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--border);
    border-radius: 30px;
    z-index: -1;
}

.premium-image-wrap img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

.premium-image-wrap:hover img {
    transform: scale(1.02);
}

.premium-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.premium-gallery img {
    width: 100%;
    border-radius: 15px;
    aspect-ratio: 4/3;
    object-fit: cover;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.05);
}

@media (max-width: 850px) {
    .premium-section {
        padding: 60px 0;
    }

    .premium-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .premium-section:nth-child(even) .premium-container {
        direction: ltr;
    }

    .premium-content h3 {
        font-size: 1.5rem;
    }

    .premium-gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 850px) {
    .intro-images img {
        width: 100%;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-marker {
        width: 40px;
    }

    .timeline-marker span {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 0.7rem;
    }
}

/* --- Lists --- */
.bullet-list {
    list-style: none;
    padding: 0;
}

.bullet-list li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: 15px;
}

.bullet-list li::before {
    content: "・";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* --- Forms --- */
.contact-form {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.btn-submit {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 15px 50px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

/* --- News Section --- */
.news-list {
    max-width: 900px;
    margin: 50px auto 0;
    padding: 0 5%;
}

.news-item {
    display: flex;
    gap: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.news-item:hover {
    background-color: var(--bg-light);
    padding-left: 10px;
    padding-right: 10px;
}

.news-date {
    color: var(--text-sub);
    font-weight: bold;
    min-width: 120px;
}

.news-tag {
    background: #eee;
    padding: 2px 10px;
    font-size: 0.75rem;
    border-radius: 4px;
    height: fit-content;
}

.news-tag.important {
    background: #ff5e5e;
    color: #fff;
}

/* --- Footer & Common SP --- */
footer {
    background: #221f1d;
    color: #fff;
    padding: 60px 5%;
    text-align: center;
}

.sp-action-bar {
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
}

.sp-action-bar a {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-call {
    background: var(--primary);
    color: #fff;
}

.btn-reserve {
    background: var(--text-main);
    color: #fff;
}

/* --- Responsive --- */
@media (max-width: 850px) {
    .menu-btn {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        z-index: 2050;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .hero {
        height: auto;
        flex-direction: column-reverse;
    }

    .hero-img {
        position: relative;
        width: 100%;
        height: 250px;
    }

    .hero-text {
        width: 90%;
        padding: 40px 5%;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 1.8rem;
        text-shadow: none;
        margin-bottom: 15px;
        line-height: 1.4;
    }

    .hero-text p {
        font-size: 0.95rem !important;
        margin-bottom: 25px !important;
    }

    .sp-action-bar {
        display: flex;
    }

    section {
        padding: 50px 5% !important;
    }

    body {
        padding-bottom: 80px;
    }

    .sp-action-bar a span:first-child {
        font-size: 0.75rem !important;
    }

    .sp-action-bar a span:last-child {
        font-size: 1rem !important;
    }

    .page-header p {
        text-align: left !important;
    }

    .intro-grid {
        grid-template-columns: 1fr;
    }

    .news-item {
        flex-direction: column;
        gap: 8px;
        padding: 25px 0;
    }

    .news-date {
        min-width: auto;
        margin-right: 15px;
        font-size: 0.85rem;
    }

    .news-tag {
        display: inline-block;
        margin-bottom: 5px;
    }

    .news-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .contact-form {
        padding: 20px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    /* --- Responsive Containers --- */
    .pricing-card-box {
        padding: 25px 15px !important;
        border-radius: 25px !important;
        margin-bottom: 30px !important;
    }
}