/* ==========================================================
   Forecast-Specific Styles
   This file contains styling related to the daily and hourly forecast views,
   IMS data, and premium placeholders for forecast elements.

   REVISED: Unified card design with final polishing based on feedback.
   ========================================================== */

/* ==========================================================
   Brief Forecast View & IMS Data
   ========================================================== */
.brief-forecast-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    width: 100%;
    margin: 0 auto;
    border-radius: 5px;
}
.brief-forecast-container .title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--theme-text-accent-primary);
    width: 100%;
    text-align: center;
}

/* Unified Brief Card Styles */
.unified-brief-card {
    display: flex;
    direction: rtl;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
    align-items: stretch; /* KEY: Ensures both cards are equal height */
}

/* ==========================================================
   UNIFIED CARD STYLES (AI Summary & IMS Data)
   ========================================================== */

/* Base style for both IMS and AI cards */
.station-data-compact,
.ai-summary-main {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-right-width: 5px; /* Define the accent border width */
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    box-sizing: border-box;
}

/* IMS Station Data Card - FINAL HORIZONTAL & COMPACT LAYOUT */
.station-data-compact {
    flex-basis: 45%;
    flex-shrink: 0;
    flex-direction: row; /* ** CHANGED: Horizontal layout ** */
    flex-wrap: wrap; /* Allows footer to wrap to a new line */
    align-items: center; /* Vertically align temp and params */
    justify-content: center; /* Horizontally center content */
    gap: 15px 20px; /* row-gap column-gap */
    text-align: center;
    border-right-color: #adb5bd; /* Neutral grey accent border */
}

/* AI Summary Card - REVISED to use flexbox for cleaner layout */
.ai-summary-main {
    flex-grow: 1;
    flex-direction: column;
    border-right-color: #adb5bd; /* Default neutral accent */
    transition: box-shadow 0.2s ease-in-out;
    width: 100%; /* Ensure it takes full width in all contexts */
    text-align: right; /* Ensure text aligns correctly in RTL */
    padding: 20px; /* Reset padding for proper flexbox layout */
    display: flex; /* **NEW** - Use flexbox for layout control */
    justify-content: space-between; /* **NEW** - Push the footer to the bottom */
}

/* Special highlighted version for the AI summary */
.ai-summary-main.ai-highlight-box {
    border-right-color: #ff8331; /* Purple accent to make it stand out */
    box-shadow: 0 6px 20px rgba(115, 76, 255, 0.15);
}


/* ==========================================================
   IMS Station Data - Inner Content Styling
   ========================================================== */
.ims-hero-temp {
    order: 1;
    font-size: 2.8em;
    font-weight: 700;
    color: #2d3748;
    line-height: 1;
}

.ims-hero-unit {
    font-size: 0.4em;
    font-weight: 400;
    color: #718096;
    vertical-align: super;
    margin-right: 2px;
}

.ims-secondary-params {
    order: 2;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 18px;
}

.ims-secondary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #4A5568;
}

.ims-secondary-item i {
    font-size: 1.4em;
    margin-bottom: 5px;
    color: #718096;
}

.ims-secondary-value {
    font-size: 0.85em;
    font-weight: 500;
    white-space: nowrap;
}

.ims-station-footer {
    order: 3;
    flex-basis: 100%; /* Takes full width, forcing it to a new line */
    font-size: 0.75em;
    color: #a0aec0;
    margin-top: 15px; /* Creates space from content above */
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    width: 100%;
}

.station-data-compact .ims-loading-placeholder {
    font-style: italic;
    color: #a0aec0;
    width: 100%;
}


/* ==========================================================
   AI Summary Box - Inner Content Styling
   ========================================================== */
.ai-summary-main h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05em;
    font-weight: 600;
    margin: 0 0 12px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    color: #4A5568;
}

.ai-summary-main h3 .fa-robot {
    color: #734cff;
}

