/* general styles */
html {
    height: 100%;
}
body{
    height: 70%;
}
/* ------------------------------------- */

/* === TYPOGRAPHY === */
h1 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(20px, 4vw, 24px);
    font-weight: 700;
    line-height: 1.2;
}

p {
    font-family: 'Inter', sans-serif;
    font-size: clamp(16px, 2.5vw, 18px);
    font-weight: 500;
    line-height: 1.5;
}

small {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
}
/* ------------------------------------- */

/* === MAIN LAYOUT === */
main{
    margin: 1em 3em;
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2em;
}

/* === LEFT SECTION === */
.leftMain{
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin: 3em;
}

#WelcomeText{
    margin: 2em 0em;
}
/* === FORMS === */
form{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
    width: 100%;
}

input{
    width: 60%;
    height: 50px;
    margin: 0.5em 0em;
    padding: 0.5em 1em;
    border-radius: var(--border-radius, 12px);
    border: 2px solid transparent;
    background-color: #ebebeb;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-duration, 200ms) ease;
}

input:focus {
    outline: none;
    border-color: var(--blue, #2c418e);
    background-color: white;
    box-shadow: 0 0 0 2px rgba(44, 65, 142, 0.1);
}

input:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
    background-color: #fff5f5;
}

input:valid:not(:placeholder-shown) {
    border-color: var(--green, #3d814d);
    background-color: #f0fff4;
}

button{
    width: 38%;
    height: 50px;
    margin: 0.5em 0em;
    padding: 0.5em;
    border-radius: var(--border-radius, 12px);
    border: 1px solid #ebebeb;
    background-color: var(--orange, orange);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-duration, 200ms) ease;
}

button:hover, button:active, button:focus{
    background-color: var(--blue, #2c418e);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

button:focus-visible {
    outline: 2px solid var(--blue, #2c418e);
    outline-offset: 2px;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
/* ------------------------------------- */

/* === RIGHT SECTION === */
.rightMain{
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.fourBlocks{
    margin: 2em 0em;
    width: 100%;
    height: 70px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.5em;
}

.block{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    height: 100%;
    background-color: #f3f3f3;
    margin: 0.3em;
    padding: 0.8em;
    border-radius: 8px;
    transition: all var(--transition-duration, 200ms) ease;
    border: 1px solid transparent;
}

.block:hover {
    background-color: #e9e9e9;
    border-color: var(--orange, orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#graph{
    width: 100%;
    border-radius: 8px;
}
/* ------------------------------------- */



/* === FOOTER === */
footer{
    left: 3em;
    position: fixed;
    bottom: 20px;
    width: 100%;
}

footer a {
    color: var(--blue, #2c418e);
    text-decoration: underline;
    transition: color var(--transition-duration, 200ms) ease;
}

footer a:hover {
    color: var(--orange, orange);
}

/* === RESPONSIVE DESIGN === */
@media only screen and (max-width: 900px) {
    main{
        flex-direction: column;
        gap: 1em;
        margin: 1em 2em;
    }
    
    html {
        height: auto;
    }
    
    .rightMain{
        width: 90%;
    }
    
    .leftMain{
        width: 90%;
        margin: 2em 0;
    }
    
    form {
        flex-direction: column;
        gap: 1em;
    }
    
    input, button {
        width: 100%;
    }
        
    footer {
        left: 1em;
        right: 1em;
        position: relative;
        bottom: auto;
        margin-top: 2em;
        text-align: center;
    }
}

@media only screen and (max-width: 600px) {
    main {
        margin: 1em;
    }
    
    .fourBlocks {
        flex-direction: column;
        height: auto;
        gap: 0.5em;
    }
    
    .block {
        margin: 0.2em 0;
        min-height: 50px;
    }
    
    footer {
        left: 1em;
        right: 1em;
        position: relative;
        bottom: auto;
        margin-top: 2em;
        text-align: center;
    }
}