/* ===== Site-wide enhancements: trust, outdoor UX, unified chrome ===== */

body.has-site-header .mtn-hero,
body.peak-page .mtn-hero {
    margin-top: var(--header-height, clamp(72px, 14vw, 100px));
}

body.has-site-header.peak-page {
    --primary-color: #7A5C18;
    --primary-bright: #C9973B;
    --secondary-color: #2F4F35;
    --accent-soft: #D4A574;
}

/* Shared section heroes — blog, shelters, climbing */
.cl-hero,
.ph-hero,
.blog-hero {
    position: relative;
    margin-top: 0;
    min-height: min(72vh, 40rem);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.cl-hero-bg,
.ph-hero-bg,
.blog-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.cl-hero::after,
.ph-hero::after,
.blog-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(20, 16, 8, 0.92) 0%,
        rgba(20, 16, 8, 0.45) 45%,
        rgba(20, 16, 8, 0.25) 100%
    );
    z-index: 1;
}

.cl-hero-inner,
.ph-hero-inner,
.blog-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 52rem;
    margin: 0 auto;
    padding: 3rem var(--page-gutter) 2.75rem;
    text-align: center;
    color: #fff;
}

/* Climbing page — align with alpine palette */
.cl-tab.active,
.cl-home-link,
.sr-page .cl-tab:focus-visible {
    border-color: var(--primary-color, #7A5C18) !important;
    color: var(--primary-color, #7A5C18) !important;
}

.cl-card-grade,
.cl-meta strong {
    color: var(--primary-bright, #C9973B) !important;
}

/* Touch-friendly controls (outdoor / gloves) */
body.adventure-mode .btn,
body.adventure-mode .tour-btn,
body.adventure-mode .blog-filter-btn,
body.adventure-mode .ph-filter-btn,
body.adventure-mode .cl-tab,
body.adventure-mode .route-map-btn,
body.adventure-mode .action-btn,
body.adventure-mode .mobile-menu-toggle,
body.adventure-mode .theme-toggle,
body.adventure-mode .lang-switch-btn {
    min-height: 48px;
    min-width: 48px;
    font-size: 1rem;
}

body.adventure-mode {
    --text-dark: #0f0d0a;
    --text-light: #2a2520;
}

body.adventure-mode .header {
    background: rgba(15, 13, 10, 0.98);
}

body.adventure-mode .section-card,
body.adventure-mode .blog-card,
body.adventure-mode .ph-card {
    border: 1px solid rgba(26, 22, 18, 0.14);
    box-shadow: 0 4px 20px rgba(26, 22, 18, 0.1);
}

/* Trust badge on peak pages */
.peak-trust-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
    padding: 0.65rem 1rem;
    margin: 0 0 1.25rem;
    background: rgba(47, 79, 53, 0.08);
    border: 1px solid rgba(47, 79, 53, 0.15);
    border-radius: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-light);
}

.peak-trust-bar strong { color: var(--text-dark); }

.peak-trust-sources {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Emergency FAB — سمت راست */
.emergency-fab {
    position: fixed;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    right: calc(1rem + env(safe-area-inset-right, 0px));
    left: auto;
    z-index: 1200;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #A32D2D, #7a1f1f);
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(163, 45, 45, 0.45);
    transition: transform 0.2s ease;
}

.emergency-fab:hover { transform: scale(1.06); }

/* SOS راست — برگشت به بالا چپ */
.back-to-top {
    left: calc(1rem + env(safe-area-inset-left, 0px));
    right: auto;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    z-index: 1100;
}

.emergency-panel {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(15, 13, 10, 0.72);
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
}

.emergency-panel.open { display: flex; }

.emergency-sheet {
    width: min(28rem, 100%);
    background: var(--white);
    border-radius: 1.25rem 1.25rem 0.75rem 0.75rem;
    padding: 1.5rem;
    max-height: 85vh;
    overflow-y: auto;
}

.emergency-sheet h2 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: #A32D2D;
}

.emergency-sheet a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.75rem;
    background: var(--light-bg);
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    min-height: 52px;
}

.emergency-sheet a:hover { background: #e8e2d8; }

.emergency-close {
    margin-top: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 0.75rem;
    background: var(--dark-bg);
    color: var(--white);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    min-height: 48px;
}

.adventure-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 100px;
    border: 1px solid rgba(122, 92, 24, 0.35);
    background: rgba(201, 151, 59, 0.12);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

/* About page */
.about-hero {
    padding: calc(var(--header-height) + 3rem) 0 3rem;
    background: linear-gradient(160deg, var(--dark-bg) 0%, var(--secondary-color) 100%);
    color: var(--white);
    text-align: center;
}

.about-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 900;
    margin-bottom: 0.75rem;
}