.ai-summary-main p {
    font-size: 0.95em;
    line-height: 1.6;
    color: #4A5568;
    flex-grow: 1; /* Allows paragraph to fill vertical space */
    margin: 0 0 20px 0; /* Add margin bottom to separate from footer */
}

.ai-summary-main.ai-highlight-box h3,
.ai-summary-main.ai-highlight-box p {
    color: #2d3748;
}

.ai-summary-main strong {
    color: #ff8331;
    font-weight: 600;
}
.ai-summary-main .ai-loading-placeholder {
    font-style: italic;
    color: #a0aec0;
}

/* ==========================================================
   AI Forecast Footer Styles - REVISED
   ========================================================== */
/* The entire footer element is now treated as a separate block within the card. */
.ai-balloon-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    background-color: rgba(255, 255, 255, 0.5); /* Semi-transparent white for the glass effect */
    -webkit-backdrop-filter: blur(10px); /* For Safari support */
    backdrop-filter: blur(10px); /* The main blur effect */
    border-radius: 0 0 12px 12px; /* Rounded corners only on the bottom */
    position: sticky;
    bottom: 0;
    margin: -20px; /* Compensate for the card's padding and align with edges */
    margin-top: 20px; /* Add margin above to separate from content */
    z-index: 10; /* Ensure it stays above other content */
}

/* Style for the copy button */
.ai-copy-btn {
    background-color: #ff8331; /* A nice purple */
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.8em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* Hover and active states for the copy button */
.ai-copy-btn:hover {
    background-color: #9c3535; /* A darker purple */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.ai-copy-btn:active {
    transform: translateY(0);
}

/* Container for the persona and detail level tags */
.ai-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-grow: 1; /* Allows it to take up available space */
}

/* Style for individual tags */
.ai-tag {
    color: white;
    font-size: 0.7em; /* Slightly smaller font for a cleaner look */
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1.2;
    transition: transform 0.2s ease;
}

.ai-tag:hover {
    transform: translateY(-1px);
}


/* ==========================================================
   Chart Styles (Brief & Daily) - UPDATED
   ========================================================== */

/* NEW: Wrapper to enable horizontal scrolling on smaller screens */
.chart-scroll-wrapper {
    overflow-x: auto;
    /* Removed -webkit-overflow-scrolling as it is not supported */
    width: 100%;
    padding: 2px;
}

/* Brief Graph - UPDATED to match card style */
.brief-graph-container {
    width: 100%;
    height: clamp(180px, 45vw, 280px); /* Slightly increased height for padding */
    position: relative;
    margin-bottom: 20px;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    box-sizing: border-box;
    min-width: 600px; /* Force horizontal scroll */
     flex-shrink: 0;
}

#briefChart { max-width: 100%; height: 100%; }

#briefSummary {
    text-align: center;
    font-weight: 500;
    margin-top: 8px;
    font-size: 0.85em;
    color: #718096;
}
#briefSummary .temp-high { color: var(--ims-temp-color-hot); }
#briefSummary .temp-low { color: var(--ims-temp-color-cold); }
#briefSummary .precip-total { color: var(--theme-accent-primary-medium); }

/* Daily Forecast View */
.day-forecast {
    border-radius: 6px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; padding: 0; margin: 0 auto; width: 100%;
}
.day-forecast h2 { font-size: 1.2em; margin-top: 0; width: 100%; text-align: center; margin-bottom: 10px; color: var(--theme-text-accent-primary); }
.daily-forecast-container { margin-bottom: 15px; padding: 0; text-align: center; width: 100%; }

/* Daily Periods Section */
.daily-periods-section {
    margin-bottom: 20px;
    width: 100%;
}
.table-scroll-wrapper { width: 100%; overflow-x: auto; margin-bottom: 15px; }
.daily-forecast-table { width: 100%; border-collapse: collapse; border-radius: 5px; overflow: hidden; border: 1px solid var(--theme-border-tertiary-darkest); font-size: 0.85em; min-width: 550px; }

