/* Základné resetovanie a písma */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #E62725;
    --text-light: #ffffff;
    --text-dark: #333333;
    --gray-background: #f5f5f5;
    --overlay-top: rgba(0, 0, 0, 0.7);
    --overlay-bottom: rgba(0, 0, 0, 0);
    --transition-speed: 0.3s;
    --max-content-width: 1200px;
}

body {
    background-color: #fff;
    color: var(--text-dark);
}

body.menu-open {
    overflow: hidden;
}


/* --- Sekcia Hero (Hlavná sekcia) --- */

.hero-section {
    position: relative;
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 25px;
    color: var(--text-light);
    background: linear-gradient(to top, var(--overlay-bottom), var(--overlay-top)), url('hsepsfotky/2.webp') no-repeat center center/cover;
    background-blend-mode: multiply;
}


/* Navigácia */

.nav-wrapper {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 100%;
    background-color: transparent;
    padding: 25px 5%;
    box-shadow: none;
    transition: all 0.3s ease;
}

.nav-wrapper.scrolled {
    background-color: #000000;
    padding: 15px 5%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

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

.logo-img {
    height: 70px;
    width: auto;
    transition: height 0.3s ease;
}

.nav-wrapper.scrolled .logo-img {
    height: 60px;
}

.nav-menu {
    display: flex;
    gap: 30px;
    font-weight: 300;
    font-size: 1.1rem;
}

.nav-item {
    color: var(--text-light);
    text-decoration: none;
    padding: 5px 0;
    transition: color var(--transition-speed);
    white-space: nowrap;
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease-out;
}

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

.nav-item:hover {
    color: var(--primary-color);
}

.cta-button {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color var(--transition-speed);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cta-button:hover {
    background-color: #c21a18;
}

.nav-cta {
    font-size: 1.1rem;
    font-weight: 400;
    padding: 10px 22px;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    z-index: 1300;
    width: 30px;
    height: 22px;
    position: relative;
}

.menu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--text-light);
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.menu-toggle span:nth-child(1) {
    top: 0px;
}

.menu-toggle span:nth-child(2) {
    top: 9px;
}

.menu-toggle span:nth-child(3) {
    top: 18px;
}

.menu-toggle.active span:nth-child(1) {
    top: 9px;
    transform: rotate(135deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.menu-toggle.active span:nth-child(3) {
    top: 9px;
    transform: rotate(-135deg);
}

.hero-content {
    margin-top: 27vh;
    padding-left: 5%;
    padding-right: 5%;
}

.hero-content-inner {
    max-width: var(--max-content-width);
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 25px;
    letter-spacing: -1px;
}

.hero-content .subtitle {
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 30px;
    line-height: 1.6;
    max-width: 550px;
}

.hero-cta {
    font-size: 1.1rem;
    padding: 12px 25px;
    font-weight: 600;
}

.story-link {
    position: absolute;
    bottom: 0px;
    right: 5%;
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 22px 28px;
    border-radius: 0;
    transition: transform 0.3s ease-out;
}

.story-link a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid #cccccc;
}

.arrow-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 25px;
    height: 25px;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    transition: transform 0.3s ease-out;
}
/* --- Jazykové Dropdown Menu --- */

.lang-dropdown {
    position: relative;
    display: inline-block;
    margin: 0 15px;
}

/* Tlačidlo (to, čo vidíš stále) */
.lang-dropbtn {
    background-color: transparent;
    color: var(--text-light); /* Biela farba textu v hlavičke */
    padding: 10px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.lang-dropbtn:hover {
    color: var(--primary-color);
}

/* Šípka dole */
.arrow-down {
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    margin-left: 5px;
    margin-bottom: 2px;
}

/* Samotné rozbaľovacie menu (skryté) */
.dropdown-content {
    display: none;
    position: absolute;
    right: 0; /* Zarovnanie doprava */
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 2000;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 10px;
}

/* Odkazy v menu */
.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
    font-size: 0.95rem;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: var(--primary-color);
}

/* Trieda, ktorú pridá JavaScript keď sa klikne */
.show {
    display: block;
}

/* Vlajky */
.lang-flag-img {
    height: 18px;
    width: auto;
    display: block;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
    border-radius: 2px;
}

/* Mobilná verzia - prispôsobenie */
@media (max-width: 992px) {
    .lang-dropdown {
        width: 100%;
        text-align: center;
        margin: 10px 0;
    }
    
    .lang-dropbtn {
        justify-content: center;
        font-size: 1.2rem;
        width: 100%;
    }

    .dropdown-content {
        position: relative;
        box-shadow: none;
        background-color: transparent;
        border: 1px solid rgba(255,255,255,0.1);
        width: 80%;
        margin: 0 auto;
    }

    .dropdown-content a {
        color: var(--text-light);
        justify-content: center;
    }
    
    .dropdown-content a:hover {
        background-color: rgba(255,255,255,0.1);
    }
}

/* --- Všeobecné štýly pre sekcie --- */

.content-wrapper {
    max-width: var(--max-content-width);
    width: 90%;
    margin: 0 auto;
}

.philosophy-section,
.services-section,
.featured-projects-section,
.portfolio-gallery-section {
    padding: 100px 0;
}


/* --- Sekcia Filozofia --- */

.philosophy-layout {
    display: flex;
    gap: 40px;
}

.column-left {
    flex-basis: 15%;
    flex-shrink: 0;
}

.column-right {
    flex-basis: 85%;
}

.section-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
    letter-spacing: 2px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.column-right h2 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 30px;
}

