/* Match logout button to View Profile link in dropdown */
.dropdown-logout-link {
    background: none;
    border: none;
    color: #5c7084 !important;
    margin: 8px 0;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
    cursor: pointer;
    padding: 0;
    text-align: left;
    width: 100%;
    font-family: inherit;
    display: block;
    text-decoration: none !important;
}
.dropdown-logout-link:hover,
.dropdown-logout-link:focus {
    color: #5576a8 !important;
    text-decoration: none !important;
}
/* ========================================
   GLOBAL STYLES - Common Across All Pages
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Manrope', 'Segoe UI', sans-serif;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Keep visual media from overflowing narrow viewports */
img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

/* Layout Structure */
.page-content {
    flex: 1; /* pushes footer down */
}

/* ========================================
   NAVBAR STYLES
   ======================================== */

.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 18px;
    padding: 12px 60px;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(91, 121, 166, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: start;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
}

.logo img {
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 2px 4px rgba(91, 121, 166, 0.15));
}

.logo span {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #5b79a6 0%, #3d5a7f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* Menu */
.menu {
    display: flex;
    gap: 0;
    align-items: center;
    justify-self: center;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(91, 121, 166, 0.1);
}

.menu a {
    text-decoration: none;
    font-weight: 600;
    color: #555555;
    font-size: 15px;
    transition: all 0.3s ease;
    padding: 10px 20px;
    position: relative;
    border-radius: 50px;
    margin: 0 2px;
}

.menu a:hover {
    color: #5b79a6;
    background: rgba(91, 121, 166, 0.08);
}

.menu a.active {
    color: white;
    font-weight: 700;
    background: #5b79a6;
    box-shadow: 0 2px 8px rgba(91, 121, 166, 0.25);
}

/* Icons */
.icons {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-self: end;
}

@media (max-width: 980px) {
    .navbar {
        grid-template-columns: auto 1fr auto;
        padding: 12px 20px;
    }

    .menu {
        margin: 0 auto;
    }

    .menu a {
        padding: 9px 14px;
        font-size: 14px;
    }
}

@media (max-width: 900px) {
    .navbar {
        grid-template-columns: 1fr auto;
        align-items: center;
        row-gap: 0;
        padding: 12px 16px;
    }

    .logo {
        justify-self: start;
    }

    .menu {
        display: none;
    }

    .icons {
        display: none;
    }

    .navbar-hamburger {
        display: flex;
    }
}

@media (max-width: 480px) {
    .logo {
        gap: 8px;
        padding: 6px 8px;
    }

    .logo span {
        font-size: 16px;
    }

    .logo img {
        width: 36px;
        height: 36px;
    }

    .icon-wrapper span {
        width: 36px;
        height: 36px;
        font-size: 17px;
    }
}

/* ── Hamburger button ── */
.navbar-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(91, 121, 166, 0.1);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
    justify-self: end;
}

.navbar-hamburger:hover {
    background: rgba(91, 121, 166, 0.2);
}

.navbar-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #5b79a6;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 900px) {
    .navbar-hamburger {
        display: flex;
    }
}

.navbar-hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar-hamburger.is-open span:nth-child(2) {
    opacity: 0;
}

.navbar-hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile navigation drawer ── */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: white;
    border-bottom: 1px solid rgba(91, 121, 166, 0.12);
    box-shadow: 0 4px 16px rgba(91, 121, 166, 0.1);
    padding: 8px 16px 16px;
    z-index: 99;
    position: fixed;
    left: 0;
    right: 0;
    top: var(--mobile-nav-top, 64px);
    max-height: calc(100vh - var(--mobile-nav-top, 64px));
    overflow-y: auto;
}

.mobile-nav.is-open {
    display: flex;
}

.mobile-nav a {
    display: block;
    padding: 12px 8px;
    color: #3d5a7f;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav a:hover {
    background: rgba(91, 121, 166, 0.08);
    color: #3d5a7f;
}

.mobile-nav a.active {
    background: rgba(91, 121, 166, 0.08);
    color: #5b79a6;
    font-weight: 800;
}

.mobile-nav-divider {
    height: 1px;
    background: rgba(91, 121, 166, 0.1);
    margin: 6px 0;
}

.mobile-nav-logout {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 8px;
    background: none;
    border: none;
    color: #5c7084 !important;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border-radius: 10px;
    font-family: inherit;
    transition: color 0.2s ease;
    text-decoration: none !important;
}

.mobile-nav-logout:hover,
.mobile-nav-logout:focus {
    color: #5576a8 !important;
    text-decoration: none !important;
}

.icon-wrapper {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.icon-wrapper span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(91, 121, 166, 0.1);
    font-size: 20px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    color: #5b79a6;
}

.icon-wrapper:hover span {
    background: rgba(91, 121, 166, 0.2);
    border-color: #5b79a6;
    transform: scale(1.1);
    color: #3d5a7f;
}

/* Dropdown Menu */
.dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 35px;
    background: white;
    padding: 15px;
    border-radius: 15px;
    width: 200px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 100;
    border: 1px solid rgba(91, 121, 166, 0.1);
}

.dropdown h4 {
    margin-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 5px;
    font-weight: 700;
    color: #1f364f;
    font-size: 16px;
}

.dropdown a {
    display: block;
    text-decoration: none;
    color: #5c7084;
    margin: 8px 0;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.dropdown a:hover {
    color: #5576a8;
}

.dropdown p {
    font-size: 14px;
    margin-bottom: 10px;
    color: #1f364f;
    font-weight: 500;
    cursor: default;
}

.dropdown {
    cursor: default;
}

.dropdown a {
    cursor: pointer;
}

/* ========================================
   FOOTER STYLES
   ======================================== */

.footer {
    background: #5b79a6;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    padding: 24px 20px 18px;
}

.footer-inner {
    max-width: 1020px;
    margin: 0 auto;
    text-align: center;
    display: grid;
    gap: 10px;
}

.footer-disclaimer {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.94);
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

.footer-trust-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.88rem;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-trust-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
}

.footer-links a:hover {
    color: rgba(255, 255, 255, 0.86);
    text-decoration: underline;
}

.footer-copy {
    margin-top: 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 640px) {
    .footer {
        padding: 18px 12px 14px;
    }

    .footer-inner {
        gap: 8px;
    }

    .footer-disclaimer {
        font-size: 0.76rem;
        line-height: 1.45;
    }

    .footer-trust-row,
    .footer-links {
        gap: 8px;
    }

    .footer-trust-item {
        font-size: 0.76rem;
        padding: 5px 9px;
    }

    .footer-links a {
        font-size: 0.78rem;
    }

    .footer-copy {
        font-size: 0.74rem;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 16px 10px 12px;
    }

    .footer-disclaimer {
        font-size: 0.72rem;
        line-height: 1.4;
    }

    .footer-trust-item,
    .footer-links a {
        font-size: 0.74rem;
    }

    .footer-copy {
        font-size: 0.7rem;
    }
}

/* ========================================
   BUTTON STYLES
   ======================================== */

.btn {
    background: #5b79a6;
    border: none;
    padding: 12px 60px;
    border-radius: 16px;
    font-size: 18px;
    cursor: pointer;
    text-decoration: none;
    color: black;
    font-weight: bold;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.btn:hover {
    opacity: 0.9;
}

/* ========================================
   MESSAGE ALERTS
   ======================================== */

.error {
    color: darkred;
    margin-bottom: 10px;
    text-align: center;
}

.success {
    color: darkgreen;
    margin-bottom: 10px;
    text-align: center;
}

.message {
    text-align: center;
    margin-top: 15px;
    font-weight: bold;
}
