/*
 * TEMPORARY STYLES — remove when main layout is integrated.
 */

/* ===== Reset & Base ===== */

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

body {
    font-family: sans-serif;
    line-height: 1.5;
    color: #222;
    background: #fff;
}

a {
    color: #1a6b3c;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===== 12-Column Fluid Grid ===== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.col {
    padding: 0 12px;
    flex: 1 1 0;
    min-width: 0;
}

.col-1  { flex: 0 0 calc(100% *  1 / 12); max-width: calc(100% *  1 / 12); }
.col-2  { flex: 0 0 calc(100% *  2 / 12); max-width: calc(100% *  2 / 12); }
.col-3  { flex: 0 0 calc(100% *  3 / 12); max-width: calc(100% *  3 / 12); }
.col-4  { flex: 0 0 calc(100% *  4 / 12); max-width: calc(100% *  4 / 12); }
.col-5  { flex: 0 0 calc(100% *  5 / 12); max-width: calc(100% *  5 / 12); }
.col-6  { flex: 0 0 calc(100% *  6 / 12); max-width: calc(100% *  6 / 12); }
.col-7  { flex: 0 0 calc(100% *  7 / 12); max-width: calc(100% *  7 / 12); }
.col-8  { flex: 0 0 calc(100% *  8 / 12); max-width: calc(100% *  8 / 12); }
.col-9  { flex: 0 0 calc(100% *  9 / 12); max-width: calc(100% *  9 / 12); }
.col-10 { flex: 0 0 calc(100% * 10 / 12); max-width: calc(100% * 10 / 12); }
.col-11 { flex: 0 0 calc(100% * 11 / 12); max-width: calc(100% * 11 / 12); }
.col-12 { flex: 0 0 100%;                  max-width: 100%;                  }

/* ===== Header ===== */

header {
    background: #1a6b3c;
    color: #fff;
    padding: 12px 0;
}

header .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

header h1 {
    font-size: 1.15rem;
    white-space: nowrap;
}

header h1 a {
    color: #fff;
    text-decoration: none;
}

header form {
    display: flex;
    margin-left: auto;
}

header form input[type="text"] {
    font-family: sans-serif;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px 0 0 3px;
    outline: none;
}

header form button {
    font-family: sans-serif;
    padding: 4px 12px;
    border: none;
    background: #fff;
    color: #1a6b3c;
    cursor: pointer;
    border-radius: 0 3px 3px 0;
}

/* ===== Navigation (3-level hover menu) ===== */

nav.main-nav {
    width: 100%;
}

/* Level 1 — horizontal bar */
nav.main-nav > ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: #155c32;
    border-radius: 4px;
}

nav.main-nav > ul > li {
    position: relative;
}

nav.main-nav > ul > li > a {
    display: block;
    padding: 8px 14px;
    color: #fff;
    font-size: 0.9rem;
    white-space: nowrap;
    text-decoration: none;
}

nav.main-nav > ul > li:hover > a,
nav.main-nav > ul > li > a:focus {
    background: #0e4524;
}

/* Level 2 — dropdown */
nav.main-nav > ul > li > ul {
    list-style: none;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    z-index: 100;
    border-radius: 0 0 4px 4px;
}

nav.main-nav > ul > li:hover > ul {
    display: block;
}

nav.main-nav > ul > li > ul > li {
    position: relative;
}

nav.main-nav > ul > li > ul > li > a {
    display: block;
    padding: 6px 14px;
    color: #222;
    font-size: 0.85rem;
    text-decoration: none;
}

nav.main-nav > ul > li > ul > li:hover > a,
nav.main-nav > ul > li > ul > li > a:focus {
    background: #eef6f0;
    color: #1a6b3c;
}

/* Level 3 — flyout */
nav.main-nav > ul > li > ul > li > ul {
    list-style: none;
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 220px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    z-index: 101;
    border-radius: 0 4px 4px 0;
}

nav.main-nav > ul > li > ul > li:hover > ul {
    display: block;
}

