@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@700;900&display=swap');

:root {
    --color-primary: #003366;
    --color-primary-dark: #002244;
    --color-secondary: #E67E22;
    --color-secondary-hover: #D35400;
    --color-bg-white: #FFFFFF;
    --color-bg-light: #F4F7F9;
    --color-text-main: #2C3E50;
    --color-text-muted: #606F7B;
    --color-border: #E1E8ED;
    
    --font-serif: 'Noto Serif JP', serif;
    --font-sans: 'Noto Sans JP', sans-serif;
    
    --container-width: 1140px;
    --header-height: 80px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text-main);
    line-height: 1.8;
    background-color: var(--color-bg-white);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-bg-light {
    background-color: var(--color-bg-light);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    line-height: 1.4;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #00a0e9;
}

.text-center {
    text-align: center;
}

/* Header */
header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    padding: 0 0 0 40px;
    box-sizing: border-box;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 43.94px; /* 1.3x of 33.8px */
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

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

.nav-menu a:hover {
    color: var(--color-secondary);
}

.menu-toggle {
    display: none;
}

.header-cta {
    background-color: #00a0e9;
    color: white;
    padding: 0 30px;
    border-radius: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    line-height: 1.2;
    text-decoration: none;
    height: var(--header-height);
    align-self: stretch;
}

.cta-small {
    font-size: 0.75rem;
    font-weight: 400;
}

.cta-tel {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
}

.header-cta:hover {
    background-color: #008cd1;
    color: white;
}

/* Hero Section */
.hero {
    height: 720px;
    display: flex;
    margin-top: var(--header-height);
}

.hero-photo {
    width: 60%;
    background: url('https://as1.ftcdn.net/v2/jpg/02/22/50/72/1000_F_222507212_hP7vglkIcFPDyb1zWVy5TfrJZylMutgS.jpg') center/cover no-repeat;
    flex-shrink: 0;
}

.hero-panel {
    width: 40%;
    background-color: #003366;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
        radial-gradient(ellipse at 100% 100%, #1a5499 0%, transparent 70%);
    background-size: 20px 20px, 20px 20px, 100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
}

.hero-content {
    text-align: left;
    color: white;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 300;
    margin-bottom: 12px;
    text-shadow: none;
    line-height: 1.5;
}

.hero-en {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.8;
    margin-bottom: 24px;
    letter-spacing: 0.05em;
    line-height: 1.7;
}

.hero-sub {
    font-size: 1.0rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    line-height: 2;
    opacity: 0.9;
    margin-bottom: 36px;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
    width: fit-content;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 40px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: 0.2s;
    box-sizing: border-box;
    white-space: nowrap;
}

.hero-btn-primary {
    background-color: #00a0e9;
    color: white;
}

.hero-btn-primary:hover {
    background-color: #008cd1;
    color: white;
}

.hero-btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.hero-btn-outline:hover {
    background-color: white;
    color: #003366;
}

/* News Section */
#news .section-title {
    color: #0c2740;
}

