/*
Theme Name: TrailGuide Theme
Version: 1.0
*/

/* =================================================
   GENERAL
================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body 
{
    margin: 0;
    padding: 0;
    background: #fff;
}

html 
{
    scroll-behavior: smooth;
}



body {
 font-family: system-ui, sans-serif;
    color: #222;
    background:
              linear-gradient(
            to bottom,
            #ffffff 0%,
            rgba(255,255,255,0.98) 15%,
            rgba(248,250,252,0.92) 35%,
            rgba(248,250,252,0.75) 60%,
            rgba(248,250,252,0.55) 100%
        ),
        url("https://trailguideswiss.ch/wp-content/uploads/Hasliberg-1024x768.jpg");

    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
}



img 
{
    display: block;
    max-width: 100%;
}


.severity-1 { --severity-darken: 0%; }
.severity-2 { --severity-darken: 15%; }
.severity-3 { --severity-darken: 30%; }
.severity-4 { --severity-darken: 45%; }
.severity-5 { --severity-darken: 60%; }


/* =================================================
   SECTION / CONTAINER
================================================= */

/* PADDING 1. TOP+BOTTOM  2.LEFT+RIGHT */
.tg-section { margin: 0; }

.tg-container {
    margin: 0 auto;
    padding: 10px 50px;
}

@media (max-width: 1024px) {
    .tg-container { padding: 8px 32px; }
}

@media (max-width: 768px) {
    .tg-container { padding: 6px 20px; }
}

.tg-container h2 
{
    font-size: 1.5rem;       /* was browser default ±1.5em */
    line-height: 1.1;
    margin-bottom: 1rem;
}

.tg-container p,
.tg-container li {
    font-size: 1.1rem;    /* iets groter leesbaar */
    line-height: 1.3;
}





/* =================================================
   GRID SYSTEM
================================================= */
.tg-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 32px;
}

/* COLUMN SPANS
------------------------------------------------- */
.tg-col-1  { grid-column: span 1; }
.tg-col-2  { grid-column: span 2; }
.tg-col-3  { grid-column: span 3; }
.tg-col-4  { grid-column: span 4; }
.tg-col-5  { grid-column: span 5; }
.tg-col-6  { grid-column: span 6; }
.tg-col-7  { grid-column: span 7; }
.tg-col-8  { grid-column: span 8; }
.tg-col-9  { grid-column: span 9; }
.tg-col-10 { grid-column: span 10; }
.tg-col-11 { grid-column: span 11; }
.tg-col-12 { grid-column: span 12; }

/* mobile: altijd stack */
@media (max-width: 768px) {
    .tg-grid {
        grid-template-columns: 1fr !important;
    }
    .tg-grid > * {
        grid-column: span 3;
    }
}




/* =================================================
   HEADER / HERO  ⭐ VERFIJND
================================================= */

.tg-simple-header {
    margin: 0;
}

.tg-header-bg {
    position: relative;
    height: clamp(280px, 40vh, 420px);
    background-image: url("https://trailguideswiss.ch/wp-content/uploads/headerimage.png");
    background-size: cover;
    background-position: center;
    color: #000;
}

.header-default {
    background-image: url("https://trailguideswiss.ch/wp-content/uploads/headerimage.png");
}

.header-trail {
    background-image: url("https://trailguideswiss.ch/wp-content/uploads/header-trail.png");
}

.header-snow {
    background-image: url("https://trailguideswiss.ch/wp-content/uploads/header-snow.png");
}

.header-hike {
    background-image: url("https://trailguideswiss.ch/wp-content/uploads/header-hike.png");
}

.header-event {
    background-image: url("https://trailguideswiss.ch/wp-content/uploads/header-event.png");
}

.header-camp {
    background-image: url("https://trailguideswiss.ch/wp-content/uploads/header-camp.png");
}

.header-trailtreff {
    background-image: url("https://trailguideswiss.ch/wp-content/uploads/header-trailtreff.png");
}

/* logo + titel linksboven */
.tg-header-top {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.tg-header-logo {
    height: 70px;
    border-radius: 12px;
    background: rgba(255,255,255,0.85);
    padding: 6px;
}

.tg-header-title {
    margin: 0;
    font-size: 2rem;
}








/* ===============================
   HEADER MENU BAR
================================ */
.tg-header-menu {
    position: absolute;
    top: 100px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.45);
    padding: 10px 18px;    
    min-height: 50px;      
    border-radius: 16px;
}


/* menu items */
.tg-main-menu a {
    color: #fff;
    text-decoration: none;
    margin-right: 12px;
    padding-right: 5px;
    font-weight: 500;
    font-size: 1.1rem;          /* groter lettertype */
    position: relative;
    padding-left: 20px;          /* ruimte voor bolletje */
}

