:root {
    --primary-red: #bf1d2d;
    --soft-cream: #fff1e6;
    --accent-pink: #f7c7d9;
    --accent-gold: #f8d675;
    --text-dark: #4c2a2a;
    --text-muted: #b56b6b;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #ffe9f0 40%, #ffe2d4 100%);
    min-height: 100vh;
    color: var(--text-dark);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: linear-gradient(90deg, var(--primary-red) 0%, #ff6f61 100%);
    color: #fff;
    border-bottom-left-radius: 60px;
    border-bottom-right-radius: 60px;
    box-shadow: 0 12px 30px rgba(191, 29, 45, 0.3);
}

.navigation-wrapper {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex: 1;
}

.logo-area h1 {
    font-family: 'Comfortaa', cursive;
    font-size: 2.2rem;
    letter-spacing: 0.2rem;
}

.logo-area .subtitle {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    letter-spacing: 0.5rem;
    margin-top: 0.2rem;
}

.nav {
    display: flex;
    gap: 1.5rem;
    font-weight: 600;
    margin-left: auto;
}

.nav a {
    color: #fff;
    text-decoration: none;
    padding-bottom: 0.2rem;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.nav a:hover {
    border-color: #fff;
}

.auth-area {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    border: 2px solid transparent;
}

.auth-btn:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.auth-btn--outline {
    border-color: #fff;
    color: #fff;
}

.auth-btn--outline:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
}

.auth-btn--solid {
    background: #fff;
    color: var(--primary-red);
}

.auth-btn--solid:hover {
    transform: translateY(-2px);
    background: var(--accent-gold);
    color: var(--text-dark);
}

.profile-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-toggle {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-toggle:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.7);
    outline-offset: 4px;
}

.profile-toggle:hover {
    transform: translateY(-1px);
}

.profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    background: #fff;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    background: #fff;
    color: var(--text-dark);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
    padding: 1rem 1.25rem;
    min-width: 260px;
    display: none;
    z-index: 10;
}

.profile-menu.is-open .profile-dropdown {
    display: block;
}

.profile-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-red);
}

