

/* =================================================================
Hero Section
================================================================= */
.hero {
background: #e5e7eb;
color: #1a1a1a;
padding: 60px 20px 80px;
text-align: center;
position: relative;
overflow: hidden;
}

.hero::before {
content: '';
position: absolute;
top: -50%;
right: -50%;
width: 200%;
height: 200%;
background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
animation: float 20s ease-in-out infinite;
}

@keyframes float {
0%, 100% { transform: translate(0, 0) rotate(0deg); }
50% { transform: translate(-30px, -30px) rotate(180deg); }
}

.logo {
width: 200px;
height: auto;
margin-bottom: 30px;
position: relative;
z-index: 1;
}



/* =================================================================
Buttons & CTA
================================================================= */
.cta-button {
background: #00FFFF;
color: #000;
border: none;
padding: 18px 36px;
font-size: 18px;
font-weight: 600;
border-radius: 30px;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 12px;
transition: all 0.3s ease;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
position: relative;
z-index: 1;
min-width: 314px;
}

.cta-button-primary { background-color: #00FFFF; color: #000000; }
.cta-button-accent { background-color: #ed45a2; color: #ffffff; }


.cta-button:hover {
transform: translateY(-2px);
box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
}

.cta-button:active {
transform: translateY(0);
}

.cta-button svg {
width: 24px;
height: 24px;
}

/* =================================================================
Manual Search
================================================================= */
.manual-search {
margin-top: 30px;
position: relative;
z-index: 1;
}

.search-link {
color: #6b7280;
text-decoration: none;
font-size: 14px;
display: inline-flex;
align-items: center;
gap: 6px;
transition: color 0.2s;
}

.search-link:hover {
color: #1a1a1a;
}

/* =================================================================
Search Modal
================================================================= */
.search-modal {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 1000;
padding: 20px;
overflow-y: auto;
}

.search-modal.active {
display: flex;
align-items: flex-start;
justify-content: center;
padding-top: 100px;
}

.search-container {
width: 100%;
max-width: 500px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
animation: slideUp 0.3s ease;
}

@keyframes slideUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

.search-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}



.close-button {
background: none;
border: none;
width: 32px;
height: 32px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background 0.2s;
}

.close-button:hover {
background: #f3f4f6;
}

.search-input {
display: block;
box-sizing: border-box;
width: 100%;
max-width: 100%;
padding: 16px 20px;
font-size: 16px;
border: 2px solid #dddddd;
border-radius: 12px;
outline: none;
transition: border-color 0.2s;
}

.search-input:focus {
border-color: #00DEDE;
}



/* =================================================================
Results Section
================================================================= */
.results-section {
display: none;
}

.results-header {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
}

.results-title {
font-size: 20px;
font-weight: 600;
color: #ec4899;
text-align: center;
}

.view-toggle {
display: flex;
gap: 8px;
background: #f3f4f6;
padding: 4px;
border-radius: 8px;
}

.view-button {
background: none;
border: none;
padding: 8px 12px;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s;
display: flex;
align-items: center;
gap: 6px;
font-size: 14px;
color: #6b7280;
}

.view-button.active {
background: white;
color: #1a1a1a;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* =================================================================
Station Cards
================================================================= */


.station-card {
background: white;
border-radius: 16px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
transition: all 0.2s;
cursor: pointer;
text-decoration: none;
color: inherit;
display: block;
border: 2px solid transparent;
}

.station-card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
transform: translateY(-2px);
border-color: #00FFFF;
}

.station-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 12px;
}

.station-info h3 {
font-size: 18px;
font-weight: 600;
margin-bottom: 4px;
}

.station-address {
font-size: 14px;
color: #6b7280;
}

.station-distance {
background: #00FFFF;
color: #000;
padding: 4px 12px;
border-radius: 20px;
font-size: 14px;
font-weight: 500;
}

/* Cheapest station styles */
.station-card.cheapest {
background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
border-color: #10b981 !important;
position: relative;
}

.station-card.cheapest::before {
content: '';
position: absolute;
top: 0;
right: 0;
width: 60px;
height: 60px;
background: #10b981;
border-radius: 0 16px 0 100%;
opacity: 0.1;
}

.station-card.cheapest .station-info h3 {
display: flex;
align-items: center;
gap: 8px;
}

