/* ============================================================
   T.C. Müller – Haupt-Stylesheet
   Farben: Blau #1D4E9B | Rot #E63946 | Gelb #F5A623
   Schrift: Space Grotesk
   ============================================================ */

/* ---------- Schriften ---------- */
@font-face {
    font-family: 'Space Grotesk';
    src: url('../fonts/SpaceGrotesk-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}

/* ---------- CSS-Variablen ---------- */
:root {
    --tcm-blue:       #1D4E9B;
    --tcm-blue-dark:  #163b78;
    --tcm-blue-light: #2a66c7;
    --tcm-red:        #E63946;
    --tcm-yellow:     #F5A623;
    --tcm-dark:       #0D1B2A;
    --tcm-gray:       #6B7280;
    --tcm-light:      #F5F6FA;
    --tcm-white:      #FFFFFF;
    --tcm-border:     #E2E8F0;
    --font-main:      'Space Grotesk', system-ui, sans-serif;
    --radius:         0.75rem;
    --radius-sm:      0.375rem;
    --shadow:         0 4px 24px rgba(29,78,155,0.10);
    --shadow-lg:      0 8px 40px rgba(29,78,155,0.16);
    --transition:     0.25s ease;
}

/* ---------- Reset & Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--tcm-dark);
    background: var(--tcm-white);
    margin: 0;
}

h1,h2,h3,h4,h5,h6 {
    font-family: var(--font-main);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75em;
}

a { color: var(--tcm-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--tcm-red); }

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

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

/* ---------- Bootstrap-Ergänzungen ---------- */
.container { max-width: 1200px; }

/* ---------- Navigation ---------- */
.tcm-navbar {
    background: var(--tcm-white);
    border-bottom: 2px solid var(--tcm-border);
    padding: 0.5rem 0;
    box-shadow: 0 2px 12px rgba(29,78,155,0.07);
}

.tcm-navbar .navbar-brand img {
    height: 48px;
    width: auto;
    max-width: none;
    transition: transform var(--transition);
}
.tcm-navbar .navbar-brand:hover img { transform: scale(1.04); }

.tcm-navbar .nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    color: var(--tcm-dark);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}
.tcm-navbar .nav-link:hover,
.tcm-navbar .nav-link.active {
    color: var(--tcm-blue);
    background: rgba(29,78,155,0.07);
}

.navbar-toggler { border: none; }
.navbar-toggler:focus { box-shadow: none; }

/* ---------- Hero ---------- */
.tcm-hero {
    position: relative;
    background: var(--tcm-blue);
    overflow: hidden;
    padding: 6rem 0 5rem;
    color: var(--tcm-white);
}

.tcm-hero-pattern {
    position: absolute;
    inset: 0;
    background-image: url('../images/backgrounds/rapport_blau.png');
    background-size: 300px;
    opacity: 0.12;
    z-index: 0;
}

.tcm-hero .container { position: relative; z-index: 1; }

.tcm-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--tcm-white);
    margin-bottom: 1rem;
}

.tcm-hero .hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    margin-bottom: 2rem;
}

.tcm-hero .accent { color: var(--tcm-yellow); }

.hero-tag {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--tcm-white);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border-radius: 2rem;
    margin-bottom: 1.5rem;
}

/* ---------- Buttons ---------- */
.btn-tcm {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--tcm-red);
    color: var(--tcm-white);
    font-weight: 700;
    font-family: var(--font-main);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    border: 2px solid var(--tcm-red);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
}
.btn-tcm:hover {
    background: #c0303b;
    border-color: #c0303b;
    color: var(--tcm-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230,57,70,0.35);
}

.btn-tcm-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--tcm-white);
    font-weight: 700;
    font-family: var(--font-main);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(255,255,255,0.6);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    text-decoration: none;
}
.btn-tcm-outline:hover {
    background: rgba(255,255,255,0.12);
    border-color: var(--tcm-white);
    color: var(--tcm-white);
}

.btn-tcm-blue {
    background: var(--tcm-blue);
    border-color: var(--tcm-blue);
    color: var(--tcm-white);
}
.btn-tcm-blue:hover {
    background: var(--tcm-blue-dark);
    border-color: var(--tcm-blue-dark);
    color: var(--tcm-white);
    box-shadow: 0 6px 20px rgba(29,78,155,0.35);
}

/* ---------- Abschnitts-Überschriften ---------- */
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--tcm-red);
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--tcm-dark);
    margin-bottom: 0.5rem;
}

.section-line {
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, var(--tcm-red), var(--tcm-yellow));
    border-radius: 2px;
    margin-bottom: 1.5rem;
}

