/* Home Page - Wetter-App für Mallorca - Helles Design (wie www.mallorcazeitung.news) */

/* ============================================================================
   Base Styles (Mobile-First)
   ============================================================================ */

/* ============================================================================
   Home Page Specific Styles Only
   ============================================================================ */

/* VERPFLICHTEND: Body overflow-y auto für Scrolling */
body {
    overflow-y: auto !important;
}

/* Margin links/rechts von Kacheln und Reitern zum Bildschirmrand: 1px */
.main-content:has(.home-container) {
    padding-left: 1px;
    padding-right: 1px;
}

.home-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

.home-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-headline-gradient-start), var(--color-headline-gradient-middle), var(--color-headline-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 50px;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 20px;
    text-shadow: 0 2px 4px var(--color-headline-shadow);
}

.home-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-headline-gradient-start), var(--color-headline-gradient-middle), var(--color-headline-gradient-end));
    border-radius: 2px;
    box-shadow: 0 2px 4px var(--color-headline-shadow);
}

/* ============================================================================
   Weather Forecast
   ============================================================================ */

.weather-forecast {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* ============================================================================
   Weather Tabs Navigation
   ============================================================================ */

.weather-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 1px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 20px;
    justify-content: flex-start;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.02), transparent);
    padding: 0 1px 20px 1px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.weather-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px clamp(4px, 0.6vw, 6px);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.weather-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.weather-tab:hover {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.weather-tab:hover::before {
    opacity: 0.3;
}

.weather-tab-active {
    background: linear-gradient(to bottom, rgba(0, 102, 204, 0.12), rgba(0, 102, 204, 0.06));
    border-color: var(--color-primary);
    box-shadow: 0 3px 10px rgba(0, 102, 204, 0.15), 0 1px 3px rgba(0, 102, 204, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.weather-tab-active::before {
    opacity: 1;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.weather-tab-day-name {
    font-size: clamp(0.65rem, 2vw, 0.75rem);
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    white-space: nowrap;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 100%;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
    hyphens: none;
    box-sizing: border-box;
}

.weather-tab-active .weather-tab-day-name {
    color: var(--color-primary);
    text-shadow: 0 1px 2px rgba(0, 102, 204, 0.2);
    font-weight: 800;
}

.weather-tab-date {
    display: none;
    font-size: 0.6rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--color-headline-gradient-start), var(--color-headline-gradient-middle));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.1;
    text-shadow: 0 1px 1px rgba(0, 102, 204, 0.15);
}

.weather-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    transition: transform 0.25s ease;
}

.weather-tab-icon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.weather-tab:hover .weather-tab-icon {
    transform: scale(1.1);
}

.weather-tab-active .weather-tab-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 2px 4px rgba(0, 102, 204, 0.3));
}

.weather-tab-temps {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.weather-tab-temp-max {
    font-size: 0.8rem;
    font-weight: 800;
}

.weather-tab-active .weather-tab-temp-max {
    color: var(--color-primary);
}

.weather-tab-temp-min {
    font-size: 0.65rem;
    color: var(--color-text-secondary);
}

.weather-tab-pop {
    font-size: 0.6rem;
    color: var(--color-text-secondary);
    text-align: center;
    line-height: 1.1;
    font-weight: 600;
    opacity: 0.85;
}

.weather-tab-active .weather-tab-pop {
    color: var(--color-primary);
    opacity: 1;
    font-weight: 700;
}

.weather-tab-content {
    position: relative;
}

.weather-day {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.weather-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.weather-day:hover {
    border-color: var(--color-primary);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.weather-day:hover::before {
    opacity: 1;
}

.weather-day-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0 0 2px 0;
    padding: 2px;
    border-bottom: 2px solid var(--color-border);
    position: relative;
}

.weather-day-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.weather-day:hover .weather-day-header::after {
    width: 100%;
}

.weather-day-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-headline-gradient-start), var(--color-headline-gradient-middle));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.3px;
    text-shadow: 0 1px 3px var(--color-headline-shadow);
}

.weather-day-date {
    font-size: 0.95rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--color-headline-gradient-start), var(--color-headline-gradient-middle));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    padding-left: 12px;
    text-shadow: 0 1px 2px rgba(0, 102, 204, 0.15);
}

.weather-day-date::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, var(--color-headline-gradient-start), var(--color-headline-gradient-middle));
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 102, 204, 0.3);
}

.weather-day-hidden {
    display: none;
}

.weather-day-data {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.weather-item {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(230, 242, 255, 0.15));
    border: 1px solid rgba(0, 102, 204, 0.08);
    border-radius: 0;
    padding: 2px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    position: relative;
    overflow: hidden;
    box-shadow: none;
    flex: 1 1 0;
    min-width: 0;
    max-width: 25%;
    width: 25%;
    margin: 0;
    border-right: 1px solid rgba(0, 136, 255, 0.06);
    height: 100%;
    box-sizing: border-box;
    cursor: default;
    pointer-events: none;
}

.weather-item:last-child {
    border-right: 1px solid var(--color-border);
    border-radius: 0 10px 10px 0;
}

