@font-face {
    font-family: 'Noto Sans JP';
    src: url('noto-serif-jp-japanese-400-normal.ttf');
}
/* --- Global Styles & Variables --- */
:root {
    --primary-color: #012543;
    --secondary-color: #ffffff;
    --accent-color: #1e90ff;
    --light-gray: #f4f4f8;
    --dark-gray: #012543;
    --font-primary: 'Noto Sans JP', sans-serif;
    --primary-color-rgb: #012543;
    --subtle-pattern-color: rgba(0, 0, 0, 0.02);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--secondary-color);
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 0.8em;
    line-height: 1.3;
}
h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1em;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

ul {
    list-style-position: inside;
    margin-bottom: 1em;
    margin-left: 10px;
}

/* --- Header --- */
header {
    background-color: var(--secondary-color);
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}
.logo:hover {
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    margin: 0; padding: 0;
}

.main-nav li {
    margin-left: 25px;
}

.main-nav a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a.active::after,
.main-nav a:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.main-nav a::after { /* Enhanced hover effect */
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%; /* Start from center */
    width: 0;    /* Start with no width */
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease, left 0.3s ease; /* Animate width and left */
}

/* --- Mobile Navigation --- */
.mobile-nav-toggle {
    display: none; /* Hidden by default, shown in media query */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    left: 0;
    transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    top: 8px;
}

/* --- Hero Section --- */
.hero {
    color: var(--secondary-color);
    text-align: center;
    padding: 80px 0 100px; /* Adjust bottom padding to control space for the slant effect */
    position: relative;
    overflow: visible; /* Allow content from next section to be visible if it has higher z-index */
    z-index: 10; /* Hero content should be on top */
}
.hero-home { background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%); }
.hero-fees { background: linear-gradient(135deg, #2a9d8f 0%, #264653 100%); }
.hero-company { background: linear-gradient(135deg, #e76f51 0%, #f4a261 100%); }

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5em;
    color: var(--secondary-color);
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 1em auto;
    opacity: 0.9;
}

.hero {
    /* This clip-path creates a slant from bottom-left (full height) to bottom-right (shorter)
       It effectively cuts into the bottom of the hero section.
       The last two points define the bottom edge: (0, 100%) and (100%, calc(100% - 80px))
       80px is the vertical height of the slant on the right side. Adjust as needed.
    */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 80px), 0 100%);
}

/* .hero {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 80px));
} */
/* --- Content Sections --- */
.content-section {
    padding: 60px 0;
    position: relative;
}

.hero + .content-section {
    margin-top: -80px; /* Pull this section up by the height of the slant. Must match the value in hero's clip-path calc() */
    padding-top: calc(60px + 80px); /* Original padding-top + slant height, to push content down */
    position: relative;
    z-index: 1; /* Ensure this section is behind the hero's text content but its BG is visible through clip-path */
}

.content-section:nth-of-type(even) {
    background-color: var(--light-gray);
    background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23e0e0eb' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5z'/%3E%3C/g%3E%3C/svg%3E");
}

/* 0----------- */
.content-section .container {
    max-width: 800px;
    position: relative; /* Ensure container content is above its section's BG if needed */
    z-index: 2; /* Higher than section's z-index if section has one for its BG */
}

.content-section h2 {
    position: relative;
    padding-bottom: 0.5em;
    margin-bottom: 1em;
}
.content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

/* --- Fee System Specific --- */
.fee-structure {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.fee-item {
    background-color: var(--light-gray);
    padding: 25px;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.fee-item h3 {
    margin-top: 0;
    color: var(--primary-color);
}
.fee-item .price {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.5em;
}

.fee-item h3 i { /* Style for icons in fee titles */
    margin-right: 10px;
    color: var(--accent-color);
}

.fee-item:hover {
    transform: translateY(-5px); /* Lift effect */
    box-shadow: 0 8px 25px rgba(var(--primary-color-rgb, 30, 144, 255), 0.15); /* Shadow using primary color */
}

.fee-item ul {
    margin-left: 0; padding-left: 20px;
}

/* --- Company Info Table --- */
.company-info-table th i { /* Style for icons in table headers */
    margin-right: 8px;
    width: 20px; /* Ensure consistent icon spacing */
    text-align: center;
    color: var(--primary-color);
}

.company-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.company-info-table th, .company-info-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
}
.company-info-table th {
    background-color: var(--light-gray);
    width: 30%;
    font-weight: bold;
}
.company-info-table td ul {
    margin: 0; padding-left: 20px;
}

/* --- Scroll Animations --- */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Footer --- */
footer {
    background-color: var(--dark-gray);
    color: var(--secondary-color);
    text-align: center;
    padding: 30px 0;
}
footer p {
    margin: 0;
    opacity: 0.8;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }

    .main-nav {
        display: none; /* Hide nav by default on mobile */
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        width: 100%;
        background-color: var(--secondary-color);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        flex-direction: column; /* Stack links vertically */
    }
    .main-nav.active { /* Show nav when active class is added */
        display: flex;
    }
    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }
    .main-nav li {
        margin: 0;
        text-align: center;
        border-bottom: 1px solid #e0e0e0;
    }
    .main-nav li:last-child {
        border-bottom: none;
    }
    .main-nav a {
        display: block;
        padding: 1rem;
        width: 100%;
    }
    .main-nav a.active::after,
    .main-nav a:hover::after {
        display: none; /* Remove underline for mobile nav items */
    }
    .main-nav a.active {
        background-color: var(--light-gray);
    }

    .mobile-nav-toggle {
        display: block; /* Show hamburger icon */
    }

    /* Styles for when mobile nav is open (X icon) */
    .mobile-nav-toggle[aria-expanded="true"] .hamburger-icon {
        background-color: transparent; /* Middle bar disappears */
    }
    .mobile-nav-toggle[aria-expanded="true"] .hamburger-icon::before {
        transform: rotate(45deg);
        top: 0;
    }
    .mobile-nav-toggle[aria-expanded="true"] .hamburger-icon::after {
        transform: rotate(-45deg);
        top: 0;
    }
    .hero {
        padding-bottom: 60px; 
        
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 50px), 0 100%);
    }
    .hero + .content-section {
        margin-top: -50px;
        padding-top: calc(60px + 50px);
    }
    .logo {
        font-size: 1.2rem;
    }
}
