/* Weather Widget Premium Styles */
.weather-widget {
    position: absolute;
    top: 100px;
    /* Aligned better with header */
    right: 5%;
    padding: 15px 25px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: 'Inter', sans-serif;
    color: white;
    z-index: 100;

    /* Glassmorphism Base */
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);

    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: slideInDown 1s ease-out forwards;
    cursor: pointer;
    overflow: hidden;
}

.weather-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    pointer-events: none;
}

.weather-widget:hover::before {
    left: 100%;
}

.weather-widget:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Icons Wrapper */
.weather-icon-wrapper {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.weather-icon {
    font-size: 2.8rem;
    color: #fff;
    transition: transform 0.3s ease;
}

.weather-widget:hover .weather-icon {
    transform: scale(1.1);
}

/* Info Section */
.weather-info {
    display: flex;
    flex-direction: column;
}

.weather-temp {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: 'Outfit', sans-serif;
    /* Using the clean header font */
}

.weather-meta {
    display: flex;
    flex-direction: column;
    margin-top: 5px;
}

.weather-desc {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 1;
    text-transform: capitalize;
}

.weather-location {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.weather-location i {
    color: var(--secondary, #f1c40f);
}

/* Weather Specific Styles */
/* Sunny */
.weather-widget.sunny .weather-icon {
    color: #FFD700;
    animation: spin 12s linear infinite;
}

.weather-widget.sunny {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 255, 255, 0.15));
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Cloudy (Default-ish but improved) */
.weather-widget.cloudy .weather-icon {
    color: #dfe6e9;
    /* White-ish gray */
    animation: float 3s ease-in-out infinite;
}

/* Rainy */
.weather-widget.rainy .weather-icon {
    color: #74b9ff;
    animation: float 4s ease-in-out infinite;
}

.weather-widget.rainy {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* Stormy */
.weather-widget.stormy .weather-icon {
    color: #a29bfe;
    animation: flash 2s infinite;
}

.weather-widget.stormy {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(108, 92, 231, 0.3);
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes flash {

    0%,
    100% {
        opacity: 1;
        filter: brightness(100%);
    }

    50% {
        opacity: 0.7;
        filter: brightness(150%);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .weather-widget {
        top: 90px;
        right: 20px;
        padding: 12px 20px;
    }

    .weather-temp {
        font-size: 2rem;
    }

    .weather-icon {
        font-size: 2.2rem;
    }
}

@media (max-width: 600px) {
    .weather-widget {
        position: relative;
        top: 0;
        right: auto;
        left: auto;
        margin: 20px auto 0;
        width: 90%;
        max-width: 320px;
        justify-content: center;
        background: rgba(255, 255, 255, 0.15);
        /* Slightly less opaque on mobile for bg visibility */
    }

    #weather-widget-container {
        width: 100%;
        display: flex;
        justify-content: center;
        padding-top: 100px;
        /* Push down below absolute header */
        position: absolute;
        top: 0;
        left: 0;
        z-index: 10;
    }

    /* Adjust hero content so it doesn't overlap on mobile */
    .hero-content {
        margin-top: 160px;
    }
}