/*
Theme Name: Trekky Child
Theme URI: https://trekky.ch
Description: Child-Theme für trekky.ch, basierend auf Kadence. Branding für Naturlehrpfade & Themenwege Schweiz.
Author: trekky.ch
Author URI: https://trekky.ch
Template: kadence
Version: 1.0.0
Text Domain: trekky-child
*/

/* ===========================================================
   TREKKY.CH — DESIGN TOKENS
   =========================================================== */
:root {
    /* Colors */
    --trekky-primary: #2D5A3D;
    --trekky-primary-light: #7FA68A;
    --trekky-primary-dark: #1A3F28;
    --trekky-accent: #F5C518;
    --trekky-accent-dark: #C99A0F;
    --trekky-secondary: #7A8B7F;
    --trekky-bg: #FAF7F0;
    --trekky-bg-alt: #FFFFFF;
    --trekky-text: #1A2B22;
    --trekky-text-muted: #5A6B62;
    --trekky-success: #3D8C5E;
    --trekky-warning: #D97706;
    --trekky-error: #B23A3A;

    /* Typography */
    --trekky-font-heading: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --trekky-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --trekky-font-display: 'Outfit', system-ui, sans-serif;

    /* Spacing */
    --trekky-radius-sm: 8px;
    --trekky-radius-md: 12px;
    --trekky-radius-lg: 16px;
    --trekky-radius-xl: 24px;

    /* Shadows */
    --trekky-shadow-sm: 0 2px 8px rgba(45, 90, 61, 0.06);
    --trekky-shadow-md: 0 4px 24px rgba(45, 90, 61, 0.08);
    --trekky-shadow-lg: 0 12px 40px rgba(45, 90, 61, 0.12);
    --trekky-shadow-cta: 0 4px 12px rgba(245, 197, 24, 0.3);

    /* Transitions */
    --trekky-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================================================
   GLOBAL OVERRIDES
   =========================================================== */
body {
    font-family: var(--trekky-font-body);
    color: var(--trekky-text);
    background-color: var(--trekky-bg);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

@media (max-width: 768px) {
    body { font-size: 16px; }
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
    font-family: var(--trekky-font-heading);
    font-weight: 600;
    line-height: 1.15;
    color: var(--trekky-primary);
    letter-spacing: -0.01em;
}

h1, .entry-title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

a {
    color: var(--trekky-primary);
    text-decoration: none;
    transition: color var(--trekky-transition);
}

a:hover {
    color: var(--trekky-primary-light);
    text-decoration: underline;
}

/* ===========================================================
   BUTTONS
   =========================================================== */
.button,
.wp-block-button__link,
button[type="submit"],
input[type="submit"],
.trekky-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.85em 1.75em;
    font-family: var(--trekky-font-body);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    border-radius: var(--trekky-radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--trekky-transition);
    text-decoration: none !important;
}

/* Primary CTA */
.trekky-btn-primary,
.wp-block-button.is-style-primary .wp-block-button__link,
.button.is-primary {
    background-color: var(--trekky-accent);
    color: var(--trekky-text) !important;
    box-shadow: var(--trekky-shadow-cta);
}

.trekky-btn-primary:hover,
.wp-block-button.is-style-primary .wp-block-button__link:hover {
    background-color: var(--trekky-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 197, 24, 0.4);
}

/* Secondary */
.trekky-btn-secondary {
    background-color: transparent;
    color: var(--trekky-primary) !important;
    border-color: var(--trekky-primary);
}

.trekky-btn-secondary:hover {
    background-color: var(--trekky-primary);
    color: white !important;
}

/* ===========================================================
   CARDS (Tour Cards, Blog Cards)
   =========================================================== */
.trekky-card,
.tour-card,
article.post {
    background: var(--trekky-bg-alt);
    border-radius: var(--trekky-radius-lg);
    box-shadow: var(--trekky-shadow-md);
    overflow: hidden;
    transition: transform var(--trekky-transition), box-shadow var(--trekky-transition);
}

.trekky-card:hover,
.tour-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--trekky-shadow-lg);
}

.trekky-card__image {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--trekky-secondary);
}

.trekky-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.trekky-card:hover .trekky-card__image img {
    transform: scale(1.05);
}

.trekky-card__body {
    padding: 1.5rem;
}

.trekky-card__title {
    font-size: 1.4rem;
    margin: 0 0 0.5rem;
}

.trekky-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--trekky-text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.trekky-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.trekky-card__price {
    display: inline-block;
    background: var(--trekky-accent);
    color: var(--trekky-text);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.875rem;
}

.trekky-card__price--free {
    background: var(--trekky-success);
    color: white;
}

/* ===========================================================
   HERO
   =========================================================== */
.trekky-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1rem;
    background-size: cover;
    background-position: center;
    color: white;
}

.trekky-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(26, 43, 34, 0.3), rgba(26, 43, 34, 0.6));
    z-index: 1;
}

