/* style/style.css */

:root {
    --bg: #f4f4f4;
    --text: #333;
    --header: #f5f5f500;
    --nav: #082038;
    --main-bg: white;
    --button-bg: #082038;
    --button-hover: #082038;
    --footer-bg: #082038;
    --banner-img: url('../images/banner.jpg');
    --toggle-icon: url('../images/moon.png');
}

body.dark-mode {
    --bg: #1e1e1e;
    --text: #eeeeee;
    --header: #fffdfd00;
    --nav: #333333;
    --main-bg: #2a2a2a;
    --button-bg: #444;
    --button-hover: #666;
    --footer-bg: #222;
    --banner-img: url('../images/banner.jpg');
    --toggle-icon: url('../images/sun.png');
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
}

header {
    background: var(--header);
    color: 082038;
    padding: 6em 0 4em;
    text-align: center;
    position: relative;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background-image: var(--banner-img);
    background-size: cover;
    background-position: center;
    z-index: -1;
    opacity: 0.4;
    mix-blend-mode: multiply;
}

nav {
    position: relative;
    z-index: 2;
}

nav ul {
    list-style: none;
    padding: 0 40em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--nav);
    margin: 0;
    height: 2em;
}

nav li {
    margin: 0 15px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    position: relative;
    z-index: 3;
}

nav::after {
    content: "";
    display: inline-block;
    transform: translateY(-100%);
    width: 10000px;
    height: 32px;
    background-image: url('../images/japan.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    margin-left: auto;
    margin-right: 1em;
    z-index: 3;
}

main {
    padding: 1em;
    max-width: 1200px;
    margin: auto;
    background-color: var(--main-bg);
}

section {
    margin-bottom: 2em;
}

img {
    max-width: 100%;
    height: auto;
    margin: 0.5em 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

th,
td {
    border: 1px solid #ccc;
    padding: 0.5em;
    text-align: left;
}

form {
    display: grid;
    gap: 0.5em;
}

input,
select,
textarea,
button {
    padding: 0.5em;
    font-size: 1em;
    width: 100%;
    max-width: 400px;
    background-color: white;
    color: black;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background-color: #444;
    color: #fff;
    border: 1px solid #666;
}

button {
    background-color: var(--button-bg);
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: var(--button-hover);
}

footer {
    background-color: var(--footer-bg);
    color: white;
    text-align: center;
    padding: 1em 0;
    margin-top: 11em;
}

.toggle-mode {

    position: fixed;
    position: fixed;
    top: 1em;
    right: 1em;
    width: 100px;
    height: 50px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
    border: none;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.3em 0.6em;
    font-size: 0.9em;
    border-radius: 999px;
}

.toggle-mode::before {
    content: "";
    display: inline-block;
    width: 30px;
    height: 30px;
    background-image: var(--toggle-icon);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

@media (max-width: 600px) {
    nav ul {
        flex-direction: column;
        align-items: center;
        height: auto;
    }

    nav li {
        margin: 0.5em 0;
    }

    nav::after {
        display: none;
    }
}

.center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 50%;
}

.information-tableau {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5em;
    padding: 1em;
}

.information-carrer {
    background-color: var(--main-bg);
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.information-carrer:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.information-carrer img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.information-carrer h2 {
    font-size: 1.2em;
    margin: 0.6em;
    color: var(--header);
}

.information-carrer p {
    font-size: 0.95em;
    margin: 0 0.6em 1em;
    color: var(--text);
}