/* Base settings for the whole page: background, font and text size */
body {
    margin: 0;
    background-color: #FFFCD9;
    font-family: "Grandstander", sans-serif;
    font-size: 20px;
    color: #000000;
}

/* Fixed size and thickness for the heading */
h1 {
    font-size: 40px;
    font-weight: 600;
    margin: 0;
    margin-bottom: 10px;
}

/* Removes the browser's default spacing around paragraphs */
p {
    margin: 0;
}

main {
    position: relative;
    max-width: 1512px;
    margin: 0 auto;
}

/* Title and text: centred, with space above and below */
header {
    text-align: center;
    padding-top: 20px;
    margin-bottom: 20px;
}

/* The scene: holds the city, alien and schools button, centred, max 950px so it fits on one screen */
.scene {
    position: relative;
    width: 70%;
    max-width: 950px;
    margin: 0 auto;
}

/* The city box: the reference point for the buildings */
.city {
    position: relative;
}

/* The background image fills the city box with rounded corners */
.city-bg {
    display: block;
    width: 100%;
    border-radius: 25px;
}

/* Building buttons: positioned absolute, relative to the city.
   Removed the default button background, border and padding */
.building {
    position: absolute;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* The drawing fills the whole button, with the shadow and transition for hover fast drop*/
.building img {
    display: block;
    width: 100%;
    filter: drop-shadow(-4px 4px 4px rgba(0, 0, 0, 0.75));
    transition: transform 0.1s ease-in, filter 0.1s ease-in;
}

/* Hover and keyboard focus: the drawing lifts with a softer shadow and soft transition for the lift */
.building:hover img,
.building:focus-visible img {
    transform: translateY(-6px);
    filter: drop-shadow(-6px 10px 6px rgba(0, 0, 0, 0.6));
    transition: transform 0.35s ease-out, filter 0.35s ease-out;
}


/* ===== BUILDING BUTTONS =====
   Positioned in % so the buttons stay in place
   when the city image scales */

.design-btn {
    left: 16%;
    top: 19%;
    width: 22%;
}

.marketing-btn {
    left: 44.8%;
    top: 15%;
    width: 23%;
}

.it-btn {
    left: 69%;
    top: 28.5%;
    width: 23%;
}

.skole-btn {
    left: 5.7%;
    top: 57.7%;
    width: 30%;
}

/* Alien: positioned to the scene, overlapping the city and going out of its frame */
.alien {
    position: absolute;
    left: -19%;
    top: 43%;
    width: 25.5%;
}

/* YELLOW BUTTONS: shared style for the back, schools and close button.
   Rounded, with the shadow and font. Each button has its own position */
.back-btn,
.schools-btn,
.close-btn {
    background-color: #FFED62;
    border: none;
    border-radius: 100px;
    font-family: inherit;
    color: #000000;
    cursor: pointer;
    filter: drop-shadow(4px 5px 2px rgba(0, 0, 0, 0.9));
    transition: background-color 0.2s ease-out;
}

.back-btn {
    position: absolute;
    left: 7%;
    top: 60px;
    width: 65px;
    height: 65px;
    font-size: 40px;
    line-height: 1;
}

.schools-btn {
    position: absolute;
    right: -16%;
    top: 93%;
    padding: 20px 15px;
    font-size: 20px;
    font-weight: 500;
    white-space: nowrap;
}

/* Yellow buttons hover and keyboard mode */
.back-btn:hover,
.back-btn:focus-visible,
.schools-btn:hover,
.schools-btn:focus-visible,
.close-btn:hover,
.close-btn:focus-visible {
    background-color: #85FE82;
}



/* ===== CARDS =====*/
/* The card box: white, rounded, with a shadow and a coloured border.*/
.card {
    width: 90%;
    max-width: 660px;
    padding: 24px 30px;
    border: 6px solid;
    border-radius: 25px;
    background-color: #FFFFFF;
    box-shadow: -4px 4px 10px rgba(0, 0, 0, 0.4);
    font-size: 17px;
    line-height: 1.35;
}

/* Darkens the page behind an open card */
.card::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
}

.card h2 {
    font-size: 30px;
    font-weight: 600;
    margin: 0;
    margin-bottom: 4px;
}

/* ===== CARD COLOURS ===== Each card gets the colour of its building.
   The border uses the bright building colour, the title a darker version so it is readable on white */
.design-card {
    border-color: #FFE54D;
}

.design-card h2 {
    color: #B08A00;
}

.marketing-card {
    border-color: #5FDDF2;
}

.marketing-card h2 {
    color: #1590A8;
}

.it-card {
    border-color: #8FDB88;
}

.it-card h2 {
    color: #2F8A2F;
}

.skole-card {
    border-color: #F0936A;
}

.skole-card h2 {
    color: #C9512A;
}

/* Small headings */
.card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #555555;
    margin: 0;
    margin-top: 14px;
    margin-bottom: 2px;
}

/* Job list: removed the default bullets and indent */
.job-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Each row: flex puts the job title to the left and the number to the right, with a line between rows */
.job-list li {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #E5E5E5;
}

/* The number of job ads: the last span in each row, red and bold */
.job-list li span:last-child {
    color: #D62828;
    font-weight: 600;
}

/* Big red number, used for the salary */
.number {
    color: #D62828;
    font-size: 24px;
    font-weight: 600;
}

/* the small gray text inside cards*/
.source {
    font-size: 14px;
    color: #666666;
    margin-top: 4px;
}

/* Close button: sits at the bottom of the card, gets its yellow look from the shared yellow buttons */
.close-btn {
    margin-top: 18px;
    padding: 10px 28px;
    font-size: 18px;
    font-weight: 500;
}

/* ===== SCHOOLS CARD ===== */
/* Max 80% of the screen height, the list scrolls inside */
.schools-card {
    border-color: #FFD254;
    max-height: 80vh;
}

.schools-card h2 {
    color: #B08A00;
}

/* School list: removed the default bullets and indent.
Grid puts the schools in one column with space between */
.school-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

/* School buttons: links styled as white rounded boxes with a yellow border.
 No default blue colour and underline of links */
.school-btn {
    display: block;
    padding: 10px 14px;
    border: 3px solid #FFD254;
    border-radius: 15px;
    background-color: #FFFFFF;
    color: #000000;
    text-decoration: none;
    transition: border-color 0.2s ease-out;
}

/* School buttons hover and keyboard mode: the border turns alien green */
.school-btn:hover,
.school-btn:focus-visible {
    border-color: #85FE82;
}

/* School names: removed the browser's default spacing around the heading */
.school-btn h4 {
    margin: 0;
}

/* The cities: small and grey */
.location {
    font-size: 15px;
    color: #555555;
}

/* Online, English or winter start: small and red, with a little space before */
.comments {
    margin-left: 6px;
    font-size: 14px;
    color: #D62828;
}
