/******************* GENERAL *******************/
.white {
    color: #fff !important;
}

html, body {
    height: 100%;              /* Make sure body fills the viewport */
    margin: 0;                 /* Remove default margins */
    display: flex;
    flex-direction: column;    /* Stack header, content, footer vertically */
}

body {
    font-family: system-ui, sans-serif;
    font-size: 1rem; /* equals 16px */
    line-height: 1.5; /* improves readability */
    color: #333;
    width: 100%;
    background-color: #fff;
}

.wrapper {
    display: flex;
    flex-direction: column;
}

main {
    display: block;
    flex: 1; /* This pushes the footer down */
}

.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
}

.bg-color {
    width: 100%;
    padding: 2.5rem 0;
}

.bg-white {
    width: 100%;
    background-color: #FFF;
    padding: 2.5rem 0 0;
}

.content {
    width: 100%;
    background: none;
    padding: 2.5rem 0;
}

@media (min-width: 576px) {
  .container, .container-menu {
    max-width: 510px;
    padding-right: 0;
    padding-left: 0;
  }
}
@media (min-width: 768px) {
    .container, .container-menu {
      max-width: 700px;
    }
}
@media (min-width: 1024px) {
    .container, .container-menu {
      max-width: 950px;
    }
}
@media (min-width: 1280px) {
    .container, .container-menu {
      max-width: 1200px;
    }
}
@media (min-width: 1536px) {
    .container, .container-menu {
      max-width: 1450px;
    }
}

/* Headings hierarchy */
h1 {
    font-size: 2.5rem;   /* ~40px */
    color: #111;         /* darker for strong emphasis */
    font-weight: 700;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;     /* ~32px */
    color: #222;         /* slightly lighter than h1 */
    font-weight: 600;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.5rem;   /* ~24px */
    color: #444;         /* softer contrast */
    font-weight: 600;
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 1.25rem;  /* ~20px */
    color: #555;         /* subtle variation */
    font-weight: 500;
    margin-bottom: 0.5rem;
}

p {
    margin: 1em 0;
}

a {
    text-decoration: underline;
    display: inline-block; /*for divs inside a href*/ 
}

a:hover, a:focus {
    color: #333;
    text-decoration: none;
    transition: color 0.4s ease, text-decoration 0.4s ease; /* Smooth animation */
}

.block {
    display: block !important;
}

.grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin: 1rem 0;
}

.grid img {
    width: 100%;       /* image fills the div’s width */
    height: auto;      /* keeps aspect ratio */
    object-fit: cover; /* crops if the div has fixed height */
    display: block;    /* removes inline spacing */
}

/* On small screens, force single column */
@media (max-width: 700px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

form {
    margin: 0 auto;
}

label {
    display: block;
    margin-top: 1rem
}

:where(input, select, textarea):not([type=checkbox], [type=radio]) {
    padding: 0.5rem;
    background-size: 1rem auto;
    background-repeat: no-repeat;
    background-color: #fff;
    border: 1px solid #aaa;
    border-radius: 0.25rem;
    font-size: 1rem;
    min-width: 290px;
}

[role=button], [type=button], [type=file]::file-selector-button, [type=reset], [type=submit], button {
    display: inline-block;
    min-width: 160px;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 0.25rem;
    outline: 0;
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}


/******************* TOP BANNER *******************/

#top-banner {
    width: 100%;
    position: relative; /* stays at top, scrolls away */
    z-index: 1100;
    height: 80px;
    background-color: #153b61;
    color: #fff;
    text-align: center;
    padding: 10px 0;
}


/******************* TOP MENU REGULAR *******************/
#supertop-menu {
    display: flex;
    height: 80px;
    width: 100%;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 1;
}

.container-menu {
    width: 100%;
    margin: 0 auto;
}

div#logo {
    margin: 18px 0;
    display: inline-block;
    float: left;
}

div#top-nav {
    display: inline-block;
    float: right;
    width: 100%;
    max-width: 870px;
}

nav.container {
    z-index: 1;
    overflow: hidden;
    align-items: center;
}

.top-menu {
    display: flex;            
    justify-content: space-between; 
    align-items: center;       
    list-style: none;
    padding: 0; 
    margin: 0; 
}

.item, .item a {
    display: inline-block; 
    align-items: center; 
    text-decoration: none;
    float: left;
    padding-top: 12px;
    transition: color 0.4s ease, text-decoration 0.4s ease; /* Smooth animation */
    font-size: 1.2rem;
    font-weight: 500;
}


/******************* TOP MENU CHANGE COLOR *******************/

/* Default state */
#supertop-menu2 {
    position: sticky;
    top: 0;
    width: 100%;
    transition: background 0.3s ease, color 0.3s ease;
    z-index: 1000;
    display: flex;
    height: 80px;
}

#supertop-menu2 .top-link {
    transition: color 0.3s ease;
}

/* Scrolled state */
#supertop-menu2.scrolled {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Regular menu */
.large-nav li.language-selector {
    float: right;
    padding: 15px 0 0px;
}

/* Mobile menu */
li.language-selector {
    float: right;
    padding: 30px 0 50px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

form#language-form {
    float: left;
    margin-left: 2px;
}

select#language {
    margin-top: 9px;
    font-size: 0.9rem;
    padding: 0.4rem;
    min-width: 0;
    width: 140px;
}

