/* 
   Pipe & Art - Premium Event Design System 
   Theme: Gentleman Lifestyle, Craftsmanship, Dark Elegant
*/

/* Local Fonts */
@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 300;
    src: url('assets/fonts/Lato-Light.ttf') format('truetype');
}

@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 400;
    src: url('assets/fonts/Lato-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 400;
    src: url('assets/fonts/PlayfairDisplay-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: italic;
    font-weight: 400;
    src: url('assets/fonts/PlayfairDisplay-Italic.ttf') format('truetype');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 600;
    src: url('assets/fonts/PlayfairDisplay-SemiBold.ttf') format('truetype');
}

:root {
    /* Color Palette */
    --color-bg-main: #121212;
    --color-bg-panel: #1A1A1A;
    --color-bg-accent: #251F1B;
    /* Very dark warm brown */

    --color-text-primary: #E8E8E8;
    --color-text-secondary: #9E9E9E;
    --color-text-muted: #666666;

    --color-accent-gold: #C5A065;
    --color-accent-cognac: #8D5B32;
    --color-accent-tobacco: #5D4037;

    --color-border: #333333;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    /* 8px */
    --space-sm: 1rem;
    /* 16px */
    --space-md: 2rem;
    /* 32px */
    --space-lg: 4rem;
    /* 64px */
    --space-xl: 8rem;
    /* 128px */
    --space-2xl: 12rem;
    /* 192px */

    /* Layout */
    --container-width: 1200px;
    --grid-gap: 2rem;

    /* Transitions */
    --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-fast: 0.3s ease-out;
}

body.light-mode {
    --color-bg-main: #F9F8F6;
    --color-bg-panel: #FFFFFF;
    --color-bg-accent: #F2EBE5;

    --color-text-primary: #2C2C2C;
    --color-text-secondary: #555555;
    --color-text-muted: #777777;

    --color-border: #E0E0E0;

    /* Adjust accent contrast if needed, but gold usually works on white too */
    --color-accent-gold: #B08D55;
}

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

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text-primary);
    line-height: 1.2;
    font-weight: 400;
}

h1 {
    font-size: 4.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

h3 {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    color: var(--color-accent-gold);
}

p {
    margin-bottom: var(--space-sm);
    color: var(--color-text-secondary);
}

a {
    color: var(--color-accent-gold);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent-cognac);
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

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

.text-gold {
    color: var(--color-accent-gold);
}

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-padding {
    padding: var(--space-xl) 0;
}

/* Layout Grid */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--color-accent-gold);
    color: var(--color-accent-gold);
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    cursor: pointer;
    background: transparent;
}

.btn:hover {
    background: var(--color-accent-gold);
    color: var(--color-bg-main);
}

/* Specific Section Styles */

/* Hero */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
    text-align: center;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    /* Overlay for readability */
    z-index: 1;
}

#hero .content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

#hero h1 {
    margin-bottom: var(--space-sm);
}

.hero-logo {
    max-width: 100%;
    width: auto;
    height: auto;
    margin-bottom: var(--space-sm);
    /* Adjust max-width as needed based on the image aspect ratio */
    max-width: 600px;
}

.footer-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: var(--space-xs);
    display: inline-block;
}

.header-logo {
    max-height: 50px;
    width: auto;
    display: block;
}

#hero .subtitle {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--color-text-secondary);
    font-style: italic;
}

/* Force light text in Hero even in Light Mode (due to dark bg image) */
#hero h1,
#hero .subtitle,
#hero p,
.main-header .theme-toggle {
    color: #E8E8E8 !important;
    /* Original light text */
}

.main-header .theme-toggle {
    border-color: rgba(232, 232, 232, 0.5);
    /* Lighter border for visibility */
}

/* Header & Toggle */
.main-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.lang-switch a {
    color: var(--color-text-primary);
    /* Default light grey */
    text-decoration: none;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.7;
}

body.light-mode .lang-switch a {
    color: var(--color-text-primary);
}

.lang-switch a.active {
    opacity: 1;
    font-weight: 600;
}

