/* Reset and Basic Styles */
:root {
    --pico-font-size: 16px;
    --pico-font-family: "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --pico-line-height: 1.5;
    --pico-grid-spacing-vertical: 2rem;
    --pico-grid-spacing-horizontal: 1.5rem;
}

body {
    background: linear-gradient(90deg, rgb(151, 30, 35) 0%, rgb(151, 30, 35) 6%, rgb(255, 255, 255) 6%, rgb(255, 255, 255) 100%);
    color: #000;
    padding-left: 5%; /* To compensate for the red bar */
    font-family: "メイリオ", Meiryo, sans-serif; 
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* Override Pico container */
.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

main.container {
    padding-left: 3%; /* Adjust main content padding */
}


/* Header */
.site-header {
    padding: 1rem 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.site-header .header-logo {
    display: flex;
    align-items: center;   /* 縦方向中央揃え */
    gap: 1rem;           /* img と文字の間隔 */
}

.header-logo img {
    width: 45px;
    height: 45px;
    margin-right: 0.5rem;
}

.logo h3 {
    font-size: 1.5rem;
    margin: 0;
}

/* Fixed Elements */
.fixed-elements .back-logo {
    pointer-events: none;
    position: fixed;
    left: 2%;
    top: 33.33%;
    width: 8%;
    height: 8%;
}

.fixed-elements .side-nav {
    position: fixed;
    left: 0.5%;
    top: 50%;
    transform: translateY(-50%);
    width: 4%;
}

.side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;

    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.side-nav a {
    padding: 2px 0;
    padding-left: 6px;
    color: white;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.9rem;
}

.fixed-elements .vertical-logo {
    pointer-events: none;
    position: fixed;
    left: 2.4%;
    bottom: 16%;
    width: 1%;
    height: 1%;
}


/* Hero Section */
.hero-section {
    background-image: url('../images/ga_mountain_v2.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    height: 24rem; /* lg:h-96 */
    padding: 3rem 1.5rem;
    position: relative;
}

.hero-image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-image {
    object-fit: contain;
    position: absolute;
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
}


/* Services Section */
.services-overview {
    padding: 1rem 0;
}

.services-overview .text-center {
    text-align: center;
    margin-bottom: 2rem;
}
.services-overview h2 {
    font-size: 1.5rem;
}

.services-grid {
    display: grid;
    gap: 1rem;
    justify-content: center;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    border: 1px solid #ccc;
}

.service-card img {
    object-fit: contain;
    height: 18rem; /* h-72 */
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.875rem; /* text-3xl */
    margin: 0.75rem 0;
}

.service-card p {
    line-height: 1.25; /* leading-tight */
    margin-top: 1.5rem;
}


/* Achievements Section */
.achievements {
    padding: 3rem 0;
}

.section-title-wrapper {
    text-align: center;
    margin-bottom: 2rem;
    background-color: #922724;
    padding: 1rem 0;  
    display: flex; 
    justify-content: center; 
    align-items: center;
}

.section-title {
    font-size: 2rem; /* text-5xl */
    color: white;
    margin: 0; /* Remove default margin to help with centering */ 
}

.achievement-card {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #ccc;
    padding: 1.5rem;
}

.achievement-card h3 {
    font-size: 1.875rem; /* text-3xl */
    text-align: left;
    margin-bottom: 1.5rem;
}

.achievement-grid {
    /* This is now handled by specific layout classes */
}

.achievement-text .sub-points {
    border: 1px solid #ccc;
    padding: 1rem;
    margin-top: 1rem;
}

/* LogicViz Section */
.logicviz {
    padding: 3rem 0;
}

.logicviz-card {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

.logicviz-card .heuristiclogic-lead {
    font-size: x-large;
}

.logicviz-card h3 {
    font-size: 1.875rem; /* text-3xl */
    text-align: left;
    margin-bottom: 1.5rem;
}

.logicviz-grid {
    /* This is now handled by specific layout classes */
}

.logicviz-card .visualization-lead {
    font-size: large;
}


.logicviz-grid .logicviz-text {
    font-size: large;
}

.achievement-text {
    font-size: large;
}


.logicviz-grid > * {
    border: 1px solid #ccc;
    padding: 2em 1.5rem 1.5rem; /* top だけ 2em */
    box-sizing: border-box;
}

.logicviz-text .sub-points {
    border: 1px solid #ccc;
    padding: 1rem;
    margin-top: 1rem;
}

/* Company Info Section */
.company-info {
    padding: 3rem 0;
}

.info-card {
    margin: 1.5rem 0;
    border: 1px solid #ccc;
    padding: 1.5rem;
}

.info-card h3 {
    font-size: 1.875rem;
    text-align: left;
    margin-bottom: 1.5rem;
}

.info-card pre {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 1rem;
    line-height: 2.2;
}

/* Greeting Section Layout */
.greeting-section h3 {
    text-align: center;
}

.greeting-section .info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 1.5rem;
}

.greeting-section .info-person {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
    align-items: center;

    max-width: 800px; /* Important for distance of image and name for wide window */
    margin: 0 auto;
}

.greeting-section .info-text {
    grid-column: 1 / -1; /* Make text span both columns */
    text-align: center;
    margin-bottom: 2rem; /* Add some space between text and the row below */
}

.greeting-section .info-text p + p {
    margin-top: 2em;
}

/* Ensure the image and name take up one column each in the new grid row */
/* Center the Company image and representative name with padding */
.greeting-section .info-image,
.greeting-section .representative-name {
    text-align: center;
}

.greeting-section .info-image img {
    height: 160px; /* Roughly 5x the 3em text size * 2/3 ordered */
    width: auto;
    max-width: 100%;
    margin: 0 auto;
}

/* Make representative name slightly smaller */
.greeting-section .representative-name {
    font-size: 1em; 
    line-height: 1.2;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .greeting-section .info-person {
        grid-template-columns: 1fr;
        row-gap: 1rem;
    }
}

/* Layout for other info cards */
.info-grid-single .info-text {
    grid-column: 1 / -1;
}

.service-detail-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 18px;
    background-color: #6d28d9;   /* 紫（Tailwind Purple 700） */
    color: #ffffff;
    border-radius: 8px;          /* 丸角 */
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.1s ease;
}

.service-detail-btn:hover {
    background-color: #7c3aed;   /* 少し明るい紫 */
    transform: translateY(-1px);
}

.service-detail-btn:active {
    transform: translateY(0);
}

.inquiry-page-btn {
    display: block;
    width: fit-content;
    margin-top: 6px;
    padding: 3px 40px;
    background-color: #00bfff;   /* 明るい水色（Tailwind Purple 700） */
    color: #ffffff;
    border-radius: 16px;          /* 丸角 */
    font-size: 1.2rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.1s ease;
    margin: 2rem auto 0;
}

/* Banners */
/* Splunk banner: center and fit to text content */
.splunk-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;     /* 中央寄せ */
    padding: 0 0 1rem;
    pointer-events: none;        /* クリック対象を内側に限定 */
}

.splunk-banner .container {
    width: auto;                 /* テキストの長さに合わせる */
    padding: 0.75rem 0.75rem;
    background-color: #ec4899;   /* 既存のピンク */
    border-radius: 0.75rem;
    pointer-events: auto;        /* クリック可能に戻す */
}

/* White text */
.splunk-banner a,
.splunk-banner strong,
.splunk-banner span {
    color: #ffffff !important;
    text-decoration: none;
}

/* ======================================
   Cookie Banner（小型・右下）
====================================== */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1f2937;
  color: #fff;
  padding: 16px;
  width: 260px;               /* → 2回り小さく */
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  z-index: 9999;
  display: none;
}

