/*
Theme Name: Tischler Kurs v2
Theme URI: https://tischler-kurs.de
Author: Jasper Seemann
Description: Modernes WordPress-Theme für tischler-kurs.de – technisch überarbeitet, optisch unverändert.
Version: 2.0
*/

/* =========================================================
   Design Tokens
   ========================================================= */
:root {
    --color-primary:       #dcaf72;
    --color-primary-light: #ebd4ad;
    --color-text:          #000000;
    --color-bg:            #ffffff;
    --font-main:           'IBM Plex Sans', sans-serif;
    --max-width:           1140px;
    --radius-btn:          30px;
    --gap-section:         40px;
}

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

body {
    background-color: var(--color-bg);
    font-family: var(--font-main);
    font-weight: normal;
    margin: 0;
    padding: 0;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

hr {
    border: none;
    border-top: 2px solid var(--color-text);
    width: 100%;
    margin: 20px auto;
}

.text-justify,
.text-misc {
    text-align: justify;
}

/* =========================================================
   Sticky Header
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background-color: var(--color-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

/* =========================================================
   Navigation
   ========================================================= */
.menu {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex: 1;
}

.menu-right ul {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex: 1;
    padding: 0;
    margin: 0;
    list-style: none;
}

.menu-item,
.menu-right ul li {
    margin: 0 15px;
    font-size: 25px;
}

.brand a {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    line-height: 1.1;
    gap: 0;
    color: var(--color-text);
    text-decoration: none;
}

.brand-line1 {
    display: block;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Buchstaben einzeln mit space-between → exakt gleiche Breite wie TISCHLER */
.brand-line2 {
    display: flex;
    justify-content: space-between;
    font-size: 22px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-primary);
}

nav {
    margin-top: 40px;
    width: 100%;
}

nav ul {
    list-style-type: none;
    padding: 0;
}

nav ul li a {
    color: var(--color-text);
    text-decoration: none;
}

.menu-close-button {
    display: none;
    font-size: 32px;
    cursor: pointer;
    align-self: flex-start;
    margin: 10px;
}

/* =========================================================
   Homepage
   ========================================================= */
.page-top-spacing {
    height: var(--gap-section);
}

.image-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.content-image {
    width: calc((100% - 40px) / 3);
    max-height: 100%;
    height: auto;
    object-fit: cover;
}

.colored-surface {
    position: relative;
    background-color: transparent;
    padding: 80px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-content {
    text-align: center;
}

.claim-text {
    font-size: 48px;
    text-align: center;
}

.link-text {
    text-align: center;
    margin-top: 10px;
}

.link-text a {
    color: var(--color-text);
}

.info-button-start {
    background-color: var(--color-primary);
    padding: 10px 20px;
    text-decoration: none;
    color: #fff;
    border-radius: var(--radius-btn);
    font-size: 20px;
    font-weight: bold;
}

/* =========================================================
   Footer
   ========================================================= */
.footer-spacer {
    height: 50px;
}

.footer {
    width: 100%;
    background-color: transparent;
    color: var(--color-text);
    padding: 20px 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    width: 100%;
    max-width: var(--max-width);
    flex-wrap: wrap;
    margin: 0 auto;
}

.footer-links a,
.footer-links span {
    color: var(--color-text);
    text-decoration: none;
    margin: 0 30px;
}

/* =========================================================
   Kurs Page
   ========================================================= */
.kurs-page,
.course {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: var(--max-width);
    margin: auto;
    padding: 0;
    margin-bottom: 50px;
}

.kurs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
    margin: 0;
}

.kurs-title {
    margin: 0 10px 0 0;
    font-size: 48px;
    flex: 1;
    min-width: 300px;
    max-width: 300px;
}

.info-button {
    margin: 0;
    padding: 5px 15px;
    border: none;
    border-radius: 25px;
    color: var(--color-text);
    background-color: var(--color-primary);
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    font-size: 20px;
}

.kurs-text-right {
    margin: 0;
    font-size: 20px;
    min-width: 250px;
    text-align: right;
}

.extra-info {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    margin: 0;
}

.kurs-images {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.left-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-right: 10px;
}

.right-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    justify-content: space-between;
}

