/*
Theme Name: 360graddenken
Theme URI: https://www.360graddenken.de/
Author: Andreas Peter
Author URI: https://www.360graddenken.de/
Description: Modernes, aufgeräumtes Custom-Theme für 360graddenken.de mit den Schwerpunkten Automatisierung, Beratung, Web, Projekt- und Prozessmanagement. Elementor-kompatibel, Customizer-anpassbar, mit Open Sans und Markenfarben.
Version: 1.4.1
Requires at least: 6.3
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: 360graddenken
Tags: business, elementor, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, full-width-template
*/

/* =========================================================
   1. Reset & Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--grad-text, #333333);
    background-color: var(--grad-bg, #ffffff);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.6em;
    color: var(--grad-heading, #1e2761);
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }

p { margin: 0 0 1.2em; }

a {
    color: var(--grad-primary, #408ec6);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover, a:focus { color: var(--grad-secondary, #7a2048); }

ul, ol { margin: 0 0 1.2em 1.5em; padding: 0; }
li { margin-bottom: 0.4em; }

blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    border-left: 4px solid var(--grad-primary, #408ec6);
    background-color: rgba(64, 142, 198, 0.06);
    font-style: italic;
}

code, pre {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
    background-color: #f4f5f7;
    border-radius: 4px;
}
code { padding: 0.15em 0.4em; }
pre { padding: 1em; overflow-x: auto; }

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* =========================================================
   2. Layout / Container
   ========================================================= */
.grad-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.grad-content-area {
    padding: 60px 0;
}

/* =========================================================
   3. Header
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: var(--grad-header-bg, #ffffff);
    box-shadow: 0 2px 8px rgba(30, 39, 97, 0.05);
    transition: box-shadow 0.3s ease, padding 0.3s ease;
}
.site-header.is-scrolled { box-shadow: 0 4px 16px rgba(30, 39, 97, 0.12); }

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    gap: 24px;
}

.site-branding { flex-shrink: 0; }
.site-branding a { display: inline-block; }
.site-logo img {
    max-height: 56px;
    width: auto;
}
.site-title {
    font-size: 1.5rem;
    margin: 0;
    color: var(--grad-tertiary, #1e2761);
    font-weight: 800;
    letter-spacing: -0.01em;
}
.site-title a { color: inherit; }

/* Inline-SVG-Logo (Theme-Standard, wenn kein Custom Logo gesetzt ist) */
.site-title--logo { line-height: 0; letter-spacing: normal; }
.site-title--logo a { display: block; }
.site-title--logo svg { height: 60px; width: auto; display: block; }
@media (max-width: 600px) {
    .site-title--logo svg { height: 48px; }
}

/* Primary Menu */
.main-navigation { display: flex; align-items: center; }
.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}
.main-navigation li { margin: 0; position: relative; }
.main-navigation a {
    display: block;
    padding: 10px 16px;
    color: var(--grad-tertiary, #1e2761);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    background-color: rgba(64, 142, 198, 0.1);
    color: var(--grad-primary, #408ec6);
}

/* Submenu */
.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: #ffffff;
    box-shadow: 0 8px 24px rgba(30, 39, 97, 0.12);
    border-radius: 8px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    flex-direction: column;
    gap: 2px;
}
.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    padding: 8px;
    cursor: pointer;
    color: var(--grad-tertiary, #1e2761);
}
.menu-toggle svg { width: 28px; height: 28px; }

@media (max-width: 900px) {
    .menu-toggle { display: inline-flex; }
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        padding: 16px 24px;
        box-shadow: 0 8px 24px rgba(30, 39, 97, 0.12);
    }
    .main-navigation.is-open { display: block; }
    .main-navigation ul { flex-direction: column; gap: 0; width: 100%; }
    .main-navigation .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 16px;
    }
}

/* =========================================================
   4. Buttons
   ========================================================= */
