/**
 * Stylesheet för Distriktsdomare.se
 * Modern design med hockey-tema - Uppdaterad med mer liv och animationer
 */

/* CSS Variables för enkel theming */
:root {
    --primary-color: #1e3c72;
    --primary-dark: #152d56;
    --primary-light: #2a5298;
    --primary-bright: #3d6bb3;
    --secondary-color: #ff6b35;
    --secondary-light: #ff8c5a;
    --accent-color: #f7931e;
    --accent-light: #ffb347;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #999999;
    --bg-light: #f8f9fa;
    --bg-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.2);
    --shadow-colored: 0 8px 24px rgba(30, 60, 114, 0.2);
    --max-width: 1200px;
    --spacing: 20px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-white);
    font-size: 16px;
    overflow-x: hidden;
}

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

/* Image styling */
.image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: var(--primary-light);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.6s ease-out;
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    gap: 1rem;
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 700;
    transition: transform 0.3s ease;
    color: white;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo:hover {
    transform: scale(1.05);
    color: white;
}

.logo-icon {
    font-size: 4.4rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon img {
    width: 4.4rem;
    height: 4.4rem;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.logo-text {
    white-space: nowrap;
}

.main-nav {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 1;
    min-width: 0;
    overflow: visible;
}

.nav-link {
    color: white;
    font-weight: 500;
    padding: 0.7rem 0.95rem;
    position: relative;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: fit-content;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    border-radius: 3px 3px 0 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

.nav-link:hover {
    color: white;
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.nav-link:hover::before {
    width: 100%;
    height: 100%;
    opacity: 1;
    border-radius: 8px;
}

.nav-link:hover::after {
    width: 70%;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active::before {
    width: 100%;
    height: 100%;
    opacity: 1;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active::after {
    width: 70%;
}

/* AI Chat Link - Snygg styling på desktop */
.nav-link-ai {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: white !important;
    font-weight: 600;
    padding: 0.7rem 1.15rem;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.35);
    border: none;
    position: relative;
    overflow: hidden;
    margin-left: 0.25rem;
    flex-shrink: 0;
    min-width: fit-content;
    font-size: 0.875rem;
}

.nav-link-ai::before {
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
}

.nav-link-ai::after {
    display: none; /* Ingen bottom border för AI-länken */
}

.nav-link-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary-color) 100%);
}

.nav-link-ai:hover::before {
    opacity: 1;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.nav-link-ai.active {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.nav-link-ai.active::before {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.7em;
    margin-left: 0.3em;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-link:hover {
    background: var(--bg-light);
    color: var(--primary-light);
    border-left-color: var(--secondary-color);
    padding-left: 1.75rem;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1001;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-toggle span {
    width: 26px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.mobile-menu-toggle.active {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--primary-light) 100%);
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
}

.hero-background-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(21, 45, 86, 0.8) 0%, rgba(30, 60, 114, 0.7) 50%, rgba(42, 82, 152, 0.6) 100%);
}

.hero-image-wrapper {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.hero-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    margin: 0 auto;
    display: block;
    border: 4px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: shimmer 20s linear infinite;
    opacity: 0.3;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 50m-40 0a40 40 0 1 1 80 0a40 40 0 1 1 -80 0' stroke='%23ffffff' stroke-width='0.5' fill='none' opacity='0.1'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #e0e8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-weight: 400;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
    animation: pulse 2s ease-in-out infinite;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Ad Spaces */
.sponsor-space {
    padding: 2.5rem 0;
    background: var(--bg-gradient);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

/* Större annons i topplacering */
.sponsor-space.sponsor-top .sponsor-content {
    width: 100%;
}

.sponsor-space.sponsor-top .adtraction-ad-container,
.sponsor-space.sponsor-top .adtraction-ad-wrapper,
.sponsor-space.sponsor-top [data-ad-type="sponsored"] {
    width: 100%;
    max-width: 970px;
    margin: 0 auto;
}

.sponsor-space.sponsor-top .sponsor-content img,
.sponsor-space.sponsor-top .sponsor-content iframe,
.sponsor-space.sponsor-top .sponsor-content ins {
    width: 100% !important;
    max-width: 970px;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

/* Mobile: bättre visning av reklam */
@media (max-width: 768px) {
    .sponsor-space {
        padding: 1.5rem 0;
    }
    
    .sponsor-space.sponsor-top {
        margin-top: 0;
    }
}

.sponsor-placeholder {
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    color: var(--text-light);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sponsor-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

.sponsor-placeholder:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.sponsor-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.sponsor-sidebar .sponsor-placeholder {
    padding: 2rem;
    min-height: 250px;
    margin-bottom: 2rem;
}

.sponsor-content {
    width: 100%;
    text-align: center;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsor-sidebar .sponsor-content {
    min-height: 250px;
    margin-bottom: 2rem;
}

.sponsor-content iframe,
.sponsor-content img,
.sponsor-content div {
    max-width: 100%;
    height: auto;
}

/* Main Content */
.main-content {
    padding: 4rem 0;
    background: var(--bg-white);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 4rem;
}

/* Mobile-first: ändra ordning så sidebar kommer först */
@media (max-width: 968px) {
    .content-grid {
        display: flex;
        flex-direction: column;
    }
}

.content-section {
    margin-bottom: 5rem;
    /* Ta bort auto-animation för att undvika blinkning - använd fade-in istället */
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    border-radius: 3px;
    animation: slideInRight 0.6s ease-out;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.info-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.card-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: var(--bg-light);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:hover .card-image {
    transform: scale(1.1);
}

.info-card .card-content {
    padding: 2rem 2.5rem 2.5rem;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.info-card:hover::before {
    transform: scaleX(1);
}

.info-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.card-icon {
    font-size: 3rem;
    margin: -1.5rem auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    background: var(--bg-white);
    padding: 0.75rem;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    position: relative;
    z-index: 2;
}

.info-card:hover .card-icon {
    animation: pulse 0.6s ease-in-out;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
    padding: 0 1rem;
}

.card-text {
    padding: 0 1rem;
}

.info-card:hover .card-title {
    color: var(--primary-light);
}

/* Ensure info-card links work properly */
a.info-card {
    cursor: pointer;
    text-decoration: none;
}

a.info-card:hover {
    text-decoration: none;
}

.card-text {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

/* Community Content */
.community-content {
    background: var(--bg-gradient);
    padding: 0;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.community-image-wrapper {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.community-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.community-content:hover .community-image {
    transform: scale(1.05);
}

.community-content .intro-text {
    padding: 3rem 3rem 2rem;
}

.community-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(30, 60, 114, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.intro-text {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    line-height: 1.9;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.community-content .feature-box {
    margin: 0 3rem 1.5rem;
}

.feature-box {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--primary-color);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.community-content .feature-box:last-child {
    margin-bottom: 3rem;
}

.feature-box:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--secondary-color);
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-title::before {
    content: '▶';
    font-size: 0.8rem;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.feature-box:hover .feature-title::before {
    transform: translateX(5px);
}

/* Ensure feature-box links work properly */
a.feature-box {
    cursor: pointer;
    text-decoration: none;
}

a.feature-box:hover {
    text-decoration: none;
}

.feature-box p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

/* Ensure resource-item links work properly */
a.resource-item {
    cursor: pointer;
    text-decoration: none;
}

a.resource-item:hover {
    text-decoration: none;
}

.resource-item {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    padding: 2rem;
    border-radius: 12px;
    border-top: 4px solid var(--secondary-color);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.resource-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.resource-item:hover::after {
    opacity: 1;
}

.resource-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--accent-color);
}

.resource-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.resource-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.sidebar-image-widget {
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
}

.sidebar-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-image-widget:hover .sidebar-image {
    transform: scale(1.1);
}

.sidebar-widget:hover {
    box-shadow: var(--shadow-lg);
}

.widget-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-light);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
}

.quick-links {
    list-style: none;
}

.quick-links li {
    margin-bottom: 0.5rem;
}

.quick-links a {
    color: var(--text-secondary);
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding-left: 2rem;
}

.quick-links a::before {
    content: '→';
    position: absolute;
    left: 0.75rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: var(--secondary-color);
}

.quick-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.quick-links a:hover {
    background: linear-gradient(90deg, rgba(30, 60, 114, 0.05) 0%, transparent 100%);
    color: var(--primary-color);
    transform: translateX(5px);
}

.updates-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.update-item {
    padding: 1.25rem;
    background: var(--bg-gradient);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.update-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--secondary-color);
}

.update-date {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.update-text {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.5;
}

/* Contact Section */
.contact-section {
    background: var(--bg-gradient);
    padding: 5rem 0;
    margin-top: 5rem;
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231e3c72' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.contact-image-wrapper {
    width: 100%;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.contact-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-image-wrapper:hover .contact-image {
    transform: scale(1.05);
}

.contact-content > p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-item {
    padding: 2rem 3rem;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.contact-item strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.contact-item span {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 5rem;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.footer-section p {
    opacity: 0.9;
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: white;
    opacity: 0.85;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.25rem 0;
}

.footer-links a:hover {
    opacity: 1;
    transform: translateX(5px);
    color: var(--secondary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* Scroll animations - förbättrad för att undvika blinkning */
/* Sätt initial state endast på element som inte redan är synliga */
.info-card:not(.js-visible),
.feature-box:not(.js-visible),
.resource-item:not(.js-visible),
.sidebar-widget:not(.js-visible),
.update-item:not(.js-visible) {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* När fade-in läggs till, animera till synlig */
.info-card.fade-in,
.feature-box.fade-in,
.resource-item.fade-in,
.sidebar-widget.fade-in,
.update-item.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Call to Action Links */
.content-section a[target="_blank"]:hover,
.content-section a[href*="chat/"]:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.sidebar-widget a[target="_blank"]:hover,
.sidebar-widget a[href*="chat/"]:hover {
    background: #2a5298 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        display: flex;
        flex-direction: column;
    }
    
    /* Placera sidebar efter innehållet på mobil */
    .sidebar {
        position: static;
        order: 2;
        margin-top: 2rem;
    }
    
    .content-main {
        order: 1;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Förbättra sidebar-widgets på mobil */
    .sidebar-widget {
        margin-bottom: 1.5rem;
        padding: 1.5rem;
    }
    
    .sponsor-sidebar {
        margin-bottom: 1.5rem;
    }
    
    .sponsor-sidebar .sponsor-content {
        min-height: auto;
        padding: 1rem;
    }
    
    /* Förbättra spacing */
    .main-content {
        padding: 2.5rem 0;
    }
    
    .content-section {
        margin-bottom: 3rem;
    }
}

@media (max-width: 768px) {
    /* Förbättra container padding */
    .container {
        padding: 0 1.25rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .hero {
        padding: 3.5rem 0;
    }
    
    .hero-image {
        max-width: 100%;
        margin: 0 auto 1.5rem;
    }
    
    .hero-image-wrapper {
        margin-bottom: 1.5rem;
    }
    
    .community-image-wrapper {
        height: 250px;
    }
    
    .contact-image {
        height: 250px;
    }
    
    /* Förbättra sponsor-space på mobil */
    .sponsor-space {
        padding: 2rem 0;
    }
    
    .sponsor-content {
        padding: 1rem;
        min-height: auto;
        justify-content: center;
    }

    .sponsor-content .adsbygoogle,
    .sponsor-content [data-ad-type="sponsored"],
    .sponsor-content .adtraction-ad-container,
    .sponsor-content .adtraction-ad-wrapper {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .sponsor-content .adsbygoogle {
        display: block;
        text-align: center;
        overflow: hidden;
    }

    .sponsor-content .adsbygoogle > div,
    .sponsor-content .adsbygoogle iframe {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto;
    }

    .sponsor-content .adsbygoogle iframe {
        position: static !important;
    }

    .sponsor-content .adtraction-ad-wrapper img {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }
    
    /* Förbättra sidebar på mobil */
    .sidebar {
        width: 100%;
    }
    
    .sidebar-widget {
        padding: 1.25rem;
    }
    
    .widget-title {
        font-size: 1.2rem;
        margin-bottom: 1.25rem;
    }
    
    /* Förbättra feature-box på mobil */
    .feature-box {
        padding: 1.5rem;
        margin-bottom: 1.25rem;
    }
    
    .feature-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    /* Förbättra info-cards på mobil */
    .info-card .card-content {
        padding: 1.5rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .card-text {
        font-size: 0.95rem;
    }
    
    /* Förbättra community-content på mobil */
    .community-content .intro-text {
        padding: 2rem 1.5rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .community-content .feature-box {
        margin: 0 1.5rem 1.25rem;
    }
    
    .community-content .feature-box:last-child {
        margin-bottom: 2rem;
    }
    
    /* Förbättra resources-grid på mobil */
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .resource-item {
        padding: 1.5rem;
    }
    
    /* Förbättra contact-section på mobil */
    .contact-content {
        padding: 0 1rem;
    }
    
    .contact-content > p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .contact-item {
        padding: 1.5rem 2rem;
        width: 100%;
    }
    
    /* Förbättra footer på mobil */
    .site-footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-content {
        gap: 2rem;
    }
    
    .footer-section {
        margin-bottom: 1.5rem;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
        flex-direction: column;
        padding: 1.25rem;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
        gap: 0.75rem;
        border-top: 2px solid rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(20px);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        z-index: 1000;
        border-radius: 0 0 16px 16px;
    }
    
    .main-nav.active {
        display: flex;
        animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* AI Chat Link - Prioriterad styling i mobilmenyn */
    .main-nav .nav-link-ai,
    .main-nav .nav-link[href="chat/"],
    .main-nav .nav-link[href="/chat/"],
    .main-nav .nav-link[href*="chat"] {
        order: -1; /* Flytta till toppen */
        background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
        color: white !important;
        font-weight: 600;
        font-size: 1.1rem;
        padding: 1.25rem 1.5rem;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
        margin-bottom: 0.75rem;
        border: none;
        border-bottom: none !important;
        text-align: center;
        position: relative;
        overflow: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .main-nav .nav-link-ai::before,
    .main-nav .nav-link[href="chat/"]::before,
    .main-nav .nav-link[href="/chat/"]::before,
    .main-nav .nav-link[href*="chat"]::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.5s ease;
    }
    
    .main-nav .nav-link-ai:hover,
    .main-nav .nav-link[href="chat/"]:hover,
    .main-nav .nav-link[href="/chat/"]:hover,
    .main-nav .nav-link[href*="chat"]:hover {
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 12px 32px rgba(255, 107, 53, 0.5);
        background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary-color) 100%);
    }
    
    .main-nav .nav-link-ai:hover::before,
    .main-nav .nav-link[href="chat/"]:hover::before,
    .main-nav .nav-link[href="/chat/"]:hover::before,
    .main-nav .nav-link[href*="chat"]:hover::before {
        left: 100%;
    }
    
    .main-nav .nav-link-ai:active,
    .main-nav .nav-link[href="chat/"]:active,
    .main-nav .nav-link[href="/chat/"]:active,
    .main-nav .nav-link[href*="chat"]:active {
        transform: translateY(0) scale(1);
    }
    
    /* Dropdown on mobile */
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropdown > .nav-link {
        cursor: pointer;
    }
    
    /* Dropdown på mobil - dold som standard */
    .dropdown-menu {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        background: rgba(255, 255, 255, 0.1);
        margin-top: 0;
        margin-left: 1rem;
        border-radius: 8px;
        padding: 0;
        border: none;
        transition: opacity 0.3s ease, visibility 0.3s ease, max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
    }
    
    /* Dropdown på mobil - visas när active */
    .nav-dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
        margin-top: 0.5rem;
        padding: 0.5rem 0;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .dropdown-link {
        color: white;
        padding: 0.75rem 1.5rem;
        border-left: 3px solid rgba(255, 255, 255, 0.2);
        transition: all 0.2s ease;
        border-radius: 0;
    }
    
    .dropdown-link:hover {
        background: rgba(255, 255, 255, 0.15);
        color: white;
        border-left-color: var(--secondary-color);
        padding-left: 1.75rem;
    }
    
    .dropdown-link:first-child {
        border-radius: 8px 8px 0 0;
    }
    
    .dropdown-link:last-child {
        border-radius: 0 0 8px 8px;
    }
    
    /* Standard nav links styling */
    .main-nav .nav-link {
        padding: 1rem 1.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        text-align: left;
        border-radius: 10px;
        margin-bottom: 0.5rem;
        background: rgba(255, 255, 255, 0.05);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }
    
    .main-nav .nav-link::after {
        display: none;
    }
    
    .main-nav .nav-link:hover {
        transform: translateX(8px);
        background: rgba(255, 255, 255, 0.15);
        border-left: 3px solid var(--secondary-color);
        padding-left: calc(1.25rem - 3px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
    
    .main-nav .nav-link.active {
        background: rgba(255, 255, 255, 0.2);
        border-left: 4px solid var(--secondary-color);
        padding-left: calc(1.25rem - 4px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .main-nav .nav-link:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-content {
        position: relative;
        flex-wrap: wrap;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .logo-icon {
        font-size: 2rem;
    }
    
    .main-nav {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.875rem;
        font-size: 0.9rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Förbättra touch targets */
    .dropdown-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .quick-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-info {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    /* Mobilanpassa Call to Action-sektioner för tablets */
    .content-section[style*="padding: 3rem"] {
        padding: 2rem 1.5rem !important;
    }
    
    .content-section[style*="padding: 3rem"] a[style*="padding: 1.5rem 3rem"] {
        padding: 1.25rem 2rem !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Header förbättringar */
    .site-header {
        padding: 1rem 0;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .logo-icon {
        font-size: 1.8rem;
    }
    
    .logo-icon img {
        width: 1.8rem;
        height: 1.8rem;
    }
    
    /* Hero förbättringar */
    .hero {
        padding: 2.5rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
        padding: 0 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .hero-image {
        max-width: 100%;
        border-width: 2px;
        border-radius: 16px;
    }
    
    .hero-image-wrapper {
        margin-bottom: 1.25rem;
    }
    
    /* Main content förbättringar */
    .main-content {
        padding: 1.5rem 0;
    }
    
    .content-grid {
        gap: 1.5rem;
    }
    
    .content-section {
        margin-bottom: 2.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
    }
    
    /* Cards förbättringar */
    .card-image-wrapper {
        height: 180px;
    }
    
    .info-card {
        padding: 0;
    }
    
    .info-card .card-content {
        padding: 1.25rem;
    }
    
    .card-icon {
        font-size: 2.5rem;
        width: 60px;
        height: 60px;
        margin: -1.25rem auto 0.75rem;
    }
    
    .card-title {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
        padding: 0 0.5rem;
    }
    
    .card-text {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }
    
    /* Community förbättringar */
    .community-image-wrapper {
        height: 200px;
    }
    
    .community-content {
        border-radius: 16px;
    }
    
    .community-content .intro-text {
        padding: 1.5rem 1.25rem 1.25rem;
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .community-content .feature-box {
        margin: 0 1.25rem 1rem;
        padding: 1.25rem;
    }
    
    .community-content .feature-box:last-child {
        margin-bottom: 1.5rem;
    }
    
    .feature-title {
        font-size: 1.05rem;
    }
    
    .feature-box p {
        font-size: 0.9rem;
    }
    
    /* Resources förbättringar */
    .resources-grid {
        gap: 1.25rem;
    }
    
    .resource-item {
        padding: 1.25rem;
    }
    
    .resource-item h4 {
        font-size: 1.1rem;
    }
    
    .resource-item p {
        font-size: 0.9rem;
    }
    
    /* Sidebar förbättringar på små skärmar */
    .sidebar {
        margin-bottom: 1.5rem;
    }
    
    .sidebar-widget {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .widget-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .sponsor-sidebar {
        margin-bottom: 1.25rem;
    }
    
    .sponsor-sidebar .sponsor-content {
        padding: 0.75rem;
    }
    
    .quick-links a {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }
    
    /* Contact förbättringar */
    .contact-section {
        padding: 3rem 0;
        margin-top: 3rem;
    }
    
    .contact-image {
        height: 200px;
    }
    
    .contact-content > p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-info {
        gap: 1.25rem;
    }
    
    .contact-item {
        padding: 1.25rem 1.5rem;
    }
    
    .contact-item strong {
        font-size: 1rem;
    }
    
    .contact-item span {
        font-size: 0.95rem;
    }
    
    /* Footer förbättringar */
    .site-footer {
        padding: 2.5rem 0 1.25rem;
        margin-top: 3rem;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .footer-section p {
        font-size: 0.9rem;
    }
    
    .footer-links a {
        font-size: 0.9rem;
    }
    
    /* Sponsor space förbättringar */
    .sponsor-space {
        padding: 1.5rem 0;
    }
    
    .sponsor-content {
        padding: 0.75rem;
    }
    
    .sponsor-content img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }
    
    /* Förbättra länkar på mobil */
    a[target="_blank"],
    a[href*="chat/"] {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Intro text förbättringar */
    .intro-text {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    /* Mobilanpassa Call to Action-sektioner med inline-styling */
    .content-section[style*="padding: 3rem"] {
        padding: 1.5rem 1rem !important;
        margin-top: 2rem !important;
    }
    
    .content-section[style*="padding: 3rem"] .section-title {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .content-section[style*="padding: 3rem"] p[style*="font-size: 1.1rem"] {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem !important;
        padding: 0;
    }
    
    .content-section[style*="padding: 3rem"] div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .content-section[style*="padding: 3rem"] a[style*="padding: 1.5rem 3rem"] {
        padding: 1rem 1.5rem !important;
        font-size: 0.95rem !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .content-section[style*="padding: 3rem"] a[style*="padding: 1.5rem 3rem"] span[style*="font-size: 1.5rem"] {
        font-size: 1.25rem !important;
        margin-right: 0.25rem !important;
    }
    
    /* Mobilanpassa sidebar-widgets med inline-styling */
    .sidebar-widget[style*="padding: 1.5rem"] {
        padding: 1.25rem !important;
    }
    
    .sidebar-widget[style*="padding: 1.5rem"] p[style*="font-size: 0.9rem"] {
        font-size: 0.85rem !important;
    }
    
    .sidebar-widget[style*="padding: 1.5rem"] a[style*="padding: 0.75rem 1rem"] {
        padding: 0.75rem !important;
        font-size: 0.9rem !important;
    }
}

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

/* Equipment Page Styles */
.equipment-form-container {
    background: var(--bg-gradient);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.equipment-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input[type="url"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="url"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.manual-fields {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-toggle-manual:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.btn-toggle-manual:active {
    transform: translateY(0);
}

.manual-fields .form-group {
    margin-bottom: 1.25rem;
}

.manual-fields .form-group label {
    color: var(--text-primary);
    font-weight: 600;
}

.manual-fields .form-group input[type="text"],
.manual-fields .form-group input[type="url"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.manual-fields .form-group input[type="text"]:focus,
.manual-fields .form-group input[type="url"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.form-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-colored);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.equipment-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.equipment-card.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.equipment-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.equipment-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.equipment-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.equipment-card:hover .equipment-card-image img {
    transform: scale(1.05);
}

.equipment-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 200px; /* Minsta höjd för innehållet */
}

.equipment-card-platform {
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.platform-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.platform-badge.platform-blocket {
    background: #00a651;
    color: white;
}

.platform-badge.platform-tradera {
    background: #ff6b00;
    color: white;
}

.platform-badge.platform-facebook {
    background: #1877f2;
    color: white;
}

.platform-badge.platform-annons {
    background: var(--text-secondary);
    color: white;
}

.equipment-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.15rem; /* Två rader med line-height 1.4 * 1.125rem * 2 */
    flex-shrink: 0;
}

.equipment-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    min-height: 3.5rem; /* Två rader för pris */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-shrink: 0;
}

.equipment-card-action {
    margin-top: auto; /* Pusha knappen till botten */
    flex-shrink: 0;
}

.equipment-card-link-text {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.equipment-card:hover .equipment-card-link-text {
    color: var(--primary-light);
}

.equipment-card-delete {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.equipment-card-delete:hover {
    background: rgba(220, 53, 69, 0.9);
    transform: scale(1.1);
}

.no-equipment {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.platform-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.platform-list li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.platform-list li strong {
    color: var(--text-primary);
}

/* Responsive adjustments for equipment page */
@media (max-width: 768px) {
    .equipment-form-container {
        padding: 1.5rem;
    }
    
    .equipment-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .equipment-card-image {
        height: 180px;
    }
    
    .equipment-card-image img {
        object-fit: contain;
    }
    
    .equipment-card-content {
        padding: 1.25rem;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .sponsor-space,
    .sidebar,
    .site-footer {
        display: none;
    }
    
    .main-content {
        padding: 0;
    }
}

.site-credit {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #888;
}

.site-credit a {
    color: #888;
    text-decoration: none;
}

.site-credit a:hover {
    text-decoration: underline;
}