:root {
    --base-font-size: 1rem;
    
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.125rem;
    --text-2xl: 1.25rem;
    --text-3xl: 1.5rem;
    --text-4xl: 1.75rem;
    --text-5xl: 2.25rem;
    --text-6xl: 3rem;
    
    --content-width: min(90%, 1200px);
    --content-padding: max(1rem, 5vw);
    
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    --max-w-content: var(--content-width);
    --content-padding: var(--content-padding);
}

html {
    font-size: var(--base-font-size);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-color);
    max-width: 100vw;
    overflow-x: hidden;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--content-padding);
    box-sizing: border-box;
}
@keyframes magicPulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.99);
    }
}

@keyframes magicShine {
    0% {
        transform: translateX(-100%) rotate(10deg);
        opacity: 0.7;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) rotate(10deg);
        opacity: 0.7;
    }
}

.skeleton-loader {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 50%, #1a202c 100%);
    background-size: 200% 200%;
    position: relative;
    overflow: hidden;
    animation: backgroundFlow 12s ease infinite;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.3), 0 2px 8px -4px rgba(0, 0, 0, 0.2);
}

.skeleton-loader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(99, 102, 241, 0) 0%, 
        rgba(99, 102, 241, 0.4) 30%, 
        rgba(99, 102, 241, 0.6) 50%,
        rgba(99, 102, 241, 0.4) 70%,
        rgba(99, 102, 241, 0) 100%);
    animation: magicShine 3s infinite;
    transform: translateX(-100%) rotate(10deg);
    filter: blur(12px);
    opacity: 0.7;
}

@keyframes backgroundFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes magicPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.8; }
}

.hero-image-container.loading {
    animation: magicPulse 3s ease-in-out infinite;
    background: #f0f0f0;
}

.hero-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    margin: 2rem 0;
    border-radius: 1rem;
    overflow: visible;
    padding: 10px;
    isolation: isolate;
}

.grid .skeleton-loader {
    width: 100%;
    aspect-ratio: 1/1;
    max-height: 300px;
    margin: 0 auto;
    border-radius: 1rem;
}

@media (min-width: 768px) {
    .grid .skeleton-loader {
        max-height: 250px;
    }
}

:root {
    --primary: #323A46;
    --text: #2d3748;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
}


.container {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    position: relative;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    padding-bottom: 6rem;
}

section {
    padding: 4rem 0;
}

.intro-section {
    margin: 0 auto;
}

footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text);
    font-size: 0.875rem;
    margin-top: 4rem;
}

footer p {
    margin-top: 20px;
}

.footer-content {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1.5rem;
}


h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1.2rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 2rem 0 1rem;
}

