/*
  File: hardware-new.css
  Description: New styles for the hardware maintenance table and overall page modernization.
*/

/* ----- Common Variables ----- */
:root {
  --primary-color: #006633; /* Site's green color */
  --secondary-color: #f39c12; /* A complementary color for highlights */
  --accent-blue: #0b57d0; /* New accent color */
  --text-color: #555;
  --heading-color: #2c3e50; /* Dark Slate for headings */
  --light-gray: #f8f9fa;
  --border-color: #e0e0e0;
  --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  --border-radius: 8px;
  --page-bg: #ffffff; /* White page background */
}

/* ----- General Body & Typography Styles ----- */
#container {
  max-width: 1200px; /* Add max-width for comfortable reading on large screens */
  margin: 0 auto; /* Center the container */
  padding: 0 20px; /* Add horizontal padding */
  font-size: 16px; /* Base font size */
  line-height: 1.8;
  color: var(--text-color);
  background-color: var(--page-bg);
}

#container p {
    font-size: 16px;
    margin: 0em;
    padding: 20px 20px 0px;

}

#container .notes {
    font-size: 14px;
    color: #777;
}

/* ----- Page Links ----- */
.page-links {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-bottom: 20px; /* Reduced margin */
}
.page-links a {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--accent-blue);
  border-radius: var(--border-radius);
  background-color: var(--accent-blue); /* Changed */
  color: #fff; /* Changed */
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.page-links a:hover {
  background-color: #fff; /* Changed */
  color: var(--accent-blue); /* Changed */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: var(--accent-blue);
}


/* ----- Modern Heading Styles ----- */
#container h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--heading-color);
  text-align: center;
  margin-bottom: 20px; /* Reduced margin */
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

#container h2.Ttl {
  font-size: 28px; /* Reduced font size */
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 30px;
  padding-left: 0;
  border-left: none;
  text-align: center;
}

#container h2.heading {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(45deg, var(--primary-color), #007a3d);
  border: none;
  border-radius: var(--border-radius);
  padding: 15px 25px;
  margin-bottom: 20px;
  text-shadow: none;
  box-shadow: 0 4px 10px rgba(0, 102, 51, 0.2);
  margin: 2em 0 2em;
}

.section-title,
#container h4 {
  font-size: 22px;
  font-weight: 600;
  color: var(--heading-color);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
  margin-top: 40px;
  margin-bottom: 25px;
}

/* ----- Intro Points ----- */
.intro-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 25px 0;
}
.intro-point {
  background-color: #fff;
  padding: 25px 25px 15px 25px;
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column; /* Stack icon and text vertically */
  align-items: center; /* Center horizontally */
  justify-content: center; /* Center vertically */
  gap: 15px; /* Space between icon and text */
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all 0.3s ease;
}
/* .intro-point:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
    border-color: var(--primary-color);
} */
.intro-point i {
  font-size: 32px; /* Slightly larger icon */
  color: var(--primary-color);
}
.intro-point p {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--heading-color);
}

/* ----- Service Details & Icon List ----- */
.service-details dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-top: 20px;
}

.service-details dt, .service-details dd {
  padding: 15px;
  margin: 0;
  display: flex;
  align-items: center;
}

