/**
 * Page Builder — CSS framework
 * Prefix: pb-
 *
 * Toto CSS se loaduje na veřejných stránkách generovaných page builderem.
 * Inline styly (barvy, padding) přicházejí z JSON settings — zde jsou jen strukturální pravidla.
 */

/* ═══ KONTEJNER ═════════════════════════════════════════════════════ */

.pb-container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ═══ SEKCE ═════════════════════════════════════════════════════════ */

.pb-section {
    width: 100%;
    position: relative;
}

/* ═══ SECTION HEADER (nadpis + podnadpis sekce) ═════════════════════ */

.pb-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.pb-section-header__title {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.75rem;
}

.pb-section-header__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.7;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ═══ HERO ══════════════════════════════════════════════════════════ */

.pb-hero__layout {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.pb-hero__content {
    flex: 1 1 50%;
}

.pb-hero__heading {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

.pb-hero__subheading {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    opacity: 0.75;
    line-height: 1.6;
    margin: 0 0 2rem;
    max-width: 540px;
}

.pb-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pb-hero__image {
    flex: 1 1 45%;
    max-width: 600px;
}

.pb-hero__image img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    display: block;
}

@media (max-width: 768px) {
    .pb-hero__layout {
        flex-direction: column;
        text-align: center;
    }

    .pb-hero__subheading {
        margin-left: auto;
        margin-right: auto;
    }

    .pb-hero__actions {
        justify-content: center;
    }

    .pb-hero__image {
        max-width: 100%;
    }
}

/* ═══ GRID ══════════════════════════════════════════════════════════ */

.pb-grid {
    display: grid;
    gap: 2rem;
}

.pb-grid--2 { grid-template-columns: repeat(2, 1fr); }
.pb-grid--3 { grid-template-columns: repeat(3, 1fr); }
.pb-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .pb-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .pb-grid--2,
    .pb-grid--3,
    .pb-grid--4 {
        grid-template-columns: 1fr;
    }
}

/* ═══ KARTA ═════════════════════════════════════════════════════════ */

.pb-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.75rem;
    padding: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pb-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.pb-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    background: rgba(0, 74, 198, 0.08);
    color: #004ac6;
    font-size: 24px;
    margin-bottom: 1rem;
}

.pb-card__title {
    font-family: 'Manrope', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.pb-card__text {
    font-size: 0.9375rem;
    opacity: 0.7;
    line-height: 1.6;
    margin: 0;
}

/* ═══ TLAČÍTKA ══════════════════════════════════════════════════════ */

.pb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.pb-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.pb-btn:active {
    transform: translateY(0);
}

.pb-btn--primary {
    background: #004ac6;
    color: #ffffff;
}

.pb-btn--primary:hover {
    background: #003da8;
}

.pb-btn--secondary {
    background: transparent;
    color: inherit;
    border: 1.5px solid currentColor;
    opacity: 0.8;
}

.pb-btn--secondary:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.04);
}

/* ═══ FORMULÁŘ ══════════════════════════════════════════════════════ */

.pb-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pb-form__group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.pb-form__label {
    font-size: 0.875rem;
    font-weight: 500;
}

.pb-form__required {
    color: #dc2626;
    margin-left: 0.125rem;
}

.pb-form__input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: inherit;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pb-form__input:focus {
    outline: none;
    border-color: #004ac6;
    box-shadow: 0 0 0 3px rgba(0, 74, 198, 0.12);
}

.pb-form__textarea {
    resize: vertical;
    min-height: 120px;
}

.pb-form__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 5.5L8 9l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.pb-form__actions {
    margin-top: 0.5rem;
}

.pb-form__message {
    padding: 1rem;
    border-radius: 0.375rem;
    background: #ecfdf5;
    color: #065f46;
    font-weight: 500;
    text-align: center;
}

.pb-form__message[hidden] {
    display: none;
}

/* ═══ SCROLL REVEAL ANIMACE ═════════════════════════════════════════ */

.pb-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.pb-animate.pb-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══ UTILITY ═══════════════════════════════════════════════════════ */

/* Plná šířka (bez containeru) */
.pb-full-width {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* Responzivní embed (video, iframe) */
.pb-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.pb-embed iframe,
.pb-embed video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
