/* Combine Google Fonts into a single import */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative&family=Alex+Brush&family=Mrs+Saint+Delafield&family=Tangerine&family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');
@import url('button-v0.2.css');
@import url('animate-v0.2.css');

/* Define custom properties for colors */
:root {
    --primary-bg: rgba(69, 87, 100, 0.8);
    --text-color: FloralWhite;
    --accent-color: #dbb27e;
    --border-color: #234058;
    --overlay-bg: #536878;
    --highlight-color: #e1a95f;
    --muted-color: #919191;
}

/* Global styles */
body, h1, h2, h3, h4, h5, h6, p, ul, li, a {
    font-family: "Josefin Sans", sans-serif, Arial, sans-serif;
    color: var(--text-color);
    font-weight: 400;
    font-style: normal;
}

body {
    background-image: linear-gradient(60deg, var(--primary-bg) 5%, var(--primary-bg)), url("/images/back-25-05.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    overflow-y: hidden;
    overflow-x: auto;
    transition: opacity 1.75s ease-out;
    scrollbar-width: thin;
    height: 100vh;
}

/* Custom scrollbar for WebKit browsers */
body::-webkit-scrollbar {
    width: 8px;
}
body::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.is-start {
    background-image: url("/images/login-25-back-03.png");
    background-size: cover;
    background-position: center;
    overflow-y: hidden;
    overflow-x: auto;
}

.is-color {
    background: var(--overlay-bg);
    overflow-y: hidden;
    overflow-x: auto;
}

.intro-container {
    width: 18em;
    height: 100%;
}

.intro-effect {
    font-size: 3.2em;
    font-family: 'Cinzel Decorative', cursive, serif;
    line-height: 1.2;
    color: var(--highlight-color);
}

.intro-color {
    color: var(--muted-color); /* Ensure sufficient contrast */
}

h1 {
    font-family: "Alex Brush", cursive;
    font-weight: 400;
    font-size: 5em;
    font-style: normal;
    font-optical-sizing: auto;
}

h2 {
    font-size: 3em;
    font-optical-sizing: auto;
}

h3 {
    font-size: 1em;
}

h4, h5, h6, p {
    font-size: 1em;
    font-optical-sizing: auto;
}

a {
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out;
    display: block;
    padding: 1em;
    text-decoration: none;
    cursor: pointer;
}

a:hover {
    color: var(--accent-color);
}

hr {
    border-top: 0.05em solid rgba(77, 77, 77, 0.753);
    border-radius: 2em;
    width: 36%;
}

.logo {
    width: 80px;
    padding: 0.3em;
    cursor: pointer;
}

.top-nav {
    top: 0;
    left: 0;
    height: 4em;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: fixed; /* Ensure position is set for z-index */
    z-index: 5; /* Place behind overlay-box */
    width: 100%; /* Optional: ensure it spans the full width */
}

.center-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: auto;
}

.opening {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.opening h3 {
    font-size: 1.7em;
    font-weight: 300;
}

#welcome {
    width: 30em;
}

#start {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    overflow-x: hidden;
}

#index h1 {
    font-size: 2.5em;
    text-transform: lowercase;
}

#index h2 {
    font-size: 2em;
    line-height: 1.2;
    font-family: 'Cinzel Decorative', cursive, serif;
}

#index-menu h2 {
    line-height: 1.2;
    font-weight: 300;
}

#index-menu h3 {
    font-size: 1.3em;
    font-weight: 100;
    line-height: 1.2;
}

#user-data h1 {
    font-size: 3.5em;
}

#user-data a {
    font-size: 1.5em;
    padding: 0.5em;
}

#ITwo {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
}

#weather {
    width: 25em;
}

#weather h1 {
    font-size: 3em;
    text-transform: capitalize;
}

#weather h2 {
    font-size: 1.8em;
    font-weight: 300;
}

#weather p {
    font-size: 1em;
    font-style: italic;
    text-transform: capitalize;
}

#miniweather {
    display: none;
}

