/**
 * Weather Location Hero Styles
 * FINAL REFINEMENT: Moving Clouds Added + Full Screen Background Fix
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Cormorant+Garamond:wght@300;400;500&family=Birthstone&display=swap');

/* Container and Base Layout */
.angie-weather-hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    font-family: 'Cormorant Garamond', serif;
    text-align: center;
    background-color: #050505;
    --awh-tint: rgba(0,0,0,0.5);
    --awh-tint2: rgba(0,0,0,0.8);
}

/* Background Layers */
.awh-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; /* Ensure no tiling */
    transition: opacity 1s ease-in-out;
    z-index: 0;
    opacity: 0;
}

.angie-weather-hero.ken-burns-active .awh-bg-layer {
    animation: awh-ken-burns 30s alternate infinite;
}

@keyframes awh-ken-burns {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(-2%, -1%); }
}

/* Overlay */
.awh-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.6) 100%),
        linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

/* Canvas */
.awh-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* === MOVING CLOUDS === */
.awh-moving-clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3; /* Above canvas, below content */
    pointer-events: none;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.awh-moving-clouds.active {
    opacity: 1;
}

.awh-cloud-item {
    position: absolute;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    opacity: 0.8;
}

/* Cloud 1: Slow, top right */
.awh-cloud-1 {
    top: 5%;
    right: -20%;
    width: 60%;
    height: 40%;
    animation: awh-float-1 80s linear infinite;
    opacity: 0.7;
}

/* Cloud 2: Medium speed, middle left */
.awh-cloud-2 {
    top: 25%;
    left: -10%;
    width: 80%;
    height: 50%;
    animation: awh-float-2 65s linear infinite reverse;
    opacity: 0.6;
}

/* Cloud 3: Slower, bottom area */
.awh-cloud-3 {
    bottom: 10%;
    left: 10%;
    width: 70%;
    height: 40%;
    animation: awh-float-3 90s linear infinite;
    opacity: 0.5;
}

@keyframes awh-float-1 {
    0% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-10%) translateY(5%); }
    100% { transform: translateX(0) translateY(0); }
}

@keyframes awh-float-2 {
    0% { transform: translateX(0) scale(1); }
    50% { transform: translateX(15%) scale(1.1); }
    100% { transform: translateX(0) scale(1); }
}

@keyframes awh-float-3 {
    0% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-15%) translateY(-5%); }
    100% { transform: translateX(0) translateY(0); }
}

/* Cloud Haze (Legacy/Fog) */
.awh-cloud-haze {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(200,200,200,0) 0%, rgba(200,200,200,0.1) 100%);
    opacity: 0;
    transition: opacity 2s ease;
    pointer-events: none;
}
.awh-cloud-haze.active { opacity: 0.3; }


/* Content Container */
.awh-content {
    position: relative;
    z-index: 4;
    max-width: 900px;
    width: 100%;
    padding: 2rem;
    animation: awh-fade-up 1s ease-out forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: -20px;
}

/* Typography & Elements */

/* 1. Location Pill */
.awh-location-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 100px;
    padding: 8px 24px;
    margin-bottom: 32px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.awh-icon-location { display: none; }

.awh-flag {
    margin-right: 12px;
    font-size: 1.2em;
    line-height: 1;
    filter: sepia(0.2) grayscale(0.2);
}

/* 2. Global Greeting (Birthstone Font) */
.awh-global-greeting {
    font-family: 'Birthstone', cursive !important;
    font-style: normal;
    font-weight: 400;
    font-size: 38px;
    color: #dcbfa5;
    opacity: 0.9;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    line-height: 1.2;
}

/* 3. City Name */
.awh-city-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(60px, 10vw, 110px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.01em;
    margin: 0 0 48px 0;
    color: #ffffff;
    text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

/* 4. Info Grid */
.awh-info-grid {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
    width: 100%;
}

.awh-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.awh-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #8c8c8c;
    font-weight: 500;
    margin-bottom: 12px;
}

.awh-value {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 0.02em;
}

