/* =========================
   ABOUT PAGE – GLOBAL
========================= */

.about-section,
.directors-message,
.certificates-section {
    padding: 80px 40px;
    background: #f5f7fb;
}

/* Reuse section-content but override grid */
.about-section .section-content,
.directors-message .section-content {
    max-width: 900px;
    margin: 0 auto;
    display: block;
}

/* =========================
   MODERN HEADINGS
========================= */

.section-title {
    font-family: "Montserrat", sans-serif;
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 35px;
    position: relative;
    color: #111;
}

.section-title::after {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    background: var(--secondary-color);
    margin: 14px auto 0;
    border-radius: 2px;
}

/* =========================
   TEXT BOX (ABOUT + DIRECTOR)
========================= */

.about-section .section-content,
.directors-message .section-content {
    background: #ffffff;
    padding: 50px 55px;
    border-radius: 18px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.08);
}

/* Paragraphs */
.section-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}

/* =========================
   DIRECTOR NAME
========================= */

.directors-message .section-content::after {
    content: "— M B Perera, Managing Director";
    display: block;
    margin-top: 30px;
    text-align: right;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

/* =========================
   CERTIFICATES SECTION
========================= */

.certificates-section {
    background: #ffffff;
}

.certificates-section .section-content {
    max-width: var(--site-max-width);
    margin: 0 auto;
}

/* Grid 2x2 */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
    margin-top: 50px;
}

/* Make each certificate card equal height and ensure images fill
   their fixed image area without forcing card height changes. */
.certificates-grid {
    align-items: stretch;
    grid-auto-rows: 1fr; /* each row will have equal height cells */
}

/* Card style – same visual language as services */
.certificates-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* make card stretch to the grid row height */
}

.certificates-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 55px rgba(0,0,0,0.12);
}

/* Image */
.certificates-card img {
    width: 100%;
    /* fixed image area so image occupies the top portion without affecting card height */
    height: 220px;
    /* center the image and show background for any empty areas (fallback color) */
    object-fit: contain;
    object-position: center;
    background-color: #f5f7fb;
    flex: 0 0 220px;
}

/* Title */
.certificates-card h3 {
    padding: 22px 22px 8px;
    font-size: 1.15rem;
    font-weight: 600;
    color: #111;
}

/* Description */
.certificates-card p {
    padding: 0 22px 26px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;

    /* allow description area to expand so cards keep equal total height */
    flex: 1 1 auto;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
    .certificates-grid {
        grid-template-columns: 1fr;
    }

    .about-section .section-content,
    .directors-message .section-content {
        padding: 35px 30px;
    }
}
