:root {
    /* Precise K&E Logo Brand Colors */
    --clr-primary: #1F3F7F;
    /* Deep Royal Blue */
    --clr-primary-hover: #152A55;
    /* Darker Royal Blue */
    --clr-secondary: #B0CB1F;
    /* Lime Green */
    --clr-secondary-hover: #98B315;
    --clr-accent: #FFEC00;
    /* Vibrant Yellow */
    --clr-accent-2: #E2001A;
    /* Classic Red fallback */

    /* Layout Colors */
    --clr-bg: #ffffff;
    --clr-surface: #f8fafc;
    --clr-surface-alt: #f1f5f9;
    --clr-text: #334155;
    --clr-text-muted: #64748b;
    --clr-dark: #0f172a;
    --clr-white: #ffffff;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Borders */
    --transition-fast: 0.2s ease-in-out;
    --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-sm: 4px;
    /* Professional sharp edges, slightly rounded */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 58, 129, 0.08);
    /* Blue tinted subtle shadow */
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--clr-dark);
    line-height: 1.1;
    font-weight: 800;
}

p {
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography Accents */
.accent-blue {
    color: var(--clr-primary);
}

.accent-green {
    color: var(--clr-secondary);
    /* Correct map to Logo Lime Green */
}

.accent-yellow {
    color: var(--clr-accent);
    /* Logo Yellow */
}

/* Buttons - Professional Solid Look */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background-color: var(--clr-secondary);
    color: var(--clr-primary);
    /* Dark blue text on lime button */
}

.btn-primary:hover {
    background-color: var(--clr-secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(176, 203, 31, 0.3);
    /* Lime shadow */
}

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

.btn-outline:hover {
    background-color: var(--base-gray, #e2e8f0);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Sidebar Navigation (Premium Left Vertical Desktop) */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    z-index: 1000;
    background: var(--clr-primary);
    /* Dark Royal Blue Logo Color */
    border-right: none;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
    /* Stronger shadow for monolithic look */
    padding: 3rem 2rem 2rem 2rem;
    overflow-y: auto;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: var(--clr-primary);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
}

.nav-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    width: 100%;
    /* margin-bottom to auto on footer acts better than gap */
    padding: 0;
}

.logo {
    position: relative;
    top: 0;
    background: var(--clr-white);
    /* White cut-out for the logo */
    padding: 20px;
    border-radius: 0 0 40px 0;
    /* Asymmetrical cutout */
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.2);
    border-bottom: none;
    margin-top: -3rem;
    /* Pull flush top */
    margin-left: -2rem;
    /* Pull flush left */
    width: calc(100% + 2rem);
    margin-bottom: 2rem;
}

.vertical-brand-bar {
    position: fixed;
    top: 0;
    right: 0;
    width: 45px;
    background-color: var(--clr-secondary);
    color: var(--clr-primary);
    padding: 2.5rem 0;
    border-radius: 0 0 0 22.5px;
    /* Adjust border radius to look good on right edge */
    display: flex;
    justify-content: center;
    box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.15);
    /* Shadow on the left */
    z-index: 990;
}

.vertical-brand-bar .brand-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
}

.vertical-brand-bar .divider {
    color: var(--clr-white);
    margin: 15px 0;
    font-weight: 300;
}

@media (max-width: 900px) {
    .vertical-brand-bar {
        display: none;
    }
}

.navbar.scrolled .logo {
    top: 0;
}

.logo-img {
    height: auto;
    width: 100%;
    max-width: 180px;
    transition: all var(--transition-normal);
    filter: none;
    /* remove floating shadow */
}

.navbar.scrolled .logo-img {
    height: auto;
    max-width: 160px;
}

.sidebar-nav {
    width: 100%;
    margin-bottom: 2rem;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links a {
    display: flex;
    align-items: baseline;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--clr-white);
    /* White text on blue bg */
    position: relative;
    padding: 1.25rem 0;
    transition: all var(--transition-fast);
}

.nav-num {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    margin-right: 15px;
    transition: color var(--transition-fast);
}

/* Hover effect */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 3px;
    /* Stronger line */
    background-color: var(--clr-secondary);
    /* Lime Green Line! */
    transition: width var(--transition-fast);
}

