:root {
    --crimson: #880808;
    --crimson-bright: #cc0000;
    --crimson-dark: #a30000;
    --black: #000000;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, black, #880808);
    background-attachment: fixed;
    color: white;
}

.title {
    text-align: center;
    font-size: 3em;
    color: white;
    margin-top: 20px;
    letter-spacing: 1px;
    text-shadow: 0 0 18px rgba(204, 0, 0, 0.55);
}

/* ---------------- NAVBAR ---------------- */

.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background: linear-gradient(to right, #880808, black);
    padding: 8px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    box-sizing: border-box;
    transition: box-shadow 0.3s ease, padding 0.3s ease, background 0.3s ease;
}

.navbar.scrolled {
    padding: 4px 20px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
    background: linear-gradient(to right, #6b0606, #0a0a0a);
}

.nav-left {
    display: flex;
    align-items: center;
    justify-self: start;
    position: relative;
}

.nav-center {
    justify-self: center;
    text-align: center;
}

.nav-right {
    justify-self: end;
}

.brand-text {
    font-size: 1.5em;
    font-weight: bold;
    letter-spacing: 2px;
    color: white;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(204, 0, 0, 0.7);
}

.nav-logo-link {
    display: block;
    line-height: 0;
}

.navbar img.nav-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.navbar img.nav-logo:hover {
    transform: scale(1.08) rotate(-4deg);
    box-shadow: 0 0 16px rgba(204, 0, 0, 0.8);
}

/* Hamburger toggle */
.menu-toggle {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
    border-radius: 6px;
    transition: background 0.25s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease, background 0.3s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background: var(--crimson-bright);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background: var(--crimson-bright);
}

/* Dropdown menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 240px;
    background: rgba(10, 10, 10, 0.97);
    border: 1px solid rgba(204, 0, 0, 0.4);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    padding: 8px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.dropdown-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu a {
    color: white;
    text-decoration: none;
    font-size: 1.05em;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    transition: background 0.2s ease, padding-left 0.2s ease, color 0.2s ease;
}

.dropdown-menu a i {
    margin-right: 10px;
    width: 18px;
    text-align: center;
    color: var(--crimson-bright);
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
    background: rgba(204, 0, 0, 0.18);
    padding-left: 18px;
    color: #ffdede;
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 90;
}

.menu-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* ---------------- PAGE CONTENT ---------------- */

.container {
    text-align: center;
    padding: 20px;
    padding-top: 100px;
}

h2 {
    margin-top: 20px;
    font-size: 2em;
}

p {
    font-size: 1.2em;
    margin: 20px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Scroll-reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.team-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

.team-member {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 10px;
    width: 23%;
    box-sizing: border-box;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.team-member:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(204, 0, 0, 0.5);
}

.team-member img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.4s ease;
}

.team-member:hover img {
    transform: scale(1.03);
}

.team-member ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.footer {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
}

.footer a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    font-size: 1em;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--crimson-bright);
}

.footer img {
    vertical-align: middle;
    margin-left: 10px;
    width: 150px;
    height: 150px;
}

.webmail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #cc0000;
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.webmail-button:hover {
    background-color: #a30000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(204, 0, 0, 0.5);
}

.webmail-button:active {
    transform: translateY(0);
}

/* ---------------- RESPONSIVE ---------------- */

@media (max-width: 640px) {
    .title {
        font-size: 2em;
    }

    .brand-text {
        font-size: 1.05em;
        letter-spacing: 1px;
    }

    .navbar img.nav-logo {
        width: 46px;
        height: 46px;
    }

    .team-grid {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .team-member {
        width: 100%;
    }

    .dropdown-menu {
        min-width: 200px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
