@font-face {
    font-family: 'Favorit';
    src: url('fonts/FavoritPro-Book.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Favorit';
    src: url('fonts/FavoritPro-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Favorit';
    src: url('fonts/FavoritPro-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

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

body {
    font-family: 'Favorit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    color: #000;
    min-height: 100vh;
}

/* Layout - starts hidden until preloader finishes */
.layout {
    display: flex;
    min-height: 100vh;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.layout.loaded {
    opacity: 1;
}

/* Left Sidebar Navigation - Matching Backend Light Theme */
.sidebar {
    width: 300px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    color: #000;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.brand-name-container {
    margin-bottom: 3rem;
}

.brand-name-container h1 {
    font-family: 'Favorit', sans-serif;
    font-size: 2.5rem;
    font-weight: normal;
    color: #000;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.sidebar-nav {
    flex: 1;
}

.nav-section {
    margin-bottom: 2.5rem;
}

.nav-section-title {
    font-family: 'Favorit', sans-serif;
    font-size: 0.75rem;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    color: #666;
    opacity: 1;
}

.nav-list {
    list-style: none;
}

.nav-list li {
    margin-bottom: 0.25rem;
}

.nav-link {
    font-family: 'Favorit', sans-serif;
    background: none;
    border: none;
    color: #000;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: normal;
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.4rem 0;
    cursor: pointer;
    transition: opacity 0.2s;
    line-height: 1.4;
    position: relative;
}

.nav-link:hover {
    opacity: 0.7;
}

.nav-link.active {
    opacity: 1;
    font-weight: normal;
    background: #f5f5f5;
    padding-left: 0.5rem;
    margin-left: -0.5rem;
    padding-right: 0.5rem;
    margin-right: -0.5rem;
    border-radius: 4px;
}

.nav-link.subsection-link {
    font-size: 0.8125rem;
    padding-left: 1.5rem;
    color: #666;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.nav-link.subsection-link:hover {
    color: #000;
    opacity: 0.8;
}

/* Never mark subsections as active */
.nav-link.subsection-link.active {
    /* Remove active styling from subsections */
    color: #666;
    background: transparent;
}

.nav-list ul {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease-in-out, 
                opacity 0.4s ease-in-out, 
                margin-top 0.5s ease-in-out;
}

.nav-list li.active-section > ul,
.nav-list li.expanded > ul {
    max-height: 2000px;
    opacity: 1;
    margin-top: 0.25rem;
    transition: max-height 0.5s ease-in-out, 
                opacity 0.4s ease-in-out, 
                margin-top 0.5s ease-in-out;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
    font-family: 'Favorit', sans-serif;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #666;
}

.sidebar-footer p {
    margin-bottom: 1rem;
}

.contact-cta {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    font-family: 'Favorit', sans-serif;
    font-size: 0.8125rem;
    font-weight: normal;
    border-radius: 0;
    transition: background-color 0.2s;
}

.contact-cta:hover {
    background-color: #333;
}

/* Main Content Area - Matching Backend */
.main-content {
    width: calc(100% - 300px);
    margin-left: 300px;
    background: #fff;
    min-height: 100vh;
    padding: 0;
    position: relative;
}

.content-wrapper {
    position: relative;
    z-index: 1;
    max-width: 100%;
}

.admin-link {
    position: fixed;
    top: 2rem;
    right: 2rem;
    color: #000;
    background: #fff;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-family: 'Favorit', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    z-index: 200;
    transition: background 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-link:hover {
    background: #f0f0f0;
}

.content-section {
    position: relative;
    min-height: 100vh;
    padding: 0;
    scroll-margin-top: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

/* Light color backgrounds applied via JavaScript based on brand colors */
/* Subtle border between sections for visual separation */
.content-section:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Hero area with image background and heading overlay */
.content-section-hero {
    position: relative;
    width: 100%;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 5rem;
    overflow: hidden;
}

.content-section-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.content-section-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Heading in hero section (white text over image) */
.content-section-hero h2 {
    position: relative;
    z-index: 3;
    font-family: 'Favorit', sans-serif;
    font-size: 2rem;
    font-weight: normal;
    margin-bottom: 0;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Content area below hero */
.content-section-content {
    padding: 4rem 5rem;
    background: #fff;
    position: relative;
    z-index: 4;
}

/* Section heading styling is now in .content-section-hero h2 above */
.content-section h2 span {
    display: inline;
}

/* If no hero image, show heading normally with light background */
.content-section:not(.has-hero) {
    background-color: #f5f5f5;
}

/* Ensure sections with hero images have white background */
.content-section.has-hero {
    background-color: #fff;
}

.content-section:not(.has-hero) h2 {
    font-family: 'Favorit', sans-serif;
    font-size: 2rem;
    font-weight: normal;
    margin-bottom: 2rem;
    color: #000;
    line-height: 1.2;
    letter-spacing: -0.02em;
    padding: 4rem 5rem 0 5rem;
    background: transparent;
}

.section-content,
.content-section-content {
    font-family: 'Favorit', sans-serif;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #000;
}

.section-content {
    font-size: 0.875rem;
}

.section-content p {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.section-content p:last-child {
    margin-bottom: 0;
}

.section-content ul {
    list-style-position: outside;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-content li {
    margin-bottom: 0.75rem;
}

/* Hero Image - for subsections (logo, etc) */
.hero-image {
    width: 100%;
    margin: 2rem 0 3rem 0;
    border-radius: 0;
    position: relative;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Download button for assets */
.download-asset-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #000;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-family: 'Favorit', sans-serif;
    font-size: 0.875rem;
    font-weight: normal;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10;
}

.download-asset-btn:hover {
    background: #333;
}

/* Fonts download section */
.fonts-download-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #eee;
}

.downloads-section-title {
    font-family: 'Favorit', sans-serif;
    font-size: 1.125rem;
    font-weight: normal;
    margin-bottom: 1.5rem;
    color: #000;
}

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

.font-download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.font-download-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.font-download-name {
    font-family: 'Favorit', sans-serif;
    font-size: 1rem;
    font-weight: normal;
    color: #000;
}

.font-download-filename {
    font-family: 'Favorit', sans-serif;
    font-size: 0.875rem;
    color: #666;
}

/* Subsection Styling */
.subsection {
    margin-bottom: 3rem;
}

.subsection-number {
    font-family: 'Favorit', sans-serif;
    font-size: 0.875rem;
    font-weight: normal;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.subsection-title {
    font-family: 'Favorit', sans-serif;
    font-size: 1.5rem;
    font-weight: normal;
    color: #000;
    margin-bottom: 1rem;
    line-height: 1.3;
    margin-top: 3rem;
}

.subsection-content {
    font-family: 'Favorit', sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #000;
}

.subsection-content p {
    margin-bottom: 0.75rem;
}

.subsection-content p:last-child {
    margin-bottom: 0;
}

/* Two-column layout for color subsection content */
.subsection-content-two-columns {
    column-count: 2;
    column-gap: 2rem;
    column-rule: none;
}

.subsection-content-two-columns p {
    break-inside: avoid;
    margin-bottom: 0.75rem;
}

.subsection-content-two-columns p:last-child {
    margin-bottom: 0;
}

.subsection-content-two-columns ul {
    break-inside: avoid;
    margin-bottom: 0.75rem;
}

.subsection-content-two-columns li {
    margin-bottom: 0.25rem;
}

/* 2-column layout for logotype subsections with only content (no image) */
.subsection.logotype-content-only .subsection-content {
    column-count: 2;
    column-gap: 2rem;
    column-rule: none;
}

.subsection.logotype-content-only .subsection-content p {
    break-inside: avoid;
    margin-bottom: 1rem;
}

/* Logo Container */
.logo-container {
    margin: 2rem 0;
    text-align: left;
}

.logo-container img {
    max-width: 400px;
    max-height: 400px;
    background: #fff;
    padding: 2rem;
    border-radius: 0;
}

/* Color Palette */
.color-palette-container {
    border-radius: 8px;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 0;
}

.color-item-wrapper {
    display: flex;
    flex-direction: column;
}

.color-item-wrapper.color-item-full {
    grid-column: 1 / -1;
}

.color-item {
    position: relative;
    border-radius: 12px;
    padding: 2rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    border: 1px solid #0a0a0a;
    margin-bottom: 0.5rem;
}

.color-type-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-family: 'Favorit', sans-serif;
    font-size: 0.625rem;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

/* Color Application Examples Grid */
.color-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 2rem 0;
}

.color-example-item {
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-height: 200px;
}

.color-example-logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-example-logo svg {
    width: 80%;
    height: 80%;
    max-width: 150px;
    max-height: 150px;
}

/* Set default fill for SVG elements that don't have fill attribute */
.color-example-logo svg path:not([fill]),
.color-example-logo svg circle:not([fill]),
.color-example-logo svg rect:not([fill]),
.color-example-logo svg ellipse:not([fill]),
.color-example-logo svg polygon:not([fill]),
.color-example-logo svg polyline:not([fill]),
.color-example-logo svg line:not([fill]),
.color-example-logo svg text:not([fill]),
.color-example-logo svg g:not([fill]) {
    fill: currentColor;
}

.color-example-logo svg path[fill="none"],
.color-example-logo svg circle[fill="none"],
.color-example-logo svg rect[fill="none"],
.color-example-logo svg ellipse[fill="none"],
.color-example-logo svg polygon[fill="none"],
.color-example-logo svg polyline[fill="none"],
.color-example-logo svg line[fill="none"],
.color-example-logo svg text[fill="none"],
.color-example-logo svg g[fill="none"] {
    fill: none;
}

.color-item-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.color-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.color-name {
    font-family: 'Favorit', sans-serif;
    font-size: 1.25rem;
    font-weight: normal;
}

.color-value-display {
    font-family: 'Favorit', sans-serif;
    font-size: 0.9375rem;
    font-weight: normal;
}

.color-value-text {
    font-family: 'Courier New', monospace;
    font-size: 0.9375rem;
}

.color-format-switcher {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.format-btn {
    background: transparent;
    border: 1px solid currentColor;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-family: 'Favorit', sans-serif;
    font-size: 0.75rem;
    font-weight: normal;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, background-color 0.2s;
}

.format-btn:hover {
    opacity: 1;
}

/* Active state - use appropriate overlay based on background */
.color-item.light-bg .format-btn.active {
    background-color: rgba(0, 0, 0, 0.2);
}

.color-item.dark-bg .format-btn.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.format-btn.active {
    opacity: 1;
}

.color-copy-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    position: absolute;
    bottom: 1rem;
    right: 1rem;
}

.color-item:hover .color-copy-btn {
    opacity: 1;
}

.color-copy-btn:hover {
    opacity: 1;
}


/* Typography */
.typography-item {
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
}

.typography-item:first-child {
    border-top: none;
}

.typography-item strong {
    font-family: 'Favorit', sans-serif;
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}

/* Assets Grid */
.assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.asset-item {
    text-align: left;
}

.asset-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 0;
    background: #fff;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.asset-item p {
    font-family: 'Favorit', sans-serif;
    font-size: 0.875rem;
    color: #666;
}

/* Numbered List Styling */
.numbered-list {
    list-style: decimal;
    list-style-position: outside;
    margin-left: 1.5rem;
    margin-bottom: 2rem;
}

.numbered-list li {
    font-family: 'Favorit', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

/* Logo Subsections */
.logo-subsection {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #eee;
}

.logo-subsection:last-child {
    border-bottom: none;
}

/* Usage Tabs - Matching backend clean aesthetic */
.usage-tabs {
    display: flex;
    gap: 2rem;
    margin: 2rem 0 1rem 0;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0;
}

.usage-tab {
    background: none;
    border: none;
    padding: 0;
    padding-bottom: 0.75rem;
    font-family: 'Favorit', sans-serif;
    font-size: 0.9375rem;
    font-weight: normal;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    position: relative;
}

.usage-tab:hover {
    color: #333;
}

.usage-tab.active {
    color: #000;
    border-bottom-color: #000;
    font-weight: normal;
}

.usage-tab-content {
    display: none;
}

.usage-tab-content.active {
    display: block;
}

.logo-usage-section {
    margin: 2rem 0;
}

/* Typography Preview Styles */
.typography-preview-container {
    margin-bottom: 3rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2rem;
}

.preview-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.device-switcher {
    display: flex;
    gap: 0.5rem;
}

.device-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Favorit', sans-serif;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.device-btn:hover {
    background: #f5f5f5;
}

.device-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.typography-preview-area {
    min-height: 400px;
    padding: 2rem;
    border-radius: 4px;
}

.preview-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.preview-section:last-child {
    border-bottom: none;
}

.preview-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-section-title {
    font-family: 'Favorit', sans-serif;
    font-size: 0.875rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666;
    margin: 0;
}

.preview-section-specs {
    display: flex;
    gap: 2rem;
    font-size: 0.8125rem;
    color: #999;
}

.preview-section-spec {
    display: flex;
    gap: 0.5rem;
}

.preview-text {
    margin: 0;
    color: #000;
}

.preview-display {
    margin-bottom: 2rem;
}

.preview-heading {
    margin-bottom: 1rem;
}

.preview-body {
    margin-bottom: 1rem;
}

.preview-body-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.preview-button {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid #000;
    color: #000;
    display: inline-block;
    margin-top: 1rem;
    cursor: default;
}

.preview-tag {
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.preview-caption {
    color: #666;
    margin-top: 1rem;
}

.typography-preview-area[data-device="tablet"] .preview-body-columns {
    grid-template-columns: repeat(2, 1fr);
}

.typography-preview-area[data-device="mobile"] .preview-body-columns {
    grid-template-columns: 1fr;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sidebar {
        width: 28%;
    }
    
    .main-content {
        width: 72%;
        margin-left: 28%;
    }
    
    .content-section-hero {
        padding: 0 3rem;
    }
    
    .content-section-hero h2 {
        font-size: 2rem;
    }
    
    .content-section-content {
        padding: 3rem 4rem;
    }
    
    .content-section:not(.has-hero) h2 {
        font-size: 2rem;
        padding: 3rem 4rem 0 4rem;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 300px;
    }
    
    .main-content {
        width: calc(100% - 300px);
        margin-left: 300px;
    }
    
    .content-section-hero {
        padding: 0 3rem;
    }
    
    .content-section-hero h2 {
        font-size: 2rem;
    }
    
    .content-section-content {
        padding: 3rem 3rem;
    }
    
    .content-section:not(.has-hero) h2 {
        font-size: 2rem;
        padding: 3rem 3rem 0 3rem;
    }
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        padding: 2rem 1.5rem;
    }
    
    .main-content {
        width: 100%;
        margin-left: 0;
    }
    
    .content-section-hero {
        padding: 0 1.5rem;
    }
    
    .content-section-hero h2 {
        font-size: 1.75rem;
    }
    
    .content-section-content {
        padding: 2rem 1.5rem;
    }
    
    .content-section:not(.has-hero) h2 {
        font-size: 1.75rem;
        padding: 2rem 1.5rem 0 1.5rem;
    }
    
    .admin-link {
        position: relative;
        top: 0;
        right: 0;
        display: inline-block;
        margin-bottom: 2rem;
        margin-left: 1.5rem;
        margin-top: 1.5rem;
    }
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
}

.preloader-content h1 {
    color: #ffffff;
    font-family: 'Favorit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 2rem;
    font-weight: normal;
    margin: 0;
    letter-spacing: 0.05em;
}

