/*
Theme Name: CB-Theme
Theme URI:
Author: Caro
Author URI:
Description: Neutrales Standard-Theme für neue WordPress-Instanzen. Optimiert für Elementor Pro.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: cb-theme
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   Design Tokens
   ========================================================================== */

:root {
    /* Farben – 3 Kernfarben */
    --cb-primary: #1B2838;
    --cb-secondary: #3B6BF5;
    --cb-accent: #F0F2F5;

    /* Abgeleitete Farben */
    --cb-text: #4E5562;
    --cb-border: #DFE2E7;
    --cb-white: #FFFFFF;
    --cb-body-bg: #FAFBFC;
    --cb-hover: #2952CC;

    /* Typografie */
    --cb-font-heading: 'Lora', Georgia, serif;
    --cb-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Basis */
    --cb-base-size: 1rem;       /* 16px */
    --cb-line-height: 1.6;
    --cb-heading-line-height: 1.3;

    /* Spacing */
    --cb-space-xs: 0.25rem;
    --cb-space-sm: 0.5rem;
    --cb-space-md: 1rem;
    --cb-space-lg: 1.5rem;
    --cb-space-xl: 2rem;
    --cb-space-2xl: 3rem;

    /* Border Radius */
    --cb-radius: 0.5rem;
    --cb-radius-pill: 12.5rem;
}

/* ==========================================================================
   Basis-Typografie
   ========================================================================== */

body {
    font-family: var(--cb-font-body);
    font-size: var(--cb-base-size);
    font-weight: 400;
    line-height: var(--cb-line-height);
    color: var(--cb-text);
    background-color: var(--cb-body-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--cb-font-heading);
    color: var(--cb-primary);
    line-height: var(--cb-heading-line-height);
    margin-top: 0;
    margin-bottom: var(--cb-space-md);
}

h1 {
    font-size: 2.75rem;     /* 44px */
    font-weight: 700;
}

h2 {
    font-size: 2.125rem;    /* 34px */
    font-weight: 700;
}

h3 {
    font-size: 1.625rem;    /* 26px */
    font-weight: 500;
}

h4 {
    font-size: 1.375rem;    /* 22px */
    font-weight: 500;
}

h5 {
    font-size: 1.125rem;    /* 18px */
    font-weight: 500;
}

h6 {
    font-family: var(--cb-font-body);
    font-size: 1rem;        /* 16px */
    font-weight: 500;
}

p {
    margin-top: 0;
    margin-bottom: var(--cb-space-md);
}

a {
    color: var(--cb-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--cb-hover);
}

/* ==========================================================================
   Buttons (Fallback – Elementor ueberschreibt diese per Kit)
   ========================================================================== */

.wp-element-button,
button,
input[type="submit"] {
    display: inline-block;
    font-family: var(--cb-font-body);
    font-size: 0.9375rem;   /* 15px */
    font-weight: 500;
    line-height: 1.2;
    color: var(--cb-white);
    background-color: var(--cb-secondary);
    border: none;
    border-radius: var(--cb-radius-pill);
    padding: 0.875rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wp-element-button:hover,
button:hover,
input[type="submit"]:hover {
    background-color: var(--cb-hover);
    color: var(--cb-white);
}

/* ==========================================================================
   Formulare (Fallback)
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
    font-family: var(--cb-font-body);
    font-size: 1rem;
    font-weight: 400;
    color: var(--cb-primary);
    background-color: var(--cb-white);
    border: 1px solid var(--cb-border);
    border-radius: var(--cb-radius);
    padding: 0.75rem 1rem;
    width: 100%;
    transition: border-color 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--cb-secondary);
}

label {
    display: block;
    font-weight: 500;
    color: var(--cb-primary);
    margin-bottom: var(--cb-space-xs);
}

/* ==========================================================================
   Layout-Hilfsklassen
   ========================================================================== */

.cb-container {
    max-width: 75rem;       /* 1200px */
    margin-inline: auto;
    padding-inline: var(--cb-space-lg);
}

.cb-section {
    padding-block: var(--cb-space-2xl);
}

/* ==========================================================================
   Fallback-Styles (wenn Elementor deaktiviert)
   ========================================================================== */

.cb-fallback-header {
    background-color: var(--cb-white);
    border-bottom: 1px solid var(--cb-border);
    padding: var(--cb-space-md) var(--cb-space-lg);
}

.cb-fallback-header a {
    font-family: var(--cb-font-heading);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--cb-primary);
}

.cb-fallback-footer {
    background-color: var(--cb-accent);
    border-top: 1px solid var(--cb-border);
    padding: var(--cb-space-lg);
    text-align: center;
    font-size: 0.875rem;
    color: var(--cb-text);
}

/* ==========================================================================
   Responsive (Tablet + Mobile)
   ========================================================================== */

@media (max-width: 64rem) { /* 1024px */
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 48rem) { /* 768px */
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }

    .cb-container {
        padding-inline: var(--cb-space-md);
    }
}
