/* =========================================================
   BEMUTATKOZÁS – DEV II finomhangolás
   Portré jobb oldalt + váltott bal/jobb kártyák
   ========================================================= */

#main-content.about-page {
    max-width: 1180px;
}

/* Cím */
#main-content.about-page > header {
    text-align: center;
    margin-bottom: 2rem !important;
}

/* Első blokk + portré */
#main-content.about-page .about-hero-grid {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

#main-content.about-page .about-hero-card {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    grid-column: 1;
}

/* A portré teljesen külön jobb oldali oszlopban marad,
   így semmilyen szélességnél nem lóghat rá az első kártyára. */
#main-content.about-page .about-hero-grid {
    grid-template-columns: minmax(0, 1fr) 220px !important;
    column-gap: 3rem !important;
}

#main-content.about-page .floating-agi {
    grid-column: 2;
    justify-self: end !important;
    align-self: center !important;
    transform: none !important;
    position: relative !important;
    right: 0 !important;
}

#main-content.about-page .floating-agi {
    float: none !important;
    width: 220px !important;
    margin: 0 !important;
    justify-self: end;
}

#main-content.about-page .floating-agi img {
    display: block;
    width: 220px !important;
    height: auto !important;
    max-width: 100%;
    margin: 0 !important;
}

/* Váltott bal / jobb kártyák */
#main-content.about-page .about-card {
    width: min(76%, 880px) !important;
    margin-top: 1.25rem !important;
    margin-bottom: 1.25rem !important;
}

#main-content.about-page .about-card.align-left {
    margin-left: 0 !important;
    margin-right: auto !important;
}

#main-content.about-page .about-card.align-right {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* Záró blokk */
#main-content.about-page .closing-box {
    width: min(82%, 960px);
    margin-left: auto;
    margin-right: auto;
}

/* Tablet */
@media (max-width: 991.98px) {
    #main-content.about-page .about-hero-grid {
        grid-template-columns: minmax(0, 1fr) 175px;
        gap: 1.4rem;
    }

    #main-content.about-page .floating-agi,
    #main-content.about-page .floating-agi img {
        width: 175px !important;
    }

    #main-content.about-page .about-card {
        width: 86% !important;
    }
}

/* Mobil – kizárólag 760 px alatt változik az elrendezés */
@media (max-width: 760px) {
    #main-content.about-page {
        padding-left: 16px;
        padding-right: 16px;
        margin-top: 2rem !important;
    }

    #main-content.about-page > header {
        margin-bottom: 1.35rem !important;
    }

    /* Desktopon két oszlop, mobilon viszont egymás alatt.
       Az !important itt szándékos: felül a desktop rács is !important. */
    #main-content.about-page .about-hero-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 1.25rem !important;
        align-items: start;
        margin-bottom: 1.5rem;
    }

    /* Mobilon a portré kerüljön a szöveg fölé, középre. */
    #main-content.about-page .floating-agi {
        grid-column: 1 !important;
        grid-row: 1 !important;
        justify-self: center !important;
        align-self: center !important;
        width: 180px !important;
        margin: 0 auto !important;
    }

    #main-content.about-page .floating-agi img {
        width: 180px !important;
        max-width: 62vw !important;
        height: auto !important;
        margin: 0 auto !important;
    }

    #main-content.about-page .about-hero-card {
        grid-column: 1 !important;
        grid-row: 2 !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    #main-content.about-page .about-card,
    #main-content.about-page .closing-box {
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Keskeny kijelzőn a sorkizárt szöveg csúnya lyukakat tud hagyni. */
    #main-content.about-page .intro-box p,
    #main-content.about-page .closing-box p {
        text-align: left !important;
        word-break: normal !important;
        overflow-wrap: break-word;
        line-height: 1.6;
    }
}


/* Lábléc: legyen teljesen fedő, ne látszódjon át mögötte a tartalom. */
footer,
.footer,
.site-footer {
    background-color: #f8f4ef !important;
    background-image: none !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.dark-mode footer,
html.dark-mode .footer,
html.dark-mode .site-footer {
    background-color: #181614 !important;
    background-image: none !important;
    opacity: 1 !important;
}