.about-hero p {
    max-width: 36rem;
    margin: 0 auto;
    opacity: 0.85;
    line-height: 1.9;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 2.5rem 0;
}

.about-stat {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(26, 22, 18, 0.08);
}

.about-stat-num {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--primary-color);
}

.about-stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 3rem 0 4rem;
}

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

.about-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.75rem;
    border: 1px solid var(--border-subtle);
}

.about-card h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-right: 0.75rem;
    border-right: 4px solid var(--primary-color);
}

.about-card ul { padding-right: 1.25rem; }
.about-card li { margin-bottom: 0.5rem; line-height: 1.8; }

body.dark-mode .about-stat,
body.dark-mode .about-card {
    background: #1e1e1e;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .emergency-sheet { background: #1e1e1e; }
body.dark-mode .emergency-sheet a { background: #252525; color: #e8e8e8; }

/* ===== Inkling-style scroll animations ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translate3d(0, 32px, 0);
        transition:
            opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
        transition-delay: var(--reveal-delay, 0ms);
        will-change: opacity, transform;
    }

    .reveal.reveal-scale {
        transform: translate3d(0, 24px, 0) scale(0.96);
    }

    .reveal.is-visible {
        opacity: 1;
        transform: none;
    }

    .header {
        transition: box-shadow 0.35s ease, background 0.35s ease, padding 0.35s ease;
    }

    .header.header--elevated {
        box-shadow: 0 10px 36px rgba(0, 0, 0, 0.28);
        background: rgba(20, 16, 12, 0.98);
    }

    .service-card,
    .peak-card,
    .blog-card,
    .sh-card,
    .btn-primary,
    .hero-btn,
    .service-cta {
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
    }

    .service-card:hover,
    .peak-card:hover,
    .blog-card:hover,
    .sh-card:hover {
        transform: translateY(-6px);
    }

    .hero-btn:hover,
    .btn-primary:hover {
        transform: translateY(-2px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ===== Online resume / personal about ===== */
.resume-page {
    padding: 2rem 0 4rem;
}

.resume-loading {
    text-align: center;
    color: var(--text-muted, #666);
    padding: 3rem 0;
}

.resume-hero-card {
    display: flex;
    gap: 1.75rem;
    align-items: flex-start;
    padding: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(122, 92, 24, 0.12), rgba(122, 92, 24, 0.04));
    border: 1px solid rgba(122, 92, 24, 0.2);
    border-radius: 1.25rem;
}

.resume-avatar {
    flex-shrink: 0;
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    background: var(--primary-color, #7A5C18);
    color: #fff;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(122, 92, 24, 0.35);
}

.resume-avatar--lg {
    width: 6.5rem;
    height: 6.5rem;
    font-size: 2.75rem;
    margin: 0 auto 1.25rem;
}

.resume-avatar--initials {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.resume-avatar--lg.resume-avatar--initials {
    font-size: 2rem;
}

.resume-tag--cert {
    background: rgba(122, 92, 24, 0.06);
    border: 1px solid rgba(122, 92, 24, 0.15);
}

.resume-lang-list {
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: 2;
}

.resume-interests {
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 1rem;
    border: 1px dashed rgba(122, 92, 24, 0.2);
}

.resume-interests .resume-block-title {
    margin-bottom: 0.85rem;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 1rem;
    opacity: 0.85;
}

body.dark-mode .resume-interests {
    background: rgba(255, 255, 255, 0.03);
}


.resume-name {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin: 0 0 0.35rem;
    line-height: 1.3;
}

.resume-title {
    font-size: 1.05rem;
    color: var(--primary-color, #7A5C18);
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.resume-location {
    margin: 0 0 1rem;
    color: var(--text-muted, #666);
    font-size: 0.95rem;
}

.resume-bio {
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 2rem;
    color: var(--text-color, #333);
}

.resume-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.resume-contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}

.resume-contact-chip:hover {
    border-color: var(--primary-color, #7A5C18);
    transform: translateY(-1px);
}

.resume-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.resume-highlight {
    text-align: center;
    padding: 1.25rem 1rem;
    background: #fff;
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.resume-highlight-val {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color, #7A5C18);
}

.resume-highlight-lbl {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted, #666);
    margin-top: 0.25rem;
}

.resume-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.resume-block {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.resume-block--wide {
    grid-column: 1 / -1;
}

.resume-block-title {
    font-size: 1.15rem;
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(122, 92, 24, 0.15);
}

.resume-timeline-item {
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.resume-timeline-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.resume-timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.resume-timeline-head span {
    font-size: 0.85rem;
    color: var(--text-muted, #666);
    white-space: nowrap;
}

.resume-timeline-org {
    color: var(--primary-color, #7A5C18);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.resume-timeline-desc {
    font-size: 0.92rem;
    line-height: 1.75;
    margin: 0;
    color: var(--text-muted, #555);
}

.resume-bullets {
    margin: 0;
    padding-right: 1.25rem;
    line-height: 1.85;
    font-size: 0.95rem;
}

.resume-skill-group {
    margin-bottom: 1.25rem;
}

.resume-skill-group:last-child {
    margin-bottom: 0;
}

.resume-skill-group h3 {
    font-size: 0.95rem;
    margin: 0 0 0.65rem;
    color: var(--text-muted, #666);
}

.resume-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.resume-tag {
    font-size: 0.82rem;
    padding: 0.35rem 0.7rem;
    background: rgba(122, 92, 24, 0.08);
    border-radius: 999px;
    color: var(--text-color, #333);
}

.resume-cta-block {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(122, 92, 24, 0.1), transparent);
    border-radius: 1.25rem;
    border: 1px solid rgba(122, 92, 24, 0.15);
}

.resume-cta-block h2 {
    margin: 0 0 0.5rem;
}

.resume-cta-block p {
    margin: 0 0 1.25rem;
    color: var(--text-muted, #666);
}

.resume-cta-block .resume-contact-row {
    justify-content: center;
}

.resume-site-note {
    margin-top: 3rem;
    padding: 1.75rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.resume-site-note h2 {
    font-size: 1.1rem;
    margin: 0 0 0.75rem;
}

.about-stats--compact {
    margin-top: 1.25rem;
    margin-bottom: 0;
}

/* Homepage teaser */
.resume-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, rgba(122, 92, 24, 0.06) 0%, transparent 100%);
}

.resume-teaser-inner {
    display: grid;
    grid-template-columns: 1fr minmax(14rem, 18rem);
    gap: 2.5rem;
    align-items: center;
}

.resume-teaser-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.35rem 0.75rem;
    margin-bottom: 0.75rem;
    background: rgba(122, 92, 24, 0.12);
    color: var(--primary-color, #7A5C18);
    border-radius: 999px;
}

.resume-teaser-title {
    font-size: 1.05rem;
    color: var(--primary-color, #7A5C18);
    margin: 0.35rem 0 1rem;
    font-weight: 600;
}

.resume-teaser-bio {
    line-height: 1.85;
    margin-bottom: 1.25rem;
    color: var(--text-muted, #555);
}

.resume-teaser-btn {
    margin-top: 0.75rem;
}

.resume-teaser-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: #fff;
    border-radius: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.resume-teaser-stats {
    list-style: none;
    margin: 0;
    padding: 0;
}

.resume-teaser-stats li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.resume-teaser-stats li:last-child {
    border-bottom: none;
}

.resume-teaser-stats strong {
    display: block;
    font-size: 1.5rem;
    color: var(--primary-color, #7A5C18);
}

.resume-teaser-stats span {
    font-size: 0.82rem;
    color: var(--text-muted, #666);
}

/* Compact footer */
.footer--compact {
    padding: 1.75rem 0;
    background: #1a1510;
    color: rgba(255, 255, 255, 0.75);
}

.footer-compact-inner {
    text-align: center;
}

.footer-compact-brand {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}

.footer-compact-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
    margin-bottom: 0.75rem;
}

.footer-compact-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-compact-nav a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-compact-social {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.footer-compact-social a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
}

.footer-compact-social a:hover {
    color: #fff;
}

.footer--compact p:last-child {
    margin: 0;
    font-size: 0.82rem;
    opacity: 0.65;
}

body.dark-mode .resume-block,
body.dark-mode .resume-highlight,
body.dark-mode .resume-teaser-card {
    background: #1e1e1e;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .resume-contact-chip {
    background: #252525;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e8e8e8;
}

body.dark-mode .resume-site-note {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .resume-bio,
body.dark-mode .resume-teaser-bio {
    color: #ccc;
}

@media (max-width: 768px) {
    .resume-hero-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .resume-contact-row {
        justify-content: center;
    }

    .resume-grid {
        grid-template-columns: 1fr;
    }

    .resume-teaser-inner {
        grid-template-columns: 1fr;
    }

    .resume-teaser-card {
        order: -1;
    }
}
