/* World Tour – Warm editorial travel theme */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    --bg: #faf8f5;
    --bg-elevated: #ffffff;
    --text: #1a1a1a;
    --text-muted: #57534e;
    --primary: #b45309;
    --primary-hover: #92400e;
    --secondary: #4d7c5a;
    --accent: #0d9488;
    --border: #e7e5e4;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --radius-lg: 20px;
    --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-serif: 'Source Serif 4', Georgia, serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    background-image: linear-gradient(rgba(250, 248, 245, 0.92), rgba(250, 248, 245, 0.92)), url('/images/torremolinos/IMG_8333.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    -webkit-font-smoothing: antialiased;
}

.main-content {
    background: transparent;
    margin-top: 72px;
    min-height: calc(100vh - 72px);
}

/* Navigation – light, minimal */
.navbar {
    background: var(--bg-elevated) !important;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text) !important;
    letter-spacing: -0.02em;
}

.navbar-brand:hover {
    color: var(--primary) !important;
}

.navbar-brand i {
    color: var(--primary);
}

.navbar-toggler {
    border-color: var(--border);
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 2px var(--primary);
}

.navbar-nav .nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 0.5rem 0.75rem !important;
    border-radius: 8px;
    margin: 0 0.15rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary) !important;
    background: rgba(180, 83, 9, 0.08);
}

/* Hero – calm strip, no gradient */
.hero-section {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 3rem 0;
    text-align: center;
}