nav.main-nav > ul > li > ul > li > ul > li > a {
    display: block;
    padding: 6px 14px;
    color: #222;
    font-size: 0.85rem;
    text-decoration: none;
}

nav.main-nav > ul > li > ul > li > ul > li:hover > a,
nav.main-nav > ul > li > ul > li > ul > li > a:focus {
    background: #eef6f0;
    color: #1a6b3c;
}

/* ===== Breadcrumbs ===== */

nav[aria-label="breadcrumb"] {
    padding: 10px 0;
    font-size: 0.85rem;
    color: #666;
}

nav[aria-label="breadcrumb"] ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

nav[aria-label="breadcrumb"] ol li + li::before {
    content: "/";
    margin: 0 8px;
    color: #999;
}

nav[aria-label="breadcrumb"] a {
    color: #1a6b3c;
}

nav[aria-label="breadcrumb"] a:hover {
    text-decoration: underline;
}

/* ===== Main Content ===== */

main {
    padding: 24px 0;
    font-size: 1rem;
    line-height: 1.7;
}

/* ===== Typography (scoped to main) ===== */

main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
    color: #1a1a1a;
    line-height: 1.3;
    font-weight: 600;
}

main h1 {
    font-size: 2rem;
    margin: 0 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #1a6b3c;
}

main h2 {
    font-size: 1.5rem;
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e0e0e0;
}

main h3 {
    font-size: 1.25rem;
    margin: 1.75rem 0 0.6rem;
}

main h4 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
}

main h5 {
    font-size: 1rem;
    margin: 1.25rem 0 0.4rem;
}

main h6 {
    font-size: 0.9rem;
    margin: 1rem 0 0.4rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

main p {
    margin: 0 0 1rem;
}

/* Links */
main a {
    color: #1a6b3c;
    text-decoration: underline;
    text-decoration-color: rgba(26, 107, 60, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.15s;
}

main a:hover {
    text-decoration-color: #1a6b3c;
}

main a:visited {
    color: #4a7c5f;
}

/* Lists */
main ul,
main ol {
    margin: 0 0 1rem;
    padding-left: 1.6rem;
}

main ul {
    list-style: disc;
}

main ol {
    list-style: decimal;
}

main li {
    margin-bottom: 0.35rem;
}

main li > ul,
main li > ol {
    margin-top: 0.35rem;
    margin-bottom: 0;
}

main ul ul {
    list-style: circle;
}

main ul ul ul {
    list-style: square;
}

/* Definition lists */
main dl {
    margin: 0 0 1rem;
}

main dt {
    font-weight: 600;
    margin-top: 0.75rem;
}

main dd {
    margin-left: 1.6rem;
    margin-bottom: 0.35rem;
    color: #444;
}

/* Blockquotes */
main blockquote {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid #1a6b3c;
    background: #f7faf8;
    color: #333;
    font-style: italic;
    border-radius: 0 4px 4px 0;
}

main blockquote p:last-child {
    margin-bottom: 0;
}

main blockquote cite {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-style: normal;
    color: #666;
}

main blockquote cite::before {
    content: "— ";
}

/* Tables */
main table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.25rem 0;
    font-size: 0.92rem;
}

main table caption {
    caption-side: top;
    text-align: left;
    font-weight: 600;
    padding-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #333;
}

main table th,
main table td {
    border: 1px solid #ddd;
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}

main table th {
    background: #f0f5f2;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
}

main table tbody tr:hover {
    background: #fafcfb;
}

main table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

main table tbody tr:nth-child(even):hover {
    background: #f2f6f3;
}

/* Code & preformatted */
main code {
    font-family: "SF Mono", "Consolas", "Liberation Mono", monospace;
    font-size: 0.88em;
    background: #f3f3f3;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: #c7254e;
}

main pre {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow-x: auto;
    line-height: 1.5;
}

main pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.85rem;
}

/* Horizontal rule */
main hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 2rem 0;
}

/* Details / Summary */
main details {
    margin: 1rem 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0;
}

main details summary {
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    background: #f7faf8;
    border-radius: 4px;
}

