/* === Ogólny kontener dla kafelków === */
.about-tiles {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    max-width: 1500px;
    margin: 2rem auto;
    padding: 0 1rem; /* odstęp od krawędzi ekranu na małych urządzeniach */

    background: #fff;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

/* === Styl wspólny dla każdego kafelka === */
.about-card,
.about-summary {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 2.5rem;
    background: #f9fff9;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 200, 83, 0.1);
    flex-wrap: wrap;
    min-height: auto;
    border: 1px solid #c8e6c9;

    width: 100%;
    max-width: 95%;
    box-sizing: border-box;
}

/* === Podsumowanie jako specjalna karta === */
.about-summary {
    justify-content: center;
    text-align: center;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
}

.about-picture {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 320px;
    aspect-ratio: 2/3; /* keeps portrait shape */
    background: #f9fff9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 200, 83, 0.1);
    margin: 0; /* removes default figure margin */
}

.about-picture img {
    width: 100%;
    height: 100%;
    object-fit: contain;  /* keeps whole photo visible */
}




/* === Figcaption (opis pod zdjęciem) === */
.about-picture figcaption {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    text-align: center;
    color: #444;
}

/* === Tekst w kafelku === */
.about-card .card-text {
    flex: 2;
}

.about-card p {
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    line-height: 1.6;
    color: #333;
    text-align: justify;
    text-justify: inter-word;
}

/* === Odwrócony układ === */
.about-card.reverse {
    flex-direction: row-reverse;
}

/* === Fab Hack Logo Picture === */
.fab-hack-picture {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 300px;       /* sets logo width */
    height: auto;       /* adjust height to aspect ratio */
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 200, 83, 0.1);
    margin: 0;
}

.fab-hack-picture img {
    display: block;     /* removes default inline spacing */
    width: 100%;
    height: auto;       /* no stretching */
    object-fit: cover;  /* ensures no gap inside */
    border-radius: inherit;
}

/* === Nagłówki === */
.about-card h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, #009624, #1b5e20, #00b248);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    text-align: left;
}

.about-card h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 60px;
    height: 4px;
    background: #00c853;
    border-radius: 2px;
}

.about-card h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 700;
    margin: 1rem 0;
    color: #000;
    position: relative;
    display: inline-block;
}

.about-card h3::after {
    content: "";
    display: block;
    width: 50%;
    height: 3px;
    background: #000;
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* === Responsywność === */
@media (max-width: 1024px) {
    .about-card,
    .about-summary {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    .about-card,
    .about-summary {
        flex-direction: column;
        padding: 1.5rem;
        max-width: 95%;
    }

    .about-picture {
        max-width: 80%;
    }
        /* Center Fab Hack logo */
    .fab-hack-picture {
        margin: 1rem auto; /* centers horizontally */
    }
}

@media (max-width: 480px) {
    .about-card,
    .about-summary {
        max-width: 100%;
        margin: 1rem;
        padding: 1rem;
    }

    .about-card h2 {
        font-size: 1.5rem;
    }

    .about-card h3 {
        font-size: 1.1rem;
    }

    .about-card p,
    .about-summary {
        font-size: 0.95rem;
    }

    .about-picture .tooltip {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}
