/*
Theme Name: Hanssen Agency
Description: Ultimate modern WordPress theme for Bodo Hanssen's film and PR agency. Cinematic graphite/red Hanssen design system with modern typography.
Version: 1.1.3
Author: Custom Development
*/

/* Hanssen design system - Essential styles */

/* Imports removed: fonts, utilities, and responsive layers are enqueued via functions.php */

/* CSS Variables - Cinematic Graphite/Red Color Scheme */
:root {
    /* Primary Colors */
    --color-graphite-bg: #1A1A1A;        /* Extremely dark gray/graphite - main background */
    --color-section-bg: #23262A;          /* Slightly lighter dark - section distinction */
    --color-section-alt: #212529;         /* Alternative section background */
    --color-vibrant-red: #E63946;         /* Intense, cinematic red - CTAs, hovers, highlights */
    --color-deep-red: #B22234;            /* Deep red with graphite undertones - subtle overlays */
    --color-mid-gray: #AAB0B6;            /* Mid-gray for text/icons */
    --color-light-gray: #83878A;          /* Light graphite/gray for secondary text */
    --color-white: #FFFFFF;               /* White for key contrasts */
    --color-black: #000000;               /* Pure black for text on red backgrounds */
    
    /* Typography - Fluid Scaling System */
    --font-heading: 'Montserrat', sans-serif;  /* Headlines, menu, CTAs */
    --font-body: 'Lora', serif;               /* Body text, paragraphs */
    
    /* Fluid Typography Scale */
    --font-size-xs: clamp(0.75rem, 1.5vw, 0.875rem);     /* Small text, captions */
    --font-size-sm: clamp(0.875rem, 2vw, 1rem);          /* Secondary text */
    --font-size-base: clamp(1rem, 2.5vw, 1.125rem);      /* Body text */
    --font-size-lg: clamp(1.125rem, 3vw, 1.25rem);       /* Large text */
    --font-size-xl: clamp(1.25rem, 3.5vw, 1.5rem);       /* Subheadings */
    --font-size-2xl: clamp(1.5rem, 4vw, 2rem);           /* H3 */
    --font-size-3xl: clamp(1.875rem, 5vw, 2.5rem);       /* H2 */
    --font-size-4xl: clamp(2.25rem, 6vw, 3.5rem);        /* H1 */
    --font-size-5xl: clamp(3rem, 8vw, 5rem);             /* Hero titles */
    
    /* Fluid Button Scaling */
    --btn-font-size: clamp(0.875rem, 2.2vw, 1rem);       /* Button text */
    --btn-padding-y: clamp(0.75rem, 2vw, 1rem);          /* Button vertical padding */
    --btn-padding-x: clamp(1.5rem, 4vw, 2rem);           /* Button horizontal padding */
    --btn-padding-sm-y: clamp(0.5rem, 1.5vw, 0.75rem);   /* Small button vertical */
    --btn-padding-sm-x: clamp(1rem, 3vw, 1.5rem);        /* Small button horizontal */
    --btn-padding-lg-y: clamp(1rem, 2.5vw, 1.25rem);     /* Large button vertical */
    --btn-padding-lg-x: clamp(2rem, 5vw, 2.5rem);        /* Large button horizontal */
    
    /* Spacing - Fluid System */
    --container-max-width: 1200px;
    --section-padding-y: clamp(1rem, 3.5vw, 2rem);         /* Section vertical padding */
    --section-padding-x: clamp(1rem, 4vw, 2rem);         /* Section horizontal padding */
    --element-spacing: clamp(1rem, 3vw, 2rem);           /* Element spacing */
    --element-spacing-sm: clamp(0.5rem, 2vw, 1rem);      /* Small element spacing */
    --element-spacing-lg: clamp(2rem, 5vw, 4rem);        /* Large element spacing */
    
    /* Responsive Breakpoints */
    --bp-xs: 320px;   /* Small mobile */
    --bp-sm: 480px;   /* Large mobile */
    --bp-md: 768px;   /* Tablet */
    --bp-lg: 1024px;  /* Desktop */
    --bp-xl: 1440px;  /* Large desktop */
    --bp-2xl: 1920px; /* Extra large desktop */
    
    /* Sticky header anchor offset */
    --sticky-anchor-offset: clamp(70px, 8vw, 110px);

    /* Swiper theme color (unify with site accent) */
    --swiper-theme-color: var(--color-vibrant-red);

    /* Viewport unit helper for mobile (fallbacks to 1vh; overridden to 1dvh when supported) */
    --vh-1: 1vh;
}

@supports (height: 100dvh) {
  :root { --vh-1: 1dvh; }
}

/* Global Styles */
html {
    scroll-behavior: smooth;
}

/* Ensure anchor jumps to the contact form clear the sticky header */
#contact-form, form#contact-form {
    scroll-margin-top: clamp(70px, 8vw, 110px);
}
/* Global anchor offset for sticky header */
[id] {
    scroll-margin-top: var(--sticky-anchor-offset);
}

body {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 2.5vw, 1.15rem);
    line-height: clamp(1.6, 0.5vw + 1.4, 1.8);
    color: var(--color-light-gray);
    background: var(--color-graphite-bg);
    margin: 0;
    padding: 0;
    padding-top: clamp(55px, 6vw, 70px); /* Adjusted for thinner header */
    /* On iOS notch devices, include safe area at the top (fallback above stays for non-supporting browsers) */
    padding-top: calc(clamp(55px, 6vw, 70px) + env(safe-area-inset-top));
    overflow-x: hidden;
}

/* Readability helpers */
html[lang="de"] .prose,
html[lang="de"] p {
    hyphens: auto;
}

.prose {
    max-width: clamp(56ch, 68ch, 72ch);
    margin: 0 auto;
    word-break: normal;
    overflow-wrap: break-word;
}

/* Ensure all images are responsive by default */
img {
    max-width: 100%;
    height: auto;
}

.site-header.scrolled ~ * {
    padding-top: 60px; /* Adjust body padding when header is scrolled (smaller) */
}

.mobile-cta {
    display: none; /* hidden by default; enabled on small screens */
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--section-padding-x);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-white);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: clamp(0.3px, 0.5vw, 0.8px);
    line-height: clamp(1.1, 0.2vw + 1, 1.3);
    margin-bottom: var(--element-spacing-sm);
}

h1 {
    font-weight: 900;
    font-size: var(--font-size-4xl);
    color: var(--color-vibrant-red);
    margin-bottom: var(--element-spacing);
}

h2 {
    font-weight: 700;
    font-size: var(--font-size-3xl);
    margin-bottom: var(--element-spacing);
}

h3 {
    font-weight: 600;
    font-size: var(--font-size-2xl);
    margin-bottom: var(--element-spacing-sm);
}

h4 {
    font-weight: 600;
    font-size: var(--font-size-xl);
    margin-bottom: var(--element-spacing-sm);
}