.grad-btn,
button[type="submit"],
input[type="submit"],
.wp-block-button__link {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--grad-primary, #408ec6);
    color: #ffffff !important;
    border: 2px solid var(--grad-primary, #408ec6);
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}
.grad-btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background-color: var(--grad-tertiary, #1e2761);
    border-color: var(--grad-tertiary, #1e2761);
    color: #ffffff !important;
    transform: translateY(-1px);
}
.grad-btn--secondary {
    background-color: var(--grad-secondary, #7a2048);
    border-color: var(--grad-secondary, #7a2048);
}
.grad-btn--outline {
    background-color: transparent;
    color: var(--grad-primary, #408ec6) !important;
}
.grad-btn--outline:hover { background-color: var(--grad-primary, #408ec6); color: #ffffff !important; }

/* =========================================================
   5. Hero / Page Title
   ========================================================= */
.page-hero {
    background: linear-gradient(135deg, var(--grad-tertiary, #1e2761) 0%, var(--grad-primary, #408ec6) 100%);
    color: #ffffff;
    padding: 80px 0 60px;
    text-align: center;
}
.page-hero h1 { color: #ffffff; margin-bottom: 0.2em; }
.page-hero .page-hero-subtitle { font-size: 1.1rem; opacity: 0.9; margin: 0; }

/* =========================================================
   6. Posts & Cards
   ========================================================= */
.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.post-card {
    background-color: #ffffff;
    border: 1px solid #e9ecf1;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(30, 39, 97, 0.1);
}
.post-card-thumb { aspect-ratio: 16 / 9; overflow: hidden; background-color: #f4f5f7; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.post-card-title { font-size: 1.3rem; margin: 0 0 12px; }
.post-card-title a { color: var(--grad-tertiary, #1e2761); }
.post-card-title a:hover { color: var(--grad-primary, #408ec6); }
.post-card-meta { font-size: 0.85rem; color: #6c7280; margin-bottom: 8px; }
.post-card-excerpt { color: #4d5563; margin-bottom: 16px; flex: 1; }
.post-card-readmore {
    font-weight: 600;
    color: var(--grad-primary, #408ec6);
    align-self: flex-start;
}
.post-card-readmore::after { content: " \2192"; }

/* Single Post */
.single-post-content { max-width: 760px; margin: 0 auto; }
.single-post-meta {
    font-size: 0.9rem;
    color: #6c7280;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecf1;
}
.single-post-thumb { margin: 0 0 32px; border-radius: 12px; overflow: hidden; }

/* =========================================================
   7. Pagination
   ========================================================= */
.grad-pagination {
    margin: 48px 0 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.grad-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    background-color: #f4f5f7;
    color: var(--grad-tertiary, #1e2761);
    font-weight: 600;
    text-decoration: none;
}
.grad-pagination .page-numbers.current,
.grad-pagination .page-numbers:hover {
    background-color: var(--grad-primary, #408ec6);
    color: #ffffff;
}

/* =========================================================
   8. Forms (Contact Form 7 base styling)
   ========================================================= */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 textarea,
.wpcf7 select,
input[type="search"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d4d8e0;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus,
input[type="search"]:focus {
    outline: none;
    border-color: var(--grad-primary, #408ec6);
    box-shadow: 0 0 0 3px rgba(64, 142, 198, 0.15);
}
.wpcf7-form p { margin-bottom: 16px; }
.wpcf7-form label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--grad-tertiary, #1e2761); }
.wpcf7-not-valid-tip { color: var(--grad-secondary, #7a2048); font-size: 0.875rem; margin-top: 4px; }
.wpcf7-response-output {
    margin: 16px 0 0 !important;
    padding: 12px 16px !important;
    border-radius: 6px;
    border: 1px solid #e9ecf1 !important;
}

/* =========================================================
   9. Footer
   ========================================================= */
.site-footer {
    background-color: var(--grad-footer-bg, #1e2761);
    color: var(--grad-footer-text, #d4d8e0);
    margin-top: 80px;
}
.site-footer a { color: #ffffff; }
.site-footer a:hover { color: var(--grad-primary, #408ec6); }

.footer-branding { padding: 8px 0 24px; line-height: 0; }
.footer-branding a { display: inline-block; }
.footer-branding svg { height: 56px; width: auto; display: block; }

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    padding: 60px 0 40px;
}
.footer-widget-title {
    color: #ffffff;
    font-size: 1.05rem;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.footer-widget ul { list-style: none; margin: 0; padding: 0; }
.footer-widget li { margin-bottom: 8px; }

.site-info {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
}
.site-info-menu ul {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-info-menu li { margin: 0; }

/* =========================================================
   10. Utility & Accessibility
   ========================================================= */
.screen-reader-text {
    border: 0;
    clip: rect(1px,1px,1px,1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}
.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 9999;
    background-color: var(--grad-tertiary, #1e2761);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
}
.skip-link:focus { left: 8px; color: #ffffff; }

.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.aligncenter { margin-left: auto; margin-right: auto; }

/* =========================================================
   11. 404
   ========================================================= */
.error-404 {
    text-align: center;
    padding: 80px 0;
}
.error-404 .error-number {
    font-size: clamp(6rem, 14vw, 10rem);
    line-height: 1;
    color: var(--grad-primary, #408ec6);
    margin: 0;
    font-weight: 800;
}

/* =========================================================
   12. Elementor harmony
   ========================================================= */
/* Ensure Elementor Canvas works flush with header */
body.elementor-template-canvas .site-header,
body.elementor-template-canvas .site-footer { display: none; }

/* Elementor Full-Width: keep header/footer but kill page padding */
body.elementor-page .grad-content-area { padding: 0; }
body.elementor-page .entry-header.has-page-hero { display: block; }

/* Leistungs-Icon-Boxen: lange Begriffe (z. B. „Prozessmanagement") sauber
   umbrechen, statt aus der Spalte zu laufen und zu kollidieren. */
.elementor-widget-icon-box .elementor-icon-box-title,
.elementor-widget-icon-box .elementor-icon-box-title a {
    overflow-wrap: break-word;
    word-break: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* Die fünf Leistungen liegen als 5 Spalten à 20 % in EINER Reihe.
   Bei < 1025 px sind 20 % zu schmal für die langen Begriffe -> umbrechen
   lassen (3 pro Reihe, dann 2, dann 1), damit nichts kollidiert. */
@media (max-width: 1024px) {
    .elementor-column.elementor-col-20 { width: 33.3333%; }
}
@media (max-width: 767px) {
    .elementor-column.elementor-col-20 { width: 50%; }
}
@media (max-width: 479px) {
    .elementor-column.elementor-col-20 { width: 100%; }
}

/* =========================================================
   13. Mobile / Responsive tweaks
   ========================================================= */
@media (max-width: 600px) {
    .grad-content-area { padding: 40px 0; }
    .footer-widgets { padding: 40px 0 24px; gap: 28px; }
    .site-info { flex-direction: column; align-items: flex-start; }
}