.daily-forecast-table th {
    background-color: var(--theme-accent-bg-subtle);
    color: var(--theme-text-accent-primary);
    font-weight: 600;
    border-bottom-width: 2px;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom-color: var(--theme-border-accent);
    padding: 7px 4px;
    text-align: center;
    white-space: nowrap;
}
.daily-forecast-table td {
    padding: 7px 4px;
    text-align: center;
    border-bottom: 1px solid var(--theme-border-tertiary-darkest);
    white-space: nowrap;
}
.daily-forecast-table tbody tr:last-child td { border-bottom: none; }

.daily-forecast-table tbody tr {
    color: var(--theme-text-primary-lightest);
}
.daily-forecast-table tbody tr:nth-child(odd) {
    background-color: var(--table-row-dark-odd-premium);
    color: var(--table-text-on-dark-row-premium);
}
.daily-forecast-table tbody tr:nth-child(even) {
    background-color: var(--table-row-dark-even-premium);
    color: var(--table-text-on-dark-row-premium);
}
.daily-forecast-table tbody tr:nth-child(odd) td,
.daily-forecast-table tbody tr:nth-child(even) td {
    color: var(--table-text-on-dark-row-premium);
}

.daily-period-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.daily-period-icon-container .icon-base {
    width: 50px;
    height: 50px;
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
    margin-bottom: 2px;
}
.daily-forecast-emoji { font-size: 1.6em; display: block; margin-bottom: 2px; }
.daily-forecast-desc { font-size: 0.8em; display: block; line-height: 1.25; white-space: normal; }
.premium-placeholder-mini {
    font-size: 0.7em;
    color: var(--theme-accent-highlight-medium);
    font-weight: 500;
    text-align: center;
    white-space: normal;
    display: block;
    margin-top: 5px;
}

/* ==========================================================
   Daily Extreme Data Section - FULLY REVISED AND CORRECTED
   ========================================================== */
.daily-extreme-data-section {
    width: 100%;
    padding: 0; /* Remove padding from the parent */
    border: none; /* Remove border from the parent */
    box-shadow: none; /* Remove shadow from the parent */
    margin-top: 20px;
}

/* Container for all Extreme Data Cards - REVISED LAYOUT */
.extremes-cards-container {
    display: grid;
    gap: 8px; /* Reduced gap for a tighter feel */
    width: 100%;
    
    /* MOBILE (Default): 2 on top, 4 on bottom (dense) */
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
        "temp-max temp-max temp-min temp-min"
        "other-1  other-2  other-3  other-4";
}

/* Assign cards to their grid areas for mobile layout */
.extremes-cards-container .temp-max { grid-area: temp-max; }
.extremes-cards-container .temp-min { grid-area: temp-min; }
.extremes-cards-container .extreme-data-card:not(.temp-max):not(.temp-min):nth-of-type(1) { grid-area: other-1; }
.extremes-cards-container .extreme-data-card:not(.temp-max):not(.temp-min):nth-of-type(2) { grid-area: other-2; }
.extremes-cards-container .extreme-data-card:not(.temp-max):not(.temp-min):nth-of-type(3) { grid-area: other-3; }
.extremes-cards-container .extreme-data-card:not(.temp-max):not(.temp-min):nth-of-type(4) { grid-area: other-4; }


/* DESKTOP: 6 columns, wider in the middle */
@media (min-width: 1024px) {
    .extremes-cards-container {
        gap: 12px; /* A bit more space on desktop */
        grid-template-areas: none; /* Reset areas */
        /* 6 columns: 1fr 1fr 1.5fr 1.5fr 1fr 1fr */
        grid-template-columns: 1fr 1fr 1.5fr 1.5fr 1fr 1fr;
    }
    /* Reset individual area assignments for desktop */
    .extremes-cards-container .extreme-data-card {
        grid-area: auto !important;
    }
}