.weather-item:first-child {
    border-radius: 10px 0 0 10px;
}


.weather-item-time {
    font-size: 0.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-headline-gradient-start), var(--color-headline-gradient-middle));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    padding: 2px;
    text-align: center;
    line-height: 1.1;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0, 102, 204, 0.15);
    position: relative;
}

.weather-item-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 2px;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.05), transparent);
    border-radius: 50%;
}

.weather-item-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
}

.weather-item-temp {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin: 0;
    padding: 2px;
    letter-spacing: -0.3px;
    text-shadow: 0 1px 2px rgba(0, 102, 204, 0.1);
    line-height: 1.1;
}

.weather-item-desc {
    font-size: 0.5rem;
    color: var(--color-text);
    text-align: center;
    font-weight: 500;
    margin: 0;
    padding: 2px;
    text-transform: capitalize;
    line-height: 1.1;
    min-height: 2.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.weather-item-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 2px 2px 0 2px;
    border-top: 1px solid rgba(0, 102, 204, 0.1);
    margin-top: auto;
    background: linear-gradient(to bottom, transparent, rgba(0, 136, 255, 0.03));
}

.weather-item-wind,
.weather-item-humidity {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.48rem;
    padding: 2px;
    gap: 2px;
    line-height: 1.1;
    margin: 0;
}

.weather-detail-label {
    color: var(--color-text-secondary);
    font-weight: 400;
    font-size: 0.45rem;
}

.weather-detail-value {
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.48rem;
}


/* ============================================================================
   Responsive Design - Mobile (max-width: 575px)
   ============================================================================ */

@media (max-width: 575px) {
    /* Weather-Tabs auf Mobile: volle Breite, alle Reiter gleich breit */
    .weather-tabs {
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
        gap: 1px;
        padding: 0 1px 20px 1px;
    }
    
    .weather-tab {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        box-sizing: border-box;
        padding: 8px 4px;
        gap: 3px;
    }
    
    .weather-tab-day-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.55rem;
        line-height: 1;
    }
    
    .weather-tab-icon {
        width: 48px;
        height: 48px;
    }
    
    .weather-tab-temps {
        font-size: 0.6rem;
        gap: 1px;
    }
    
    .weather-tab-temp-max {
        font-size: 0.65rem;
    }
    
    .weather-tab-temp-min {
        font-size: 0.55rem;
    }
    
    .weather-tab-pop {
        font-size: 0.5rem;
    }
}

/* ============================================================================
   Responsive Design - Sehr kleine Mobile-Geräte (max-width: 360px)
   ============================================================================ */

@media (max-width: 360px) {
    .weather-tabs {
        gap: 1px;
        padding: 0 1px 20px 1px;
    }

    .weather-tab {
        padding: 6px 2px;
        flex: 1 1 0;
        min-width: 0;
    }

    .weather-tab-day-name {
        font-size: 0.5rem;
        letter-spacing: -0.01em;
    }
    
    .weather-tab-icon {
        width: 42px;
        height: 42px;
    }
    
    .weather-tab-temps {
        font-size: 0.55rem;
    }
    
    .weather-tab-temp-max {
        font-size: 0.6rem;
    }
    
    .weather-tab-temp-min {
        font-size: 0.5rem;
    }
    
    .weather-tab-pop {
        font-size: 0.45rem;
    }
}

/* ============================================================================
   Responsive Design - Tablet/iPad (min-width: 600px)
   ============================================================================ */

@media (min-width: 600px) {

    .home-title {
        font-size: 2.5rem;
        margin-bottom: 60px;
    }
    
    .home-title::after {
        width: 100px;
    }

    .weather-tabs {
        gap: 1px;
    }

    .weather-tab {
        padding: 12px 8px;
        gap: 5px;
        flex: 1 1 0;
        min-width: 0;
    }

    .weather-tab-day-name {
        font-size: 0.75rem;
        overflow: visible;
        white-space: nowrap;
    }

    .weather-tab-date {
        display: block;
        font-size: 0.65rem;
        font-weight: 600;
        background: linear-gradient(135deg, var(--color-headline-gradient-start), var(--color-headline-gradient-middle));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        line-height: 1.1;
        text-shadow: 0 1px 1px rgba(0, 102, 204, 0.15);
    }

    .weather-tab-icon {
        width: 48px;
        height: 48px;
    }

    .weather-tab-temps {
        font-size: 0.85rem;
        gap: 2px;
    }

    .weather-tab-temp-max {
        font-size: 0.9rem;
    }

    .weather-tab-temp-min {
        font-size: 0.75rem;
    }

    .weather-tab-pop {
        font-size: 0.65rem;
    }

    .weather-day-data {
        gap: 0;
    }

    .weather-item {
        padding: 2px;
        gap: 2px;
    }

    .weather-item-time {
        font-size: 0.7rem;
        font-weight: 700;
        background: linear-gradient(135deg, var(--color-headline-gradient-start), var(--color-headline-gradient-middle));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: 0.05em;
    }

    .weather-item-icon {
        width: 65px;
        height: 65px;
    }

    .weather-item-temp {
        font-size: 1.4rem;
    }

    .weather-item-desc {
        font-size: 0.6rem;
    }

    .weather-item-details {
        gap: 4px;
        padding-top: 6px;
    }

    .weather-item-wind,
    .weather-item-humidity {
        font-size: 0.58rem;
    }

    .weather-detail-label {
        font-size: 0.55rem;
    }

    .weather-detail-value {
        font-size: 0.58rem;
    }
}

