:root {
    /* Fiat Logo "Candyshop" Colors */
    --color-fiat-pink: #FF6B9D;
    /* Vibrant Pink */
    --color-fiat-yellow: #FFD54F;
    /* Sunshine Yellow */
    --color-fiat-blue: #4FC3F7;
    /* Sky Blue */
    --color-fiat-green: #AED581;
    /* Fresh Green */

    /* Base Colors */
    --color-topolino-mint: #C9E4D6;
    /* Verde Vita approx */
    --color-white: #FFFFFF;
    --color-gray-light: #F5F7FA;
    --color-text-dark: #2C3E50;
    --color-text-muted: #7F8C8D;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --border-radius: 20px;

    /* Font */
    --font-primary: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-white);
    color: var(--color-text-dark);
    overflow-x: hidden;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--color-fiat-blue);
    color: white;
}

.btn-secondary {
    background-color: var(--color-fiat-pink);
    color: white;
}

/* Sections */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 60px;
    color: var(--color-text-dark);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Parallax Video Support */
.fixed-video-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    object-fit: cover;
}

.video-parallax-strip {
    height: 400px;
    width: 100%;
    background: transparent;
    position: relative;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.1);
}

/* Ensure sections cover the video */
#about,
#rent-buy-section {
    background-color: var(--color-white);
    position: relative;
    z-index: 2;
}

#contact {
    position: relative;
    z-index: 2;
}

/* Header */
#main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-weight: 900;
    font-size: 1.8rem;
    letter-spacing: -1px;
}

.l-pink {
    color: var(--color-fiat-pink);
}

.l-yellow {
    color: var(--color-fiat-yellow);
}

.l-blue {
    color: var(--color-fiat-blue);
}

.l-green {
    color: var(--color-fiat-green);
}

nav a {
    text-decoration: none;
    color: var(--color-text-dark);
    margin-left: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:not(.btn):hover {
    color: var(--color-fiat-pink);
}

/* Hero Section */
#hero {
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: var(--header-height);
    background: linear-gradient(135deg, rgba(224, 247, 250, 0.8) 0%, rgba(252, 228, 236, 0.8) 100%), url('assets/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    overflow: hidden;
    /* Default for desktop */
    background-attachment: fixed;
}

/* Lightbox Arrows - robust visibility */
.arrow {
    display: none;
    /* Always hidden by default */
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 50px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    z-index: 10002;
}

/* Only show arrows when lightbox is explicitly displayed */
#lightbox[style*="display: flex"] .arrow,
#lightbox[style*="display: block"] .arrow,
#lightbox:not([style*="display: none"]) .arrow {
    display: block;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    #hero {
        background-attachment: scroll;
        /* Fix for iOS Zoom issue */
        height: 90vh;
        /* Restore full height */
        min-height: 500px;
        background-position: center top;
    }

    /* ... existing mobile styles ... */
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 5rem;
    line-height: 1.1;
    font-weight: 900;
    margin-bottom: 25px;

    /* Transparent Background */
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
    padding: 15px 40px;
    border-radius: 30px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--color-text-dark);
    margin-bottom: 40px;

    /* Transparent Background */
    display: inline-block;
    /* fit-content behavior */
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    padding: 10px 30px;
    border-radius: 50px;
}