/* Individual Card Styling - REVISED THEME */
.extreme-data-card {
    background-color: #203245; /* Dark background like hourly cards */
    border: none; /* NO BORDER */
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* Subtle shadow for depth */
}

.extreme-data-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.3); /* Stronger shadow on hover */
}

.extreme-card-label {
    font-size: 0.75em; /* Slightly smaller label */
    font-weight: 500;
    color: var(--theme-text-quaternary-medium); /* Light grey text for label */
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.extreme-card-value {
    font-size: 1em; /* Adjusted size */
    font-weight: 600;
    color: var(--hourly-card-text-premium); /* Main bright text color */
}

/* Special styling for prominent temperature cards */
.extreme-data-card.temp-max .extreme-card-value,
.extreme-data-card.temp-max .extreme-card-label {
    color: #ff8a80; /* A nice light red for max temp */
}

.extreme-data-card.temp-min .extreme-card-value,
.extreme-data-card.temp-min .extreme-card-label {
    color: #82b1ff; /* A nice light blue for min temp */
}


/* ==========================================================
   Hourly Forecast (Existing Styles)
   ========================================================== */

/* Hourly Controls - New Section */
.hourly-controls-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 15px;
    padding: 10px 15px;
    border-top: 1px solid var(--theme-border-primary-light);
    border-bottom: 1px solid var(--theme-border-primary-light);
    background-color: var(--theme-bg-primary-darkest);
    border-radius: 8px;
    box-shadow: var(--theme-shadow-light);
}

.hourly-list-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Toggle Switch Styling */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--theme-border-secondary-darker); transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--theme-accent-primary-medium); }
input:focus + .slider { box-shadow: 0 0 1px var(--theme-accent-primary-medium); }
input:checked + .slider:before { transform: translateX(20px); }
.toggle-label { font-size: 0.85em; color: var(--theme-text-secondary-lighter); font-weight: 500; }

.hourly-toggle-button { display: inline-block; padding: 7px 12px; font-size: 0.85em; font-weight: 500; text-align: center; cursor: pointer; border: 1px solid var(--theme-accent-primary-medium); border-radius: 4px; background-color: var(--theme-bg-primary-darker); color: var(--theme-accent-primary-medium); transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease; }
.hourly-toggle-button:hover { background-color: var(--theme-accent-primary-lighter); color: var(--theme-text-on-accent); transform: translateY(-1px); }
.hourly-toggle-button:focus { outline: 2px solid var(--theme-accent-primary-medium); outline-offset: 2px; }

[id^="hourly-forecast-container-"] { margin-top: 0; width: 100%; }

.hourly-item-wrapper { background-color: var(--hourly-card-bg-premium); color: var(--hourly-card-text-premium); border: 1px solid var(--theme-border-tertiary-darkest); border-radius: 5px; margin-bottom: 6px; font-size: 0.9em; overflow: hidden; transition: box-shadow 0.2s ease-in-out, transform 0.2s ease; }
.hourly-item-wrapper:hover:not(.premium-placeholder) { box-shadow: 0 2px 8px var(--theme-shadow-strong); transform: translateY(-2px); }

.hourly-summary { display: flex; align-items: center; padding: 8px 10px; cursor: pointer; transition: background-color 0.2s ease; justify-content: flex-start; gap: 10px; direction: rtl; }
.hourly-summary:hover:not(.premium-placeholder .hourly-summary) { background-color: rgba(255, 255, 255, 0.1); }
.hourly-summary:focus { outline: 2px solid var(--theme-accent-primary-medium); outline-offset: -2px; }
.hourly-summary > span { display: flex; align-items: center; padding: 0 4px; flex-shrink: 0; }
.hourly-summary .hour { font-weight: 600; text-align: right; margin-left: 8px; color: var(--hourly-card-text-premium); }
.hourly-summary .condition { display: flex; align-items: center; gap: 6px; justify-content: flex-start; flex-grow: 1; direction: rtl; }
.hourly-summary .condition .icon-base { width: 20px; height: 20px; background-size: contain; background-repeat: no-repeat; flex-shrink: 0; }
.hourly-summary .condition .condition-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--hourly-card-text-premium); }
.hourly-summary .temp { font-weight: 600; text-align: left; margin-left: auto; color: var(--hourly-card-text-premium); }
.hourly-summary .expand-arrow { font-size: 0.75em; color: var(--theme-text-quaternary-medium); flex-basis: 18px; text-align: left; transition: transform 0.2s ease; }
.hourly-summary.active .expand-arrow { transform: rotate(180deg); }


