* {
    box-sizing: border-box;
}

body, html {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(to right, #4fa9ca, #b46ec5, #fa853c);
    display: flex;
    flex-direction: column;
    font-family: 'DM Sans', sans-serif;
    overflow: hidden;
    padding: 20px;
}

.app {
    align-items: center;
    display: flex;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    width: 100%;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex; 
    flex-direction: column; 
    gap: 10px;
    margin: 10px auto; 
    padding: 20px;
    text-align: center;
    width: 90%;
    min-height: 350px; 
}

.card__button {
    background-color: #3490dc;
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    display: block; 
    margin: 10px auto; 
    max-width: 300px;
    padding: 10px;
    transition: background-color 0.3s ease;
    width: 90%;
}

.card__button:hover {
    background-color: #2779bd;
}

.card__error-message {
    color: red;
    margin-top: 10px;
}

.card__form {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.card__image {
    border-radius: 8px;
    display: block;
    height: auto;
    margin: 0 auto;
    max-width: 200px;
    width: 80%;
}

.card__image-humidity {
    height: auto;
    max-width: 80px;
    width: 30%;
}

.card__image-temperature {
    height: auto;
    margin: 0 auto;
    width: 50%;
}

.card__input {
    border: 1px solid #b6b2b2;
    border-radius: 8px;
    margin: 0 auto;
    max-width: 300px;
    padding: 10px;
    width: 90%;
}

.card__text {
    color: white;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 16px; 
}

.card__title {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 5px;
}

.card__weather-info {
    display: grid;
    gap: 10px;
    text-align: left;
}

.card__weather-info-item {
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    margin-bottom: 10px;
    padding: 10px;
}

.card--welcome {
    height: auto;
    max-width: 500px;
    width: 90%;
}

.card--weather {
    background: rgba(255, 255, 255, 0.2);
    max-width: 400px;
    padding: 10px;
    width: 100%;
}

.img_home {
    height: auto;
    width: 40%;
}

.slide-in {
    opacity: 0;
    transform: translateX(-100px); 
    transition: all 0.5s ease-in-out; 
}

.slide-in.show {
    opacity: 1;
    transform: translateX(0); 
}

.weather-header__container {
    margin: 0 auto;
    max-width: 1200px;
    position: relative;
}

.weather-header__title {
    color: #fff;
    font-family: Helvetica;
    font-size: 3em;
    font-weight: bold;
    text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 10px 10px rgba(0,0,0,.2), 0 20px 20px rgba(0,0,0,.15);
}

.weather-icon {
    height: 50px;
    margin-right: 15px;
    object-fit: contain;
    width: 50px;
}

.weather-text {
    flex-grow: 1;
}

.weather-text h2 {
    font-size: 1.2em;
    margin: 0;
}

.weather-text p {
    margin: 5px 0 0; 
}

.welcome-card {
    transform: translateY(100%);
    transition: transform 0.5s ease-out;
}

.welcome-card.show {
    transform: translateY(0);
}

#weather-header {
    left: 0;
    padding: 20px 0;
    position: fixed;
    right: 0;
    top: 40px;
}

/* Media queries para dispositivos más pequeños */
@media (max-width: 768px) {
    .card__title {
        font-size: 1.2rem;
        margin-bottom: 5px; 
    }

    .card__text {
        font-size: 0.9rem;
    }

    .card {
        gap: 12px;
        max-width: 350px;
        padding: 10px;
        width: 90%;
        min-height: 350px; 
    }

    .card__image {
        max-width: 180px;
        width: 70%;
    }

    .card--welcome {
        max-width: 400px;
    }

    .card__form {
        margin-top: 5px; 
    }

    .card--weather {
        margin-bottom: 10px; 
    }

    .weather-header__title {
        font-size: 2em; 
    }

    #weather-header {
        display: none;
    }
}

@media (max-width: 480px) {
    .card__title {
        font-size: 1.1rem; 
    }

    .card__text {
        font-size: 0.8rem;
    }

    .card {
        gap: 10px;
        max-width: 300px;
        padding: 0;
        width: 90%;
        min-height: 500px; 
    }

    .card__image {
        max-width: 150px;
        width: 60%;
    }

    .card__button {
        padding: 8px;
    }

    .img_home {
        height: auto;
        width: 60%;
    }

    .weather-header__title {
        font-size: 1.5em; 
    }
}

@media (max-width: 320px) {
    #weather-header {
        display: none;
    }

    .weather-header__title {
        font-size: 1.2em; 
    }
}

/* Ajustes para tablets */
@media (max-width: 1024px) {
    .title {
        font-size: 48px;
        letter-spacing: -3px;
        line-height: 48px;
    }
}

/* Ajustes para dispositivos móviles grandes */
@media (max-width: 768px) {
    .title {
        font-size: 36px;
        letter-spacing: -2px;
        line-height: 36px;
    }
}

/* Ajustes para dispositivos móviles pequeños */
@media (max-width: 480px) {
    .title {
        font-size: 24px;
        letter-spacing: -1px;
        line-height: 24px;
    }
}
.weather-description {
    font-size: 1rem; 
    margin: 5px 0; 
}

@media (max-width: 500px) {
    .weather-description {
        font-size: 0.9rem; 
    }
}

@media (max-width: 300px) {
    .weather-description {
        font-size: 0.8rem; 
    }
}
.weather-title {
    font-size: 1.5rem; 
}

/* Media query para ajustar en dispositivos pequeños */
@media (max-width: 768px) {
    .weather-title {
        font-size: 0.8rem; 
    }
    .card {
        gap: 2px;
    }
}