/* ========================================
   BRUTTOBERECHNER.DE - Material Design
   Mobile-First Styles
   ======================================== */

:root {
    --primary: #1976d2;
    --primary-dark: #115293;
    --primary-light: #4791db;
    --secondary: #00acc1;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --text-primary: #212121;
    --text-secondary: #757575;
    --background: #f5f5f5;
    --surface: #ffffff;
    --shadow-1: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-2: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-3: 0 8px 16px rgba(0,0,0,0.2);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

/* ========================================
   MOBILE HEADER
   ======================================== */
.app-header {
    background: var(--surface);
    box-shadow: var(--shadow-1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
}

.app-header .container {
    height: 100%;
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.logo .material-icons {
    color: var(--primary);
    font-size: 28px;
}

.logo-text {
    font-weight: 300;
}

.logo-text b {
    font-weight: 700;
    color: var(--primary);
}

.menu-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 50%;
    transition: background 0.2s;
}

.menu-toggle:active {
    background: rgba(0,0,0,0.1);
}

/* ========================================
   MOBILE NAVIGATION
   ======================================== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--surface);
    z-index: 1100;
    transition: right 0.3s ease;
    box-shadow: var(--shadow-3);
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.nav-header {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
    gap: 12px;
}

.nav-header .material-icons {
    color: var(--primary);
}

.nav-header span:last-of-type {
    flex: 1;
    font-weight: 500;
}

.close-nav {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 50%;
}

.nav-list {
    list-style: none;
    padding: 8px 0;
}

.nav-list li a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
}

.nav-list li a:active,
.nav-list li a.active {
    background: rgba(25, 118, 210, 0.1);
    color: var(--primary);
}

.nav-list li a .material-icons {
    color: var(--text-secondary);
}

.nav-list li a.active .material-icons {
    color: var(--primary);
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 100px 0 40px;
    text-align: center;
}

.hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.hero .lead {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ========================================
   QUICK CALCULATOR
   ======================================== */
.quick-calc {
    margin-top: -20px;
    padding: 0 16px;
    position: relative;
    z-index: 10;
}

.calc-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-2);
    overflow: hidden;
}

.card-header {
    background: var(--primary);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header h2 {
    font-size: 1.125rem;
    margin: 0;
    font-weight: 500;
}

.card-body {
    padding: 20px;
}

/* Form Groups - Custom class to avoid Bootstrap conflict */
.form-group,
.input-group.custom-input {
    display: block !important;
    flex-wrap: unset !important;
    margin-bottom: 20px;
}

.form-group label,
.input-group.custom-input label {
    display: block !important;
    width: 100% !important;
    font-size: 0.9375rem;
    color: #424242;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group .form-control,
.form-group .form-select,
.input-group.custom-input .form-control,
.input-group.custom-input .form-select {
    flex: none !important;
    width: 100% !important;
}

.form-control,
.form-select {
    width: 100%;
    padding: 16px;
    font-size: 16px; /* Prevents zoom on iOS */
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--surface);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.btn-calculate {
    width: 100%;
    padding: 16px;
    font-size: 1.125rem;
    font-weight: 500;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-1);
}

.btn-calculate:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* ========================================
   RESULT BOX
   ======================================== */
.result-box {
    margin-top: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    border: 2px dashed #e0e0e0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item span {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.result-item strong {
    font-size: 1.125rem;
    color: var(--text-primary);
}

.result-item.net strong {
    color: var(--success);
    font-size: 1.5rem;
}

.result-item.deductions strong {
    color: var(--danger);
}

.result-percentage {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #e0e0e0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.result-percentage span {
    font-weight: 700;
    color: var(--primary);
}

/* ========================================
   CALCULATOR TILES
   ======================================== */
.calculators {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    font-size: 1.375rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.calc-tile {
    display: block;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-1);
    transition: all 0.2s;
    height: 100%;
}

.calc-tile:active {
    transform: scale(0.98);
    box-shadow: none;
}

.tile-icon {
    width: 56px;
    height: 56px;
    background: rgba(25, 118, 210, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.tile-icon .material-icons {
    color: var(--primary);
    font-size: 28px;
}

.calc-tile h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 500;
}

.calc-tile p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ========================================
   FEATURES
   ======================================== */
.features {
    padding: 40px 0;
    background: white;
}

.feature-list {
    max-width: 600px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item .material-icons {
    color: var(--primary);
    font-size: 28px;
}

.feature-item h3 {
    font-size: 1.0625rem;
    margin-bottom: 4px;
    font-weight: 500;
}

.feature-item p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ========================================
   NEWS PREVIEW
   ======================================== */
.news-preview {
    padding: 40px 0;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-1);
}

.news-date {
    font-size: 0.8125rem;
    color: var(--primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card h3 {
    font-size: 1.0625rem;
    margin: 8px 0;
    font-weight: 500;
    color: var(--text-primary);
}

.news-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0 0 12px;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

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

/* ========================================
   FOOTER
   ======================================== */
.app-footer {
    background: var(--text-primary);
    color: rgba(255,255,255,0.7);
    padding: 40px 0 24px;
    margin-top: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    color: white;
    font-size: 1.25rem;
}

.footer-brand b {
    color: var(--primary-light);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.footer-nav a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-nav a:active {
    color: white;
}

.footer-disclaimer {
    font-size: 0.8125rem;
    text-align: center;
    padding: 16px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.copyright {
    text-align: center;
    font-size: 0.8125rem;
    opacity: 0.6;
}

/* ========================================
   TABLET & DESKTOP
   ======================================== */
@media (min-width: 768px) {
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .lead {
        font-size: 1.25rem;
    }
    
    .quick-calc {
        margin-top: -40px;
        padding: 0 24px;
    }
    
    .calc-card {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .calc-tile {
        padding: 24px;
    }
    
    .tile-icon {
        width: 64px;
        height: 64px;
    }
    
    .tile-icon .material-icons {
        font-size: 32px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 24px;
}

.container {
    padding-left: 16px;
    padding-right: 16px;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

/* Touch feedback for mobile */
@media (hover: none) {
    .calc-tile:active,
    .btn-calculate:active,
    .btn-outline-primary:active {
        transform: scale(0.98);
    }
}