/*
   ==========================================================
   START OF MODIFIED HOURLY DETAILS SECTION
   ==========================================================
*/

/* 1. שינוי הרקע של כל האזור הנפתח לרקע בהיר מאוד והסרת הגבול העליון */
.hourly-details {
    background-color: #f8f9fa; /* רקע אפרפר בהיר מאוד */
    border-top: none; /* הסרת הגבול העליון */
    padding: 12px; /* ריווח פנימי נקי */
}

.hourly-details.hidden { 
    display: none; 
}

.hourly-params-table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 4px; 
    margin-top: 4px; 
}

/* 2. עיצוב כל תא פרמטר ככרטיס נפרד: רקע לבן, צללית, ללא גבולות */
.hourly-params-table td {
    background-color: #ffffff; /* רקע לבן לכל "כרטיס" פרמטר */
    border: none; /* הסרת הגבולות לחלוטין */
    border-radius: 6px; /* פינות מעט מעוגלות יותר */
    padding: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08); /* צללית עדינה */
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* אנימציה חלקה להובר */
    text-align: center;
    font-size: 0.8em;
    vertical-align: top;
}

/* 3. הוספת אפקט ריחוף (hover) לכל כרטיס פרמטר */
.hourly-params-table td:hover {
    transform: translateY(-2px); /* הרמה קלה של הכרטיס */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12); /* צללית מודגשת יותר */
    cursor: pointer;
}

/* 4. התאמת צבעי הטקסט לרקע הבהיר החדש */
.hourly-params-table .param-label {
    display: block;
    font-size: 0.85em;
    font-weight: 500;
    color: #6c757d; /* צבע אפור כהה-בינוני לתווית */
    margin-bottom: 1px;
}

.hourly-params-table .param-value {
    display: block;
    font-size: 0.95em;
    font-weight: 500;
    color: #212529; /* צבע שחור-אפרפר לערך עצמו */
}

/*
   ==========================================================
   END OF MODIFIED HOURLY DETAILS SECTION
   ==========================================================
*/


.premium-param-value { background-color: var(--theme-accent-highlight-lighter); color: var(--theme-text-on-highlight); font-weight: bold; padding: 2px 5px; border-radius: 4px; display: inline-block; }

.heatmap-link { margin-top: 8px; text-align: center; font-size: 0.8em; }
.heatmap-link a { color: var(--theme-accent-primary-medium); text-decoration: none; transition: color 0.2s ease, transform 0.1s ease; }
.heatmap-link a:hover { color: var(--theme-accent-primary-lighter); text-decoration: underline; transform: translateY(-1px); }
.heatmap-link a:focus { outline: 2px solid var(--theme-accent-primary-medium); outline-offset: 2px; border-radius: 4px; }

/* Hourly Graph Wrapper - updated to card style */
.hourly-graph-wrapper {
    margin: 8px 0;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.hourly-graph-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}
