/* =========================================================
   IMA BAREILLY — ABOUT PAGE
   Shares the Royal Blue / Navy / Sky / Gold design system
   from ima-modern.css (homepage).
   ========================================================= */

/* ---------- Design tokens (safe to declare; identical values
              are also declared in ima-modern.css, no conflict) ---------- */
:root {
    --ima-primary:        #1769AA;
    --ima-primary-dark:   #123B5D;
    --ima-deep-navy:      #0E2F4A;
    --ima-sky:            #4DA3D9;
    --ima-sky-soft:       #EAF5FC;

    --ima-gold:           #C8A45D;
    --ima-gold-soft:      #F8F1E3;

    --ima-white:          #FFFFFF;
    --ima-bg:             #F6FAFD;
    --ima-text:           #172B3A;
    --ima-muted:          #657786;
    --ima-border:         #E2ECF3;

    --ima-shadow-sm: 0 8px 30px rgba(18, 59, 93, 0.06);
    --ima-shadow-md: 0 18px 45px rgba(18, 59, 93, 0.12);
    --ima-shadow-lg: 0 24px 60px rgba(18, 59, 93, 0.18);

    --ima-radius-sm: 10px;
    --ima-radius-md: 16px;
    --ima-radius-lg: 20px;
    --ima-radius-pill: 999px;

    --ima-transition: 0.3s ease;
}

/* =========================================================
   PAGE WRAPPER
   ========================================================= */
.ima-about-page {
    color: var(--ima-text);
    background: var(--ima-bg);
    overflow-x: hidden;
}

.ima-about-page img { max-width: 100%; height: auto; }

/* =========================================================
   BREADCRUMB HERO (replaces sigma_subheader)
   ========================================================= */
.ima-about-hero {
    position: relative;
    /* Top padding must clear the fixed header.
       Header is ~110-130px tall, so use a min value that scales. */
    padding: clamp(160px, 12vw, 200px) 0 90px;
    background:
        radial-gradient(circle at 82% 22%, rgba(77, 163, 217, 0.35), transparent 55%),
        linear-gradient(120deg, #0E2F4A 0%, #1769AA 55%, #123B5D 100%);
    color: #FFFFFF;
    overflow: hidden;
}

.ima-about-hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 4px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--ima-gold) 50%,
        transparent 100%);
}

.ima-about-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.ima-about-hero h1 {
    margin: 0 0 16px;
    color: #FFFFFF;
    font-size: clamp(34px, 4.5vw, 54px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -1.2px;
}

.ima-about-hero p {
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.75;
    max-width: 560px;
}

.ima-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
}

.ima-breadcrumb li {
    color: rgba(255, 255, 255, 0.75);
    position: relative;
    padding-right: 16px;
}

.ima-breadcrumb li + li::before {
    content: "/";
    position: absolute;
    left: -8px;
    top: 0;
    color: rgba(255, 255, 255, 0.4);
}

.ima-breadcrumb a {
    color: #8ED0F2;
    text-decoration: none;
    font-weight: 600;
    transition: color var(--ima-transition);
}

.ima-breadcrumb a:hover { color: #FFFFFF; }

.ima-breadcrumb .active { color: #FFFFFF; font-weight: 700; }

/* =========================================================
   SECTION SPACING
   ========================================================= */
.ima-about-section {
    padding: 90px 0;
    background: #FFFFFF;
}

.ima-about-section--alt { background: var(--ima-bg); }

/* =========================================================
   INTRO (image + copy)
   ========================================================= */
.ima-about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 60px;
    align-items: center;
}

.ima-about-photo {
    position: relative;
    border-radius: var(--ima-radius-lg);
    overflow: hidden;
    box-shadow: var(--ima-shadow-md);
    background: #FFFFFF;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    /* Give the wrapper an explicit aspect ratio so it never collapses */
    aspect-ratio: 1 / 1;
    width: 100%;
}

.ima-about-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
}

.ima-about-photo:hover {
    transform: translateY(-4px);
    box-shadow: var(--ima-shadow-lg);
}

.ima-about-photo:hover img { transform: scale(1.04); }

/* Gold decorative square behind the image — visually offset but does not
   interfere with stacking of the image itself. */
