/* General styles for the "Inteligentní Ukazatel" page */
body {
    font-family: 'Lato', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #F2F2F2;
    color: #194505;
}
h1, h2, h3, h4, h5, h6, p, a, .navbar, .sidebar, .footer {
    font-family: 'Lato', sans-serif;
}

.main-button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
}

.main {
    padding: 20px;
    padding-top: 20px;
    margin-top: 100px;
}

.stats {
    display: flex;
    flex-direction: row;
    text-align: left;
    margin: 20px 0;
    justify-content: space-between;
    align-items: center;
}

.image-container {
    text-align: center;
}

.custom-image-class {
    max-width: 100%;
    height: auto; /* Make the height auto for responsive scaling */
    border-radius: 10px;
    margin-left: -50%;
}

.button {
    background-color: #3D8F19;
    border: none;
    color: white;
    padding: 10px 24px;
    text-align: center;
    text-decoration: none;
    display: block; /* Ensures it is a block element */
    font-size: 14px;
    margin: 10px 80px 0; /* Adds 20px of space on the left */
    cursor: pointer;
    width: fit-content; /* Fits the button width to its content */
    border-radius: 20px;
}

.cards {
    display: grid;
    gap: 20px;
    padding: 20px;
    margin: 20px auto; /* ZMĚNA: auto pro centrování */
    max-width: 1400px; /* PŘIDÁNO: omezení maximální šířky */
    justify-items: center; /* PŘIDÁNO: centrování grid items */
}

.card {
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 350px;
    max-width: 350px;
    width: 100%; /* ZMĚNA: využije dostupný prostor v gridu */
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-image {
    height: 100px; /* Reduced height */
    width: 100%;
    overflow: hidden;
}

.card-image img {
    height: 100%;
    object-fit: cover; /* Changed to 'cover' to ensure the image fills the space */
    border-radius: 10px;
}

.card-content {
    padding: 0.75rem;
    position: relative;
    height: calc(100% - 100px); /* Subtract image height from total height */
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 2rem; /* Reduced font size */
    font-weight: 600;
    color: #194505;
    position: absolute;
    top: 0.5rem;
    left: 0.75rem;
    right: 0.75rem;
}

.card-text {
    font-size: 1.5rem; /* Reduced font size */
    color: #194505;
    margin-top: 4rem; /* Add margin to push text below the title */
    overflow-y: auto; /* Allow scrolling for overflow text */
    flex-grow: 1;
}

.card-button {
    background-color: #3D8F19;
    border: none;
    color: white;
    padding: 10px 24px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    margin-top: auto;
    cursor: pointer;
    width: fit-content;
    border-radius: 20px;
    margin: 10px auto 0;
}


.card-button:hover {
    background-color: #2f6e13;
}

.text {
    text-align: left;
    font-size: 64px;
    margin-left: 80px; /* Move the text 80px from the left */
    margin-top: 100px;
    max-width: 100%; /* Set maximum width to control the length of lines */
    word-wrap: break-word; /* Allow long words to be broken and wrapped onto the next line */
}

.subtext {
    text-align: left;
    font-size: 26px;
    margin-left: 80px; /* Move the subtext 80px from the left */
    max-width: 65%; /* Set maximum width to control the length of lines */
    word-wrap: break-word; /* Allow long words to be broken and wrapped onto the next line */
}

.custom-text-container {
    padding-right: 50px; /* Adjust padding as needed */
    margin-top: -100px;
}

.product-description {
    margin: 40px 80px; /* Zachování konzistentního odsazení zleva jako u ostatních elementů */
}

.product-item {
    margin-bottom: 30px;
    max-width: 100%;
}

.product-title {
    font-size: 24px;
    font-weight: 600;
    color: #194505;
    margin-bottom: 15px;
}

.product-text {
    font-size: 16px;
    line-height: 1.6;
    color: #194505;
}

/* Úprava numbers-section pro lepší responzivitu */
.numbers-section {
    display: flex;
    justify-content: flex-start; /* Změna na flex-start pro konzistenci s ostatním obsahem */
    align-items: center;
    margin: 10px 0 0 80px; /* Konzistentní odsazení zleva */
}

.number-item {
    text-align: center;
    margin-right: 90px;
}

.big-number {
    font-size: 70px;
    font-weight: bold;
    color: #2c6d0e;
    text-decoration-line: underline;
}

.number-text {
    font-size: 16px;
    color: #194505;
} 



/* Media queries for larger screens */
@media (min-width: 1200px) {
    .stats {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }

    .image-container {
        margin-left: 20px; /* Add margin to the left to align the image properly */
    }
}

@media (min-width: 1200px) {
    .cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
        max-width: 1400px;
        margin: 20px auto;
    }
    
    .card {
        margin: 0 !important;
        max-width: none !important; /* Karty se roztáhnou */
        width: 100%; /* Karta využije celý dostupný prostor */
    }
}