.hourly-graph-controls label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8em;
    cursor: pointer;
    color: #4A5568;
    transition: color 0.2s ease;
}
.hourly-graph-controls label:hover {
    color: #2d3748;
}
.hourly-graph-controls input[type="checkbox"] {
    cursor: pointer;
    accent-color: #734cff;
    transform: scale(0.9);
}
input[type="checkbox"]:focus { outline: 2px solid #734cff; outline-offset: 2px; }

.hourly-graph-container {
    height: clamp(160px, 50vw, 260px);
    position: relative;
    min-width: 600px; /* Force horizontal scroll */
    flex-shrink: 0;
}
[id^="hourlyChart-day-"] {
    max-width: 100%;
    height: 100%;
}

/* ==========================================================
   Premium Placeholder Styles (Existing)
   ========================================================== */
.hourly-item-wrapper.premium-placeholder { background-color: var(--theme-bg-primary-medium); border: 1px dashed var(--theme-border-primary-dark-medium); cursor: default; opacity: 0.7; }
.hourly-item-wrapper.premium-placeholder:hover { box-shadow: none; opacity: 0.8; transform: none; }
.hourly-item-wrapper.premium-placeholder .hourly-details { display: none; }

.premium-notice { padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--theme-text-tertiary-medium-light); font-size: 0.85em; text-align: right; background-color: var(--theme-bg-primary-darkest); border-top: 1px solid var(--theme-border-primary-light); border-radius: 0 0 6px 6px; }
.premium-notice .hour { font-weight: 600; flex-shrink: 0; color: var(--theme-text-secondary-lighter); }
.premium-notice .premium-icon { font-size: 1.1em; color: var(--theme-accent-highlight-medium); margin: 0 4px; flex-shrink: 0; }
.premium-notice .premium-text { flex-grow: 1; font-weight: 500; }
.premium-notice .premium-link { flex-shrink: 0; text-decoration: none; color: var(--theme-text-on-accent); background-color: var(--theme-accent-primary-medium); padding: 5px 10px; border-radius: 4px; font-size: 0.8em; font-weight: 600; transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease; }
.premium-notice .premium-link:hover { background-color: var(--theme-accent-primary-lighter); box-shadow: 0 1px 2px var(--theme-shadow-light); transform: translateY(-1px); }
.premium-notice .premium-link:focus { outline: 2px solid var(--theme-accent-primary-medium); outline-offset: 2px; }

.tab.premium-day-tab { color: var(--theme-text-quaternary-medium); border-bottom-style: dashed !important; border-bottom-color: var(--theme-accent-highlight-medium) !important; opacity: 0.7; cursor: help; }
.tab.premium-day-tab:hover { color: var(--theme-text-tertiary-medium-light); opacity: 0.85; border-bottom-color: var(--theme-accent-highlight-lighter) !important; }
.tab.premium-day-tab.active { font-weight: 500; color: var(--theme-text-tertiary-medium-light); opacity: 1; border-bottom-color: var(--theme-accent-highlight-medium) !important; }

.daily-forecast-container.premium-placeholder-daily,
p.premium-placeholder-daily { padding: 15px; text-align: center; font-weight: 500; color: var(--theme-text-tertiary-medium-light); background-color: var(--theme-bg-primary-medium); border: 1px dashed var(--theme-border-primary-dark-medium); border-radius: 6px; margin-top: 10px; opacity: 0.8; }
.daily-forecast-table td .premium-text-small { font-size: 0.8em; color: var(--theme-text-quaternary-medium); }

/* ==========================================================
   General Premium Content Placeholder
   ========================================================== */
/* ==========================================================
   General Premium Content Placeholder - V5 Professional Theme
   ========================================================== */

/* Keyframes for the floating blobs animation (No changes here) */
@keyframes blob-animation {
  0% { background-position: 0% 50%, 50% 100%, 100% 0%; }
  25% { background-position: 0% 0%, 80% 80%, 100% 50%; }
  50% { background-position: 50% 0%, 100% 100%, 0% 100%; }
  75% { background-position: 100% 0%, 20% 20%, 0% 50%; }
  100% { background-position: 0% 50%, 50% 100%, 100% 0%; }
}