.highlight {
    background: linear-gradient(120deg, var(--color-fiat-yellow) 0%, var(--color-fiat-pink) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Corporate Extras */
.corporate-extras {
    margin-top: 40px;
    padding: 30px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.corporate-extras h4 {
    margin-bottom: 5px;
    font-size: 1.2rem;
    color: var(--color-text-dark);
}

.corporate-extras .subtitle {
    display: block;
    margin-bottom: 20px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Switcher */
.switcher-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.switcher-toggle {
    background: var(--color-gray-light);
    border-radius: 60px;
    padding: 5px;
    display: flex;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.switch-btn {
    border: none;
    background: transparent;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 2;
    transition: color 0.3s;
    width: 150px;
}

.switch-btn.active {
    color: white;
}

.switch-btn:not(.active) {
    color: var(--color-text-muted);
}

/* This logic needs JS to slide, but for vanilla we'll use active classes on buttons for background */
.switch-btn.active {
    background-color: var(--color-fiat-blue);
    /* Default for Rent */
}

#btn-buy.active {
    background-color: var(--color-fiat-pink);
}

/* Rent Section Styles */
.pricing-cards,
.config-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, border 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.card.selected {
    border-color: var(--color-fiat-green);
    transform: scale(1.02);
}

.card-header {
    padding: 20px;
    text-align: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bg-pink {
    background-color: var(--color-fiat-pink);
}

.bg-yellow {
    background-color: var(--color-fiat-yellow);
}

.bg-blue {
    background-color: var(--color-fiat-blue);
}

.bg-green {
    background-color: var(--color-fiat-green);
}

.card-body {
    padding: 30px;
    text-align: center;
}

.price {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-text-dark);
    margin-bottom: 10px;
}

.features {
    list-style: none;
    margin: 20px 0;
    color: var(--color-text-muted);
}

.features li {
    margin-bottom: 10px;
}

.badge-pop {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--color-fiat-yellow);
    color: var(--color-text-dark);
    font-size: 0.8rem;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 20px;
    z-index: 10;
}

/* Buy Config */
.card-img-real {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f8f9fa;
    border-bottom: 2px solid var(--color-gray-light);
}

.card-img-placeholder {
    height: 200px;
    background-color: #eee;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><text x="50" y="50" dominant-baseline="middle" text-anchor="middle" font-size="20">TOPOLINO</text></svg>');
    background-position: center;
    background-repeat: no-repeat;
}

/* Extras */
.extras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.extra-item {
    background: white;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 2px solid var(--color-gray-light);
    cursor: pointer;
    transition: 0.2s;
}

.extra-item:hover {
    border-color: var(--color-fiat-blue);
}

.extra-item input {
    margin-bottom: 10px;
    transform: scale(1.5);
}

/* Form */
.narrow-container {
    max-width: 600px;
}

.bg-light {
    background-color: var(--color-gray-light);
}

.summary-box {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 30px;
    border: 2px dashed var(--color-fiat-pink);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-fiat-blue);
}

.large-btn {
    font-size: 1.2rem;
    padding: 18px;
    margin-top: 20px;
}

.full-width {
    width: 100%;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 30px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    line-height: 20px;
}

/* Global Settings */
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

/* Utilities */
.text-center {
    text-align: center;
}

/* About Section & Specs */
#about {
    background-color: white;
    text-align: center;
}

.section-lead {
    max-width: 700px;
    margin: 0 auto 50px;
    font-size: 1.3rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.spec-item {
    padding: 20px;
    transition: transform 0.3s;
}

.spec-item:hover {
    transform: translateY(-10px);
}

.spec-val {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 5px;
    line-height: 1;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    /* Slight shadow for readability */
}

.spec-label {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--color-text-dark);
}

/* Global Section Padding Override for smoother flow */
section {
    padding: 60px 0;
    /* Reduced from 100px */
}

/* B2B About Block */
.about-b2b {
    margin-top: 30px;
    /* Reduced from 60px */
    padding: 30px;
    background: linear-gradient(to right, #f8f9fa, #fff);
    border: 2px dashed var(--color-fiat-blue);
    border-radius: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.about-b2b h4 {
    font-size: 1.8rem;
    color: var(--color-text-dark);
    margin-bottom: 15px;
}

.card-body .price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-fiat-blue);
    margin-bottom: 10px;
}

.card-body p {
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 30px;
    /* Increased from default */
}

.about-b2b p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.b2b-hint {
    font-weight: 700;
    color: var(--color-fiat-blue) !important;
    font-size: 0.95rem !important;
    margin-top: 20px;
    display: block;
}

.b2b-link {
    color: var(--color-fiat-blue);
    text-decoration: underline;
    font-weight: 700;
}

.b2b-link:hover {
    color: var(--color-fiat-pink);
}

/* Parallax Fix for Hero */
#hero {
    background-attachment: fixed;
}

/* Delivery Info */
.delivery-info {
    text-align: center;
    background: #e3f2fd;
    padding: 20px;
    border-radius: 15px;
    margin: 30px 0;
    border: 2px solid var(--color-fiat-blue);
}

.delivery-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--color-fiat-blue);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.delivery-info p {
    font-weight: 700;
    margin-bottom: 15px;
    margin-top: 5px;
    color: var(--color-text-dark);
}

.delivery-list {
    list-style: none;
    margin-top: 10px;
    padding: 0;
}

.delivery-list li {
    margin-bottom: 40px;
    font-size: 1.2rem;
    color: var(--color-text-light);
}