.course-description {
    margin-top: 10px;
    display: none;
    font-size: 20px;
}

.extra-info.open .course-description {
    display: block;
}

.extra-info.open .info-button {
    background-color: transparent;
}

.button-wrapper {
    margin-left: auto;
}

.find-termin {
    margin-top: auto;
    padding: 10px 20px;
    background-color: var(--color-primary);
    color: var(--color-text);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 20px;
}

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

/* =========================================================
   Buchung Page
   ========================================================= */
.full-width-bg {
    background-color: var(--color-primary-light);
    width: 100%;
    margin: 0;
    padding: 0;
}

.buchung-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
}

.buchung-title {
    font-size: 36px;
    text-align: left;
    width: 200px;
    margin: 0;
}

.middle-text {
    display: inline-block;
    font-size: 25px;
    text-align: left;
}

.buchung-text-right {
    color: var(--color-text) !important;
    text-align: right;
    background-color: var(--color-primary);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: var(--radius-btn);
    font-size: 20px;
    font-weight: bold;
    margin-top: 30px;
    cursor: pointer;
    border: none;
}

.contact-form-container {
    display: none;
    width: 100%;
    padding: 0 15px 20px;
    text-align: right;
}

.wpcf7-submit {
    color: var(--color-text) !important;
    background-color: var(--color-primary);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: var(--radius-btn);
    font-size: 20px;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

/* =========================================================
   Kontakt Page
   ========================================================= */
.contacts-page {
    display: flex;
    align-items: stretch;
    height: calc(100vh - 160px);
    max-height: 680px;
    min-height: 360px;
}

.contact-info {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.contact-info img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Caption als Overlay über dem Bild – gleiche Beige-Farbe wie rechts */
.contact-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-primary-light);
    padding: 14px 24px 16px;
}

.contact-name {
    margin: 0;
    font-size: 18px;
    font-weight: 400;
}

.contact-title {
    margin: 3px 0 0;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--color-primary-light);
    padding: 32px 36px 28px;
    box-sizing: border-box;
    overflow-y: auto;
}

.contact-form-intro {
    margin: 0 0 20px;
    font-size: 17px;
    line-height: 1.5;
}

.contact-form .wpcf7-submit {
    display: block;
    margin-left: auto;
}

/* =========================================================
   Gallery / Info Page
   ========================================================= */
.container.gallery-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
    margin: auto;
}

.content-wrapper {
    margin-left: 0;
    width: 100%;
}

.full-width-image img {
    width: 100vw;
    height: auto;
    margin-left: calc(50% - 50vw);
}

.text-block {
    font-family: var(--font-main);
    text-align: justify;
    font-size: 20px;
    line-height: 1.6;
    padding: 0 50px;
    margin-top: 20px;
    box-sizing: border-box;
    width: 100%;
}

.container .gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    padding: 0 50px;
    box-sizing: border-box;
    margin: 0 auto;
}

.container .gallery-image img {
    width: 100%;
    height: auto;
}

.button-gallery {
    margin-top: 20px;
    text-align: center;
}

.button-gallery a {
    display: inline-block;
    background-color: var(--color-primary);
    padding: 10px 20px;
    text-decoration: none;
    color: var(--color-text);
    border-radius: var(--radius-btn);
    font-size: 20px;
    font-weight: bold;
}