#thenews-menu {
    display: none;
}

#thenews {
    width: 25em;
}

#thenews h1 {
    font-size: 3em;
    text-transform: capitalize;
}

#thenews h2 {
    font-size: 1.2em;
    font-weight: 300;
}

#thenews h3 {
    font-size: 1.3em;
    font-weight: 400;
}

#thenews p {
    font-size: 1em;
    font-style: italic;
    margin: 0 10%;
}

#bignews {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    text-align: center;
    height: 100vh;
    overflow-x: auto;
}

#bignews h1 {
    font-size: 3.5em;
}

#bignews p {
    font-size: 1.1em;
    line-height: 1.9;
    max-width: 49em;
    padding: 0 5%;
}

#thecolumn {
    text-align: left;
    text-indent: 3em;
    padding-bottom: 5%;
}

#settings h2 {
    font-weight: 300;
}

#settings a {
    font-size: 1.5em;
    padding: 0.5em;
}

/* Form inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select,
textarea {
    width: 30em;
    padding: 12px 20px;
    margin: 8px 0;
    border-radius: 50px;
    color: var(--text-color);
    border: solid 2px var(--text-color);
    background: none;
    height: 2em;
    box-sizing: content-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 5px var(--accent-color);
}

label {
    font-size: 1.4em;
}

.nav {
    padding-top: 0.35em;
}

.nav a {
    display: inline-block;
}

.close {
    position: fixed;
    top: 10px;
    right: 15px;
    z-index: 20; /* Ensure above overlay content */
}

.close svg {
    fill: var(--text-color);
}

.close:hover svg {
    fill: var(--accent-color);
    transition: fill 0.2s ease-in-out;
    cursor: pointer;
}

#data-close.close {
    z-index: 20; /* Ensure above overlay content */
}

.newclose svg {
    fill: var(--text-color);
    padding-top: 1rem;
}

.newclose:hover svg {
    fill: var(--accent-color);
    transition: fill 0.2s ease-in-out;
    cursor: pointer;
}

.back {
    position: fixed;
    top: 10px;
    left: 28px;
    z-index: 5;
}

.back:hover {
    fill: var(--accent-color);
    transition: fill 0.2s ease-in-out;
}

footer {
    bottom: 0.8em;
    position: fixed;
    width: 100%;
    text-align: center;
    font-size: 0.75em; /* Reduced from 0.875em */
    text-transform: uppercase;
}

footer .copyright {
    margin: 0;
    padding: 0;
    list-style: none;
}

footer li {
    display: inline-block;
    padding-inline: 0.5em;
}

.button {
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out;
    position: relative;
    display: inline-block;
    height: 2.75em;
    line-height: 2.75em;
    font-size: 1.1em;
    padding: 0 1.5em;
    background-color: transparent;
    border-radius: 50px;
    color: var(--text-color);
    border: solid 2px var(--text-color);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.button:hover {
    border: solid 2px var(--border-color);
    background-color: var(--text-color);
    color: var(--accent-color);
}

svg {
    fill: var(--text-color);
}

#addstroke {
    stroke: var(--text-color);
}

#loading {
    stroke: var(--text-color);
}

