﻿/*@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');*/

* {
    margin: 0;
    padding: 0;
/*    font-family: 'Poppins', sans-serif*/
}

/*body {
    min-width: 100vw;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;*/
    /*background: #16384c;*/
/*}*/

/* Scoped container for History cards to avoid overriding site-wide .container */
#divHistoryCard {
    /* Allow enough width for 4 cards but avoid touching global header container */
    max-width: 90vw; /* Prevent overflow on smaller screens */
    padding-top: 50px;
    display: flex;
    justify-content: center;
    position: relative;
    flex-wrap: wrap;
}

    #divHistoryCard .card {
        max-width: 500px;
       /* height: 230px;*/
        margin: 30px 10px;
        padding: 20px 15px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.5);
        transition: 0.3s ease-in-out;
    }

        #divHistoryCard .card:hover {
            height: 520px; /* Increased height to accommodate larger content */
        }

        #divHistoryCard .card .imgContainer {
            position: relative;
            width: 450px;
            height: 250px;
            top: -50px;
            left: 10px;
            z-index: 1;
            box-shadow: 0 5px 20px rgba(0,0,0,0.2);
        }

            #divHistoryCard .card .imgContainer img {
                max-width: 100%;
                border-radius: 10px;
            }

        #divHistoryCard .card .content {
            position: relative;
            margin-top: -140px;
            padding: 0px 15px;
            text-align: center;
            color: #111;
            visibility: hidden;
            opacity: 0;
            pointer-events: none;
            transition: 0.3s ease-in-out;
            height: 280px; /* Increased content area height */
        }

        #divHistoryCard .card:hover .content {
            visibility: visible;
            opacity: 1;
            margin-top: -40px;
            transition-delay: 0.3s;
        }

        #divHistoryCard .card .content h2 {
            margin-bottom: 15px;
            font-size: 1.5rem;
            font-weight: 600;
        }

        #divHistoryCard .card .content p {
            text-align: justify; /* Justify paragraph text */
            font-size: 1.1rem;
            line-height: 1.6; /* Increased line height for better readability */
            margin: 0;
            height: auto;
            min-height: 215px; /* Increased minimum height for paragraphs */
            max-height: 225px; /* Increased maximum height */
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 12; /* Allow more lines of text */
            -webkit-box-orient: vertical;
        }

/* hide #divHistory on viewports 2200px and below */
@media (max-width: 2200px) {
    #divHistory {
        display: none !important;
    }

    #divHistoryCard {
        padding-top: 50px;
        flex-wrap: wrap;
    }
}

@media (max-width: 1580px) {
    /* add 20px top padding on narrower screens */
    #divHistoryCard {
        padding-top: 75px;
    }

        #divHistoryCard .card {
            max-width: 400px;
            margin: 20px 5px;
        }

            #divHistoryCard .card .imgContainer {
                width: 350px;
            }

            #divHistoryCard .card:hover {
                height: 480px;
            }

            #divHistoryCard .card .content {
                height: 250px;
            }

                #divHistoryCard .card .content p {
                    font-size: 1.0rem;
                    min-height: 180px;
                    max-height: 200px;
                    -webkit-line-clamp: 10;
                }
}

@media (max-width: 330px) {
    #divHistoryCard .card .imgContainer {
        left: -2px;
    }

    #divHistoryCard .card:hover {
        height: 420px;
    }

    #divHistoryCard .card .content {
        height: 220px;
    }

        #divHistoryCard .card .content p {
            font-size: 0.9rem;
            min-height: 160px;
            max-height: 180px;
            -webkit-line-clamp: 8;
        }
}

/* Align History page typography with site defaults (from style.css) */

/* Inherit the global font family and sizing so header/homepage styles apply */
#history,
#history * {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

/* Match heading scales used on Default.aspx (copy from global typography) */
#history h1 { font-size: clamp(1.8rem, 3.2vw, 3.6rem); line-height: 1.1; margin: 0 0 0.5rem; }
#history h2 { font-size: clamp(1.4rem, 2.2vw, 2.4rem); line-height: 1.2; margin: 0 0 0.5rem; }
#history h3 { font-size: clamp(1.25rem, 1.6vw, 1.6rem); line-height: 1.2; margin: 0 0 0.5rem; }
#history h4 { font-size: clamp(1.1rem, 1.2vw, 1.25rem); line-height: 1.2; margin: 0 0 0.5rem; }

