/* ================================
   NAJKRAJŠÍ WEB NA SVETE
   Luxusný, minimalistický, nadčasový dizajn
   ================================ */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --accent: #667eea;
    --accent-light: #8b9cf5;
    --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 8px 30px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, #667eea 0%, transparent 70%),
        linear-gradient(135deg, transparent 30%, #764ba2 100%);
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientWave {
    0%, 100% {
        transform: translateX(0) translateY(0);
        opacity: 0.08;
    }
    12% {
        transform: translateX(3%) translateY(-2%);
        opacity: 0.11;
    }
    25% {
        transform: translateX(5%) translateY(-4%);
        opacity: 0.13;
    }
    37% {
        transform: translateX(-2%) translateY(3%);
        opacity: 0.09;
    }
    50% {
        transform: translateX(-4%) translateY(2%);
        opacity: 0.12;
    }
    62% {
        transform: translateX(2%) translateY(-3%);
        opacity: 0.10;
    }
    75% {
        transform: translateX(4%) translateY(-2%);
        opacity: 0.14;
    }
    87% {
        transform: translateX(-1%) translateY(2%);
        opacity: 0.11;
    }
}



@keyframes meshPulse {
    0%, 100% {
        opacity: 0.5;
    }
    20% {
        opacity: 0.7;
    }
    40% {
        opacity: 0.9;
    }
    60% {
        opacity: 0.8;
    }
    80% {
        opacity: 0.6;
    }
}

@keyframes meshMove {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    25% {
        transform: translateX(-50px) translateY(-30px) rotate(1deg);
    }
    50% {
        transform: translateX(-100px) translateY(-60px) rotate(2deg);
    }
    75% {
        transform: translateX(-50px) translateY(-30px) rotate(1deg);
    }
    100% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
}

h1, h2, h3 {
    font-family: 'Roboto', sans-serif;
    font-weight: 900;
    letter-spacing: -0.5px;
}

/* ================================
   HEADER & NAVIGATION
   ================================ */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom-color: rgba(102, 126, 234, 0.15);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.12);
    transform: translateY(0);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
}

nav li {
    position: relative;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transition: width 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--accent);
    transform: translateY(-2px);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Logo styling */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-color: transparent !important;
    text-decoration-style: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    margin-right: auto;
    padding-left: 2rem;
}

.logo {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-link:hover .logo {
    transform: scale(1.05);
}

.logo-link::after {
    display: none !important;
}

/* ================================
   MAIN LAYOUT
   ================================ */

main {
    position: relative;
    z-index: 1;
    margin-top: 80px;
}

section {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    position: relative;
    scroll-margin-top: 80px;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ================================
   HERO SECTION
   ================================ */

#home {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#home::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.15) 50%, transparent 70%);
    border-radius: 50%;
    animation: pulse 8s ease-in-out infinite, float 6s ease-in-out infinite;
    filter: blur(60px);
}

#home::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
    filter: blur(50px);
    z-index: -1;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}

.hero {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    }
    50% {
        box-shadow: 0 4px 24px rgba(102, 126, 234, 0.5);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-30px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    }
    50% {
        background: linear-gradient(135deg, rgba(118, 75, 162, 0.3), rgba(102, 126, 234, 0.3));
    }
    100% {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.btn {
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.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: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    box-shadow: var(--shadow-soft);
    animation: glow 2s ease-in-out infinite;
}

.btn.primary:hover {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    transform: translateY(-3px) scale(1.05);
}

.btn.secondary {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn.secondary:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.trust-signals {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 3rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.signal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: bounceIn 0.8s ease-out backwards;
}

.signal:nth-child(1) { animation-delay: 0.7s; }
.signal:nth-child(2) { animation-delay: 0.85s; }
.signal:nth-child(3) { animation-delay: 1s; }

.signal .icon {
    width: auto;
    height: auto;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    display: inline-block;
    animation: fadeIn 2s ease-out forwards;
    transform: scale(0.6);
    opacity: 0;
}

.signal:nth-child(1) .icon { animation-delay: 0s; }
.signal:nth-child(2) .icon { animation-delay: 0s; }
.signal:nth-child(3) .icon { animation-delay: 0s; }

.signal:hover .icon {
    filter: grayscale(0%) brightness(1);
    transform: scale(0.66) rotate(5deg);
}

.signal span:last-child {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* ================================
   SERVICES SECTION
   ================================ */

#services {
    background: var(--bg-primary);
    position: relative;
}

#services .container {
    text-align: center;
}

#services h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--accent);
    animation: fadeInUp 0.8s ease-out backwards;
}

#services > .container > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.step {
    background: #ffffff;
    padding: 2.5rem 2rem;
    border: 2px solid rgba(102, 126, 234, 0.25);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    animation: slideInUp 0.8s ease-out backwards;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.12);
}