.service-details dt {
  font-weight: 600;
  color: var(--heading-color);
  background-color: var(--light-gray);
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.service-details dd {
  border-bottom: 1px solid var(--border-color);
}

.service-details > dl > *:last-child {
    border-bottom: none;
}


.service-details dt i {
    color: var(--primary-color);
    font-size: 20px;
    width: 25px;
    text-align: center;
}

/* ----- Service Card (for Peripherals) ----- */
.service-card {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  margin-top: 20px;
  overflow: hidden;
}

.service-card .card-header {
  background: var(--light-gray);
  padding: 20px;
  text-align: center;
}

.service-card .card-header img {
  max-width: 200px;
  margin-bottom: 10px;
}

.service-card .card-header h3 {
  font-size: 20px;
  color: var(--primary-color);
  font-weight: 600;
  margin: 0;
}

.service-card .card-body {
  padding: 0;
}

.service-card .card-body dl {
    display: grid;
    grid-template-columns: max-content 1fr;
}

.service-card .card-body dl dt,
.service-card .card-body dl dd {
    padding: 15px 25px;
    border-bottom: 1px solid var(--border-color);
    margin: 0;
}
.service-card .card-body dl > *:last-of-type {
    border-bottom: none;
}


.service-card .card-body dl dt {
    color: var(--heading-color);
    font-weight: 600;
    font-size: 16px;
    gap: 12px;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
}
.service-card .card-body dl dt i {
    color: var(--primary-color);
    font-size: 20px;
    width: 25px;
    text-align: center;
}
.service-card .card-body dl dd {
    display: block; /* Allow vertical stacking inside dd */
}

/* ----- Hardware Policy Card ----- */
.policy-card {
  border-radius: var(--border-radius);
  margin-top: 20px;
  background: #fff;
  box-shadow: var(--card-shadow);
  border: none;
}

.policy-card .policy-header {
  font-size: 20px;
  font-weight: 600;
  color: var(--heading-color);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  background-color: var(--light-gray);
  border-bottom: 1px solid var(--border-color);
}

.policy-card .policy-header i {
  margin-right: 10px;
  font-size: 22px;
  color: var(--primary-color);
}

.policy-card .policy-body {
  padding: 25px;
}

.policy-card .policy-subtitle {
    font-size: 20px;
    font-weight: 700;
    color: var(--heading-color);
    margin-top: 10px;
    margin-bottom: 25px;
    padding: 12px 20px;
    background-color: var(--light-gray);
    border-left: 5px solid var(--secondary-color);
    text-align: left;
}

/* ▼▼▼ DESIGN UPDATE START ▼▼▼ */

.policy-card .policy-body ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.policy-card .policy-body ul li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}
.policy-card .policy-body ul li:last-child {
    border-bottom: none;
}

 .policy-body ul li .policy-point-icon {
    font-size: 20px;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.policy-body ul li:nth-child(1) .policy-point-icon {
    background-color: var(--primary-color); /* Green */
}
.policy-body ul li:nth-child(2) .policy-point-icon {
    background-color: var(--accent-blue); /* Blue */
}
.policy-body ul li:nth-child(3) .policy-point-icon {
    background-color: var(--secondary-color); /* Orange */
}
.policy-body ul li:nth-child(4) .policy-point-icon {
    background-color: #5d6d7e; /* Gray */
}


.policy-card .policy-body ul li strong {
    display: block;
    margin-bottom: 3px;
    color: var(--heading-color);
}

/* ▲▲▲ DESIGN UPDATE END ▲▲▲ */


.policy-card .policy-footer {
  background: #fff3e0;
  padding: 20px 25px;
  border-top: 1px solid #ffeacc;
}

.policy-card .policy-footer .important-note {
  color: #c46800;
  font-weight: 600;
  margin: 0 0 10px 0;
}

.policy-card .policy-footer .important-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.policy-card .policy-footer .important-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 5px;
  color: #c46800;
}
.policy-card .policy-footer .important-list li::before {
    content: '\f071'; /* Font Awesome warning icon */
    /* ▼▼▼ FONT AWESOME FIX START ▼▼▼ */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900; /* Solid style */
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    /* ▲▲▲ FONT AWESOME FIX END ▲▲▲ */
    position: absolute;
    left: 0;
    top: 3px;
}


/* ▼▼▼ UL/LI構造でテーブルを再現するための新しいスタイル ▼▼▼ */
.maintenance-list-wrapper {
	display: flex;
	overflow-x: auto;
	margin-bottom: 20px;
	border-radius: var(--border-radius);
	box-shadow: var(--card-shadow);
	border: 1px solid var(--border-color);
	background-color: #fff;
	cursor: grab;
	user-select: none;
}
.maintenance-list-wrapper.active {
	cursor: grabbing;
}

.maintenance-list {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 0 0 160px; /* 基本幅を160pxに設定 */
	border-right: 1px solid var(--border-color);
	display: flex;
	flex-direction: column;
}
.maintenance-list:last-child {
	border-right: none;
}