.ima-about-photo::after {
    content: "";
    position: absolute;
    right: -18px;
    bottom: -18px;
    width: 120px;
    height: 120px;
    border-radius: 16px;
    background: var(--ima-gold-soft);
    border: 2px solid var(--ima-gold);
    z-index: 0;
    pointer-events: none;
}

/* On tablet/mobile the decorative square isn't needed */
@media (max-width: 991px) {
    .ima-about-photo::after { display: none; }
}

.ima-about-copy h2 {
    margin: 0 0 22px;
    color: var(--ima-primary-dark);
    font-size: clamp(32px, 3.6vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
}

.ima-about-copy h2 span { color: var(--ima-primary); }

.ima-about-kicker {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--ima-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.ima-about-copy p {
    margin: 0 0 16px;
    color: var(--ima-text);
    font-size: 14.5px;
    line-height: 1.85;
}

/* =========================================================
   BUTTON (matches homepage)
   ========================================================= */
.ima-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-height: 50px;
    padding: 0 26px;

    border: 0;
    border-radius: var(--ima-radius-pill);

    background: var(--ima-primary);
    color: #FFFFFF !important;

    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;

    box-shadow: 0 8px 20px rgba(23, 105, 170, 0.22);
    transition: all var(--ima-transition);
}

.ima-btn:hover,
.ima-btn:focus-visible {
    background: var(--ima-primary-dark);
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(23, 105, 170, 0.30);
}

.ima-btn i { font-size: 11px; transition: transform var(--ima-transition); }
.ima-btn:hover i { transform: translateX(4px); }

/* =========================================================
   TEAM SECTION
   ========================================================= */
.ima-team-heading {
    max-width: 720px;
    margin: 0 auto 50px;
    text-align: center;
}

.ima-team-heading .ima-about-kicker { display: block; }

.ima-team-heading h2 {
    margin: 0 0 16px;
    color: var(--ima-primary-dark);
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
}

.ima-team-heading p {
    max-width: 620px;
    margin: 0 auto;
    color: var(--ima-muted);
    font-size: 15px;
    line-height: 1.8;
}

/* -----------------------------------------------------------
   Team grid — 3 cards (President, Secretary, Treasurer)
   Balanced and centered on wide screens.
   ----------------------------------------------------------- */
.ima-team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.ima-team-card {
    height: 100%;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid var(--ima-border);
    border-radius: var(--ima-radius-lg);
    box-shadow: var(--ima-shadow-sm);
    transition: transform var(--ima-transition), box-shadow var(--ima-transition);
    text-align: center;
}

.ima-team-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--ima-shadow-md);
}

.ima-team-photo {
    position: relative;
    height: 300px;
    overflow: hidden;
    background: var(--ima-sky-soft);
}

.ima-team-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.ima-team-card:hover .ima-team-photo img { transform: scale(1.045); }

.ima-team-body { padding: 24px 20px 26px; }

.ima-team-role {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 12px;
    border-radius: var(--ima-radius-pill);
    background: var(--ima-gold-soft);
    color: #8a6a25;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.ima-team-body h3 {
    margin: 0 0 8px;
    color: var(--ima-primary-dark);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.ima-team-body h3 a {
    color: inherit;
    text-decoration: none;
}

.ima-team-body p {
    margin: 0;
    color: var(--ima-muted);
    font-size: 12px;
    line-height: 1.6;
}

/* =========================================================
   WHAT IMA DOES
   ========================================================= */
.ima-what-section {
    position: relative;
    padding: 100px 0;
    background: var(--ima-deep-navy);
    color: #FFFFFF;
    overflow: hidden;
}

.ima-what-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.14;
}

.ima-what-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg,
            rgba(14, 47, 74, 0.95) 0%,
            rgba(23, 105, 170, 0.85) 100%);
}

.ima-what-section .container { position: relative; z-index: 2; }

.ima-what-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 60px;
    align-items: start;
}

.ima-what-heading h2 {
    margin: 0 0 20px;
    color: #FFFFFF;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.12;
}

.ima-what-heading p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
    line-height: 1.8;
    margin: 0 0 30px;
}

.ima-purpose-card {
    display: flex;
    gap: 18px;
    padding: 22px;
    margin-bottom: 16px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--ima-radius-md);
    background: rgba(255, 255, 255, 0.08);

    transition: background var(--ima-transition), transform var(--ima-transition);
}

