:root {
    --primary: #005D8A;
    --primary-dark: #00456B;
    --primary-light: #0074D9;
    --secondary: #FFC107;
    --secondary-dark: #E6AD00;
    --success: #28A745;
    --info: #17A2B8;
    --warning: #FFC107;
    --danger: #DC3545;
    --light: #F8F9FA;
    --dark: #212529;
    --gray: #6C757D;
    --gray-dark: #343A40;
    --gray-100: #F8F9FA;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;
    --white: #FFFFFF;
    --font-sans-serif: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    --transition-base: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans-serif);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.5;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: var(--white);
    padding: 8px;
    z-index: 1100;
    transition: top 0.3s;
    border-radius: 0 0 var(--border-radius) 0;
}

.skip-link:focus {
    top: 0;
    text-decoration: none;
    color: var(--white);
}

/* Header Styles */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.site-header .navbar {
    padding: 1rem 0;
}

.site-header .navbar-brand {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.site-header .navbar-brand:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.site-header .nav-link {
    color: var(--gray-700);
    font-weight: 600;
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition-base);
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
    color: var(--primary);
    background-color: var(--gray-100);
}

.site-header .nav-link.active {
    color: var(--primary);
    background-color: rgba(0, 93, 138, 0.1);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 5rem 0;
    overflow: hidden;
}

.hero-sweden {
    background: var(--gradient-primary);
    color: var(--white);
}

.hero-pattern {
    position: absolute;
    top: 0;
    right: -20%;
    bottom: 0;
    width: 50%;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.95;
}

/* Section Spacing */
.section-padding {
    padding: 5rem 0;
}

.section-gray {
    background-color: var(--gray-100);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--gray-900);
}

/* Route Highlights */
.route-highlights {
    display: grid;
    gap: 2rem;
    margin: 3rem 0;
}

.highlight-item {
    display: flex;
    align-items: start;
    gap: 1.5rem;
}

.highlight-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: var(--shadow);
}

.highlight-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.highlight-item p {
    margin: 0;
    color: var(--gray-600);
}

/* Info Card */
.info-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: var(--transition-base);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1.5rem 3.5rem rgba(0, 0, 0, 0.2);
}

.info-card-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1.5rem;
    text-align: center;
}

.info-card-header h3 {
    color: var(--white);
    margin: 0;
    font-size: 1.5rem;
}

.info-card-body {
    padding: 2rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.feature-list li:last-child {
    border-bottom: none;
}

.price-display {
    text-align: center;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

.price-label {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.price-value {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin: 0.5rem 0;
}

.price-unit {
    display: block;
    font-size: 1rem;
    color: var(--gray-600);
}

/* Route Cards */
.route-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.route-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.route-card-header {
    padding: 2rem;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    position: relative;
}

.route-card-header.recommended {
    background: linear-gradient(135deg, #28A745 0%, #20c997 100%);
    color: var(--white);
}

.route-card-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.route-card-header.recommended h3 {
    color: var(--white);
}

.route-card-header .badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.route-card-body {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Route Map */
.route-map {
    background: var(--gray-100);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.route-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.step-marker {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content strong {
    display: block;
    color: var(--gray-900);
}

.step-content .text-muted {
    font-size: 0.875rem;
}

.route-connector {
    width: 2px;
    height: 30px;
    background: var(--gray-400);
    margin-left: 19px;
    margin-bottom: 1rem;
}

/* Route Details */
.route-details {
    margin-top: auto;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--gray-600);
    font-weight: 600;
}

.detail-item ul {
    margin: 0;
    padding-left: 1.25rem;
}

/* Calculator */
.calculator-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
}

.calculator-form .form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

.calculator-form .form-control,
.calculator-form .form-select {
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.875rem 1rem;
    transition: var(--transition-fast);
}

.calculator-form .form-control:focus,
.calculator-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(0, 93, 138, 0.25);
}

.calculator-form .form-control-lg,
.calculator-form .form-select-lg {
    font-size: 1.125rem;
    padding: 1rem 1.25rem;
}

/* Calculator Results */
.calculator-results {
    background: var(--gray-100);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.price-breakdown {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.price-breakdown h4 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.price-item:last-child {
    border-bottom: none;
}

.price-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.savings-info {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.savings-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

.savings-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--success);
}

.savings-percentage {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    background: var(--success);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
}

/* Tip Cards */
.tip-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    height: 100%;
    transition: var(--transition-base);
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tip-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.tip-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.tip-card p {
    color: var(--gray-600);
    margin: 0;
}

/* Accordion Overrides */
.accordion-item {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.accordion-button {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    background-color: var(--white);
    padding: 1.25rem 1.5rem;
    border: none;
}

.accordion-button:not(.collapsed) {
    color: var(--primary);
    background-color: var(--gray-100);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 93, 138, 0.25);
    border-color: transparent;
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23005D8A'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
    padding: 1.5rem;
    color: var(--gray-700);
}

/* CTA Section */
.section-cta {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--white);
}

.cta-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Buttons */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition-base);
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 93, 138, 0.25);
}

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: var(--dark);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--dark);
}

