/* Global Variables */
:root {
    --primary: #0F172A;
    /* Deep Navy */
    --accent: #F97316;
    /* Vibrant Orange */
    --accent-glow: rgba(249, 115, 22, 0.3);
    --bg-body: #F8FAFC;
    --bg-card: #FFFFFF;
    --text-main: #334155;
    --text-light: #64748B;
    --text-white: #F1F5F9;
    --gradient-hero: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #C2410C 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.75rem;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    height: 80px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-main);
}

.nav-menu a:hover,
.nav-menu a.current {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    margin-top: 80px;
    /* Offset fixed header */
    padding: 6rem 2rem;
    background: linear-gradient(rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.2)), url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-white);
    text-align: center;
    /* Reset to center for children inheritance */
    position: relative;
    overflow: hidden;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    width: fit-content;
    /* Shrink to fit content so it can be centered */
    text-align: left;
    /* Align lines to left */
}

.hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 5.5rem;
    /* Further increased */
    font-weight: 700;
    /* Reduced from 900 */
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    line-height: 1.1;
    text-transform: uppercase;
}

.hero p {
    font-size: 2rem;
    /* Increased size */
    opacity: 1;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 3rem;
    /* Added space before button */
    letter-spacing: 0.05em;
    letter-spacing: 0.05em;
}

/* Subpage Hero Override */
.subpage-hero .hero-content {
    width: 100%;
    text-align: center;
    max-width: 800px;
    /* Limit width for readability on subpages */
}

.subpage-hero h1 {
    font-size: 3rem;
    /* Standard title size for subpages */
    font-family: 'Noto Sans JP', sans-serif;
    /* Revert to standard font if needed, or keep Montserrat */
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
    text-transform: none;
}

.subpage-hero p {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0;
}

/* Section Common */
.section {
    padding: 5rem 2rem;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-bg {
    background-color: #E2E8F0;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-light);
}

/* Buttons */
.cta-button {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 14px 0 var(--accent-glow);
    transition: var(--transition);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 var(--accent-glow);
    background-color: #EA580C;
    /* Darker Orange */
}

/* News List */
.news-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    /* Added for clickable card */
    display: block;
    text-decoration: none;
    color: inherit;
}

.news-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-glow);
}

.news-date {
    display: flex;
    align-items: center;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.news-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Footer */
.footer {
    background-color: var(--primary);
    color: var(--text-white);
    padding: 2rem 2rem 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94A3B8;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid #1E293B;
    text-align: center;
    padding-top: 2rem;
    color: #64748B;
    font-size: 0.9rem;
}

/* Utility / Refactor Helpers */
.text-light {
    color: var(--text-light);
}

.leading-relaxed {
    line-height: 1.8;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mt-1 {
    margin-top: 1rem;
}

.p-box {
    background: var(--bg-body);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.font-bold {
    font-weight: 600;
}

.mb-05 {
    margin-bottom: 0.5rem;
}

.text-sm {
    font-size: 0.95rem;
}

.list-disc {
    list-style: disc;
    margin-left: 1.5rem;
    color: var(--text-light);
}
/* Mobile Responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 1rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 3.2rem;
        /* Slightly larger */
    }

    .hero p {
        font-size: 1.4rem;
        /* Increased for better presence */
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Standardized Responsive Utilities */
    .section {
        padding: 3rem 1.25rem;
    }

    .responsive-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .responsive-flex {
        flex-direction: column;
        gap: 1.5rem;
    }

    .responsive-card {
        padding: 1.5rem;
    }

    .responsive-margin-top {
        margin-top: 3rem;
    }

    .responsive-min-width {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .subpage-hero h1 {
        font-size: 2.2rem;
    }
}

/* Base utility classes for clean coding standards */
.d-grid {
    display: grid;
}

.d-flex {
    display: flex;
}

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

.justify-center {
    justify-content: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Grid presets */
.grid-2-cols {
    grid-template-columns: repeat(2, 1fr);
}

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

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

.gap-1 {
    gap: 1rem;
}

.gap-2 {
    gap: 2rem;
}

.gap-3 {
    gap: 3rem;
}

.gap-4 {
    gap: 4rem;
}

/* Margin presets */
.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 3rem;
}

.mt-6 {
    margin-top: 6rem;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* Padding presets */
.p-card {
    padding: 2.5rem;
}

.p-lg {
    padding: 3rem;
}

.p-xl {
    padding: 4rem 2rem;
}

/* Text presets */
.text-center {
    text-align: center;
}

/* Specific Components */
.card-border-top {
    border-top: 4px solid var(--accent);
}

.card-border-left {
    border-left: 4px solid var(--accent);
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: var(--radius);
}

.box-shadow-none {
    box-shadow: none;
}

.border-dashed {
    border: 1px dashed var(--accent);
}

.bg-light-transparent {
    background: rgba(0, 0, 0, 0.02);
}

.max-w-900 {
    max-width: 900px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Service Page Specific Cards */
.service-card {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 3rem;
    margin-bottom: 4rem;
}

.service-icon {
    flex: 0 0 80px;
    font-size: 3rem;
    color: var(--accent);
    text-align: center;
}

.service-content {
    flex: 1;
    min-width: 0;
    /* allows text to wrap correctly */
}

@media (max-width: 768px) {

    .grid-2-cols,
    .grid-auto-fit,
    .grid-auto-fit-lg {
        grid-template-columns: 1fr !important;
    }

    .service-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem 1.25rem !important;
        gap: 0.75rem;
        margin-bottom: 2rem;
    }

    .service-icon {
        flex: 0 0 auto;
        font-size: 2.5rem;
        margin-bottom: 0;
    }

    .service-content h2.news-title {
        display: inline-block;
        border-bottom: 2px solid var(--accent) !important;
        padding-bottom: 0.5rem;
        text-align: center;
    }

    .service-content p {
        text-align: left;
        /* Keep the paragraph text readable but visually center the block if preferred. Or make it center. Often center is best for mobile cards */
        text-align: center !important;
    }
}