/* ===== ページ内リンクのジャンプ時にヘッダーで隠れないよう調整 ===== */
section[id],
[id^="why-"],
[id^="service"],
[id^="benefits"],
[id^="faq"],
[id^="contact"],
[id^="about"] {
  scroll-margin-top: 80px;
}
@media (max-width: 991.98px) {
  section[id],
  [id^="why-"],
  [id^="service"],
  [id^="benefits"],
  [id^="faq"],
  [id^="contact"],
  [id^="about"] {
    scroll-margin-top: 64px;
  }
}

/* Custom Styles for 電技NAVI Landing Page */

/* Global */
body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    font-size: 1rem; /* Base font size, typically 16px, meeting >=14px requirement */
    /* padding-top: 70px; */ /* Adjust if navbar height changes, for sticky-top */
}

/* Header */
header.sticky-top .navbar {
    z-index: 1030; /* Ensure navbar is above other content */
    transition: background 0.3s, padding 0.3s, box-shadow 0.3s;
}

/* ヘッダー縮小時のスタイル */
header.sticky-top .navbar.shrink {
    background: rgba(255,255,255,0.85) !important;
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
header.sticky-top .navbar.shrink .navbar-brand img {
    height: 28px !important;
    transition: height 0.3s;
}
header.sticky-top .navbar .navbar-brand img {
    transition: height 0.3s;
}

/* 「デモを試す」リンク強調 */
.navbar-nav .demo-highlight {
    color: #fff !important;
    background: linear-gradient(90deg, #2ecc40 60%, #16a085 100%);
    border-radius: 2rem;
    font-weight: bold;
    padding: 0.45rem 1.3rem !important;
    margin-left: 0.5rem;
    box-shadow: 0 2px 12px rgba(44,204,64,0.13);
    animation: demo-glow 1.5s infinite alternate;
    transition: background 0.3s, color 0.3s;
}
.navbar-nav .demo-highlight:hover, .navbar-nav .demo-highlight.active {
    background: linear-gradient(90deg, #16a085 60%, #2ecc40 100%);
    color: #fff !important;
    box-shadow: 0 4px 18px rgba(44,204,64,0.18);
}
@keyframes demo-glow {
    0% { box-shadow: 0 0 8px 2px rgba(44,204,64,0.13); }
    100% { box-shadow: 0 0 16px 6px rgba(44,204,64,0.22); }
}


.navbar-nav .nav-link {
    font-weight: 500;
    padding-left: 0.5rem !important;   /* Reduced from 1rem */
    padding-right: 0.5rem !important;  /* Reduced from 1rem */
    white-space: nowrap; /* Prevent text from wrapping within a link */
}

.navbar-nav .nav-link.active {
    color: #333; /* Active link color */
}

/* Header & Navigation Buttons */
/* .navbar .btn {
    white-space: nowrap; /* Prevent text from wrapping within buttons in the navbar */
/* } */

.navbar .btn-outline-primary { /* For login button */
    white-space: nowrap;
}

.navbar .btn-primary { /* For the main CTA button in the header */
    white-space: normal;   /* Allow this specific button to wrap */
    text-align: center;    /* Center text when it wraps */
    max-width: 230px;      /* Constrain its width to prevent excessive narrowness */
    line-height: 1.4;      /* Adjust line height for better readability when wrapped */
    padding-top: 0.5rem;   /* Fine-tune padding */
    padding-bottom: 0.5rem;/* Fine-tune padding */
}

/* Hero Section */
#hero {
    /* background-image: url('../images/hero-bg.jpg'); */ /* 背景画像を指定する場合 */
    background-size: cover;
    background-position: center;
    color: #333; /* 文字色を濃いめに */
    padding-top: 2rem; /* Reduced padding as body has padding-top */
    padding-bottom: 2rem;
}

#hero h1 {
    font-weight: 300; 
}

#hero .lead {
    color: #555; 
}

/* Make hero buttons stack on small screens by default if using d-grid or d-sm-flex */
@media (max-width: 575.98px) {
    #hero .d-sm-flex > .btn {
        width: 100%;
        margin-bottom: 0.5rem; /* Add some space between stacked buttons */
    }
    #hero .d-sm-flex > .btn:last-child {
        margin-bottom: 0;
    }
    /* Ensure .btn-lg meets 44px height on mobile */
    .btn-lg {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        /* font-size is 1.25rem (20px) + padding 0.75rem*2 (24px) = 44px height */
    }
}


/* Section Titles */
h2.fw-light {
    color: #2c3e50; 
    margin-bottom: 1rem;
}

/* Service Intro Section */
#service-intro img {
    opacity: 0.8;
    transition: opacity 0.3s ease-in-out;
}
#service-intro .col-lg-4.text-center.mb-4 {
    display: flex;
    flex-direction: column;
    height: 100%;
}
#service-intro .card, #benefits .card, #try-demo .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
#service-intro .card-body, #benefits .card-body, #try-demo .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}
#service-intro img, #benefits img, #features img {
    max-height: 80px;
    object-fit: contain;
}

/* Features Section */
#features img.img-fluid {
    border: 1px solid #eee;
}

/* 比較表（#features .table）のレスポンシブ縦積み表示 */
@media (max-width: 767.98px) {
  #features .table-responsive {
    overflow-x: visible;
  }
  #features table.table {
    display: block;
    width: 100%;
  }
  #features table.table thead {
    display: none;
  }
  #features table.table tbody {
    display: block;
    width: 100%;
  }
  #features table.table tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(22, 160, 133, 0.06);
    padding: 0.5rem 0.75rem;
  }
  #features table.table td {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border: none;
    font-size: 1rem;
    position: relative;
  }
  #features table.table td::before {
    content: attr(data-label);
    flex: 0 0 8em;
    color: #16a085;
    font-weight: bold;
    margin-right: 1rem;
    font-size: 0.97em;
    min-width: 7em;
  }
}

/* Benefits Section */
#benefits .card {
    border: none; 
}
#benefits .card-title {
    color: #16a085; 
}
#benefits ul li {
    padding: 0.3rem 0;
}

/* Footer */
footer a:hover {
    text-decoration: underline;
}