.nav-links a:hover {
    color: var(--clr-secondary);
    padding-left: 10px;
}

.nav-links a:hover .nav-num {
    color: var(--clr-secondary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Sidebar Footer Info */
.sidebar-footer {
    margin-top: auto;
    /* Pushes footer to bottom */
    width: 100%;
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-footer .contact-info p {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    /* Soft white */
}

.sidebar-footer .social-links {
    display: flex;
    gap: 1rem;
}

.sidebar-footer .social-links a {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--clr-white);
    letter-spacing: 1px;
}

.sidebar-footer .social-links a:hover {
    color: var(--clr-secondary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 35px;
    height: 2px;
    background-color: var(--clr-white);
    /* White lines on dark blue mobile banner */
    transition: var(--transition-fast);
}

/* Main Content Offset for Desktop Sidebar */
body {
    padding-left: 300px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-image: url('../images/hero_bg_new.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Neutral dark overlay so the blue sidebar pops without overwhelming the screen */
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding-top: 5rem;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 5.5rem);
    margin-bottom: 1.5rem;
    color: var(--clr-white);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.hero-title span {
    color: var(--clr-accent);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 3rem;
    max-width: 600px;
    font-weight: 400;
}

/* Technical Color Line (Brand Identity Banner) */
.brand-line {
    display: flex;
    height: 8px;
    width: 100%;
}

.brand-line div {
    flex: 1;
}

/* Sections Base */
.section {
    padding: 8rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
}

.section-header p {
    color: var(--clr-text-muted);
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.bg-light {
    background-color: var(--clr-surface);
}

/* Premium Editorial Services Layout */
.services-grid {
    display: flex;
    flex-direction: column;
    gap: 8rem;
    /* Massive spacing between services */
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    border: none;
    box-shadow: none;
    background: transparent;
    transition: transform var(--transition-normal);
}

@media (min-width: 900px) {
    .service-card {
        flex-direction: row;
        align-items: stretch;
    }

    /* Alternate layouts */
    .service-card:nth-child(even) {
        flex-direction: row-reverse;
    }
}

.service-image {
    width: 100%;
    position: relative;
    z-index: 1;
}

@media (min-width: 900px) {
    .service-image {
        width: 55%;
        height: auto;
        min-height: 500px;
        /* Tall architectural images */
    }
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-image img {
    transform: scale(1.03);
}

/* Text overlaps the image */
.service-details {
    background: var(--clr-white);
    padding: 4rem 3rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
    /* Deep premium shadow */
    margin-top: -3rem;
    width: 90%;
}

@media (min-width: 900px) {
    .service-details {
        width: 55%;
        margin-top: 4rem;
        margin-bottom: 4rem;
        padding: 5rem 4rem;
    }

    /* Pull the text block over the image differently for odd/even */
    .service-card:nth-child(odd) .service-details {
        margin-left: -10%;
    }

    .service-card:nth-child(even) .service-details {
        margin-right: -10%;
    }
}

.service-details h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--clr-dark);
    letter-spacing: -0.02em;
}

.service-details p {
    color: var(--clr-text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.service-list {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
}

.service-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 1rem;
    color: var(--clr-text);
    font-weight: 500;
}

.service-list li strong {
    color: var(--clr-dark);
}

.service-list li::before {
    content: '■';
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 0.8rem;
    color: var(--clr-secondary);
}

/* About Section Setup */
.about {
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: 10%;
    right: 0;
    width: 45%;
    height: 80%;
    background: var(--clr-surface);
    z-index: -1;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6rem;
    }
}

.about-text .lead {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    color: var(--clr-primary);
    font-weight: 300;
    /* Ultra thin, high end fashion look */
    line-height: 1.3;
    margin-bottom: 2.5rem;
    letter-spacing: -0.03em;
}

.about-text p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.about-image {
    position: relative;
    border-radius: 0;
    /* Sharp architectural corners */
    box-shadow: 20px 20px 0 var(--clr-secondary);
    /* Solid offset shadow block */
    overflow: hidden;
    height: 100%;
    min-height: 500px;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* Gallery / Masonry style */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0;
    /* Tight, seamless grid */
    padding: 2rem 0;
}

.gallery-item {
    position: relative;
    border-radius: 0;
    /* Architectural sharp edges */
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 58, 129, 0.5);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

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

/* Interactive Color Visualizer */
.visualizer-tool {
    background: var(--clr-white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    border: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: 350px 1fr;
    overflow: hidden;
}

@media (max-width: 900px) {
    .visualizer-tool {
        grid-template-columns: 1fr;
    }
}

.visualizer-controls {
    padding: 2.5rem;
    background: var(--clr-surface-alt);
    border-right: 1px solid #e2e8f0;
}

.visualizer-controls h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 2rem;
}

.color-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.color-btn:hover,
.color-btn.active {
    transform: scale(1.15);
    border-color: var(--clr-dark);
}

.color-btn[data-color="#ffffff"] {
    border-color: #cbd5e1;
}

.upload-area {
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #cbd5e1;
}

.opacity-control label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.opacity-control input {
    width: 100%;
    cursor: pointer;
}

.visualizer-display {
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#imageCanvasContainer {
    position: relative;
    width: 100%;
    min-height: 400px;
    background: var(--clr-surface);
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.placeholder-text {
    text-align: center;
    color: var(--clr-text-muted);
}

#baseImage {
    width: 100%;
    height: auto;
    display: block;
}

#colorOverlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    mix-blend-mode: multiply;
    pointer-events: none;
    transition: background-color var(--transition-fast), opacity var(--transition-fast);
}

/* Forms & Calculator */
.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
    }
}

.professional-form {
    background: transparent;
    padding: 0;
    border-radius: 0;
    border-top: none;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--clr-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 0;
    border: none;
    border-bottom: 2px solid #cbd5e1;
    border-radius: 0;
    font-family: var(--font-body);
    transition: all var(--transition-fast);
    background: transparent;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: none;
    /* Removed heavy blue shadow */
    background: rgba(0, 58, 129, 0.02);
    /* Slight tint on focus */
}

/* Appointment Section */
.bg-dark {
    background-color: var(--clr-dark);
    color: var(--clr-white);
}

.bg-dark h2 {
    color: var(--clr-white);
}

.bg-dark .section-header p {
    color: #94a3b8;
}

.appointment-form {
    display: flex;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .appointment-form {
        flex-direction: column;
    }
}

.appointment-form input {
    flex: 1;
    padding: 1rem 0;
    border: none;
    border-bottom: 2px solid #334155;
    background: transparent;
    color: var(--clr-white);
    border-radius: 0;
    transition: all var(--transition-fast);
}

.appointment-form input:focus {
    outline: none;
    border-color: var(--clr-accent);
}

.appointment-form button {
    background: var(--clr-secondary);
    color: white;
}

.appointment-form button:hover {
    background: #b90015;
}


/* Footer / Contact */
.contact-footer {
    background-color: #050b14;
    color: var(--clr-white);
    padding: 6rem 0 2rem;
    border-top: 8px solid var(--clr-primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-info p {
    color: #94a3b8;
    margin: 1.5rem 0;
    max-width: 400px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--clr-white);
    padding: 8px 0;
    transition: transform var(--transition-fast);
}

.contact-item .icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--clr-accent);
}

