/* 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", 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-26-01.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow-y: auto;
    overflow-x: hidden;
    transition: opacity 1.75s ease-out;
    scrollbar-width: thin;
    min-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-26-back-01.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow-y: auto;
    overflow-x: auto;
}

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

.video-bg {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    object-fit: cover;
    opacity: 1;
    /* Opacity to blend with gradients and UI text */
}

.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;
    font-optical-sizing: auto;
}

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 Navigation Bar ───────────────────────────────── */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: #303D36eb;
    border-bottom: 1px solid var(--accent-color);
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 4em;
}

.top-nav__inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5em;
    box-sizing: border-box;
}

/* Logo centred via flex: the two nav groups each take equal flex space */
.top-nav__logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.top-nav__logo-link {
    display: inline-flex;
    align-items: center;
    padding: 0;
    line-height: 0;
}

.top-nav__logo {
    width: 160px;
    max-height: 3em;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.top-nav__logo:hover {
    opacity: 0.8;
}

/* ── Desktop nav link groups ── */
.top-nav__links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25em;
    flex: 1;
}

.top-nav__links--left {
    justify-content: flex-end;
    padding-right: 1.5em;
}

.top-nav__links--right {
    justify-content: flex-start;
    padding-left: 1.5em;
}

.top-nav__links a {
    display: inline-block;
    padding: 0.4em 0.75em;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 50px;
    transition: color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
}

.top-nav__links a:hover {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.06);
}

/* ── Hamburger button (hidden on desktop) ── */
.top-nav__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4em;
    margin-left: auto;
    width: 2.4em;
    height: 2.4em;
}

.top-nav__hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transform-origin: center;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.2s ease;
}

.top-nav__hamburger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.top-nav__hamburger.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.top-nav__hamburger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile overlay menu ── */
.top-nav__overlay {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    inset: 0;
    background-color: rgba(30, 40, 35, 0.97);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.top-nav__overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.top-nav__overlay-close {
    position: absolute;
    top: 1.25em;
    right: 1.5em;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5em;
    cursor: pointer;
    line-height: 1;
    padding: 0.25em 0.5em;
    transition: color 0.2s ease;
}

.top-nav__overlay-close:hover {
    color: var(--accent-color);
}

.top-nav__overlay-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25em;
}

.top-nav__overlay-links a {
    display: block;
    font-size: 1.6em;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-color);
    padding: 0.5em 1.5em;
    border-radius: 50px;
    opacity: 0;
    transform: translateY(12px);
    transition: color 0.2s ease, background-color 0.2s ease,
        opacity 0.35s ease, transform 0.35s ease;
}

.top-nav__overlay.is-open .top-nav__overlay-links a {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for overlay links */
.top-nav__overlay.is-open .top-nav__overlay-links a:nth-child(1) {
    transition-delay: 0.08s;
}

.top-nav__overlay.is-open .top-nav__overlay-links a:nth-child(2) {
    transition-delay: 0.14s;
}

.top-nav__overlay.is-open .top-nav__overlay-links a:nth-child(3) {
    transition-delay: 0.20s;
}

.top-nav__overlay.is-open .top-nav__overlay-links a:nth-child(4) {
    transition-delay: 0.26s;
}

.top-nav__overlay.is-open .top-nav__overlay-links a:nth-child(5) {
    transition-delay: 0.32s;
}

.top-nav__overlay-links a:hover {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.05);
}

/* ── Responsive: mobile ── */
@media screen and (max-width: 768px) {
    .top-nav {
        height: 3.6em;
    }

    /* Switch inner to: [logo] ......... [hamburger] */
    .top-nav__inner {
        justify-content: flex-start;
        padding: 0 1em;
    }

    .top-nav__logo-wrap {
        flex: 1;
        justify-content: flex-start;
    }

    .top-nav__logo {
        width: 130px;
    }

    /* Hide desktop links */
    .top-nav__links {
        display: none;
    }

    /* Show hamburger */
    .top-nav__hamburger {
        display: flex;
    }
}

@media screen and (max-width: 480px) {
    .top-nav__logo {
        width: 110px;
    }
}