.trekky-hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.trekky-hero h1 {
    color: white;
    font-size: clamp(2.25rem, 6vw, 4rem);
    margin-bottom: 1rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.trekky-hero__subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ===========================================================
   SEARCH BAR (Hero)
   =========================================================== */
.trekky-search {
    background: white;
    border-radius: var(--trekky-radius-lg);
    padding: 1rem;
    box-shadow: var(--trekky-shadow-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.5rem;
    max-width: 720px;
    margin: 0 auto;
}

.trekky-search select,
.trekky-search input {
    border: 1.5px solid var(--trekky-secondary);
    border-radius: var(--trekky-radius-sm);
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    background: white;
    color: var(--trekky-text);
}

.trekky-search select:focus,
.trekky-search input:focus {
    outline: 2px solid var(--trekky-primary);
    outline-offset: 2px;
}

/* ===========================================================
   TRUST BAR
   =========================================================== */
.trekky-trust {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    padding: 2rem 1rem;
    background: var(--trekky-bg-alt);
    border-top: 1px solid rgba(122, 139, 127, 0.2);
    border-bottom: 1px solid rgba(122, 139, 127, 0.2);
}

.trekky-trust__item {
    text-align: center;
}

.trekky-trust__number {
    display: block;
    font-family: var(--trekky-font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--trekky-primary);
    line-height: 1;
}

.trekky-trust__label {
    color: var(--trekky-text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* ===========================================================
   STICKY MOBILE CTA
   =========================================================== */
@media (max-width: 768px) {
    .trekky-mobile-cta {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: white;
        padding: 0.75rem 1rem;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
        display: flex;
        gap: 0.5rem;
    }

    .trekky-mobile-cta .trekky-btn {
        flex: 1;
    }

    body.has-mobile-cta {
        padding-bottom: 80px;
    }
}

@media (min-width: 769px) {
    .trekky-mobile-cta { display: none; }
}

/* ===========================================================
   FORMS
   =========================================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--trekky-secondary);
    border-radius: var(--trekky-radius-sm);
    font-family: inherit;
    font-size: 1rem;
    background: white;
    color: var(--trekky-text);
    transition: border-color var(--trekky-transition), box-shadow var(--trekky-transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--trekky-primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.15);
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--trekky-text);
}

/* ===========================================================
   FOOTER
   =========================================================== */
.site-footer {
    background: var(--trekky-primary-dark);
    color: rgba(255, 255, 255, 0.85);
}

.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer .widget-title {
    color: white;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.85);
}

.site-footer a:hover {
    color: var(--trekky-accent);
}

/* ===========================================================
   UTILITY CLASSES
   =========================================================== */
.trekky-section {
    padding: 4rem 1rem;
}

.trekky-section--alt {
    background: var(--trekky-bg-alt);
}

.trekky-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.trekky-text-center { text-align: center; }
.trekky-mt-4 { margin-top: 2rem; }
.trekky-mb-4 { margin-bottom: 2rem; }

/* ===========================================================
   HERO-PAGES: hide auto-rendered page title
   =========================================================== */
.trekky-has-hero .entry-header,
.trekky-has-hero .page-title,
.trekky-has-hero .wp-block-post-title,
.trekky-has-hero .kadence-entry-header,
.trekky-has-hero .entry-hero-container-inner,
.trekky-has-hero header.entry-header {
    display: none !important;
}

/* Push hero cover to the very top, above any breadcrumbs/title-bar gap */
.trekky-has-hero .site-main > .entry-content,
.trekky-has-hero .site-main > article > .entry-content {
    margin-top: 0;
    padding-top: 0;
}

.trekky-has-hero .site-main > .entry-content > .wp-block-cover:first-child,
.trekky-has-hero .entry-content > .wp-block-cover:first-child {
    margin-top: 0;
}

/* ===========================================================
   GUTENBERG BUTTON OVERRIDES (brand colors instead of editor default)
   =========================================================== */
.wp-block-button .wp-block-button__link {
    font-family: var(--trekky-font-heading);
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.85em 1.6em;
    transition: transform var(--trekky-transition), box-shadow var(--trekky-transition);
}

.wp-block-button .wp-block-button__link:hover {
    transform: translateY(-1px);
    box-shadow: var(--trekky-shadow-md);
    text-decoration: none;
}

.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) {
    color: var(--trekky-primary) !important;
    border-color: var(--trekky-primary) !important;
    border-width: 2px;
    background: transparent !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: var(--trekky-primary) !important;
    color: #fff !important;
}

/* Buttons inside dark hero (cover) — invert outline */
.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link {
    color: #fff !important;
    border-color: #fff !important;
}
.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: #fff !important;
    color: var(--trekky-primary) !important;
}

/* ===========================================================
   SECTION RHYTHM & COVER OVERRIDES
   =========================================================== */
/* Headings inside dark covers: ensure white text wins over global */
.wp-block-cover .wp-block-heading,
.wp-block-cover h1,
.wp-block-cover h2,
.wp-block-cover h3 {
    color: #fff;
}

/* Slightly more breathing room between consecutive full-bleed sections */
.entry-content > .wp-block-group + .wp-block-group,
.entry-content > .wp-block-cover + .wp-block-group {
    margin-top: 0;
}

/* ===========================================================
   TRUST BAR (numeric readability)
   =========================================================== */
.trekky-trust__number {
    font-family: var(--trekky-font-display) !important;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: var(--trekky-primary);
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1;
}

.trekky-trust__label {
    font-family: var(--trekky-font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--trekky-text-muted);
}

/* ===========================================================
   REGION & THEME CARDS (subtle gradient backgrounds)
   =========================================================== */
.wp-block-columns .wp-block-group.has-background[style*="#FFFFFF"],
.wp-block-columns .wp-block-group.has-background[style*="#ffffff"] {
    background-image: linear-gradient(135deg, #ffffff 0%, rgba(127, 166, 138, 0.08) 100%);
    transition: transform var(--trekky-transition), box-shadow var(--trekky-transition);
}

.wp-block-columns .wp-block-group.has-background:hover {
    transform: translateY(-2px);
    box-shadow: var(--trekky-shadow-md);
}

/* ===========================================================
   TOURS GRID FILTER BADGE & EMPTY STATE
   =========================================================== */
.trekky-tours-filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 auto 1.5rem;
    padding: 0.5rem 1rem;
    background: var(--trekky-bg-cream, #faf7f0);
    border: 1px solid var(--trekky-border);
    border-radius: 999px;
    font-size: 0.9rem;
    max-width: max-content;
}
.trekky-tours-filter-badge__label {
    font-weight: 600;
    color: var(--trekky-text);
}
.trekky-tours-filter-badge__reset {
    color: var(--trekky-primary, #2D5A3D);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    transition: background var(--trekky-transition);
}
.trekky-tours-filter-badge__reset:hover {
    background: var(--trekky-primary, #2D5A3D);
    color: #fff;
}

.trekky-tours-empty {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2.5rem 1.5rem;
    text-align: center;
    border: 2px dashed var(--trekky-border);
    border-radius: var(--trekky-radius-lg);
    background: var(--trekky-bg-cream, #faf7f0);
}
.trekky-tours-empty__icon {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}
.trekky-tours-empty__title {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
    color: var(--trekky-primary, #2D5A3D);
}
.trekky-tours-empty__text {
    margin: 0 0 1.5rem;
    color: var(--trekky-text-muted);
    font-size: 1rem;
}
.trekky-tours-empty__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===========================================================
   TOURS GRID (from [trekky_tours_grid] shortcode)
   =========================================================== */
.trekky-tours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
    max-width: 1200px;
    margin: 0 auto;
}

.trekky-tour-card,
.trekky-post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--trekky-border);
    border-radius: var(--trekky-radius-lg);
    overflow: hidden;
    box-shadow: var(--trekky-shadow-sm);
    transition: transform var(--trekky-transition), box-shadow var(--trekky-transition);
}

.trekky-tour-card:hover,
.trekky-post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--trekky-shadow-lg);
}

.trekky-tour-card .trekky-card__image,
.trekky-post-card .trekky-card__image {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--trekky-bg);
}

