﻿/* Page-specific styles for About page */

/* ===================================
   General Section Styling
   =================================== */
section {
    margin-bottom: 4rem;
}

section h2 {
    margin-bottom: 2rem;
}

/* ===================================
   Section 1: Notre histoire (Our History)
   =================================== */

/* Introduction paragraphs - full width */
.history-section {
    display: grid;
    grid-template-areas: "title ."
                         "p1 mjm"
                         "p2 bepc"
                         "p3 bepc"
                         "cta .";
}

.history-section * {
    max-width: 100%;
}

.history-section > h2 {
    grid-area: title;
}

.history-section > p:nth-of-type(1) {
    grid-area: p1;
}

.history-section > p:nth-of-type(2) {
    grid-area: p2;
}

.history-section > p:nth-of-type(3) {
    grid-area: p3;
}

.mjm {
    grid-area: mjm;
    justify-self: center;
    width: 400px;
}

.bepc {
    grid-area: bepc;
    justify-self: center;
    width: 600px;
}

.history-section > a {
    grid-area: cta;
    justify-self: start;
    align-self: start;
}

@media (max-width: 1200px) {
    .history-section {
        grid-template-areas: "title title"
                         "p1 p1"
                         "p2 p2"
                         "p3 p3"
                         "mjm bepc"
                         "cta cta";
    }

    .bepc {
        margin: -14% -10% -14%;
    }

    .mjm, .bepc {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

@media (max-width: 600px) {
    .history-section {
        grid-template-areas: "title "
                         "p1"
                         "mjm"
                         "p2"
                        "bepc"
                         "p3"
                         "cta";
    }

    .mjm, .bepc {
        width: 100%;
    }

    .history-section a {
        font-size: .8rem;
    }
}

.company-logo {
    object-fit: contain;
}

/* ===================================
   Section 2: Produits innovateurs (Innovative Products)
   =================================== */

.innovative-section .row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3rem;
}

.innovative-text {
    flex: 1 1 50%;
}

.innovative-image {
    flex: 1 1 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.innovative-image img {
    width: 100%;
}

/* ===================================
   Section 3: Pourquoi le béton préfabriqué (Why Precast Concrete)
   =================================== */

/* Info boxes container */
.info-boxes {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    margin-top: 2rem;
}

/* Individual info box (card style) - Flat Design */
.info-box {
    flex: 1 1 33.33%;
    background: var(--light-color);
    border: 2px solid var(--border-color);
    border-radius: 0; /* Flat design: sharp edges */
    padding: 2rem 1.5rem;
    transition: border-color 0.2s ease;
}

.info-box:hover {
    border-color: var(--primary-color);
}

.info-box h2 {
    margin-bottom: 1rem;
}

.info-box p {
    color: var(--text-color);
    line-height: 1.6;
}

/* Tablet and mobile: Stack info boxes */
@media (max-width: 1200px) {
    .info-boxes {
        flex-direction: column;
    }

    .info-box {
        flex: 1 1 100%;
    }
}

/* ===================================
   Section 4: Notre équipe (Our Team)
   =================================== */

/* Team grid: Custom layout with 3 distinct rows
   Row 1: 2 larger portraits for majority shareholders
   Row 2: 3 medium portraits 
   Row 3: 2 medium portraits */
.team-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    justify-items: center;
}

/* Row 1: First 2 members (majority shareholders) - span 3 columns each */
.team-card:nth-child(1),
.team-card:nth-child(2) {
    grid-column: span 3;
}

/* Row 2: Next 3 members - span 2 columns each */
.team-card:nth-child(3),
.team-card:nth-child(4),
.team-card:nth-child(5) {
    grid-column: span 2;
}

/* Row 3: Last 2 members - span 2 columns each, centered by using offset */
.team-card:nth-child(6) {
    grid-column: 2 / span 2;
}

.team-card:nth-child(7) {
    grid-column: 4 / span 2;
}

/* Individual team member card - Flat Design */
.team-card {
    background: var(--light-color);
    border-radius: 0; /* Flat design: sharp edges */
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.2s ease;
}

/* Portrait placeholder - Flat Design */
.team-portrait {
    margin: 0 auto 1rem;
    border-radius: 0; /* Flat design: sharp edges */
    overflow: hidden;
}

.team-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* Team member name */
.team-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
    text-transform: uppercase;
    text-align: center;
}

/* Team member title/position */
.team-card h4 {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    text-align: center;
}

/* Team member bio */
.team-card p {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 0.95rem;
    text-align: justify;
}

@media (min-width: 1201px) {
    .team-portrait img {
        width: 80%;
    }

}

/* Tablet: 2 columns layout */
@media (max-width: 1200px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .team-card {
        padding: 1rem;
    }

    /* Reset grid column spans for tablet */
    .team-card {
        grid-column: span 1 !important;
        margin-bottom: 1.5rem;
    }

    /* Keep larger portraits for majority shareholders on tablet */
    .team-card .team-portrait {
        width: unset !important;
        height: unset !important;
    }

    .team-card:nth-child(7) {
        grid-column: span 2 !important;
        width: 50%;
    }
}

.innovative-section {
    display: grid;
    grid-template-areas: "title title"
                         "text image";
    column-gap: 2rem;
}

.innovative-section > h2 {
    grid-area: title;
}

.innovative-section > .text {
    grid-area: text;
    display: flex;
    flex-direction: column;
}

.innovative-section > .text > a {
    align-self: flex-start;
    justify-self: flex-end;
}

.innovative-section > img {
    grid-area: image;
    width: 100%;
}

@media (max-width: 1200px) {
    .innovative-section {
        grid-template-areas: "title" "image""text";
    }

    .innovative-section > img {
        width: 80%;
        margin: 0 auto;
    }
}

/* Mobile: 1 column */
@media (max-width: 600px) {
    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-grid .team-card {
        padding: 0;
        border: none;
        grid-column: span 8 !important;
        width: unset;
    }
}