.alerts-button {
    position: fixed;
    top: 0;
    right: 5em;
    height: 3.2em;
    line-height: 3.2em;
    font-size: 1.1em;
    padding: 0 1.5em;
    background-color: var(--text-color);
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    border: solid 2px var(--accent-color);
    border-top: none;
    color: var(--border-color);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    z-index: 100;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.alerts-button:hover {
    background-color: var(--overlay-bg);
    color: var(--text-color);
}

.alerts-button svg {
    display: inline;
    fill: var(--border-color);
}

.alerts-button:hover svg {
    fill: var(--text-color);
}

.alert-box {
    display: flex;
    flex-direction: column;
    align-self: center;
    padding: 0.7em;
    max-width: 50em;
    max-height: 40em;
    background-color: var(--overlay-bg);
    border: 2px solid var(--text-color);
    border-radius: 2px;
    z-index: 100;
    margin: 4em auto auto;
    overflow-y: auto;
}

.alert-box h2 {
    font-size: 1.3em;
}

.alert-box p {
    word-spacing: 1px;
}

.alert-box-center-con {
    text-align: center;
}

.alert-box-left-con {
    text-align: left;
}

.alert-box-right-con {
    text-align: right;
}

.ez-container {
    color: var(--border-color);
}
.ez-container h1 {
    font-size: 3em;
}

.overlay-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2em;
    max-width: 55em;
    width: 100%;
    max-height: 95vh; /* Constrain height to viewport */
    min-height: 95vh;
    overflow-y: auto; /* Enable vertical scrolling */
    background-image: url("/images/back-overlay-02.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border: 2px solid var(--highlight-color);
    border-radius: 50px;
    margin: auto;
    z-index: 15;
}

.overlay-box h1, .overlay-box h2, .overlay-box h3,
.overlay-box h4, .overlay-box h5, .overlay-box h6,
.overlay-box p, .overlay-box ul, .overlay-box li {
    color: var(--border-color);
}

.overlay-box svg {
    fill: var(--highlight-color);
}

.overlay-box a {
    color: var(--border-color);
    padding: 0;
}

.overlay-box a:hover {
    color: var(--highlight-color);
}

.overlay-box .button {
    color: var(--border-color);
    border: solid 2px var(--border-color);
}

.overlay-box .button:hover {
    border: solid 2px var(--accent-color);
    background-color: var(--overlay-bg);
    color: var(--text-color);
}

.overlay-box input[type="text"],
.overlay-box input[type="email"],
.overlay-box input[type="tel"],
.overlay-box input[type="password"],
.overlay-box select,
.overlay-box textarea {
    color: var(--border-color);
    border: solid 2px var(--border-color);
}

.overlay-box input[type="text"]:focus,
.overlay-box input[type="email"]:focus,
.overlay-box input[type="tel"]:focus,
.overlay-box input[type="password"]:focus,
.overlay-box select:focus,
.overlay-box textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-color);
}

.overlay-box-center-con {
    display: block;
    width: 100%;
    text-align: center;
}

.overlay-box-center-con > div {
    width: 100%;
    padding-bottom: 1em; /* Space at bottom for readability */
}

.overlay-box-paragraph-con {
    text-align: center;
    align-self: flex-start;
    padding-top: 2em;
}

.overlay-box-left-con {
    display: block;
    width: 100%;
    text-align: left;
}

.overlay-box-left-con > div {
    width: 100%;
    padding-bottom: 1em; /* Space at bottom for readability */
}

.overlay-box-right-con {
    display: block;
    width: 100%;
    text-align: right;
}

.overlay-box-right-con svg {
    position: fixed;
    top: 10px;
    right: 28px;
    z-index: 20;
}

/* Custom scrollbar for overlay content */
.overlay-box::-webkit-scrollbar {
    width: 8px;
}
.overlay-box::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

/* Media Queries */
@media screen and (max-width: 480px) {
    h1 {
        font-size: clamp(3.5em, 8vw, 4em);
    }

    .alert-box, .overlay-box {
        width: 100%;
        min-height: 95vh;
        max-height: 95vh;
    }

    footer li, .nav a {
        display: block;
    }

    .overlay-box {
        padding: 1em;
    }
}

@media screen and (max-width: 950px) {
    .alerts-button {
        top: 0;
        left: 0;
        right: 0;
    }

    #weather {
        display: none;
    }

    #miniweather {
        display: block;
        padding-bottom: 10%;
    }

    #miniweather h2 {
        font-size: 1.5em;
        font-weight: 100;
        line-height: 1.2;
    }

    #miniweather h3 {
        font-size: 1em;
        display: inline;
        text-transform: capitalize;
    }

    #thenews {
        display: none;
    }

    #thenews-menu {
        display: block;
    }
}