.separator-line {
    width: 100px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 30px 0;
}

.text-columns {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
}

.text-columns p {
    flex: 1;
    font-size: 1rem;
    line-height: 1.8;
    color: #666;
    font-weight: 300;
}

.portfolio-cta {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.portfolio-cta:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}


/* --- Parallax --- */

.parallax-section {
    height: 60vh;
    width: 100%;
    background-image: url(hsepsfotky/6.jpeg);
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.parallax-mobile-image {
    display: none;
    /* Skryté na desktope */
}


/* --- Služby --- */

.services-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 50px;
}

.services-title {
    font-size: 2.7rem;
    font-weight: 700;
}

.services-description {
    font-size: 1rem;
    color: #666;
    font-weight: 300;
    max-width: 350px;
    margin-left: 50px;
    padding-top: 10px;
    line-height: 1.7;
}

.services-grid {
    display: flex;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
    width: 100%;
    align-items: stretch;
}

.service-card {
    position: relative;
    flex: 1 1 200px;
    height: 380px;
    border: 1px solid #e0e0e0;
    padding: 60px 30px 30px 30px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all .4s ease-out;
    z-index: 10;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity .4s ease-out;
    z-index: 1;
    background-color: rgba(0, 0, 0, .7);
    background-blend-mode: multiply;
}

.service-card:nth-child(1)::before {
    background-image: url(hsepsfotky/020919-UR-BW-industries-0038-1536x1025.jpg);
}

.service-card:nth-child(2)::before {
    background-image: url(hsepsfotky/8.jpeg);
}

.service-card:nth-child(3)::before {
    background-image: url(hsepsfotky/1.jpeg);
}

.service-card:nth-child(4)::before {
    background-image: url(hsepsfotky/Universal-Robots.jpg);
}

.service-card:nth-child(5)::before {
    background-image: url(hsepsfotky/ABB_3D_Printing_PowerPac__nástroj_pre_robotickú_3D_tlač_s_robotom_ABB_IRB_6700.jpg);
}

.service-card:nth-child(2),
.service-card:nth-child(4) {
    transform: translateY(40px);
}

.service-card:hover {
    transform: translateY(15px);
    color: var(--text-light);
    z-index: 20;
    border-color: transparent;
}

.service-card:nth-child(2):hover,
.service-card:nth-child(4):hover {
    transform: translateY(55px);
}

.service-card:hover::before {
    opacity: 1;
}