.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: 100%;
    max-width: 30em;
    padding: 12px 20px;
    margin: 8px auto;
    display: block;
    border-radius: 50px;
    color: var(--text-color);
    border: solid 2px var(--text-color);
    background: none;
    height: 2em;
    box-sizing: border-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;
    display: block;
}

.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 svg {
    fill: var(--accent-color);
    transition: fill 0.2s ease-in-out;
}

footer {
    position: relative;
    width: 100%;
    text-align: center;
    font-size: 0.85em;
    text-transform: uppercase;
    background-color: #303D36eb;
    border-top: 1px solid var(--accent-color);
    padding: 2.5em 0;
    margin-top: auto;
    z-index: 10;
}

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 */
}

/* Link Grid Alpha Grouping */
.link-grid {
    column-count: 2;
    column-gap: 2em;
    text-align: left;
    margin-top: 2em;
    width: 100%;
}

.link-group {
    break-inside: avoid;
    margin-bottom: 2em;
}

.link-group h4 {
    border-bottom: 2px solid var(--highlight-color);
    margin-bottom: 0.5em;
    text-transform: uppercase;
    font-size: 1.2em;
}

.link-group a {
    font-size: 1.1em !important;
    padding: 0.4em 0 !important;
}

@media screen and (max-width: 600px) {
    .link-grid {
        column-count: 1;
    }
}

/* Icon Menu Styling */
.icon-menu {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 3em;
    margin: 2em 0;
    padding-bottom: 2em;
    border-bottom: 2px solid rgba(35, 64, 88, 0.2);
    width: 100%;
}

.icon-menu a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.8em;
    width: auto;
    padding: 0;
}

.icon-menu a i {
    font-size: 2em;
    color: var(--highlight-color);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease;
}

.icon-menu a:hover i {
    transform: scale(1.15);
    color: var(--accent-color);
}

.icon-menu a span {
    font-size: 0.7em;
    color: var(--border-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media screen and (max-width: 768px) {
    .icon-menu {
        gap: 1.5em;
    }

    .icon-menu a i {
        font-size: 2.2em;
    }

    .icon-menu a span {
        font-size: 0.7em;
    }
}

.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;
    }
}

/* ── User Directory Overlay ─────────────────────────────── */

/* Title inside the directory overlay */
.dir-overlay__title {
    font-family: 'Cinzel Decorative', cursive, serif;
    font-size: 1.6em;
    font-weight: 400;
    color: var(--accent-color);
    letter-spacing: 0.05em;
    margin-bottom: 0.4em;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease 0.04s, transform 0.35s ease 0.04s;
}

#user-data.is-open .dir-overlay__title {
    opacity: 1;
    transform: translateY(0);
}

/* "Modify Links" edit link */
.dir-overlay__edit {
    display: inline-block;
    font-size: 0.8em;
    opacity: 0;
    color: var(--muted-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2em 0.75em;
    margin-bottom: 1.5em;
    border-radius: 50px;
    transition: color 0.2s ease, background-color 0.2s ease,
        opacity 0.35s ease 0.1s, transform 0.35s ease 0.1s;
    transform: translateY(8px);
}

#user-data.is-open .dir-overlay__edit {
    opacity: 0.7;
    transform: translateY(0);
}

.dir-overlay__edit:hover {
    opacity: 1 !important;
    color: var(--accent-color) !important;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Scrollable links area inside the overlay */
#user-data .top-nav__overlay-links {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 1em;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) transparent;
}

#user-data .top-nav__overlay-links::-webkit-scrollbar {
    width: 4px;
}

#user-data .top-nav__overlay-links::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

/* Stagger animation for more than 5 links from included file */
#user-data.is-open .top-nav__overlay-links a:nth-child(6) {
    transition-delay: 0.38s;
}

#user-data.is-open .top-nav__overlay-links a:nth-child(7) {
    transition-delay: 0.44s;
}

#user-data.is-open .top-nav__overlay-links a:nth-child(8) {
    transition-delay: 0.50s;
}

#user-data.is-open .top-nav__overlay-links a:nth-child(9) {
    transition-delay: 0.56s;
}

#user-data.is-open .top-nav__overlay-links a:nth-child(10) {
    transition-delay: 0.62s;
}