@media (min-width: 1400px) {
    .cards {
        grid-template-columns: repeat(4, 1fr) !important; /* Na ultra širokých 5 sloupců */
        gap: 30px !important;
        width: 90%; /* Celá šířka kontejneru */
        max-width: none; /* Bez omezení šířky */
        margin-left: 55px;
    }
}

@media (min-width: 1600px) {
    .cards {
        grid-template-columns: repeat(4, 1fr) !important; /* Na ultra širokých 5 sloupců */
        gap: 30px !important;
        width: 90%; /* Celá šířka kontejneru */
        max-width: none; /* Bez omezení šířky */
        margin-left: 55px;
    }
}

@media (min-width: 1920px) {
    .cards {
        grid-template-columns: repeat(4, 1fr) !important; /* Na ultra širokých 5 sloupců */
        gap: 20px !important;
        width: 90%; /* Celá šířka kontejneru */
        max-width: none; /* Bez omezení šířky */
        margin-left: 70px;
    }
}

/* Media queries for medium screens */
@media (max-width: 992px) {
    .stats {
        flex-direction: column;
    }

    .cards {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .card {
        flex-basis: 45%; /* Adjust for medium-sized screens */
        width: 48%; /* Adjust width to fit two cards per row */
        margin-bottom: 20px;
    }

    .custom-image-class {
        height: 250px; /* Set the height for larger screens */
        width: auto;
        object-fit: cover; /* Ensure the image covers the container */
    }

    .product-description {
        margin: 30px 40px;
    }
    
    .numbers-section {
        margin: 40px 0 0 40px;
    }

}


@media (min-width: 993px) and (max-width: 1199px) {
    .cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 sloupce místo 1 */
        gap: 30px;
        max-width: 1400px;
        margin: 20px auto;
        justify-items: center;
    }
    
    .card {
        margin: 0;
        max-width: 350px;
        width: 100%;
    }
}
/* Media queries for small screens */
@media (max-width: 768px) {
    .stats {
        margin-top: -30px;
        flex-direction: column;
        align-items: center;
    }

    .cards {
        display: block;
    }

    .card {
        width: 100%;
        margin-bottom: 20px;
        flex-basis: 100%; /* Full width on small screens */
        margin-left: 2px;
    }

    .custom-image-class {
        height: 200px; /* Set the height for larger screens */
        width: auto;
        object-fit: cover; /* Ensure the image covers the container */
    }

    

    .text {
        font-size: 32px;
        margin-left: 20px;
        width: 100%;
    }

    .subtext {
        font-size: 17px; /* Smaller font size for subtext */
        margin-left: 20px;
        max-width: 300px;
    }

    .button {
        margin-left: 20px;
    }


    .main {
        padding: 20px;
        padding-top: 20px;
        margin-top: 100px;
    }

    .product-description {
        margin: 30px 20px;
    }
    
    .product-item {
        max-width: 100%;
    }
    
    .product-title {
        font-size: 20px;
    }
    
    .product-text {
        font-size: 14px;
    }
    
    .numbers-section {
        flex-direction: column;
        margin: 30px 0;
        align-items: center;
    }
    
    .number-item {
        margin: 15px 0;
        text-align: center;
    }
    
    .big-number {
        font-size: 65px;
        font-weight: bold;
        color: #2c6d0e;
        text-decoration-line: underline;
    }
    
    .number-text {
        font-size: 16px;
        color: #194505;
    } 

    .image-container {
        display: flex;
        justify-content: center;
        padding: 0 10px;
        overflow: hidden; /* Zabráníme překročení kontejneru */
    }

    .custom-image-class {
        height: auto;
        max-width: 90%; /* Zvětšeno z 70% */
        width: auto;
        margin-left: 0; /* RESETOVÁNO z -50% */
        margin-right: 0; /* RESETOVÁNO z 240px */
        margin-top: 30px;
        object-fit: contain; /* Zajistí viditelnost celého obrázku */
    }

    
}

.product-button {
    background-color: #3D8F19;
    border: none;
    color: white;
    padding: 10px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 15px 0 0 0; /* Odstraněno boční odsazení, pouze horní margin */
    cursor: pointer;
    width: fit-content;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.product-button:hover {
    background-color: #2f6e13;
}

/* Úprava product-item pro lepší strukturu */
.product-item {
    margin-bottom: 30px;
    max-width: 80%;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Zarovnání všech elementů vlevo */
}

/* Media queries pro responzivní design */
@media (max-width: 768px) {
    .product-button {
        margin: 10px 0 0 0;
        font-size: 13px;
        padding: 8px 20px;
    }
}