h5 {
    font-weight: 500;
    font-size: var(--font-size-lg);
    margin-bottom: var(--element-spacing-sm);
}

h6 {
    font-weight: 500;
    font-size: var(--font-size-base);
    margin-bottom: var(--element-spacing-sm);
}

/* Hero Titles - Extra Large */
.hero-title, .hero h1 {
    font-size: var(--font-size-5xl);
    font-weight: 900;
    line-height: clamp(1.05, 0.1vw + 1, 1.15);
}

/* Subtitle styling */
.subtitle, .hero-subtitle {
    font-family: var(--font-body);
    font-size: var(--font-size-lg);
    font-weight: 400;
    font-style: italic;
    color: var(--color-mid-gray);
    text-transform: none;
    letter-spacing: normal;
    line-height: clamp(1.4, 0.3vw + 1.2, 1.6);
}

/* Header - Cinematic Design System */
.site-header {
    background: var(--color-graphite-bg);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Respect iOS safe areas when fixed to top */
    padding-top: env(safe-area-inset-top);
}

.site-header.scrolled {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(230, 57, 70, 0.3);
    padding: 0.4rem 0;
}

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

.site-branding .site-logo {
    color: var(--color-white);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Site branding layout: logo over slogan (all breakpoints) */
.site-branding {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 0 0 auto;
    gap: clamp(4px, 0.8vw, 8px);
}

.site-slogan {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--color-light-gray);
    font-size: clamp(0.78rem, 0.95vw, 0.9rem);
    line-height: 1.1;
    white-space: normal;
}

.site-header.scrolled .site-slogan {
    font-size: clamp(0.72rem, 0.9vw, 0.86rem);
    opacity: 0.9;
}

@media (max-width: 768px) {
    .site-branding { gap: 4px; }
    .site-slogan { font-size: clamp(0.82rem, 3.5vw, 0.95rem); opacity: 0.95; }
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--element-spacing-sm);
}

.main-navigation a {
    color: var(--color-white);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: clamp(0.5px, 0.3vw, 1.2px);
    font-size: var(--font-size-sm);
    line-height: 1.2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: clamp(6px, 1.5vw, 10px) clamp(12px, 3vw, 18px);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.main-navigation a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(230, 57, 70, 0.3), transparent);
    transition: left 0.6s ease;
}

.main-navigation a:hover::before {
    left: 100%;
}

.main-navigation a:hover {
    color: var(--color-black);
    background: var(--color-vibrant-red);
    border-color: var(--color-vibrant-red);
    transform: translateY(clamp(-1px, -0.3vw, -3px));
    box-shadow: 0 clamp(6px, 2vw, 12px) clamp(20px, 4vw, 30px) rgba(230, 57, 70, 0.4);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-vibrant-red);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.main-navigation a:hover::after {
    width: 80%;
}

/* Beautiful Design Enhancements - Cinematic System */

/* Animated Section Dividers */
.section-divider {
    position: relative;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, var(--color-vibrant-red) 20%, var(--color-deep-red) 50%, var(--color-vibrant-red) 80%, transparent 100%);
    margin: 1.25rem 0;
    overflow: hidden;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--color-white), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced Card Hover Effects */
.cinematic-card {
    background: rgba(35, 38, 42, 0.8);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cinematic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-vibrant-red), var(--color-deep-red), var(--color-vibrant-red));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.cinematic-card:hover::before {
    transform: scaleX(1);
}

.cinematic-card:hover {
    transform: translateY(-8px);
    background: rgba(35, 38, 42, 0.95);
    border-color: var(--color-vibrant-red);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(230, 57, 70, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Animated Heading Underlines */
.cinematic-heading {
    position: relative;
    display: inline-block;
}

.cinematic-heading::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-vibrant-red), var(--color-deep-red));
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.cinematic-heading.animate::after,
.cinematic-heading:hover::after {
    width: 100%;
}

/* Gradient Text Effects */
.gradient-text {
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-mid-gray) 50%, var(--color-vibrant-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Enhanced Button Micro-animations */
.cinematic-button {
    position: relative;
    overflow: hidden;
    background: var(--color-vibrant-red);
    color: var(--color-white);
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cinematic-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.cinematic-button:hover::before {
    width: 300px;
    height: 300px;
}

.cinematic-button:hover {
    color: var(--color-black);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 30px rgba(230, 57, 70, 0.4),
        0 0 20px rgba(230, 57, 70, 0.3);
}

/* Cinematic Parallax Effects */
.parallax-bg {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.parallax-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.9) 0%,
        rgba(35, 38, 42, 0.8) 50%,
        rgba(26, 26, 26, 0.9) 100%
    );
    z-index: 1;
}

.parallax-bg > * {
    position: relative;
    z-index: 2;
}

/* Animated Text Reveals */
.text-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-reveal.animate {
    opacity: 1;
    transform: translateY(0);
}

.text-reveal-stagger {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-reveal-stagger.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation delays */
.text-reveal-stagger:nth-child(1) { transition-delay: 0.1s; }
.text-reveal-stagger:nth-child(2) { transition-delay: 0.2s; }
.text-reveal-stagger:nth-child(3) { transition-delay: 0.3s; }
.text-reveal-stagger:nth-child(4) { transition-delay: 0.4s; }
.text-reveal-stagger:nth-child(5) { transition-delay: 0.5s; }

/* Cinematic Scroll Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

/* Scale animations */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

/* Hero Section - Cinematic Design System */
.hero-section.hanssen-design-inspired {
    min-height: clamp(380px, calc(var(--vh-1) * 45), 620px);
    background: linear-gradient(135deg, var(--color-graphite-bg) 0%, var(--color-section-bg) 100%);
    position: relative;
    display: flex;
    align-items: center;
    padding-top: 80px;
}
@media (min-width: 1024px) {
  .hero-section.hanssen-design-inspired {
    min-height: clamp(320px, calc(var(--vh-1) * 40), 560px);
  }
}

.hero-section .container {
    position: relative;
    z-index: 2;
    text-align: left;
    color: var(--color-white);
    width: min(100%, var(--container-max-width));
}

.hero-headline {
    font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-vibrant-red);
}

.hero-intro {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    max-width: 600px;
    font-weight: 300;
    opacity: 0.9;
}