.cookie-banner-text {
  font-size: 0.85rem;
  color: #d1d5db;             /* → 白寄りの薄いグレー */
  margin-bottom: 12px;
  line-height: 1.5;
}

.cookie-banner-buttons button {
  width: 100%;
  padding: 8px;
  margin-bottom: 6px;
  background: #4b5563;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
}
.cookie-banner-buttons button:hover {
  background: #6b7280;
}

/* ======================================
   詳細設定モーダル
====================================== */
.cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.cookie-modal-content {
  background: #fff;
  width: 400px;               /* 少し小さめ */
  padding: 22px;
  border-radius: 10px;
}

.cookie-group {
  margin-bottom: 16px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}
.toggle input {
  transform: scale(1.2);
}
.toggle.disabled {
  opacity: 0.6;
}

/* モーダル下部ボタン */
.modal-buttons {
  display: flex;
  gap: 8px;
}
.modal-buttons button {
  flex: 1;
  padding: 10px;
  border: none;
  background: #4b5563;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}
.modal-buttons button:hover {
  background: #6b7280;
}

/* Cookie 再設定アイコン（フッター右端） */
.cookie-reset {
  position: fixed;
  right: 20px;
  bottom: 20px;          /* フッター内でも必ず右端に来るように固定配置 */
  z-index: 9999;
}

.cookie-reset button {
  background: #1f2937;
  color: #e5e7eb;        /* 白寄りの薄いグレー */
  border: none;
  font-size: 20px;       /* アイコンのサイズ調整 */
  padding: 10px 12px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.6;          /* 控えめ表示 */
  transition: opacity 0.2s, background 0.2s;
}

.cookie-reset button:hover {
  opacity: 1;
  background: #374151;   /* ほんの少し明るいグレーへ */
}

.cookie-current-status {
  background: #f3f4f6;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #374151;
  margin-bottom: 15px;
  line-height: 1.5;
  border-left: 4px solid #6b7280;  /* 見やすいアクセント */
}

/* Footer */
.site-footer {
    padding: 1.5rem 0;
    padding-left: 3%;
}

.footer-grid {
    display: grid;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #9ca3af;
}

.footer-logo a {
    display: flex;
    align-items: center;
}
.footer-logo img {
    width: 25px;
    height: 25px;
    margin-right: 0.5rem;
}
.footer-logo h2 {
    margin-top: 1rem;
    font-size: 1.5rem;
}

.footer-links p {
    font-size: 1.125rem; /* text-lg */
    margin-bottom: 0rem;
}
.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-bottom {
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-bottom .footers {
    display: flex;
    justify-content: flex-start;   /* 左から順に並べる */
    align-items: center;
    width: 100%;
}

.footers .copyright {
    margin-left: auto;          /* 右端へ押し出す */
    text-align: right;          /* テキストも右寄せ */
    margin-right: 4rem; 
}

.footers ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 0 0.5rem;
}
.footers a {
    margin-right: 1rem;
    color: #6b7280; /* text-gray-400 */
    text-align: left;   
}


/* Responsive Styles */
@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .footer-grid {
        grid-template-columns: repeat(12, 1fr);
    }
    .footer-logo { grid-column: span 6; }
    .footer-links { grid-column: span 3; }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    /* Specific grid for non-greeting info cards */
    .info-card:not(.greeting-section) .info-grid {
        grid-template-columns: repeat(10, 1fr);
    }
    .info-card:not(.greeting-section) .info-text {
        grid-column: span 3;
    }
    .info-card:not(.greeting-section) .info-image {
        grid-column: span 7;
    }
}

