/* ============================================================
 * GoLabAcademy — Design System
 *
 * Κοινό στυλ για ΟΛΕΣ τις custom σελίδες.
 * Φόρτωσέ το ΠΡΙΝ από το CSS της κάθε σελίδας, ώστε κάθε σελίδα
 * να προσθέτει μόνο ό,τι είναι δικό της.
 *
 * Wrapper: τύλιξε το περιεχόμενο σε .golab-page
 *   <div class="golab-page"> ... </div>
 *
 * (Η αρχική χρησιμοποιεί .custom-home-wrapper — υποστηρίζονται και τα δύο.)
 * ============================================================ */

/* Comfortaa: στρογγυλή/φιλική όψη ΜΕ πλήρη ελληνική υποστήριξη.
   ΜΗΝ το αλλάξεις σε Fredoka/Baloo — δεν καλύπτουν ελληνικά και
   τα κείμενα πέφτουν σε fallback που δεν ταιριάζει με τους αριθμούς. */
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600;700&display=swap');

/* ------------------------------------------------------------
 * 1. TOKENS
 * ---------------------------------------------------------- */
:root {
    --primary:        #52899b;
    --primary-dark:   #416b7b;
    --accent-yellow:  #f8e16c;
    --accent-green:   #d4f1e0;
    --accent-green-ink: #1f5c3d;
    --light-bg:       #f5f9fa;
    --border-color:   #333;
    --text:           #2c3e50;
    --text-muted:     #4a5568;
    --text-subtle:    #718096;

    --golab-font: 'Comfortaa', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Η υπογραφή του brand: το «ζωγραφισμένο στο χέρι» περίγραμμα */
    --handdrawn-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
}

/* ------------------------------------------------------------
 * 2. WRAPPER
 * ---------------------------------------------------------- */
.golab-page,
.custom-home-wrapper {
    font-family: var(--golab-font);
    color: var(--text);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    overflow-x: hidden;
}

.golab-page section,
.custom-home-wrapper section {
    margin-bottom: 60px;
    text-align: center;
}

.golab-page h1,
.golab-page h2,
.golab-page h3,
.custom-home-wrapper h1,
.custom-home-wrapper h2,
.custom-home-wrapper h3 {
    font-family: var(--golab-font);
    line-height: 1.25;
}

.golab-page h2,
.custom-home-wrapper h2 {
    font-size: 1.9em;
    margin-bottom: 10px;
}

.golab-page img,
.custom-home-wrapper img { max-width: 100%; }

/* ------------------------------------------------------------
 * 3. HAND-DRAWN BOX  ← η βασική κάρτα του brand
 * ---------------------------------------------------------- */
.handdrawn-box {
    background: #fff;
    border: 3px solid var(--border-color);
    border-radius: var(--handdrawn-radius);
    padding: 20px;
    box-shadow: 4px 5px 0px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Παραλλαγή με εικόνα φόντου.
   Το λευκό ημιδιάφανο «φίλτρο» κρατά τα μαύρα γράμματα ευανάγνωστα. */
.handdrawn-box.with-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.85);
    background-blend-mode: lighten;
}

/* Παραλλαγή με διακεκομμένο περίγραμμα (για «δευτερεύοντα» κουτιά) */
.handdrawn-box.dashed {
    border-style: dashed;
    background-color: #f8f9fa;
}

/* ------------------------------------------------------------
 * 4. HAND-DRAWN BUTTON
 * ---------------------------------------------------------- */
.handdrawn-btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 12px 25px;
    text-decoration: none;
    font-weight: bold;
    border: 3px solid var(--border-color);
    border-radius: var(--handdrawn-radius);
    box-shadow: 3px 3px 0px var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.handdrawn-btn:hover,
.handdrawn-btn:focus {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px var(--border-color);
    color: #fff;
}

.handdrawn-btn.small  { padding: 8px 15px;  font-size: 0.9em; }
.handdrawn-btn.large  { padding: 16px 34px; font-size: 1.1em; }

/* Δευτερεύον κουμπί: λευκό με μαύρο περίγραμμα */
.handdrawn-btn.ghost {
    background: #fff;
    color: var(--border-color);
}
.handdrawn-btn.ghost:hover { color: var(--border-color); }

/* ------------------------------------------------------------
 * 5. BADGES (σηματάκια)
 * ---------------------------------------------------------- */
.golab-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 50px;
    border: 2px dashed var(--border-color);
    font-size: 0.9rem;
    line-height: 1.2;
    white-space: nowrap;
}

.golab-badge--yellow { background: var(--accent-yellow); }
.golab-badge--green  {
    background: var(--accent-green);
    color: var(--accent-green-ink);
    border-color: var(--accent-green-ink);
}
.golab-badge--green strong { color: var(--accent-green-ink); }

.golab-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

/* ------------------------------------------------------------
 * 6. GRIDS
 * ---------------------------------------------------------- */

/* Αυτόματο grid — γεμίζει όσες στήλες χωράνε (min 250px) */
.golab-grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* Σταθερές στήλες */
.golab-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-top: 20px; }
.golab-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }

/* ------------------------------------------------------------
 * 7. ΟΡΙΖΟΝΤΙΑ ΚΑΡΤΑ (εικόνα αριστερά, κείμενο δεξιά)
 * ---------------------------------------------------------- */
.cat-link-horizontal {
    text-decoration: none;
    color: var(--border-color);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    height: 100%;
    padding: 5px;
}

