/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff6b9d;
    --primary-dark: #e85584;
    --secondary: #c44569;
    --accent: #ffa07a;
    --bg-light: #fff5f8;
    --bg-white: #ffffff;
    --text-dark: #2c3e50;
    --text-gray: #6c757d;
    --text-light: #95a5a6;
    --border: #f0e6ea;
    --shadow-sm: 0 2px 8px rgba(255, 107, 157, 0.08);
    --shadow-md: 0 4px 16px rgba(255, 107, 157, 0.12);
    --shadow-lg: 0 8px 32px rgba(255, 107, 157, 0.16);
    --gradient: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    --gradient-light: linear-gradient(135deg, #ffe5ec 0%, #fff5f8 100%);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Header */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Promotional Spaces */
.promo-block {
    min-height: 90px;
    position: relative;
    margin: 1rem 0;
}

.promo-header, .promo-footer {
    margin: 1rem auto;
    max-width: 1200px;
}

.promo-side {
    display: none;
}

/* Calculator Wrapper */
.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Calculator Card */
.calculator-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    transition: var(--transition);
}

.calculator-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(255, 107, 157, 0.2);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.required {
    color: var(--primary);
    margin-left: 4px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency {
    position: absolute;
    left: 1rem;
    color: var(--text-gray);
    font-weight: 600;
    pointer-events: none;
}

input[type="number"],
input[type="date"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-dark);
    transition: var(--transition);
    background: var(--bg-white);
}

input[type="number"] {
    padding-left: 2.5rem;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

input::placeholder {
    color: var(--text-light);
}

.hint {
    display: block;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.375rem;
}

/* Buttons */
.btn-calculate,
.btn-reset {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-calculate {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow-md);
    margin-top: 1rem;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-reset {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    margin-top: 1.5rem;
}

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

/* Results Section */
.results {
    margin-top: 2rem;
    animation: fadeIn 0.5s ease-in;
}

.results.hidden {
    display: none;
}

.results h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

.results h4 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
}

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

.result-card {
    background: var(--gradient-light);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    border: 2px solid var(--border);
    transition: var(--transition);
}

.result-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.result-card.primary {
    background: var(--gradient);
    color: white;
    border-color: transparent;
}

.result-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.result-card.primary .result-label {
    color: rgba(255, 255, 255, 0.95);
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

/* Breakdown */
.breakdown {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.breakdown-list {
    display: grid;
    gap: 0.75rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.breakdown-category {
    font-weight: 600;
    color: var(--text-dark);
}

.breakdown-amount {
    font-weight: 600;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

/* Progress Bar */
.progress-section {
    margin-top: 2rem;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 12px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: var(--text-gray);
}

/* Content Section */
.content-section {
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    margin: 3rem 0;
    box-shadow: var(--shadow-md);
}

.content-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.content-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
}

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

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

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.content-section strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-note {
    font-size: 0.875rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

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

/* Responsive Design */
@media (min-width: 1024px) {
    .calculator-wrapper {
        grid-template-columns: 160px 1fr 160px;
    }

    .promo-side {
        display: flex;
        min-height: 600px;
    }

    .hero h2 {
        font-size: 3.5rem;
    }

    .subtitle {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .calculator-card {
        padding: 1.5rem;
    }

    .result-cards {
        grid-template-columns: 1fr;
    }

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

    .content-section {
        padding: 2rem 1.5rem;
    }

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

    .content-section h3 {
        font-size: 1.25rem;
    }
}

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

    .logo {
        font-size: 1.25rem;
    }

    .calculator-card {
        padding: 1.25rem;
    }

    input[type="number"],
    input[type="date"] {
        font-size: 0.95rem;
    }
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