.ima-purpose-card:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-3px);
}

.ima-purpose-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(200, 164, 93, 0.14);
    border: 1px solid rgba(200, 164, 93, 0.35);
    color: var(--ima-gold);
    font-size: 20px;
}

.ima-purpose-card h3 {
    margin: 0 0 8px;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
}

.ima-purpose-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.7;
}

/* Two-image collage on the right */
.ima-what-media {
    position: relative;
    min-height: 480px;
}

.ima-what-media img {
    position: absolute;
    border: 4px solid rgba(255, 255, 255, 0.20);
    border-radius: var(--ima-radius-md);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.30);
    object-fit: cover;
}

.ima-what-media img:first-child {
    top: 0;
    left: 0;
    width: 62%;
    height: 320px;
    z-index: 2;
}

.ima-what-media img:last-child {
    bottom: 0;
    right: 0;
    width: 55%;
    height: 280px;
    z-index: 3;
}

/* =========================================================
   STATS BAND
   ========================================================= */
.ima-stats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 60px;
    background: var(--ima-primary-dark);
    border-radius: var(--ima-radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.ima-stat {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.ima-stat:last-child { border-right: 0; }

.ima-stat-number {
    color: #FFFFFF;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.1;
}

.ima-stat-number b { font-weight: inherit; }

.ima-stat-label {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

/* =========================================================
   EVENTS SECTION
   ========================================================= */
.ima-events-section {
    padding: 90px 0;
    background: var(--ima-bg);
}

.ima-events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    margin-top: 45px;
}

.ima-event-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid var(--ima-border);
    border-radius: var(--ima-radius-lg);
    box-shadow: var(--ima-shadow-sm);
    transition: transform var(--ima-transition), box-shadow var(--ima-transition);
}

.ima-event-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--ima-shadow-md);
}

.ima-event-photo {
    position: relative;
    height: 235px;
    overflow: hidden;
    background: var(--ima-sky-soft);
}

.ima-event-photo a {
    display: block;
    width: 100%;
    height: 100%;
}

.ima-event-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.ima-event-card:hover .ima-event-photo img { transform: scale(1.045); }

.ima-event-upcoming {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 7px 12px;
    border-radius: var(--ima-radius-pill);
    background: var(--ima-gold);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.20);
}

.ima-event-body {
    padding: 24px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.ima-event-date {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--ima-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
}

.ima-event-date:hover { color: var(--ima-primary-dark); }

.ima-event-body h3 {
    margin: 0 0 16px;
    color: var(--ima-primary-dark);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
}

.ima-event-body h3 a {
    color: inherit;
    text-decoration: none;
}

.ima-event-body h3 a:hover { color: var(--ima-primary); }

.ima-event-arrow {
    margin-top: auto;
    align-self: flex-start;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ima-sky-soft);
    color: var(--ima-primary);
    text-decoration: none !important;
    transition: background var(--ima-transition), transform var(--ima-transition);
}

.ima-event-arrow:hover {
    background: var(--ima-primary);
    color: #FFFFFF;
    transform: translateX(3px);
}

.ima-events-cta { margin-top: 45px; text-align: center; }

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Laptop */
@media (max-width: 1199px) {
    .ima-about-grid { gap: 44px; }
    .ima-what-grid  { gap: 44px; }
    .ima-what-media { min-height: 420px; }
}