/* ============================================================================
   Responsive Design - Kleiner Desktop/13-Zoll (min-width: 1024px)
   ============================================================================ */

@media (min-width: 1024px) {

    .home-title {
        font-size: 3rem;
        margin-bottom: 70px;
    }
    
    .home-title::after {
        width: 120px;
    }

    .weather-tabs {
        gap: 1px;
    }

    .weather-tab {
        padding: clamp(12px, 1.4vw, 16px) clamp(10px, 1.1vw, 14px);
        gap: clamp(5px, 0.7vw, 9px);
        flex: 1 1 0;
        min-width: 0;
    }

    .weather-tab-day-name {
        font-size: clamp(0.75rem, 0.9vw, 0.95rem);
    }

    .weather-tab-date {
        font-size: clamp(0.6rem, 0.7vw, 0.75rem);
    }

    .weather-tab-icon {
        width: clamp(45px, 5vw, 60px);
        height: clamp(45px, 5vw, 60px);
    }

    .weather-tab-temps {
        font-size: clamp(0.85rem, 1.05vw, 1.05rem);
    }

    .weather-tab-temp-max {
        font-size: clamp(0.9rem, 1.15vw, 1.1rem);
    }

    .weather-tab-temp-min {
        font-size: clamp(0.75rem, 0.9vw, 0.85rem);
    }

    .weather-tab-pop {
        font-size: clamp(0.65rem, 0.75vw, 0.75rem);
    }

    .weather-day-data {
        gap: 0;
    }

    .weather-item {
        padding: 2px;
        gap: 2px;
    }

    .weather-item-time {
        font-size: 0.85rem;
        font-weight: 700;
        background: linear-gradient(135deg, var(--color-headline-gradient-start), var(--color-headline-gradient-middle));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: 0.05em;
    }

    .weather-item-icon {
        width: 75px;
        height: 75px;
    }

    .weather-item-temp {
        font-size: 1.8rem;
    }

    .weather-item-desc {
        font-size: 0.65rem;
    }

    .weather-item-details {
        gap: 6px;
        padding-top: 10px;
    }

    .weather-item-wind,
    .weather-item-humidity {
        font-size: 0.65rem;
    }

    .weather-detail-label {
        font-size: 0.6rem;
    }

    .weather-detail-value {
        font-size: 0.65rem;
    }
    
    .weather-day {
        padding: 2px;
    }
}

/* ============================================================================
   Responsive Design - Großer Desktop/Widescreen (min-width: 1440px)
   ============================================================================ */

@media (min-width: 1440px) {
    .weather-tabs {
        gap: 1px;
    }

    .weather-tab {
        padding: clamp(14px, 1.6vw, 18px) clamp(12px, 1.3vw, 16px);
        gap: clamp(6px, 0.9vw, 11px);
        flex: 1 1 0;
        min-width: 0;
    }

    .weather-tab-day-name {
        font-size: clamp(0.8rem, 1vw, 1rem);
    }

    .weather-tab-date {
        font-size: clamp(0.7rem, 0.8vw, 0.8rem);
    }

    .weather-tab-icon {
        width: clamp(50px, 6vw, 66px);
        height: clamp(50px, 6vw, 66px);
    }

    .weather-tab-temps {
        font-size: clamp(0.95rem, 1.15vw, 1.15rem);
    }

    .weather-tab-temp-max {
        font-size: clamp(1rem, 1.25vw, 1.2rem);
    }

    .weather-tab-temp-min {
        font-size: clamp(0.8rem, 0.95vw, 0.9rem);
    }

    .weather-tab-pop {
        font-size: clamp(0.7rem, 0.8vw, 0.8rem);
    }

    .weather-day-data {
        gap: 0;
    }

    .weather-item {
        padding: 2px;
        gap: 2px;
    }

    .weather-item-time {
        font-size: 0.95rem;
        font-weight: 700;
        background: linear-gradient(135deg, var(--color-headline-gradient-start), var(--color-headline-gradient-middle));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: 0.05em;
    }

    .weather-item-icon {
        width: 65px;
        height: 65px;
    }

    .weather-item-temp {
        font-size: 2.2rem;
    }

    .weather-item-desc {
        font-size: 0.7rem;
    }

    .weather-item-details {
        gap: 8px;
        padding-top: 12px;
    }

    .weather-item-wind,
    .weather-item-humidity {
        font-size: 0.7rem;
    }

    .weather-detail-label {
        font-size: 0.65rem;
    }

    .weather-detail-value {
        font-size: 0.7rem;
    }
    
    .weather-day {
        padding: 2px;
    }
}