/* Services hero: layout fixes + wider text */
/* Prevent shrink-to-fit that causes one-word-per-line wrapping */
.services-hero {
  justify-content: flex-start; /* left-align the content block inside hero */
}
.services-hero .container {
  width: min(100%, var(--container-max-width)); /* occupy normal container width inside flex hero */
}
/* Ensure normal wrapping behavior on intro */
.services-hero .hero-intro {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Services hero: widen text on desktop */
@media (min-width: 1024px) {
  .services-hero .hero-headline {
    max-width: 1100px;
  }
  .services-hero .hero-intro {
    max-width: 900px;
  }
}

@media (min-width: 1440px) {
  .services-hero .hero-intro {
    max-width: 1000px;
  }
}

/* Generic hero: ensure normal wrapping and widen text on desktop */
/* Avoid one-word-per-line by keeping natural wrapping */
.hero-section .hero-intro {
  white-space: normal;
}

/* Widen text area on desktop for other hero types */
@media (min-width: 1024px) {
  /* Home hero (eventer-inspired) */
  /* Home hero (hanssen-design-inspired) */
  .hero-section.hanssen-design-inspired .hero-headline { max-width: 1100px; }
  .hero-section.hanssen-design-inspired .hero-intro { max-width: 900px; }

  /* Referenzen */
  .references-hero .hero-headline { max-width: 1100px; }
  .references-hero .hero-intro { max-width: 900px; }

  /* Kontakt */
  .contact-hero .hero-headline { max-width: 1100px; }
  .contact-hero .hero-intro { max-width: 900px; }

  /* Blog */
  .blog-hero .hero-headline { max-width: 1100px; }
  .blog-hero .hero-intro { max-width: 900px; }

  /* WIR */
  .wir-hero .hero-headline { max-width: 1100px; }
  .wir-hero .hero-intro { max-width: 900px; }

  /* Leistungen */
  .services-hero .hero-headline { max-width: 1100px; }
  .services-hero .hero-intro { max-width: 900px; }
}

@media (min-width: 1440px) {
  .hero-section.hanssen-design-inspired .hero-intro,
  .wir-hero .hero-intro,
  .services-hero .hero-intro,
  .references-hero .hero-intro,
  .contact-hero .hero-intro,
  .blog-hero .hero-intro {
    max-width: 1000px;
  }
}

.section-title {
    font-size: var(--font-size-2xl);
    text-align: left;
    margin-bottom: 2rem;
    color: var(--color-light-gray);
    font-weight: 300;
    text-transform: lowercase;
}

/* WIR specific list polish */
.wir-section ul {
    list-style: disc;
    padding-left: 1.25rem;
}
.wir-section li {
    margin: 0.3rem 0 0.6rem;
}
.wir-section li::marker {
    color: var(--color-vibrant-red);
    font-size: 0.9em;
}

/* Leistungen list polish */
.services-section .service-details ul {
    list-style: disc;
    padding-left: 1.25rem;
}
.services-section .service-details li::marker {
    color: var(--color-vibrant-red);
}

p {
    margin-bottom: var(--element-spacing);
    color: var(--color-light-gray);
    font-size: clamp(1.05rem, 2.5vw, 1.15rem);
    line-height: clamp(1.6, 0.5vw + 1.4, 1.8);
}

li, span, div {
    font-size: clamp(1.05rem, 2.5vw, 1.15rem);
    line-height: clamp(1.6, 0.5vw + 1.4, 1.8);
}

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

.usp-item {
    background: var(--color-section-bg);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    transition: all 0.3s ease;
}

.usp-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--color-vibrant-red);
}

.usp-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--color-light-gray);
    font-weight: 600;
}

/* Accessibility: focus for reference links */
.reference-link:focus-visible {
    outline: 2px solid var(--color-vibrant-red);
    outline-offset: 2px;
}

/* Referenzen card link wrapper: neutralize default blue */
.references-section .reference-link {
    color: var(--color-light-gray);
    text-decoration: none;
}
.references-section .reference-link:hover,
.references-section .reference-link:focus,
.references-section .reference-link:visited {
    color: var(--color-light-gray);
    text-decoration: none;
}