/* 項目名（左端固定列）のスタイル */
.maintenance-list-header {
	flex: 0 0 150px; /* 幅を150pxに設定 */
	background-color: #f0f0f0;
	position: -webkit-sticky;
	position: sticky;
	left: 0;
	z-index: 2;
}

.maintenance-list li {
	padding: 12px 15px;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	white-space: nowrap;
	font-size: 15px;
	flex-grow: 1; /* liの高さを均等にする */
}
.maintenance-list li:last-child {
	border-bottom: none;
}

/* 項目名のセルのスタイル */
.maintenance-list-header li {
	justify-content: flex-start;
	text-align: left;
	font-weight: 600;
}
.maintenance-list-header li:first-child {
	background-color: var(--light-gray);
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--heading-color);
	font-weight: 600;
	border-bottom-width: 2px;
	min-height: 165px; /* 製品ヘッダーの高さと合わせる */
	align-items: flex-end; /* テキストを下揃えにする */
}

/* 製品ヘッダー（画像と名前）のスタイル */
.maintenance-list .model-header {
	flex-direction: column;
	background-color: var(--light-gray);
	font-weight: 600;
	border-bottom-width: 2px;
	height: 165px; /* min-heightからheightへ変更 */
	justify-content: center; /* コンテンツを中央揃えに追加 */
}
.model-header img {
	display: block;
	margin: 0 auto 8px;
	width: 100px;
	height: 100px;
	border-radius: 4px;
	object-fit: contain;
}
.model-header strong {
	font-size: 15px;
	font-weight: 600;
    line-height: 1;
}

/* ホバーエフェクト */
.maintenance-list-wrapper:hover .maintenance-list {
	transition: background-color 0.2s ease;
}
.maintenance-list-wrapper .maintenance-list:not(.maintenance-list-header):hover {
	background-color: #f0f8ff;
}

/* ツールチップのスタイル（既存のものを流用） */
.tooltip-trigger {
	cursor: help;
	position: relative;
}
.maintenance-list-header .fa-info-circle {
	color: #aaa;
	font-size: 14px;
	transition: color 0.3s ease;
	margin-left: 8px;
}
.maintenance-list-header li:hover .fa-info-circle {
	color: var(--primary-color);
}
.maintenance-list-header .tooltip-text {
	visibility: hidden;
	width: 280px; /* 幅を元に戻す */
	background-color: #333;
	color: #fff;
	text-align: left;
	border-radius: 6px;
	padding: 10px;
	position: absolute;
	z-index: 11;
	top: 50%;
	left: calc(100% + 10px);
	transform: translateY(-50%);
	opacity: 0;
	transition: opacity 0.3s;
	white-space: normal;
	font-weight: normal;
	font-size: 14px;
	pointer-events: none;
}
.maintenance-list-header .tooltip-text::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 100%;
	margin-top: -5px;
	border-width: 5px;
	border-style: solid;
	border-color: transparent #333 transparent transparent;
}
.maintenance-list-header li:hover .tooltip-text {
	visibility: visible;
	opacity: 1;
}

/* 最終項目のツールチップが下方向に見切れる問題を修正 */
.maintenance-list-header li:last-child .tooltip-text {
    top: auto;
    bottom: 0;
    transform: none; /* 縦方向のセンタリングをリセット */
}

/* 最終項目のツールチップの矢印の位置を調整 */
.maintenance-list-header li:last-child .tooltip-text::after {
    top: auto;
    bottom: 10px; /* 矢印を適切な位置に調整 */
    margin-top: 0;
}


