/* ===================================
   Sitemap Page Styles
   =================================== */

.re-sitemap-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8f4ec 0%, #f4efe6 42%, #f7f3eb 100%);
    color: #1f2421;
}

.re-sitemap-page__container {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

/* Header */
.re-sitemap-page__header {
    position: relative;
    overflow: hidden;
    padding: 50px 0 56px;
    margin-bottom: 30px;
}

.re-sitemap-page__header::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at top left, rgba(11, 59, 53, 0.08), transparent 34%),
        radial-gradient(circle at right center, rgba(185, 151, 91, 0.12), transparent 28%);
}

.re-sitemap-page__header .re-sitemap-page__container {
    position: relative;
    z-index: 1;
}

.re-sitemap-page__title {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem, 4vw, 4.4rem);
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #16201d;
}

.re-sitemap-page__intro {
    max-width: 760px;
    margin-top: 20px;
    font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(31, 36, 33, 0.74);
}

.re-sitemap-page__intro > *:first-child {
    margin-top: 0;
}

.re-sitemap-page__intro > *:last-child {
    margin-bottom: 0;
}

/* Content */
.re-sitemap-page__content {
    padding: 10px 0 96px;
}

.re-sitemap-page__grid {
    display: grid;
    gap: 0;
}

/* Cards */
.re-sitemap-page__section {
    position: relative;
    padding: 34px 34px 32px;
    margin-bottom: 28px;
    border: 1px solid rgba(11, 59, 53, 0.08);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 252, 246, 0.96));
    box-shadow:
        0 20px 45px rgba(27, 39, 35, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px);
}

.re-sitemap-page__section::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(11, 59, 53, 0.05), transparent 24%);
}

/* scala sinistra -> destra */
.re-sitemap-page__content .re-sitemap-page__section:nth-child(1) {
    width: min(100%, 980px);
    margin-left: 0;
    margin-right: auto;
}

.re-sitemap-page__content .re-sitemap-page__section:nth-child(2) {
    width: min(94%, 950px);
    margin-left: 36px;
    margin-right: auto;
}

.re-sitemap-page__content .re-sitemap-page__section:nth-child(3) {
    width: min(88%, 920px);
    margin-left: 72px;
    margin-right: auto;
}

.re-sitemap-page__section-title {
    position: relative;
    z-index: 1;
    margin: 0 0 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(11, 59, 53, 0.10);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.95rem, 2vw, 2.45rem);
    line-height: 1.1;
    font-weight: 700;
    color: #18211e;
}

/* Lists reset */
.re-sitemap-page__tree,
.re-sitemap-page__tree--child,
.re-sitemap-page__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Main items shared style */
.re-sitemap-page__tree-item--parent,
.re-sitemap-page__list-item {
    position: relative;
    z-index: 1;
    margin: 0 0 18px;
    padding-left: 34px;
    list-style: none;
}

.re-sitemap-page__tree-item--parent:last-child,
.re-sitemap-page__list-item:last-child {
    margin-bottom: 0;
}

/* elegant wave marker */
.re-sitemap-page__tree-item--parent::before,
.re-sitemap-page__list-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.98rem;
    width: 18px;
    height: 10px;
    border-top: 2px solid #c4a46a;
    border-radius: 999px;
    transform: translateY(-50%) rotate(-8deg);
    opacity: 0.95;
}

.re-sitemap-page__tree-item--parent::after,
.re-sitemap-page__list-item::after {
    content: "";
    position: absolute;
    left: 10px;
    top: 0.98rem;
    width: 10px;
    height: 6px;
    border-top: 2px solid rgba(196, 164, 106, 0.72);
    border-radius: 999px;
    transform: translateY(-50%) rotate(10deg);
}

