/* Globální nastavení box-sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Import navbar and footer styles */
@import url("../styles.css");

/* Kalkulačka Background */
.calculator-background {
    width: 100%;
    background-color: #104788;
    padding: 60px 0; /* Optional padding for spacing above and below */
}

.calculator-container {
    max-width: 900px;
    margin: auto;
    padding: 20px;
    background: #f9f9f9; /* Keeps the internal box color */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.calculator-box {
    padding: 20px 10px;
    border-radius: 12px;
    max-width: 800px;
    margin: 10px auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* Odstraněn hover efekt */
}

.calculator-box h2 {
    font-size: 1.8em;
    color: #104788;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}

.strategy-selection {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Zajistí, že strategie se správně přetékají na menších obrazovkách */
}

.input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.input-group {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 1em;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
}

.input-wrapper input[type="text"] {
    background: #f0f4f8;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 1.2em;
    color: #104788;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.input-wrapper input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 5px;
    background: #dce3f0;
    outline: none;
    transition: background 0.3s;
}

.input-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #104788;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
    transition: background 0.3s, transform 0.3s;
}

.input-wrapper input[type="range"]::-webkit-slider-thumb:hover {
    background: #082e5d;
    transform: scale(1.2);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

#investment-period-value {
    font-size: 1.2em;
    color: #104788;
    font-weight: 700;
}

.calculate-button {
    width: 100%;
    padding: 15px;
    background-color: #104788;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.calculate-button:hover {
    background-color: #082e5d;
    transform: translateY(-2px);
}

/* Styl pro strategie */
.strategy {
    flex: 1;
    padding: 20px;
    background-color: #f0f0f0;
    border: 2px solid #104788;
    text-align: center;
    cursor: pointer;
    margin: 0 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.4em;
    transition: background-color 0.3s, border-color 0.3s;
}

.strategy input[type="range"] {
    width: 80%;
    margin-top: 10px;
}

#custom-strategy-value {
    display: block;
    margin-top: 5px;
    font-size: 1.2em;
    font-weight: bold;
}

.strategy.active {
    background-color: #dce3f0;
    border: 2px solid #082e5d;
}

.strategy:hover {
    background-color: #dce3f0;
}

.strategy label {
    display: block;
    margin-bottom: 10px;
}

.form-group select {
    padding: 10px;
    font-size: 1em;
    border: 2px solid #104788;
    border-radius: 5px;
    outline: none;
}

.years-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #104788;
    margin-top: 5px;
}

.years-labels span {
    color: #ccc;
    cursor: pointer;
}

.years-labels span.active {
    color: #104788;
    font-weight: bold;
}

/* Styl pro číselné vstupy bez rámečku a s modrou barvou */
input[type="text"] {
    background: none;
    border: none;
    color: #104788;
    font-weight: bold;
    font-size: 1.4em;
    text-align: center;
    pointer-events: none;
}

#last-name[type="text"],
#first-name[type="text"] {
    background: white;
    pointer-events: auto;
}

input[type="email"],
input[type="tel"] {
    color: #104788;
    font-weight: bold;
    font-size: 1.4em;
    text-align: center;
}

.form-group textarea {
    font-family: 'Fjalla One', sans-serif;
    font-size: 1.4em;
}

/* Styl pro posuvníky */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: linear-gradient(to right, #104788, #67c2ef);
    height: 6px;
    margin-top: 10px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #104788;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #104788;
    cursor: pointer;
}

/* Styl pro vypis let */
.years-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #104788;
    margin-top: 5px;
}

.years-labels span {
    color: #ccc;
    cursor: pointer;
}

.years-labels span.active {
    color: #104788;
    font-weight: bold;
}

/* Styl pro LTV Warning */
.ltv-warning {
    color: red;
    font-weight: bold;
    margin-top: 10px;
    display: none; /* Hide initially */
}

/* Styl pro modal */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto; /* Umožňuje scrollování, pokud je obsah modalu příliš vysoký */
    z-index: 1001; /* Zajišťuje, že modal je nad footerem */
}

.modal.show {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    background: white;
    border-radius: 10px;
    padding: 20px;
    width: 90%;
    max-width: 1300px;
    text-align: left;
    position: relative;
}

.modal-left, .modal-right {
    width: 48%; /* Rozdělení prostoru mezi levý a pravý sloupec */
}

.modal-left h2, .modal-right h2 {
    font-size: 1.5em;
    color: #104788;
    margin-bottom: 15px;
}

.modal-left p, .modal-left #modal-result {
    font-size: 1.1em;
    color: #333;
}

.modal-left #modal-result {
    background-color: #f9f9f9;
    border: 2px solid #104788;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.4em;
    font-weight: bold;
    color: #104788;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    margin-top: 20px;
}

.modal-left #modal-result span {
    display: block; /* Oddělení textu konečné hodnoty od hodnoty */
    font-size: 1.2em;
    color: #333; /* Tmavší text pro menší části */
}

.modal-right form {
    display: flex;
    flex-direction: column;
}

.modal-right .form-row {
    display: flex;
    justify-content: space-between;
}

.modal-right .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0 10px;
}

.modal-right .form-group.full-width {
    flex: 1;
    margin: 0 10px 20px 10px;
}

.modal-right .form-group label {
    font-weight: bold;
    font-size: 1em;
}