.cheapest-badge {
background: #10b981;
color: white;
padding: 2px 8px;
border-radius: 12px;
font-size: 11px;
font-weight: 600;
display: inline-flex;
align-items: center;
gap: 4px;
}

.cheapest-badge svg {
width: 12px;
height: 12px;
}

.station-prices {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
gap: 12px;
margin-top: 16px;
}

.price-item {
text-align: center;
}

.price-label {
font-size: 12px;
color: #6b7280;
margin-bottom: 4px;
}

.price-value {
font-size: 20px;
font-weight: 700;
color: #1a1a1a;
}

.price-value.best {
color: #10b981 !important;
background: #d1fae5 !important;
padding: 4px 8px !important;
border-radius: 8px !important;
display: inline-block !important;
min-width: 80px !important;
font-weight: 800 !important;
border: 2px solid #10b981 !important;
}

/* =================================================================
Loading State
================================================================= */
.loading {
width: 100%;
text-align: center;
}

.spinner {
display: inline-block;
box-sizing: border-box;
position: relative;
width: 40px;
height: 40px;
border: 3px solid var(--muted);
border-top-color: var(--primary);
border-radius: 50%;
animation: spin 0.8s linear infinite;
margin: 0 auto 16px;
}

@keyframes spin {
to { transform: rotate(360deg); }
}

/* =================================================================
Map View
================================================================= */
#map {
display: none;
height: calc(100vh - 200px);
border-radius: 16px;
overflow: hidden;
}

/* =================================================================
Error State
================================================================= */
.error-message {
background: #fee2e2;
color: #dc2626;
padding: 16px;
border-radius: 12px;
text-align: center;
margin: 20px;
}

.error-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #f5f5f5;
}

.error {
background: #ff4444;
color: white;
padding: 20px 40px;
border-radius: 8px;
text-align: center;
font-weight: 600;
font-size: 18px;
box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

/* =================================================================
Footer
================================================================= */
.footer {
text-align: center;
padding: 40px 20px;
color: #6b7280;
font-size: 14px;
}

/* =================================================================
Autocomplete
================================================================= */
.autocomplete-container {
position: relative;
}

.autocomplete-results {
position: absolute;
top: 100%;
left: 0;
right: 0;
background: white;
border: 1px solid #e5e7eb;
border-top: none;
border-radius: 0 0 12px 12px;
max-height: 300px;
overflow-y: auto;
display: none;
z-index: 1000;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.autocomplete-results.active {
display: block;
}

.autocomplete-item {
padding: 12px 20px;
cursor: pointer;
transition: background 0.2s;
border-bottom: 1px solid #dddddd;
}

.autocomplete-item:last-child {
border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
background: #f3f4f6;
}

.autocomplete-item strong {
color: #00DEDE;
}

/* =================================================================
Header Styles (dalla scheda impianto)
================================================================= */
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 20px;
background: white;
border-bottom: 1px solid #e5e7eb;
}

.header-logo {
display: flex;
align-items: center;
height: 100px;
}

.header-logo img {
height: 100%;
width: auto;
object-fit: contain;
}

.header-left {
display: flex;
align-items: center;
gap: 20px;
}

.header-info {
display: flex;
align-items: center;
gap: 16px;
}

.header-location,
.header-update {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: #666;
}

.header-nav-btn,
.header-share-btn {
padding: 4px 12px;
border-radius: 16px;
font-size: 11px;
font-weight: 600;
text-decoration: none;
transition: all 0.2s;
display: flex;
align-items: center;
gap: 4px;
}

.header-nav-btn {
background: #ec4899;
color: white;
}

.header-nav-btn:hover {
background: #db2777;
}

.header-share-btn {
background: #00FFFF;
color: white;
}

.header-share-btn:hover {
background: #00d4d4;
}

/* =================================================================
Responsive Design
================================================================= */
/* Utility classes per responsive */
.hide-mobile {
display: inline-block;
}



/* Mobile responsive */
@media (max-width: 640px) {
.hero {
padding: 40px 20px 60px;
}


.subtitle {
font-size: 16px;
}

.logo {
width: 150px;
}

.station-prices {
grid-template-columns: repeat(2, 1fr);
}



.hide-mobile {
display: none !important;
}

.header-content {
padding: 12px 16px;
}

.header-logo {
height: 60px;
}
}