/**
 * Logo and branding styles for ScandiText Nordisk Verktøysuite
 */

.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0; /* Remove gap for maximum width */
    height: 100%; /* Fill full header height */
    padding: 0; /* Remove padding for maximum size */
    width: 100%; /* Take full available width */
    flex: 1; /* Take maximum available space */
}

.logo-svg {
    height: 100%; /* Fill full header height */
    width: 100%; /* Take full available width */
    max-width: none; /* Remove width restriction */
    min-height: 80px; /* Minimum height for readability */
    max-height: 120px; /* Maximum height to prevent overflow */
    object-fit: contain; /* Maintain aspect ratio */
    object-position: left center; /* Align to left */
    transition: transform 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0); /* Force hardware acceleration */
}

.logo-svg:hover {
    transform: scale(1.02); /* Subtle scale on hover */
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

/* Enhanced logo styling for full-width display */
.header .logo {
    flex: 2; /* Give logo more space relative to content */
    max-width: 70%; /* Prevent logo from taking up too much space */
}

.header .header-content {
    min-width: 200px; /* Ensure content doesn't get too small */
}

/* Responsive design for new SVG logo */
@media (max-width: 768px) {
    .logo-svg {
        height: 100%; /* Fill available header height */
        max-height: 90px; /* Slightly smaller on mobile */
        width: 100%; /* Full width on mobile */
    }
    
    .logo {
        height: 100%;
        padding: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .logo-svg {
        height: 100%; /* Fill available space */
        max-height: 75px; /* Manageable size on small screens */
        width: 100%; /* Full width */
    }
    
    .logo {
        height: 100%;
        padding: 0;
        width: 100%;
    }
}

/* Ensure SVG logo works well in header context */
.header .logo-svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Legacy logo styles (kept for fallback/compatibility) */
.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
    border: 2px solid rgba(37, 99, 235, 0.1);
    position: relative;
    overflow: hidden;
    letter-spacing: -0.05em;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-display);
    font-size: 1.8em;
    font-weight: 600;
    color: white;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.logo-subtitle {
    font-family: var(--font-modern);
    font-size: 0.85em;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.01em;
    line-height: 1.3;
}

/* Alternative modern logo styles */
.logo-modern {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.logo-modern::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
    border-radius: 20px;
    pointer-events: none;
}

.logo-title-modern {
    font-family: var(--font-display);
    font-size: 2em;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.03em;
    line-height: 1;
    text-shadow: none;
    position: relative;
}

.logo-title-modern::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), transparent);
    border-radius: 1px;
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    .logo {
        gap: 10px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .logo-title {
        font-size: 1.4em;
    }
    
    .logo-subtitle {
        font-size: 0.8em;
    }
    
    .logo-title-modern {
        font-size: 1.6em;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .logo-icon {
        background: linear-gradient(135deg, #334155 0%, #475569 100%);
        border-color: rgba(37, 99, 235, 0.2);
    }
    
    .logo-icon::before {
        background: linear-gradient(45deg, transparent, rgba(37, 99, 235, 0.2), transparent);
    }
}

/* Improved animation performance */
@media (prefers-reduced-motion: no-preference) {
    .logo-title {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .logo:hover .logo-title {
        transform: translateY(-1px);
        text-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
}