/* Main container with animation */
.premium-explanation {
    padding: 20px;
    text-align: center;
    border: 1px solid #ffe8cc;
    border-radius: 16px;
    margin-top: 15px;
    box-shadow: 0 10px 25px rgba(255, 165, 0, 0.1);
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
    background-image:
        radial-gradient(circle at center, rgba(255, 197, 128, 0.5) 0%, rgba(255, 197, 128, 0) 50%),
        radial-gradient(circle at center, rgba(255, 165, 0, 0.4) 0%, rgba(255, 165, 0, 0) 60%),
        radial-gradient(circle at center, rgba(255, 222, 173, 0.5) 0%, rgba(255, 222, 173, 0) 70%);
    background-repeat: no-repeat;
    background-size: 400px 400px, 300px 300px, 500px 500px;
    animation: blob-animation 20s linear infinite;
}

.premium-explanation::before { display: none; }

/* Main content box with the frosted glass effect */
.premium-explanation > * {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.5); /* More opaque for better readability */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 30px;
    border-radius: 12px;
}

/* Main Title - Styled as a quote */
.premium-explanation h2 {
    color: #1a1a1a;
    font-size: 1.7em;
    font-weight: 700;
    font-style: italic; /* Italic for a quote feel */
    margin: 15px 0 20px 0;
    position: relative;
    padding: 0 20px; /* Space for quote marks */
}

/* The quote marks ::before and ::after */
.premium-explanation h2::before,
.premium-explanation h2::after {
    content: '"';
    position: absolute;
    font-size: 3em;
    color: rgba(255, 165, 0, 0.25); /* Soft orange quote marks */
    font-style: normal;
    line-height: 1;
}

.premium-explanation h2::before {
    top: -10px;
    right: -5px;
}

.premium-explanation h2::after {
    bottom: -25px;
    left: -5px;
}


/* Subtitle / intro paragraph */
.premium-explanation p {
    margin: 0 0 30px 0; /* More space before the list */
    color: #333333;
    line-height: 1.6;
    font-size: 1.05em;
    max-width: 500px; /* Better readability */
    margin-left: auto;
    margin-right: auto;
}

/* Container for the feature list */
.premium-explanation .feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

/* Styling for each feature item */
.premium-explanation .feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background: transparent;
    border: none;
}

.premium-explanation .feature-item:last-child {
    margin-bottom: 0;
}

/* Styling for the professional Font Awesome icon */
.premium-explanation .feature-icon {
    font-size: 1.6em;
    color: #ff8c00;
    margin-left: 20px;
    width: 35px; /* Fixed width for alignment */
    text-align: center;
    flex-shrink: 0;
}

/* Container for the text part of the feature */
.premium-explanation .feature-text {
    display: flex;
    flex-direction: column;
}

/* Styling for the feature title */
.premium-explanation .feature-title {
    font-weight: 700;
    font-size: 1.1em;
    color: #1a1a1a;
}

/* Styling for the feature description */
.premium-explanation .feature-description {
    font-size: 0.9em;
    color: #4a4a4a;
    line-height: 1.5;
}

/* Styling for the call-to-action button */
.premium-explanation .button {
    margin-top: 35px;
    padding: 14px 28px;
    font-size: 1.15em;
    font-weight: 700;
    border-radius: 8px;
    background-color: #ff8c00;
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
    transition: all 0.3s ease;
}

.premium-explanation .button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.6);
}

/* Resetting old styles to prevent conflicts */
.premium-explanation ul, .premium-explanation ul li, .premium-explanation ul li::before {
    all: unset;
}
/* ==========================================================
   Responsive Adjustments (Existing)
   ========================================================== */