/* 5. Greeting Text */
.awh-greeting {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 400;
    color: rgba(255,255,255,0.85);
    line-height: 1.5;
    margin: 0 auto 60px;
    max-width: 600px;
    min-height: 1.5em; 
}

/* 6. Explore Section */
.awh-explore {
    width: 100%;
    padding-top: 40px;
    border-top: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Title Styles */
.awh-explore-title {
    font-family: 'Playfair Display', serif; 
    font-style: normal;
    font-weight: 700;
    font-size: 22px; 
    color: #ffffff; 
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    opacity: 1; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* CHIPS - FORCE PILL STYLE */
.awh-city-chips {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px;
    margin-bottom: 40px;
    max-width: 800px;
    width: 100%;
    justify-items: center;
}

.awh-city-chip {
    background: transparent !important; 
    border: 1px solid rgba(255,255,255,0.2) !important; 
    border-radius: 100px !important; 
    padding: 8px 16px !important;
    color: rgba(255,255,255,0.6) !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 17px !important; /* UPDATED: Increased to 17px */
    font-weight: 400 !important;
    letter-spacing: 0.05em !important;
    text-transform: capitalize !important; 
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100% !important;
    min-width: 0 !important;
    text-align: center !important;
    box-shadow: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.awh-city-chip:hover {
    background: rgba(255,255,255,0.05) !important;
    border-color: rgba(255,255,255,0.5) !important;
    color: #fff !important;
    transform: translateY(-2px);
}

/* SEARCH - FORCE MINIMAL STYLE */
.awh-city-search {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 20px;
    width: 100%;
    max-width: 320px;
    border-bottom: 1px solid rgba(255,255,255,0.15); 
    padding-bottom: 4px;
}

.awh-city-input {
    background: transparent !important;
    border: none !important;
    padding: 10px 0 !important;
    color: #fff !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 16px !important;
    font-weight: 300 !important;
    letter-spacing: 0.05em !important;
    flex-grow: 1;
    outline: none !important;
    text-align: left !important;
    width: auto !important;
}

.awh-city-input::placeholder {
    color: rgba(255,255,255,0.25) !important;
    font-style: italic;
}

.awh-city-submit {
    background: transparent !important;
    border: none !important;
    padding: 10px 12px !important;
    color: #dcbfa5 !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase !important;
    cursor: pointer;
    transition: all 0.3s;
    min-width: auto !important;
    box-shadow: none !important;
}

.awh-city-submit:hover {
    color: #fff !important;
    transform: none !important;
}

/* BACK BUTTON */
.awh-back-to-detected {
    background: transparent !important; 
    border: 1px solid rgba(255,255,255,0.3) !important; 
    border-radius: 100px !important; 
    padding: 10px 28px !important;
    color: rgba(255,255,255,0.8) !important; 
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    cursor: pointer;
    transition: all 0.3s !important;
    min-width: auto !important;
    box-shadow: none !important;
    margin-top: 30px !important; 
}

.awh-back-to-detected:hover {
    background: rgba(255,255,255,0.1) !important; 
    color: #fff !important; 
    border-color: #fff !important;
    transform: translateY(-2px) !important;
}

/* Loader */
.awh-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease-out;
}

.awh-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.awh-spinner {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.1);
    border-top-color: #dcbfa5;
    border-radius: 50%;
    animation: awh-spin 1s linear infinite;
}

@keyframes awh-spin {
    to { transform: rotate(360deg); }
}

@keyframes awh-fade-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Tweaks */
@media (max-width: 768px) {
    .awh-city-name { font-size: 50px; margin-bottom: 32px; }
    .awh-info-grid { gap: 24px; }
    .awh-city-chips { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 8px; 
    }
    .awh-city-chip { padding: 6px 12px !important; font-size: 14px !important; } /* Adjusted mobile size slightly */
    .awh-city-search { width: 80%; }
    .awh-global-greeting { font-size: 28px; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .awh-bg-layer, .awh-content, .awh-spinner, .awh-moving-clouds, .awh-cloud-item {
        animation: none;
        transition: none;
    }
}
