/* ================================================
   internetgemein.de - Online-Taschenrechner
   Profesionales Stylesheet mit responsivem Design
   ================================================ */

:root {
    --primary-color: #DD0000;
    --primary-dark: #FFCC00;
    --primary-light: #dd6b00;
    --secondary-color: #eed704;
    --accent-color: #FFCC00;
    --text-color: #000000;
    --text-light: #000000;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --success-color: #27ae60;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ================================================
   HEADER & NAVIGATION
   ================================================ */

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 2rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--secondary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: var(--transition);
}

/* ================================================
   HERO SECTION
   ================================================ */

.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.95;
}

/* ================================================
   MAIN CONTENT
   ================================================ */

main {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.intro-section {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

/* ================================================
   CALCULATOR GRID
   ================================================ */

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.calculator-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease backwards;
}

.calculator-card:nth-child(1) { animation-delay: 0.1s; }
.calculator-card:nth-child(2) { animation-delay: 0.15s; }
.calculator-card:nth-child(3) { animation-delay: 0.2s; }
.calculator-card:nth-child(4) { animation-delay: 0.25s; }
.calculator-card:nth-child(5) { animation-delay: 0.3s; }
.calculator-card:nth-child(6) { animation-delay: 0.35s; }

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: left 0.5s ease;
}

.calculator-card:hover::before {
    left: 100%;
}

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

.calculator-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.calculator-card:hover .calculator-icon {
    transform: scale(1.2) rotate(5deg);
}

.calculator-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.calculator-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ================================================
   CALCULATOR PAGE STYLES
   ================================================ */

.calculator-container {
    max-width: 800px;
    margin: 2rem auto;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease;
}

.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid var(--secondary-color);
}

.calculator-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 2.2rem;
}

.calculator-header p {
    color: var(--text-light);
    font-size: 1.05rem;
}

.calculator-body {
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--text-light) 0%, #555 100%);
}

.btn-full {
    width: 100%;
    margin-top: 1rem;
}

.result-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    border-left: 5px solid var(--success-color);
    animation: slideInRight 0.5s ease;
    display: none;
}

.result-box.show {
    display: block;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.result-box h3 {
    color: var(--success-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.result-box .result-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

.result-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(39, 174, 96, 0.3);
}

.result-details p {
    margin: 0.5rem 0;
    color: var(--text-color);
}

/* ================================================
   INFO SECTION
   ================================================ */

.info-section {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 3rem;
    border: 1px solid var(--border-color);
}

.info-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.info-section h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.info-section p {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.info-section ul,
.info-section ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.info-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* ================================================
   FOOTER
   ================================================ */

footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    line-height: 1.8;
    opacity: 0.9;
}

.footer-nav ul {
    list-style: none;
}

.footer-nav li {
    margin-bottom: 0.8rem;
}

.footer-nav a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.9;
}

.footer-nav a:hover {
    color: var(--secondary-color);
    opacity: 1;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

/* ================================================
   UTILITY CLASSES
   ================================================ */

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

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        padding: 1rem;
    }

    nav {
        display: none;
        width: 100%;
        order: 3;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .menu-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .calculator-container {
        padding: 1.5rem;
        margin: 1rem;
    }

    .calculator-header h1 {
        font-size: 1.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    main {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .result-box .result-value {
        font-size: 1.5rem;
    }
}

/* ================================================
   PRINT STYLES
   ================================================ */

@media print {
    header,
    footer,
    .btn {
        display: none;
    }

    body {
        background: white;
    }

    .calculator-container {
        box-shadow: none;
    }
}

/* ================================================
   ACCESSIBILITY
   ================================================ */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* ================================================
   LOADING ANIMATION
   ================================================ */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
