/* Modern Family Dashboard - Glassmorphism Design for Vertical Touchscreen */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #06b6d4;
    --primary-dark: #0891b2;
    --secondary: #3b82f6;
    --accent: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --glass-bg: rgba(15, 23, 42, 0.75);
    --glass-border: rgba(6, 182, 212, 0.4);
    --text-light: rgba(255, 255, 255, 1);
    --text-muted: rgba(255, 255, 255, 1);
    --text-dark: #333;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)),
                url('https://images.unsplash.com/photo-1531804055935-76f44d7c3621?w=1920&q=80') center/cover no-repeat fixed;
    min-height: 100vh;
    color: var(--text-light);
    padding: 20px;
    touch-action: pan-y;
}

/* Birthday celebration effects */
body.celebration::before {
    content: '';
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
        radial-gradient(circle, #FFD700 10%, transparent 10%),
        radial-gradient(circle, #FF6B9D 10%, transparent 10%),
        radial-gradient(circle, #4ECDC4 10%, transparent 10%);
    background-size: 100px 100px, 80px 80px, 90px 90px;
    background-position: 0 0, 40px 60px, 80px 20px;
    animation: float 20s infinite linear;
    opacity: 0.4;
}

@keyframes float {
    0% { background-position: 0 100%, 40px 100%, 80px 100%; }
    100% { background-position: 0 -100%, 40px -100%, 80px -100%; }
}

/* Header */
header {
    text-align: center;
    margin-bottom: 25px;
    padding: 25px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 4em;
    margin-bottom: 15px;
    color: white;
    text-shadow: 0 0 30px rgba(6, 182, 212, 0.8), 2px 2px 8px rgba(0,0,0,0.5);
    font-weight: 800;
}

.birthday-message {
    display: none;
    font-size: 2em;
    font-weight: 700;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 2px 2px 4px rgba(0,0,0,0.3);
    margin: 15px 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

.current-datetime {
    font-size: 2em;
    margin-bottom: 8px;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.location {
    font-size: 1.6em;
    opacity: 1;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

/* Weather Alerts */
#weather-alerts-container {
    margin: 0 auto 20px auto;
    max-width: 100%;
    position: sticky;
    top: 10px;
    z-index: 1000;
}

.weather-alert {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    margin-bottom: 15px;
    border-radius: 20px;
    border: 3px solid;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    animation: alertSlideIn 0.5s ease-out;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alert severity levels */
.alert-extreme {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    animation: alertPulse 2s infinite;
}

.alert-severe {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.15);
}

.alert-moderate {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

.alert-minor {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.15);
}

.alert-air-quality {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.15);
}

@keyframes alertPulse {
    0%, 100% {
        box-shadow: 0 8px 32px 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px 0 rgba(239, 68, 68, 0.8);
    }
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.alert-icon {
    font-size: 2.5em;
    line-height: 1;
}

.alert-title {
    font-size: 2em;
    font-weight: 700;
    color: white;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.6), 2px 2px 6px rgba(0,0,0,0.6);
    flex: 1;
}

.alert-body {
    margin-left: 60px;
}

.alert-headline {
    font-size: 1.5em;
    margin-bottom: 8px;
    color: white;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
    line-height: 1.4;
}

.alert-expires {
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

/* Info Row for TRAX */
.info-row {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    margin: 0 auto 20px auto;
    max-width: 100%;
    text-align: center;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.info-row h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: white;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.8), 2px 2px 6px rgba(0,0,0,0.5);
    font-weight: 700;
}

/* TRAX Styling */
.trax-all-times {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
}

.time-badge {
    background: rgba(6, 182, 212, 0.5);
    color: white;
    padding: 16px 24px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.5em;
    border: 2px solid rgba(6, 182, 212, 0.8);
    min-width: 100px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

.time-badge:active {
    transform: scale(0.95);
    background: rgba(6, 182, 212, 0.4);
}

/* Main Container - Single Column for Portrait */
.container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Glass Card Styles */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:active {
    transform: scale(0.99);
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.4);
}

/* Stagger animation for cards */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

.card h2 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.8), 2px 2px 6px rgba(0,0,0,0.5);
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(6, 182, 212, 0.6);
}

.card h3 {
    color: white;
    font-size: 2em;
    margin: 25px 0 15px 0;
    font-weight: 700;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

/* Weather Card */
.weather-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.4) 0%, rgba(59, 130, 246, 0.4) 100%);
    border-radius: 20px;
    border: 2px solid rgba(6, 182, 212, 0.7);
}

.weather-icon-large {
    font-size: 7rem;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(6, 182, 212, 0.5));
}

.weather-temp-area {
    flex: 1;
}

.temp {
    font-size: 6.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 3px 3px 10px rgba(0,0,0,0.7);
}