@media (max-width: 767px) {
    /* --- כללים כלליים לכרטיסי הבריף במובייל --- */
    .unified-brief-card {
        flex-direction: column; /* שומר על עמודה */
        gap: 10px; /* **שינוי**: הקטנת המרווח האנכי בין כרטיסי IMS ו-AI */
        margin-bottom: 15px; /* **שינוי**: הקטנת המרווח מתחת לכרטיס המאוחד */
    }
    
    /* --- הקטנה משמעותית של כרטיס נתוני IMS --- */
    .station-data-compact {
        padding: 15px; /* **שינוי**: הקטנת הריפוד הפנימי של כרטיס ה-IMS */
        gap: 10px 15px; /* **שינוי**: הקטנת המרווחים בתוך כרטיס ה-IMS */
    }

    /* הקטנת גודל הגופן לטמפרטורה הראשית ב-IMS */
    .ims-hero-temp {
        font-size: 2.2em; /* **שינוי**: הקטנת גופן הטמפרטורה הראשית */
    }
    .ims-hero-unit {
        font-size: 0.35em; /* **שינוי**: הקטנת גופן היחידה */
    }

    /* הקטנת גודל הגופן לפריטים המשניים ב-IMS */
    .ims-secondary-item i {
        font-size: 1.2em; /* **שינוי**: הקטנת אייקונים משניים */
    }
    .ims-secondary-value {
        font-size: 0.8em; /* **שינוי**: הקטנת ערכים משניים */
    }
    .ims-secondary-params {
        gap: 15px; /* **שינוי**: הקטנת המרווח בין הפרמטרים המשניים */
    }

    /* הקטנת גודל הגופן לפוטר התחנה ב-IMS */
    .ims-station-footer {
        font-size: 0.7em; /* **שינוי**: הקטנת גופן הפוטר */
        margin-top: 10px; /* **שינוי**: הקטנת מרווח עליון לפוטר */
    }

    /* ... (שאר קוד ה-media query הקיים ללא שינוי, למשל) ... */
    .brief-forecast-container .title { font-size: 1.05em; }
    .daily-extreme-data-section, .ai-summary-main, .station-data-compact {
        flex-basis: auto;
        width: 100%;
        margin-bottom: 15px;
    }
    .daily-extreme-data-section h3 { font-size: 0.95em; }
    .table-scroll-wrapper { overflow-x: auto; }
    .daily-forecast-table { font-size: 0.8em; min-width: 0; }
    .daily-forecast-table th, .daily-forecast-table td { padding: 6px 4px; }
    .daily-forecast-emoji { font-size: 1.5em; }
    .daily-forecast-desc { font-size: 0.75em; }
    .hourly-toggle-button { padding: 6px 10px; font-size: 0.8em; }
    .hourly-item-wrapper { font-size: 0.85em; margin-bottom: 8px; }
    .hourly-summary { padding: 7px 9px; }
    .hourly-summary .hour { font-size: 0.9em; flex-basis: 50px; }
    .hourly-summary .condition { font-size: 0.8em; }
    .hourly-summary .temp { font-size: 0.95em; flex-basis: 50px; }
    
    /* Responsive adjustments for the new hourly details card */
    .hourly-params-table td { 
        padding: 6px 8px; 
        font-size: 0.75em; 
    }
    .hourly-params-table .param-label { 
        font-size: 0.8em; 
    }
    .hourly-params-table .param-value { 
        font-size: 0.9em; 
    }

    .hourly-params-table .premium-param-value { padding: 1px 4px; font-size: 0.9em; }
    .heatmap-link { font-size: 0.75em; }
    .hourly-graph-wrapper { padding: 10px; }
    .hourly-graph-controls { gap: 6px 8px; }
    .hourly-graph-controls label { font-size: 0.75em; }
    .hourly-graph-container { height: clamp(160px, 55vw, 220px); }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .brief-graph-container { height: 240px; }
    .unified-brief-card { flex-wrap: nowrap; }
    .station-data-compact { flex-basis: 35%; margin: 0; border-radius: 12px; }
    .daily-forecast-table { font-size: 0.88em; }
    .hourly-graph-container { height: 270px; }
}