/* Parent menu links + other section links */
.re-sitemap-page__tree-item--parent > .re-sitemap-page__link,
.re-sitemap-page__list-item > .re-sitemap-page__link {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0;
    font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 1.22rem;
    line-height: 1.45;
    font-weight: 600;
    color: #9c6d1d;
    text-decoration: none;
    background: transparent;
    transition:
        color 0.28s ease,
        transform 0.28s ease,
        opacity 0.28s ease;
}

/* Child items if the menu has sublevels */
.re-sitemap-page__tree--child {
    margin-top: 10px;
    margin-left: 8px;
    padding-left: 8px;
}

.re-sitemap-page__tree-item--child {
    position: relative;
    margin: 0 0 10px;
    padding-left: 28px;
    list-style: none;
}

.re-sitemap-page__tree-item--child:last-child {
    margin-bottom: 0;
}

.re-sitemap-page__tree-item--child::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.88rem;
    width: 14px;
    height: 8px;
    border-top: 2px solid rgba(196, 164, 106, 0.8);
    border-radius: 999px;
    transform: translateY(-50%) rotate(-6deg);
}

.re-sitemap-page__tree-item--child::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 0.88rem;
    width: 8px;
    height: 5px;
    border-top: 2px solid rgba(196, 164, 106, 0.55);
    border-radius: 999px;
    transform: translateY(-50%) rotate(8deg);
}

.re-sitemap-page__tree-item--child > .re-sitemap-page__link {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0;
    font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 1.02rem;
    line-height: 1.5;
    font-weight: 500;
    color: #8a6a34;
    text-decoration: none;
    transition:
        color 0.28s ease,
        transform 0.28s ease,
        opacity 0.28s ease;
}

/* Hover */
.re-sitemap-page__link:hover,
.re-sitemap-page__link:focus-visible {
    color: #0b3b35;
    transform: translateX(6px);
    outline: none;
}

/* Count */
.re-sitemap-page__count {
    margin-left: 0.45rem;
    font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(31, 36, 33, 0.62);
}

/* Responsive */
@media (max-width: 1080px) {
    .re-sitemap-page__content .re-sitemap-page__section:nth-child(1) {
        width: min(100%, 940px);
    }

    .re-sitemap-page__content .re-sitemap-page__section:nth-child(2) {
        width: min(96%, 920px);
        margin-left: 24px;
    }

    .re-sitemap-page__content .re-sitemap-page__section:nth-child(3) {
        width: min(92%, 900px);
        margin-left: 48px;
    }
}

@media (max-width: 768px) {
    .re-sitemap-page__container {
        width: min(1200px, calc(100% - 28px));
    }

    .re-sitemap-page__header {
        padding: 126px 0 40px;
    }

    .re-sitemap-page__content {
        padding: 4px 0 72px;
    }

    .re-sitemap-page__section {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 24px 20px 22px;
        border-radius: 22px;
    }

    .re-sitemap-page__section::after {
        border-radius: 22px;
    }

    .re-sitemap-page__section-title {
        margin-bottom: 18px;
        padding-bottom: 14px;
        font-size: 1.75rem;
    }

    .re-sitemap-page__tree-item--parent,
    .re-sitemap-page__list-item {
        padding-left: 28px;
        margin-bottom: 14px;
    }

    .re-sitemap-page__tree-item--parent > .re-sitemap-page__link,
    .re-sitemap-page__list-item > .re-sitemap-page__link {
        font-size: 1.08rem;
    }

    .re-sitemap-page__tree-item--child {
        padding-left: 24px;
    }

    .re-sitemap-page__tree-item--child > .re-sitemap-page__link {
        font-size: 0.96rem;
    }
}

@media (max-width: 480px) {
    .re-sitemap-page__title {
        font-size: 2.2rem;
    }

    .re-sitemap-page__intro {
        font-size: 0.98rem;
        line-height: 1.72;
    }

    .re-sitemap-page__section-title {
        font-size: 1.58rem;
    }

    .re-sitemap-page__tree-item--parent > .re-sitemap-page__link,
    .re-sitemap-page__list-item > .re-sitemap-page__link {
        font-size: 1rem;
    }
}