/* Paragraphs and card copy: same base size as Default.aspx */
#history p,
#history .card .content p,
#history .section-title p {
    font-size: clamp(0.95rem, 1.0vw, 1.1rem);
    line-height: 1.5;
    margin-bottom: 0.9rem;
    color: inherit;
}

/* Ensure card titles match site card sizing */
#history .card .content h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Override any page-local rules that force different sizes */
#history #divHistoryCard .card .content p,
#history #divHistoryCard .card .content h2,
#history .section-title p {
    /* enforce the values above */
    font-size: unset;
    font-weight: unset;
    line-height: unset;
}

/* Small-screen tweak: keep readable on phones */
@media (max-width: 576px) {
    #history p,
    #history #divHistoryCard .card .content p,
    #history .section-title p {
        font-size: 0.95rem;
    }

    #history h2 { font-size: 1.15rem; }
}

/* 3D shadow + lift for imgContainer (scoped to #history) */
#history #divHistoryCard .card .imgContainer {
    position: relative;
    z-index: 2;
   /* overflow: hidden;*/
    border-radius: 10px;
    /* layered outer shadows to simulate depth */
    box-shadow:
        0 6px 14px rgba(0,0,0,0.28),
        0 18px 36px rgba(0,0,0,0.20),
        0 36px 60px rgba(0,0,0,0.12);
    transition: transform 0.36s cubic-bezier(.2,.9,.2,1), box-shadow 0.36s cubic-bezier(.2,.9,.2,1);
    will-change: transform, box-shadow;
    transform-origin: center;
    background-clip: padding-box;
}

/* soft 'ground' shadow under the container */
#history #divHistoryCard .card .imgContainer::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -12px;
    transform: translateX(-50%);
    width: 76%;
    height: 22px;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.36) 0%, rgba(0,0,0,0.18) 45%, rgba(0,0,0,0.02) 80%, transparent 100%);
    filter: blur(8px);
    opacity: 0.95;
}

/* keep the image visually above the pseudo shadow */
#history #divHistoryCard .card .imgContainer img {
    position: relative;
    z-index: 3;
    display: block;
    width: 100%;
    height: 100%;
    /*object-fit: cover;*/
}

/* Ensure image stays same size on hover — remove image scaling and only lift container */
#history #divHistoryCard .card .imgContainer {
    /* keep initial lift (if used elsewhere, this will override) */
    transform: translateY(-36px);
    transition: transform 0.36s cubic-bezier(.2,.9,.2,1), box-shadow 0.36s cubic-bezier(.2,.9,.2,1);
    will-change: transform, box-shadow;
}

/* On hover, lift the container only (no scale) */
@media (hover: hover) and (pointer: fine) {
    #history #divHistoryCard .card:hover .imgContainer {
        transform: translateY(-46px); /* subtle lift, no scale */
        /* keep or increase shadow for lift effect, but do not scale */
        box-shadow:
            0 12px 28px rgba(0,0,0,0.36),
            0 30px 60px rgba(0,0,0,0.28),
            0 56px 90px rgba(0,0,0,0.16);
    }

    /* Prevent the image itself from scaling on hover */
    #history #divHistoryCard .card:hover .imgContainer img,
    #history #divHistoryCard .card .imgContainer img {
        transform: none !important;
        transition: transform 0.35s ease; /* keep smooth if other transforms appear */
    }
}

/* On touch devices, keep things static (no transforms) */
@media (hover: none), (max-width: 576px) {
    #history #divHistoryCard .card .imgContainer,
    #history #divHistoryCard .card .imgContainer img {
        transform: none !important;
        transition: none !important;
    }
}

/* Ensure section title text is white and readable */
#history .section-title,
#history .section-title p {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* add space below the section title paragraph */
#history .section-title p {
    margin-bottom: 3.5rem;
}

/* slightly smaller spacing on small screens */
@media (max-width: 576px) {
    #history .section-title p {
        margin-bottom: 1rem;
    }
}

/* Dark-mode: make card content h2 yellow for better contrast */
body.dark-mode #history #divHistoryCard .card .content h2 {
    color: #ffeb3b;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}

/* Dark mode: section title paragraph in yellow */
body.dark-mode #history .section-title p {
    color: #ffeb3b !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}