.news-list {
    list-style: none;
    max-width: 900px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border);
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.news-date {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.news-cat {
    background-color: #0c2740;
    color: white;
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 2px;
    white-space: nowrap;
}

.news-title {
    color: var(--color-text-main);
    font-size: 0.95rem;
    transition: color 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.news-new {
    background-color: var(--color-secondary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 2px;
    flex-shrink: 0;
}

.news-title:hover {
    color: var(--color-secondary);
}

.news-more-btn {
    display: inline-block;
    padding: 12px 40px;
    background-color: #00a0e9;
    border: 2px solid #00a0e9;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
    text-decoration: none;
}

.news-more-btn:hover {
    background-color: white;
    color: #00a0e9;
    border-color: #00a0e9;
}

/* History Section */
.history-intro {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: center;
}

/* Greeting Section */
#greeting .section-title {
    color: #0c2740;
}

.greeting-inner {
    display: flex;
    gap: 80px;
    align-items: stretch;
    max-width: 1000px;
    margin: 0 auto;
}

.greeting-text {
    flex: 1;
}

.greeting-heading {
    font-size: 2rem;
    font-weight: 300;
    color: #0c2740;
    margin-bottom: 30px;
    line-height: 1.6;
}

.greeting-rep {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
}

.greeting-rep-title {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.greeting-rep-name {
    font-size: 1.4rem;
    font-family: var(--font-serif);
    color: var(--color-primary);
}

.greeting-photo {
    flex-shrink: 0;
    width: 308px;
    display: flex;
}

.greeting-photo-placeholder {
    width: 280px;
    height: 360px;
    background-color: var(--color-bg-light);
    border: 2px dashed var(--color-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.greeting-photo-placeholder i {
    font-size: 4rem;
    opacity: 0.4;
}

/* Nexur Origin */
.nexur-origin {
    margin-top: 80px;
    background-color: var(--color-bg-light);
    border-radius: 8px;
    padding: 50px;
}

.origin-title {
    text-align: center;
    font-size: 1.8rem;
    color: #0c2740;
    margin-bottom: 40px;
    font-weight: 300;
}

.origin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.origin-item {
    background-color: white;
    padding: 30px;
    border-radius: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border-top: 3px solid #0c2740;
}

.origin-item h4 {
    font-size: 1.2rem;
    color: #0c2740;
    margin-bottom: 15px;
    line-height: 1.4;
}

.origin-item h4 span {
    display: inline-block;
    font-size: 0.9rem;
    color: #00a0e9;
    font-family: var(--font-serif);
    letter-spacing: 0.05em;
}

.origin-item p {
    font-size: 0.95rem;
    line-height: 1.8;
}

.origin-item p strong {
    font-weight: 700;
    color: #0c2740;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    padding: 20px 0 20px 40px;
    border-left: 2px solid var(--color-primary);
    position: relative;
    margin-bottom: 10px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 28px;
    width: 12px;
    height: 12px;
    background-color: #00a0e9;
    border-radius: 50%;
}

.timeline-date {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 5px;
}

/* Service Section */
.service-lead {
    font-size: 1.05rem;
    margin-bottom: 50px;
    line-height: 2;
    color: var(--color-text-muted);
}

.service-grid-new {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.service-card-new {
    background: white;
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.service-card-img {
    width: 100%;
    height: 240px;
}

.service-card-body {
    padding: 30px;
}

.service-num {
    font-size: 30px;
    color: #00a0e9;
    font-family: var(--font-serif);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 10px;
}

.service-card-new h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 20px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 15px;
}

.service-tile-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    background-color: white;
    border: 2px solid #00a0e9;
    border-radius: 50%;
    color: #00a0e9;
    font-size: 1.2rem;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.service-tile-icon i {
    display: block;
    line-height: 1;
}

.service-card-new p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
}

.service-list-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.service-list-items li {
    font-size: 0.85rem;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-list-items li i {
    color: #00a0e9;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Client Logo Grid */
.client-logo-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.client-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 30px;
    border: none;
    background: white;
    min-width: 160px;
}

.client-logo-item img {
    max-width: 140px;
    max-height: 60px;
    object-fit: contain;
    transition: all 0.3s;
}

.client-logo-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: white;
    padding: 40px;
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-primary);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.service-list {
    margin-top: 40px;
}

.service-list-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border);
}

.service-list-item::before {
    content: '■';
    color: var(--color-primary);
    margin-right: 15px;
    font-size: 0.8rem;
}

/* Client Section */
.client-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.client-item {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text-main);
}

/* Profile Section */
.profile-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    max-width: 800px;
}

.profile-table th, .profile-table td {
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
}

.profile-table th {
    width: 30%;
    text-align: left;
    background-color: var(--color-bg-light);
    color: var(--color-primary);
    font-weight: 700;
}

/* Contact Section */
.emergency-box {
    position: relative;
    background-color: #00a0e9;
    color: white;
    padding: 60px;
    text-align: center;
    border-radius: 8px;
    margin: 0 auto 60px;
    width: 80vw;
    height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
}

.emergency-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://as1.ftcdn.net/v2/jpg/03/64/49/12/1000_F_364491239_Yf9RJpCEZludGuoH1gvXC4iIN8XoHpSg.jpg') center/cover no-repeat;
    filter: grayscale(100%);
    mix-blend-mode: multiply;
    opacity: 0.6;
    z-index: 0;
}

.emergency-box > * {
    position: relative;
    z-index: 1;
}

.emergency-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--color-secondary);
}