p {
    color: var(--text);
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.hero-heading {
    font-size: var(--text-6xl);
    max-width: min(800px, 90vw);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    width: 100%;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

h1, .h1 {
    font-size: var(--text-5xl);
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

h2, .h2 {
    font-size: var(--text-4xl);
    max-width: 100%;
}

h3, .h3 {
    font-size: var(--text-3xl);
    max-width: 100%;
}

.lead {
    font-size: var(--text-lg);
    max-width: 100%;
    line-height: 1.5;
}


.logo {
    text-decoration: none;
    height: 40px; /* Mat    ch header height */
}

.logo-img {
    height: 24px;
    width: auto;
    display: block;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.login-link {
    display: flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.login-link:hover {
    color: var(--primary);
}

.login-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}


.btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.125rem;
    font-weight: 600;
    box-shadow: 0 0 30px 4px rgba(255, 255, 255, 1);
    transition: all 0.3s ease-in-out;
    letter-spacing: 0.5px;
}


/* Utility Classes */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Sticky Container */
.sticky-container {
    position: sticky;
    top: 20px;
    z-index: 100;
    padding: 10px 0;
    margin: -10px 0 4rem;
    background: transparent;
    text-align: center;
}


.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    /* Ensure smooth scaling */
    transition: width 0.3s ease;
    /* Add shadow similar to grid images */
    box-shadow: 0 0 32px 8px rgba(0, 0, 0, 0.25);
    /* Ensure shadow is visible */
    transform: translateZ(0);
}

/* Grid Images */
.grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1;
    display: block;
}

/* Grids */
.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.image-grid {
    max-width: 500px;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Images */
img {
    border-radius: 1rem;
    max-width: 100%;
    height: auto;
    box-shadow: 0 0 32px 8px rgba(0, 0, 0, 0.25);
}

/* Car group images - no shadow with spacing */
.car-group-image {
    margin-bottom: 0.75rem;
}

.car-group-image img {
    box-shadow: none !important;
}

/* Card emoji styling */
.card-emoji {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Price styling */
.card-desc:last-child {
    font-weight: 600;
    font-style: italic;
    color: #2d3748;
    margin-top: 0.25rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.grid-image {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
    animation-timeline: view();
    animation-range: entry 20% cover 50%;
}

/* Placeholders - Keeping these styles for reference */
.placeholder {
    display: none; /* Hide placeholders as we're using real images now */
}

/* Comparison Section */

.table-container {
    overflow-x: auto;
    margin: 2rem 0;
    -webkit-overflow-scrolling: touch;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    overflow: hidden;
    table-layout: fixed;
    font-size: 0.9375rem;
}

.comparison-table th,
.comparison-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.comparison-table th {
    font-weight: 600;
    color: #1f2937;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
    padding: 0.75rem 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.comparison-table th:first-child {
    width: 40%;
    text-align: left;
    padding-left: 1rem;
    font-size: 0.8125rem;
    text-transform: none;
    letter-spacing: normal;
}

.comparison-table th:not(:first-child) {
    width: 30%;
    text-align: center;
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.comparison-table td {
    font-size: 0.9375rem;
    color: #4b5563;
}

/* Column widths are now set in the previous rule */

.comparison-table td:first-child {
    padding-left: 1rem;
    padding-right: 0.5rem;
    font-size: 0.9375rem;
    color: #4b5563;
    width: 20%;
}

.comparison-table td:not(:first-child) {
    width: 20%;
    text-align: center;
    font-size: 1.25rem;
    color: #1f2937;
    padding: 0.75rem 0.25rem;
}

.comparison-table tr:hover td {
    background-color: transparent;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .comparison-section {
        margin: 2.5rem 0;
    }
    
    .comparison-section h2 {
        font-size: var(--text-2xl);
    }
    
    .comparison-section .lead {
        font-size: var(--text-base);
        margin-bottom: 2rem;
    }
    
    .comparison-table {
        font-size: 0.875rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.6rem 0.3rem;
    }
    
    .comparison-table th {
        font-size: 0.7rem;
        padding: 0.6rem 0.3rem;
        white-space: nowrap;
    }
    
    .comparison-table th:first-child {
        width: 35%;
        font-size: 0.75rem;
        padding-left: 0.75rem;
    }
    
    .comparison-table td:first-child {
        font-size: 0.875rem;
        padding-left: 0.75rem;
    }
}

nav a {
    margin-left: 2rem;
    text-decoration: none;
    color: var(--text);
}

nav a:hover {
    text-decoration: underline;
}


.slider-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 1.5rem 0;
    position: relative;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 1rem;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(90deg, 
        transparent 0%, 
        #fff 1rem, 
        #fff calc(100% - 1rem), 
        transparent 100%);
    mask-image: linear-gradient(90deg, 
        transparent 0%, 
        #fff 1rem, 
        #fff calc(100% - 1rem), 
        transparent 100%);
}

.slider-container::-webkit-scrollbar {
    display: none;
}

.slider-track {
    display: flex;
    gap: 1rem;
    padding: 0 1rem;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
    width: max-content;
    max-width: 100%;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.slider-item {
    flex: 0 0 200px;
    height: 200px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    flex-shrink: 0;
}

.card {
    background: #F3F7F9;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem 1rem;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #E1E9ED;
    color: #2C3E50;
    text-decoration: none;
    transition: all 0.2s ease;
}

.card-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.9;
}

.card-title {
    font-size: var(--text-lg);
    font-weight: 600;
    display: block;
    line-height: var(--leading-tight);
    margin: 0;
    text-align: center;
}

@media (min-width: 640px) {
    .card-title {
        font-size: var(--text-xl);
    }
}

.card:hover {
    background-color: #E8F0F3;
    text-decoration: none;
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.card h3 {
    font-size: var(--text-base);
    font-weight: 600;
    color: #2C3E50;
    margin: 0 0 0.5rem 0;
    line-height: var(--leading-tight);
}

.car-desc {
    font-size: var(--text-sm);
    color: #5D6D7E;
    margin: 0 0 0.25rem 0;
    line-height: var(--leading-tight);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    background-color: #EFF5F8;
}

@media (min-width: 640px) {
    .slider-item {
        flex: 0 0 200px;
        height: 220px;
    }
    
    .card h3 {
        font-size: var(--text-lg);
    }
    
    .car-desc {
        font-size: var(--text-base);
    }
}

.slider-container {
    -ms-overflow-style: none;
}
.slider-track {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.slider-track::after {
    content: '';
    min-width: 1px;
    height: 1px;
    flex-shrink: 0;
    scroll-snap-align: end;
}

.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}


