* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #003366;
    --accent-yellow: #ffb81c;
    --accent-red: #dc3545;
    --ink-900: #1a1a1a;
    --ink-700: #243b53;
    --ink-500: #486581;
    --surface-100: #f8f9fa;
    --surface-200: #f1f5fa;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Vendara, sans-serif;
    color: var(--ink-900);
    background-color: var(--surface-100);
 }

 h1,
 h2,
 h3,
 .phrase-word {
    font-family: Georgia, "Times New Roman", serif;
 }

 .parent {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
 }

 .parent .header {
    background-color: var(--primary);
    color: white;
    display: flex;
    flex-direction: column;
    position: relative;
 }

 .header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
 }

 #course-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    flex: 1;
 }

 .site-branding {
    flex: 1;
 }

 .site-subtitle {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.92;
 }

#menu {
    font-size: 1.5rem;
    border: 0;
    background: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

#menu::before {
    content: "☰";
}

#menu.open::before {
    content: "x";
}

.parent .navigation {
    background-color: #0d2f52;
    padding: 0;
}

.navigation {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.navigation.open {
    max-height: 500px;
}

.navigation li {
    display: flex;
}

.navigation a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.8rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid var(--primary);
}

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

.navigation a:hover,
.navigation a[aria-current="page"] {
    background-color: var(--primary);
}

main{
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1.5rem 1rem;
    background: linear-gradient(180deg. #f3f6fb 0%, #e9f1fa 100%)
}

.container {
    width: 100%;
    max-width: 700px;
}

main ul {
    padding-left: 1.25rem;
    list-style-position: outside;
}

main li {
    margin: 0.45rem 0;
}

.card {
    background: white;
    border: 1px solid #d5e2f0;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 14px 28px rgba(44, 82, 130, 0.18);
}

.card-header {
    margin-bottom: 1rem;
}

.phrase-number {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    background: #e9f1fb;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
}

.phrase-word{
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

.phrase-translation {
    color: var(--ink-700);
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.divider {
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
    margin: 0.9rem 0 1rem;
    opacity: 0.55;
}

.phrase {
    background: var(--surface--200);
}

.label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ink-500);
    margin-bottom: 0.35rem;
}

.text {
    color: var(--ink-600);
    font-style: italic;
    line-height: 1.5;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-group label {
    font-weight: 700;
    color: var(--ink-700);
}

.form-group input,
.form-group textarea {
    border: 1px solid #c5d7eb;
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--ink-900);
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 110px;
}

.form-group input:focus-visible, 
.form-group textarea:focus-visible {
    outline: 3px solid var(--accent-yellow);
    outline-offset: 1px;
    border-color: var(--primary);
}

.button-group {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.button-group button {
    width: 100%;
    border-radius: 10px;
    border: 2px solid transparent;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary {
    background: var(--accent-yellow);
    color: var(--primary);
    border-color: var(--accent-yellow);
}

.btn-primary:hover {
    background: #e2a106;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(220, 53, 69, 0.18);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background: #edf3fb;
    transform: translateY(-2px);
}

.button-group button:focus-visible,
.navigation a:focus-visible,
#menu:focus-visible {
    outline: 3px solid var(--accent-yellow);
    outline-offset: 2px;
}

.fade-in {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.parent .footer {
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    text-align: center;
    font-size: 0.85rem;
    margin-top: auto;
    border-top: 4px solid var(--accent-red);
}

.parent .footer p {
    margin: 0.3rem 0;
}

@media (min-width: 768px) {
    .header-top {
        padding: 1.5rem;
    }

    #course-title {
        font-size: 1.5rem;
    }

    .sub-title {
        font-size: 0.95rem;
    }

    #menu {
        display: none;
    }

    .parent .nav {
        background-color: transparent;
    }

    .navigation {
        flex-direction: row;
        max-height: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .navigation li {
        flex: 1;
    }

    .navigation a {
        border-bottom: none;
        border-right: 1px solid var(--primary);
        font-size: 1rem;
        padding: 1rem;
    }

    .navigation li:last-child a {
        border-right: none;
    }

    .parent .title {
        padding: 2rem 1rem;
    }

    main {
        padding: 2rem;
    }

    .card {
        padding: 2rem;
    }

    .phrase-word {
        font-size: 2.25rem;
    }

    .phrase-translation {
        font-size: 1.15rem;
    }

    .button-group {
        margin-top: 1.5rem;
        flex-direction: row;
    }

    .button-group button {
        width: auto;
        flex: 1;
    }

    .parent .footer {
        padding: 1.5rem;
        font-size: 0.95rem;
    }
}

@media (min-width: 1024px) {
    .card {
        padding: 2.25rem;
    }
}