/* ---------- Karten ---------- */
.tcm-card {
    background: var(--tcm-white);
    border: 1px solid var(--tcm-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.tcm-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--tcm-blue);
}

.tcm-card-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: var(--tcm-light);
    flex-shrink: 0;
}

.tcm-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tcm-card-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tcm-red);
    margin-bottom: 0.5rem;
}

.tcm-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tcm-dark);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.tcm-card-excerpt {
    color: var(--tcm-gray);
    font-size: 0.9rem;
    flex: 1;
    margin-bottom: 1rem;
}

.tcm-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--tcm-border);
    background: var(--tcm-light);
}

.tcm-card-date {
    font-size: 0.8rem;
    color: var(--tcm-gray);
}

.tcm-card-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tcm-blue);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.tcm-card-link:hover { color: var(--tcm-red); }
.tcm-card-link svg { transition: transform var(--transition); }
.tcm-card-link:hover svg { transform: translateX(3px); }

/* ---------- Buch-Karte ---------- */
.book-card {
    display: flex;
    flex-direction: column;
    background: var(--tcm-white);
    border: 1px solid var(--tcm-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    height: 100%;
}
.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.book-cover-wrap {
    position: relative;
    background: linear-gradient(135deg, var(--tcm-blue) 0%, var(--tcm-blue-dark) 100%);
    aspect-ratio: 2/3;
    overflow: hidden;
}

.book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.book-cover-placeholder img {
    width: 80px;
    opacity: 0.5;
    filter: brightness(10);
}

.book-info {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-genre {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tcm-red);
    margin-bottom: 0.35rem;
}

.book-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--tcm-dark);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.book-subtitle {
    font-size: 0.85rem;
    color: var(--tcm-gray);
    margin-bottom: 0.75rem;
}

.book-meta {
    font-size: 0.8rem;
    color: var(--tcm-gray);
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--tcm-border);
    display: flex;
    justify-content: space-between;
}

/* ---------- Projekt-Karte ---------- */
.project-card {
    background: var(--tcm-white);
    border: 1px solid var(--tcm-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.project-img-wrap {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--tcm-blue-light), var(--tcm-blue-dark));
    overflow: hidden;
}
.project-img { width: 100%; height: 100%; object-fit: cover; }

.project-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.project-img-placeholder img { width: 64px; opacity: 0.5; filter: brightness(10); }

.project-tech {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.tech-tag {
    background: rgba(0,0,0,0.55);
    color: var(--tcm-white);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 2rem;
    backdrop-filter: blur(4px);
}

.project-info {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--tcm-dark);
    margin-bottom: 0.5rem;
}

.project-desc {
    color: var(--tcm-gray);
    font-size: 0.9rem;
    flex: 1;
    margin-bottom: 1rem;
}

/* ---------- Blog ---------- */
.blog-hero {
    background: var(--tcm-blue);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}
.blog-hero-pattern {
    position: absolute;
    inset: 0;
    background-image: url('../images/backgrounds/rapport_blau.png');
    background-size: 250px;
    opacity: 0.1;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--tcm-light);
    border: 1px solid var(--tcm-border);
    color: var(--tcm-dark);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 2rem;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    text-decoration: none;
}
.category-pill:hover, .category-pill.active {
    background: var(--tcm-blue);
    border-color: var(--tcm-blue);
    color: var(--tcm-white);
}
.category-pill .count {
    background: rgba(0,0,0,0.1);
    border-radius: 1rem;
    padding: 0 0.4rem;
    font-size: 0.75rem;
}
.category-pill.active .count { background: rgba(255,255,255,0.2); }

/* ---------- Blog-Post-Seite ---------- */
.post-hero {
    background: var(--tcm-blue);
    padding: 4rem 0;
    color: var(--tcm-white);
    position: relative;
    overflow: hidden;
}
.post-hero-pattern {
    position: absolute;
    inset: 0;
    background-image: url('../images/backgrounds/rapport_blau.png');
    background-size: 250px;
    opacity: 0.1;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--tcm-dark);
}
.post-content h2 { font-size: 1.6rem; margin-top: 2.5rem; color: var(--tcm-blue); }
.post-content h3 { font-size: 1.25rem; margin-top: 2rem; color: var(--tcm-dark); }
.post-content img { border-radius: var(--radius); box-shadow: var(--shadow); }
.post-content blockquote {
    border-left: 4px solid var(--tcm-blue);
    background: var(--tcm-light);
    padding: 1rem 1.5rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--tcm-gray);
}
.post-content code {
    background: var(--tcm-light);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--tcm-red);
}
.post-content pre {
    background: var(--tcm-dark);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
}
.post-content pre code { background: none; color: inherit; padding: 0; }