.step::before {
    display: none;
}

.border-animation {
    position: absolute;
    inset: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: visible;
}

.step:hover .border-animation {
    opacity: 1;
}

.border-path {
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.border-1 {
    stroke-dasharray: 380;
    stroke-dashoffset: 380;
}

.border-2 {
    stroke-dasharray: 380;
    stroke-dashoffset: 380;
}

.step:hover .border-1 {
    animation: drawBorder1 2.5s ease-in-out forwards;
}

.step:hover .border-2 {
    animation: drawBorder2 2.5s ease-in-out forwards;
}

@keyframes drawBorder1 {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes drawBorder2 {
    to {
        stroke-dashoffset: 0;
    }
}

.step::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), rgba(139, 156, 245, 0.03));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.25s; }
.step:nth-child(3) { animation-delay: 0.4s; }
.step:nth-child(4) { animation-delay: 0.55s; }

.step::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), rgba(139, 156, 245, 0.03));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: 20px;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
    border-color: transparent;
}

.step:hover::after {
    opacity: 1;
}

.step-icon {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.step:nth-child(1) .step-icon { animation-delay: 0.2s; }
.step:nth-child(2) .step-icon { animation-delay: 0.4s; }
.step:nth-child(3) .step-icon { animation-delay: 0.6s; }
.step:nth-child(4) .step-icon { animation-delay: 0.8s; }

.step h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.step ul {
    list-style: none;
    text-align: left;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.step li {
    padding: 0.6rem 0;
    padding-left: 1.8rem;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.6;
}

.step li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 1;
}

/* ================================
   GALLERY SECTION
   ================================ */

#gallery {
    position: relative;
    overflow: hidden;
}

#gallery::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 156, 245, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 10s ease-in-out infinite;
    filter: blur(90px);
}

#gallery .container {
    text-align: center;
    position: relative;
    z-index: 1;
}

#gallery h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--accent);
    animation: fadeInUp 0.8s ease-out backwards;
}

#gallery > .container > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

    .projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    grid-auto-rows: 1fr; /* ensure uniform row heights for grid */
}

    .project {
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.8s ease-out backwards;
}

.project:nth-child(1) { animation-delay: 0.2s; }
.project:nth-child(2) { animation-delay: 0.4s; }
.project:nth-child(3) { animation-delay: 0.6s; }

.project:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-strong);
    transform: translateY(-8px) scale(1.02);
}

.project-image {
    min-height: 220px;
    background-color: #eee; /* fallback while image loads */
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease;
    background-size: cover;
    background-position: center;
    width: 100%;
    flex: 1 1 auto;
}

.project:hover .project-image {
    transform: scale(1.05);
}

.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    opacity: 0.3;
    transition: opacity 0.4s ease;
}

.project:hover .project-image::after {
    opacity: 0.5;
}

.project h3 {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0;
    font-size: 1.2rem;
    color: white;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
    z-index: 2;
    transition: color 0.3s ease;
}

.project:hover h3 {
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.9);
}

.project p {
    padding: 0 1.5rem 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

.project-link {
    display: block;
    padding: 1.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.24s ease;
    border-top: 1px solid rgba(102, 126, 234, 0.15);
    margin-top: auto;
    transform-origin: top center; /* scale downwards from the top edge */
    will-change: transform;
}

.project-link:hover {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    /* translate up slightly while scaling vertically more to fill gap beneath image */
    transform: translateY(-4px) scale3d(1.06, 1.18, 1);
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.28);
    z-index: 3; /* keep it visually above other elements */
}
/* Make sure active (touch) maintains the scaled-down effect */
.project-link:active {
    transform: translateY(-3px) scale3d(1.04, 1.14, 1);
}

/* Touch-friendly active state */
.project-link:active {
    transform: translateY(-3px) scale(1.04);
}

/* ================================
   CONTACT SECTION
   ================================ */

#contact {
    background: var(--bg-primary);
    position: relative;
}

#contact .container {
    text-align: center;
}

#contact h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--accent);
    animation: fadeInUp 0.8s ease-out backwards;
}

#contact > .container > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form {
    position: relative;
    z-index: 1;
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 10px;
}

input,
select,
textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23667eea' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-secondary);
}

form button[type="submit"] {
    margin-top: 1rem;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

form button[type="submit"]:active {
    transform: translateY(-1px) scale(0.98);
}

/* WYSIWYG editor styles removed - replaced by simple textarea styling below */

.contact-textarea-container textarea {
    min-height: 200px; /* Increased for better email writing experience */
    padding: 1rem;
    outline: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    overflow-y: auto;
    border-radius: 10px;
    text-align: left;
}

/* placeholder for textarea handled by textarea::placeholder */


/* Character counter */
.character-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    padding: 0 1rem;
}

