/* =========================================
   1. PROMĚNNÉ A ZÁKLAD
   ========================================= */
:root {
    /* Barvy */
    --dark-blue: #132861;
    --color-blue: #145da8;
    --color-green: #aec905;
    --color-green-hover: #9cb504;
    --light-grey: #e2ebf1;
    --color-white: #ffffff;

    /* Písma */
    --font-body: 'aribau_groteskregular', sans-serif;
    --font-heading: 'aribau_groteskmedium', sans-serif;
    --font-bold: 'aribau_groteskbold', sans-serif;
    --font-italic: 'aribau_groteskitalic', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--dark-blue);
    background-color: var(--color-white);
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

/* =========================================
   2. TYPOGRAFIE A UŽITKOVÉ TŘÍDY
   ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-blue);
    margin-top: 0;
}

strong,
b {
    font-family: var(--font-bold);
    font-weight: normal;
}

em,
i {
    font-family: var(--font-italic);
    font-style: normal;
}

p {
    margin-bottom: 20px;
}

/* --- Užitkové třídy --- */
.mt-20 { margin-top: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-0 { margin-bottom: 0 !important; }
.hidden { display: none !important; }
.bg-light-grey { background-color: var(--light-grey); }

/* Vizuálně skrytý prvek dostupný pouze pro čtečky obrazovky */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Sémantická adresa v patčičce a kontaktu bez kurzívy */
address {
    font-style: normal;
}

/* =========================================
   3. LAYOUT A GLOBÁLNÍ PRVKY
   ========================================= */
/* --- Tlačítka --- */
.btn,
.btn-large {
    background-color: var(--color-green);
    font-family: var(--font-heading);
    border-radius: 50px;
    padding: 0 30px;
    text-transform: uppercase;
    box-shadow: none;
    transition: background-color 0.3s ease;
}

.btn:hover,
.btn-large:hover,
.btn:focus,
.btn-large:focus {
    background-color: var(--color-green-hover);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn.blue-btn { background-color: var(--color-blue); }
.btn.blue-btn:hover { background-color: var(--dark-blue); }

/* --- Hlavička a navigace --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.93);
    background-image: url('../img/menu-bg.svg');
    background-repeat: no-repeat;
    background-position: calc(50% - 250px) top;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

header.scrolled .header-top {
    max-height: 0;
    padding: 0;
    opacity: 0;
}

header.scrolled .header-main { padding: 7px 0; }
header.scrolled .header-main .brand-logo img {
    height: 55px;
    margin-top: 0;
}

.header-top {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 0;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    max-height: 50px;
    overflow: hidden;
}

.header-top .contact-item {
    display: flex;
    align-items: center;
    margin-left: 20px;
    font-size: 13px;
    letter-spacing: -0.2px;
    color: var(--dark-blue);
    margin-top: -2px;
    padding-top: 0;
}

.header-top .contact-item img {
    height: 26px;
    margin-right: 8px;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    transition: padding 0.3s ease;
}

.header-main .brand-logo {
    display: flex;
    align-items: center;
}

.header-main .brand-logo img {
    height: 100px;
    margin-top: -30px;
    transition: height 0.3s ease, margin 0.3s ease;
}

nav {
    background: transparent;
    box-shadow: none;
    height: auto;
    line-height: normal;
    display: flex;
    align-items: center;
    width: auto;
}

nav ul {
    display: flex;
    align-items: center;
    margin: 0;
}

/* Přepis Materialize: průhledné pozadí na nav polložkách */
nav ul li,
nav ul li.active { background-color: transparent !important; }
nav ul li:last-child a { padding-right: 0; }

nav ul a {
    color: var(--dark-blue);
    font-family: var(--font-heading);
    font-size: 16px;
    text-transform: uppercase;
    padding: 10px 15px;
    transition: color 0.3s ease;
}

nav ul a:hover {
    color: var(--color-blue);
    background-color: transparent;
}

nav ul li.active a {
    color: var(--color-green);
    background-color: transparent !important;
}

.mobile-menu-trigger {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.mobile-menu-icon { height: 30px; }

/* --- Boční mobilní menu --- */
.sidenav {
    z-index: 1005;
    padding-top: 40px;
}

.sidenav li>a {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--dark-blue);
    display: block;
    padding: 0 32px;
}

.sidenav li.active>a {
    color: var(--color-green);
    background-color: transparent;
}

.mobile-nav-divider {
    margin: 20px 0;
    border-bottom: 2px solid var(--color-blue);
}

.mobile-contact-link {
    display: flex;
    align-items: center;
    color: var(--color-blue);
    font-weight: bold;
    font-family: var(--font-heading);
}

.mobile-contact-icon {
    height: 24px;
	position: relative;
    right: 10px;
	top: 5px;
}

/* --- Patička a Scroll-Up --- */
footer {
    background-color: var(--dark-blue);
    background-image: url('../img/footer-bg.svg');
    background-repeat: no-repeat;
    background-position: bottom right;
    color: var(--color-white);
    padding: 60px 0 40px;
    position: relative;
}

footer .logo-footer {
    height: 80px;
    margin-bottom: 25px;
}

footer .contact-info p {
    margin: 5px 0;
    font-size: 15px;
}

footer .contact-info p a {
    color: var(--color-white);
    text-decoration: underline;
}

footer .footer-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 105px;
}

footer .footer-nav a {
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 16px;
    text-transform: uppercase;
    text-decoration: underline;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

footer .footer-nav a:hover { color: var(--color-green); }

.scroll-top {
    display: inline-block;
    position: relative;
    margin-top: -75px;
    margin-left: auto;
    z-index: 20;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

.scroll-top:focus {
    background: transparent;
    outline: none;
}

.scroll-top img { height: 40px; }


/* =========================================
   4. JEDNOTLIVÉ SEKCE
   ========================================= */
/* --- Hero (Úvodní obrazovka) --- */
.hero {
    padding-top: 200px;
    padding-bottom: 120px;
    background-image: url('../img/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 30px;
    color: var(--color-blue);
}

.hero-subpage {
    padding-top: 150px;
    padding-bottom: 60px;
    background-image: linear-gradient(rgba(19, 40, 97, 0.85), rgba(19, 40, 97, 0.85)), url('../img/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 250px;
    display: flex;
    align-items: center;
}

.hero-subpage h1 {
    font-size: 2.8rem;
    margin-bottom: 0;
    color: var(--color-white);
}

/* --- Malířské a natěračské práce (Rozdělená sekce index.html) --- */
.split-section {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    overflow: visible;
    z-index: 10;
}

.split-section .text-col {
    background-color: var(--color-blue);
    color: var(--color-white);
    padding: 80px 50px 80px 0;
    flex: 1 1 50%;
    min-height: 600px;
}

.split-section .text-col h2 {
    color: var(--color-green);
    font-size: 2.2rem;
    margin-bottom: 30px;
}

.split-section .text-col p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.container-left {
    margin-left: auto;
    margin-right: 0;
    max-width: 500px;
    padding-left: 20px;
}

.split-section .img-col {
    flex: 1 1 50%;
    background-image: url('../img/showcase-malba.webp');
    background-size: cover;
    background-position: center;
    position: relative;
    border-top: 70px solid var(--dark-blue);
}

/* --- Překrývající se prvky pro Index --- */
.overlap-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.overlap-container>* { pointer-events: auto; }

.ilu-malir {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-25%);
    width: 280px;
    z-index: 10;
}

.ilu-dulux-wrapper {
    position: absolute;
    bottom: -60px;
    right: 0;
    background-color: var(--dark-blue);
    border-radius: 0 40px 0 40px;
    padding: 20px 30px;
    z-index: 50;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.ilu-dulux-wrapper img {
    width: 150px;
    display: block;
}

/* --- Běžné obsahové sekce --- */
.content-section {
    padding: 80px 0;
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.text-page h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
}

.text-page h3 {
    font-size: 1.3rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--dark-blue);
}

.content-section a:not(.btn) {
    text-decoration: underline;
}

/* --- Sekce oprav – šedé pozadí pomocí pseudo-elementu --- */
.repairs {
    position: relative;
    background-color: transparent;
    overflow: hidden;
}

.repairs .container {
    position: relative;
    z-index: 1;
}

.repairs .container::before {
    content: '';
    position: absolute;
    top: -80px;
    bottom: -80px;
    right: 0;
    width: 200vw;
    background-color: var(--light-grey);
    border-radius: 0;
    z-index: -1;
}

.circle-img-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.circle-img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    box-shadow: none;
    background: transparent;
}

/* --- Služby (Naše služby) podstránka --- */
.service-row {
    margin-bottom: 80px;
}
.service-row:last-child { margin-bottom: 0px; }
.service-row > h3 {
    padding-left: 0.75rem; /* Zarovnání s Materialize .col padding */
}
.service-row h2 {
    margin-bottom: 30px;
    color: var(--color-blue);
}
/* A11y role="heading" aria-level="2" which visually applies as h3 on service-row */
.service-row h3 {
    margin-bottom: 30px;
    color: var(--color-blue);
    font-size: 2.28rem;
}

.service-row h3.table-heading {
    font-family: var(--font-heading);
    color: var(--color-blue);
    font-size: 1.64rem;
}

.perex-text {
    font-size: 1.625rem;
    font-weight: 500;
    margin-bottom: 25px;
    color: var(--dark-blue);
    line-height: 1.6;
}

/* --- Reference galerie (Masonry) --- */
.masonry-grid {
    column-count: 4;
    column-gap: 20px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
}

.masonry-item img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.masonry-item a:hover img {
    transform: scale(1.03);
}

/* --- Kontakt --- */
.contact-icon-large {
    height: 40px;
    margin-bottom: 15px;
}

.contact-link {
    color: var(--color-blue);
    font-weight: bold;
}

.contact-link:hover {
    color: var(--color-green);
    text-decoration: none;
}

.d-flex-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 100%;
}

.ilu-kontakt {
    max-width: 100%;
    height: auto;
}

.gdpr-checkbox-wrapper {
    margin-top: 10px;
    margin-bottom: 10px;
}


/* =========================================
   5. MEDIA QUERIES
   ========================================= */

/* RESPONZIVNÍ – TABLET (601px – 992px) */
@media (max-width: 992px) {

    .contact-box {
        display: flex;
        align-items: center;
        text-align: left !important;
        justify-content: flex-start;
        margin-bottom: 80px;
    }
    .contact-box .contact-icon-wrapper {
        margin-right: 25px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }
    .contact-box .contact-icon-large {
        margin-bottom: 0;
        height: 50px;
    }
    .contact-box .contact-text-wrapper h4 {
        margin-top: 0;
        margin-bottom: 5px;
        font-size: 1.6rem;
    }
    .contact-box .contact-text-wrapper p { margin: 0; }

    header.scrolled,
    header {
        background-position: right top !important;
        background-color: rgba(255, 255, 255, 0.98) !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    }

    .header-top { display: none !important; }

    header.scrolled .header-main,
    .header-main { padding: 7px 0 !important; }

    header.scrolled .header-main .brand-logo img,
    .header-main .brand-logo img {
        height: 55px !important;
        margin-top: 0 !important;
    }
}

@media (max-width: 992px) and (min-width: 601px) {
    .split-section .text-col { padding: 50px 30px 50px 0; }
    .split-section .text-col h2 { font-size: 1.8rem; }
    .content-section h2 { font-size: 1.8rem; }
    
    .circle-img-wrapper {
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding-top: 0 !important;
        margin-top: 6px !important;
    }
    
    .circle-img {
        width: 180px !important;
        height: 180px !important;
    }

    .content-section .text-content { padding-left: 30px !important; }

    .ilu-malir {
        left: 50%;
        transform: translateX(0%);
        bottom: -10px;
        top: auto;
        margin: 0;
        width: 150px;
    }

    .ilu-dulux-wrapper {
        padding: 15px 20px;
        z-index: 50;
    }
    .ilu-dulux-wrapper img { width: 100px; }

    .masonry-grid { column-count: 2; }
}

@media (min-width: 601px) {
    .content-section .text-content {
        padding-left: 0;
        padding-right: 5vw;
    }
}

/* RESPONZIVNÍ – MOBIL (do 600px) */
@media (max-width: 600px) {
    .service-row { margin-bottom: 60px; }
    
    /* A11y role handling for services on mobile */
    .service-row h2,
    .service-row h3:not(.table-heading) {
        margin-bottom: 20px;
        font-size: 1.8rem;
    }

    .split-section { flex-direction: column; }
    
    .split-section .text-col,
    .split-section .img-col { flex: 1 1 100%; }

    .split-section .text-col {
        padding: 50px 20px;
        min-height: auto;
    }

    .split-section .img-col {
        min-height: 400px;
        order: 2;
    }

    .ilu-malir {
        left: 5% !important;
        transform: translateX(0) !important;
        bottom: 0 !important;
        top: auto !important;
        margin: 0;
        width: 160px !important;
    }

    .ilu-dulux-wrapper {
        bottom: 10px;
        right: 15px;
        margin: 0;
        z-index: 50;
    }

    .repairs { background-color: var(--light-grey); }
    .repairs .container::before { display: none; }

    .circle-img-wrapper {
        align-items: center;
        margin-bottom: 30px;
    }

    .repairs .circle-img-wrapper { margin-bottom: 40px; }

    .content-section .row {
        display: flex;
        flex-direction: column;
        text-align: center;
    }

    /* Texty v naše-sluzby zůstávají zarovnány vlevo */
    .service-row .row,
    .service-row p,
    .service-row h3 {
        text-align: left;
    }


    footer .footer-nav {
        align-items: flex-start;
        margin-top: 30px;
    }

    .scroll-top {
        position: absolute;
        bottom: 20px;
        right: 20px;
        margin-top: 0;
        margin-left: 0;
    }

    .masonry-grid { column-count: 1; }

    .hero-subpage { padding-top: 120px; }
    .hero-subpage h1 { font-size: 2.2rem; }
}