.cat-img-horizontal {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cat-text-wrapper {
    display: flex;
    flex-direction: column;
    text-align: left;
    min-width: 0;
}

.cat-title-horizontal {
    font-size: 1.05em;
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: break-word;
}

.cat-subtitle-horizontal {
    font-size: 0.8em;
    color: var(--text-subtle);
    margin-top: 4px;
    font-weight: bold;
}

.cat-desc-horizontal {
    font-size: 0.85em;
    color: #555;
    margin: 5px 0;
    line-height: 1.3;
}

/* ------------------------------------------------------------
 * 8. ΚΕΙΜΕΝΑ
 * ---------------------------------------------------------- */
.section-description {
    max-width: 700px;
    margin: 0 auto 30px auto;
    font-size: 1.1em;
    line-height: 1.5;
    color: var(--text-muted);
    text-align: center;
}

.golab-prose {
    max-width: 760px;
    margin: 0 auto;
    text-align: left;
    line-height: 1.7;
    font-size: 1.02rem;
}

.golab-prose h2 { margin-top: 40px; text-align: left; }
.golab-prose h3 { margin-top: 28px; text-align: left; font-size: 1.25em; }
.golab-prose p  { margin: 14px 0; }
.golab-prose ul,
.golab-prose ol { margin: 14px 0 14px 22px; }
.golab-prose li { margin: 7px 0; }
.golab-prose a  { color: var(--primary); text-decoration: underline; }

/* ------------------------------------------------------------
 * 9. ANIMATIONS
 * ---------------------------------------------------------- */

/* Εμφάνιση στο scroll — χρειάζεται το JS του §4 στο boilerplate */
.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out,
                transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.scroll-animate.is-visible { opacity: 1; transform: translateY(0); }

/* Hover «χοροπηδητό» */
.hover-bouncy {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: pointer;
}
.hover-bouncy:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0px 12px 20px rgba(82, 137, 155, 0.15);
}
.hover-bouncy:hover .cat-img-horizontal { transform: scale(1.1) rotate(3deg); }

.hover-scale:hover { transform: scale(1.03) rotate(1deg); }

/* ΠΡΟΣΟΧΗ: αν βάλεις .hover-bouncy μέσα σε container με overflow:hidden,
   η κάρτα θα ΚΟΒΕΤΑΙ όταν ανεβαίνει. Άφησε πάντα padding στον γονέα. */

/* ------------------------------------------------------------
 * 10. RESPONSIVE
 * ---------------------------------------------------------- */
@media (max-width: 1024px) {
    .golab-page, .custom-home-wrapper { padding: 18px; }
    .golab-page h2, .custom-home-wrapper h2 { font-size: 1.7em; }
    .golab-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .cat-img-horizontal { width: 90px; height: 90px; }
}

@media (max-width: 768px) {
    .golab-page, .custom-home-wrapper { padding: 15px; }
    .golab-page section, .custom-home-wrapper section { margin-bottom: 40px; }
    .golab-page h2, .custom-home-wrapper h2 { font-size: 1.5em; }

    .golab-grid-2,
    .golab-grid-3 { grid-template-columns: 1fr; gap: 12px; }

    .handdrawn-box { padding: 15px; }
    .cat-img-horizontal { width: 85px; height: 85px; }
    .cat-title-horizontal { font-size: 1em; }

    .section-description { font-size: 1em; margin-bottom: 20px; }
    .golab-badges { justify-content: center; }
    .golab-badge { font-size: 0.8rem; padding: 6px 12px; }
}

@media (max-width: 420px) {
    .golab-page, .custom-home-wrapper { padding: 12px; }
    .golab-page h2, .custom-home-wrapper h2 { font-size: 1.35em; }
    .cat-img-horizontal { width: 70px; height: 70px; }
    .cat-link-horizontal { gap: 10px; }
}

/* ------------------------------------------------------------
 * 11. ACCESSIBILITY
 * ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .scroll-animate { opacity: 1; transform: none; transition: none; }
    .hover-bouncy:hover,
    .hover-scale:hover { transform: none; }
}

.golab-page a:focus-visible,
.golab-page button:focus-visible {
    outline: 3px solid rgba(82, 137, 155, 0.5);
    outline-offset: 2px;
}

/* ------------------------------------------------------------
 * 12. FORMS (hand-drawn inputs, shared by όλες τις CF7 φόρμες)
 * ---------------------------------------------------------- */
.handdrawn-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.handdrawn-form-group { margin: 12px 0; }

.handdrawn-form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.92em;
    margin-bottom: 6px;
    color: var(--text);
}

.handdrawn-input {
    display: block;
    width: 100%;
    font-family: var(--golab-font);
    font-size: 1em;
    background: #fff;
    color: var(--text);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    box-sizing: border-box;
    transition: box-shadow 0.2s, transform 0.2s;
}

textarea.handdrawn-input { min-height: 140px; resize: vertical; }

.handdrawn-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 3px 3px 0px var(--primary);
    transform: translate(-1px, -1px);
}

.handdrawn-input::placeholder { color: var(--text-subtle); }

.handdrawn-form-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9em;
    color: var(--text-muted);
    margin: 16px 0;
}
.handdrawn-form-consent a { color: var(--primary); }

.handdrawn-form-submit { margin-top: 8px; text-align: center; }

/* Μηνύματα επιτυχίας / σφάλματος CF7 */
.wpcf7-response-output {
    margin: 16px 0 0 0;
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px dashed var(--border-color);
    font-size: 0.95em;
}
.wpcf7-form.sent .wpcf7-response-output {
    background: var(--accent-green);
    color: var(--accent-green-ink);
    border-color: var(--accent-green-ink);
}
.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7-form.failed .wpcf7-response-output,
.wpcf7-form.spam .wpcf7-response-output {
    background: #fdecea;
    color: #a13a2f;
    border-color: #a13a2f;
}
.wpcf7-not-valid-tip { display: block; margin-top: 4px; color: #a13a2f; font-size: 0.82em; }

@media (max-width: 640px) {
    .handdrawn-form-row { grid-template-columns: 1fr; gap: 0; }
}
