/* ============================================================
 * golab-mobile.css — κοινό CSS για κινητό και τίτλους h1
 * Φορτώνεται ΜΕΤΑ το design system και το CSS της σελίδας (βλ. golab_enqueue_page_assets),
 * σε όλα τα custom templates και στο blog.
 * ============================================================ */

/* ------------------------------------------------------------
 * h1 στο hero: μικρότερος, ευανάγνωστος, μέγιστο 2 γραμμές στο κινητό.
 * Οι λέξεις δεν σπάνε ποτέ στη μέση (ήταν «Κατασκε-υών», «Μαγνητικ-ά»).
 * ---------------------------------------------------------- */
.golab-page .golab-hero-section h1,
.golab-page > section:first-child h1 {
    font-size: clamp(1.45rem, 5.9vw, 2.6rem) !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    max-width: 22em;
    margin-left: auto;
    margin-right: auto;
    overflow-wrap: normal !important;
    word-break: normal !important;
    -webkit-hyphens: manual !important;
    hyphens: manual !important;
    text-wrap: balance;
}

/* Μεγάλες οθόνες: λίγο μεγαλύτερος, πάντα πιο μικρός από πριν */
@media (min-width: 1024px) {
    .golab-page .golab-hero-section h1,
    .golab-page > section:first-child h1 {
        font-size: clamp(2.2rem, 3.4vw, 2.9rem) !important;
    }
}

/* Τίτλοι ενοτήτων: ίδια λογική, χωρίς σπάσιμο λέξεων */
.golab-page h2,
.golab-page h3 {
    overflow-wrap: normal;
    word-break: normal;
    -webkit-hyphens: manual;
    hyphens: manual;
    text-wrap: balance;
}

.golab-page h2 {
    font-size: clamp(1.35rem, 4.6vw, 2.1rem);
    line-height: 1.25;
}

/* Blog: τίτλος άρθρου */
.golab-single__title {
    font-size: clamp(1.5rem, 5.6vw, 2.4rem) !important;
    line-height: 1.2 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    -webkit-hyphens: manual !important;
    hyphens: manual !important;
    text-wrap: balance;
}

/* ------------------------------------------------------------
 * Θέσεις εικόνων (golab_img_slot στο functions.php)
 * ---------------------------------------------------------- */
.golab-img-slot {
    margin: 24px auto;
    max-width: 100%;
}

.golab-img-slot--hero { max-width: 900px; }
.golab-img-slot--wide { max-width: 800px; }
.golab-img-slot--side { max-width: 520px; }
.golab-img-slot--square { max-width: 480px; }

.golab-img-slot img {
    display: block;
    width: 100%;
    height: auto;
    border: 2px solid var(--border-color, #333);
    border-radius: 12px;
}

/* Κενή θέση: φαίνεται μόνο σε συνδεδεμένους συντάκτες */
.golab-img-slot--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    border: 3px dashed #d9534f;
    border-radius: 12px;
    background: repeating-linear-gradient(45deg, #fff5f5, #fff5f5 12px, #ffeaea 12px, #ffeaea 24px);
    color: #a13a2f;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ------------------------------------------------------------
 * Κινητό (έως 640px): γενικές διορθώσεις για όλες τις σελίδες
 * ---------------------------------------------------------- */
@media (max-width: 640px) {
    .golab-page {
        overflow-x: clip;
    }

    .golab-page .golab-hero-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .golab-page .section-description,
    .golab-page .golab-prose {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Κάρτες και πλέγματα: μία στήλη */
    .golab-grid-2,
    .golab-grid-3 {
        grid-template-columns: 1fr !important;
    }

    /* Κουμπιά: πλήρες πλάτος, να μη βγαίνουν έξω από την οθόνη */
    .golab-page .handdrawn-btn {
        max-width: 100%;
        box-sizing: border-box;
        white-space: normal;
    }

    .golab-page .handdrawn-btn.large {
        display: block;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding-left: 16px;
        padding-right: 16px;
        font-size: 1.05rem;
        text-align: center;
    }

    .golab-page .handdrawn-btn.large + .handdrawn-btn.large {
        margin-top: 12px;
    }

    .golab-page .handdrawn-box {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Εικόνες και πίνακες δεν ξεπερνούν το πλάτος */
    .golab-page img,
    .golab-page iframe,
    .golab-page video {
        max-width: 100%;
    }

    .golab-page img { height: auto; }

    .golab-img-slot { margin: 18px auto; }

    /* Badges σε στήλη/wrap */
    .golab-badges {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    /* Μεγάλα κείμενα χωρίς κενά (URLs, κωδικοί) δεν σπάνε τη σελίδα */
    .golab-prose,
    .golab-page .cat-desc-horizontal {
        overflow-wrap: break-word;
    }
}
