/* Tighten only theme-default section spacing. Admin custom padding and
   compact/spacious choices retain their existing precedence. */
.sms-home > :is(section.home-section, section.home-admissions, section.home-notices):not(.sms-hero):not(.cms-spacing-compact):not(.cms-spacing-spacious):not([style*="--cms-section-padding"]) {
    padding-block: clamp(24px, 3vw, 42px) !important;
}
.sms-home .home-community { padding-block: 18px; }
.sms-home .home-community-grid { gap: clamp(12px, 1.4vw, 20px); }
.sms-home .home-vc-panel [data-vc-read-more-auto][hidden] { display:none !important; }

/* Shared section visibility choices never remove saved cards or source records. */
.sms-home :is(.home-section,.home-admissions,.home-notices).cms-hide-heading :is(.home-section-heading,.home-feature-heading,.intro-primary,.intro-layout,.admissions-layout,.contact-layout) h2,
.sms-home .home-notices.cms-hide-heading .announcement-primary > strong { display:none !important; }
.sms-home :is(.home-section,.home-admissions).cms-hide-eyebrow :is(.home-section-heading,.home-feature-heading,.intro-primary,.intro-layout,.admissions-layout,.contact-layout) .home-eyebrow { display:none !important; }
.sms-home :is(.home-section,.home-admissions).cms-hide-description :is(.home-section-heading,.home-feature-heading,.intro-primary,.intro-layout,.admissions-layout,.contact-layout) > p:not(.home-eyebrow),
.sms-home :is(.home-section,.home-admissions).cms-hide-description :is(.home-section-heading,.intro-layout,.admissions-layout,.contact-layout) > div > p:not(.home-eyebrow),
.sms-home .home-intro.cms-hide-description .intro-copy { display:none !important; }
.sms-home :is(.home-section,.home-admissions).cms-hide-cta :is(.home-section-heading,.intro-primary,.intro-layout,.admissions-layout,.contact-layout) > .home-text-link,
.sms-home :is(.home-section,.home-admissions).cms-hide-cta :is(.intro-layout,.contact-layout) > div > .home-text-link,
.sms-home .home-admissions.cms-hide-cta .sms-actions,
.sms-home .home-feature-trio.cms-hide-cta .home-feature-more { display:none !important; }

/* Existing shapes remain untouched until an admin selects a section shape. */
.sms-home section[style*="--cms-card-radius"] :is(.home-feature-panel, .home-column-card, .home-news-card, .home-vc-photo, .home-vc-portrait, .intro-primary, .intro-content-card, .intro-media-card, .intro-layout, .programme-card, .faculty-feature, .event-card, .featured-story, .latest-stories article, .editorial-item, .admission-steps, .contact-layout address, .home-card-scene, .home-card-front, .home-card-message),
.sms-home .home-community section[style*="--cms-card-radius"] {
    border-radius: var(--cms-card-radius) !important;
}

/* The opening News, VC and Quick Links group uses crisp editorial edges by
   default; an explicit corner choice in the CMS still wins. */
.sms-home .home-community section:not([style*="--cms-card-radius"]),
.sms-home .home-community section:not([style*="--cms-card-radius"]) :is(.home-feature-panel, .home-column-card, .home-news-card, .home-vc-photo, .home-vc-portrait, .home-community-empty, .home-card-scene, .home-card-front, .home-card-message) {
    border-radius: 0 !important;
}

