/* ========================================
   METEOADESSO.IT - Meteo Italia
   Mobile-First Responsive CSS
   ======================================== */

:root {
    --weather-sun: #f6c23e;
    --weather-cloud: #858796;
    --weather-rain: #4e73df;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Base styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Remove sidebar margin */
#content-wrapper {
    margin-left: 0 !important;
}

.sidebar {
    display: none !important;
}

/* Gradient backgrounds */
.bg-gradient-info {
    background: linear-gradient(135deg, #36b9cc 0%, #258391 100%);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #858796 0%, #60616f 100%);
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #5a5c69 0%, #373840 100%);
}

/* Main Weather Card */
.weather-main-card {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.weather-main-card .card-body {
    padding: 1.5rem;
}

.city-name {
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 0.25rem;
}

.weather-icon-large {
    font-size: 4rem;
}

.weather-icon-large i {
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.temperature {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
}

.condition {
    font-size: 1.25rem;
    opacity: 0.9;
    text-transform: capitalize;
}

.weather-details {
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.weather-details span {
    background: rgba(255,255,255,0.15);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* Quick Cities */
.quick-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.city-btn {
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

.city-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* City Selector */
#city-selector {
    font-size: 1rem;
    border-radius: 10px;
    border: 2px solid #e3e6f0;
    padding: 0.75rem 1rem;
}

#city-selector:focus {
    border-color: #36b9cc;
    box-shadow: 0 0 0 0.2rem rgba(54, 185, 204, 0.25);
}

/* Forecast Container */
.forecast-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0;
}

.forecast-container .row {
    display: flex;
    flex-wrap: nowrap;
    min-width: max-content;
}

.forecast-day {
    flex: 0 0 auto;
    min-width: 90px;
    text-align: center;
    padding: 1rem 0.5rem;
    border-radius: 12px;
    background: #f8f9fc;
    transition: all 0.2s ease;
    margin: 0 0.25rem;
}

.forecast-day:hover {
    background: #e3e6f0;
    transform: translateY(-3px);
}

/* Radar Container */
.radar-container {
    position: relative;
    width: 100%;
    height: 300px;
    background: #1a1a2e;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.radar-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
}

/* Ad Card */
.ad-card {
    border: 2px dashed #d1d3e2;
    background-color: #fafafa;
}

.partner-logo {
    transition: transform 0.2s ease;
}

.partner-logo:hover {
    transform: translateY(-3px);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Selection */
::selection {
    background-color: rgba(54, 185, 204, 0.3);
    color: #258391;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.weather-main-card {
    animation: fadeIn 0.5s ease forwards;
}

/* ========================================
   TABLET STYLES (768px+)
   ======================================== */
@media (min-width: 768px) {
    .weather-main-card .card-body {
        padding: 2rem;
    }

    .city-name {
        font-size: 2.5rem;
    }

    .weather-icon-large {
        font-size: 5rem;
    }

    .temperature {
        font-size: 4rem;
    }

    .condition {
        font-size: 1.5rem;
    }

    .forecast-day {
        min-width: 100px;
    }

    .radar-container {
        height: 350px;
    }
}

/* ========================================
   MOBILE STYLES (max 767px)
   ======================================== */
@media (max-width: 767px) {
    .navbar {
        padding: 0.5rem 1rem;
    }

    .navbar h1 {
        font-size: 1.1rem;
    }

    .weather-main-card .card-body {
        padding: 1.25rem;
    }

    .city-name {
        font-size: 1.75rem;
    }

    .weather-icon-large {
        font-size: 3rem;
    }

    .temperature {
        font-size: 3rem;
    }

    .condition {
        font-size: 1.1rem;
    }

    .weather-details {
        font-size: 0.8rem;
        justify-content: center;
    }

    .weather-details span {
        padding: 0.35rem 0.7rem;
    }

    .quick-cities {
        justify-content: center;
    }

    .city-btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }

    .forecast-day {
        min-width: 75px;
        padding: 0.75rem 0.35rem;
    }

    .forecast-day .fa-2x {
        font-size: 1.5rem;
    }

    .radar-container {
        height: 280px;
    }

    /* Form control fix for iOS zoom */
    .form-control {
        font-size: 16px !important;
    }

    /* Partner logos */
    .partner-logo {
        max-width: 100px !important;
        margin: 0.5rem !important;
    }

    .partner-logo svg {
        width: 40px;
        height: 40px;
    }

    /* Cards padding */
    .card-body {
        padding: 1rem;
    }

    /* Footer */
    footer .copyright {
        font-size: 0.85rem;
    }

    footer .mt-2 {
        font-size: 0.75rem;
    }
}

/* ========================================
   SMALL MOBILE (max 375px)
   ======================================== */
@media (max-width: 375px) {
    .city-name {
        font-size: 1.5rem;
    }

    .temperature {
        font-size: 2.5rem;
    }

    .weather-icon-large {
        font-size: 2.5rem;
    }

    .forecast-day {
        min-width: 65px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .navbar, .radar-container, .ad-card, footer, .scroll-to-top {
        display: none !important;
    }

    .weather-main-card {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
}