.weather-desc {
    font-size: 2.4rem;
    margin-bottom: 8px;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.feels-like {
    font-size: 1.8rem;
    opacity: 1;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.weather-trend {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    display: inline-block;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.weather-trend.trend-up {
    background: rgba(255, 136, 136, 0.3);
    border: 2px solid rgba(255, 136, 136, 0.6);
    color: #ff8888;
}

.weather-trend.trend-down {
    background: rgba(107, 197, 255, 0.3);
    border: 2px solid rgba(107, 197, 255, 0.6);
    color: #6bc5ff;
}

.weather-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.weather-detail {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 15px;
    border: 2px solid rgba(6, 182, 212, 0.5);
    min-height: 110px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.weather-detail:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.98);
}

.detail-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.detail-info {
    flex: 1;
}

.detail-label {
    font-size: 1.3rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.detail-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

/* Forecast */
.forecast-container {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.forecast-days {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.forecast-day {
    background: rgba(15, 23, 42, 0.6);
    padding: 25px 15px;
    border-radius: 18px;
    text-align: center;
    border: 2px solid rgba(6, 182, 212, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.forecast-day:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.98);
}

.forecast-day-name {
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 15px rgba(6, 182, 212, 0.8), 2px 2px 6px rgba(0,0,0,0.6);
}

.forecast-icon {
    font-size: 5rem;
    margin: 15px 0;
    filter: drop-shadow(0 4px 12px rgba(6, 182, 212, 0.6));
}

.forecast-temps {
    margin: 15px 0 10px 0;
    font-size: 2rem;
}

.temp-high {
    color: #ff8888;
    font-weight: 700;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.temp-low {
    color: #6bc5ff;
    margin-left: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.forecast-precip {
    font-size: 1.3rem;
    color: white;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

/* Calendar */
#calendar-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.calendar-grid {
    background: rgba(15, 23, 42, 0.5);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid rgba(6, 182, 212, 0.4);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.calendar-day-name {
    text-align: center;
    font-weight: 700;
    color: white;
    padding: 12px;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 15px rgba(6, 182, 212, 0.8), 2px 2px 6px rgba(0,0,0,0.6);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid rgba(6, 182, 212, 0.3);
    min-height: 60px;
    color: white;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.calendar-day:active:not(.empty) {
    background: rgba(6, 182, 212, 0.3);
    border-color: var(--primary);
    transform: scale(0.95);
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.today {
    background: var(--primary);
    color: white;
    font-weight: 800;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.4);
}

.calendar-events {
    background: rgba(15, 23, 42, 0.6);
    padding: 20px;
    border-radius: 15px;
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid rgba(6, 182, 212, 0.4);
}

.calendar-events h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(6, 182, 212, 0.8), 2px 2px 6px rgba(0,0,0,0.6);
}

.cal-event {
    padding: 18px;
    margin-bottom: 12px;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    border: 2px solid rgba(6, 182, 212, 0.4);
    border-left: 4px solid var(--primary);
    transition: all 0.2s;
    cursor: pointer;
}

.cal-event:active {
    background: rgba(6, 182, 212, 0.3);
    transform: translateX(5px);
}

.cal-event-date {
    font-size: 1.3rem;
    color: white;
    margin-bottom: 6px;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.cal-event-title {
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

/* Birthday Countdown */
.calendar-birthday-section {
    background: rgba(255, 215, 0, 0.25);
    padding: 20px;
    border-radius: 15px;
    margin-top: 25px;
    border: 2px solid rgba(255, 215, 0, 0.6);
}

.calendar-birthday-section h3 {
    color: #FFD700;
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 2px 2px 6px rgba(0,0,0,0.6);
}

.birthday-row {
    padding: 15px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 12px;
    border-left: 4px solid #FFD700;
    margin-bottom: 12px;
}

.countdown-text,
.celebration-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    margin: 5px 0;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.countdown-date {
    font-size: 1.4rem;
    color: white;
    margin-top: 5px;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

/* School Card */
.school-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.school-contact p {
    margin-bottom: 15px;
    line-height: 1.8;
    font-size: 1.5rem;
    color: white;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.next-event {
    margin: 0;
    padding: 20px;
    background: rgba(245, 158, 11, 0.25);
    border-left: 4px solid var(--warning);
    border: 2px solid rgba(245, 158, 11, 0.5);
    border-left: 4px solid var(--warning);
    border-radius: 12px;
}

.event-highlight strong {
    color: white;
    font-size: 1.6rem;
    text-shadow: 0 0 15px rgba(6, 182, 212, 0.8), 2px 2px 6px rgba(0,0,0,0.6);
}

.event-details {
    margin-top: 12px;
}

.event-name {
    font-weight: 700;
    color: white;
    font-size: 1.6rem;
    margin-bottom: 6px;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.event-date {
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.school-links {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-top: 20px;
}

.school-links .btn {
    flex: 1;
}

/* Removed - no longer using side-by-side grid for school info */
/* .school-content-grid { ... } */

.school-menu {
    background: rgba(15, 23, 42, 0.6);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid rgba(6, 182, 212, 0.4);
    margin-top: 25px;
}

.school-menu h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(6, 182, 212, 0.6);
    font-weight: 700;
    text-shadow: 0 0 15px rgba(6, 182, 212, 0.8), 2px 2px 6px rgba(0,0,0,0.6);
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.menu-section {
    margin-bottom: 0;
}

.menu-section h4 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item {
    background: rgba(6, 182, 212, 0.3);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 1.4rem;
    color: white;
    border-left: 4px solid var(--primary);
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.menu-item-header {
    background: rgba(245, 158, 11, 0.5);
    border-left: 4px solid var(--warning);
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-empty {
    color: white;
    font-style: italic;
    padding: 15px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

/* Buttons - Touch Optimized */
.btn {
    display: block;
    padding: 24px 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.3s;
    font-weight: 700;
    font-size: 1.6rem;
    text-align: center;
    border: 2px solid rgba(6, 182, 212, 0.6);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
    cursor: pointer;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.5);
}

.btn:disabled,
.btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* News and Articles - Touch Optimized */
.news-headlines,
.pubmed-articles,
.daybreak-events {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Event Cards Grid Layout */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
}

/* Event Card Styling */
.event-card {
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.7);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(245, 158, 11, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.event-card:active {
    transform: scale(0.98);
    border-color: var(--warning);
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.4);
}

/* Event Image */
.event-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 3px solid rgba(245, 158, 11, 0.6);
}

.event-image-placeholder {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(6, 182, 212, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-placeholder-icon {
    font-size: 4em;
    opacity: 0.7;
}

/* Event Card Content */
.event-card-content {
    padding: 20px;
    flex: 1;
}

.headline-link,
.article-link {
    display: block;
    padding: 24px;
    background: rgba(15, 23, 42, 0.7);
    color: white;
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.3s;
    border-left: 4px solid transparent;
    border: 2px solid rgba(6, 182, 212, 0.4);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1.6;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.headline-link:active {
    background: rgba(6, 182, 212, 0.25);
    border-left-color: var(--primary);
    transform: scale(0.99);
}

.article-link {
    border-left-color: rgba(16, 185, 129, 0.4);
}

.article-link:active {
    background: rgba(16, 185, 129, 0.25);
    border-left-color: var(--success);
    transform: scale(0.99);
}

.article-title {
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.5;
    color: white;
    font-size: 1.6rem;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.article-meta {
    font-size: 1.3rem;
    color: white;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

/* Hiking Trails Styling */
.trails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 20px;
}

.trail-card {
    background: rgba(15, 23, 42, 0.7);
    border: 2px solid rgba(6, 182, 212, 0.4);
    border-radius: 15px;
    padding: 24px;
    transition: all 0.3s;
}

.trail-card:hover {
    border-color: rgba(6, 182, 212, 0.6);
    background: rgba(15, 23, 42, 0.8);
}

.trail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.trail-name {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.8), 2px 2px 6px rgba(0,0,0,0.6);
    flex: 1;
    min-width: 200px;
}

.trail-badge {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.trail-recommended {
    background: rgba(245, 158, 11, 0.3);
    border: 2px solid rgba(245, 158, 11, 0.6);
    color: #fbbf24;
}

.trail-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.trail-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
}

.trail-stat-icon {
    font-size: 1.8rem;
}

.trail-stat-value {
    color: white;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.trail-description {
    color: white;
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 16px;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.trail-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
    flex-wrap: wrap;
}

.trail-location,
.trail-type {
    color: rgba(6, 182, 212, 0.9);
}

.trails-season-note {
    text-align: center;
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    margin-top: 16px;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

@media (max-width: 768px) {
    .trails-grid {
        grid-template-columns: 1fr;
    }

    .trail-name {
        font-size: 1.8rem;
    }
}

.event-desc {
    font-size: 1.4rem;
    margin-top: 10px;
    color: white;
    line-height: 1.6;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

/* Restaurant Suggestion Styling */
.restaurant-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(71, 85, 105, 0.5);
    border-radius: 20px;
    padding: 25px;
}

.restaurant-main-content {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.restaurant-photo {
    width: 180px;
    height: 180px;
    min-width: 180px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 15px;
    border: 2px solid rgba(71, 85, 105, 0.4);
}

.restaurant-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.restaurant-name {
    font-size: 2.4rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
    margin: 0 0 8px 0;
}

.restaurant-field {
    font-size: 1.6rem;
    color: white;
    margin: 0;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
    line-height: 1.6;
}

.field-label {
    color: #06b6d4;
    font-weight: 700;
}

.price-value {
    color: #10b981;
    font-weight: 700;
}

.restaurant-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 700;
}

.restaurant-status-badge.open {
    background: rgba(16, 185, 129, 0.25);
    border: 2px solid rgba(16, 185, 129, 0.6);
    color: #10b981;
}

.restaurant-status-badge.closed {
    background: rgba(239, 68, 68, 0.25);
    border: 2px solid rgba(239, 68, 68, 0.6);
    color: #ef4444;
}

.restaurant-qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qr-label {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
    text-align: center;
}

.restaurant-qr-code {
    background: white;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid rgba(71, 85, 105, 0.4);
}

.qr-code-img {
    width: 200px;
    height: 200px;
    display: block;
}

.restaurant-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-pick-another,
.btn-website {
    flex: 1;
    font-size: 1.8rem;
    font-weight: 700;
    padding: 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

.btn-pick-another {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: white;
}

.btn-pick-another:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-website {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
}

.btn-website:active {
    transform: scale(0.98);
    opacity: 0.9;
}

@media (max-width: 768px) {
    .restaurant-main-content {
        flex-direction: column;
    }

    .restaurant-photo {
        width: 100%;
        min-width: auto;
    }

    .restaurant-qr-wrapper {
        align-self: center;
    }

    .restaurant-actions {
        flex-direction: column;
    }
}

/* Loading State */
.loading {
    color: white;
    font-style: italic;
    padding: 15px;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

/* Skeleton Loading States */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-text {
    height: 1.2em;
    margin-bottom: 0.8em;
}

.skeleton-text.large {
    height: 2em;
}

.skeleton-box {
    width: 100%;
    height: 150px;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    padding: 25px;
    font-size: 1.4rem;
    font-weight: 600;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 2px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(6, 182, 212, 0.6);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 182, 212, 0.8);
}

/* Calendar Instructions */
.calendar-instructions {
    font-size: 1.4rem;
    line-height: 1.8;
    color: white;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.calendar-instructions h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(6, 182, 212, 0.8), 2px 2px 6px rgba(0,0,0,0.6);
}

.calendar-instructions ol {
    padding-left: 30px;
}

.calendar-instructions li {
    margin-bottom: 12px;
}

.calendar-instructions a {
    color: #06b6d4;
    text-decoration: none;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.6), 2px 2px 6px rgba(0,0,0,0.6);
}

.calendar-instructions a:active {
    text-decoration: underline;
}

/* Responsive - Optimized for Portrait Touchscreen */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    header h1 {
        font-size: 2.2em;
    }

    .weather-main {
        flex-direction: column;
        text-align: center;
    }

    .forecast-days {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .forecast-day {
        padding: 15px 10px;
        min-height: 180px;
    }

    .forecast-day:nth-child(n+4) {
        display: none;
    }

    .weather-icon-large {
        font-size: 5rem;
    }

    .temp {
        font-size: 4rem;
    }

    .weather-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .calendar-days {
        gap: 6px;
    }

    .calendar-day {
        min-height: 45px;
        font-size: 1rem;
    }

    .school-menu h3 {
        font-size: 1.6rem;
    }

    .menu-section h4 {
        font-size: 1.4rem;
    }

    .menu-item {
        font-size: 1.3rem;
    }
}

/* Portrait display optimization */
@media (max-width: 900px) {
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .school-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 20px;
    }

    .card h2 {
        font-size: 1.5rem;
    }

    .forecast-icon {
        font-size: 3rem;
    }

    .forecast-temps {
        font-size: 1.2rem;
    }
}

/* Commute Time Styling - Compact Single Line */
.commute-info {
    display: flex;
    justify-content: center;
    align-items: center;
}

.commute-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.commute-time-compact {
    color: white;
    font-weight: 700;
    font-size: 2.2em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    background: rgba(6, 182, 212, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
    border: 2px solid rgba(6, 182, 212, 0.8);
}

.commute-distance-compact {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    font-size: 1.8em;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.commute-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5em;
    font-weight: 300;
}

.traffic-badge-compact {
    color: white;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.6em;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

.commute-refresh-btn {
    background: rgba(6, 182, 212, 0.5);
    color: white;
    border: 2px solid rgba(6, 182, 212, 0.8);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 1.3em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}

.commute-refresh-btn:hover {
    background: rgba(6, 182, 212, 0.7);
    transform: scale(1.05);
}

.commute-refresh-btn:active {
    transform: scale(0.95);
    background: rgba(6, 182, 212, 0.4);
}
