/* ========================================
   CSS VARIABLES
   ======================================== */

:root {
    --primary-color: #DBBB68;
    --secondary-color: #152242;
    --hover-bg: #555;
    --shadow-light: rgba(219, 187, 104, 0.5);
    --shadow-dark: rgba(0, 0, 0, 0.1);
    --overlay-bg: rgba(0, 0, 0, 0.25);
}

/* ========================================
   GENERAL STYLES
   ======================================== */

body {
    margin: 0;
    padding: 0;
    background-color: var(--secondary-color);
    overflow-x: hidden;
    padding-bottom: 15%;
    font-family: 'Times New Roman', Times, serif;
}

.centeredItemsH {
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

.centeredItems {
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

section {
    color: var(--primary-color);
    width: 50%;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 10px;
}

.heading-section {
    color: var(--primary-color);
    text-align: left;
}

nav {
    display: flex;
    justify-content: flex-end;
    padding-top: 15px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav ul li {
    display: inline;
}

nav ul li a {
    text-decoration: none;
    color: var(--primary-color);
    padding: 6px 12px 2px 12px;
    min-height: 44px;
    display: inline-block;
    transition: background-color 0.3s ease, border-radius 0.3s ease;
    line-height: 1.2;
    border: 2px solid transparent;
}

nav ul li a:hover {
    background-color: var(--hover-bg);
    border-radius: 5px;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-align: center;
    padding: 5px 0;
    position: fixed;
    width: 100%;
    bottom: 0;
}

.footer a {
    color: blue;
    text-decoration: underline;
}

.footer a:hover {
    text-decoration: none;
}

/* ========================================
   FORMS & INPUTS
   ======================================== */

#inputContainer {
    width: 20vw;
    max-width: 400px;
    min-width: 300px;
    height: auto;
    margin-top: 1%;
    display: flex;
    flex-flow: column;
    gap: 10px;
}

#inputContainer h1 {
    margin: 0;
    padding: 0;
}

#inputContainer > input {
    width: 100%;
    height: 40px;
    text-align: center;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    padding: 8px 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#inputContainer > input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px var(--shadow-light);
    transform: scale(1.02);
}

#inputContainer > select {
    width: 100%;
    height: 40px;
    font-size: 18px;
    text-align: center;
    color: black;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    padding: 8px 12px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#inputContainer > select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px var(--shadow-light);
}

#inputContainer > input[type="button"],
#inputContainer > input[type="submit"] {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    cursor: pointer;
    font-weight: bold;
}

#inputContainer > input[type="button"]:hover,
#inputContainer > input[type="submit"]:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: scale(1.02);
}

/* ========================================
   MAIN CONTENT & SECTIONS
   ======================================== */

.main-content {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding: 20px;
    margin-top: 180px;
    color: var(--primary-color);
}

.section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 30%;
    text-align: center;
}

.section h2 {
    color: var(--primary-color);
    margin: 5px 0;
}

.section p {
    flex: 1;
    margin: 0;
}

.section span {
    font-size: 8rem;
}

/* ========================================
   COURSES
   ======================================== */

.courses-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.courses-container a {
    text-decoration: none;
}

.courses-container a:visited {
    color: var(--primary-color);
}

.course-box {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    margin: 10px;
    text-align: center;
    cursor: pointer;
    width: 200px;
    box-shadow: 0 2px 8px var(--shadow-dark);
    transition: transform 0.2s ease;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    min-height: 44px;
    min-width: 44px;
}

.course-box:hover {
    transform: scale(1.05);
}

.course-box h3 {
    margin: 0;
    padding: 0;
}

/* ========================================
   SESSION POPUP
   ======================================== */

.sessionInputContent {
    padding-bottom: 10%;
}

#SessionPopup {
    margin-inline: auto; 
    width: fit-content;
    height: fit-content;
    background-color: var(--secondary-color);
    border: 3px solid var(--primary-color);
    border-radius: 8%;
    margin: 5%;
    padding: 1em;
    transform: translateY(0vh);
    opacity: 1;
    transition: transform 0.5s, opacity 0.5s;
}

#SessionPopupContainer {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    display: flex;
    justify-content: center;
    align-items: center;
}

#SessionPopupContainer.hidden {
    top: 100vh;
}

#SessionPopup.hidden {
    transform: translateY(100vh);
    opacity: 0;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Tablet and smaller (768px and below) */
@media (max-width: 768px) {
    
    /* Input Container */
    #inputContainer {
        width: 80vw;
        max-width: 100%;
        min-width: auto;
        margin-top: 0;
    }
    
    #inputContainer > select {
        font-size: 16px;
    }
    
    /* Header & Navigation */
   .header-container {
        flex-direction: row;  /* ← Ändra från column till row */
        align-items: center;
        padding: 10px;
        flex-wrap: wrap;
    }
    
    .header-section {
        text-align: center;  /* ← Ändra från left till center */
        width: 100%;
    }
    
    .heading-section h2 {
        font-size: 1rem;
        margin: 0;
    }
    
    nav {
        width: 100%;  /* ← Ändra från 100% */
        justify-content: center;
        margin-top: 0;
    }
    
    nav ul {
        justify-content: center;  /* ← Ändra från column till row */
        gap: 5px;  /* ← Mindre gap */
        padding: 0;
        margin: 0;
    }
    
    nav ul li {
        width: auto;
    }
    
    nav ul li a {
        display: inline-block;
        width: auto;
        padding: 6px 8px;  /* ← Mindre padding */
        font-size: 0.8rem;  /* ← Mindre text */
    }
    
    /* Main Content */
    .main-content {
        flex-direction: column;
        margin-top: 20px;
        padding: 10px;
    }
    
    .section {
        width: 100%;
        margin-bottom: 30px;
    }
    
    .section span {
        font-size: 3rem;
    }
    
    /* Courses */
    .courses-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .course-box {
        width: 100%;
        max-width: 400px;
        margin: 5px auto;
        align-items: center;
    }
    
    /* Typography */
    h1 {
        font-size: 1.5rem;
        padding: 0 10px;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    /* Body padding for footer */
    body {
        padding-bottom: 80px;
    }
    
    /* Footer */
    .footer {
        padding: 5px;
        font-size: 0.9rem;
    }
    
    /* Session Popup */
    #SessionPopup {
        width: 90%;
        max-width: 400px;
        margin: 10px;
        padding: 15px;
    }
}

/* Small mobile devices (480px and below) */
@media (max-width: 480px) {
    
    .heading-section h2 {
        font-size: 1rem;
    }
    
    .section span {
        font-size: 2.5rem;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    nav ul li a {
        font-size: 0.9rem;
        padding: 10px;
    }
    
    .course-box {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    #inputContainer > input {
        height: 40px;
        font-size: 16px;
    }
    
    #inputContainer > select {
        height: 40px;
        font-size: 16px;
    }
    
    .footer {
        font-size: 0.8rem;
        padding: 3px;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .main-content {
        margin-top: 10px;
    }
    
    .section span {
        font-size: 2rem;
    }
    
    #inputContainer {
        height: auto;
        margin-top: 10px;
    }
}