/* Base Reset & Typography */
html { font-size: 85%; }
@media screen and (min-width: 782px) { html { font-size: 92.5%; } }
@media screen and (min-width: 980px) { html { font-size: 100%; } }

body {
    color: #444;
    font-family: "Noto Sans JP", "Helvetica", "Arial", sans-serif;
    font-size: 18px;
    line-height: 1.6;
    word-wrap: break-word;
    background-color: #fff;
    margin: 0;
    overflow-x: hidden; /* Prevent horizontal scroll without breaking sticky header */
}

h1, h2, h3, h4, h5, h6 { clear: both; color: #111; font-weight: 700; line-height: 1.5; margin-top: 0; }
p { margin: 0 0 1.8em; }
strong, b { color: #3C5C8D; } /* Set bold text to match the banner accent color */
a { color: #4693f5; text-decoration: underline; transition: all .15s ease-in-out; }
a:hover { color: #639af6; }
img { height: auto; max-width: 100%; vertical-align: middle; }

/* Structural Layout & Sticky Header */
.site-header { 
    border-bottom: solid 1px #eee; 
    position: sticky; /* Keeps the header at the top */
    top: 0; 
    background-color: #fff; /* Opaque background to hide scrolling content */
    z-index: 9999; /* Ensures header stays above all other elements */
}
.site-content { margin-bottom: 6rem; }
.alignfull { width: 100vw; margin-left: calc( 50% - 50vw ); max-width: none; }

/* Header & Branding */
.main-header-content { display: flex; align-items: center; justify-content: space-between; }
.site-branding img { transform-origin: center left; }

/* Navigation */
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.main-navigation a { color: #111; text-decoration: none; font-weight: 500; display: block; padding: 15px; }
.main-navigation a:hover { color: #00469b; }
.main-navigation li { position: relative; }
.main-navigation .sub-menu { 
    display: none; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    background: #fff; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); 
    min-width: 200px; 
    z-index: 1000; 
}
.main-navigation .menu-item-has-children:hover .sub-menu { display: block; }
.main-navigation .sub-menu a { border-bottom: 1px solid #eee; padding: 10px 15px; }

/* Footer & Widgets */
.site-footer { border-top: 1px solid #eee; padding: 40px 0; background-color: #f4f5f6; }
.footer-widget-wrapper { display: flex; flex-wrap: wrap; }
.widget { color: #666; font-size: 90%; margin-bottom: 2rem; padding: 0 20px; }
.widget h3 { color: #333; font-size: 1.2rem; letter-spacing: 0.05em; margin-bottom: 1.5rem; text-transform: uppercase; }
.widget ul { list-style: none; padding-left: 0; margin: 0; }
.widget li { margin-bottom: 1em; }
.widget a { text-decoration: none; color: inherit; }
.widget a:hover { color: #00469b; }
.site-bottom { text-align: center; margin-top: 20px; font-size: 15px; }

@media screen and (min-width: 980px) {
    .footer-widget-1 { width: 50%; }
    .footer-widget-2, .footer-widget-3 { width: 25%; }
}
@media screen and (max-width: 979px) {
    .footer-widget-wrapper > div { width: 100%; margin-bottom: 20px; }
}

/* Global Width Constraints */
.main-header-content, 
.site-content, 
.footer-widget-wrapper,
.custom-container {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
}

/* Override inline padding in HTML to reduce the gap below the header */
.custom-container {
    padding-top: 5px !important; 
}

/* Adjusted Philosophy Section */
.philosophy-section { 
    width: 100% !important;
    padding-top: 30px !important; 
    padding-bottom: 20px !important; 
    box-sizing: border-box !important;
}

/* Base Content Block */
.content-block { 
    background-color: #ffffff; 
    border: 1px solid #e6f0fa; 
    border-radius: 16px; 
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    margin-bottom: 30px !important; 
    overflow: hidden !important; 
}
.content-block:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0,70,155,0.08); 
    border-color: #cce0f5; 
}
.content-block:last-of-type { margin-bottom: 0 !important; }
@media screen and (max-width: 767px) { .content-block { padding: 25px; } }

.flex-row { display: flex !important; gap: 40px !important; align-items: flex-start !important; margin-top: 30px !important; }
.flex-image { flex: 0 0 40% !important; max-width: 500px !important; }
.flex-image img { width: 100% !important; height: auto !important; }
.flex-text { flex: 1 !important; line-height: 1.8 !important; font-size: 1.15rem !important; }

.content-block h3 {
    border-bottom: 3px solid #0056b3 !important;
    color: #00469b !important;
    display: block !important;
    width: 100% !important;
    padding-bottom: 10px !important;
    margin-bottom: 25px !important;
    font-size: 2.0rem;
}

.em-name-image { text-align: center !important; margin-top: 30px !important; margin-bottom: 0 !important; }
.em-name-image img { display: inline-block !important; width: auto !important; max-width: none !important; }

/* Constrain Top Visual Banner width to match header */
.main-visual-banner {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

/* ==========================================================================
   Unified Corporate Theme Styles
   ========================================================================== */

.welcome-section,
.footer-accent-section {
    text-align: center;
    padding: 32px 20px 37px 20px;
    border-radius: 16px;
    border: 2px solid #00469b;
    background: linear-gradient(180deg, #f0f5fa 0%, #e6f0fa 100%);
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

.welcome-section { margin-top: 5px; }
.footer-accent-section { margin-top: 30px; margin-bottom: 30px; }

.welcome-section .banner-title,
.footer-accent-section .accent-title {
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 25px;
    color: #3C5C8D; 
}

.welcome-section .banner-subtitle,
.footer-accent-section .accent-subtitle {
    font-size: 1.15rem;
    max-width: 800px;
    margin: 0 auto;
    color: #333333;
    line-height: 1.85;
    font-weight: 400;
}

.welcome-section .text-highlight,
.footer-accent-section .text-highlight {
    color: #3C5C8D; 
    font-weight: 700;
}

@media screen and (max-width: 767px) {
    .welcome-section,
    .footer-accent-section { padding: 22px 15px 27px 15px; border-radius: 8px; }
    .welcome-section { margin-top: 5px; }
    .footer-accent-section { margin-top: 20px; margin-bottom: 20px; }
    .welcome-section .banner-title,
    .footer-accent-section .accent-title { font-size: 1.85rem; margin-bottom: 15px; }
    .welcome-section .banner-subtitle,
    .footer-accent-section .accent-subtitle { font-size: 1.05rem; line-height: 1.7; }
}

/* ==========================================================================
   Call To Action (CTA) Sections
   ========================================================================== */

.call-to-action-section {
    text-align: center;
    padding: 50px 40px;
    border-radius: 16px;
    border: 2px solid #00469b;
    background: linear-gradient(180deg, #f0f5fa 0%, #e6f0fa 100%);
    box-sizing: border-box;
    width: 100%;
}

.call-to-action-section h4 {
    color: #00469b;
    font-weight: 700;
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 15px;
}

.call-to-action-section p {
    color: #333;
    margin-bottom: 25px;
}

.cta-button {
    background-color: #00469b;
    color: #fff !important;
    padding: 15px 35px;
    text-decoration: none !important;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.2s ease;
}

.cta-button:hover {
    background-color: #095A92; 
}

/* ==========================================================================
   Generic Icon Banner Layout
   ========================================================================== */

.banner-divider {
    width: 1000px;
    max-width: 100%;
    height: 4px;
    background-color: #3C5C8D; 
    margin: 0 auto 30px auto;
}

.banner-icons {
    display: flex;
    justify-content: center;
    gap: 200px;
    margin-bottom: 30px;
}

.banner-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.banner-message {
    text-align: center;
    color: #444;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 3.2em; 
    display: flex;
    align-items: center;
    justify-content: center;
}

@media screen and (max-width: 1050px) {
    .banner-divider { width: 90%; }
    .banner-icons { gap: 80px; }
}

@media screen and (max-width: 767px) {
    .banner-icons { gap: 40px; }
    .banner-icon { width: 60px; height: 60px; }
}

/* Header: Dropdown menu width adjustment */
.site-header ul li ul {
    min-width: 220px !important;
}

.site-header ul li ul li a {
    white-space: nowrap !important;
}

/* ==========================================================================
   Page Specific Components (Integrated)
   ========================================================================== */

/* --- index.html --- */
.main-visual-banner { position: relative; background-color: #000; }
.main-visual-banner::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(0, 70, 155, 0.25), rgba(60, 92, 141, 0.05));
    pointer-events: none;
}
.main-visual-banner img { transition: transform 6s ease-out; opacity: 0.98; }
.main-visual-banner:hover img { transform: scale(1.03); }

.reveal-item { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal-item.active { opacity: 1; transform: translateY(0); }

/* --- projects.html --- */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; margin-bottom: 50px; }
.project-card { aspect-ratio: 1 / 1; border: 2px solid #00469b; border-radius: 16px; padding: 25px; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.05); display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform 0.2s ease, box-shadow 0.2s ease; box-sizing: border-box; overflow: hidden; }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0,70,155,0.1); }
.project-image-box { width: 100%; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background-color: #fff; border-radius: 8px; padding: 10px; box-sizing: border-box; }
.project-image-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.project-text-box { flex: 0 0 auto; width: 100%; }
.project-text-box p { font-size: 0.95rem; color: #444; line-height: 1.6; margin: 0; height: 4.8em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media screen and (max-width: 767px) { .projects-grid { grid-template-columns: 1fr; gap: 30px; } .project-card { padding: 20px; } }

/* --- core-technologies.html --- */
.tech-tag-container { display: flex; flex-wrap: wrap; gap: 12px; }
.tech-tag { display: inline-flex; align-items: center; gap: 8px; background-color: #f8fbff; color: #333; padding: 0 16px; height: 38px; border-radius: 8px; font-size: 0.95rem; font-weight: 500; border: 1px solid #dce8f5; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.tech-tag:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,70,155,0.1); border-color: #00469b; }
.tech-tag i { font-size: 1.2rem; line-height: 1; display: flex; }
.custom-icon { width: 1.2rem; height: 1.2rem; object-fit: contain; display: inline-block; }
.th-content { display: flex; align-items: center; gap: 12px; }
.category-icon { width: 28px; height: 28px; object-fit: contain; }

/* --- emg.html & contact-us.html (Reusable Cards) --- */
.company-card {
    border: 2px solid #00469b;
    border-radius: 16px;
    padding: 25px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}
.logo-box {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background-color: #fcfcfc;
    border-radius: 8px;
    padding: 15px 20px; 
    box-sizing: border-box;
}
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.company-link { display: inline-block; margin-top: 5px; font-size: 0.85rem; color: #00469b; text-decoration: underline; }
.company-link:hover { color: #095A92; }

.full-width-card {
    background-color: #ffffff;
    border: 1px solid #e6f0fa;
    border-radius: 16px;
    padding: 50px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    width: 100%;
    box-sizing: border-box;
}

/* --- brasov.html (Feature Grids) --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}
.feature-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e9ecef;
}
.feature-card h4 {
    color: #00469b;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
}
.feature-card p {
    color: #555;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.7;
}

/* --- privacy-policy.html --- */
.policy-section { margin-bottom: 40px; }
.policy-section h3 {
    border-left: 4px solid #00469b;
    padding-left: 12px;
    margin-bottom: 20px;
    color: #00469b;
    font-weight: 700;
    font-size: 1.5rem;
}
.policy-section p { line-height: 1.8; margin-bottom: 15px; color: #444; }
.policy-section ul { line-height: 1.8; margin-bottom: 20px; padding-left: 20px; color: #444; }
.policy-section ul li { margin-bottom: 10px; }