/* global variables */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
    --button-padding: 10px 15px;
    --button-border: 1px solid #ccc;
    --button-bg-color: white;
    --button-hover-color: #f0f0f0;
    --button-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    --tooltip-bg: rgba(0, 0, 0, 0.8);
    --tooltip-color: white;
    --tooltip-font-size: 18px;
    --tooltip-padding: 5px 10px;
}

/* body, container */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    color: #333;
    background: #fff; /* white */
    overflow-y: auto;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
}

.page-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    background: #fff; /* white */
}








/* top header (logo, navigation, language) */
header {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    background: #fff;
    padding: 10px 0 0 0;
    justify-content: space-between;
    align-items: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    cursor: pointer;
}

.logo-container {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.logo-row {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 3rem;
    width: auto;
    margin: 0 10px 10px 0;
    transform: translateY(3px); /* force logo-image to be 3px lower */
}

.logo-container h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: normal;
    line-height: 1; /* Ensures alignment with the logo */
}

nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

nav ul li {
    margin: 0 20px 0 0; /* top, right, bottom, left */
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

nav ul li a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.language-links {
    margin-left: 30px;
}

.language-links a {
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.language-links .active {
    text-decoration: underline;
}






/* hearder image, footer */
#header-image {
    display: flex;
    width: 100%;
    margin: 0;
    position: relative;
    height: 350px;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
        url('images/20240701-hurricane_beryl-500m-scaled.jpg') no-repeat center center/cover;
}

#header-image h1 {
    font-size: 3.5rem;
    margin: 0;
}

#header-image p {
    font-size: 2rem; /*text above head image*/
    margin: 20px 0;
}






.site-footer {
    display: flex;
    flex-wrap: wrap;
    font-size: 1rem;
    color: #555;
    padding: 16px 10px;
    justify-content: space-between;
    align-items: center;
    background-color: #cccccc;
}

.footer-icon,
.footer-brand {
    margin: 5px 0;
}

.footer-link {
    color: #555;
    margin: 0 10px;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
    color: #000;
}

.footer-social {
    text-decoration: none;
}

.footer-social svg {
    width: 32px;
    height: 32px;
    color: #555;
    margin: 0 8px;
    vertical-align: middle;
    transition: fill 0.3s;
}

.footer-social:hover svg {
    fill: #0077B5; /* LinkedIn blue on hover */
}

.footer-social.instagram:hover svg {
    fill: #E1306C; /* Instagram pink */
}






/* Title hierarchy */
.h2-center {
    font-family: "Welcome-Bold", sans serif;
    font-size: 2.5rem;
    color: darkslategray;
    font-weight: bold;
    text-align: center;
    padding: 10px;
}

.h2-left {
    font-family: "Welcome-Bold", sans serif;
    font-size: 2.5rem;
    color: darkslategray;
    font-weight: bold;
    text-align: left;
    padding: 10px;
}

.h3-left {
    font-family: "Inter", sans serif;
    font-size: 1.5rem;
    color: gray;
    text-align: left;
    padding: 5px;
}

.h3-center {
    font-family: "Inter", sans serif;
    font-size: 1.5rem;
    color: gray;
    text-align: center;
    padding: 5px 0 5px 0;
}

.p-customise {
    font-family: "Inter", sans-serif;
    font-size: 20px;
    color: rgb(40, 40, 40);
    letter-spacing: 0.4px;
    margin-left: 30px;
    tab-size: 4;
}






/* section, grid */
main {
    margin: 50px 0; /* up-down, left-right */
    align-items: center;
    background-color: #fff; /* white */
    line-height: 1.6;       /* Improves readability by adding space between lines */
}

.content-section {
    padding: 10px 0; /* up-down, left-right */
    margin: 0;
}

.index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px 20px; /* rwo col */
    padding: 20px;
    text-align: center;
    background: #f4f4f4;
    border: 1px solid #ddd;
}

/* no effect */
.grid-with-effect {
    overflow: hidden;
    padding: 10px;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.15s;
}
/*
.grid-with-effect:hover {
    transform: scale(1.05);
}
*/
.grid-no-effect {
    overflow: hidden;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}






/* image, video, search, division */
.image-in-box {
    width: 300px; /* or 100% */
    height: 300px;
    border-width: 2px;
    border-style: solid;
    border-color: grey;
    object-fit: contain;
    object-position: bottom;
    display: inline-block;
    vertical-align: top;
    margin-right: 5px;
}

.image-video-title {
    display: inline-block;
}

.image-video-author,
.image-video-stats {
    display: inline-block;
}

.search-box { /* <input type="text" placeholder="Search">*/
    font-size: 20px;
}

.div-inline {
    width: 500px;
    display: inline-block;
}





/* image, map, button, popup */
.popup-button {
    color: white;
    font-size: 1.5rem;
    font-style: italic;
    text-decoration: underline;
    cursor: pointer;
    border: none;
    background: #fec200; /*orange*/
    padding: 6px;
    transform: 0.15s;
}

.popup-button:hover {
    background-color: #ffe699; /*light orange*/
}

.popup-info-button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background-color: #FFC107;
    color: white;
    font-family: 'Times New Roman', Times, serif;
    font-weight: bold;
    font-style: italic;
    font-size: 25px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.popup-info-button:hover {
    background-color: #e0a800;
}

.close-button {
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    background-color: grey;
    transform: 0.15s;
}

.close-button:hover {
    background-color: darkred;
}

#overlay { /* for popup */
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    padding: 20px;
    background: #f4f4f4;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}












/* Responsive Design for tablets and smartphone */
@media (max-width: 768px) {
    
    /* page header */
    .container{
        padding: 0;
    }
    
    nav {
        display: flex;
        align-items: center;
        flex-direction: column;
        padding-left: 0;
        padding-right: 10px;
        width: 100%;
    }

    ul {
        justify-content: space-between;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 0;
        list-style: none;
        width: auto;
    }

    ul li {
        width: auto;
        padding-left: 10px;
        text-align: left;
    }
    
    ul li a {
        display: inline-block;
        padding-left: 0;
        margin-left: 0;
        margin-bottom: 5px;
    }

    .logo-container {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        width: 100%;
    }
    
    .logo-image {
        max-width: 50px;
        height: auto;
    }
    
    .language-links {
        margin-left: 0;
    }
    
    #header-image {
        height: 250px;
    }

    .content-section {
    padding: 10px 10px; /* up-down, left-right */
    }

    .site-footer {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container{
        padding: 0;
    }
    
    ul li {
        padding-left: 10px;
    }

    ul li a {
        font-size: 0.9rem;
        padding-left: 0;
    }
    
    .logo-container h2 {
        font-size: 1.2rem;
    }
    
    .logo-image {
        max-width: 60px;
    }

    
    .content-section {
    padding: 2px 20px 2px 20px;
    }
}