/* het bolletje */
.tg-main-menu a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tg-menu-accent, transparent);
    transform: translateY(-50%);
}

/* language switch */
.tg-lang-switch a {
    color: #fff;
    text-decoration: none;
    margin-left: 14px;
    display: inline-flex;
    align-items: center;
}

/* vlaggetjes */
.tg-lang-switch img {
    height: 70px;        /* groter & beter in balans */
    width: auto;
    border-radius: 8px; /* iets ronder, past bij design */
    display: block;
}


/* burger */
.tg-menu-toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    position: relative;
    width: 30px;
    height: 22px;
}

.tg-menu-toggle span {
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.tg-menu-toggle span:nth-child(1) { top: 0; }
.tg-menu-toggle span:nth-child(2) { top: 10px; }
.tg-menu-toggle span:nth-child(3) { top: 20px; }

.tg-menu-toggle.is-open span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

.tg-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.tg-menu-toggle.is-open span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

/* mobile menu */
@media (max-width: 800px) {

    .tg-main-menu {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.75);
        padding: 120px 30px 30px 70px;
        flex-direction: column;
        gap: 20px;
        z-index: 1000;
    }

    .tg-main-menu a {
        font-size: 1.3rem;
        letter-spacing: 0.5px;
        margin-right: 0;
    }

    .tg-main-menu.is-open {
        display: flex;
    }

    .tg-menu-toggle {
        display: block !important;
        z-index: 1001;
    }
}




/* =================================================
   ACCORDION (clean, standalone)
================================================= */

