/* style.css - Globálny dizajn pre DvaPlusDva */

:root {
    /* Farby */
    --primary: #2563eb;       /* Hlavná modrá */
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;      /* Svetlé pozadie */
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #cbd5e1;
    
    /* Špecifické farby pre kategórie */
    --theme-green: #15803d;   /* Pre mzdu/peniaze */
    --theme-orange: #ea580c;  /* Pre varovania */
}

/* --- 1. ZÁKLAD --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- 2. HLAVIČKA (Podľa náčrtu) --- */
header {
    background: white;
    border-bottom: 2px solid var(--primary);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.logo {
    font-size: 20px;
    font-weight: 800; /* Hrubšie písmo */
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

/* --- 3. OBSAH (Layout) --- */
main {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

/* Užší layout pre kalkulačky, aby sa formulár "nerozlial" */
main.calc-layout {
    max-width: 600px;
}

h1 {
    color: var(--text-main);
    margin-bottom: 10px;
    font-size: 28px;
}

p {
    color: var(--text-muted);
    margin-top: 0;
}

/* --- 4. FORMULÁRE --- */
form {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

label {
    display: block;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 6px;
    font-size: 15px;
    color: var(--text-main);
}

label:first-child {
    margin-top: 0;
}

.small-help {
    display: block;
    font-weight: normal;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

/* Inputy */
input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input:focus, select:focus {
    border-color: var(--primary);
    outline: none;
}

/* Input Wrapper (pre jednotky €/kg vnútri) */
.input-wrapper {
    position: relative;
}

.input-wrapper input {
    padding-right: 40px;
}

.unit {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: bold;
    pointer-events: none;
}

/* Flex row pre inputy vedľa seba (ako na BMI náčrte) */
.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    flex: 1;
}

/* Tlačidlo (Oválne podľa náčrtu) */
button[type="submit"] {
    display: block;
    width: 100%;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 30px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
    transition: transform 0.1s, background-color 0.2s;
}

button[type="submit"]:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* --- 5. VÝSLEDKY --- */
.result-area {
    margin-top: 40px;
    animation: fadeIn 0.5s ease;
}

/* Karta výsledku */
.result-card {
    background: white;
    border: 2px solid var(--text-main); /* Hrubší okraj "Hand-drawn" štýl */
    border-radius: 12px;
    padding: 25px;
    position: relative;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1); /* Ostrý tieň */
}

/* Farebné varianty výsledkov */
.result-card.green-theme { border-color: var(--theme-green); }
.result-card.blue-theme { border-color: var(--primary); }

.result-main h2 {
    margin: 0;
    font-size: 16px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.result-value {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-main);
    margin: 10px 0;
}

/* Tabuľky (pre Mzdu a Hypo) */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 15px;
}

td {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

tr.total td {
    font-weight: bold;
    border-bottom: none;
    border-top: 2px solid var(--text-main);
    padding-top: 15px;
    font-size: 18px;
}

/* --- 6. INFO BOXY & DISCLAIMER --- */
.info-box {
    margin-top: 40px;
    background: #eef2ff; /* Jemná modrá */
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid var(--primary);
}

.info-box h2 {
    font-size: 18px;
    margin-top: 0;
    color: var(--primary);
}

.disclaimer {
    margin-top: 20px;
    font-size: 13px;
    color: #666;
    background: #fafafa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #eee;
}

/* Monetizačný zámok (Podľa náčrtu) */
.lock-feature {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px dashed #e2e8f0;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

/* --- 7. PÄTA --- */
footer {
    border-top: 1px solid var(--border);
    padding: 25px;
    text-align: center;
    background: white;
    margin-top: auto;
    font-size: 14px;
    color: var(--text-muted);
}


/* --- 8. DOMOVSKÁ STRÁNKA (Karty) --- */

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responzívne dlaždice */
    gap: 20px;
    margin-top: 30px;
}

.card {
    background: white;
    border: 2px solid var(--text-main);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.2s, border-color 0.2s;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 6px 6px 0px rgba(37, 99, 235, 0.1);
}

.card h3 {
    margin: 15px 0 5px 0;
    color: var(--primary);
    font-size: 18px;
}

.card small {
    color: var(--text-muted);
    font-size: 14px;
}

.icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

/* --- 9. KOMPAKTNÉ KARTY (Pre TOP 3 - Verzia Extra Mini) --- */

.grid-compact {
    display: grid;
    /* Dovolíme kartám ísť až na šírku 110px, zmestia sa 3 vedľa seba aj na mobile */
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); 
    gap: 10px; /* Menšia medzera medzi kartami */
    margin-bottom: 30px;
}

.card-compact {
    background: white;
    border: 1px solid var(--border); /* Tenší okraj (1px namiesto 2px) */
    border-radius: 6px;   /* Jemnejšie rohy */
    padding: 10px 5px;    /* Minimálna vata (hore/dole 10px, boky 5px) */
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-compact:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 3px 3px 0px rgba(37, 99, 235, 0.1);
}

.card-compact .icon {
    font-size: 20px;      /* Menšia ikona */
    margin-bottom: 3px;   /* Nalepené na nadpis */
    display: block;
    line-height: 1;
}

.card-compact h3 {
    font-size: 13px;      /* Menšie písmo nadpisu */
    margin: 0;
    font-weight: 700;
}

.card-compact small {
    font-size: 10px;      /* Veľmi drobné písmo pre popis */
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1;
    display: block;       /* Ak chceš popis úplne skryť, daj sem: display: none; */
}

/* Štýl pre "Prázdnu kartu" (Placeholder) */
.card.placeholder {
    border-style: dashed;
    border-color: var(--border);
    opacity: 0.6;
    background: transparent;
    box-shadow: none;
    cursor: default;
}

.card.placeholder:hover {
    transform: none;
    border-color: var(--border);
}

.footer-links a {
    color: var(--text-main);
    text-decoration: none;
    margin: 0 10px;
    font-weight: 500;
}

/* Animácia */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Helper pre centy v cene */
.cents { font-size: 0.6em; vertical-align: top; }