.btn-secondary:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
}

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

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

.btn-outline-light {
    color: var(--white);
    border-color: var(--white);
    background-color: transparent;
}

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

.btn-success {
    background-color: var(--success);
    border-color: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background-color: #1e7e34;
    border-color: #1c7430;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Footer */
.site-footer {
    background-color: var(--gray-900);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.site-footer h5 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.site-footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-fast);
}

.site-footer a:hover {
    color: var(--white);
    text-decoration: underline;
}

.site-footer .list-unstyled {
    padding-left: 0;
    list-style: none;
}

.site-footer .list-unstyled li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 1.5rem 3.5rem rgba(0, 0, 0, 0.2);
}

/* Responsive Styles */
@media (max-width: 1199px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 991px) {
    .section-padding {
        padding: 3rem 0;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero-pattern {
        display: none;
    }
    
    .calculator-container {
        padding: 2rem;
    }
}

@media (max-width: 767px) {
    /* Typography */
    h1, .hero-title {
        font-size: 2rem;
    }
    
    h2, .section-title {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .lead {
        font-size: 1.125rem;
    }
    
    /* Navigation */
    .site-header .navbar-nav {
        padding: 1rem 0;
    }
    
    .site-header .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.25rem 0;
    }
    
    /* Sections */
    .section-padding {
        padding: 2.5rem 0;
    }
    
    .hero {
        padding: 2.5rem 0;
    }
    
    /* Cards and Components */
    .info-card-body,
    .route-card-body,
    .tip-card {
        padding: 1.5rem;
    }
    
    .calculator-container {
        padding: 1.5rem;
        box-shadow: var(--shadow);
    }
    
    .price-value {
        font-size: 2.5rem;
    }
    
    .savings-amount {
        font-size: 2rem;
    }
    
    .savings-percentage {
        font-size: 1.5rem;
        padding: 0.25rem 1rem;
    }
    
    .savings-display {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Route Map */
    .route-map {
        padding: 1rem;
    }
    
    .step-marker {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
    
    .route-connector {
        margin-left: 17px;
    }
    
    /* Buttons */
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Footer */
    .site-footer {
        padding: 3rem 0 2rem;
    }
    
    .footer-bottom {
        margin-top: 2rem;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 3rem;
        height: 3rem;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 1.25rem;
    }
}

@media (max-width: 575px) {
    /* iPhone 7 and similar small devices */
    body {
        font-size: 0.9375rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Smaller padding on mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .info-card-body,
    .route-card-body,
    .calculator-container {
        padding: 1.25rem;
    }
    
    /* Route highlights */
    .highlight-item {
        gap: 1rem;
    }
    
    .highlight-icon {
        width: 50px;
        height: 50px;
    }
    
    .highlight-icon svg {
        width: 20px;
        height: 20px;
    }
    
    /* Smaller form controls on mobile */
    .calculator-form .form-control-lg,
    .calculator-form .form-select-lg {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
    
    /* Price display adjustments */
    .price-value {
        font-size: 2rem;
    }
    
    .price-display {
        padding: 1rem;
    }
    
    /* Accordion adjustments */
    .accordion-button {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .accordion-body {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .back-to-top,
    .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .hero {
        background: none !important;
        color: var(--dark) !important;
    }
    
    .hero-title,
    .hero-subtitle {
        color: var(--dark) !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background-color: var(--dark);
        border-color: var(--dark);
    }
    
    .btn-primary:hover {
        background-color: var(--black);
        border-color: var(--black);
    }
    
    .btn-outline-primary {
        border-width: 3px;
    }
}

/* Focus Visible */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Resize Animation Stopper */
.resize-animation-stopper * {
    animation: none !important;
    transition: none !important;
}