/* ==========================================
   INTERNETGEMEIN.DE - Online-Taschenrechner
   Estilo profesional y responsive
   ========================================== */

:root {
    --primary-color: #DD0000;
    --primary-dark: #FFCC00;
    --primary-light: #dd6b00;
    --secondary-color: #1f2022;
    --accent-color: #FFCC00;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #000000;
    --text-light: #000000;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 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.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================
   HEADER Y NAVEGACIÓN
   ========================================== */

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

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

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

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.site-title {
    display: flex;
    flex-direction: column;
}

.site-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.site-title .subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
}

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

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

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: white;
    transition: var(--transition);
    transform: translateX(-50%);
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* ==========================================
   CONTAINER Y LAYOUT
   ========================================== */

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

.hero-section {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem;
    margin: 2rem auto;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.8s ease-out;
}

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

.hero-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

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

/* ==========================================
   CALCULADORAS GRID
   ========================================== */

.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.calculator-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: var(--transition);
}

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

.calculator-card:hover::before {
    transform: scaleX(1);
}

.calculator-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

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

.calculator-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.calc-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.calc-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

/* ==========================================
   FORMULARIOS DE CALCULADORA
   ========================================== */

.calculator-page {
    max-width: 800px;
    margin: 2rem auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
}

.calculator-page h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.calculator-description {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin: 2rem 0;
    border-left: 4px solid var(--primary-color);
}

.calculator-description h2 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.calculator-description p,
.calculator-description ul {
    color: var(--text-light);
    line-height: 1.8;
}

.calculator-description ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.calculator-description li {
    margin-bottom: 0.5rem;
}

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

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.result-box {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    margin: 2rem 0;
    text-align: center;
    box-shadow: var(--shadow-md);
    display: none;
    animation: slideInUp 0.4s ease-out;
}

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

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

.result-box h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0;
}

.result-details {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 1rem;
}

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

footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

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

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

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

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
    padding-left: 5px;
}

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

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

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        width: 100%;
        margin-top: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        display: none;
        width: 100%;
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 0.75rem 1rem;
        width: 100%;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        top: 1.5rem;
        right: 2rem;
    }

    .site-title h1 {
        font-size: 1.5rem;
    }

    .hero-section h2 {
        font-size: 2rem;
    }

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

    .calculator-page {
        padding: 2rem 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-section h2 {
        font-size: 1.5rem;
    }

    .calculator-page h1 {
        font-size: 2rem;
    }

    .result-value {
        font-size: 2rem;
    }
}

/* ==========================================
   UTILIDADES
   ========================================== */

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

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

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

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ==========================================
   ANIMACIONES SCROLL
   ========================================== */

.fade-in-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
