/* ===========================================
   Holstein Kiel Brand Styles
   =========================================== */

/* ===========================================
   FONTS
   =========================================== */
@font-face {
    font-family: 'Boxed';
    src: url('https://www.holstein-kiel.de/wp-content/themes/holstein-kiel/dist/fonts/BoxedLight.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Boxed';
    src: url('https://www.holstein-kiel.de/wp-content/themes/holstein-kiel/dist/fonts/BoxedRegular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Boxed';
    src: url('https://www.holstein-kiel.de/wp-content/themes/holstein-kiel/dist/fonts/BoxedMedium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Boxed';
    src: url('https://www.holstein-kiel.de/wp-content/themes/holstein-kiel/dist/fonts/BoxedSemibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Boxed';
    src: url('https://www.holstein-kiel.de/wp-content/themes/holstein-kiel/dist/fonts/BoxedBold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===========================================
   CSS Custom Properties / Variables
   =========================================== */
:root {
    /* Brand Colors - Holstein Kiel */
    --color-primary: #005297;
    --color-primary-dark: #003d70;
    --color-primary-light: #0066bb;
    --color-accent: #e30613;
    --color-accent-hover: #c00510;
    
    /* Neutral Colors */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-dark: #1a1a1a;
    --color-dark-lighter: #2d2d2d;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-border: #e0e0e0;
    --color-border-dark: #cccccc;
    --color-background: #ffffff;
    --color-background-light: #f5f5f5;
    --color-background-muted: #eeeeee;
    
    /* Typography */
    --font-family: 'Boxed', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3rem;
    
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Layout */
    --container-max-width: 1200px;
    --container-padding: 1.5rem;
    --header-height: 80px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ===========================================
   Reset & Base Styles
   =========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-normal);
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

/* ===========================================
   Layout
   =========================================== */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.main-content {
    flex: 1;
    padding: var(--space-12) 0;
}

/* ===========================================
   HEADER
   =========================================== */
.site-header {
    background-color: var(--color-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

/* Header Logo */
.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo img {
    height: 60px;
    width: auto;
}

/* Header Navigation */
.header-nav {
    display: none;
    flex: 1;
    justify-content: center;
}

@media (min-width: 1024px) {
    .header-nav {
        display: flex;
    }
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.nav-list > li > a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--color-white);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-normal);
}

.nav-list > li > a:hover,
.nav-list > li > a:focus {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-list > li > a.is-active {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.header-action-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    border-radius: var(--radius-full);
    transition: background-color var(--transition-normal);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.header-action-btn:hover,
.header-action-btn:focus {
    background-color: rgba(255, 255, 255, 0.15);
}

.header-action-btn svg {
    width: 24px;
    height: 24px;
}

/* Auth State Icons */
.header-auth-icons {
    display: none;
    align-items: center;
    gap: var(--space-1);
}

.header-auth-icons.active {
    display: flex;
}

.header-auth-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background-color var(--transition-normal);
}

.header-auth-icon:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.header-auth-icon--profile::before {
    content: '';
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.header-auth-icon--logout::before {
    content: '';
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'%3E%3C/path%3E%3Cpolyline points='16 17 21 12 16 7'%3E%3C/polyline%3E%3Cline x1='21' y1='12' x2='9' y2='12'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-2);
    background: none;
    border: none;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-white);
    border-radius: 2px;
    transition: transform var(--transition-normal);
}

/* ===========================================
   HERO SECTION
   =========================================== */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    padding: var(--space-16) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

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

.hero__badge {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background-color: var(--color-accent);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-6);
}

.hero__title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-4);
    line-height: var(--line-height-tight);
}

.hero__subtitle {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto;
    line-height: var(--line-height-relaxed);
}

/* ===========================================
   CARDS SECTION
   =========================================== */
.cards-section {
    padding: var(--space-16) 0;
    background-color: var(--color-background-light);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    text-align: center;
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

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

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-6);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    border-radius: var(--radius-full);
    color: var(--color-white);
}

.card-icon svg {
    width: 40px;
    height: 40px;
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-dark);
    margin-bottom: var(--space-3);
}

.card-text {
    color: var(--color-text-light);
    margin-bottom: var(--space-6);
    line-height: var(--line-height-relaxed);
}

/* ===========================================
   BUTTONS
   =========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    text-decoration: none;
    cursor: pointer;
    min-height: 48px;
    border: none;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--color-accent-hover);
}

.btn-secondary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--color-primary-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover,
.btn-outline:focus {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-white {
    background-color: var(--color-white);
    color: var(--color-primary);
}

.btn-white:hover,
.btn-white:focus {
    background-color: var(--color-background-light);
}

/* ===========================================
   FOOTER
   =========================================== */
.site-footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    margin-top: auto;
}

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

/* Footer Top */
.footer-top {
    padding: var(--space-12) 0;
}

.footer-top .footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-10);
}

@media (min-width: 768px) {
    .footer-top .footer-container {
        grid-template-columns: auto 1fr auto;
        align-items: start;
    }
}

/* Footer Brand */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

@media (min-width: 768px) {
    .footer-brand {
        align-items: flex-start;
    }
}

.footer-logo img {
    height: 80px;
    width: auto;
}

/* Footer Navigation */
.footer-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-8);
}

.footer-nav-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-4);
    color: var(--color-white);
}

.footer-nav-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-nav-list a {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
    transition: color var(--transition-normal);
}

.footer-nav-list a:hover,
.footer-nav-list a:focus {
    color: var(--color-white);
}

/* Footer Social */
.footer-social {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    align-items: center;
}

@media (min-width: 768px) {
    .footer-social {
        align-items: flex-end;
    }
}

.footer-social-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-white);
}

.footer-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.footer-social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--color-white);
    transition: background-color var(--transition-normal);
}

.footer-social-links a:hover,
.footer-social-links a:focus {
    background-color: var(--color-accent);
}

.footer-social-links svg {
    width: 20px;
    height: 20px;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-6) 0;
}

.footer-bottom .footer-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom .footer-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-copyright {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.6);
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
}

.footer-legal a {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition-normal);
}

.footer-legal a:hover,
.footer-legal a:focus {
    color: var(--color-white);
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */
.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

/* ===========================================
   UNIDY SDK COMPONENT STYLES
   =========================================== */

/* Form Fields */
u-field::part(field_label) {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

u-field::part(input_field),
u-field::part(select_field),
u-field::part(textarea_field) {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    color: var(--color-text);
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

u-field::part(input_field):focus,
u-field::part(select_field):focus,
u-field::part(textarea_field):focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 82, 151, 0.15);
}

u-field::part(required-indicator) {
    color: var(--color-accent);
    margin-left: var(--space-1);
}

/* Submit Button */
u-submit-button::part(button),
u-logout-button::part(button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: var(--space-3) var(--space-6);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    font-family: var(--font-family);
    background-color: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-normal);
    min-height: 48px;
}

u-submit-button::part(button):hover,
u-logout-button::part(button):hover {
    background-color: var(--color-accent-hover);
}

/* Newsletter Checkbox */
u-newsletter-checkbox::part(checkbox) {
    width: 20px;
    height: 20px;
    accent-color: var(--color-primary);
}

/* Flash Messages */
u-flash-message::part(success) {
    background-color: #dcfce7;
    color: #166534;
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

u-flash-message::part(error) {
    background-color: #fee2e2;
    color: #991b1b;
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}