/* ===================================
   Modern Geodézie Kladno Website
   Ultra-clean, Professional Design
   =================================== */

/* CSS Variables - Color Palette */
:root {
    /* Primary Colors */
    --primary-orange: #f58220;
    --primary-gray: #5a5a5a;
    --dark-gray: #2d2d2d;
    --light-gray: #f5f5f5;

    /* Accent Colors */
    --accent-orange: #ff9447;
    --accent-orange-light: #ffb380;
    --accent-gray-light: #e8e8e8;

    /* Neutral Colors */
    --white: #ffffff;
    --black: #000000;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #999999;

    /* Background */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-dark: #1a1a1a;

    /* Gradients */
    --gradient-orange: linear-gradient(135deg, #f58220 0%, #ff9447 100%);
    --gradient-gray: linear-gradient(135deg, #5a5a5a 0%, #2d2d2d 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(245, 130, 32, 0.05) 0%, rgba(90, 90, 90, 0.05) 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.8rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===================================
   Reset & Base Styles
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
    line-height: 1.7;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* ===================================
   Container & Layout
   =================================== */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
}

/* ===================================
   Navigation
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo img {
    height: 50px;
    width: auto;
    transition: var(--transition-base);
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    list-style: none;
}

.nav-link {
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    padding: 0.5rem 0;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-orange);
    transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-orange);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.cta-button {
    background: var(--gradient-orange);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
}

.nav-link.cta-button::after {
    display: none;
}

.nav-link.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-gray);
    border-radius: 3px;
    transition: var(--transition-base);
}

/* ===================================
   Hero Section
   =================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    margin-top: 80px;
    padding-top: 80px;
    overflow: hidden;
    clip-path: inset(0);   /* ořezává i fixní vrstvu vrstevnic (paralax) */
}

/* Dekorativní vrstevnice (geodetický motiv) - vpravo nahoře, plynule mizí.
   Paralax: vrstva je fixní vůči oknu a hero ji ořezává (clip-path), takže při
   scrollu stojí na místě a stránka se přes ni posouvá. Bez pohybu
   (prefers-reduced-motion) zůstává statická uvnitř hero. */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 60%;
    z-index: 0;
    pointer-events: none;
    background: url('images/topo-light.svg') right top / 900px 900px repeat;
    -webkit-mask-image: radial-gradient(ellipse 85% 100% at 100% 0%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
    mask-image: radial-gradient(ellipse 85% 100% at 100% 0%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
}

.hero > .container {
    position: relative;
    z-index: 1;
}

@media (min-width: 1025px) {
    .hero::before {
        width: 65%;
        height: 100%;
        -webkit-mask-image: radial-gradient(ellipse 90% 85% at 100% 35%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
        mask-image: radial-gradient(ellipse 90% 85% at 100% 35%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .hero::before {
        position: fixed;
        top: 80px;
        height: 60vh;
    }
}

@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
    .hero::before {
        height: calc(100vh - 80px);
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-overlay);
    opacity: 0.6;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    width: 100%;
}

.hero-text {
    max-width: 800px;
}

.hero-title {
    margin-bottom: var(--spacing-md);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.title-line {
    display: block;
}

.title-line.highlight {
    background: var(--gradient-orange);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.stat-card {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-orange);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}


/* ===================================
   Buttons
   =================================== */

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-orange);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-primary);
    border: 2px solid var(--accent-gray-light);
}

.btn-secondary:hover {
    background: var(--light-gray);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-full {
    width: 100%;
}

/* ===================================
   Section Styles
   =================================== */

section {
    padding: var(--spacing-xl) 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--light-gray);
    color: var(--primary-orange);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-sm);
}

.section-title {
    margin-bottom: var(--spacing-sm);
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===================================
   Services Section
   =================================== */

.services {
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-orange);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-base);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card.featured {
    background: var(--gradient-orange);
    color: var(--white);
}

.service-card.featured .service-title,
.service-card.featured .service-description,
.service-card.featured .service-features li {
    color: var(--white);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--light-gray);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    transition: var(--transition-base);
}

.service-card.featured .service-icon {
    background: rgba(255, 255, 255, 0.2);
}

.service-icon svg {
    width: 30px;
    height: 30px;
    color: var(--primary-orange);
}

.service-card.featured .service-icon svg {
    color: var(--white);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.service-description {
    margin-bottom: var(--spacing-sm);
    line-height: 1.7;
}

.service-features {
    list-style: none;
    margin-top: var(--spacing-sm);
}

.service-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-orange);
    font-weight: bold;
}