.card-content {
    z-index: 2;
    position: relative;
}

.service-card:hover .card-title,
.service-card:hover .card-text {
    color: var(--text-light);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    transition: color .3s ease;
}

.card-text {
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
    transition: color .3s ease;
}

.card-separator {
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    margin-bottom: 20px;
}

.card-number {
    position: absolute;
    bottom: -10px;
    right: 20px;
    font-size: 8rem;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px #e0e0e0;
    line-height: 1;
    z-index: 1;
    transition: all .4s ease;
}

.service-card:hover .card-number {
    color: var(--primary-color);
    -webkit-text-stroke: 1px var(--primary-color);
}


/* --- Vybrané Projekty (Desktop) --- */

.featured-projects-section.gray-background {
    background-color: var(--gray-background);
}

.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
}

.projects-title {
    font-size: 2.7rem;
    font-weight: 700;
    flex: 1;
}

.projects-info {
    font-size: 1rem;
    font-weight: 300;
    color: #666;
    max-width: 300px;
    text-align: right;
    flex: 1;
    padding-left: 20px;
    line-height: 1.7;
}

.project-item {
    position: relative;
    cursor: pointer;
    border-top: 1px solid #ddd;
    transition: background-color .3s ease;
    overflow: hidden;
    z-index: 10;
}

.project-item:last-of-type {
    border-bottom: 1px solid #ddd;
}

.project-content-flex {
    display: flex;
    position: relative;
    z-index: 10;
    align-items: center;
    padding: 30px 0;
    min-height: 100px;
}

.project-number {
    font-size: 1rem;
    font-weight: 600;
    color: #999;
    flex: 0 0 80px;
    transition: color 0.3s ease;
}

.project-name {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.2;
    flex: 1;
    transition: color .3s ease, transform .3s ease;
}

.project-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    font-weight: 300;
    flex: 0 0 350px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.project-image-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity .5s ease;
}

.project-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(.5);
}

.project-details-toggle {
    display: none;
}

.project-item:hover .project-image-preview {
    opacity: 1;
}