/* Footer Nav (wp_nav_menu Output) */
.footer-links .footer-nav {
    display: contents;
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-links .footer-nav li {
    list-style: none;
}

.footer-links .footer-nav li a {
    color: var(--color-text);
    text-decoration: none;
    margin: 0 30px;
}

/* =========================================================
   Misc
   ========================================================= */
.wp-block-group__inner-container {
    padding: 10px;
}

/* =========================================================
   Mobile
   ========================================================= */
@media only screen and (max-width: 768px) {

    /* Navigation */
    .brand {
        padding-left: 10px;
    }

    .menu-item,
    .menu-right ul li {
        margin: 0 10px;
    }

    .menu-right ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: fixed;
        z-index: 9999;
        top: 0;
        right: -100%;
        width: 66.67%;
        height: 100%;
        background-color: var(--color-primary-light);
        justify-content: flex-start;
        font-weight: bolder;
        transition: right 0.3s ease-in-out;
    }

    .menu-right::before {
        content: '\2630';
        font-size: 40px;
        cursor: pointer;
        margin-right: 10px;
    }

    .menu-right.active::before {
        content: '';
    }

    .menu-right.active ul {
        display: flex;
        right: 0;
    }

    .menu-close-button {
        display: block;
        font-size: 32px;
        cursor: pointer;
        position: absolute;
        top: 10px;
        right: 10px;
        margin: 10px;
    }

    .menu-item,
    .menu-right ul li {
        font-size: 24px;
    }

    .menu-right ul li:not(.menu-close-button) {
        border-bottom: 2px solid var(--color-text);
        padding-top: 60px;
        padding-left: 20px;
    }

    .menu-right ul li:last-child {
        border-bottom: none;
    }

    /* Homepage */
    .colored-surface {
        padding: 50px 20px;
    }

    .image-container {
        flex-wrap: wrap;
        gap: 10px;
    }

    .content-image {
        width: calc((100% - 20px) / 2);
    }

    .content-image:nth-child(n+3) {
        display: none;
    }

    /* Footer */
    .footer-links {
        flex-direction: column;
        text-align: center;
    }

    .footer-links a,
    .footer-links span {
        margin: 10px 0;
    }

    .footer-links .footer-nav {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-links .footer-nav li a {
        margin: 10px 0;
    }

    /* Kurs Page */
    .kurs-header {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 10px;
    }

    .kurs-title {
        margin-bottom: 10px;
    }

    .info-button {
        margin-bottom: 10px;
        align-self: flex-start;
    }

    .kurs-text-right {
        text-align: left;
        align-self: flex-start;
    }

    .extra-info {
        align-items: flex-start;
        padding: 10px;
    }

    .left-section,
    .right-section {
        margin-bottom: 20px;
    }

    .kurs-images {
        flex-direction: column;
    }

    /* Buchung Page */
    .buchung-header {
        flex-direction: column;
        text-align: center;
    }

    /* Gallery Page */
    .container.gallery-page {
        width: 100%;
    }

    .content-wrapper {
        margin: 0;
    }

    .full-width-image img {
        width: 100%;
        margin-left: 0;
    }

    .text-block {
        font-size: 18px;
        padding: 0 20px;
        margin-top: 10px;
    }

    .container .gallery {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .button-gallery {
        margin-top: 10px;
    }

    .button-gallery a {
        font-size: 18px;
    }

    /* Impressum */
    .impressum {
        padding: 10px;
    }

    /* Kontakt */
    .contacts-page {
        flex-direction: column;
        height: auto;
        min-height: 0;
    }

    .contact-info {
        width: 100%;
        height: 55vw;      /* proportional zur Bildschirmbreite, max via max-height */
        max-height: 320px;
        flex: none;
        overflow: hidden;
    }

    .contact-info img {
        object-position: center 25%; /* Gesicht besser treffen */
    }

    .contact-caption {
        text-align: left;
        padding: 12px 20px;
    }

    .contact-form {
        width: 100%;
        flex: none;
        padding: 24px 20px;
        overflow-y: visible;
    }

    /* Logo */
    .brand-line1,
    .brand-line2 {
        font-size: 18px;
    }
}