.service-card.featured .service-features li::before {
    color: var(--white);
}

/* ===================================
   About Section
   =================================== */

.about {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-content {
    max-width: 600px;
}

.about-text {
    margin-bottom: var(--spacing-sm);
    font-size: 1.0625rem;
}

.features-list {
    margin: var(--spacing-md) 0;
    display: grid;
    gap: var(--spacing-sm);
}

.feature-item {
    display: flex;
    gap: var(--spacing-sm);
    align-items: flex-start;
    padding: var(--spacing-sm);
    background: var(--light-gray);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.feature-item:hover {
    background: var(--accent-gray-light);
    transform: translateX(5px);
}

.feature-icon {
    width: 24px;
    height: 24px;
    background: var(--gradient-orange);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.feature-content h4 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-size: 1.0625rem;
}

.feature-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.cta-box {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--gradient-orange);
    border-radius: var(--radius-lg);
    color: var(--white);
}

.cta-box h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.cta-box p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-sm);
}

.cta-box .btn-primary {
    background: var(--white);
    color: var(--primary-orange);
}

.about-image {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.image-card {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    transition: var(--transition-slow);
    overflow: hidden;
    position: relative;
    flex: 1;
}

.image-card:hover {
    transform: scale(1.02);
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-xl);
    display: block;
}

.image-placeholder {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder svg {
    width: 120px;
    height: 120px;
    color: rgba(255, 255, 255, 0.5);
}

/* ===================================
   Gallery Section
   =================================== */

.gallery {
    background: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    cursor: pointer;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(245, 130, 32, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-base);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: var(--white);
    font-size: 3rem;
    transform: scale(0.5);
    transition: var(--transition-base);
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

/* Gallery Lightbox */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.gallery-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--white);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    font-size: 1.25rem;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    transform: scale(1.1);
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-image-wrapper {
    max-width: 100%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-wrapper img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    animation: fadeIn 0.3s ease;
}

.lightbox-counter {
    margin-top: var(--spacing-md);
    color: var(--white);
    font-size: 1.125rem;
    font-weight: 600;
}

/* ===================================
   Technology Section
   =================================== */

.technology {
    background: var(--bg-dark);
    color: var(--white);
    padding: var(--spacing-xl) 0;
}

.technology .section-tag {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-orange);
}

.technology .section-title,
.technology .section-description {
    color: var(--white);
}

.technology .section-description {
    opacity: 0.8;
}

.tech-subsection {
    margin-bottom: var(--spacing-xl);
}

.tech-subsection:last-child {
    margin-bottom: 0;
}

.tech-subsection-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.tech-subsection-title {
    color: var(--white);
    font-size: 1.75rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.tech-subsection-title i {
    color: var(--primary-orange);
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
}

.tech-card {
    flex: 0 0 calc((100% - 2 * var(--spacing-md)) / 3);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .tech-card {
        flex-basis: calc((100% - var(--spacing-md)) / 2);
    }
}

@media (max-width: 600px) {
    .tech-card {
        flex-basis: 100%;
    }
}

.tech-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: var(--primary-orange);
}

.tech-image {
    width: 100%;
    height: 220px;
    margin-bottom: var(--spacing-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--white);
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-image img {
    width: 100%;
    height: 100%;
    padding: var(--spacing-xs);
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: var(--transition-slow);
}

.tech-card:hover .tech-image img {
    transform: scale(1.05);
}

.tech-image-icon {
    background: linear-gradient(135deg, rgba(245, 130, 32, 0.28) 0%, rgba(255, 255, 255, 0.06) 100%);
    border: 1px solid rgba(245, 130, 32, 0.25);
    color: var(--primary-orange);
    font-size: 4.5rem;
}

.tech-image-icon i {
    transition: var(--transition-slow);
}

.tech-card:hover .tech-image-icon i {
    transform: scale(1.1);
}

.tech-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.tech-card h3 {
    color: var(--primary-orange);
    margin-bottom: var(--spacing-sm);
}

.tech-card h4 {
    color: var(--primary-orange);
    margin-bottom: var(--spacing-sm);
}

.tech-card p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-sm);
}

.tech-icon i {
    font-size: 3rem;
}

