/**
 * SALARIUSNET.RO - Calculator Salariu Romania
 * Stylesheet
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #4285f4;
    --secondary: #34a853;
    --accent: #fbbc04;
    --danger: #ea4335;

    /* Romanian Flag Colors */
    --ro-blue: #002B7F;
    --ro-yellow: #FCD116;
    --ro-red: #CE1126;

    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-muted: #80868b;

    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e8eaed;

    --border-color: #dadce0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.2s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

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

a:hover {
    color: var(--primary-dark);
}

/* ========================================
   Header
   ======================================== */
.app-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

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

.romania-flag {
    display: flex;
    height: 16px;
    width: 24px;
    border-radius: 2px;
    overflow: hidden;
    margin-left: 8px;
    box-shadow: var(--shadow-sm);
}

.romania-flag span {
    flex: 1;
}

.romania-flag .blue { background: var(--ro-blue); }
.romania-flag .yellow { background: var(--ro-yellow); }
.romania-flag .red { background: var(--ro-red); }

.header-year {
    background: var(--secondary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

.hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero .lead {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 24px;
}

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

.stat {
    text-align: center;
}

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

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

/* ========================================
   Calculator Section
   ======================================== */
.calculator-section {
    padding: 24px 0;
    margin-top: -20px;
}

.calc-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* ========================================
   Form Elements
   ======================================== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group label .material-icons {
    font-size: 18px;
    color: var(--primary);
}

.form-control,
.form-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.form-control-lg {
    padding: 18px 20px;
    font-size: 1.25rem;
    font-weight: 600;
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

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

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Quick Examples
   ======================================== */
.quick-examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.quick-examples .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-exemplu {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

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

/* ========================================
   Advanced Options
   ======================================== */
.advanced-options {
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.advanced-options summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    cursor: pointer;
    user-select: none;
}

.advanced-options summary::-webkit-details-marker {
    display: none;
}

.advanced-options summary .material-icons {
    font-size: 18px;
}

.advanced-options[open] summary {
    border-bottom: 1px solid var(--border-color);
}

.options-content {
    padding: 16px;
}

/* ========================================
   Calculate Button
   ======================================== */
.btn-calculate {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--secondary) 0%, #2d8a46 100%);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

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

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

/* ========================================
   Result Box
   ======================================== */
.result-box {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid var(--secondary);
    border-radius: var(--radius-md);
    display: none;
}

.result-box.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.result-main {
    text-align: center;
    margin-bottom: 20px;
}

.result-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.result-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.2;
}

.result-period {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.result-annual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: white;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.result-annual .material-icons {
    font-size: 18px;
    color: var(--primary);
}

/* ========================================
   Percent Bar
   ======================================== */
.result-percent {
    margin-bottom: 20px;
}

.percent-bar {
    height: 12px;
    background: var(--danger);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.percent-net {
    height: 100%;
    background: var(--secondary);
    width: 0;
    transition: width 0.5s ease;
}

.percent-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.percent-labels span:first-child strong {
    color: var(--secondary);
}

.percent-labels span:last-child strong {
    color: var(--danger);
}

/* ========================================
   Result Details
   ======================================== */
.result-details,
.employer-cost {
    background: white;
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 16px;
}

.result-details h4,
.employer-cost h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.employer-cost h4 .material-icons {
    font-size: 18px;
    color: var(--text-muted);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-tertiary);
    font-size: 0.875rem;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.detail-label .material-icons {
    font-size: 18px;
    color: var(--text-muted);
}

.detail-value {
    font-weight: 500;
    color: var(--text-primary);
}

.detail-value.negative {
    color: var(--danger);
}

.detail-value.positive {
    color: var(--secondary);
}

.detail-row.deduction {
    background: #fef2f2;
    margin: 0 -16px;
    padding: 10px 16px;
}

.detail-row.bonus {
    background: #f0fdf4;
    margin: 0 -16px;
    padding: 10px 16px;
}

.detail-row.result {
    background: var(--bg-secondary);
    margin: 8px -16px -16px;
    padding: 12px 16px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* ========================================
   Info Section
   ======================================== */
.info-section {
    padding: 40px 0;
}

.info-section.alt {
    background: var(--bg-primary);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background: var(--bg-primary);
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.info-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
}

.info-icon .material-icons {
    font-size: 28px;
    color: white;
}

.info-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.info-rate {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.info-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ========================================
   Formula Box
   ======================================== */
.formula-box {
    background: var(--bg-primary);
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 2px dashed var(--border-color);
}

.formula-box h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.formula {
    background: var(--bg-secondary);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: 12px;
}

.formula-step {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.formula-box p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ========================================
   Salary Table
   ======================================== */
.salary-table {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.salary-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.salary-row:last-child {
    border-bottom: none;
}

.salary-row.header {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
}

.salary-row.highlight {
    background: #f0fdf4;
}

.salary-row.highlight strong {
    color: var(--secondary);
}

.info-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-sm);
}

.info-note .material-icons {
    color: #f59e0b;
    flex-shrink: 0;
}

.info-note p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ========================================
   FAQ Section
   ======================================== */
.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-primary);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.faq-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

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

/* ========================================
   Partners Section
   ======================================== */
.partners-section {
    padding: 40px 0;
    background: var(--bg-primary);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: 1fr;
    }
}

.partner-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
}

.partner-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: white;
}

.partner-card .material-icons {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 12px;
}

.partner-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.partner-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 32px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

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

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: white;
}

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

.footer-bottom p {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 4px;
}

.footer-bottom .disclaimer {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-stats {
        gap: 16px;
    }

    .stat-number {
        font-size: 1.25rem;
    }

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

    .salary-row {
        grid-template-columns: 1.5fr 1fr 1fr;
        font-size: 0.8rem;
        padding: 12px 16px;
    }
}