/* Custom Layouts for Achievement & LogicViz Cards */
@media (min-width: 768px) {
    .layout-vertical .achievement-grid,
    .layout-vertical .logicviz-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .layout-4-6 .achievement-grid,
    .layout-4-6 .logicviz-grid {
        display: grid;
        grid-template-columns: 4fr 6fr;
        gap: 4rem;
        align-items: stretch;
        margin-left: 2em;
    }
    .layout-5-5 .achievement-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        align-items: center;
    }
    .layout-6-4 .achievement-grid {
        display: grid;
        grid-template-columns: 6fr 4fr;
        gap: 1.5rem;
        align-items: center;
    }
}

/* Reduce size of achievement images */
.achievement-image img[alt="Scope"],
.achievement-image img[alt="Sunburst Chart"],
.achievement-image img[alt="Bubble Chart"] {
    width: 70%;   /* 70% size */
    height: auto;
    display: block;
    margin: 0 auto; /* center align */
}

.achievement-image img[alt="Wild Ninja Zen"] {
    width: 80%;   /* 80% size */
    height: auto;
    display: block;
    margin: 0 auto; /* center align */
}

/* Reduce size of LogicViz images */
.logicviz-image img[alt="logic1"],
.logicviz-image img[alt="logic2"],
.logicviz-image img[alt="logic3"] {
    width: 750%;   /* 75% size */
    height: auto;
    display: block;
    margin: 0 auto; /* center align */
}

/* Sales Address image sizing only（背景は付けない） */
.info-text img[alt="Sales Address"] {
    height: 2em;     
    width: auto;
    vertical-align: middle;
    margin: 0 0.25em;
}

/* Fix font in kobanzame section */
.kobanzame,
.kobanzame * {
    font-family: "メイリオ", Meiryo, sans-serif !important;
    font-size: 1rem; /* 必要に応じて調整 */
    line-height: 1.6;
}

.kobanzame .section-title {
    font-family: "メイリオ", Meiryo, sans-serif !important;
    font-size: 2rem; 
}