/* Referenzen content links: use red accent, not browser blue */
.references-section .reference-content a,
.references-section .reference-services a {
    color: var(--color-vibrant-red);
    text-decoration-color: rgba(230,57,70,0.6);
}
.references-section .reference-content a:hover,
.references-section .reference-content a:focus,
.references-section .reference-services a:hover,
.references-section .reference-content a:focus,
.references-section .reference-services a:focus {
    color: #E63946;
    text-decoration-color: #E63946;
}
.references-section .reference-content a:visited,
.references-section .reference-services a:visited { color: #E63946; }

/* Swiper (Referenzen) - force variables on container so they beat CDN defaults */
.references-carousel {
    --swiper-theme-color: var(--color-vibrant-red);
    --swiper-navigation-color: var(--color-vibrant-red);
    --swiper-pagination-color: var(--color-vibrant-red);
}

/* Swiper (Referenzen) - unify accent color with site red */
.references-carousel .swiper-button-next,
.references-carousel .swiper-button-prev {
    color: var(--color-vibrant-red);
}

.references-carousel .swiper-pagination-bullet-active {
    background: var(--color-vibrant-red) !important;
    opacity: 1;
}

.references-carousel .swiper-pagination-bullet {
    background: rgba(230, 57, 70, 0.35);
}

/* Cinematic Reel — override grid for Swiper wrapper */
.references-carousel .references-grid {
    display: flex !important; /* ensure Swiper's flex wrapper, even if generic grid styles exist */
}

/* Cinematic Reel — slide sizing and snap feel */
.references-carousel .swiper-slide.reference-item {
    width: 100% !important;
    scroll-snap-align: start;
}

@media (min-width: 1024px) {
    .references-carousel .swiper-slide.reference-item {
        width: 100% !important;
    }
}

/* Replace default dots with segmented progress */
.references-carousel .swiper-pagination {
    display: none !important;
}

/* Cinematic Reel — segmented progress bar */
.references-reel-ui {
    margin-top: 1.25rem;
    display: grid;
    gap: 1rem;
}

.references-progress {
    display: flex;
    align-items: center;
    gap: 6px;
}

.references-progress .rp-seg {
    flex: 1 1 0;
    height: 4px;
    background: rgba(230, 57, 70, 0.25);
    border: 0;
    padding: 0;
    border-radius: 2px;
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease;
}

.references-progress .rp-seg:hover {
    background: rgba(230, 57, 70, 0.45);
}

.references-progress .rp-seg.active {
    background: var(--color-vibrant-red, #E63946);
    height: 6px;
    transform: translateY(-1px);
}

.references-progress .rp-seg:focus-visible {
    outline: 2px solid var(--color-vibrant-red, #E63946);
    outline-offset: 2px;
}

/* Cinematic Reel — details panel */
.references-details-panel {
    color: var(--color-light-gray, #f0f0f0);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 18px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.references-details-panel .rdp-title {
    margin: 0 0 0.25rem 0;
    font-size: clamp(1.05rem, 1.2vw + 0.9rem, 1.5rem);
    line-height: 1.2;
    color: #fff;
}

.references-details-panel .rdp-meta {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.references-details-panel .rdp-sep {
    opacity: 0.5;
    margin: 0 0.4rem;
}

.references-details-panel .rdp-services {
    margin-top: 0.25rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.references-details-panel .rdp-cta-wrap {
    margin-top: 0.75rem;
}

.references-details-panel .rdp-cta.btn {
    background: var(--color-vibrant-red, #E63946);
    border-color: var(--color-vibrant-red, #E63946);
}

.references-details-panel .rdp-cta.btn:hover,
.references-details-panel .rdp-cta.btn:focus-visible {
    filter: brightness(0.95);
}

/* Vision Section - Eventer.at inspired */
.vision-section {
    padding: 6rem 0;
    background: var(--color-graphite-light);
    text-align: left;
}

/* Mobile Responsive - Eventer.at inspired */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero-headline {
        font-size: 3rem;
        line-height: 1.1;
    }
    
    .usps {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero-headline {
        font-size: 2.5rem;
        line-height: 1.1;
        margin-bottom: 1.5rem;
    }
    
    .hero-subtext {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .btn {
        text-align: center;
        width: 100%;
        padding: 16px 24px;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-container {
        padding: 1rem 1.5rem;
    }
    
    .site-branding .site-logo {
        font-size: 1.3rem;
    }
    
    .usps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-headline {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtext {
        font-size: 1rem;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 12px;
    }
    
    .site-branding .site-logo {
        font-size: 1.2rem;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
    }
    
    .social-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(230, 57, 70, 0.1);
    transition: var(--transition-smooth);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-family: var(--font-accent);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* Cinematic logo text styling */
.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #FFFFFF !important; /* Force white color for visibility */
    transition: all 0.3s ease;
    display: inline-block;
}

.site-header.scrolled .logo-text {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.site-logo:hover {
    color: var(--color-vibrant-red);
    transform: scale(1.05);
}

/* Inline SVG logo scaling */
.site-logo-svg {
    width: clamp(150px, 12vw, 220px);
    height: auto;
    display: inline-block;
    vertical-align: middle;
    overflow: visible; /* avoid clipping right edge of 'Y' */
}
.site-header.scrolled .site-logo-svg {
    width: clamp(130px, 10vw, 200px);
    transition: all 0.3s ease;
}

/* Navigation */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-navigation a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition-smooth);
    padding: 0.5rem 0;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: var(--transition-smooth);
}

.main-navigation a:hover {
    color: var(--accent-gold);
}

.main-navigation a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    min-height: clamp(360px, calc(var(--vh-1) * 40), 520px);
    margin-bottom: 112px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    overflow: hidden;
}

.hero-section + .about-section {
    padding-top: 0;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-media .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="grain"><stop offset="0%" stop-color="%23d4af37" stop-opacity="0.1"/><stop offset="100%" stop-color="%23000" stop-opacity="0"/></radialGradient></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-family: var(--font-primary);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--btn-padding-y) var(--btn-padding-x);
    font-size: var(--btn-font-size);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: clamp(0.5px, 0.3vw, 1px);
    border: none;
    border-radius: 0;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    line-height: 1.2;
}

/* Button Variants */
.btn-primary {
    background: var(--color-vibrant-red);
    color: var(--color-white);
    border: 2px solid var(--color-vibrant-red);
}

.btn-primary:hover {
    background: var(--color-deep-red);
    border-color: var(--color-deep-red);
    color: var(--color-white);
}

.btn-secondary {
    background: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-secondary:hover {
    background: var(--color-white);
    color: var(--color-graphite-bg);
    border-color: var(--color-white);
}

.btn-outline {
    background: transparent;
    color: var(--color-vibrant-red);
    border: 2px solid var(--color-vibrant-red);
}

.btn-outline:hover {
    background: var(--color-vibrant-red);
    color: var(--color-white);
    border-color: var(--color-vibrant-red);
}

/* Button Sizes */
.btn-sm {
    padding: var(--btn-padding-sm-y) var(--btn-padding-sm-x);
    font-size: var(--font-size-sm);
}

.btn-small {
    padding: var(--btn-padding-sm-y) var(--btn-padding-sm-x);
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: var(--btn-padding-lg-y) var(--btn-padding-lg-x);
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.btn:focus-visible {
    outline: 2px solid var(--color-vibrant-red);
    outline-offset: 2px;
}

.btn[disabled],
.btn[data-loading="true"] {
    opacity: 0.75;
    cursor: wait;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(clamp(-1px, -0.2vw, -3px));
    box-shadow: 0 clamp(8px, 2vw, 15px) clamp(20px, 5vw, 40px) rgba(230, 57, 70, 0.3);
}

/* Section Styles */
.section {
    padding: var(--section-padding-y) 0;
    position: relative;
}

.section-sm {
    padding: clamp(2rem, 5vw, 4rem) 0;
}

.section-lg {
    padding: clamp(4rem, 10vw, 8rem) 0;
}

.section-dark {
    background: var(--secondary-black);
}

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

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: var(--spacing-lg);
}

.portfolio-item {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(230, 57, 70, 0.8), rgba(192, 192, 192, 0.6));
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 2;
}

.portfolio-item:hover::before {
    opacity: 1;
}

.portfolio-item:hover {
    transform: scale(1.02);
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.1);
}

.portfolio-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    transform: translateY(100%);
    transition: var(--transition-smooth);
    z-index: 3;
}

.portfolio-item:hover .portfolio-content {
    transform: translateY(0);
}

.portfolio-title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-white);
}

.portfolio-category {
    color: var(--accent-gold);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: var(--spacing-lg);
}

.service-card {
    background: var(--secondary-black);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition-smooth);
    border: 1px solid rgba(230, 57, 70, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-red);
    box-shadow: 0 20px 40px rgba(230, 57, 70, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-black);
}

.service-icon-img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    object-fit: cover;
}

.service-title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.service-description {
    color: var(--text-gray);
    line-height: 1.6;
}

/* About Section */
.about-section {
    padding: var(--section-padding-y) 0;
    background: var(--color-section-alt);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    margin-top: var(--spacing-lg);
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
}

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

.about-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.about-image img {
    width: 100%;
    height: auto;
    transition: var(--transition-slow);
}

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

/* References - Ensure images are responsive and don't overflow */
.reference-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 16/9;
}

.reference-image img,
.reference-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Footer - Cinematic Design System */
.site-footer {
    background: var(--color-section-bg);
    padding: 4rem 0 2rem;
    border-top: 2px solid var(--color-vibrant-red);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-vibrant-red) 0%, var(--color-deep-red) 50%, var(--color-vibrant-red) 100%);
    animation: pulse-border 3s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
    align-items: stretch !important; /* ensure equal-height cards, override utilities if any */
}

.footer-section {
    position: relative;
    padding: 1.5rem;
    background: rgba(26, 26, 26, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(230, 57, 70, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.footer-section:hover {
    background: rgba(26, 26, 26, 0.8);
    border-color: var(--color-vibrant-red);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(230, 57, 70, 0.2);
}

.footer-section h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--color-vibrant-red);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--color-vibrant-red);
    transition: width 0.3s ease;
}

.footer-section:hover h3::after {
    width: 80px;
}

.footer-section p,
.footer-section a {
    font-family: var(--font-body);
    color: var(--color-mid-gray);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.6;
}

.footer-section a {
    position: relative;
    display: inline-block;
    padding: 0.3rem 0;
}

