/* ===========================
   ForecastMaven Home Page Styles
   Phase 1: Personal Outlook & Weather Preview
   Uses CSS variables from hurricane-hive-styles.css
   =========================== */

/* Personal Forecast Hero Card */
.personal-forecast-hero {
    background: var(--sky-gray);
    border-radius: var(--radius-xl);
    padding: var(--spacing-8);
    margin-bottom: var(--spacing-6);
    box-shadow: var(--elevation-2);
}

.personal-forecast-hero.no-forecast {
    background: var(--sky-gray);
}

.personal-forecast-hero.loading,
.personal-forecast-hero.error {
    background: var(--sky-gray);
    text-align: center;
    padding: var(--spacing-10);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-8);
}

.hero-text {
    flex: 1;
}

.hero-location {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--ocean-blue);
    margin: 0 0 var(--spacing-4) 0;
}

.hero-headline {
    font-size: var(--text-xl);
    font-weight: 500;
    color: var(--midnight-navy);
    line-height: 1.5;
    margin: 0 0 var(--spacing-4) 0;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.hero-label {
    font-weight: 600;
    color: var(--midnight-navy);
}

.hero-separator {
    color: var(--text-muted);
}

.hero-generated {
    color: var(--text-secondary);
}

.hero-details-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-1);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.hero-details-btn:hover {
    transform: scale(1.1);
}

.hero-details-btn i {
    width: 18px;
    height: 18px;
}

.hero-logo {
    flex-shrink: 0;
    max-width: 200px;
}

.hero-logo img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06));
}

.hero-cta-button {
    display: inline-block;
    padding: var(--spacing-3) var(--spacing-6);
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s ease;
}

.hero-cta-button:hover {
    background: var(--ocean-blue);
    transform: translateY(-2px);
}

/* Personal Outlook Hero */
.personal-outlook-hero {
    background: linear-gradient(135deg, var(--ocean-blue) 0%, var(--polar-purple) 100%);
    color: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-8);
    margin-bottom: var(--spacing-8);
    box-shadow: var(--elevation-6);
}

.personal-outlook-hero.no-forecast {
    background: linear-gradient(135deg, var(--sunset-orange) 0%, var(--hibiscus-red) 100%);
}

.personal-outlook-hero.loading,
.personal-outlook-hero.error {
    background: var(--sky-gray);
    color: var(--text-primary);
}

.outlook-header h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin: 0 0 var(--spacing-4) 0;
}

.outlook-content {
    margin-top: var(--spacing-4);
}

.outlook-headline {
    font-size: var(--text-xl);
    line-height: 1.5;
    margin: 0 0 var(--spacing-5) 0;
    font-weight: 500;
}

.outlook-message {
    font-size: var(--text-base);
    line-height: 1.6;
    margin: 0 0 var(--spacing-5) 0;
}

.outlook-cta {
    display: inline-block;
    padding: var(--spacing-3) var(--spacing-6);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.outlook-cta:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.outlook-cta.primary {
    background: var(--surface-color);
    color: var(--hibiscus-red);
    border-color: var(--surface-color);
}

.outlook-cta.primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Weather Preview Card */
.weather-preview-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-6);
    box-shadow: var(--elevation-2);
}

.preview-header h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    margin: 0 0 var(--spacing-2) 0;
    color: var(--text-primary);
}

.preview-location {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-5) 0;
}

.preview-section {
    margin-bottom: var(--spacing-5);
}

.preview-section:last-child {
    margin-bottom: 0;
}

.current-conditions {
    text-align: center;
    padding: var(--spacing-5) 0;
    border-bottom: 1px solid var(--border-color);
}

.current-temp {
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-2);
}

.current-description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-1);
}

.current-wind {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.threats-grid h4 {
    font-size: var(--text-base);
    font-weight: 600;
    margin: 0 0 var(--spacing-3) 0;
    color: var(--text-primary);
}

.threat-grid-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.threat-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--spacing-1);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--spacing-1);
}

.threat-day-label {
    text-align: center;
}

.threat-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--spacing-1);
}

.threat-cell {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(0, 0, 0, 0.1);
}

/* Two Column Layout for Main Content Section */
.main-content-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-6);
    margin-bottom: var(--spacing-6);
}

.forecasts-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
}

.current-conditions-column {
    display: flex;
    flex-direction: column;
}

/* Current conditions in right column - force mobile/compact layout */
.current-conditions-column .current-conditions-card {
    width: 100% !important;
    flex: 1 !important;
    /* Fill the column width on desktop */
}

/* Force mobile/compact layout for current conditions in right column */
.current-conditions-column .current-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    padding: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.current-conditions-column .current-left {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    width: 100% !important;
}