.character-counter #charCount {
    font-weight: 600;
    color: var(--accent);
}

.character-counter.warning #charCount {
    color: #ff6b35;
}

.character-counter.error #charCount {
    color: #dc3545;
}


/* ================================
   FOOTER
   ================================ */

footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    padding: 4rem 2rem 3rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.5;
}

footer .container {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

footer p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2.5rem;
    font-size: 1.125rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-links a:hover::after {
    width: 100%;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

/* ================================
   MOBILE & TABLETS (320px - 1200px)
   ================================ */

@media (max-width: 540px) {
    .hero h1 {
        font-size: clamp(1.4rem, 5.5vw, 2.1rem);
    }
}

@media (max-width: 900px) {
    .signal .icon {
        transform: scale(0.4);
        margin-bottom: 0.1rem;
    }
    .trust-signals {
        gap: 0.4rem;
    }
    .signal {
        font-size: 0.7rem;
        min-width: 50px;
    }
    .signal:hover .icon {
        transform: scale(0.44) rotate(5deg);
    }
}

@media (max-width: 600px) {
    .signal .icon {
        transform: scale(0.2);
        margin-bottom: 0rem;
    }
    .trust-signals {
        gap: 0.05rem;
        padding: 0 0.1rem;
    }
    .signal {
        min-width: 30px;
        gap: 0;
    }
    .signal span {
        font-size: 0.7rem !important;
        line-height: 0.8;
        margin-top: 0;
    }
    .signal:hover .icon {
        transform: scale(0.22) rotate(5deg);
    }
}

@media (max-width: 1200px) {
    /* Navigation */
    nav {
        min-height: 60px; /* Ensure header has enough height for hamburger */
        position: relative;
    }
    
    nav ul {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        position: fixed;
        top: 60px; /* Below the fixed header (matches nav min-height) */
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(102, 126, 234, 0.1);
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.12);
        display: none;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }

    nav ul.show {
        display: flex;
        opacity: 1;
        visibility: visible;
    }

    nav li {
        width: 100%;
        text-align: center;
    }

    nav a {
        display: block;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        text-transform: none;
        letter-spacing: 0;
    }

    /* Add mobile menu toggle button */
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--accent);
        margin: 5px 0;
        transition: 0.3s;
        border-radius: 2px;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* Mobile logo */
    .logo-link {
        padding-left: 1rem;
    }

    .logo {
        height: 48px;
    }

    /* Hero Section */
    .hero h1 {
        margin-bottom: 1rem;
        padding: 0 1rem;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 1rem;
        margin-bottom: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 0 1rem;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        padding: 1rem 2rem;
    }

    .trust-signals {
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .signal {
        font-size: 0.9rem;
    }

    /* Background elements scaling */
    #home::before {
        width: 300px;
        height: 300px;
        filter: blur(30px);
    }

    #home::after {
        width: 200px;
        height: 200px;
        filter: blur(25px);
    }

    /* Services Section */
    .steps {
        /* Use an auto-fit grid so columns collapse gradually rather than abruptly */
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
        gap: 1rem;
        padding: 0 1rem;
    }

    .step {
        width: 100% !important; /* Celá šírka na mobile */
        padding: 1.5rem 1rem;
    }

    .step-icon {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .step h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .step ul {
        font-size: 0.9rem;
    }

    .step li {
        margin-bottom: 0.25rem;
    }

    /* Gallery Section */
    .projects {
        /* Use progressive grid for projects as well */
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
        gap: 1rem;
        padding: 0 1rem;
    }

    .project {
        width: 100% !important; /* Celá šírka na mobile */
        margin: 0;
    }

    .project-image {
        height: 150px;
    }

    .project h3 {
        font-size: 1.2rem;
        padding: 1rem 1rem 0.5rem;
    }

    .project p {
        font-size: 0.9rem;
        padding: 0 1rem;
    }

    .project-link {
        padding: 0.75rem 1rem 1rem;
        font-size: 0.9rem;
    }

    /* Contact Section */
    #contact h2 {
        font-size: clamp(1.8rem, 6vw, 2.2rem);
        margin-bottom: 0.5rem;
    }

    #contact > .container > p {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    form {
        padding: 0 1rem;
        gap: 1rem;
    }

    input,
    select {
        padding: 0.875rem;
        font-size: 1rem;
    }


    .contact-textarea-container textarea {
        padding: 1rem;
        font-size: 1rem;
        min-height: 160px; /* Slightly larger for mobile email writing */
        line-height: 1.5;
    }


    /* Footer */
    footer .container {
        text-align: center;
        padding: 2rem 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
    }

    .footer-links a {
        font-size: 0.9rem;
    }

    /* Touch targets for mobile */
    .btn,
    .mobile-menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }

    /* Better spacing for touch */

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }

    /* Improve readability */
    .step,
    .project {
        margin: 0 0.5rem;
    }
}