.banner {
    height: 120px;
    color: white;
    margin-bottom: 3rem;
}


/******************* TOP  SUBMENUS *******************/

/* Dropdown menu hidden by default */
.dropdown-menu {
    position: absolute;
    top: 100%;          /* places it directly below the parent link */
    left: 0;            /* aligns with the left edge of the parent <li> */
    background: #fff;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 999;       /* ensures it appears above other elements */
}

/* Parent item must be relatively positioned */
.dropdown {
    position: relative;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 5%;
    color: #333;
    text-decoration: none;
    width: 90%;
}

.dropdown-menu li a:hover {
    background: #f0f0f0;
}

/* Show dropdown on hover with transition */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}



/******************* HAMBURGER MENU *******************/

.hamburger-menu {
    display: none;
}

/* Hamburger button */
.menu-button {
    display: flex;
    flex-direction: column;
    position: relative;
    float: right;
    justify-content: space-around; /* evenly distributes bars */
    width: 50px;   /* button width */
    height: 50px;  /* button height */
    border: none;
    cursor: pointer;
    padding: 12px; /* more inner padding around bars */
    margin: 15px 0;
    border-radius: 8px;
    z-index: 2000;
    min-width: 0;
}

.menu-button span {
    display: block;
    width: 100%;
    height: 2px;   /* bar thickness */
    border-radius: 2px;
    transition: all 0.3s ease;
}

button#menu-button:focus {
    outline: none;
}

/* Animate into cross */
.menu-button.open span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 6px);
}
.menu-button.open span:nth-child(2) {
    opacity: 0;
}
.menu-button.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -5px);
}

/******************* RIGHT SLIDING MENU *******************/
.menu-right-slide {
    position: fixed;
    top: 0;
    right: -360px; /* hidden off-screen */
    width: 300px;
    height: 100%;
    transition: right 0.3s ease;
    z-index: 999;
    padding: 20px;
}

.menu-right-slide.open {
    right: 0; /* slides in */
}

.menu-right-slide ul {
    list-style: none;
    margin: 50px 0 0;
    padding: 0;
}


/******************* TOP SLIDING MENU *******************/
.menu-top-slide {
    position: fixed;
    top: 80px;            /* start just below header */
    left: 0;
    width: 100%;
    max-height: 0;        /* collapsed */
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 1500;        /* lower than header */
}

.menu-top-slide ul {
    list-style: none;
    margin: 0;
}

/******************* FULL SCREEN FADE IN MENU *******************/

.menu-fade-in {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;                 /* cover entire screen */
    opacity: 0;                   /* hidden initially */
    visibility: hidden;           /* not clickable */
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 1500;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* When open, fade in */
.menu-fade-in.open {
    opacity: 1;
    visibility: visible;
}

/* Menu content */
.menu-fade-in ul {
    list-style: none;
    margin: 0;
    text-align: center;
}

.menu-fade-in li {
    margin: 20px 0;
}

.menu-fade-in a {
    text-decoration: none;
    font-size: 1.4rem;
    color: #fff;
    transition: color 0.3s ease;
}

.menu-fade-in a:hover {
    color: #ffd700; /* gold highlight */
}


.menu-right-slide li, .menu-top-slide li, .menu-fade-in li {
    margin: 0;
    width: 100%;
}
.menu-right-slide a, .menu-top-slide a, .menu-fade-in a {
    text-decoration: none;
    margin-left: 2rem;
}
.menu-right-slide a:hover, .menu-top-slide a:hover ,.menu-fade-in a:hover {
    text-decoration: underline;
}

@media (width < 1025px) {
    div#top-nav {
        width: auto;
    }
    .large-nav {
        display: none;
    }

    .hamburger-menu {
        position: relative;
        display: block;
    }
}

@media (width < 768px) {
    .container-menu {
        margin: 0 1rem;
    }
}

@media (width < 768px) {
    .container {
        width: 92%;
        margin: 0 4%;
    }
}

svg.curve, svg.wave, svg.hill, svg.slash, svg.double-wave, svg.zigzag, svg.double-wave-inverted, svg.waves-scattered-flipped, svg.wave-inverted {
    display: block;
    margin: -1px 0;
    clear: both;
}

svg.waves-scattered-flipped {
    margin-top: 3rem;
}


/******************* ANNOUNCEMENT *******************/

.announcement {
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem 0;
}


/******************* CONTENT *******************/

/* Base div style */
.color-box, .color-box-link, .gray-box, .gray-box-link {
    align-items: center;
    padding: 1.5rem;
    border-radius: 8px;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.gray-box-form {
    display: flex;
    flex-direction: column;   /* stack vertically */
    align-items: center;      /* center children horizontally */
    padding: 1.5rem;
    border-radius: 8px;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.gray-box-form form {
    width: 100%;              /* optional: make them full width */
    max-width: 290px;         /* control max width so they don’t stretch too wide */
}

/* Special case: anchors with .color-box inside */
a:has(.color-box-link), a:has(.gray-box-link),  a:has(.my-box) {
    text-decoration: none;   /* remove underline */
    color: inherit;          /* let .color-box control text color */
}

.error404 {
    text-align: center;
}

section { 
    scroll-margin-top: 100px; /* adjust to your menu height */ 
}