/* Vintage Gallery */
.vintage-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 60px auto 80px;
    position: relative;
    height: 350px;
}

.photo-card {
    width: 360px;
    height: 260px;
    background: white;
    padding: 15px 15px 45px 15px;
    /* Larger polaroid spacing */
    box-shadow: 2px 8px 20px rgba(0, 0, 0, 0.25);
    position: absolute;
    transition: transform 0.3s ease, z-index 0.3s;
    border: 1px solid #ddd;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.3) contrast(1.1);
    /* Vintage look */
    border: 1px solid #eee;
}

.card-left {
    transform: rotate(-10deg) translateX(-160px);
    z-index: 1;
}

.card-center {
    transform: rotate(2deg) translateY(-20px);
    z-index: 2;
}

.card-right {
    transform: rotate(10deg) translateX(160px);
    z-index: 1;
}

.photo-card:hover {
    z-index: 10;
    transform: scale(1.1) rotate(0deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Footer */

/* Lightbox Modal */
#lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

#lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 5px solid white;
    border-radius: 5px;
    animation: zoomIn 0.3s;
}

#lightbox .close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
}

#lightbox .close:hover,
#lightbox .close:focus {
    color: var(--color-fiat-yellow);
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Footer */
footer {
    background: #fdfdfd;
    color: var(--color-text-dark);
    padding: 60px 0 60px 0;
    /* Added top padding */
    margin-top: 80px;
    border-top: 1px solid #eee;
    position: relative;
    overflow: hidden;
}

/* Shared Rainbow Stripe */
.rainbow-stripe {
    height: 8px;
    width: 100%;
    background: linear-gradient(to right,
            var(--color-fiat-pink) 0%, var(--color-fiat-pink) 25%,
            var(--color-fiat-yellow) 25%, var(--color-fiat-yellow) 50%,
            var(--color-fiat-blue) 50%, var(--color-fiat-blue) 75%,
            var(--color-fiat-green) 75%, var(--color-fiat-green) 100%);
    position: absolute;
    /* Absolute positioning */
    top: 0;
    left: 0;
    z-index: 1000;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

/* ... existing styles ... */

#lightbox .close:hover,
#lightbox .close:focus {
    color: var(--color-fiat-yellow);
    text-decoration: none;
    cursor: pointer;
}

/* Lightbox Arrows */
.arrow {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 50px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    z-index: 10002;
    /* Ensure arrows are only visible inside open lightbox */
}

.arrow:hover {
    color: var(--color-fiat-yellow);
    background-color: rgba(0, 0, 0, 0.4);
}

.prev {
    left: 20px;
    border-radius: 3px 0 0 3px;
}

.next {
    right: 20px;
    border-radius: 3px 0 0 3px;
}

.centered-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.success-content {
    border-top: 8px solid var(--color-fiat-pink);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
}

.small-logo {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-tagline {
    font-size: 1.1rem;
    color: var(--color-text-light);
    font-style: italic;
}

.footer-contact,
.footer-links {
    flex: 1;
    min-width: 250px;
}

.footer-contact h4,
.footer-links h4 {
    color: var(--color-fiat-blue);
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-contact p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.contact-highlight {
    margin-top: 15px;
    font-weight: 700;
}

.contact-highlight a {
    color: var(--color-fiat-blue);
    text-decoration: none;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 5px;
    transition: color 0.3s;
}

.contact-highlight a:hover {
    color: var(--color-fiat-pink);
}

.footer-links a {
    color: var(--color-text-dark);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
    transition: color 0.3s;
    border-bottom: 2px solid var(--color-fiat-yellow);
}

.footer-links a:hover {
    color: var(--color-fiat-blue);
    border-color: var(--color-fiat-blue);
}

.copyright {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #999;
}

.legal-disclaimer {
    margin-top: 15px;
    font-size: 0.7rem;
    color: #ccc;
    line-height: 1.2;
    max-width: 300px;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .switcher-toggle {
        flex-direction: row;
        width: 100%;
    }

    .switch-btn {
        width: 50%;
    }

    /* Mobile Video Parallax Fix */
    .video-parallax-strip {
        height: auto;
        /* Let content dictate height */
        min-height: 200px;
    }

    .fixed-video-bg {
        position: relative !important;
        /* Force static positioning */
        width: 100% !important;
        height: auto !important;
        min-height: 0;
        min-width: 0;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        z-index: 1;
    }
}