/* ================================
   LARGE DESKTOPS (1201px+)
   ================================ */

@media (min-width: 1201px) {
    /* Hide mobile menu toggle on desktop */
    .mobile-menu-toggle {
        display: none !important;
    }
    
    /* Container adjustments */
    .container {
        max-width: 1400px;
        padding: 0 4rem;
    }

    /* Navigation */
    nav ul {
        gap: 3rem;
        padding: 1.5rem 4rem;
    }

    /* Hero Section */
    .hero h1 {
        font-size: clamp(3.5rem, 4vw, 4.5rem);
    }

    /* Background elements */
    #home::before {
        width: 800px;
        height: 800px;
        filter: blur(60px);
    }

    #home::after {
        width: 400px;
        height: 400px;
        filter: blur(50px);
    }

    /* Services Section */
    .step {
        width: 100% !important; /* Celá šírka na mobile */
        padding: 1.5rem 1rem;
        max-width: 720px; /* prevent super-wide single-column items */
        margin-left: auto;
        margin-right: auto;
    }

    /* Gallery Section */
    .project {
        width: 100% !important; /* Celá šírka on mobile */
        margin: 0;
        max-width: 720px; /* prevent overly wide project cards */
        margin-left: auto;
        margin-right: auto;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
    }

    /* Contact Section */
    form {
        max-width: 700px;
    }

    /* Footer */
    footer .container {
        padding: 4rem;
    }
}

/* ================================
   VERY SMALL SCREENS (320px and below)
   ================================ */

@media (max-width: 320px) {
    .container {
        padding: 0 0.5rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    .step {
        padding: 1.25rem 0.875rem;
    }

    .project h3 {
        font-size: 1.1rem;
    }

}

/* ================================
   MID-SIZE SCREENS (tablet / small laptops)
   Target: 768px - 1200px
   These rules help prevent content overlap, ensure canvases sit behind content
   and keep grid items readable on medium screens.
   ================================ */
@media (min-width: 768px) and (max-width: 1200px) {
    /* Make container slightly narrower on mid screens for better balance */
    .container {
        max-width: 1100px;
        padding: 0 1.5rem;
    }

    /* Add horizontal padding for sections and avoid content flush to edges */
    section {
        padding: 3rem 1.25rem;
        overflow: hidden; /* prevent absolutely positioned canvases from bleeding */
    }

    /* Ensure canvases do not overlay content visually */
    canvas[id$='-canvas'], canvas {
        pointer-events: none;
        z-index: 0; /* make sure canvas stays behind content */
    }

    /* Hero content sizing for mid screens */
    .hero .hero-content {
        padding: 1.5rem;
        max-width: 900px;
    }
    .hero h1 {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }

    /* Steps & Gallery: prefer 2 columns on mid screens */
    .steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .projects {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Project image size and responsiveness */
    .project-image {
        min-height: 220px;
        background-position: center;
        background-size: cover;
    }
    #contact > .container {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
    .contact-textarea-container textarea {
        min-height: 180px;
    }
}

/* ================================
   LANDSCAPE ORIENTATION MOBILE
   ================================ */

@media (max-height: 500px) and (orientation: landscape) {
    #home {
        min-height: 70vh;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 0.5rem;
    }

    .hero p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .cta-buttons {
        gap: 0.75rem;
    }

    .trust-signals {
        gap: 1rem;
    }
}

/* ================================
   DARK MODE SUPPORT (if user prefers)
   ================================ */

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a202c;
        --bg-secondary: #2d3748;
        --text-primary: #f7fafc;
        --text-secondary: #e2e8f0;
    }

    body::before {
        opacity: 0.03;
    }

    header {
        background: rgba(26, 32, 44, 0.95);
        border-bottom-color: rgba(102, 126, 234, 0.2);
    }

    header.scrolled {
        background: rgba(26, 32, 44, 0.98);
    }

    nav ul.show {
        background: rgba(26, 32, 44, 0.98);
    }

    .step {
        background: var(--bg-secondary);
        border-color: rgba(102, 126, 234, 0.3);
    }

    .project {
        background: var(--bg-secondary);
        border-color: rgba(102, 126, 234, 0.2);
    }

    input,
    select,
    textarea {
        background: var(--bg-secondary);
        border-color: rgba(102, 126, 234, 0.3);
        color: var(--text-primary);
    }

}

/* ================================
   PRINT STYLES
   ================================ */

@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    .no-print {
        display: none;
    }

    header,
    footer,
    .cta-buttons {
        display: none;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    .step,
    .project {
        break-inside: avoid;
        border: 1px solid #ccc;
        margin-bottom: 1rem;
    }
}

/* ================================
   SCROLLBAR
   ================================ */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-light);
}
