/* --- Variables & Reset --- */
:root {
    --primary-blue: #005bb5;
    --accent-blue: #00a0e9;
    --light-bg: #ffffff;
    --card-bg: #f5f7fa;
    --card-bg2: #e0e0e0;
    --text-white: #1a1a2e;
    --text-black: #000;
    --silver-gradient: linear-gradient(135deg, #e0e0e0 0%, #b0b0b0 100%);
    --blue-gradient: linear-gradient(135deg, #005bb5 0%, #00a0e9 100%);
    --section-padding: 100px 0;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --border-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--light-bg);
    color: var(--text-white);
    font-family:"M PLUS 1 Code", 'Helvetica Neue', monospace, Arial, sans-serif;
    line-height: 1.8;
    overflow-x: hidden;
}

ul {
    list-style: none;
}

.article-main ul {
    list-style: circle;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

/* --- Layout Components --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

.section {
    padding: var(--section-padding);
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.section-title span {
    display: block;
    font-size: 1rem;
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
    letter-spacing: 0.3em;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--blue-gradient);
    margin: 1.5rem auto 0;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 16px 40px;
    font-weight: 700;
    letter-spacing: 0.1em;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--blue-gradient);
    color: white;
}

.btn-outline {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: #ffffff;
}

#btn-contact {
    background: var(--blue-gradient);
}
#btn-contact:hover {
    background: var(--primary-blue);
}

#btn-tel {
    background: var(--blue-gradient);
}
#btn-tel:hover {
    background: var(--primary-blue);
}
.btn-inquiry{
    height: 30px;
    line-height: 25px;  /* heightと同じ値に設定 */
    font-size: 15px;
    display: inline-block;
    padding: 0 10px;   /* 上下のpaddingを削除または調整 */
    font-weight: 700;
    letter-spacing: 0.1em;
    border-radius: 6px;
    cursor: pointer;
    background: var(--blue-gradient);
    color: white;
}

@media (pointer: fine), (hover: hover) {
  #btn-tel {
    display: none;
  }
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px;
    z-index: 1000;
    transition: var(--transition);
    background: rgb(255, 255, 255);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.header.scrolled {
    height: 70px;
    background: rgba(255, 255, 255, 0.98);
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: var(--text-white);
    display: flex;
    
}
.logo a img{
    height: 90px;
    transition: var(--transition);
}

.logo.scrolled a img{
    height: 70px;
}

.nav ul {
    display: flex;
    gap: 30px;
}

.nav a {
    font-size: 0.9rem;
    font-weight: 500;
}

.nav a:hover {
    color: var(--accent-blue);
}

.icon-container {
    position: fixed;
    top: 90px;  /* ヘッダーの下の位置 */
    right: 20px; /* 画面右側に配置 */
    display: flex;
    gap: 10px; /* アイコン間の間隔 */
    z-index: 1002;
}
.icon {
    display: flex; /* Flexboxを使って画像を調整 */
}
.icon svg {
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: #fff;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.external-link {
    display: inline-flex;
    align-items: center;
    color: #0056b3;
    text-decoration: none;
    border-bottom: 1px solid #003d80;
    transition: all 0.3s ease;
    font-weight: 500;
}

.external-link:hover {
    color: #003d80;
}

.external-link-icon {
    margin-left: 4px;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

@media (pointer: fine), (hover: hover) {
  .icon-container {
    display: none;
  }
}

.section-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 3rem;
}

/* --- Hero --- */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #000;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(15, 17, 19, 0.3), rgba(15, 17, 19, 0.3)),
        url('assets/images/index_background.JPG');
    /* Local factory image */
    background-size: cover;
    background-position: center;
    opacity: 0.6;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(100, 100, 100, 0.1) 100%);
    pointer-events: none;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffffff;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
    font-family:'Noto Serif JP', 'Helvetica Neue', Arial, sans-serif;
}

.hero-subtext {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 2.5rem;
    letter-spacing: 0.2em;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.8s;
    font-family:'Noto Serif JP', 'Helvetica Neue', Arial, sans-serif;
}

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

