/* ============================================
   CLEAR ROUND - STYLESHEET
   ============================================ */

/* CSS Variables */
:root {
    /* Colors - Primary */
    --dark-blue: #06589C;
    --deep-navy: #033A66;
    --steel-blue: #3A6F9A;
    --light-steel-blue: #7FA8C8;
    
    /* Colors - Teal */
    --soft-teal: #97BFB4;
    --light-teal: #C7DFD9;
    --deep-teal: #4F8F87;
    
    /* Colors - Green */
    --olive-green: #9DA65D;
    --muted-olive: #B6BC87;
    --forest-green: #5F6B3A;
    --dark-forest: #3F4A28;
    
    /* Colors - Neutral */
    --warm-gray: #474746;
    --medium-gray: #7A7A78;
    --light-gray: #C5C3C3;
    --off-white: #F2F1EE;
    --sand-beige: #D7C5A5;
    --warm-sand: #EADFCA;
    
    /* Colors - Accent */
    --rust-orange: #E87A00;
    --burnt-orange: #C86400;
    --soft-yellow: #FFD407;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --spacing-xxl: 4rem;
    
    /* Container */
    --container-max-width: 1200px;
    --container-padding: 1.5rem;
}



/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--warm-gray);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--dark-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--rust-orange);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

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

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
    margin-bottom: 1rem;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
}

section {
    padding: var(--spacing-xl) 0;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--rust-orange);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--burnt-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 122, 0, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--off-white);
    border: 2px solid var(--off-white);
    padding: 0.675rem 1.5rem;
}

.btn-secondary:hover {
    background-color: var(--off-white);
    color: var(--warm-gray);
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--warm-gray);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
    max-width: 200px;
}

@media (max-width: 768px) {
    .logo img {
        height: 40px;
        max-width: 150px;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    flex: 1;
    justify-content: center;
}

.nav-menu a {
    color: var(--off-white);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--rust-orange);
}

.nav-menu a.active {
    color: var(--rust-orange);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--off-white);
    transition: all 0.3s ease;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-wrapper:focus-within {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-input {
    background: none;
    border: none;
    color: var(--off-white);
    font-size: 0.9rem;
    padding: 0;
    width: 180px;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Mobile Navigation */

/* iOS Safari fixes */
.mobile-menu-toggle {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
}

/* Mobile Navigation */
@media (max-width: 968px) {
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav-wrapper {
        padding: 0.75rem 0;
    }
    
    .logo img {
        height: 40px;
    }
    
    .nav-menu {
        position: fixed;
        top: 72px;
        left: -100%;
        flex-direction: column;
        background-color: var(--warm-gray);
        width: 100%;
        height: calc(100vh - 72px);
        height: calc(100svh - 72px); /* iOS Safari viewport fix */
        padding: 2rem;
        gap: 1.5rem;
        transition: left 0.3s ease;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
        z-index: 9999;
        justify-content: flex-start !important;
    }
    
    .nav-menu.active {
        left: 0;
        display: flex !important;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: left;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .search-wrapper {
        display: none;
    }
}
/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    max-height: 900px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 82px;
}

.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dölj video-kontroller och play-knapp */
.hero-video::-webkit-media-controls {
    display: none !important;
}

.hero-video::-webkit-media-controls-enclosure {
    display: none !important;
}

.hero-video::-webkit-media-controls-panel {
    display: none !important;
}

.hero-video::-webkit-media-controls-play-button {
    display: none !important;
}

.hero-video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

/* Custom play button overlay */
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}

.video-play-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: auto;
    opacity: 0.9;
}

.video-play-button:hover {
    transform: scale(1.1);
    opacity: 1;
}

.video-play-button:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .video-play-button svg {
        width: 60px;
        height: 60px;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(71, 71, 70, 0.3), rgba(71, 71, 70, 0.6));
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 var(--container-padding);
    max-width: 900px;
}

.hero-content h1 {
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 0;
}

/* Page hero - undersidor */
.page-hero {
    margin-top: 82px;
    padding: 3rem 0;
    text-align: center;
}


/* ============================================
   USP SECTION
   ============================================ */

.usp-section {
    padding: 0;
    margin-top: -4rem;
    position: relative;
    z-index: 10;
}

.usp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
}

