/*------------------------------------------------------------------
  Gips Design — Custom Overrides
  Loaded after style.css. Minimal additions only.

  Sections:
  1. Language Switcher
  2. Navigation
  3. Typography & Spacing
  4. Homepage Sections
  5. Inner Page Hero
  6. Project Cards
  7. Service Details
  8. Contact Page
  9. Footer
  10. Responsive
-------------------------------------------------------------------*/

/* ================================================
   1. Language Switcher
   ================================================ */
.lang-switcher {
    position: relative;
}
.lang-switcher > a {
    cursor: pointer;
}
.lang-switcher .lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 150px;
    background-color: rgba(0, 0, 0, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    padding: 6px 0;
    margin-top: 5px;
    z-index: 100;
    list-style: none;
}
.lang-switcher:hover .lang-menu,
.lang-switcher.open .lang-menu {
    display: block;
}
.lang-switcher .lang-menu li {
    display: block;
}
.lang-switcher .lang-menu li a {
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 20px;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.lang-switcher .lang-menu li a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.08);
}
.lang-switcher .lang-menu li a.current-lang {
    color: #fff;
    opacity: 1;
}

/* Desktop only: stack the language options vertically (overrides the
   inherited .navigation-links li { display:inline-block }) and bridge the
   gap between the trigger and the menu so the dropdown stays open while the
   cursor moves down into it. Tablet/mobile keep the inline language row. */
@media (min-width: 992px) {
    .navigation .right .navigation-links li.lang-switcher .lang-menu li {
        display: block;
    }
    .lang-switcher .lang-menu::before {
        content: "";
        position: absolute;
        top: -8px;
        left: 0;
        right: 0;
        height: 8px;
    }
}

/* ================================================
   2. Navigation
   ================================================ */
.navigation .brand img {
    max-height: 95px;
    width: auto;
    transition: max-height 0.4s ease;
}
/* Sticky/scrolled state: logo smoothly shrinks back to the compact size */
.navigation.show-background .brand img {
    max-height: 70px;
}

.navigation .navigation-links li.active > a {
    opacity: 1;
}
.navigation .navigation-links li.active > a:after {
    width: 100%;
}
.nav-separator {
    display: inline-block;
    width: 1px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    vertical-align: middle;
    margin: 0 5px;
}
.navigation .navigation-links li.lang-switcher > a {
    font-size: 11px;
    letter-spacing: 1.5px;
}

/* ================================================
   3. Typography & Spacing
   ================================================ */

/* Subtitle text under section H2s */
.subtitle-text {
    text-align: center;
    max-width: 600px;
    margin: -10px auto 40px;
    opacity: 0.9;
}
.background-is-dark .subtitle-text {
    color: rgba(255, 255, 255, 0.7);
}

/* Improve body copy readability */
p {
    line-height: 1.7;
}

/* Tighten spacing between consecutive .block sections */
.block + .block {
    margin-top: -1px;
}

/* Better spacing for feature icon blocks */
.feature.has-icon .description h3 {
    margin-bottom: 10px;
}
.feature.has-icon .description p {
    line-height: 1.6;
}

/* Improve CTA banner spacing */
.marketing-banner {
    padding: 20px 0;
}
.marketing-banner h2 a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding-bottom: 2px;
    transition: border-color 0.3s ease;
}
.marketing-banner h2 a:hover {
    border-bottom-color: #fff;
}