.modal-right .form-group input,
.modal-right .form-group textarea {
    padding: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.1em;
    transition: border-color 0.3s;
    width: 100%; /* Zajistí, že vstupy nepřetékají */
}

.modal-right .form-group input:focus,
.modal-right .form-group textarea:focus {
    border-color: #104788;
    outline: none;
}

.modal-right .form-group textarea {
    resize: vertical;
    min-height: 120px;
}

button[type="submit"] {
    padding: 16px 32px;
    background-color: #104788;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.3em;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background-color: #082e5d;
}

/* Styl pro zavírací tlačítko */
.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    cursor: pointer;
    color: #333;
}

/* Styl pro footer */
.site-footer {
    width: 100%;
    background-color: #104788;
    color: white;
    text-align: center;

    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;

    /* Odstraněno position: fixed pro zajištění normálního toku na mobilu */
    /* position: fixed;
    bottom: 0;
    left: 0; */
    z-index: 1000; /* Nižší než modal */
}

.site-footer .footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    width: 100%;
}

.site-footer .footer-item {
    margin: 10px 20px;
}

.site-footer .contact, .site-footer .address {
    display: flex;
    align-items: center;
}

.site-footer .ikonka {
    margin-right: 10px;
}

.social-links a {
    margin: 0 5px;
}

.social-links a img {
    width: 40px;
    height: 40px;
}

/* Responsive Design */

/* Upravena media query pro větší obrazovky (min-width: 769px) */
@media (min-width: 769px) {
    .site-footer {
        position: fixed;
        bottom: 0;
        left: 0;
    }

    /* Přidání padding-bottom do hlavního obsahu, aby se zabránilo překrytí footeru */
    body {
        padding-bottom: 100px; /* Přizpůsobte hodnotu podle výšky footeru */
    }

    /* Styl pro navbar na větších obrazovkách */
    .hamburger {
        display: none; /* Skryje hamburger na větších obrazovkách */
    }

    nav {
        display: block; /* Zobrazí nav na větších obrazovkách */
    }

    .nav-links {
        flex-direction: row;
    }

    .nav-links li {
        margin-left: 40px;
    }
}

/* Upravena media query pro 1200px a méně */
@media (max-width: 1200px) {
    .modal-left, .modal-right {
        width: 100%;
    }

    .modal-content {
        flex-direction: column;
    }

    .modal-left #modal-result {
        margin-top: 20px;
    }

    .strategy-selection {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .strategy {
        margin: 10px 5px;
    }
}

@media (max-width: 768px) {
    .input-row {
        flex-direction: column;
    }

    .input-group {
        margin: 10px 0;
    }

    .modal-content {
        max-width: 90%;
        padding: 15px; /* Snížený padding pro mobilní zařízení */
    }

    .strategy-selection {
        flex-direction: column;
        align-items: center;
    }

    .strategy {
        width: 80%;
        margin: 10px 0;
    }

    .modal-left, .modal-right {
        width: 100%;
    }

    /* Úprava formulářových prvků v modalu pro mobilní zařízení */
    .modal-right .form-row {
        flex-direction: column; /* Zajistí, že se form-row prvky zobrazí vertikálně */
    }

    .modal-right .form-group {
        margin: 10px 0; /* Upravuje margin pro lepší rozložení */
    }

    /* Styl pro hamburger menu na mobilních zařízeních */
    .header-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
    }

    .logo {
        order: 1;
        margin-right: 0;
    }

    .hamburger {
        display: block;
        order: 2;
        font-size: 2em;
        background: none;
        border: none;
        cursor: pointer;
    }

    nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background: white;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    nav.active {
        display: block;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        text-align: left;
        padding: 10px;
        margin: 0;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .nav-links li a {
        display: block;
        padding: 10px;
        width: 100%;
        text-align: left;
    }

    .main-content, .content-wrapper {
        flex-direction: column;
    }

    .main-image {
        order: -1;
        width: 100%;
        margin: 0 auto;
        padding: 10px 0;
    }

    .info-boxes {
        flex-direction: column;
        transform: translateY(0);
        width: 100%;
        padding: 10px 0;
        margin-top: 0;
    }

    .info-box {
        width: 90%;
        margin: 10px auto;
    }

    .profile-section {
        flex-direction: column;
        padding: 20px;
        text-align: center;
    }

    .profile-image img {
        width: 150px;
        height: 150px;
    }

    .card {
        width: 90%;
        margin: 20px 0;
        padding: 15px;
    }

    .site-footer {
        flex-direction: column;
        padding: 20px 10px;
        text-align: center;
    }

    .footer-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-item {
        margin: 10px 0;
    }

    .social-links {
        flex-direction: row;
        justify-content: center;
        margin-top: 10px;
    }

    .social-links a {
        margin: 0 10px;
    }

    .name {
        width: 150px;
    }
}

/* Další vylepšení pro mobilní zařízení */
@media (max-width: 480px) {
    .logo img {
        width: 8em;
    }

    .nav-links {
        font-size: 0.9em;
    }

    .info-box {
        width: 95%;
        padding: 15px;
    }

    .profile-image img {
        width: 120px;
        height: 120px;
    }

    .card {
        padding: 1.5em;
    }

    .social-links img {
        width: 30px;
    }

    /* Zajištění, že modální okno má plnou šířku na malých obrazovkách */
    .modal-content {
        width: 95%;
        max-width: 500px; /* Omezit maximální šířku modalu na menších obrazovkách */
    }
}