/* One compact masthead for the three related homepage cards. */
.sms-home .home-community :is(.home-news-section, .home-quick-links-section, .home-leadership-section) .home-feature-panel {
    border-top: 0 !important;
    background: #fff !important;
    color: #18344d !important;
}
.sms-home .home-community :is(.home-news-section, .home-quick-links-section, .home-leadership-section) .home-feature-heading {
    box-sizing: border-box;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-start;
    text-align: left !important;
    width: auto !important;
    max-width: none !important;
    min-height: 54px !important;
    margin: -18px -18px 14px !important;
    padding: 10px 18px !important;
    background: var(--cms-header-color, #255d8d) !important;
    border: 0 !important;
    border-bottom: 3px solid var(--cms-header-border, #c99d43) !important;
}
.sms-home .home-community :is(.home-news-section, .home-quick-links-section) .home-feature-heading .home-eyebrow {
    display: none !important;
}
.sms-home .home-community :is(.home-news-section, .home-quick-links-section, .home-leadership-section) .home-feature-heading h2 {
    margin: 0 !important;
    color: var(--cms-header-text, #fff) !important;
    font: 700 20px/1.2 Georgia, serif !important;
    letter-spacing: -.015em;
}
.sms-home .home-community .home-leadership-section .home-vc-panel .home-vc-photo {
    border: 1px solid #d5dee4;
    box-shadow: 0 8px 18px #102c431a;
    background: #eef2f4;
}
.sms-home .home-community .home-leadership-section .home-card-scene[data-vc-photo-front="true"] .home-vc-panel .home-vc-photo {
    flex: 0 0 176px !important;
    width: min(100%, 188px) !important;
    height: 176px !important;
    margin: 0 auto 6px !important;
    background: #eef2f4 !important;
}
.sms-home .home-community .home-leadership-section .home-card-scene[data-vc-photo-front="true"] .home-vc-panel .home-vc-photo .home-vc-portrait {
    position: static !important;
    top: auto !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}
.sms-home .home-community .home-leadership-section .home-vc-identity {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
}
.sms-home .home-community .home-leadership-section .home-vc-identity b {
    color: #143554 !important;
    font-size: 14px !important;
}
.sms-home .home-community .home-leadership-section .home-vc-identity small {
    margin-top: 2px !important;
    color: #607381 !important;
    font-size: 10px !important;
}
.sms-home .home-community .home-leadership-section .home-vc-quote {
    display: -webkit-box;
    overflow: hidden;
    margin: 3px 0 0 !important;
    color: #415765 !important;
    font: 400 14px/1.5 Georgia, serif !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}
.sms-home .home-community .home-leadership-section .home-vc-panel .home-vc-photo {
    width: min(100%, var(--vc-photo-width, 260px)) !important;
    height: var(--vc-photo-height, 230px) !important;
    flex: none !important;
    align-self: center;
    margin: 0 auto 10px !important;
    padding: 4px;
    background: #f6f4ef;
}
.sms-home .home-community .home-leadership-section .home-vc-photo.vc-size-small { --vc-photo-width: 190px; --vc-photo-height: 185px; }
.sms-home .home-community .home-leadership-section .home-vc-photo.vc-size-large { --vc-photo-width: 100%; --vc-photo-height: 295px; }
.sms-home .home-community .home-leadership-section .home-vc-photo.vc-shape-circle,
.sms-home .home-community .home-leadership-section .home-vc-photo.vc-shape-circle .home-vc-portrait { border-radius: 50% !important; }
.sms-home .home-community .home-leadership-section .home-vc-photo.vc-shape-rounded-square,
.sms-home .home-community .home-leadership-section .home-vc-photo.vc-shape-rounded-square .home-vc-portrait { border-radius: 16px !important; }
.sms-home .home-community .home-leadership-section .home-vc-photo.vc-shape-square,
.sms-home .home-community .home-leadership-section .home-vc-photo.vc-shape-square .home-vc-portrait { border-radius: 0 !important; }
.sms-home .home-community .home-leadership-section .home-vc-photo.vc-frame-none { border: 0 !important; box-shadow: none !important; padding: 0 !important; }
.sms-home .home-community .home-leadership-section .home-vc-panel .home-vc-photo .home-vc-portrait {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
}
.sms-home .home-community .home-leadership-section .home-vc-panel .home-vc-photo.vc-fit-cover .home-vc-portrait {
    object-fit: cover !important;
}
.sms-home .home-community .home-leadership-section .home-vc-panel .home-vc-identity {
    order: 2;
}
.sms-home .home-community .home-leadership-section .home-vc-panel .home-vc-quote {
    order: 1;
}
.sms-home .home-community .home-leadership-section .home-vc-panel .home-feature-more {
    order: 3;
}
.sms-home .home-community .home-leadership-section .home-feature-more {
    padding-top: 6px !important;
    color: #215c91 !important;
}
.sms-home .home-community .home-feature-grid > .home-card-scene {
    flex: 0 0 auto;
    height: var(--cms-min-height,420px) !important;
    min-height: var(--cms-min-height,420px) !important;
    max-height: var(--cms-min-height,420px) !important;
}

/* Two substantial academic entries, with the real departments visible on the
   homepage. Links continue to open the faculty pages managed in the CMS. */
.sms-home .home-faculties .faculty-grid { gap: clamp(16px, 2vw, 28px); }
.sms-home .home-faculties .faculty-feature {
    min-height: 365px;
    border-top: 3px solid #c2a058;
    background: linear-gradient(140deg, #153d58, #102c43);
    box-shadow: 0 16px 36px #0c29411c;
}
.sms-home .home-faculties .faculty-feature:nth-child(even) {
    background: linear-gradient(140deg, #0d624f, #124639);
}
.sms-home .home-faculties:not([style*="--cms-card-radius"]) .faculty-feature {
    border-radius: 0;
}
.sms-home .home-faculties .faculty-feature > div {
    justify-content: flex-start;
    padding: clamp(26px, 3vw, 40px);
}
.sms-home .home-faculties .faculty-feature h3 {
    max-width: 18ch;
    margin: 12px 0 18px;
    font-size: clamp(26px, 2.3vw, 36px);
    line-height: 1.16;
}
.sms-home .home-faculties .faculty-feature .faculty-departments {
    display: grid;
    gap: 0;
    width: 100%;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #ffffff55;
    color: #f3f5f2;
    font-size: 13px;
}
.sms-home .home-faculties .faculty-departments > span {
    display: block;
    padding: 7px 0;
    border-bottom: 1px solid #ffffff22;
}
.sms-home .home-faculties .faculty-feature .home-text-link {
    margin-top: 20px;
    color: #f3d178;
    font-weight: 700;
}

/* The VC section's explicit Off choice also disables its separate photo tilt. */
.sms-home .home-leadership-section[data-card-effect-off] .home-vc-photo,
.sms-home .home-leadership-section[data-card-effect-off] .home-vc-photo img {
    transform: none !important;
    transition: none !important;
}

/* Show the complete portrait in the compact leadership column. */
.sms-home .home-community .home-leadership-section[data-card-effect-off] .home-vc-panel .home-vc-photo {
    width: min(100%, 280px);
    height: 280px;
    aspect-ratio: 1;
    align-self: center;
    margin: 0 auto 14px;
    padding: 4px;
    border: 1px solid #d5b66f;
    border-radius: 14px;
    background: #102c43;
    box-shadow: 0 12px 26px #061b3340;
}
.sms-home .home-community .home-leadership-section[data-card-effect-off] .home-vc-panel .home-vc-photo .home-vc-portrait {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 10px;
}

@media (max-width: 390px) {
    .sms-home .home-community .home-leadership-section[data-card-effect-off] .home-vc-panel .home-vc-photo {
        width: min(100%, 250px);
        height: 250px;
    }
}

@media (max-width: 700px) {
    .sms-home > :is(section.home-section, section.home-admissions, section.home-notices):not(.sms-hero):not(.cms-spacing-compact):not(.cms-spacing-spacious):not([style*="--cms-section-padding"]) {
        padding-block: 24px !important;
    }
    .sms-home .home-community { padding-block: 14px; }
}