/* Client logos: normalize sizes and remove link cursor */
.logos .logo {
    text-align: center;
}
.logos .logo a {
    cursor: default;
}
.logos .logo img {
    max-height: 45px;
    max-width: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
.logos .logo img:hover {
    opacity: 1;
}

/* ================================================
   4. Homepage Sections
   ================================================ */

/* Gallery item overlay (featured projects on homepage) */
.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 15px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%);
    z-index: 1;
}
.gallery-item-overlay h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 3px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.gallery-item-overlay figure {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Gallery items: show full project images (480×540 = 8:9) */
.gallery .gallery-item {
    height: auto;
    aspect-ratio: 8 / 9;
}
.gallery .gallery-item .image {
    height: 100%;
    overflow: hidden;
}

/* Project grid: lay the cards out with flex-wrap so they flow row by row and
   never "catch" on a taller card above (the Bootstrap float-grid gap bug).
   Scoped to >=768px where the columns are 3-up; below that each card stacks
   full width exactly as before. Card design/spacing/ratios are unchanged. */
@media (min-width: 768px) {
    .gallery .row {
        display: flex;
        flex-wrap: wrap;
    }
    /* Bootstrap's .row clearfix pseudo-elements become stray flex items and can
       push the 3rd card onto a new line — remove them while the row is flex. */
    .gallery .row::before,
    .gallery .row::after {
        display: none;
    }
}

/* ================================================
   5. Inner Page Hero
   ================================================ */
.hero-section.blog-title .hero-title p {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 2px;
    opacity: 0.6;
}

/* ================================================
   6. Project Cards (projekti.html)
   ================================================ */
.project-card {
    margin-bottom: 30px;
}
/* Whole project card links to its detail page — stay visually identical */
.project-card-link,
.project-card-link:hover,
.project-card-link:focus {
    display: block;
    color: inherit;
    text-decoration: none;
}
.project-card .gallery-item {
    margin-bottom: 0;
    height: auto;
    aspect-ratio: 8 / 9;
}
.project-card .gallery-item .image {
    height: 100%;
    overflow: hidden;
    border-radius: 2px;
}
.project-card .project-info {
    padding: 18px 0 10px;
}
.project-card .project-info h3 {
    font-size: 14px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.project-card .project-info .project-meta {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 10px;
    display: block;
}
.project-card .project-info p {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 0;
    line-height: 1.5;
}

/* ================================================
   7. Service Details (usluge.html)
   ================================================ */

/* Better spacing between alternating detail blocks */
.detail + .detail {
    margin-top: 40px;
}
.detail .gallery img {
    border-radius: 2px;
}

/* ================================================
   8. Contact Page
   ================================================ */
.contact h4 {
    margin-top: 25px;
    margin-bottom: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.contact address {
    line-height: 1.8;
}
.company-legal {
    margin-top: 10px;
}
.company-legal p {
    opacity: 0.6;
    line-height: 1.8;
}
.map-placeholder {
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
}

/* Quick contact cards: center alignment */
.feature.has-icon .description p a {
    color: inherit;
}

/* ================================================
   9. Footer
   ================================================ */
.footer-links a {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 2px;
    transition: color 0.2s ease;
}
.footer-links a:hover {
    color: #fff;
}

/* Footer spacing improvements */
#page-footer .brand {
    margin-bottom: 30px;
    display: inline-block;
}
#page-footer .row {
    margin-bottom: 10px;
}
#page-footer .note {
    font-size: 11px;
    opacity: 0.5;
    letter-spacing: 1px;
}

/* ================================================
   10. Responsive
   ================================================ */

/* Tablet */
@media (max-width: 991px) {
    /* Keep the logo at the compact size below desktop so the larger
       top-of-page logo never overflows or collides with the hamburger */
    .navigation .brand img {
        max-height: 70px;
    }
    .lang-switcher .lang-menu {
        position: static;
        display: block;
        background-color: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        min-width: 0;
        margin-top: 0;
    }
    .lang-switcher > a {
        display: none;
    }
    .lang-switcher .lang-menu li {
        display: inline-block;
    }
    .lang-switcher .lang-menu li a {
        padding: 10px 8px;
        font-size: 11px;
    }
    .nav-separator {
        display: none;
    }

    /* Fix feature cards stacking on tablet */
    .feature.has-icon {
        margin-bottom: 30px;
    }

    /* Contact columns */
    .contact .col-md-5,
    .contact .col-md-7 {
        margin-bottom: 30px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    /* Subtitle: full width */
    .subtitle-text {
        max-width: 100%;
        padding: 0 15px;
    }

    /* Hero section: smaller text */
    .hero-section .hero-title h1 {
        font-size: 28px;
        line-height: 1.3;
    }

    /* CTA banner: smaller */
    .marketing-banner h2 {
        font-size: 18px;
    }

    /* Stage/process: better stacking */
    .stage {
        margin-bottom: 30px;
    }

    /* Footer: stack columns */
    #page-footer .col-md-4 {
        margin-bottom: 25px;
    }

    /* Detail blocks: image full width */
    .detail .gallery {
        margin-bottom: 20px;
    }

    /* Contact data spacing */
    .contact-data figure {
        margin-bottom: 3px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero-section .hero-title h1 {
        font-size: 24px;
    }

    .hero-section .btn {
        display: block;
        margin-bottom: 10px;
        text-align: center;
    }

}

/* ================================================
   11. Project Detail page
   ================================================ */
/* Left column: prominent main image */
.project-detail-image {
    margin-bottom: 14px;
}
.project-detail-image a {
    display: block;
}
.project-detail-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Gallery thumbnails — click one to swap the main image */
.project-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.project-thumb {
    width: 84px;
    height: 84px;
    padding: 0;
    border: 2px solid #e4e4e4;
    border-radius: 3px;
    background: none;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.7;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}
.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.project-thumb:hover {
    opacity: 1;
}
.project-thumb.is-active {
    opacity: 1;
    border-color: #000;
}

/* Right column: project information */
.project-detail-info .project-detail-title {
    margin: 0 0 18px;
    font-size: 24px;
    line-height: 1.25;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.project-facts {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}
.project-facts li {
    margin-bottom: 8px;
}
.project-facts .label {
    font-weight: 700;
    margin-right: 4px;
}
.project-detail-body {
    margin-bottom: 26px;
}
.project-detail-body p {
    margin-bottom: 16px;
}
.project-detail-actions {
    margin-top: 4px;
}

/* Desktop: two columns with a gutter. Tablet/mobile: stack (image, then info). */
@media (min-width: 992px) {
    .project-detail-info {
        padding-left: 30px;
    }
}
@media (max-width: 991px) {
    .project-detail-info {
        margin-top: 34px;
    }
}