.footer-links h4,
.footer-legal h4 {
    margin-bottom: 1.5rem;
    color: var(--clr-white);
    font-size: 1.2rem;
}

.footer-links ul li,
.footer-legal ul li {
    margin-bottom: 1rem;
}

.footer-links ul li a,
.footer-legal ul li a {
    color: #94a3b8;
    transition: color var(--transition-fast);
}

.footer-links ul li a:hover,
.footer-legal ul li a:hover {
    color: var(--clr-accent);
}

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

/* Utilities */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Overrides for Sidebar Layout */
@media (max-width: 1200px) {
    .navbar {
        width: 240px;
        padding: 2rem 1.5rem;
    }

    body {
        padding-left: 240px;
    }
}

@media (max-width: 900px) {

    .about-grid,
    .footer-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    /* Revert to top bar on mobile */
    body {
        padding-left: 0;
    }

    .navbar {
        position: fixed;
        height: auto;
        left: 0;
        top: 0;
        width: 100%;
        border-radius: 0;
        padding: 1rem;
        box-shadow: var(--shadow-sm);
        display: flex;
        overflow: visible;
    }

    .nav-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        height: auto;
    }

    .logo {
        padding: 10px 20px 15px 15px;
        position: relative;
        top: 0;
        margin-bottom: 0;
        margin-top: -1rem;
        /* Undo desktop negative margin */
        margin-left: -1rem;
        /* Snap to left border */
        background: var(--clr-white);
        border-radius: 0 0 30px 0;
        width: auto;
        z-index: 100;
    }

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

    .navbar.scrolled .logo-img {
        height: 50px;
    }

    .sidebar-nav,
    .sidebar-footer {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--clr-primary);
        /* Deep blue for mobile dropdown */
        text-align: center;
        margin: 0;
        padding: 0 1rem;
    }

    /* Wrap the entire content of the menu in absolute positioning instead of parts */
    .nav-content.active {
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-bottom: 2rem;
        box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.5);
        background: var(--clr-primary);
        /* Dropdown goes deep blue matching the header */
        position: absolute;
        /* Take out of flow to drop down */
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        min-height: 100vh;
        /* Cover full screen so content doesn't bleed through */
    }

    .nav-content.active .logo {
        margin-top: 1rem;
        margin-bottom: 2rem;
    }

    .nav-content.active .sidebar-nav,
    .nav-content.active .sidebar-footer {
        display: flex;
    }

    .nav-links a {
        justify-content: center;
    }

    /* Fix menu toggle position to float on right side always */
    .menu-toggle {
        display: flex;
        z-index: 101;
        position: absolute;
        top: 25px;
        right: 20px;
    }

}