.trekky-tour-card .trekky-card__image img,
.trekky-post-card .trekky-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.trekky-tour-card:hover .trekky-card__image img,
.trekky-post-card:hover .trekky-card__image img {
    transform: scale(1.04);
}

.trekky-tour-card .trekky-card__body,
.trekky-post-card .trekky-card__body {
    padding: 1.5rem 1.5rem 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.trekky-tour-card .trekky-card__title,
.trekky-post-card .trekky-card__title {
    font-size: 1.2rem;
    margin: 0;
    line-height: 1.3;
}

.trekky-tour-card .trekky-card__title a,
.trekky-post-card .trekky-card__title a {
    color: var(--trekky-primary);
    text-decoration: none;
}

.trekky-tour-card .trekky-card__meta,
.trekky-post-card .trekky-card__meta {
    font-size: 0.85rem;
    color: var(--trekky-text-muted);
    margin: 0;
}

.trekky-tour-card .trekky-card__link,
.trekky-post-card .trekky-card__link {
    margin-top: auto;
    color: var(--trekky-primary);
    font-weight: 600;
    align-self: flex-start;
    padding-top: 0.5rem;
}

/* ===========================================================
   POSTS GRID (Blog-Index)
   =========================================================== */
.trekky-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
    margin: 0 auto;
    max-width: 1200px;
}

.trekky-post-card .trekky-card__image {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.trekky-post-card .trekky-card__title a {
    color: var(--trekky-primary);
    text-decoration: none;
}

.trekky-post-card .trekky-card__link {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--trekky-primary);
    font-weight: 600;
}

/* ===========================================================
   PLUGIN OVERRIDES (cityhop-tours)
   =========================================================== */
.cityhop-tour-content {
    font-family: var(--trekky-font-body);
}

.cityhop-station-title {
    color: var(--trekky-primary);
    font-family: var(--trekky-font-heading);
}

.cityhop-quiz-button {
    background: var(--trekky-accent);
    color: var(--trekky-text);
    border-radius: var(--trekky-radius-md);
}
