/* Global Styles */
:root {
    /* Primär färgpalett */
    --primary-color: #0066A4;
    --primary-dark: #004E7C;
    --primary-light: #3D8CC7;
    --secondary-color: #FF6600;
    --secondary-dark: #E05A00;
    --secondary-light: #FF8533;
    
    /* Neutrala färger */
    --dark-text: #333333;
    --body-text: #555555;
    --light-text: #777777;
    --border-color: #DDDDDD;
    
    /* Bakgrundsfärger */
    --bg-light: #F8F9FA;
    --bg-medium: #F0F2F5;
    --bg-white: #FFFFFF;
    
    /* Skuggor */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
    
    /* Avrundade hörn */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    
    /* Övergångar */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--body-text);
    line-height: 1.6;
    background-color: var(--bg-medium);
}

.container {
    width: 90%;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 15px;
}

/* Typografi */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--dark-text);
    margin-top: 0;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.2rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-normal);
}

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

/* Header Styles */
header {
    background-color: var(--bg-white);
    color: var(--primary-color);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

/* Site header - logo ovanför, meny under */
.site-header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 0 0.5rem 0;
}

/* Logo container */
.logo-container {
    text-align: left;
    margin-bottom: 1rem;
}

.site-logo {
    height: 160px !important;
    max-height: 160px !important;
    width: auto !important;
    max-width: none !important;
}

/* Navbar under logotypen */
.site-header .navbar {
    background-color: transparent;
    box-shadow: none;
    padding: 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    margin: 0;
}

.logo img {
    max-height: 60px;
    height: auto;
}

/* Navbar brand logo - inte längre använd men behålls för admin */
.navbar-brand {
    margin-right: 3rem;
    padding: 0;
}

.navbar-brand img {
    height: 80px !important;
    max-height: 80px !important;
    width: auto !important;
    max-width: none !important;
}

/* Större menylänkar */
.navbar-nav .nav-link {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition-normal);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color);
    transition: width var(--transition-normal);
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--secondary-color);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

/* Hero Section Styles */
.hero {
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)), 
        url('../images/hero.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 8rem 0 4rem;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Product Categories */
.product-categories {
    padding: 5rem 0;
    background-color: var(--bg-white);
}

.product-categories h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.category {
    background-color: var(--bg-light);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.category img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.category p {
    color: var(--body-text);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.category-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    text-align: center;
    transition: background-color var(--transition-normal), transform var(--transition-normal);
}

.category-link:hover {
    background-color: var(--secondary-dark);
    color: white;
    transform: translateY(-2px);
}

/* Product Page Specific Styles */
.product-header {
    background-color: var(--bg-light);
    padding: 8rem 2rem 4rem;
    text-align: center;
}

.product-header h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.product-header p {
    max-width: 800px;
    margin: 0 auto;
    color: var(--body-text);
    font-size: 1.1rem;
}

.product-types {
    padding: 4rem 0;
}

.product-type {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 2.5rem;
    background-color: var(--bg-white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    margin-bottom: 3rem;
}

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

.product-image {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 400px;
}

.product-image img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform var(--transition-slow);
}

.product-type:hover .product-image img {
    transform: scale(1.05);
}

.product-info h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.product-info h3::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
    margin-top: 0.8rem;
}

.product-info h4 {
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem;
}

.product-info ul {
    list-style: none;
    margin-bottom: 1.5rem;
    padding-left: 0;
}

.product-info ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--body-text);
}

.product-info ul li::before {
    content: "•";
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.product-info .cta-button {
    margin-top: 2rem;
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: all var(--transition-normal);
}

.product-info .cta-button:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 102, 0, 0.3);
}

/* Why Choose Us Section Styles */
.why-choose-us {
    background-color: var(--bg-light);
    padding: 5rem 0;
    text-align: center;
}

.why-choose-us h2 {
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.reasons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.reason {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal);
}

.reason:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.reason i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.reason h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,102,164,0.9) 0%, rgba(0,78,124,0.9) 100%);
    z-index: 1;
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
}

.cta-section p {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.cta-button:hover {
    background-color: transparent;
    color: white;
    border-color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Footer Styles */
footer {
    background-color: #2C3E50;
    color: #FFFFFF;
    padding: 4rem 0 2rem;
}

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

.footer-content h4 {
    color: white;
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 0.8rem;
}

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

.footer-content p,
.footer-content ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-content ul li {
    margin-bottom: 0.5rem;
}

.footer-content a {
    color: #BDC3C7;
    text-decoration: none;
    transition: color var(--transition-normal);
}

.footer-content a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #BDC3C7;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-type {
        gap: 2rem;
        padding: 2rem;
    }
}

@media (max-width: 968px) {
    h1 {
        font-size: 2rem;
    }
    
    .product-type {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        max-height: 350px;
        margin-bottom: 1.5rem;
    }
    
    .product-image img {
        max-height: 350px;
    }
    
    .product-header {
        padding: 7rem 1rem 3rem;
    }
    
    .product-header h2 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 7rem 0 3rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0.5rem 0.8rem;
    }
    
    .hero {
        padding: 6rem 0 3rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .product-image {
        max-height: 300px;
    }
    
    .product-image img {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
    }
    
    .product-image {
        max-height: 250px;
    }
    
    .product-image img {
        max-height: 250px;
    }
    
    .product-info h3 {
        font-size: 1.5rem;
    }
    
    .product-header {
        padding: 6rem 1rem 2rem;
    }
    
    .product-info .cta-button {
        width: 100%;
        text-align: center;
    }
    
    .cta-button {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Active navigation state */
nav a.active {
    color: var(--secondary-color);
}

/* Alert Styles */
.alert {
    border-radius: var(--border-radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: none;
    box-shadow: var(--shadow-sm);
    position: relative;
    animation: slideDown 0.5s ease-out forwards;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-left: 4px solid #28a745;
    color: #155724;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 1.05rem 1.25rem;
    color: inherit;
}

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

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.alert.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

/* User Profile Avatar */
.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-fast);
}

.dropdown-toggle:hover .user-avatar {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

.user-info-header {
    padding: 0.75rem 1rem;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    margin: -0.5rem -0.5rem 0.5rem -0.5rem;
}

.user-info-header .user-name {
    font-weight: 600;
    color: var(--dark-text);
    margin: 0;
    font-size: 0.95rem;
}

.user-info-header .company-name {
    color: var(--light-text);
    margin: 0;
    font-size: 0.85rem;
}

/* User display info in dropdown toggle */
.user-display-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    margin-left: 0.5rem;
    text-align: left;
}

.user-display-name {
    font-weight: 500;
    color: var(--dark-text);
    font-size: 0.95rem;
    white-space: nowrap;
}

.user-display-company {
    font-size: 0.75rem;
    color: var(--light-text);
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}