.footer-section a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-vibrant-red);
    transition: width 0.3s ease;
}

.footer-section a:hover {
    color: var(--color-white);
    transform: translateX(5px);
}

.footer-section a:hover::before {
    width: 100%;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin: 0.35rem 0;
}

/* Footer social: add small spacing between icons and copyright */
.site-footer .social-links {
    margin-bottom: 0.75rem;
}

/* Copyright line: anchor to bottom; add a little space above */
.footer-copy {
    margin-top: auto;       /* push to bottom of card */
    padding-top: 0.75rem;   /* little space from social icons */
    color: var(--color-mid-gray);
    font-size: 0.95rem;
}

/* Footer layout enforcement (scoped & high-specificity) */
.site-footer .footer-content {
    align-items: stretch !important; /* ensure equal-height cards */
}

.site-footer .footer-section {
    display: flex;            /* enforce flex for column layout */
    flex-direction: column;
    height: 100%;
}

.site-footer .footer-section > .social-links {
    margin-bottom: 0.75rem !important; /* visible gap under icons */
}

.site-footer .footer-section > .footer-copy {
    margin-top: auto !important;  /* anchor copyright to bottom */
    padding-top: 0.75rem;         /* consistent small gap from icons */
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(170, 176, 182, 0.2);
    color: var(--color-light-gray);
    font-family: var(--font-body);
    font-style: normal;
    font-size: 0.95rem;
}

/* Footer legal line - inline, single row on desktop */
.footer-bottom-content {
    display: flex;
    justify-content: center;
}

.footer-legal-line {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap; /* allow wrap on small screens */
    margin: 0;
}

.footer-legal-line .legal-links {
    display: inline-flex;
    align-items: center;
    gap: 0; /* separators manage spacing */
    flex-wrap: wrap;
}