.tg-accordion {
 color: #000;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* elk item is een losse kaart */
.tg-accordion-item {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid var(--tg-accent, #4A5568);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* header */
.tg-accordion-header {
    width: 100%;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f3f5;
    color: #1f2933;
    border: 0;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    transition: background 0.2s ease;
}

/* hover (subtiel) */
.tg-accordion-header:hover {
    background: #e5e7eb;
}

/* icon */
.tg-accordion-icon {
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0.6;
}

/* open state */
.tg-accordion-item.is-open .tg-accordion-icon {
    transform: rotate(180deg);
    opacity: 1;
}

/* header + content vormen één geheel */
.tg-accordion-item.is-open .tg-accordion-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* content */
.tg-accordion-content {
    display: none;
    padding: 18px;

    background: #f8fafc;
    color: #1f2933;

    line-height: 1.6;
}

.tg-accordion-item.is-open .tg-accordion-content {
    display: block;
}







/* =================================================
   EVENTS / STARS
================================================= */

.tg-event-date {
    font-size: 1.1rem;
    opacity: 0.8;
}

.star-rating {
    display: inline;
    gap: 6px;
}

.star {
    font-size: 22px;
}

.star i {
    opacity: 0.25;
}

.star.filled i {
    opacity: 1;
}

/* event facts list */
.tg-event-facts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tg-event-facts li {
    margin-bottom: 10px;
    line-height: 1.5;
}






/* =================================================
   FOOTER
================================================= */

.tg-footer {
    background: #4A5568;              /* donker blauwgrijs */
    color: #e5e7eb;
    padding: 40px 20px;
    margin-top: 80px;
}

/* nav container */
.tg-footer-nav {
    max-width: 1200px;
    margin: 0 auto;
}

/* menu */
.tg-footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;

    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

/* links */
.tg-footer-nav a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: bold;
    opacity: 0.9;

    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* hover */
.tg-footer-nav a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

/* mobile */
@media (max-width: 768px) {
    .tg-footer {
        padding: 32px 20px;
    }

    .tg-footer-nav ul {
        gap: 16px;
    }

    .tg-footer-nav a {
        font-size: 1rem;
        font-weight: bold;
    }
}






/* =====================================
   LINK NAAR EVENTS (BOVEN CONTENT)
===================================== */

.tg-events-link-wrap {
    text-align: right;
    margin-bottom: 16px;
}

.tg-events-link {
    color: #333;                  /* iets neutraler dan accent */
    font-weight: 600;
    text-decoration: none;
    font-size: 1.05rem;
}

.tg-events-link:hover {
    text-decoration: underline;
}

/* mobile */
@media (max-width: 768px) {
    .tg-events-link-wrap {
        text-align: left;
        margin-bottom: 12px;
    }
}









/* =================================================
   CARD (PURE CONTAINER)
================================================= */

.tg-card {
    background: #fff;
    border-radius: 12px;
    border: 3px solid color-mix(
        in srgb,
        var(--tg-accent, #ccc) calc(100% - var(--severity-darken, 0%)),
        black
    );
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}


/* =================================================
   CARD STRUCTURE
================================================= */
.tg-card-header {
    background: color-mix(
        in srgb,
        var(--tg-accent, #ccc) calc(100% - var(--severity-darken, 0%)),
        black
    );
    padding: 12px 16px;
}

.tg-card-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
}

h4
{
	margin: 2px;
	padding-top:5px;
}

.tg-card-body {
    padding: 16px;
    flex: 1;
    background: #f6f7f8;
    font-size: 1.05rem;
    line-height: 1.6;
}

.tg-card-footer {
    padding: 16px;
    background: #f6f7f8;
}


/* =================================================
   CARD BUTTON
================================================= */
.tg-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 20px;
    margin:2px;
    border-radius: 999px;

    background: var(--tg-accent);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;

    text-decoration: none;
    cursor: pointer;

    border: none;
    outline: none;
    box-shadow: none;

    -webkit-appearance: none;
    appearance: none;
}

/* zorg dat button zich exact als link gedraagt */
button.tg-card-button {
    background: var(--tg-accent);
    font-family: inherit;
}

/* =================================================
   CARD TEASER (CLICKABLE / HOVER)
================================================= */

.tg-card--teaser {
    cursor: pointer;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.tg-card--teaser:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(0,0,0,0.25);
}


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



/* =================================================
   CARD IMAGE
================================================= */

.tg-card > img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
    flex-shrink: 0;
}




/* =================================================
   MEDIA BLOCK
================================================= */

.tg-media-block {
    border: 3px solid var(--tg-accent, #ccc);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: block;
}

.tg-media-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;          /* crop indien nodig */
    display: block;
}

/* media block with minimum height (event header) */
.tg-media-min400 
{
    min-height: 400px;
}

.tg-media-260
{
    height: 260px;              /* vaste landscape hoogte */
}

	


/* =================================================
   COOL FEATURES
   ============================================== */
.tg-mountain {
    width: 64px;          /* groter */
    height: auto;
    display: block;
}

.tg-mountain-outline {
    fill: none;
    stroke: var(--tg-accent, #666);
    stroke-width: 3;
    stroke-linejoin: round;
}

.tg-mountain-fill {
    fill: var(--tg-accent, #666);
    transform-origin: bottom;
    transform: scaleY(0);
}


#tg-map {
    width: 100%;
    height: clamp(360px, 45vh, 600px);
    border-radius: 12px;
}

#tg-map.is-empty {
    opacity: 0.25;
}

#tg-elevation-profile {
    width: 100%;
    height: 160px;
}

.tg-elevation-path {
    fill: none;
    stroke: var(--tg-accent, #2b6cb0);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.tg-profile-tooltip {
    position: absolute;
    pointer-events: none;
    top: 0;
    left: 0;
    transform: translate(-50%, -100%);
    margin-top: 20px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.tg-profile-cursor {
    stroke: rgba(0,0,0,0.35);
    stroke-width: 2;
    stroke-dasharray: 4 4;
    vector-effect: non-scaling-stroke; /* 🔥 dit is 'm */
    pointer-events: none;
}



/* =====================================
   ELEVATION LEGEND
===================================== */

.tg-legend {
    display: inline-flex;   
    align-items: center;
    gap: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fff;
    border: 2px solid rgba(0,0,0,0.1);

    grid-column: 1 / -1;
}


.tg-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.legend-line {
    width: 24px;
    height: 4px;
    border-radius: 2px;
    display: inline-block;
}

/* kleuren exact gelijk aan JS */
.legend-down {
    background: #2f855a; /* groen */
}

.legend-flat {
    background: #3182ce; /* blauw */
}

.legend-up {
    background: #ecc94b; /* geel */
}

.legend-steep {
    background: #c53030; /* rood */
}

/* =================================================
   ELEVATION
   ============================================== */

.tg-elevation-wrap {
    position: relative;
    overflow: visible;
    padding-top: 40px; /* ruimte voor vaste tooltip */
    padding-bottom:5px;
    padding-left: 15px;
    padding-right: 15px;
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 8px;
    align-items: stretch;
}

.tg-elevation-axis {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* =================================================
   Slider
   ============================================== */
.tg-card.tg-slider {
    position: relative;
}

.tg-slider-main {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

.tg-card.tg-slider .tg-card-body {
    padding: 0;
}

/* main image */
.tg-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .4s ease;
}

.tg-slide.active {
    opacity: 1;
    z-index: 2;
}

/* arrows */
.tg-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.5);
    color: #fff;
    border: none;
    font-size: 32px;
    padding: 6px 12px;
    cursor: pointer;
    z-index: 5;
}

.tg-arrow.prev { left: 10px; }
.tg-arrow.next { right: 10px; }

/* filmstrip */
.tg-filmstrip {
    margin-top: 12px;
    overflow: hidden;
}

.tg-filmstrip-track {
    display: flex;
    gap: 10px;
    transition: transform .4s ease;
}

.tg-thumb {
    width: 110px;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
    opacity: .5;
    border: 2px solid transparent;
}

.tg-thumb.active {
    opacity: 1;
    border-color: #000;
}





/* =================================================
   CONTACT FORM (TrailGuide)
================================================= */

.tg-contact-form {
    width: 100%;
}

/* grid items (elk veld) */
.tg-contact-form .tg-grid > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* labels */
.tg-contact-form label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #222;
}

/* inputs, selects, textarea */
.tg-contact-form input,
.tg-contact-form select,
.tg-contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    font-family: inherit;

    border-radius: 10px;
    border: 2px solid color-mix(in srgb, var(--tg-accent, #ccc) 25%, #ccc);
    background: #fff;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

/* focus state */
.tg-contact-form input:focus,
.tg-contact-form select:focus,
.tg-contact-form textarea:focus {
    outline: none;
    border-color: var(--tg-accent, #2b6cb0);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--tg-accent) 25%, transparent);
}

/* textarea */
.tg-contact-form textarea {
    resize: vertical;
    min-height: 140px;
}

/* submit button (sluit aan op tg-card-button) */
.tg-contact-form .tg-card-button {
    font-size: 1.05rem;
    padding: 12px 24px;
    border-radius: 12px;
}

/* spacing onder formulierdelen */
.tg-contact-form > div:not(:last-child) {
    margin-bottom: 24px;
}

.tg-contact-success {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;

    background: color-mix(in srgb, var(--tg-accent) 15%, #fff);
    border: 2px solid var(--tg-accent);
    color: #222;

    font-weight: 500;
}



/* =================================================
   MODAL
   =============================================== */

.leaflet-container {
    position: relative;
}

.tg-modal {
    position: fixed;
    top: 5vh;
    left: 5vw;
    right: 5vw;
    bottom: 5vh;
    inset: 0;
    z-index: 9999;
    display: none;
}


.tg-modal.is-open {
    display: block;
}

.tg-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.tg-modal-content {
    position: relative;
    max-width: 1200px;
    margin: 5vh auto;
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    border-radius: 14px;
    overflow: hidden; /* 🔥 cruciaal */
    border: 2px solid var(--tg-accent, #4A5568);
    background: #fff;
}

.tg-modal-close {
    position: absolute;
    top: 14px;
    color: #fff;
    right: 16px;
    font-size: 28px;
    background: none;
    border: 0;
    cursor: pointer;
}



/* =================================================
   FLIP CARDS
   =============================================== */


.tg-flip-card {
  background-color: transparent;
  width: 100%;
  max-width: 600px;

  aspect-ratio: 4 / 3;   /* ⭐ bepaalt nu overal de hoogte */
  perspective: 1000px;
}

.tg-flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
}

.tg-flip-card:hover .tg-flip-card-inner {
  transform: rotateY(180deg);
}

.tg-flip-card-front, .tg-flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.tg-flip-card-back {
  background-color: #2980b9;
  color: white;
  transform: rotateY(180deg);
  border-radius:12px;
}

/* vaste verhouding voor flip card afbeelding */
.tg-flip-card-media {
  width: 100%;
  aspect-ratio: 4 / 3;   /* landscape – pas aan indien nodig */
  overflow: hidden;
  border-radius: 12px;  /* optioneel, matcht je cards */
}

/* afbeelding netjes laten vullen */
.tg-flip-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tg-flip-card-text {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 4px;
  pointer-events: none;
}

/* basis */
.tg-program-row {
  padding: 15px 0px;
}

.tg-program-media
{
	align-self: center;
}
.tg-program-space
{
  padding: 14px;
  border-radius: 16px;
   background: #eef0f2;
}
/* EVEN rijen omdraaien (flip-safe!) */
.tg-program-row:has(.tg-program-alt) {
  direction: rtl;
}
/* EVEN rijen omdraaien (flip-safe!) */
.tg-program-space:has(.tg-program-alt) {
  background: #e4ece7;
}

/* inhoud weer normaal lezen */
.tg-program-row:has(.tg-program-alt) > * {
  direction: ltr;
}




/* =====================================
   CONTACT CARD
===================================== */

.tg-contact-card {
	margin-top:15px;
    border: 2px solid var(--tg-accent, #4A5568);
    border-radius: 12px;
    padding: 16px;
    background: #fff;
}

.tg-contact-title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--tg-accent, #4A5568);
}

.tg-contact-item {
    font-size: 0.9rem;
    color: #374151;
    margin-bottom: 6px;
}

.tg-contact-item strong {
    font-weight: 600;
}

.tg-contact-item a {
    color: inherit;
    text-decoration: underline;
}

.tg-contact-socials {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

.tg-contact-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--tg-accent, #4A5568);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tg-accent, #4A5568);
    transition: all 0.2s ease;
}

.tg-contact-socials a:hover {
    background: var(--tg-accent, #4A5568);
    color: #fff;
}

.tg-contact-socials svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}