/* ===================================
   Modal Styles
   =================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s ease;
    z-index: 1;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    width: 40px;
    height: 40px;
    border: none;
    background: var(--light-gray);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    font-size: 1.25rem;
    color: var(--text-primary);
    z-index: 2;
}

.modal-close:hover {
    background: var(--primary-orange);
    color: var(--white);
    transform: rotate(90deg);
}

.modal-header {
    background: var(--gradient-orange);
    color: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    text-align: center;
    flex-shrink: 0;
}

.modal-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-sm);
}

.modal-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

.modal-header h2 {
    color: var(--white);
    font-size: 2rem;
    margin: 0;
}

.modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    flex: 1;
}

.modal-intro {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--light-gray);
}

.modal-section {
    margin-bottom: var(--spacing-md);
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h3 {
    color: var(--primary-orange);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-section h3 i {
    font-size: 1.125rem;
}

.modal-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.modal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
    border-bottom: 1px solid var(--light-gray);
}

.modal-list li:last-child {
    border-bottom: none;
}

.modal-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--primary-orange);
    font-size: 0.875rem;
}

.modal-list li strong {
    color: var(--text-primary);
}

/* Modal Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===================================
   References Section
   =================================== */

.references {
    background: var(--bg-secondary);
}

.references-list {
    columns: 2 320px;
    column-gap: var(--spacing-md);
}

.reference-category {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    break-inside: avoid;
    margin-bottom: var(--spacing-md);
}

/* Podsekce uvnitř karty (další obce, další firmy, sport, komunita) - vždy viditelné */
.reference-sub {
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px dashed var(--accent-gray-light);
}

.reference-sub-first {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.reference-sub + .reference-sub {
    margin-top: var(--spacing-sm);
}

.reference-sub h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
}

.reference-sub h4 i {
    color: var(--primary-orange);
    font-size: 0.875rem;
}

.reference-tag-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
}

.reference-category h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-orange);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reference-category h3 i {
    font-size: 1.125rem;
}

.reference-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reference-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--light-gray);
    color: var(--text-primary);
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    position: relative;
}

.reference-tag:hover {
    background: var(--primary-orange);
    color: var(--white);
    transform: translateY(-2px);
}