.lang-switch a:hover {
    color: var(--color-accent-gold);
    opacity: 1;
}

.lang-switch .separator {
    color: var(--color-border);
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--color-text-muted);
    color: var(--color-text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    border-color: var(--color-accent-gold);
    color: var(--color-accent-gold);
    background: rgba(197, 160, 101, 0.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    fill: none;
    stroke: currentColor;
}

/* Intro */
#about {
    background-color: var(--color-bg-panel);
}

.intro-text {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Event Details */
.info-card {
    background: var(--color-bg-accent);
    padding: var(--space-md);
    border-left: 1px solid var(--color-accent-cognac);
    height: 100%;
}

.info-card h4 {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: var(--space-xs);
}

.info-card p {
    color: var(--color-text-primary);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0;
}

/* Exhibitors */
.exhibitor-card {
    padding: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    text-align: center;
    transition: border-color var(--transition-fast);
}

.exhibitor-card:hover {
    border-color: var(--color-accent-gold);
}

.exhibitor-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

.exhibitor-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.icon-link {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-link:hover {
    color: var(--color-accent-gold);
}

.icon-link svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.5;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    width: 100%;
}

.gallery-item {
    aspect-ratio: 1;
    /* Square images */
    overflow: hidden;
    position: relative;
}

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

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

/* Contact Form Section */
.form-group {
    margin-bottom: var(--space-sm);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--color-bg-main);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    border-color: var(--color-accent-gold);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.faq-item {
    margin-bottom: var(--space-md);
}

.faq-item h4 {
    color: var(--color-accent-gold);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.faq-item p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

/* Footer */
footer {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-xl);
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-bg-panel);
    border-top: 1px solid var(--color-accent-gold);
    padding: var(--space-md);
    z-index: 1000;
    display: none;
    /* Hidden by default, shown by JS if needed */
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.cookie-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Map Placeholder */
.map-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #222;
    color: var(--color-text-secondary);
    z-index: 10;
    padding: 1rem;
    text-align: center;
}

.map-placeholder p {
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --space-xl: 4rem;
        --space-2xl: 6rem;
        --space-lg: 2rem;
        --space-md: 1.5rem;
    }

    h1 {
        font-size: 2.25rem;
        /* Reduced from 3rem for better fit with long German words */
        overflow-wrap: break-word;
        /* Ensure long words break */
        hyphens: auto;
        /* Enable auto-hyphenation */
    }

    h2 {
        font-size: 1.75rem;
        /* Reduced from 2.25rem */
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        /* Stack everything on mobile */
    }

    .grid-3.dates {
        grid-template-columns: 1fr;
        /* Force stack for date info cards too */
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }
}

/* Google Map Hover Effect */
#google-map {
    filter: grayscale(100%) invert(92%) contrast(83%);
    transition: filter 0.5s ease;
    display: block;
}

#google-map:hover {
    filter: none;
}

/* Subpage Styles (Moved from HTML) */
.page-header {
    background-color: var(--color-bg-panel);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-section {
    max-width: 800px;
    margin: var(--space-xl) auto;
    padding: 0 var(--space-md);
}

.content-section h2 {
    margin-top: var(--space-lg);
    border-bottom: 1px solid var(--color-accent-gold);
    padding-bottom: 1rem;
}

.content-section ul {
    margin-left: 20px;
    margin-bottom: 1rem;
}

/* Responsive adjustments for subpages */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: var(--space-md);
        padding: var(--space-md);
        text-align: center;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--color-bg-panel);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast), background-color var(--transition-fast);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--color-bg-accent);
}

.scroll-to-top .progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    /* Start at 12 o'clock */
}

.scroll-to-top .progress-ring__circle {
    transition: stroke-dashoffset 0.1s linear;
}

.scroll-to-top .scroll-icon {
    color: var(--color-accent-gold);
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 2;
    transition: color var(--transition-fast);
}

.scroll-to-top:hover .scroll-icon {
    color: var(--color-accent-cognac);
}