.hero-section h1 {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.hero-section h1 i {
    color: var(--primary);
    margin-right: 0.35rem;
}

.hero-section p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.hero-section .text-light,
.hero-section small {
    color: var(--text-muted) !important;
    font-size: 0.9rem;
}

/* Homepage on-the-road chip */
.hero-section .road-chip,
.hero-section a.road-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.1rem;
    padding: 0.55rem 0.9rem 0.55rem 0.7rem;
    max-width: 100%;
    text-align: left;
    text-decoration: none !important;
    color: var(--text) !important;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.hero-section .road-chip:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: #d6d3d1;
    color: var(--text) !important;
}
.road-chip-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
    background: #a8a29e;
    box-shadow: 0 0 0 4px rgba(168, 162, 158, 0.18);
}
.road-chip.is-on-road .road-chip-dot {
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.18);
    animation: road-chip-pulse 1.8s ease-out infinite;
}
.road-chip.is-off-road .road-chip-dot {
    background: #b45309;
    box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.14);
}
.road-chip-body {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}
.road-chip-state {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}
.road-chip.is-on-road .road-chip-state { color: #15803d; }
.road-chip.is-off-road .road-chip-state { color: #9a3412; }
.road-chip-meta {
    margin-top: 0.12rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.road-chip-go {
    color: var(--primary);
    font-size: 0.78rem;
    opacity: 0.75;
}
@keyframes road-chip-pulse {
    0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.35); }
    70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* Sections */
section {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

section.bg-light {
    background: rgba(247, 245, 243, 0.8) !important;
}

/* Headings – solid color, no gradient */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Cards – clean, no gradient borders */
.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--border);
}

.card-img-top {
    border-radius: 0;
    height: 200px;
    object-fit: contain;
    object-position: center;
    background: var(--bg-muted, #f5f5f5);
}

.card-body {
    padding: 1.25rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

/* Buttons */
.btn {
    font-family: var(--font-sans);
    font-weight: 600;
    border-radius: 10px;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.btn-primary {
    background: var(--primary);
    border: none;
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Map – central, clean container (journey map unchanged in behaviour) */
#map,
#homeMap {
    height: 560px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    overflow: hidden;
}

/* Map popup */
.map-popup {
    text-align: center;
    font-family: var(--font-sans);
}

.map-popup h6 {
    color: var(--text);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.map-popup img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.map-popup .btn-primary {
    background: var(--primary) !important;
    color: #fff !important;
    border: none;
    font-weight: 600;
}

.map-popup .btn-primary:hover {
    background: var(--primary-hover) !important;
    color: #fff !important;
}

/* Stat boxes – solid, readable colors */
.stat-box {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
    color: var(--text);
}

.stat-box:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-box.bg-primary {
    background: var(--primary) !important;
    border-color: var(--primary);
    color: #fff !important;
}

.stat-box.bg-success {
    background: var(--secondary) !important;
    border-color: var(--secondary);
    color: #fff !important;
}

.stat-box.bg-warning {
    background: #ca8a04 !important;
    border-color: #ca8a04;
    color: #fff !important;
}

.stat-box.bg-info {
    background: var(--accent) !important;
    border-color: var(--accent);
    color: #fff !important;
}

.stat-box h4 {
    color: inherit;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.stat-box small {
    opacity: 0.95;
    font-size: 0.8rem;
}

/* Tesla section on homepage */
.tesla-home-image {
    max-height: 300px;
    width: auto;
    object-fit: contain;
    border-radius: var(--radius);
}

/* Intro section */
.intro-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.intro-photo {
    max-width: 100%;
    max-height: 420px;
    width: auto;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.intro-section .lead {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Blog post */
.blog-post {
    max-width: 720px;
    margin: 0 auto;
}

.blog-post .featured-image {
    width: 100%;
    max-height: 500px;
    height: auto;
    object-fit: contain;
    object-position: center;
    background: var(--bg-muted, #f5f5f5);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.blog-post .post-meta {
    background: var(--bg);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.blog-post .post-content {
    font-family: var(--font-serif);
    font-size: 1.1rem;
}

.blog-post .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 1rem 0;
}

/* Photo gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.photo-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius);
    transition: transform 0.2s;
    cursor: pointer;
}

.photo-gallery img:hover {
    transform: scale(1.02);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
}

.badge.bg-primary {
    background: var(--primary) !important;
}

.badge.bg-secondary {
    background: var(--text-muted) !important;
}

/* Footer */
footer {
    background: var(--text) !important;
    color: rgba(255, 255, 255, 0.85);
    border-top: 1px solid var(--border);
    padding: 2.5rem 0 !important;
}

footer h5,
footer h6 {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

footer a:hover {
    color: #fff;
}

footer .text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Contact */
.contact-info {
    background: var(--bg-elevated);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.contact-info i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.contact-page .contact-hero-lead {
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    line-height: 1.55;
}

.contact-page .contact-reach-block {
    max-width: 28rem;
    margin: 0 auto;
}

.contact-page .contact-action-btn {
    border-radius: var(--radius);
}

.contact-page .contact-section-label,
.about-page .about-section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

.contact-page .contact-faq .accordion-item {
    border: 1px solid var(--border);
    border-radius: var(--radius) !important;
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: var(--bg-elevated);
}

.contact-page .contact-faq .accordion-button {
    font-family: var(--font-sans);
    font-weight: 600;
    background: var(--bg-elevated);
    color: var(--text);
    box-shadow: none;
}

.contact-page .contact-faq .accordion-button:not(.collapsed) {
    color: var(--primary);
    background: rgba(180, 83, 9, 0.06);
}

.contact-page .contact-faq .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(180, 83, 9, 0.2);
}

/* About page */
.about-page .about-hero-lead {
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    line-height: 1.55;
}

.about-page .about-section-title {
    font-family: var(--font-serif);
    font-weight: 600;
}

.about-page .about-avatar {
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow);
    border: 3px solid var(--bg-elevated);
}

.about-page .about-avatar--sm {
    width: 160px;
    max-width: 42vw;
    height: auto;
    aspect-ratio: 1;
}

.about-page .about-trip-card,
.about-page .about-profile-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.about-page .about-trip-card {
    max-width: 44rem;
    margin: 0 auto;
    padding: 1.35rem 1.5rem;
    text-align: center;
}

.about-page .about-trip-card p {
    text-align: left;
}

.about-page .about-trip-chips,
.about-page .about-chip-row,
.about-page .about-follow-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.about-page .about-trip-chips,
.about-page .about-follow-row {
    justify-content: center;
}

.about-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(180, 83, 9, 0.06);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
}

.about-chip i {
    color: var(--primary);
}

.about-page .about-work-accordion {
    max-width: 68rem;
    margin: 0 auto;
}

.about-page .about-work-accordion .accordion-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    background: var(--bg-elevated);
    box-shadow: var(--shadow);
}

.about-page .about-work-accordion .accordion-button {
    font-family: var(--font-sans);
    font-weight: 600;
    background: var(--bg-elevated);
    color: var(--text);
    box-shadow: none;
}

.about-page .about-work-accordion .accordion-button:not(.collapsed) {
    color: var(--primary);
    background: rgba(180, 83, 9, 0.06);
}

.about-page .about-work-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(180, 83, 9, 0.2);
}

.about-page .about-work-accordion .accordion-body {
    padding: 1.25rem 1rem 1.5rem;
}

.about-page .about-profile-card {
    padding: 1.35rem 1.15rem 1.4rem;
    box-shadow: none;
}

.about-page .about-subhead {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 1.35rem 0 0.65rem;
}

.about-page .about-toolbox,
.about-page .about-plain-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.about-page .about-toolbox li,
.about-page .about-plain-list li {
    margin-bottom: 0.35rem;
}

.about-page .about-timeline {
    border-left: 2px solid rgba(180, 83, 9, 0.25);
    padding-left: 1rem;
    margin-left: 0.15rem;
}

.about-page .about-timeline-item {
    position: relative;
    margin-bottom: 1.15rem;
}

.about-page .about-timeline-item:last-child {
    margin-bottom: 0;
}

.about-page .about-timeline-item::before {
    content: "";
    position: absolute;
    left: -1.3rem;
    top: 0.45rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.15);
}

.about-page .about-timeline-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 0.75rem;
    margin-bottom: 0.25rem;
}

.about-page .about-timeline-meta strong {
    font-size: 0.95rem;
    color: var(--text);
}

.about-page .about-timeline-meta span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.about-page .about-timeline-item p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.about-page .about-side-grid {
    display: grid;
    gap: 0.5rem 1.25rem;
    margin-top: 0.25rem;
}

@media (min-width: 576px) {
    .about-page .about-side-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.about-page .about-code-lead {
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.about-page .about-repo-grid {
    opacity: 0.97;
}

.about-page .about-cta .btn + .btn {
    margin-left: 0.5rem;
}

@media (max-width: 575.98px) {
    .about-page .about-cta .btn + .btn {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

/* GitHub repo cards (About) */
.repo-card-link:hover .repo-card {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.12) !important;
}

.repo-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-color: var(--border);
}

.repo-card-img-wrap {
    position: relative;
    height: 140px;
    background: linear-gradient(135deg, #f6f8fa 0%, #e8eaed 100%);
    overflow: hidden;
}

.repo-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.repo-card-img-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #6c757d;
    opacity: 0.35;
}

.repo-card-img:not([src]),
.repo-card-img[src=""] {
    display: none;
}

/* Leaflet popup */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.leaflet-popup-content {
    margin: 14px;
    line-height: 1.5;
}

/* Map marker icon (car) – match theme */
.custom-div-icon {
    background: transparent;
    border: none;
}

.custom-div-icon i {
    color: var(--primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Bootstrap utility overrides */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-light {
    background-color: rgba(247, 245, 243, 0.8) !important;
}

/* Utility */
.stat-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.tesla-stats {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

@media (max-width: 768px) {
    #map,
    #homeMap {
        height: 400px;
    }

    .hero-section {
        padding: 2rem 0;
    }

    section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* Charge Stats page — electric road-trip editorial */
.charge-hero {
    position: relative;
    overflow: hidden;
    min-height: min(52vh, 420px);
    display: flex;
    align-items: flex-end;
    padding: 4.5rem 0 3rem;
    color: #fff7ed;
}

.charge-hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(28, 16, 8, 0.82) 0%, rgba(120, 53, 15, 0.55) 48%, rgba(15, 23, 42, 0.45) 100%),
        url('/images/tesla-modely.png') right 12% center / min(58vw, 640px) auto no-repeat,
        radial-gradient(ellipse 80% 60% at 20% 80%, #b45309 0%, transparent 55%),
        linear-gradient(160deg, #1c1008 0%, #431407 40%, #0f172a 100%);
    transform: scale(1.02);
    animation: charge-hero-drift 18s ease-in-out infinite alternate;
}

.charge-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        -18deg,
        transparent 0,
        transparent 11px,
        rgba(255, 247, 237, 0.03) 11px,
        rgba(255, 247, 237, 0.03) 12px
    );
    pointer-events: none;
}

@keyframes charge-hero-drift {
    from { transform: scale(1.02) translate3d(0, 0, 0); }
    to { transform: scale(1.06) translate3d(-1.5%, 1%, 0); }
}

.charge-hero-inner {
    position: relative;
    z-index: 1;
}

.charge-kicker {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fdba74;
    margin-bottom: 0.75rem;
}

.charge-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.6rem, 8vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 0.95;
    margin: 0 0 0.75rem;
    color: #fff7ed;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.charge-hero-sub {
    font-size: 1.1rem;
    color: rgba(255, 247, 237, 0.82);
    max-width: 28rem;
    margin-bottom: 1.5rem;
}

.charge-hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.charge-hero-pills span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(253, 186, 116, 0.35);
    border-radius: 999px;
    background: rgba(255, 247, 237, 0.08);
    backdrop-filter: blur(8px);
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffedd5;
}

.charge-hero-pills i {
    color: #fdba74;
}

.charge-page {
    position: relative;
    margin-top: -1.5rem;
}

.charge-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    transition-delay: var(--delay, 0s);
}

.charge-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.charge-stage {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius-lg) + 4px);
    box-shadow: var(--shadow-md);
    padding: 1.35rem 1.35rem 1.25rem;
    height: 100%;
}

.charge-stage-head {
    margin-bottom: 1.1rem;
}

.charge-stage-head h2 {
    font-family: var(--font-serif);
    font-size: 1.55rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.charge-stage-head p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

.charge-map {
    height: 360px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.charge-map-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.charge-map-chip {
    text-align: center;
    padding: 0.85rem 0.5rem;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #fff 0%, #f7f3ee 100%);
    border: 1px solid var(--border);
}

.charge-map-chip strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.1;
}

.charge-map-chip span {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.charge-map-chip--hot {
    background: linear-gradient(160deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fdba74;
}

.charge-map-chip--hot strong {
    color: #c2410c;
}

.charge-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.charge-hero-stat {
    position: relative;
    overflow: hidden;
    flex: 1;
    padding: 1.5rem 1.35rem;
    border-radius: calc(var(--radius-lg) + 4px);
    border: 1px solid #fdba74;
    background:
        radial-gradient(circle at 100% 0%, rgba(251, 146, 60, 0.28), transparent 45%),
        linear-gradient(155deg, #fff7ed 0%, #ffedd5 55%, #fed7aa 100%);
    box-shadow: var(--shadow-md);
}

.charge-hero-stat--spend {
    border-color: #99f6e4;
    background:
        radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.22), transparent 45%),
        linear-gradient(155deg, #f0fdfa 0%, #ccfbf1 55%, #99f6e4 100%);
}

.charge-hero-stat-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
    color: #c2410c;
    font-size: 1.1rem;
}

.charge-hero-stat--spend .charge-hero-stat-icon {
    color: #0f766e;
}

.charge-stat-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.45rem;
}

.charge-stat-value {
    font-family: var(--font-serif);
    font-size: clamp(2.1rem, 5vw, 2.75rem);
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.charge-stat-value em {
    font-style: normal;
    font-family: var(--font-sans);
    font-size: 0.42em;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0;
}

.charge-stat-note {
    margin: 0.65rem 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.charge-bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 1.5rem;
    min-height: 250px;
    padding: 0.5rem 0.75rem 0;
}

.charge-bar-col {
    flex: 1;
    max-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.charge-bar-track {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: flex-end;
    background:
        repeating-linear-gradient(
            to top,
            transparent 0,
            transparent 39px,
            rgba(180, 83, 9, 0.08) 39px,
            rgba(180, 83, 9, 0.08) 40px
        ),
        rgba(180, 83, 9, 0.05);
    border-radius: 14px 14px 6px 6px;
    overflow: hidden;
    padding: 0 12%;
}

.charge-bar {
    position: relative;
    width: 100%;
    height: 0;
    background: linear-gradient(180deg, #fb923c 0%, #ea580c 48%, #b45309 100%);
    border-radius: 12px 12px 4px 4px;
    transition: height 1s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--bar-delay, 0s);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.charge-bar.is-grown {
    height: var(--bar-h, 0%);
}

.charge-bar-tip {
    position: absolute;
    top: 0.55rem;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff7ed;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.4s ease 0.5s;
}

.charge-bar.is-grown .charge-bar-tip {
    opacity: 1;
}

.charge-bar-label {
    margin-top: 0.65rem;
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 700;
}

.charge-donut-wrap {
    display: grid;
    grid-template-columns: minmax(0, 150px) 1fr;
    gap: 1.25rem;
    align-items: center;
}

.charge-donut {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
}

.charge-donut-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.charge-donut-track {
    fill: none;
    stroke: #e7e5e4;
    stroke-width: 12;
}

.charge-donut-seg {
    fill: none;
    stroke-width: 12;
    stroke-linecap: butt;
    stroke-dasharray: 0 276.5;
    transition: stroke-dasharray 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.charge-donut-seg.is-drawn.charge-donut-sc {
    stroke: #e11d48;
    stroke-dasharray: 243.3 33.2;
}

.charge-donut-seg.is-drawn.charge-donut-other {
    stroke: #78716c;
    stroke-dasharray: 27.7 248.8;
}

.charge-donut-seg.is-drawn.charge-donut-home {
    stroke: #2563eb;
    stroke-dasharray: 5.5 271;
}

.charge-donut-center {
    position: absolute;
    inset: 22%;
    display: grid;
    place-content: center;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
}

.charge-donut-center strong {
    font-family: var(--font-serif);
    font-size: 1.55rem;
    font-weight: 600;
    line-height: 1;
    color: var(--text);
}

.charge-donut-center span {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.charge-breakdown li {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.55rem 0;
}

.charge-breakdown li + li {
    border-top: 1px solid var(--border);
}

.charge-breakdown strong {
    display: block;
    font-size: 0.92rem;
    line-height: 1.2;
}

.charge-breakdown small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.charge-breakdown em {
    font-style: normal;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.charge-swatch {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.charge-swatch-sc { background: #e11d48; }
.charge-swatch-other { background: #78716c; }
.charge-swatch-home { background: #2563eb; }
.charge-swatch-work { background: #ca8a04; }

.charge-finale {
    position: relative;
    overflow: hidden;
    padding: 1.75rem 1.5rem;
    border-radius: calc(var(--radius-lg) + 4px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    min-height: 180px;
}

.charge-finale::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    right: -40px;
    top: -50px;
    opacity: 0.35;
    pointer-events: none;
}

.charge-finale--save {
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
    border-color: #6ee7b7;
}

.charge-finale--save::before {
    background: #34d399;
}

.charge-finale--km {
    background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 50%, #fed7aa 100%);
    border-color: #fdba74;
}

.charge-finale--km::before {
    background: #fb923c;
}

.charge-finale-label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.charge-finale-value {
    position: relative;
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 2.6rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 0.65rem;
}

.charge-finale-value em {
    font-style: normal;
    font-family: var(--font-sans);
    font-size: 0.4em;
    font-weight: 700;
    color: var(--text-muted);
}

.charge-finale p {
    position: relative;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    max-width: 28rem;
}

.charge-footnote {
    margin-top: 2rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.leaflet-div-icon.charge-sc-pin {
    background: transparent !important;
    border: none !important;
}

.charge-sc-pin span {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e11d48;
    border: 2px solid #fff;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.25);
    animation: charge-pin-pulse 2.4s ease-in-out infinite;
}

@keyframes charge-pin-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.22); }
    50% { box-shadow: 0 0 0 7px rgba(225, 29, 72, 0.08); }
}

@media (max-width: 991px) {
    .charge-hero {
        min-height: 340px;
        padding-top: 3.5rem;
    }

    .charge-hero-bg {
        background:
            linear-gradient(180deg, rgba(28, 16, 8, 0.75) 0%, rgba(67, 20, 7, 0.88) 100%),
            url('/images/tesla-modely.png') center 30% / min(90vw, 480px) auto no-repeat,
            linear-gradient(160deg, #1c1008 0%, #431407 50%, #0f172a 100%);
    }

    .charge-donut-wrap {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .charge-donut {
        max-width: 180px;
    }

    .charge-breakdown {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .charge-map {
        height: 280px;
    }

    .charge-map-strip {
        grid-template-columns: 1fr;
    }

    .charge-bar-track {
        height: 150px;
    }

    .charge-hero-pills span {
        font-size: 0.78rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .charge-hero-bg,
    .charge-sc-pin span,
    .charge-reveal,
    .charge-bar,
    .charge-donut-seg {
        animation: none !important;
        transition: none !important;
    }

    .charge-reveal {
        opacity: 1;
        transform: none;
    }

    .charge-bar {
        height: var(--bar-h, 0%);
    }
}