/* ---------- Über mich ---------- */
.about-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--tcm-blue);
    box-shadow: 0 0 0 6px rgba(29,78,155,0.15);
}

/* ---------- Icon-Sektion ---------- */
.icon-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1rem;
}
.icon-feature img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
}
.icon-feature h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.icon-feature p { font-size: 0.9rem; color: var(--tcm-gray); }

/* ---------- Hintergrundmuster-Abschnitt ---------- */
.pattern-section {
    position: relative;
    background: var(--tcm-light);
    overflow: hidden;
}
.pattern-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/backgrounds/rapport_farbig.png');
    background-size: 200px;
    opacity: 0.06;
}
.pattern-section > .container { position: relative; z-index: 1; }

/* ---------- Badge / Schlagwort ---------- */
.badge-tcm {
    display: inline-block;
    background: rgba(29,78,155,0.1);
    color: var(--tcm-blue);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 2rem;
    letter-spacing: 0.05em;
}
.badge-tcm-red {
    background: rgba(230,57,70,0.1);
    color: var(--tcm-red);
}

/* ---------- Pagination ---------- */
.tcm-pagination {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 3rem;
}
.tcm-pagination a, .tcm-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--tcm-border);
    color: var(--tcm-dark);
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
}
.tcm-pagination a:hover { background: var(--tcm-blue); color: var(--tcm-white); border-color: var(--tcm-blue); }
.tcm-pagination span.current { background: var(--tcm-blue); color: var(--tcm-white); border-color: var(--tcm-blue); }

/* ---------- Sidebar ---------- */
.tcm-sidebar-widget {
    background: var(--tcm-white);
    border: 1px solid var(--tcm-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.tcm-sidebar-widget h5 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tcm-blue);
    border-bottom: 2px solid var(--tcm-border);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}
.sidebar-post {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--tcm-border);
    text-decoration: none;
    color: var(--tcm-dark);
    transition: color var(--transition);
}
.sidebar-post:last-child { border-bottom: none; }
.sidebar-post:hover { color: var(--tcm-blue); }
.sidebar-post-title { font-size: 0.85rem; font-weight: 600; line-height: 1.4; }
.sidebar-post-date { font-size: 0.75rem; color: var(--tcm-gray); }

/* ---------- Alert / Hinweis ---------- */
.tcm-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.tcm-alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.tcm-alert-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--tcm-red); }

/* ---------- Footer ---------- */
.tcm-footer {
    background: var(--tcm-dark);
    color: rgba(255,255,255,0.75);
    position: relative;
    overflow: hidden;
}

.tcm-footer-pattern {
    position: absolute;
    inset: 0;
    background-image: url('../images/backgrounds/rapport_blau.png');
    background-size: 200px;
    opacity: 0.04;
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.footer-desc { font-size: 0.9rem; color: rgba(255,255,255,0.55); }

.footer-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a {
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    transition: color var(--transition);
    text-decoration: none;
}
.footer-links a:hover { color: var(--tcm-yellow); }

.footer-contact a { color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.footer-contact a:hover { color: var(--tcm-yellow); }

.social-links { display: flex; gap: 0.75rem; }
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.65);
    border-radius: 50%;
    transition: background var(--transition), color var(--transition);
}
.social-links a:hover { background: var(--tcm-blue); color: var(--tcm-white); }

.footer-divider { border-color: rgba(255,255,255,0.1); }
.footer-copy { font-size: 0.85rem; color: rgba(255,255,255,0.35); }
.footer-admin-link { font-size: 0.8rem; color: rgba(255,255,255,0.25); }
.footer-admin-link:hover { color: var(--tcm-yellow); }

/* ---------- Placeholder-Bild SVG ---------- */
.img-placeholder {
    background: var(--tcm-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tcm-border);
    font-size: 2rem;
}

/* ---------- Utility ---------- */
.text-tcm-blue   { color: var(--tcm-blue); }
.text-tcm-red    { color: var(--tcm-red); }
.text-tcm-yellow { color: var(--tcm-yellow); }
.bg-tcm-blue     { background-color: var(--tcm-blue); }
.bg-tcm-red      { background-color: var(--tcm-red); }
.bg-tcm-light    { background-color: var(--tcm-light); }

.py-section { padding-top: 5rem; padding-bottom: 5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .tcm-hero { padding: 4rem 0 3rem; }
    .py-section { padding-top: 3rem; padding-bottom: 3rem; }
    .tcm-navbar .nav-link { padding: 0.6rem 1rem; }
}

/* ---------- Smooth Scrollbar & Selection ---------- */
::selection { background: var(--tcm-blue); color: var(--tcm-white); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--tcm-light); }
::-webkit-scrollbar-thumb { background: var(--tcm-blue); border-radius: 4px; }