.project-item:hover .project-number,
.project-item:hover .project-name,
.project-item:hover .project-description {
    color: var(--text-light);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.project-item:hover .project-name {
    transform: translateX(10px);
}

.project-item:hover .project-description {
    transform: translateX(-10px);
}


/* --- Portfolio Galéria --- */

.gallery-header {
    margin-bottom: 50px;
}

.gallery-subtitle {
    font-size: .8rem;
    font-weight: 600;
    color: #888;
    letter-spacing: 2px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.gallery-title {
    font-size: 2.7rem;
    font-weight: 700;
    line-height: 1.2;
    max-width: 550px;
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.gallery-item {
    overflow: hidden;
}

.gallery-item.item-1,
.gallery-item.item-2,
.gallery-item.item-3 {
    flex: 1 1 calc(33.33% - 10px);
    max-height: 350px;
}

.gallery-item.item-4,
.gallery-item.item-5 {
    flex: 1 1 calc(50% - 10px);
    max-height: 500px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

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


/* --- Pätička --- */

.site-footer {
    background-color: #000000;
    color: #a9a9a9;
    padding: 80px 0 0 0;
    font-weight: 300;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-bottom: 50px;
}

.footer-column .footer-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.footer-links li {
    margin-bottom: 15px;
    line-height: 1.5;
}

.footer-links a {
    color: #a9a9a9;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright-text {
    margin: 0;
    font-size: 0.9rem;
}

.footer-legal-links a {
    color: #a9a9a9;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-legal-links a:hover {
    color: var(--text-light);
}


/* ================================================= */


/* --- RESPONZIVITA --- */


/* ================================================= */

@media (max-width: 992px) {
    .nav-menu,
    .nav-cta {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.95);
        z-index: 1200;
    }
    .nav-menu.active .nav-item {
        font-size: 2rem;
        padding: 20px 0;
        font-weight: 400;
    }
    .philosophy-layout,
    .text-columns,
    .services-header {
        flex-direction: column;
    }
    .column-left {
        flex-basis: auto;
    }
    .services-description {
        margin-left: 0;
        margin-top: 15px;
        max-width: 100%;
    }
    .services-grid {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    .service-card {
        width: 45%;
        min-width: 280px;
    }
    .service-card:nth-child(2),
    .service-card:nth-child(4) {
        transform: translateY(0);
    }
    .service-card:hover,
    .service-card:nth-child(2):hover,
    .service-card:nth-child(4):hover {
        transform: translateY(-10px);
    }
    .gallery-item.item-1,
    .gallery-item.item-2,
    .gallery-item.item-3,
    .gallery-item.item-4,
    .gallery-item.item-5 {
        flex: 1 1 calc(50% - 10px);
        max-height: 300px;
    }
    .projects-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .projects-info {
        text-align: left;
        margin-top: 15px;
        max-width: 100%;
        padding-left: 0;
    }
    .project-item:hover .project-name,
    .project-item:hover .project-description {
        transform: none;
    }
    .project-item:hover .project-number,
    .project-item:hover .project-name,
    .project-item:hover .project-description {
        color: inherit;
        text-shadow: none;
    }
    .project-content-flex {
        flex-wrap: wrap;
        padding: 25px 0;
        align-items: center;
    }
    .project-details-toggle {
        display: block;
        width: 24px;
        height: 24px;
        border: 2px solid var(--text-dark);
        border-radius: 50%;
        position: relative;
        cursor: pointer;
        transition: transform 0.3s ease;
        margin-right: 15px;
        flex-shrink: 0;
    }
    .project-details-toggle::before,
    .project-details-toggle::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 10px;
        height: 2px;
        background-color: var(--text-dark);
        transition: transform 0.3s ease;
        transform-origin: center;
    }
    .project-details-toggle::before {
        transform: translate(-50%, -50%) rotate(90deg);
    }
    .project-details-toggle::after {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    .project-item.active .project-details-toggle::before {
        transform: translate(-50%, -50%) rotate(180deg);
    }
    .project-item.active .project-details-toggle::after {
        transform: translate(-50%, -50%) rotate(180deg);
    }
    .project-number {
        flex-basis: auto;
        margin-right: 10px;
    }
    .project-name {
        font-size: 1.2rem;
        flex-grow: 1;
    }
    .project-description {
        flex-basis: 100%;
        max-height: 0;
        padding-top: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.5s ease-out, padding-top 0.5s ease-out, opacity 0.5s ease-out;
    }
    .project-item.active .project-description {
        max-height: 200px;
        padding-top: 15px;
        opacity: 1;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 767px) {
    .content-wrapper {
        width: 90%;
    }
    .philosophy-section,
    .services-section,
    .featured-projects-section,
    .portfolio-gallery-section {
        padding: 60px 0;
    }
    .hero-content {
        margin-top: 0;
        padding-top: 100px;
        height: auto;
        text-align: center;
        display: block;
    }
    .hero-content-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-content h1 {
        font-size: 2.8rem;
    }
    .hero-content .subtitle {
        margin: 0 auto 30px auto;
    }
    .story-link {
        display: none;
    }
    .column-right h2,
    .services-title,
    .projects-title,
    .gallery-title {
        font-size: 2rem;
    }
    .services-header {
        align-items: center;
        text-align: center;
    }
    .service-card {
        width: 100%;
    }
    .gallery-item {
        flex: 1 1 100% !important;
        max-height: 300px !important;
    }
    /* FINÁLNA OPRAVA PRE PARALLAX SECTIN NA MOBILE */
    .parallax-section {
        background-image: none;
        /* Skryjeme problematické pozadie */
        height: 30vh;
    }
    .parallax-mobile-image {
        display: block;
        /* Zobrazíme <img> tag */
        width: 100%;
        height: 100%;
        object-fit: cover;
        /* Správne oreže a vyplní priestor */
        object-position: center;
        /* centruje obrázok */
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-column {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
    }
}
