body {
    font-family: 'Nunito', sans-serif;
    margin: 40px;
    padding: 20px;
}

h2 {
    font-family: 'Rajdhani', sans-serif;
}

.info-box h2 {
    font-family: 'Oswald', sans-serif;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.highlight {
    font-weight: bold;
    color: #d35400;
}

input,
button {
    padding: 10px;
    margin: 5px;
    margin-left: 0px;
}

#searchQuery {
    width: 60%;
}

#searchResults {
    border: 0px;
    width: 60%;
    padding: 10px;
    margin-top: 0px;
    margin-bottom: 20px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

#searchResults ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#searchResults li {
    padding: 5px;
    cursor: pointer;
}

#searchResults li:hover {
    background-color: #f0f0f0;
}

#renovationRecommendations button {
    margin-top: 10px;
}

.delete-button {
    color: red;
    cursor: pointer;
    font-size: 14px;
    float: right;
}

.LT_corner {
    display: block;
    margin: -60px;
    margin-bottom: -170px;
}

.logo-container {
    display: flex;
    justify-content: right;
    align-items: right;
    margin-bottom: -140px;
    margin-right: 40px;
}

.logo-container img {
    height: 130px;
}

.SA-logo-container {
    display: flex;
    justify-content: right;
    align-items: right;
    margin: 10px;
    margin-bottom: 50px;
}

.SA-logo-container img {
    width: 250px;
}

.info-box {
    border: 0px;
}

.info-box h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.info-box .grid-container {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 5px;
    /* Ridade ja veergude vaheline tühik */
}

.info-box .grid-item {
    padding: 5px 0;
}

.info-box strong {
    font-weight: bold;
}

.info-box .grid-item:nth-child(odd) {
    text-align: right;
    padding-right: 10px;
}

.info-box .grid-item:nth-child(even) {
    background-color: #f1f8fa;
}

#additionalActions button {
    margin-right: 10px;
}

mjx-container[jax="CHTML"][display="true"] {
    text-align: left;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.carousel {
    position: relative;
    width: 600px;
    height: 400px;
    margin: auto;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.slides {
    display: flex;
    width: calc(600px * 7);
    /* 7 images */
    animation: slide 56s infinite ease-in-out;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    -webkit-user-select: none;
}

.slides img {
    width: 600px;
    height: 400px;
    object-fit: contain;
}

@keyframes slide {
    0%      { transform: translateX(0); }        /* Slide 1 */
    14.28%  { transform: translateX(0); }        
    
    28.56%  { transform: translateX(-600px); }   /* Slide 2 */
    42.84%  { transform: translateX(-600px); }   

    57.12%  { transform: translateX(-1200px); }  /* Slide 3 */
    71.40%  { transform: translateX(-1200px); }  

    85.68%  { transform: translateX(-1800px); }  /* Slide 4 */
    100%    { transform: translateX(-1800px); }  

    114.28%  { transform: translateX(-2400px); } /* Slide 5 */
    128.56%  { transform: translateX(-2400px); }  

    142.84%  { transform: translateX(-3000px); } /* Slide 6 */
    157.12%  { transform: translateX(-3000px); }  

    171.40%  { transform: translateX(-3600px); } /* Slide 7 */
    185.68%  { transform: translateX(-3600px); }  

    200%     { transform: translateX(0); }       /* Loop back to Slide 1 */
}

/* Nutiseadmete stiilid (ekraani laius kuni 768px) */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        margin: 5px;
        padding: 5px;
    }

    .LT_corner {
        display: block;
        align-items: left;
        margin: -20px;
        margin-bottom: -170px;
    }

    .logo-container img {
        height: 70px;
    }

    .SA-logo-container {
        display: flex;
        justify-content: right;
        align-items: right;
        margin: 0px;
    }

    .SA-logo-container img {
        width: 250px;
    }
    
    .carousel {
        width: 100%;
        max-width: 100vw;
        height: auto;
        overflow: hidden;
    }

    .slides img {
        width: 100% !important;
        height: 100% !important;
        min-width: 100vw;
    }

    @keyframes slide {
        0%    { transform: translateX(0); } /* Slide 1 */
        14.28% { transform: translateX(0); }
        
        14.29% { transform: translateX(-14.285%); } /* Slide 2 */
        28.57% { transform: translateX(-14.285%); }
        
        28.58% { transform: translateX(-28.57%); } /* Slide 3 */
        42.85% { transform: translateX(-28.57%); }
        
        42.86% { transform: translateX(-42.855%); } /* Slide 4 */
        57.13% { transform: translateX(-42.855%); }
        
        57.14% { transform: translateX(-57.14%); } /* Slide 5 */
        71.41% { transform: translateX(-57.14%); }
        
        71.42% { transform: translateX(-71.425%); } /* Slide 6 */
        85.69% { transform: translateX(-71.425%); }
        
        85.7%  { transform: translateX(-85.71%); } /* Slide 7 */
        100%   { transform: translateX(-85.71%); }
    }
}

/* Nutiseadmete stiilid maastiku režiimis */
@media (max-width: 768px) and (orientation: landscape) {
    .logo-container {
        margin-bottom: -130px;
        margin-right: 60px;
        margin-top: 30px;
    }

    .SA-logo-container {
        margin: 10px;
        margin-bottom: 0px;
    }

    .slides {
        width: calc(100% * 7) !important; /* Force override */
        height: 60vh;
    }
}

/* Nutiseadmete stiilid portree režiimis */
@media (max-width: 768px) and (orientation: portrait) {
    .info-box .grid-container {
        grid-template-columns: 120px 1fr;
    }

    .logo-container {
        margin-bottom: -20px;
        margin-right: -0px;
    }

    .slides {
        width: calc(100% * 7) !important; /* Force override */
        height: 40vh;
    }
}