.emergency-number {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.emergency-note {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Sticky Banner */
.sticky-banner {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.sticky-banner.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.sticky-cta-card {
    background: #0c2740;
    color: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.cta-title {
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.cta-number {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    line-height: 1;
    font-family: var(--font-serif);
}

.cta-note {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: var(--color-primary-dark);
    color: white;
    padding: 60px 0 100px; /* Space for sticky banner */
    text-align: center;
}

.footer-logo {
    margin-bottom: 30px;
}

.footer-logo img {
    max-width: 180px;
    height: auto;
    /* Inverting colors for visibility on dark footer background */
    filter: brightness(0) invert(1);
}

.copyright {
    margin-top: 40px;
    font-size: 0.8rem;
    opacity: 0.6;
}

.mobile-menu {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Header Logo */
    .logo img {
        height: 32.03px; /* 1.1x of 29.12px */
    }

    /* Hamburger Menu */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 16px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 10000; /* Ensure this is always on top */
        padding: 0;
        margin-right: 10px;
        position: relative;
    }

    .menu-toggle.active {
        position: fixed;
        right: 20px;
        top: 24px;
    }

    .menu-toggle.active span {
        background-color: #ffffff !important; /* Change to white for contrast on blue bg */
    }

    /* Hero Section Mobile */
    .hero {
        flex-direction: column;
        height: auto;
    }
    
    .hero-photo {
        width: 100%;
        height: 270px; /* Reduced to ~90% of previous 300px */
    }
    
    .hero-panel {
        width: 100%;
        padding: 40px 20px;
    }

    /* News Section */
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .news-date-group {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* Service Section */
    .service-grid-new {
        grid-template-columns: 1fr;
    }

    /* Timeline Section */
    .timeline {
        width: 80% !important;
        margin: 0 auto;
    }

    /* Profile Section Map */
    .profile-flex-container {
        flex-direction: column;
    }

    .profile-map-wrapper {
        width: 100vw !important;
        margin-left: calc(-50vw + 50%); /* Center outside container constraints */
        aspect-ratio: 1/1;
        height: auto !important;
    }

    .profile-map-wrapper iframe {
        min-height: auto !important;
    }

    /* Footer CTA */
    .emergency-box {
        padding: 40px 20px !important;
    }

    .emergency-box .emergency-title {
        font-size: 24px !important;
    }

    .emergency-box .emergency-number {
        font-size: 28px !important;
    }

    .emergency-box .emergency-note {
        font-size: 14px !important;
    }

    .emergency-box p:last-child {
        font-size: 14px !important;
    }

    /* Header Mobile Adjustments */
    header {
        height: 64px !important; /* 80% of 80px */
        padding: 0 20px !important;
    }
    
    .header-cta {
        display: none !important;
    }

    .logo {
        margin-left: 0;
    }

    .hero {
        margin-top: 64px !important;
        transform: translateY(-40px);
    }

    /* News Tag Adjustment */
    /* News Panel Mobile Layout */
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 25px 0;
    }

    .news-meta {
        margin-bottom: 12px;
    }

    .news-title {
        line-height: 1.6;
        display: block;
    }

    .news-new {
        display: inline-block;
        margin-right: 8px;
        vertical-align: baseline;
    }

    .news-text {
        display: inline;
    }

    /* Footer CTA width and font */
    .emergency-box {
        width: 90vw !important;
    }

    .emergency-box .emergency-number {
        font-size: 28px !important;
    }

    .nav-menu {
        display: none;
    }
    
    .greeting-inner {
        flex-direction: column;
        gap: 40px;
    }
    
    .greeting-photo {
        width: 100%;
        max-width: 308px;
        margin: 0 auto;
    }

    .origin-grid {
        grid-template-columns: 1fr;
    }
    
    .nexur-origin {
        padding: 30px 20px;
        margin-top: 50px;
    }
    
    .hero-title {
        font-size: calc(2.2rem - 2px);
    }
    
    .hero-sub {
        font-size: calc(1.0rem - 1px) !important;
        line-height: 1.6;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    /* Sticky Banner Mobile Full Width */
    .sticky-banner {
        width: 100% !important;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
    }

    .sticky-cta-card {
        border-radius: 0 !important;
        width: 100% !important;
        box-sizing: border-box;
        padding: 12px 20px !important; /* Reduced from 20px to 12px (approx 60-80% height feel) */
    }

    /* Hamburger Menu */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 24px; /* 80% of 30px */
        height: 16px; /* 80% of 20px */
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        margin-right: 10px;
        position: relative;
    }

    .menu-toggle span {
        width: 100%;
        height: 2px;
        background-color: var(--color-primary);
        transition: all 0.3s ease;
    }

    /* Close Button inside Mobile Menu */
    .menu-close {
        position: fixed;
        top: 20px; /* Aligned with header center (64px header) */
        right: 30px; /* Aligned with .menu-toggle (20px padding + 10px margin) */
        width: 24px;
        height: 24px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1100;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .menu-close span {
        position: absolute;
        width: 100%;
        height: 2px;
        background-color: #ffffff;
        transition: all 0.3s ease;
    }

    .menu-close span:nth-child(1) {
        transform: rotate(45deg);
    }

    .menu-close span:nth-child(2) {
        transform: rotate(-45deg);
    }

    .menu-close:hover span {
        opacity: 0.8;
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #00a0e9;
        z-index: 1001;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .mobile-menu.active {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-nav ul {
        list-style: none;
        padding: 0;
        margin-bottom: 40px;
        text-align: center;
    }

    .mobile-nav ul li {
        margin-bottom: 25px;
    }

    .mobile-nav ul li a {
        font-size: calc(1.35rem - 1px);
        font-weight: 400;
        color: #ffffff; /* White text on blue background */
        text-decoration: none;
    }

    .mobile-menu-cta {
        padding: 0 40px;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-cta-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        background-color: #ffffff; /* White button */
        color: #00a0e9; /* Blue text */
        text-decoration: none;
        padding: 20px;
        border-radius: 8px;
        font-weight: 700;
        font-size: 1.2rem;
    }

    .profile-table th {
        width: 40%;
    }
}
