/* ======================== */
/* Crest Image & Header */
/* ======================== */
.crest-image {
    width: auto;
    height: 70px;
    position: relative;
    z-index: 10;
    margin-top: 5px;
    margin-left: 10%;
}

.container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 90%;
    background-color: rgb(255, 255, 255);
    margin-top: 10px;
    padding: 10px 0;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.menu-button-home {
    padding: 10px 10px;
    border: none;
    cursor: pointer;
    font-size: 25px;
    color: rgb(4, 4, 135);
    background-color: white;
    text-align: center;
    display: inline-block;
    width: max-content;
    max-width: 400px;
    white-space: normal;
    line-height: 1.2;
    word-wrap: break-word;
    font-family: 'Roboto';
    letter-spacing: 2px;
    opacity: 0.9;
}

@media (max-width: 800px) {
    .menu-button-home {
        font-size: 28px;
        max-width: 280px;
    }
}

.menu-button-home:hover,
.menu-button-home:active {
    opacity: 0.3;
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: rgb(4, 4, 135);
    position: absolute;
    right: 20px;
    top: 20px;
}

/* ======================== */
/* Menu & Dropdowns */
/* ======================== */
.menu {
    display: flex;
    gap: 10px;
    list-style: none;
    padding-left: 70px;
    background-color: white;
    font-family: 'Roboto';
    margin-left: auto;
}

.menu li {
    padding: 10px 10px;
    background-color: white;
    color: rgb(4, 4, 135);
    font-size: 18px;
    border-radius: 5px;
    transition: background-color 0.3s;
    cursor: pointer;
}

.menu li:hover {
    opacity: 0.8;
}

.dropdown {
    position: relative; /* needed for submenu */
    cursor: pointer;
    color: rgb(4, 4, 135);
    z-index: 20;
}

/* ======================== */
/* Submenu */
.submenu {
    display: none;
    position: absolute;
    top: 100%;       /* directly below parent */
    left: 0;         /* align left edge with parent */
    right: auto;     /* reset any previous right settings */
    background-color: white;
    list-style: none;
    padding: 0;
    margin: 0;
    box-shadow: 0px 4px 6px rgba(0,0,0,0.1);
    min-width: 180px;
    border-radius: 5px;
    z-index: 1000;
}

.submenu li {
    padding: 10px;
    font-size: 16px;
    color: rgb(4, 4, 135);
    background-color: white;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transition: opacity 0.3s, background-color 0.3s;
}

.submenu li:hover {
    background-color: #f1f1f1;
}

.dropdown.active .submenu {
    display: block;
}

/* ======================== */
/* Mobile Menu Adjustments */
@media (max-width: 1000px) {
    .menu {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 10px;
        background-color: white;
        width: 90%;
        max-width: 300px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        padding: 10px 0;
        border-radius: 5px;
        z-index: 1000;
    }

    .menu.show {
        display: flex;
    }

    .menu li {
        padding: 12px 15px;
        text-align: left;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .menu li:last-child {
        border-bottom: none;
    }

    /* Mobile submenu expands below parent */
    .submenu {
        position: static;  /* ignore absolute positioning */
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        padding-left: 15px;
    }

    .submenu li {
        padding: 10px 0;
    }

    .dropdown.active .submenu {
        display: block;
    }

    .menu-toggle {
        display: block;
    }
}

/* Optional: very small screens */
@media (max-width: 600px) {
    .menu li, .submenu li {
        font-size: 14px;
        padding: 8px 12px;
    }

    .menu-button-home {
        font-size: 22px;
        max-width: 200px;
    }
}

/* ======================== */
/* Divider */
hr {
    color: rgb(4, 4, 135);
    background-color: rgb(4, 4, 135);
    height: 1px;
}

/* ======================== */
/* Carousel / Images */
.image-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 45px auto 2px;
    overflow: hidden;
    z-index: 1;
    padding: 0 5%;
    box-sizing: border-box;
}

.carousel-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 35px;
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
}

.carousel-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-container img.active {
    opacity: 1;
    position: relative;
}

.buttons {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 5;
}

.buttons button {
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}

/* ======================== */
/* Paragraphs & Links */
p {
    display: flex;
    justify-content: center;
    align-items: center;
    color: black;
    margin-left: 18%;
    margin-right: 18%;
    text-align: center;
    font-size: 18px;
    font-family: 'Roboto';
}

a {
    text-decoration: none;
}

.menu li,
.menu a {
    color: rgb(4, 4, 135) !important;
    text-decoration: none;
}

/* ======================== */
/* Headers */
h1 {
    display: flex;
    justify-content: center;
    align-items: center;
    color: black;
    margin-left: 18%;
    margin-right: 18%;
    text-align: center;
    font-size: 30px;
    font-family: 'Roboto';
}
/* Hide short version by default */
.menu-button-home .short-version {
    display: none;
}

/* Hide full version and show short version when narrow */
@media (max-width: 400px) {
    .menu-button-home .full-version {
        display: none;
    }
    .menu-button-home .short-version {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .menu-button-home .short-version .main-title {
        font-size: 28px;
        line-height: 1.2;
    }
    .menu-button-home .short-version .subtitle {
        font-size: 18px;
        opacity: 0.6;
        line-height: 1.2;
    }
}