/* --- Services --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.service-card {
    width: 300px;
    height: 300px;
    background: var(--card-bg);
    padding: 50px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.service-card:hover {
    transform: scale(1.01);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-h {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* --- News --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.news-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 91, 181, 0.12);
}

.news-image {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 25px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-black);
    margin-bottom: 10px;
}

.news-title-link {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    display: block;
}

/* --- Footer --- */
.footer {
    background: #002060;
    padding: 80px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #f5f5f5;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-info .logo {
    margin-bottom: 20px;
}

.footer-info p {
    font-size: 0.9rem;
    color: #a0a8b8;
}

.footer-links h4 {
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: #f5f5f5;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    font-size: 0.9rem;
    color: #a0a8b8;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer .logo {
    color: #f5f5f5;
}

@media (pointer: fine), (hover: hover) {
  a:where([href^="tel:"]) {
    pointer-events: none;
  }
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
    color: #a0a8b8;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: var(--transition);
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Admin Page Styles --- */
.admin-container {
    max-width: 800px;
    margin: 150px auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-form input,
.admin-form textarea {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-white);
    padding: 15px;
    border-radius: 4px;
}

.admin-form label {
    font-size: 0.9rem;
    color: var(--text-black);
}

/* --- Mobile Menu Toggle --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--text-white);
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}
.gradient-tab{
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* --- Responsive Design --- */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 3rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtext {
        font-size: 1rem;
    }

    .service-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

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

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .header {
        padding: 0 20px;
        height: 70px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        transform: translateX(-100%);
        transition: var(--transition);
        z-index: 999;
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav ul {
        flex-direction: column;
        gap: 0;
        padding: 40px 20px;
    }

    .nav li {
        border-bottom: 1px solid var(--border-color);
    }

    .nav a {
        display: block;
        padding: 20px 0;
        font-size: 1.1rem;
    }

    .logo a img{
       height: 70px;
    }

    .hero {
        height: 80vh;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtext {
        font-size: 0.9rem;
    }

    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-btns .btn {
        width: 100%;
        padding: 14px 20px;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2.5rem;
    }

    .section-title span {
        font-size: 0.85rem;
    }

    .service-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        width: 100%;
        height: 200px;
        padding: 30px;
    }

    .service-h {
        font-size: 1.3rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .admin-container {
        margin: 100px auto;
        padding: 30px 20px;
    }

    /* Inline styles override - add helper classes */
    .process-content,
    .company-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .recruit-container {
        padding: 30px 20px !important;
    }

    .recruit-container h2 {
        font-size: 1.8rem !important;
    }

    .recruit-container p {
        font-size: 1rem !important;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .header {
        padding: 0 15px;
        height: 60px;
    }

    .nav {
        top: 60px;
        height: calc(100vh - 60px);
    }

    .logo a img{
       height: 60px;
    }


    .hero-title {
        font-size: 2rem;
    }

    .hero-subtext {
        font-size: 0.85rem;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .service-card {
        width: 100%;
        height: 200px;
        padding: 25px;
    }

    .btn {
        padding: 12px 30px;
        font-size: 0.9rem;
    }

    .footer {
        padding: 50px 0 30px;
    }

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

.page-hero {
    background: var(--blue-gradient);
    padding: 120px 0 80px;
    text-align: center;
    color: #fff;
    border-bottom: 1px solid rgba(0, 91, 181, 0.12);
}

.page-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    background-clip: text;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #fff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 10px;
}

.article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

.article-main {
    background: #ffffff;
    padding: 60px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.article-content {
    color: var(--text-color);
    line-height: 2;
}

.article-content h2 {
    font-size: 1.8rem;
    margin: 60px 0 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid;
    border-image: linear-gradient(135deg, #005bb5 0%, #00a0e9 100%) 1;
    color: var(--text-white);
}

.article-content h3 {
    font-size: 1.5rem;
    margin: 40px 0 20px;
}

.article-content p {
    margin-bottom: 30px;
}

.article-content ul,
.article-content ol {
    margin-bottom: 0px;
    padding-left: 25px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 0px 0;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.article-content iframe {
    width: 100%;
    aspect-ratio: 4 / 3;
}

.article-content .highlight-box {
    background: #e8f4fd;
    padding: 30px;
    margin: 40px 0;
    border-left: 4px solid var(--accent-blue);
    border-radius: 4px;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
}

.article-content table th,
.article-content table td {
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: left;
}

@media (max-width: 968px) {
    .article-container {
        grid-template-columns: 1fr;
    }

    .article-main {
        padding: 40px 30px;
    }

    .page-hero h1 {
        font-size: 2rem;
    }
}

/* Style for .newspage-item layout */
.newspage-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin: 30px 0;
}

.newspage-image {
    flex: 1;
    max-width: 40%;
    max-height: 150px;
}

.newspage-image-body {
    margin: 0;
}

.newspage-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.newspage-content {
    flex: 2;
}

/* --- Recruit Interview Section --- */
.recruit-container{
    max-width: 1200px;
    margin: 0 auto;
}

.recruit-interview {
    background: var(--card-bg);
}

.recruit-interview2 {
    background: var(--card-bg2);
}

.recruit-interview-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    max-width: 1160px;
    margin: 0 auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.recruit-interview-hero {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.recruit-interview-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recruit-interview-badge {
    position: absolute;
    top: 36px;
    left: 36px;
    background: rgba(0, 91, 181, 0.82);
    color: #ffffff;
    padding: 14px 22px;
    backdrop-filter: blur(4px);
}

.recruit-interview-dept {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.recruit-interview-year {
    font-size: 0.82rem;
    opacity: 0.88;
}

.recruit-interview-quote {
    padding: 56px 80px;
    text-align: left;
    position: relative;
}

.recruit-interview-quote::before,
.recruit-interview-quote::after {
    font-size: 7rem;
    color: var(--accent-blue);
    opacity: 0.15;
    line-height: 1;
    position: absolute;
    font-family: Georgia, serif;
}

.recruit-interview-quote::before {
    content: '\201C';
    top: 16px;
    left: 32px;
}

.recruit-interview-quote::after {
    content: '\201D';
    bottom: -16px;
    right: 32px;
}

.recruit-interview-quote p {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.9;
    color: var(--text-white);
}

.recruit-interview-qa {
    padding: 0 60px 60px;
}

.recruit-qa-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 48px 0;
    border-top: 1px solid var(--border-color);
    align-items: center;
}

.recruit-qa-item--full {
    grid-template-columns: 1fr;
}

.recruit-qa-item--reverse .recruit-qa-image {
    order: -1;
}

.recruit-qa-question {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.6;
}

.recruit-qa-text p {
    color: var(--text-black);
    line-height: 2;
}

.recruit-qa-image img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .recruit-interview-hero {
        height: 260px;
    }

    .recruit-interview-badge {
        top: 20px;
        left: 20px;
        padding: 10px 16px;
    }

    .recruit-interview-quote {
        padding: 40px 30px;
    }

    .recruit-interview-quote p {
        font-size: 1.2rem;
    }

    .recruit-interview-quote::before {
        left: 12px;
    }

    .recruit-interview-quote::after {
        right: 12px;
    }

    .recruit-interview-qa {
        padding: 0 24px 40px;
    }

    .recruit-qa-item {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .recruit-qa-item--reverse .recruit-qa-image {
        order: unset;
    }

    .recruit-qa-image img {
        height: 200px;
    }
}

@media (max-width: 350px) {
    h1{
        font-size: 1.5rem;
    }
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    justify-items: center;
    align-items: center;
}

.portfolio-image {
    width: 100%;
    height: auto;
    max-width: 300px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: block;
    transition: opacity 0.2s;
}

.portfolio-grid a {
    display: inline-block;
    cursor: zoom-in;
}

.portfolio-grid a:hover .portfolio-image {
    opacity: 0.8;
}

.article-content .mail-address {
    max-width: 100%;
    height: auto;
    margin: 0px 4px;
    border-radius: 0px;
    border: none;
    display: inline;
    vertical-align: middle;
}