.usp-box {
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.usp-box h3 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.usp-label {
    background-color: #ffffff;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.usp-blue {
    background-color: var(--dark-blue);
}

.usp-blue .usp-label {
    color: var(--dark-blue);
}

.usp-teal {
    background-color: var(--soft-teal);
}

.usp-teal .usp-label {
    color: var(--deep-teal);
}

.usp-green {
    background-color: var(--olive-green);
}

.usp-green .usp-label {
    color: var(--forest-green);
}

.usp-orange {
    background-color: var(--rust-orange);
}

.usp-orange .usp-label {
    color: var(--rust-orange);
}

@media (max-width: 768px) {
    .usp-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .usp-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   NEWS SECTION
   ============================================ */

.news-section {
    background: linear-gradient(135deg, var(--deep-navy) 0%, var(--dark-blue) 100%);
    padding: var(--spacing-lg) 0;
    display: none; /* Döljs som standard */
    margin-top: var(--spacing-lg);
}

.news-section.has-news {
    display: block; /* Visas endast när nyheter finns */
}

.news-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    position: relative;
}

.news-badge {
    display: inline-block;
    background-color: var(--rust-orange);
    color: #ffffff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

/* Karusell container */
.news-carousel {
    position: relative;
    overflow: hidden;
}

.news-carousel-wrapper {
    position: relative;
    width: 100%;
}

.news-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.news-content {
    flex: 0 0 100%;
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: var(--spacing-md);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-content h3 {
    color: #ffffff;
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
}

.news-content p {
    color: var(--light-teal);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.news-date {
    color: var(--light-steel-blue);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.5rem;
    display: block;
}

/* Karusell navigation */
.news-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.news-arrow {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    font-weight: bold;
}

.news-arrow:hover {
    background-color: var(--rust-orange);
    border-color: var(--rust-orange);
    transform: scale(1.1);
}

.news-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: scale(1);
}

.news-arrow:disabled:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Dots navigation */
.news-dots {
    display: flex;
    gap: 0.5rem;
}

.news-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.news-dot.active {
    background-color: var(--rust-orange);
    width: 30px;
    border-radius: 5px;
}

.news-dot:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* Counter */
.news-counter {
    color: var(--light-steel-blue);
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .news-section {
        padding: var(--spacing-md) 0;
        margin-top: var(--spacing-md);
    }
    
    .news-content {
        padding: 1.25rem;
        min-height: 130px;
    }
    
    .news-content h3 {
        font-size: 1.15rem;
        margin-bottom: 0.5rem;
    }
    
    .news-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .news-arrow {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .news-badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.85rem;
    }
}

/* ============================================
   FEATURED CARS SECTION
   ============================================ */

.featured-cars-section {
    background-color: #ffffff;
    padding: var(--spacing-xxl) 0;
}

.featured-cars-section h2 {
    text-align: center;
    color: var(--warm-gray);
    margin-bottom: var(--spacing-xl);
    font-size: clamp(2rem, 4vw, 2.75rem);
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.car-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.car-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.car-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.car-card:hover .car-image img {
    transform: scale(1.08);
}

.car-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--rust-orange);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.car-content {
    padding: var(--spacing-md);
}

.car-content h3 {
    color: var(--warm-gray);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.car-content p {
    color: var(--medium-gray);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.car-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: var(--spacing-md);
}

.car-content .btn-primary {
    width: 100%;
    text-align: center;
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    background-color: transparent;
    color: var(--warm-gray);
    border: 1px solid var(--light-gray);
    font-weight: 500;
}

.car-content .btn-primary:hover {
    background-color: var(--warm-gray);
    color: #ffffff;
    border-color: var(--warm-gray);
    box-shadow: none;
    transform: none;
}

.view-all-cars {
    text-align: center;
    margin-top: var(--spacing-xl);
}

.btn-secondary-dark {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid var(--warm-gray);
    background-color: transparent;
    color: var(--warm-gray);
}

.btn-secondary-dark:hover {
    background-color: var(--warm-gray);
    color: #ffffff;
}

@media (max-width: 1024px) {
    .cars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cars-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* ============================================
   SEO TEXT SECTION
   ============================================ */

.seo-section {
    background-color: #ffffff;
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.seo-section p {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--medium-gray);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background-color: var(--deep-navy);
    color: var(--light-gray);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-column h3 {
    color: var(--off-white);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--light-gray);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--rust-orange);
}

.footer-cta {
    text-align: center;
    padding: var(--spacing-lg) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--spacing-md);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
}

.footer-bottom p {
    font-size: 0.9rem;
    color: var(--medium-gray);
    margin-bottom: 0;
}

.footer-bottom a {
    color: var(--light-steel-blue);
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    :root {
        --spacing-xl: 3rem;
        --spacing-lg: 2rem;
    }
    
    section {
        padding: var(--spacing-lg) 0;
    }
    
    .hero {
        min-height: 500px;
        margin-top: 62px;
    }
    
    .usp-section {
        margin-top: -2rem;
    }
    
    .usp-box {
        padding: 2rem 1.5rem;
        min-height: 180px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}