main details[open] summary {
    border-bottom: 1px solid #e0e0e0;
    border-radius: 4px 4px 0 0;
}

main details > *:not(summary) {
    padding: 0 14px;
}

/* Figure & caption */
main figure {
    margin: 1.5rem 0;
}

main figure img {
    border-radius: 4px;
}

main figcaption {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

/* Mark / highlight */
main mark {
    background: #fff3cd;
    padding: 0.1em 0.3em;
    border-radius: 2px;
}

/* Small text */
main small {
    font-size: 0.85rem;
    color: #666;
}

/* ===== Document Filters ===== */

.document-filters {
    margin: 1.5rem 0;
}

.filter-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 0;
    margin: 0;
}

.filter-item {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.filter-item:hover {
    background: #eef6f0;
    border-color: #1a6b3c;
    color: #1a6b3c;
    text-decoration: none;
}

.filter-item--active {
    background: #1a6b3c;
    border-color: #1a6b3c;
    color: #fff;
}

.filter-item--active:hover {
    background: #155c32;
    color: #fff;
}

.filter-item--active:visited {
    color: #fff;
}

/* ===== Footer ===== */

footer {
    background: #f5f5f5;
    padding: 24px 0;
    font-size: 0.85rem;
    color: #666;
    margin-top: 40px;
}

footer hr {
    display: none;
}

footer ul {
    list-style: none;
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

footer a {
    color: #1a6b3c;
}

/* ===== Person Filters (visible tag list) ===== */

.person-filters {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.person-filters__section {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.person-filters__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    min-width: 80px;
}

.person-filters__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.person-filters__item {
    display: inline-block;
    padding: 5px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #444;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    cursor: pointer;
}

.person-filters__item:hover {
    background: #eef6f0;
    border-color: #1a6b3c;
    color: #1a6b3c;
    text-decoration: none;
}

.person-filters__item--active,
.person-filters__item--active:hover {
    background: #1a6b3c;
    border-color: #1a6b3c;
    color: #fff;
}

/* ===== Person Group (category headings) ===== */

.person-group {
    margin-bottom: 32px;
}

.person-group__title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1a6b3c;
}

/* ===== Person Card Grid (shared for Guides, Team, People) ===== */

.person-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* Full card (with photo) */
.person-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.person-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
    transform: translateY(-2px);
}

.person-card__photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background: #eee;
}

.person-card__body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.person-card__name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
}

.person-card__name a {
    color: inherit;
    text-decoration: none;
}

.person-card__name a:hover {
    color: #1a6b3c;
}

.person-card__role {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.person-card__meta {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.person-card__contacts {
    margin-top: auto;
    padding-top: 8px;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.person-card__contacts a {
    color: #1a6b3c;
    text-decoration: none;
}

.person-card__contacts a:hover {
    text-decoration: underline;
}

.person-card__tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    background: #eef6f0;
    color: #1a6b3c;
    border-radius: 3px;
}

.person-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

/* Compact card (no photo) */
.person-card--compact {
    flex-direction: row;
    align-items: center;
    border-left: 3px solid #1a6b3c;
}

.person-card--compact .person-card__body {
    padding: 12px 16px;
    gap: 3px;
}

.person-card--compact .person-card__name {
    font-size: 0.95rem;
}

.person-card--compact .person-card__contacts {
    flex-direction: row;
    gap: 12px;
    padding-top: 4px;
    margin-top: 4px;
}

.person-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 16px;
    color: #999;
    font-size: 1rem;
}

/* Guide detail */
.guide-detail__title {
    margin-bottom: 0.25rem;
}

.guide-detail__category {
    margin: 0 0 1rem;
    color: #555;
    font-size: 0.95rem;
}

.guide-detail__photo-wrap {
    margin: 0 0 1rem;
}

.guide-detail__photo {
    max-width: 280px;
    border-radius: 4px;
}

.guide-detail__tags {
    margin-bottom: 1rem;
}

.guide-detail__content {
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

.guide-detail__back {
    margin-top: 2rem;
}

/* ===== Utility ===== */

img {
    max-width: 100%;
    height: auto;
}