.kobanzame-title .kobanzame-text {
    font-family: "メイリオ", Meiryo, sans-serif !important;
    font-size: 1.4em;     
    grid-column: 1 / -1; /* Make text span both columns */
    text-align: center;
    margin-bottom: 2rem; /* Add some space between text and the row below */
}

/* Sankey chart description box - dark gray background & larger white text */
.sankeychart_data-image {
    background-color: #4b5563;  /* 濃いグレー（Tailwind: gray-600 相当） */
    padding: 1.5rem;
    border-radius: 0.5rem;
    color: #ffffff;             /* テキスト白 */
    font-size: 1.25rem;         /* → 文字を一回り大きく（通常 1rem → 1.25rem） */
    line-height: 1.6;           /* 読みやすい行間 */
}

/* Side Navigator horizontal style if aspect ratio is higher than 16:13 */
@media (min-aspect-ratio: 16/13) {
    .fixed-elements .side-nav {
        left: 1.5%; /* Align with back-logo */
        top: 50%; /* Below back-logo */
        transform: none; /* Remove horizontal centering */
        width: auto;
    }

    .side-nav ul {
        flex-direction: column; /* Keep vertical stacking */
        height: auto; /* Reset height */
        width: auto;
        justify-content: flex-start; /* Align items to the start */
        align-items: flex-start; /* Align items to the start */
    }

    .side-nav li {
        margin: 0; /* Reset margin */
        padding: 0.5rem 0; /* vertical padding */        
    }

    .side-nav a {
        writing-mode: initial; /* Reset vertical writing mode */
        text-orientation: initial; /* Reset text orientation */
        font-size: 0.7rem; 
    }

.sankey-tooltip {
  pointer-events: none;
  z-index: 1000;
}

/* DC.js Chart Styles */
#dc-chart-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-top: 2rem;
}

#dc-chart-area .chart-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 1rem;
}

#dc-chart-area .chart-row > div {
    background-color: #f8f8f8;
    border: 1px solid #ccc;
    padding: 1rem;
    margin: 0.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#dc-chart-area h4 {
    text-align: center;
    margin-bottom: 1rem;
    color: #333;
}

.dc-chart g.row text {
    fill: black;
}

.dc-chart .axis text {
    fill: black;
}

.dc-chart .axis path,
.dc-chart .axis line {
    fill: none;
    stroke: #888;
    shape-rendering: crispEdges;
}

.dc-chart .x.axis path {
    display: none;
}

.dc-chart .brush .extent {
    fill: #2c2c2c;          /* 背景色と合わせる */
    fill-opacity: 0.05;  /* ほぼ見えない */
}

.dc-chart .brush .overlay {
    fill-opacity: 0;
}

.dc-chart .brush .selection {
    fill: #4dabf7;
    fill-opacity: 0.1;
}

.dc-chart .bar {
    stroke: none;
    cursor: pointer;
}

.dc-chart .bar:hover {
    fill-opacity: .7;
}

.dc-chart .pie-slice {
    fill-opacity: .8;
    stroke: #fff;
    stroke-width: 1px;
    cursor: pointer;
}

.dc-chart .pie-slice:hover {
    fill-opacity: 1;
}

.dc-chart .selected path {
    stroke-width: 2px;
    stroke: #333;
}

.dc-chart .deselected path {
    fill-opacity: .5;
    fill: #ccc;
}

.dc-chart .reset {
    font-size: 0.8rem;
    color: #007bff;
    text-decoration: none;
    margin-left: 10px;
}

.dc-chart .reset:hover {
    text-decoration: underline;
}
}


/* Styles for heuristiclogic_visualizations.html */
:root {
  --pico-background-color: #2a2a2a;
  --pico-color: #f0f0f0;
}
.chart-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    padding: 20px;
    background-color: #2c2c2c;
    border-radius: 8px;
    box-sizing: border-box;
    width: 100%;
    color: #ffffff;
}
.chart-item {
    border: none;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
}
#data-count {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 10px;
}
.dc-chart .axis text, .dc-chart .legend text, .dc-chart g.row text {
    fill: #ffffff;
}
.dc-chart .axis path, .dc-chart .axis line, .dc-chart .grid-line {
    stroke: #666;
}
.dc-data-count a {
    color: blue;
}
.chart-container h5 {
  text-align: center;
  margin-bottom: 15px;
  color: var(--pico-color);
}
@media (max-width: 768px), (orientation: portrait) {
    .chart-container {
        grid-template-columns: 1fr;
    }
    .chart-item {
        aspect-ratio: 16 / 9;
    }
}
#owner-pie-chart .pie-slice {
    stroke: none;
}