/* Tablet */
@media (max-width: 991px) {
    .ima-about-hero { padding: 150px 0 60px; }

    .ima-about-section { padding: 70px 0; }

    .ima-about-grid,
    .ima-what-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .ima-about-photo::after { display: none; }

    /* Team: on tablet keep 3 across if they fit, else wrap to 2 */
    .ima-team-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        max-width: none;
    }
    .ima-team-photo { height: 260px; }

    .ima-what-media { min-height: 380px; }
    .ima-what-media img:first-child { width: 68%; height: 280px; }
    .ima-what-media img:last-child  { width: 58%; height: 240px; }

    .ima-stats { grid-template-columns: repeat(2, 1fr); }
    .ima-stat { min-height: 150px; }
    .ima-stat:nth-child(2)  { border-right: 0; }
    .ima-stat:nth-child(-n + 2) { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }

    .ima-events-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 767px) {
    .ima-about-hero { padding: 130px 0 55px; }
    .ima-about-hero h1 { font-size: 30px; }
    .ima-about-hero p { font-size: 14px; }

    .ima-about-section { padding: 60px 0; }

    .ima-about-copy h2 { font-size: 28px; }

    .ima-team-heading { margin-bottom: 35px; }
    .ima-team-heading h2 { font-size: 28px; }
    .ima-team-grid { grid-template-columns: 1fr; max-width: none; }
    .ima-team-photo { height: 340px; }

    .ima-what-section { padding: 70px 0; }
    .ima-what-heading h2 { font-size: 28px; }
    .ima-purpose-card { padding: 18px; gap: 14px; }
    .ima-purpose-icon { width: 44px; height: 44px; flex-basis: 44px; font-size: 17px; }

    .ima-what-media { min-height: 340px; }
    .ima-what-media img:first-child { width: 75%; height: 230px; }
    .ima-what-media img:last-child  { width: 65%; height: 210px; }

    .ima-stat { min-height: 130px; padding: 20px 10px; }
    .ima-stat-number { font-size: 26px; }

    .ima-events-section { padding: 60px 0; }
    .ima-events-grid { grid-template-columns: 1fr; gap: 22px; }
    .ima-event-photo { height: 220px; }
}

/* Small phones */
@media (max-width: 480px) {
    .ima-about-hero { padding: 120px 0 50px; }
    .ima-about-hero h1 { font-size: 26px; }

    .ima-about-copy h2 { font-size: 24px; }
    .ima-team-heading h2 { font-size: 24px; }
    .ima-what-heading h2 { font-size: 24px; }

    .ima-stat-number { font-size: 22px; }
    .ima-stat-label  { font-size: 11px; }

    .ima-event-photo { height: 200px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .ima-about-page *,
    .ima-about-page *::before,
    .ima-about-page *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* =========================================================
   INTRO PHOTO — CONTAIN MODE
   Keeps the IMA crest fully visible inside the frame
   (matches the homepage behaviour where the logo sits
   inside a padded square).
   ========================================================= */

/* Override the base image rule so the crest isn't cropped */
.ima-about-photo--contain {
    background: #FFFFFF;
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ima-about-photo--contain img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;         /* ← the key fix */
    object-position: center;
    transition: transform 0.6s ease;
}

.ima-about-photo--contain:hover img {
    transform: scale(1.04);
}

/* Remove the gold decorative square — the padding already
   provides visual balance for the logo variant. */
.ima-about-photo--contain::after {
    display: none;
}

/* Tablet — slightly smaller padding since the frame narrows */
@media (max-width: 991px) {
    .ima-about-photo--contain { padding: 40px; }
}

/* Mobile — tighter padding so the crest still has presence */
@media (max-width: 767px) {
    .ima-about-photo--contain { padding: 32px; }
}

/* Small phones */
@media (max-width: 480px) {
    .ima-about-photo--contain { padding: 24px; }
}

/* =========================================================
   ABOUT HERO — restore the original page-title banner image
   The theme's .page-tile-banner class provides the image;
   we layer the Royal-Blue gradient on top as an overlay so
   the text stays readable, exactly like the old subheader.
   ========================================================= */

.ima-about-hero.page-tile-banner {
    position: relative;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Dark blue overlay above the image, below the text */
.ima-about-hero.page-tile-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg,
            rgba(14, 47, 74, 0.88) 0%,
            rgba(18, 59, 93, 0.75) 55%,
            rgba(23, 105, 170, 0.62) 100%);
    z-index: 0;
    pointer-events: none;
}

/* The existing gold underline strip stays visible above the overlay */
.ima-about-hero.page-tile-banner::after {
    z-index: 2;
}

/* Hero content sits above the overlay */
.ima-about-hero.page-tile-banner .container,
.ima-about-hero.page-tile-banner .ima-about-hero-inner {
    position: relative;
    z-index: 3;
}

/* Slightly stronger text shadow on top of the photo for legibility */
.ima-about-hero.page-tile-banner h1 {
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.35);
}

.ima-about-hero.page-tile-banner p {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}