/* ▼▼▼ START: Smartphone Responsive Styles ▼▼▼ */
@media (max-width: 768px) {
    /* --- Page Links --- */
    .page-links {
        flex-direction: column;
        align-items: stretch; /* Make buttons full width */
        gap: 10px;
    }
    .page-links a {
        text-align: center;
    }

	/* --- Maintenance List (Accordion) --- */
	.maintenance-list-wrapper {
		display: block;
		overflow-x: hidden;
		cursor: default;
		border: none;
		box-shadow: none;
		background-color: transparent;
	}

	.maintenance-list-header {
		display: none;
	}

	.maintenance-list {
		flex-direction: column;
		border: 1px solid var(--border-color);
		border-radius: var(--border-radius);
		margin-bottom: 15px;
		box-shadow: 0 2px 5px rgba(0,0,0,0.05);
		overflow: hidden;
		flex-basis: auto;
	}

	.maintenance-list .model-header {
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
		height: auto;
		padding: 15px;
		cursor: pointer;
		position: relative;
		background-color: #fff;
		border-bottom: 1px solid var(--border-color);
		transition: background-color 0.2s ease;
	}
	.maintenance-list .model-header:hover {
		background-color: var(--light-gray);
	}

	.maintenance-list .model-header img {
		width: 60px;
		height: 60px;
		margin: 0 15px 0 0;
	}
	.maintenance-list .model-header strong {
		font-size: 16px;
		line-height: 1.3;
	}

	.maintenance-list .model-header::after {
		content: '\f078';
		font-family: 'Font Awesome 5 Free';
		font-weight: 900;
        font-style: normal;
        font-variant: normal;
        text-rendering: auto;
        -webkit-font-smoothing: antialiased;
		position: absolute;
		right: 20px;
		top: 50%;
		transform: translateY(-50%) rotate(0deg);
		transition: transform 0.3s ease;
		color: #aaa;
	}

	.maintenance-list.active .model-header::after {
		transform: translateY(-50%) rotate(-180deg);
		color: var(--primary-color);
	}

	.maintenance-list li:not(.model-header) {
		display: none;
		justify-content: space-between;
		text-align: right;
		padding: 12px 15px;
		white-space: normal;
		font-size: 15px;
	}
	.maintenance-list li:nth-child(even):not(.model-header) {
		background-color: var(--light-gray);
	}

	.maintenance-list.active li {
		display: flex;
	}

	.maintenance-list li:not(.model-header)::before {
		font-weight: 600;
		color: var(--heading-color);
		text-align: left;
		margin-right: 15px;
	}

	.maintenance-list li:nth-of-type(2)::before { content: '時間'; }
	.maintenance-list li:nth-of-type(3)::before { content: '月額'; }
	.maintenance-list li:nth-of-type(4)::before { content: '4年パック'; }
	.maintenance-list li:nth-of-type(5)::before { content: '5年パック'; }
	.maintenance-list li:nth-of-type(6)::before { content: '出張保守'; }
	.maintenance-list li:nth-of-type(7)::before { content: '対応地域'; }
	.maintenance-list li:nth-of-type(8)::before { content: 'パソコン本体保守'; }
	.maintenance-list li:nth-of-type(9)::before { content: '周辺機器保守'; }
	.maintenance-list li:nth-of-type(10)::before { content: 'モニター'; }
	.maintenance-list li:nth-of-type(11)::before { content: 'Windows OS復旧'; }
	.maintenance-list li:nth-of-type(12)::before { content: 'BCPOS復旧'; }
	.maintenance-list li:nth-of-type(13)::before { content: 'バックアップデータ復旧'; }

	/* --- Service Card (Peripherals) --- */
	.service-card .card-body dl {
		display: block; /* Change from grid to block */
		border: none;
	}

	.service-card .card-body dl dt,
	.service-card .card-body dl dd {
		border-bottom: none;
		padding-left: 20px;
		padding-right: 20px;
	}

	.service-card .card-body dl dt {
		background-color: var(--light-gray); /* Changed from transparent */
		font-size: 16px;
		padding-top: 15px;
		padding-bottom: 15px; /* Adjusted padding */
        border-bottom: 1px solid var(--border-color);
	}

	.service-card .card-body dl dd {
		padding-top: 15px; /* Adjusted padding */
		padding-bottom: 15px;
		border-bottom: 1px solid var(--border-color);
	}
    
    .service-card .card-body {
        padding: 0; /* Removed padding */
    }

	.service-card .card-body dl > dt:first-of-type {
        border-top: 1px solid var(--border-color);
    }
    
	.service-card .card-body dl > dd:last-of-type {
		border-bottom: none;
	}
}
/* ▲▲▲ END: Smartphone Responsive Styles ▲▲▲ */