.profile-dropdown__list {
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

.profile-dropdown__list a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    padding: 0.35rem 0;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.profile-dropdown__list a:hover,
.profile-dropdown__list a:focus-visible {
    background-color: rgba(191, 29, 45, 0.08);
    color: var(--primary-red);
    outline: none;
}

.profile-dropdown__separator {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 0.85rem 0 0.6rem;
}

.profile-dropdown__logout {
    width: 100%;
    border: none;
    background: linear-gradient(90deg, var(--primary-red) 0%, #ff6f61 100%);
    color: #fff;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-dropdown__logout:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(191, 29, 45, 0.3);
}

.profile-dropdown__logout:focus-visible {
    outline: 3px solid rgba(191, 29, 45, 0.3);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2.5rem;
    padding: 3rem 4rem;
}

.hero__left {
    display: flex;
    justify-content: center;
}

.left-card {
    background: var(--soft-cream);
    border-radius: 40px;
    padding: 2rem 2.5rem 3rem;
    box-shadow: 0 15px 40px rgba(191, 29, 45, 0.15);
    border: 5px solid var(--accent-pink);
    text-align: center;
    position: relative;
}

.badge {
    background: var(--accent-gold);
    color: var(--text-dark);
    font-weight: 700;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    display: block;
    margin-bottom: 1.5rem;
}

.lucky-cat {
    width: 220px;
    max-width: 100%;
}

.hero__right {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 2rem;
}

.intro {
    background: #fff;
    border-radius: 40px;
    padding: 2.5rem;
    border: 5px solid var(--accent-pink);
    box-shadow: 0 15px 40px rgba(191, 29, 45, 0.12);
    position: relative;
}

.intro h2 {
    font-size: 1.35rem;
    line-height: 1.7;
    font-weight: 700;
}

.intro__footer {
    width: 100%;
    margin-top: 1.8rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-red);
    text-align: center;
}

.torii-card {
    background: #fff;
    border-radius: 40px;
    padding: 2rem 2.5rem;
    border: 5px solid var(--accent-pink);
    box-shadow: 0 15px 40px rgba(191, 29, 45, 0.12);
    display: flex;
    flex-direction: column;   /* 👉 додаємо */
    align-items: center;
    justify-content: center;
}

.torii-image {
    display: block;
    max-width: 100%;
    width: 100%;
}

.side-notes {
    position: absolute;
    top: 50%;
    left: 2rem;
    transform: translateY(-50%);
}

.paw-list {
    background: rgba(255, 240, 240, 0.85);
    border: 4px dashed var(--accent-pink);
    border-radius: 30px;
    padding: 1.5rem;
    font-weight: 600;
    color: var(--text-muted);
    width: 100%;
    line-height: 1.6;
    text-align: center;
}

.paw-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.paw-list li + li {
    margin-top: 0.9rem;
}


.paw-list p + p {
    margin-top: 0.9rem;
}

@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .side-notes {
        position: static;
        transform: none;
        margin: 0 2rem 3rem;
    }

    .paw-list {
        width: 100%;
    }

    .hero {
        padding: 3rem 2rem;
    }

    .top-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .navigation-wrapper {
        flex-direction: column;
        gap: 1.25rem;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .auth-actions {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 2rem 1.5rem;
    }

    .intro h2 {
        font-size: 1.1rem;
    }

    .torii-image {
        width: 220px;
    }
}

/* ——— Shared layout spacing  ——— */
.section {
    padding: 3rem 4rem;
}
@media (max-width: 992px) {
    .section { padding: 3rem 2rem; }
}
@media (max-width: 600px) {
    .section { padding: 2rem 1.5rem; }
}

/* ——— Courses UI (same palette & card style as main) ——— */
.level-tabs {
    margin: 1rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.level-tab {
    border: 3px solid var(--accent-pink);
    border-radius: 999px;
    padding: 0.55rem 1.4rem;
    font-weight: 700;
    background: #fff;
    color: var(--text-dark);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    box-shadow: 0 6px 16px rgba(191, 29, 45, 0.12);
}
.level-tab.is-active {
    background: var(--accent-pink);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.course-heading {
    text-align: center;
    margin-top: 1rem;
}
.course-heading h2 {
    margin: 0 0 .35rem 0;
    font-size: 1.5rem;
    color: var(--primary-red);
}
.course-heading p {
    margin: 0;
    color: var(--text-muted);
}

/* grid reuses soft cards look */
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.lesson-card {
    background: #fff;
    border-radius: 32px;
    padding: 1.25rem 1rem;
    border: 5px solid var(--accent-pink);
    box-shadow: 0 15px 40px rgba(191, 29, 45, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.lesson-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .35rem .9rem;
    border-radius: 999px;
    background: var(--primary-red);
    color: #fff;
    font-weight: 700;
    letter-spacing: .02em;
    margin-bottom: .5rem;
}

.lesson-title {
    font-weight: 600;
    color: var(--text-dark);
}

.status-message {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 1rem;
}

/* ——— Contact page ——— */
.contact {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
    gap: 2.5rem;
    align-items: start;
}

.contact-card {
    background: var(--soft-cream);
    border-radius: 40px;
    padding: 2.5rem 3rem;
    border: 5px solid var(--accent-pink);
    box-shadow: 0 20px 45px rgba(191, 29, 45, 0.15);
}

.contact-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.contact-card h2 {
    font-size: 1.75rem;
    margin: 1.5rem 0 1rem;
}

.contact-text {
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.6;
}

.contact-list {
    margin: 2rem 0 0;
    display: grid;
    gap: 1.2rem;
}

.contact-item {
    background: #fff;
    border-radius: 24px;
    padding: 1rem 1.4rem;
    border: 3px solid var(--accent-pink);
    box-shadow: 0 10px 28px rgba(191, 29, 45, 0.12);
}

.contact-item dt {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.contact-item dd {
    margin: 0;
    font-size: 1.05rem;
}

.contact-item a {
    color: var(--primary-red);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-item a:hover,
.contact-item a:focus {
    color: #ff6f61;
}

.contact-footer {
    margin-top: 2.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.contact-visuals {
    display: grid;
    gap: 1.5rem;
}

.photo-placeholder {
    background: rgba(255, 255, 255, 0.85);
    border: 5px dashed var(--accent-pink);
    border-radius: 32px;
    min-height: 220px;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 30px rgba(191, 29, 45, 0.1);
    text-align: center;
    padding: 1.5rem;
}

.photo-caption {
    font-family: 'Comfortaa', cursive;
    font-size: 1.05rem;
    color: var(--text-muted);
}

@media (max-width: 1100px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-card {
        order: 2;
    }

    .contact-visuals {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        order: 1;
    }
}

@media (max-width: 600px) {
    .contact-card {
        padding: 2rem;
    }

    .contact-card h2 {
        font-size: 1.45rem;
    }

    .photo-placeholder {
        min-height: 180px;
    }
}

/* Optional: highlight current nav link on all pages */
.nav a[aria-current="page"] {
    font-weight: 700;
    color: var(--accent-gold);
    border-color: #fff;
}

/* ——— Auth pages ——— */
.auth-page {
    display: grid;
    gap: 2.5rem;
}

.auth-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--primary-red);
}

.auth-header p {
    color: var(--text-muted);
    line-height: 1.6;
}

.auth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.auth-card {
    background: #fff;
    border-radius: 36px;
    padding: 2.25rem 2.5rem;
    border: 5px solid var(--accent-pink);
    box-shadow: 0 18px 36px rgba(191, 29, 45, 0.12);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-card h2 {
    font-size: 1.5rem;
    color: var(--primary-red);
}

.auth-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.auth-form label {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--text-dark);
}

.auth-form input {
    padding: 0.75rem 1rem;
    border-radius: 14px;
    border: 2px solid var(--accent-pink);
    background: var(--soft-cream);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(191, 29, 45, 0.2);
}

.auth-submit {
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(90deg, var(--primary-red) 0%, #ff6f61 100%);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(191, 29, 45, 0.25);
}

.auth-submit:focus-visible {
    outline: 3px solid rgba(191, 29, 45, 0.4);
    outline-offset: 3px;
}

.auth-alert {
    border-radius: 18px;
    padding: 0.9rem 1.1rem;
    line-height: 1.5;
    font-weight: 600;
}

.auth-alert ul {
    margin: 0.35rem 0 0 1.1rem;
}

.auth-alert--error {
    background: rgba(191, 29, 45, 0.12);
    border: 2px solid rgba(191, 29, 45, 0.35);
    color: var(--primary-red);
}

.auth-alert--success {
    background: rgba(68, 184, 108, 0.12);
    border: 2px solid rgba(68, 184, 108, 0.4);
    color: #2f7a4a;
}

.auth-note {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.auth-divider {
    height: 1px;
    background: rgba(191, 29, 45, 0.15);
    border: none;
}

@media (max-width: 600px) {
    .auth-card {
        padding: 2rem 1.75rem;
    }
}

/* ——— Profile page ——— */
.profile-page {
    display: grid;
    gap: 2rem;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 40px;
    padding: 2.5rem 3rem;
    border: 5px solid var(--accent-pink);
    box-shadow: 0 18px 40px rgba(191, 29, 45, 0.12);
}

.profile-header__content h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--primary-red);
}

.profile-header__content p {
    color: var(--text-muted);
    line-height: 1.6;
}

.profile-header__avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 6px solid var(--accent-pink);
    background: #fff;
    box-shadow: 0 12px 24px rgba(191, 29, 45, 0.2);
    object-fit: cover;
}

.profile-alert {
    border-radius: 20px;
    padding: 1rem 1.25rem;
    font-weight: 600;
    line-height: 1.5;
}

.profile-alert--success {
    background: rgba(68, 184, 108, 0.12);
    border: 2px solid rgba(68, 184, 108, 0.35);
    color: #2f7a4a;
}

.profile-card {
    background: #fff;
    border-radius: 36px;
    border: 5px solid var(--accent-pink);
    box-shadow: 0 18px 40px rgba(191, 29, 45, 0.12);
    padding: 2.25rem 2.5rem;
    display: grid;
    gap: 1.5rem;
}

.profile-card h2 {
    font-size: 1.6rem;
    color: var(--primary-red);
}

.profile-data {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.profile-data li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--soft-cream);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(191, 29, 45, 0.15);
}

.profile-data__label {
    font-weight: 600;
    color: var(--text-muted);
}

.profile-data__value {
    font-weight: 700;
    color: var(--text-dark);
}

.profile-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.profile-action-card {
    background: #fff;
    border-radius: 32px;
    border: 4px solid var(--accent-pink);
    box-shadow: 0 15px 36px rgba(191, 29, 45, 0.12);
    padding: 2rem;
    display: grid;
    gap: 0.9rem;
}

.profile-action-card h3 {
    color: var(--primary-red);
    font-size: 1.35rem;
}

.profile-action-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

.profile-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.8rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-red) 0%, #ff6f61 100%);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(191, 29, 45, 0.25);
}

.profile-action-btn--outline {
    background: #fff;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
}

.profile-action-btn--outline:hover {
    box-shadow: none;
    background: rgba(191, 29, 45, 0.08);
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .profile-data li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
}

/* ——— Settings page ——— */
.settings-page {
    display: grid;
    gap: 2rem;
}

.settings-header {
    background: #fff;
    border-radius: 40px;
    padding: 2.5rem 3rem;
    border: 5px solid var(--accent-pink);
    box-shadow: 0 18px 40px rgba(191, 29, 45, 0.12);
}

.settings-header h1 {
    font-size: 2rem;
    color: var(--primary-red);
    margin-bottom: 0.75rem;
}

.settings-header p {
    color: var(--text-muted);
    line-height: 1.6;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.settings-card {
    background: #fff;
    border-radius: 32px;
    border: 4px solid var(--accent-pink);
    box-shadow: 0 15px 36px rgba(191, 29, 45, 0.12);
    padding: 2rem;
    display: grid;
    gap: 1rem;
}

.settings-card h2 {
    color: var(--primary-red);
    font-size: 1.35rem;
}

.settings-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

.settings-form {
    display: grid;
    gap: 0.75rem;
}

.settings-form label {
    font-weight: 600;
    color: var(--text-dark);
}

.settings-form input {
    padding: 0.75rem 1rem;
    border-radius: 14px;
    border: 2px solid var(--accent-pink);
    background: var(--soft-cream);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-form input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(191, 29, 45, 0.2);
}

.settings-form--stacked {
    gap: 0.65rem;
}

.settings-submit {
    margin-top: 0.5rem;
    align-self: start;
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(90deg, var(--primary-red) 0%, #ff6f61 100%);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.settings-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(191, 29, 45, 0.25);
}

.settings-submit:focus-visible {
    outline: 3px solid rgba(191, 29, 45, 0.4);
    outline-offset: 3px;
}

.settings-note {
    background: linear-gradient(120deg, rgba(247, 199, 217, 0.4), rgba(248, 214, 117, 0.4));
    border-radius: 32px;
    padding: 2rem 2.5rem;
    border: 3px dashed rgba(191, 29, 45, 0.35);
    color: var(--text-dark);
    display: grid;
    gap: 0.75rem;
}

.settings-note h2 {
    font-size: 1.5rem;
    color: var(--primary-red);
}

@media (max-width: 768px) {
    .settings-header {
        text-align: center;
    }
}