/* ══════════════════════════════════════════
   KONFIGURATOR – Mobile Responsive
══════════════════════════════════════════ */
.configurator-page body {
    padding-left: 0;
}

/* Konfigurator Layout: Stack on mobile */
.configurator-app {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: calc(100vh - 61px);
}

@media (max-width: 900px) {

    /* Konfigurator: sidebar scrolls above canvas */
    .configurator-app {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: auto;
        min-height: calc(100vh - 61px);
    }

    .config-sidebar {
        max-height: 45vh;
        overflow-y: auto;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .config-workspace {
        height: 60vh;
    }

    .workspace-actions {
        flex-wrap: wrap;
        gap: 0.3rem !important;
    }

    .workspace-actions .btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }

    /* Modals immer maximal breit auf Mobile */
    .modal-content {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* DPI Alert responsive */
    .dpi-alert {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.82rem;
    }
}

@media (max-width: 600px) {
    .config-sidebar {
        padding: 0.75rem;
    }

    .config-section h3 {
        font-size: 0.9rem;
    }

    .tool-buttons {
        gap: 4px !important;
    }

    .tool-btn {
        font-size: 0.72rem !important;
        padding: 6px 8px !important;
    }

    .workspace-header h2 {
        font-size: 1rem;
    }

    /* Dimensions group: stack on very small */
    .dimensions-group {
        flex-direction: column;
    }
}

/* ── Textil-Designer Mobile ── */
@media (max-width: 900px) {
    .textil-app {
        grid-template-columns: 1fr !important;
        height: auto !important;
    }

    .textil-left,
    .textil-right {
        display: none;
    }

    .textil-center {
        height: 70vh;
    }

    .textil-toolbar-mobile {
        display: flex !important;
    }
}

/* ── KI Design Mobile ── */
@media (max-width: 768px) {
    .ki-design-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 480px) {
    .ki-design-grid {
        grid-template-columns: 1fr !important;
    }

    .ki-wizard-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── General Tool Pages ── */
.configurator-page body,
body.tool-page {
    padding-left: 0;
}

/* Smooth scrolling and better touch targets */
@media (max-width: 900px) {
    body {
        padding-left: 0 !important;
    }

    input,
    select,
    button {
        touch-action: manipulation;
    }

    .btn {
        min-height: 44px;
    }
}

/* Design Studio Suite Styles */
.design-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tool-card {
    background: var(--clr-white);
    padding: 3rem 2rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all var(--transition-normal);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: var(--clr-primary);
}

.tool-icon {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 2rem;
    transition: transform var(--transition-fast);
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

.tool-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--clr-dark);
}

.tool-card p {
    font-size: 0.95rem;
    color: var(--clr-text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--clr-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: auto;
}

.btn-text:hover {
    color: var(--clr-secondary);
}