.reference-tag.featured {
    background: var(--gradient-orange);
    color: var(--white);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.reference-tag.featured:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ===================================
   Contact Section
   =================================== */

.contact {
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.contact-info {
    max-width: 500px;
}

.contact-text {
    margin-bottom: var(--spacing-md);
    font-size: 1.0625rem;
}

.contact-details {
    display: grid;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.contact-item {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--light-gray);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.contact-item:hover {
    background: var(--accent-gray-light);
    transform: translateX(5px);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-orange);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: var(--white);
}

.contact-item h4 {
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.contact-item p {
    font-size: 1rem;
    color: var(--text-secondary);
}

.contact-item a {
    color: var(--text-secondary);
}

.contact-item a:hover {
    color: var(--primary-orange);
}

.business-hours {
    padding: var(--spacing-sm);
    background: var(--light-gray);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-sm);
}

.business-hours h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.business-hours p {
    font-size: 0.9375rem;
}

.business-hours .note {
    font-size: 0.875rem;
    font-style: italic;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Contact Map */
.contact-map {
    position: relative;
}

.map-container {
    width: 100%;
    height: 450px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--light-gray);
}

/* Contact Form Section */
.contact-form-section {
    margin-top: var(--spacing-lg);
}

.form-section-title {
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--light-gray);
    padding: var(--spacing-md);
    border-radius: var(--radius-xl);
    max-width: 800px;
    margin: 0 auto;
}

.contact-form {
    display: grid;
    gap: var(--spacing-sm);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 2px solid var(--accent-gray-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===================================
   Footer
   =================================== */

.footer {
    background: var(--bg-dark);
    color: var(--white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-logo {
    height: 60px;
    margin-bottom: var(--spacing-sm);
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.footer-column h4 {
    color: var(--white);
    margin-bottom: var(--spacing-sm);
    font-size: 1.125rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-fast);
    font-size: 0.9375rem;
}

.footer-links a:hover {
    color: var(--primary-orange);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.footer-bottom-left {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.footer-logo-secondary {
    display: flex;
    align-items: center;
}

.footer-patika-logo {
    height: 50px;
    width: auto;
    opacity: 0.8;
    transition: var(--transition-fast);
}

.footer-patika-logo:hover {
    opacity: 1;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1024px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-image {
        gap: var(--spacing-md);
    }

    .image-card {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-wrapper {
        padding: 0.5rem 0;
    }

    .logo img {
        height: 40px;
    }

    .nav-menu {
        position: fixed;
        top: 57px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 57px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
        transition: var(--transition-base);
        box-shadow: var(--shadow-lg);
    }

    /* 1. Scroll indicator - skrýt na mobilu nebo posunout */
    .scroll-indicator {
        display: none;
    }

    /* 2. Galerie do 2 sloupců */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    /* 3. Menší padding u popupů */
    .modal-header {
        padding: var(--spacing-md);
    }

    .modal-body {
        padding: var(--spacing-md);
    }

    .modal-icon {
        width: 60px;
        height: 60px;
    }

    .modal-icon i {
        font-size: 2rem;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .tech-image {
        height: 180px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        width: 100%;
        text-align: left;
        padding: var(--spacing-sm);
    }

    .nav-link.cta-button {
        text-align: center;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .tech-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        justify-content: center;
        text-align: center;
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    section {
        padding: var(--spacing-lg) 0;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* ===================================
   Animations
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Apply animations */
.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.service-card,
.reference-category {
    animation: fadeInUp 0.6s ease-out backwards;
}

/* Tech cards in slider - no animation to avoid opacity issues with clones */
.tech-card {
    animation: none !important;
    opacity: 1 !important;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

/* ===================================
   Utility Classes
   =================================== */

.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

/* ===================================
   Dekorativní vrstevnice - další místa (statické)
   Hero má motiv u sebe. Tady: oranžový box, Technologie, Kontakt, patička.
   =================================== */

.about .cta-box,
.technology,
.contact,
.footer {
    position: relative;
    overflow: hidden;
}

.technology > .container,
.contact > .container,
.footer > .container {
    position: relative;
    z-index: 1;
}

.cta-box > * {
    position: relative;
    z-index: 1;
}

.cta-box::before,
.technology::before,
.contact::before,
.footer::before {
    content: '';
    position: absolute;
    z-index: 0;
    pointer-events: none;
    background-repeat: repeat;
}

/* oranžový box "Potřebujete poradit?" - bílé linky vpravo */
.cta-box::before {
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;
    background-image: url('images/topo-white.svg');
    background-position: right center;
    background-size: 700px 700px;
    -webkit-mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
}

/* Technologie - vlevo nahoře */
.technology::before {
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background-image: url('images/topo-dark.svg');
    background-position: left top;
    background-size: 1000px 1000px;
    -webkit-mask-image: radial-gradient(ellipse 85% 100% at 0% 0%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 100%);
    mask-image: radial-gradient(ellipse 85% 100% at 0% 0%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 100%);
}

/* Kontakt - vpravo dole */
.contact::before {
    right: 0;
    bottom: 0;
    width: 100%;
    height: 30%;
    background-image: url('images/topo-light.svg');
    background-position: right bottom;
    background-size: 900px 900px;
    -webkit-mask-image: radial-gradient(ellipse 85% 100% at 100% 100%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 100%);
    mask-image: radial-gradient(ellipse 85% 100% at 100% 100%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 100%);
}

/* Patička - vlevo dole */
.footer::before {
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/topo-dark.svg');
    background-position: left bottom;
    background-size: 800px 800px;
    -webkit-mask-image: radial-gradient(ellipse 80% 100% at 0% 100%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 100% at 0% 100%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 100%);
}

@media (min-width: 1025px) {
    .technology::before {
        width: 65%;
        height: 70%;
    }

    .contact::before {
        width: 60%;
        height: 60%;
    }

    .footer::before {
        width: 70%;
    }
}


/* ===================================
   Mobil - doladění
   Kompaktnější rozložení, menší texty v oknech, tlačítka s dostatečnou plochou pro prst.
   =================================== */

.tech-card.is-clickable {
    cursor: pointer;
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }

    .technology {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-title {
        margin-bottom: 0.6rem;
    }

    .section-description {
        font-size: 1rem;
        line-height: 1.6;
    }

    .section-tag {
        font-size: 0.75rem;
        padding: 0.4rem 0.85rem;
    }

    h2 { font-size: 1.75rem; }

    /* Navigace - výška dle skutečné plochy (100vh na mobilu zahrnuje adresní řádek) */
    .nav-menu {
        height: calc(100vh - 57px);
        height: calc(100dvh - 57px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: var(--spacing-sm) var(--spacing-sm) 2rem;
        gap: 0;
    }

    .nav-link {
        display: flex;
        align-items: center;
        min-height: 52px;
        padding: 0 0.5rem;
        font-size: 1.0625rem;
        border-bottom: 1px solid var(--accent-gray-light);
    }

    .nav-link.cta-button {
        justify-content: center;
        margin-top: 1rem;
        border-bottom: none;
    }

    .nav-menu {
        align-items: stretch;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link::after {
        display: none;
    }

    /* Hero */
    .hero {
        min-height: auto;
        margin-top: 57px;
        padding: 2.25rem 0 2.5rem;
    }

    .hero-content {
        gap: 1.75rem;
    }

    .hero-title {
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.0625rem;
        line-height: 1.7;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        gap: 0.75rem;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        margin-top: 0;
    }

    .stat-card {
        padding: 1rem 0.5rem;
    }

    .stat-number {
        font-size: 2.25rem;
    }

    .stat-label {
        font-size: 0.8125rem;
        line-height: 1.3;
    }

    /* Služby - ikona vedle nadpisu, položky v řádku */
    .services-grid {
        gap: 1rem;
    }

    .service-card {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 0.9rem;
        align-items: center;
        padding: 1.25rem;
        border-radius: var(--radius-lg);
    }

    .service-card .service-icon {
        grid-column: 1;
        width: 48px;
        height: 48px;
        margin-bottom: 0;
    }

    .service-card .service-title {
        grid-column: 2;
        margin-bottom: 0;
        font-size: 1.25rem;
    }

    .service-card .service-description {
        grid-column: 1 / -1;
        margin: 0.9rem 0 0.4rem;
        font-size: 0.9375rem;
        line-height: 1.6;
    }

    .service-card .service-features {
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: wrap;
        gap: 0 1.1rem;
        margin-top: 0;
    }

    .service-card .service-features li {
        padding: 0.25rem 0 0.25rem 1.25rem;
        font-size: 0.9rem;
    }

    .service-card .featured-badge {
        position: static;
        grid-column: 1 / -1;
        justify-self: start;
        margin-bottom: 0.75rem;
        padding: 0.3rem 0.7rem;
        font-size: 0.6875rem;
    }

    /* O nás */
    .about-grid {
        gap: 2rem;
    }

    .about-text {
        font-size: 1rem;
    }

    .features-list {
        margin: 1.25rem 0;
    }

    .feature-content h4 {
        font-size: 1rem;
    }

    .feature-content p {
        font-size: 0.875rem;
    }

    .cta-box {
        padding: 1.25rem;
    }

    .cta-box h3 {
        font-size: 1.375rem;
    }

    .about-image {
        flex-direction: row;
        gap: 0.75rem;
    }

    .about-image .image-card {
        max-width: none;
        margin: 0;
        border-radius: var(--radius-lg);
    }

    .about-image .image-card img {
        height: auto;
        aspect-ratio: 1 / 1;
        border-radius: var(--radius-lg);
    }

    /* Galerie */
    .gallery-grid {
        gap: 0.5rem;
    }

    .gallery-item {
        border-radius: var(--radius-md);
    }

    .gallery-lightbox {
        touch-action: pan-y;
    }

    .lightbox-content {
        width: 100%;
        height: 100vh;
        height: 100dvh;
    }

    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        background: rgba(20, 20, 20, 0.55);
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    /* Technologie */
    .tech-subsection {
        margin-bottom: 2rem;
    }

    .tech-subsection-header {
        margin-bottom: 1rem;
    }

    .tech-subsection-title {
        font-size: 1.25rem;
    }

    .tech-grid {
        gap: 0.75rem;
    }

    /* Reference */
    .references-list {
        columns: 1;
    }

    .reference-category {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }

    .reference-category h3 {
        font-size: 1.125rem;
    }

    .reference-items {
        gap: 0.4rem;
    }

    .reference-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8125rem;
    }

    .reference-tag-sm {
        padding: 0.35rem 0.7rem;
        font-size: 0.8125rem;
    }

    /* Kontakt */
    .contact-grid {
        gap: 1.5rem;
    }

    .contact-item {
        padding: 0.75rem;
    }

    .contact-icon {
        width: 44px;
        height: 44px;
    }

    .map-container {
        height: 300px;
        border-radius: var(--radius-lg);
    }

    .contact-form-section {
        margin-top: 2rem;
    }

    .form-section-title {
        margin-bottom: 1rem;
        font-size: 1.375rem;
    }

    .contact-form-wrapper {
        padding: 1.25rem;
        border-radius: var(--radius-lg);
    }

    /* Patička */
    .footer {
        padding: 2.5rem 0 1.25rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.75rem 1.25rem;
    }

    .footer-column:first-child,
    .footer-column:last-child {
        grid-column: 1 / -1;
    }

    .footer-logo {
        height: 48px;
    }

    .footer-column h4 {
        margin-bottom: 0.4rem;
        font-size: 1.0625rem;
    }

    .footer-links li {
        margin-bottom: 0;
    }

    .footer-links a {
        display: inline-block;
        padding: 0.45rem 0;
    }

    .footer-bottom-left {
        flex-direction: column;
        align-items: center;
        gap: 0.15rem;
    }

    .footer-patika-logo {
        height: 40px;
    }

    /* Tlačítko nahoru (styly z JS jsou inline, proto !important) */
    .back-to-top {
        width: 44px !important;
        height: 44px !important;
        right: 14px !important;
        bottom: 14px !important;
        font-size: 1.25rem !important;
    }

    /* Okna s detailem - skoro přes celou šířku, menší texty */
    .modal {
        padding: 0.75rem;
    }

    .modal-content {
        max-height: 92vh;
        max-height: 92dvh;
        border-radius: var(--radius-lg);
    }

    .modal-close {
        top: 0.6rem;
        right: 0.6rem;
        width: 40px;
        height: 40px;
    }

    .modal-header {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        padding: 1.1rem 3.5rem 1.1rem 1rem;
        text-align: left;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .modal-icon {
        width: 44px;
        height: 44px;
        margin: 0;
        flex-shrink: 0;
    }

    .modal-icon i {
        font-size: 1.25rem;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 1.25rem 1.1rem 1.5rem;
    }

    .modal-intro {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        font-size: 0.9375rem;
        line-height: 1.6;
    }

    .modal-section {
        margin-bottom: 1.25rem;
    }

    .modal-section h3 {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }

    .modal-section p {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .modal-list li {
        padding: 0.5rem 0 0.5rem 1.6rem;
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .modal-list li::before {
        font-size: 0.75rem;
        top: 0.62rem;
    }
}

/* Technologie na telefonu: kompaktní řádky (obrázek vlevo, text vpravo) */
@media (max-width: 600px) {
    .tech-card {
        display: grid;
        grid-template-columns: 84px 1fr;
        grid-template-rows: auto auto;
        align-content: center;
        column-gap: 0.9rem;
        padding: 0.75rem;
        border-radius: var(--radius-md);
    }

    .tech-card .tech-image {
        grid-row: 1 / span 2;
        align-self: center;
        width: 84px;
        height: 84px;
        margin-bottom: 0;
    }

    .tech-card .tech-image img {
        padding: 3px;
    }

    .tech-image-icon {
        font-size: 2rem;
    }

    .tech-card h4 {
        grid-column: 2;
        align-self: end;
        margin-bottom: 0.2rem;
        font-size: 1rem;
    }

    .tech-card p {
        grid-column: 2;
        align-self: start;
        margin-bottom: 0;
        font-size: 0.875rem;
        line-height: 1.5;
    }
}

/* Hero na telefonu: motiv (fixní vrstva) začíná pod lištou */
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
    .hero::before {
        top: 57px;
    }
}

/* Dotyková zařízení: žádné "zaseknuté" hover efekty po klepnutí */
@media (hover: none) {
    .tech-card:hover,
    .service-card:hover,
    .gallery-item:hover,
    .feature-item:hover,
    .contact-item:hover,
    .stat-card:hover {
        transform: none;
    }

    .gallery-item:hover img,
    .tech-card:hover .tech-image img,
    .tech-card:hover .tech-image-icon i {
        transform: none;
    }

    .tech-card:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .reference-tag:hover {
        background: var(--light-gray);
        color: var(--text-primary);
        transform: none;
    }
}

/* O nás - pořadí v jednom sloupci (mobil/tablet): text, fotky, až pak oranžový box.
   .about-content se "rozpustí" (display: contents), aby šel box zařadit za fotky. */
@media (max-width: 1024px) {
    .about-grid {
        gap: 0;
    }

    .about-content {
        display: contents;
    }

    .about-content .section-tag {
        justify-self: start;
    }

    .about-content .features-list {
        margin: 0.5rem 0 0;
    }

    .about-image {
        order: 1;
        margin-top: 2rem;
    }

    .about-content .cta-box {
        order: 2;
        margin-top: 2rem;
    }
}

/* Pozůstatek starého skriptu (okno tooltipů, už se nepoužívá) - skrýt pro případ staré cache v prohlížeči */
.mobile-tooltip-modal {
    display: none !important;
}