.footer-legal-line .legal-links a {
    color: var(--color-mid-gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-legal-line .legal-links a:hover,
.footer-legal-line .legal-links a:focus-visible {
    color: var(--color-white);
}

.footer-legal-line .legal-links a + a::before {
    content: '·';
    color: var(--color-mid-gray);
    margin: 0 0.6rem;
}

@media (min-width: 768px) {
    .footer-legal-line { flex-wrap: nowrap; }
    .footer-legal-line .legal-links { flex-wrap: nowrap; }
}

/* Blog Section - Cinematic Design System */
.blog-section {
    padding: 6rem 0;
    background: var(--color-graphite-bg);
    position: relative;
}

.blog-hero {
    min-height: calc(var(--vh-1) * 60);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero .hero-headline {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.blog-hero .hero-intro {
    font-size: 1.3rem;
    margin: 0 auto 2rem;
    color: var(--color-mid-gray);
    line-height: 1.6;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.blog-card {
    background: var(--color-section-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(230, 57, 70, 0.2);
    position: relative;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-vibrant-red), var(--color-deep-red), var(--color-vibrant-red));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-card:hover {
    transform: translateY(-8px);
    background: rgba(35, 38, 42, 0.95);
    border-color: var(--color-vibrant-red);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(230, 57, 70, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.blog-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
}

.blog-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.blog-title a {
    color: var(--color-light-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-title a:hover {
    color: var(--color-vibrant-red);
}

.blog-meta {
    margin-bottom: 1rem;
}

.blog-date {
    color: var(--color-mid-gray);
    font-size: 0.9rem;
    font-weight: 500;
}

.blog-excerpt {
    color: var(--color-light-gray);
    line-height: 1.6;
    margin-bottom: 1.2rem;
    opacity: 0.9;
}

.blog-link {
    color: var(--color-vibrant-red);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: lowercase;
    transition: all 0.3s ease;
    display: inline-block;
}

.blog-link:hover {
    color: var(--color-deep-red);
    transform: translateX(5px);
}

.blog-pagination {
    text-align: center;
    margin-top: 4rem;
}

.load-more-posts {
    background: transparent;
    color: var(--color-vibrant-red);
    border: 2px solid var(--color-vibrant-red);
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: lowercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-posts:hover {
    background: var(--color-vibrant-red);
    color: var(--color-white);
    transform: translateY(-2px);
}

.no-posts {
    text-align: center;
    padding: 4rem 0;
    color: var(--color-medium-grey);
    font-style: italic;
}

/* Social Media Icons */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #888;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    color: var(--color-vibrant-red);
    background-color: rgba(230, 57, 70, 0.1);
    border-color: var(--color-vibrant-red);
    transform: translateY(-2px);
}

.social-icon svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

/* Contact Section Styles */
.social-link {
    color: var(--accent-gold);
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid var(--accent-gold);
    border-radius: 4px;
    transition: var(--transition-smooth);
    font-size: 0.9em;
}

.social-link:hover {
    background-color: var(--accent-gold);
    color: var(--primary-black);
    transform: translateY(-2px);
}

.contact-cta {
    background: rgba(230, 57, 70, 0.1);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(230, 57, 70, 0.3);
}

.cta-content h3 {
    color: var(--accent-gold);
    margin-bottom: 15px;
    font-size: 1.5em;
    font-family: var(--font-primary);
}

.cta-content p {
    color: var(--text-gray);
    margin-bottom: 25px;
    line-height: 1.6;
}

.contact-options {
    display: grid;
    gap: 20px;
    margin-bottom: 25px;
}

.contact-option {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid rgba(230, 57, 70, 0.2);
    text-align: center;
    transition: var(--transition-smooth);
}

.contact-option:hover {
    background: rgba(230, 57, 70, 0.1);
    border-color: var(--accent-gold);
    transform: translateY(-3px);
}

.option-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.contact-option h4 {
    color: var(--accent-gold);
    margin-bottom: 10px;
    font-size: 1.2em;
    font-family: var(--font-primary);
}

.contact-option p {
    color: var(--text-gray);
    margin-bottom: 15px;
    font-size: 0.9em;
}

.contact-note {
    background: rgba(230, 57, 70, 0.15);
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid var(--accent-gold);
}

.contact-note p {
    color: var(--text-gray);
    margin: 0;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .social-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .contact-cta {
        padding: 20px;
    }
    
    .contact-options {
        gap: 15px;
    }
    
    .contact-option {
        padding: 15px;
    }
}

/* ========================================
   COMPREHENSIVE RESPONSIVENESS 2025
   Mobile (Android/iOS) + Desktop (macOS/Windows/Linux) Optimized
   ======================================== */

/* Mobile-First Base Styles (320px+) */
/* Already defined in base styles above */

/* Extra Small Mobile - Portrait (320px - 480px) */
@media (min-width: 320px) {
    :root {
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.5rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }
    
    /* Mobile Navigation */
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(230, 57, 70, 0.2);
    }
    
    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        max-width: 100%;
    }
    
    .site-branding {
        z-index: 1001;
    }
    
    .site-logo {
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--accent-gold);
        text-decoration: none;
    }
    
    .main-navigation {
        position: relative;
    }
    
    .main-navigation ul {
        position: static;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: var(--element-spacing-sm);
        background: transparent;
        width: auto;
        height: auto;
        padding: 0;
        margin: 0;
        list-style: none;
        z-index: auto;
        transition: none;
    }
    
    /* Simple mobile navigation - always visible and stable */
    @media (max-width: 767px) {
        .main-navigation ul {
            position: static;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 0.5rem;
            background: transparent;
            width: 100%;
            height: auto;
            padding: 1rem 0;
            margin: 0;
            list-style: none;
            z-index: auto;
            transition: none;
        }
        
        .main-navigation a {
            padding: 0.5rem 1rem;
            font-size: var(--font-size-sm);
            width: auto;
            text-align: center;
        }
    }
    
    .main-navigation li {
        margin: 0;
    }
    
    .main-navigation a {
        color: var(--text-white);
        font-size: 1.5rem;
        font-weight: 500;
        text-decoration: none;
        padding: 1rem 2rem;
        border-radius: 8px;
        transition: all 0.3s ease;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .main-navigation a:hover,
    .main-navigation a:focus {
        color: var(--accent-gold);
        background: rgba(230, 57, 70, 0.1);
        transform: translateY(-2px);
    }
    
    .mobile-menu-toggle {
        display: none; /* Always hidden - using simple navigation */
    }
    
    .hamburger-line {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--accent-gold);
        margin: 4px 0;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .header-cta {
        display: none; /* Hide on mobile to save space */
    }
    
    /* Adjust main content for fixed header */
    .site-main {
        padding-top: 80px;
    }
    
    .hero-section {
        /* Improved Fluid Typography */
        body {
            font-size: clamp(1rem, 2.5vw, 1.125rem);
            line-height: clamp(1.5, 2.5vw, 1.7);
        }
        
        h1 {
            font-size: clamp(2rem, 6vw, 3.5rem);
            line-height: clamp(1.1, 2vw, 1.2);
        }
        
        h2 {
            font-size: clamp(1.5rem, 4vw, 2.5rem);
            line-height: clamp(1.2, 2vw, 1.3);
        }
        
        h3 {
            font-size: clamp(1.25rem, 3vw, 1.75rem);
            line-height: clamp(1.3, 2vw, 1.4);
        }
        
        p, li, span {
            font-size: clamp(1rem, 2.5vw, 1.125rem);
            line-height: clamp(1.5, 2.5vw, 1.7);
        }
        
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 48px; /* iOS/Android touch target */
        width: 100%;
        text-align: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info,
    .contact-cta {
        padding: 1.5rem;
    }
    
    .social-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .social-link {
        padding: 12px 16px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .contact-options {
        gap: 1rem;
    }
    
    .contact-option {
        padding: 1.5rem;
    }
}

/* Mobile Navigation Overlay + Floating CTA (override for <=767px) */
@media (max-width: 767px) {
    /* Show hamburger, ensure 48x48 tap target */
    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        padding: 0;
        margin-left: auto;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.12);
    }

    /* Hide nav list by default on mobile; reveal when active */
    .main-navigation ul {
        display: none;
    }
    .main-navigation ul.active {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        position: fixed;
        top: clamp(55px, 6vw, 70px);
        left: 0;
        right: 0;
        bottom: 0;
        padding: 1rem;
        background: rgba(10, 10, 10, 0.98);
        z-index: 1001; /* above header (1000) */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Larger, touch-friendly items */
    .main-navigation a {
        min-height: 48px;
        padding: 0.875rem 1rem;
        width: 100%;
    }

    /* Floating mobile CTA */
    .mobile-cta {
        position: fixed;
        right: calc(1rem + env(safe-area-inset-right));
        bottom: calc(1rem + env(safe-area-inset-bottom));
        z-index: 1000;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 56px;
        height: 56px;
        padding: 0 1rem;
        border-radius: 999px;
        font-family: var(--font-heading);
        font-weight: 700;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        text-decoration: none;
        color: var(--color-black);
        background: var(--color-vibrant-red);
        border: 1px solid var(--color-vibrant-red);
        box-shadow: 0 8px 24px rgba(230, 57, 70, 0.45);
        transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }
    .mobile-cta:hover,
    .mobile-cta:focus-visible {
        transform: translateY(-2px);
        box-shadow: 0 12px 28px rgba(230, 57, 70, 0.55);
        outline: none;
    }
    @media (prefers-reduced-motion: reduce) {
        .mobile-cta { transition: none; }
    }

    /* Hide desktop header CTA on small screens (already present but reinforced) */
    .header-cta { display: none; }
}

/* Small Mobile - Landscape (481px - 600px) */
@media (min-width: 481px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    .btn {
        width: auto;
        min-width: 160px;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .social-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .contact-options {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Small Tablets - Portrait (601px - 768px) */
@media (min-width: 601px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }
    
    .container {
        padding: 0 2rem;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 6vw, 3.5rem);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .contact-options {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Large Tablets - Landscape (769px - 1024px) */
@media (min-width: 769px) {
    .hero-content {
        max-width: 800px;
        margin: 0 auto;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .about-content {
        grid-template-columns: 1fr 2fr;
        gap: 3rem;
        align-items: center;
    }
    
    .contact-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Small Desktops/Laptops (1025px - 1280px) */
@media (min-width: 1025px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }
    
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 2rem;
    }
    
    .hero-content {
        max-width: 900px;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    /* Desktop navigation: keep menu on one line and allocate space */
    .site-header .container {
        display: flex;
        align-items: center;
        gap: 1rem;
        max-width: 100%;
        padding-left: clamp(16px, 2vw, 32px);
        padding-right: clamp(16px, 2vw, 32px);
    }
    .site-branding,
    .header-cta {
        flex: 0 0 auto;
    }
    .main-navigation {
        flex: 1 1 auto;
        min-width: 0; /* allow flex item to shrink without forcing wrap */
    }
    .main-navigation ul {
        flex-wrap: nowrap;
        white-space: nowrap;
        gap: clamp(0.15rem, 0.4vw, 0.5rem);
        overflow-x: auto; /* if it truly doesn't fit, scroll instead of wrap */
        -webkit-overflow-scrolling: touch;
        min-width: 0;
        max-width: 100%;
        flex-shrink: 1;
    }
    .main-navigation li {
        flex: 0 0 auto;
        min-width: 0;
    }
    .main-navigation a {
        white-space: nowrap;
        /* tighter desktop sizing */
        font-size: clamp(0.82rem, 0.9vw, 0.95rem);
        letter-spacing: clamp(0px, 0.12vw, 0.3px);
        padding: clamp(6px, 0.6vw, 8px) clamp(8px, 1vw, 12px);
        font-weight: 700;
        line-height: 1.2;
    }
}

/* Large Desktops (1281px - 1440px) */
@media (min-width: 1281px) {
    .container {
        max-width: 1400px;
        padding: 0 3rem;
    }
    
    .hero-content {
        max-width: 1000px;
    }
    
    .services-grid,
    .portfolio-grid {
        gap: 3rem;
    }
}

/* Extra-Large Screens (1441px+) */
@media (min-width: 1441px) {
    .container {
        max-width: 1600px;
    }
    
    .hero-content {
        max-width: 1200px;
    }
}

/* ========================================
   MOBILE-SPECIFIC OPTIMIZATIONS
   ======================================== */

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .social-link,
    .portfolio-item,
    .service-card {
        min-height: 48px;
        min-width: 48px;
    }
    
    .btn:hover,
    .social-link:hover {
        transform: none; /* Disable hover transforms on touch devices */
    }
    
    .btn:active,
    .social-link:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .hero-section {
        min-height: clamp(360px, calc(var(--vh-1) * 40), 520px);
    }
    
    .btn {
        appearance: none;
        -webkit-appearance: none;
        border-radius: 8px;
    }
}

/* Android Chrome specific optimizations */
@media screen and (-webkit-min-device-pixel-ratio: 1) {
    .hero-background {
        will-change: transform;
        backface-visibility: hidden;
    }
}

/* High DPI displays (Retina, high-res Android) */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    .hero-background,
    .portfolio-item img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: clamp(300px, calc(var(--vh-1) * 50), 520px);
        padding: 2rem 0;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .hero-title {
        font-size: clamp(1.5rem, 4vw, 2rem);
        margin-bottom: 0.5rem;
    }
    
    .hero-description {
        font-size: clamp(0.8rem, 2vw, 0.9rem);
        margin-bottom: 1rem;
    }
}

/* Accessibility improvements for mobile */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fade-in,
    .slide-in-left,
    .slide-in-right {
        transition: none;
        transform: none;
        opacity: 1;
    }
    
    .loading-spinner {
        animation: none;
    }
}

/* ========================================
   DESKTOP OS OPTIMIZATION (macOS/Windows/Linux)
   Advanced Breakpoints for Large Displays
   ======================================== */

/* Standard Desktop - 1280px (Small Laptops/Desktops) */
@media (min-width: 80em) { /* 1280px */
    :root {
        --spacing-xs: 0.5rem;
        --spacing-sm: 1rem;
        --spacing-md: 2rem;
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
        --spacing-xxl: 6rem;
    }
    
    .container {
        max-width: 1200px;
        padding: 0 2rem;
    }
    
    .hero-section {
        min-height: clamp(380px, calc(var(--vh-1) * 40), 560px);
        padding: 4rem 0;
    }
    
    .hero h1 {
        font-size: clamp(3rem, 5vw, 4.5rem);
        line-height: 1.1;
    }
    
    .hero p {
        font-size: 1.25rem;
        max-width: 600px;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .main-navigation ul {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        flex-direction: row;
        gap: 2rem;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
}

/* Full HD Desktop - 1920px (Standard Desktop Monitors) */
@media (min-width: 120em) { /* 1920px */
    :root {
        --spacing-md: 2.5rem;
        --spacing-lg: 4rem;
        --spacing-xl: 5rem;
        --spacing-xxl: 8rem;
    }
    
    .container {
        max-width: 1400px;
        padding: 0 3rem;
    }
    
    .hero-section {
        min-height: clamp(420px, calc(var(--vh-1) * 42), 600px);
        padding: 6rem 0;
    }
    
    .hero h1 {
        font-size: clamp(4rem, 6vw, 6rem);
        line-height: 1.05;
    }
    
    .hero p {
        font-size: 1.375rem;
        max-width: 700px;
    }
    
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
    }
    
    .section-padding {
        padding: 6rem 0;
    }
    
    /* Enhanced typography for large screens */
    h2 {
        font-size: clamp(2.5rem, 4vw, 3.5rem);
    }
    
    h3 {
        font-size: clamp(1.5rem, 2.5vw, 2rem);
    }
    
    .btn {
        padding: 1rem 2.5rem;
        font-size: 1.125rem;
    }
}

/* 2K/QHD Desktop - 2560px (High-End Monitors) */
@media (min-width: 160em) { /* 2560px */
    :root {
        --spacing-md: 3rem;
        --spacing-lg: 5rem;
        --spacing-xl: 6rem;
        --spacing-xxl: 10rem;
    }
    
    .container {
        max-width: 1800px;
        padding: 0 4rem;
    }
    
    .hero-section {
        min-height: clamp(440px, calc(var(--vh-1) * 45), 640px);
        padding: 8rem 0;
    }
    
    .hero h1 {
        font-size: clamp(5rem, 7vw, 8rem);
        line-height: 1.02;
    }
    
    .hero p {
        font-size: 1.5rem;
        max-width: 800px;
    }
    
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 4rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 4rem;
    }
    
    .section-padding {
        padding: 8rem 0;
    }
    
    /* Ultra-high resolution typography */
    h2 {
        font-size: clamp(3rem, 5vw, 4.5rem);
    }
    
    h3 {
        font-size: clamp(2rem, 3vw, 2.5rem);
    }
    
    .btn {
        padding: 1.25rem 3rem;
        font-size: 1.25rem;
    }
    
    /* Enhanced spacing for ultra-wide displays */
    .main-navigation a {
        padding: 1rem 2rem;
        font-size: 1.125rem;
    }
}

/* 4K/UHD Desktop - 3840px+ (Ultra-High Resolution) */
@media (min-width: 240em) { /* 3840px */
    :root {
        --spacing-md: 4rem;
        --spacing-lg: 6rem;
        --spacing-xl: 8rem;
        --spacing-xxl: 12rem;
    }
    
    .container {
        max-width: 2400px;
        padding: 0 6rem;
    }
    
    .hero-section {
        min-height: clamp(480px, calc(var(--vh-1) * 48), 680px);
        padding: 10rem 0;
    }
    
    .hero h1 {
        font-size: clamp(6rem, 8vw, 10rem);
        line-height: 1.0;
    }
    
    .hero p {
        font-size: 1.75rem;
        max-width: 1000px;
    }
    
    .services-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 5rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 5rem;
    }
    
    .section-padding {
        padding: 10rem 0;
    }
    
    /* 4K optimized typography */
    h2 {
        font-size: clamp(4rem, 6vw, 6rem);
    }
    
    h3 {
        font-size: clamp(2.5rem, 4vw, 3.5rem);
    }
    
    .btn {
        padding: 1.5rem 4rem;
        font-size: 1.5rem;
    }
    
    /* Ultra-wide navigation */
    .main-navigation a {
        padding: 1.25rem 2.5rem;
        font-size: 1.25rem;
    }
}

/* ========================================
   OS-SPECIFIC OPTIMIZATIONS
   ======================================== */

/* macOS Safari Optimizations */
@supports (-webkit-backdrop-filter: blur(10px)) {
    .site-header {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
    
    .card {
        -webkit-backdrop-filter: blur(5px);
        backdrop-filter: blur(5px);
    }
}

/* Windows High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-black: #000000;
        --text-white: #ffffff;
        --accent-gold: #ffff00;
        --accent-gold-hover: #ffff99;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 1px solid currentColor;
    }
}

/* Linux/Unix Font Rendering Optimization */
@supports (font-feature-settings: "kern") {
    body {
        font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
        text-rendering: optimizeLegibility;
    }
}

/* Retina/High-DPI Display Optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .site-logo {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .hero h1 {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Crisp borders on high-DPI */
    .card,
    .btn {
        border-width: 0.5px;
    }
}

/* Ultra-Wide Display Support (21:9, 32:9 aspect ratios) */
@media (min-aspect-ratio: 21/9) {
    .hero-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 4rem;
    }
    
    .hero-content {
        text-align: left;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Vertical/Portrait Desktop Displays */
@media (orientation: portrait) and (min-width: 768px) {
    .hero-section {
        min-height: calc(var(--vh-1) * 60);
        padding: 3rem 0;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Gaming Monitor Support (144Hz+, Ultra-wide) */
@media (min-width: 200em) { /* 3200px+ */
    .container {
        max-width: 2800px;
    }
    
    .hero-section {
        padding: 12rem 0;
    }
    
    .services-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 6rem;
    }
}

/* Dark mode support for all devices */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-black: #000000;
        --secondary-black: #111111;
        --text-white: #ffffff;
        --text-gray: #e0e0e0;
    }
}

/* Print styles for mobile */
@media print {
    .hero-section,
    .loading-overlay {
        display: none;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Header Navigation Single-Line Guarantee
   Final overrides after all earlier media blocks
   ======================================== */
@media (min-width: 1025px) {
    nav.main-navigation {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        flex: 1 1 auto;
        min-width: 0;
        overflow-x: auto; /* allow horizontal scroll if needed, never wrap */
        -webkit-overflow-scrolling: touch;
    }
    nav.main-navigation ul {
        display: flex;
        flex-wrap: nowrap !important;
        white-space: nowrap;
        gap: clamp(0.1rem, 0.3vw, 0.4rem);
        min-width: 0;
        max-width: 100%;
        width: max-content; /* size to content to avoid wrapping */
    }
    nav.main-navigation li {
        flex: 0 0 auto;
        min-width: 0;
    }
    nav.main-navigation a {
        white-space: nowrap;
        font-size: clamp(0.78rem, 0.82vw, 0.92rem);
        letter-spacing: clamp(0px, 0.08vw, 0.25px);
        padding: clamp(6px, 0.5vw, 8px) clamp(8px, 0.8vw, 10px);
        line-height: 1.2;
    }

    /* ID-specific menu enforcement */
    #primary-menu {
        display: flex;
        flex-wrap: nowrap !important;
        white-space: nowrap;
        gap: clamp(0.1rem, 0.3vw, 0.4rem);
        min-width: 0;
        max-width: 100%;
        width: max-content; /* reinforce one-line for WP menu UL */
    }
    #primary-menu > li {
        flex: 0 0 auto;
        min-width: 0;
    }
    #primary-menu a {
        white-space: nowrap;
        font-size: clamp(0.78rem, 0.82vw, 0.92rem);
        letter-spacing: clamp(0px, 0.08vw, 0.25px);
        padding: clamp(6px, 0.5vw, 8px) clamp(8px, 0.8vw, 10px);
        line-height: 1.2;
    }

    /* Constrain logo width to free space for nav */
    .site-logo-img {
        max-width: clamp(160px, 13vw, 240px);
        height: auto;
    }
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: var(--transition-slow);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: var(--transition-slow);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Loading Animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-black);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(230, 57, 70, 0.3);
    border-top: 3px solid var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =============================
   Kontakt: Form UX Enhancements
   ============================= */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.contact-form {
    display: grid;
    gap: var(--element-spacing-sm);
    max-width: 720px;
}

.contact-form .form-group {
    display: grid;
    gap: 0.5rem;
}

.contact-form .form-label {
    font-family: var(--font-heading);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    letter-spacing: 0.02em;
}

.contact-form .form-input,
.contact-form .form-textarea {
    width: 100%;
    color: var(--color-white);
    background: var(--color-section-alt);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    font-size: var(--font-size-base);
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.contact-form .form-input::placeholder,
.contact-form .form-textarea::placeholder {
    color: var(--color-light-gray);
    opacity: 0.7;
}

.contact-form .form-input:focus,
.contact-form .form-textarea:focus,
.contact-form .form-input:focus-visible,
.contact-form .form-textarea:focus-visible {
    border-color: var(--color-vibrant-red);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.25);
}

.contact-form .is-invalid {
    border-color: var(--color-vibrant-red);
    box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.2);
}

.contact-form .form-hint {
    font-size: var(--font-size-xs);
    color: var(--color-light-gray);
}

.contact-form .form-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.contact-form .char-counter {
    margin-left: auto;
    font-size: var(--font-size-xs);
    color: var(--color-mid-gray);
}

.contact-form .form-disclaimer {
    margin-top: 0.5rem;
    font-size: var(--font-size-xs);
    color: var(--color-mid-gray);
}
.contact-form .form-disclaimer a {
    color: var(--color-white);
    text-decoration: underline;
}

/* Inline field error text and success panel */
.contact-form .form-error-text {
    display: none;
    margin-top: 0.35rem;
    font-size: var(--font-size-xs);
    color: var(--color-vibrant-red);
}
.contact-form .form-group.has-error .form-error-text {
    display: block;
}
.contact-form .form-group.has-error .form-label {
    color: var(--color-vibrant-red);
}

.form-success-panel {
    display: none;
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.25rem 1.5rem;
    border-radius: 12px;
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.35);
    box-shadow: 0 6px 24px rgba(46, 204, 113, 0.12);
}
.form-success-panel .success-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2ecc71;
    color: #0b1a12;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-right: 0.5rem;
}
.form-success-panel h3 {
    margin: 0.5rem 0 0.25rem;
    color: var(--color-white);
    font-family: var(--font-heading);
}
.form-success-panel p {
    margin: 0.25rem 0 0.75rem;
    color: var(--color-light-gray);
}

.contact-form-wrapper.form-success-visible .contact-form {
    display: none;
}
.contact-form-wrapper.form-success-visible .form-success-panel {
    display: block;
}
.contact-form-wrapper.form-success-visible .form-status-message.success {
    display: none;
}

.contact-form .form-status-message {
    padding: 0.9rem 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left-width: 3px;
    border-left-style: solid;
    border-left-color: var(--color-vibrant-red);
}
.contact-form .form-status-message.success {
    border-left-color: #2ecc71; /* success accent */
}
.contact-form .form-status-message.error {
    border-left-color: var(--color-vibrant-red);
}

.contact-form .btn[disabled],
.contact-form .btn[data-loading="true"] {
    opacity: 0.75;
    cursor: wait;
}