.current-conditions-column .current-icon {
    width: 80px !important;
    height: 80px !important;
    flex-shrink: 0 !important;
}

.current-conditions-column .current-icon i,
.current-conditions-column .current-icon svg {
    width: 80px !important;
    height: 80px !important;
}

.current-conditions-column .current-temp-section {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    text-align: left !important;
    flex: 0 !important;
}

.current-conditions-column .current-temp {
    font-size: 48px !important;
    line-height: 1 !important;
}

.current-conditions-column .current-conditions {
    font-size: 16px !important;
    margin-top: 4px !important;
}

.current-conditions-column .current-details-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto auto !important;
    gap: 16px !important;
    width: 100% !important;
    flex: 0 !important;
}

.current-conditions-column .current-details-grid .detail-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding-left: 0 !important;
}

/* Tabbed Forecast View */
.tabbed-forecast-view {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--elevation-2);
    overflow: hidden;
}

.forecast-view-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    background: var(--surface-color);
}

.forecast-view-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    padding: var(--spacing-4);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.forecast-view-tab:hover {
    background: var(--neutral-light);
    color: var(--text-primary);
}

.forecast-view-tab.active {
    color: var(--ocean-blue);
    border-bottom-color: var(--ocean-blue);
    background: white;
}

.forecast-view-tab i {
    width: 20px;
    height: 20px;
}

.forecast-view-content {
    position: relative;
}

.forecast-tab-pane {
    display: none;
}

.forecast-tab-pane.active {
    display: block;
}

/* National Headline Card */
.national-headline-card {
    background: var(--sky-gray);
    border-radius: var(--radius-xl);
    padding: var(--spacing-8);
    margin-bottom: var(--spacing-6);
    box-shadow: var(--elevation-2);
}

.national-headline-card.loading,
.national-headline-card.error {
    text-align: center;
    padding: var(--spacing-10);
}

.headline-content {
    max-width: 100%;
}

.national-headline {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--ocean-blue);
    margin: 0 0 var(--spacing-4) 0;
    line-height: 1.2;
}

.national-summary {
    font-size: var(--text-lg);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
}

/* National Article Cards */
.national-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-6);
    margin-top: var(--spacing-6);
}

.national-articles-grid.loading,
.national-articles-grid.error {
    grid-template-columns: 1fr;
    text-align: center;
    padding: var(--spacing-8);
}

.national-article-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-6);
    box-shadow: var(--elevation-2);
    transition: all 0.2s ease;
}

.national-article-card:hover {
    box-shadow: var(--elevation-4);
    transform: translateY(-2px);
}

.article-headline {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--ocean-blue);
    margin: 0 0 var(--spacing-3) 0;
    line-height: 1.3;
}

.article-summary {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 var(--spacing-4) 0;
}

.article-read-more {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-1);
    color: var(--ocean-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--text-base);
    transition: all 0.2s ease;
}

.article-read-more:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.no-articles-message {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: var(--spacing-8);
}

/* Loading & Error States */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-4);
}

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

.error-message {
    color: var(--hibiscus-red);
    text-align: center;
    padding: var(--spacing-5);
}

.text-muted {
    color: var(--text-muted);
    font-style: italic;
}

/* Tablet Responsive - Reorder layout at 640px */
@media (max-width: 640px) {
    .main-content-section {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-6);
    }

    /* Current conditions appears first (between hero and forecasts) */
    .current-conditions-column {
        order: 1;
    }

    /* Forecasts appear second */
    .forecasts-column {
        order: 2;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .personal-forecast-hero {
        padding: var(--spacing-6);
        margin-bottom: var(--spacing-6);
    }

    .hero-content {
        flex-direction: column;
        gap: var(--spacing-6);
    }

    .hero-location {
        font-size: var(--text-2xl);
    }

    .hero-headline {
        font-size: var(--text-lg);
    }

    .hero-meta {
        flex-wrap: wrap;
    }

    .hero-logo {
        max-width: 150px;
        align-self: center;
    }

    .personal-outlook-hero {
        padding: var(--spacing-6);
        margin-bottom: var(--spacing-6);
    }

    .outlook-header h2 {
        font-size: var(--text-xl);
    }

    .outlook-headline {
        font-size: var(--text-lg);
    }

    .national-headline-card {
        padding: var(--spacing-6);
        margin-bottom: var(--spacing-6);
    }

    .national-headline {
        font-size: var(--text-2xl);
    }

    .national-summary {
        font-size: var(--text-base);
    }

    .national-articles-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-4);
    }
}
