/* ============================================================
   HCC INNER PAGE — Institutional Design
   Holy Cross College (Autonomous), Tiruchirappalli
   ============================================================ */

/* ============================================================
   PAGE HERO BANNER — BIG SIZE like original (70vh)
============================================================ */
/* ============================================================
   CRITICAL FIXES — Double scrollbar + dropdown overflow
============================================================ */

/* ============ Fix double scrollbar ============ */
/* ============================================================
   CRITICAL FIXES — first-scroll + double scrollbar (all browsers)
============================================================ */
html {
    overflow-x: hidden !important;
    overflow-y: scroll !important;   /* scrollbar always present */
    height: auto !important;
    scroll-behavior: auto !important; /* no smooth lag on first wheel */
}

body {
    overflow-x: hidden !important;
    overflow-y: visible !important;
    height: auto !important;
    min-height: 100vh !important;
    margin: 0;
    padding: 0;
    position: static !important;
}

/* style.css may still set top:-100px — kill it here */
.navbar.sticky-top,
nav.navbar.sticky-top {
    top: 0 !important;
}

/* Never create nested scrollports on the inner layout */
.hcc-inner-wrap,
.hcc-inner-wrap > aside.hcc-side-aside,
.hcc-inner-wrap > .hcc-main-content,
.hcc-content-body {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

/* Sticky sidebar: delay stickiness until after first paint
   (prevents Chrome eating the first wheel event) */
.hcc-side {
    position: sticky;
    top: 108px;
    /* if first-scroll still fails, temporarily use: position: static; */
}

/* ============ Fix navbar dropdown overflow ============ */
.navbar .dropdown-menu {
    min-width: 240px;
    max-width: 320px;
    white-space: normal !important;
}

.navbar .dropdown-menu .dropdown-item {
    white-space: normal !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    padding: 10px 16px !important;
}

/* If dropdown items are still cramped, widen them */
.navbar .dropdown-menu[aria-labelledby] {
    min-width: 260px;
}

/* Long menu item wrap */
.navbar-nav .dropdown-item {
    white-space: normal !important;
    word-break: normal;
    hyphens: auto;
}
.hcc-hero-banner {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    overflow: hidden;
    background: #001a6e;
    margin: 0 0 0 0;
    padding: 0;
}

.hcc-hero-banner__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hcc-hero-banner__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3));
}

.hcc-hero-banner__content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.hcc-hero-banner__eyebrow {
    display: inline-block;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #e8c84a;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.hcc-hero-banner__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin: 0;
    padding: 0;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 12px rgba(0,0,0,.5);
}

.hcc-hero-banner__title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: #c9a227;
    margin: 22px auto 0;
}

/* Fallback header (no image) */
.hcc-hero-fallback {
    height: auto;
    min-height: 0;
    background: linear-gradient(180deg, #f8f9fc, #eef0f6);
    border-bottom: 1px solid #dde1eb;
    padding: 50px 0 44px;
}
.hcc-hero-fallback .hcc-hero-banner__content {
    height: auto;
    padding: 0 20px;
}
.hcc-hero-fallback .hcc-hero-banner__eyebrow {
    color: #c9a227;
    text-shadow: none;
}
.hcc-hero-fallback .hcc-hero-banner__title {
    color: #001a6e;
    text-shadow: none;
    font-size: clamp(1.8rem, 4vw, 3rem);
}

/* Hero responsive heights (like your original) */
@media (max-width: 992px) {
    .hcc-hero-banner {
        height: 55vh;
        min-height: 340px;
    }
}
@media (max-width: 768px) {
    .hcc-hero-banner {
        height: 50vh;
        min-height: 280px;
    }
}
@media (max-width: 480px) {
    .hcc-hero-banner {
        height: 40vh;
        min-height: 220px;
        padding: 20px;
    }
    .hcc-hero-banner__content {
        padding: 20px 14px;
    }
    .hcc-hero-banner__title::after {
        width: 70px;
        margin-top: 16px;
    }
}

/* ============================================================
   BREADCRUMB BAR — with overlap effect like original
============================================================ */
.hcc-breadcrumb-bar {
    background: #eee;
    padding: 10px 16px;
    margin-top: -50px;
    position: relative;
    z-index: 5;
    font-weight: bold;
    border: none;
}

.hcc-breadcrumb-bar__wrap {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 30px;
    box-sizing: border-box;
}

.hcc-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 16px;
    color: #333;
    margin: 0;
    padding: 0;
    list-style: none;
    font-weight: 700;
}

.hcc-breadcrumb a {
    color: #0275d8;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    border-radius: 0;
    transition: color .2s ease;
}

.hcc-breadcrumb a:hover {
    color: #01447e;
    text-decoration: underline;
}

.hcc-breadcrumb .sep {
    color: #333;
    font-size: 16px;
    margin: 0 6px;
    font-weight: 700;
}

.hcc-breadcrumb .current {
    color: #001a6e;
    font-weight: 700;
}

@media (max-width: 768px) {
    .hcc-breadcrumb-bar {
        margin-top: -30px;
        padding: 10px 14px;
    }
    .hcc-breadcrumb,
    .hcc-breadcrumb a { font-size: 14px; }
    .hcc-breadcrumb .sep { font-size: 14px; }
}

@media (max-width: 480px) {
    .hcc-breadcrumb-bar {
        margin-top: -20px;
    }
    .hcc-breadcrumb,
    .hcc-breadcrumb a { font-size: 13px; }
}

/* ============================================================
   MAIN LAYOUT — Sidebar FULL LEFT + Content FULL RIGHT
   No max-width constraint, uses almost the entire screen
============================================================ */
.hcc-inner-wrap {
    width: 100%;
    max-width: 100%;
    margin: 40px 0 60px;
    padding: 0 24px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 30px;
    box-sizing: border-box;
}

.hcc-inner-wrap > aside.hcc-side-aside {
    flex: 0 0 320px;
    width: 320px;
    max-width: 320px;
    min-width: 320px;
    margin: 0;
    padding: 0;
}

.hcc-inner-wrap > .hcc-main-content {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* ============================================================
   SIDEBAR — bigger, bolder
============================================================ */
.hcc-side {
    position: sticky;
    top: 108px;
    width: 100%;
}

.hcc-side__toggle {
    display: none;
    width: 100%;
    padding: 16px 22px;
    background: #001a6e;
    color: #fff;
    border: none;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    letter-spacing: .3px;
    box-sizing: border-box;
}

.hcc-side__toggle:hover { background: #000f4a; }

.hcc-side__toggle-icon {
    font-size: 22px;
    line-height: 1;
    transition: transform .25s ease;
}

.hcc-side__toggle[aria-expanded="true"] .hcc-side__toggle-icon {
    transform: rotate(45deg);
}

.hcc-side__nav {
    background: #ffffff;
    border: 1px solid #dde1eb;
    border-top: 4px solid #001a6e;
    width: 100%;
    box-sizing: border-box;
}

.hcc-side__head {
    background: #001a6e;
    padding: 20px 24px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.4px;
    border-bottom: 3px solid #c9a227;
    margin: 0;
}

.hcc-side__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hcc-side__item {
    border-bottom: 1px solid #eef0f6;
    margin: 0;
    padding: 0;
}

.hcc-side__item:last-child { border-bottom: none; }

.hcc-side__link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 22px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #2a2a3d;
    text-decoration: none;
    border-radius: 0;
    line-height: 1.4;
    transition: background .2s ease, color .2s ease, padding-left .2s ease;
    border-left: 4px solid transparent;
    box-sizing: border-box;
}

.hcc-side__link::before {
    content: '›';
    color: #b0b6c9;
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
    transition: color .2s ease;
    flex-shrink: 0;
}

.hcc-side__link:hover {
    background: #f8f9fc;
    color: #001a6e;
    text-decoration: none;
    padding-left: 26px;
}

.hcc-side__link:hover::before { color: #c9a227; }

.hcc-side__link.active {
    background: #f8f9fc;
    color: #001a6e;
    font-weight: 700;
    border-left-color: #c9a227;
    padding-left: 26px;
}

.hcc-side__link.active::before { color: #c9a227; }

/* ============================================================
   MAIN CONTENT AREA
============================================================ */
.hcc-content-body {
    background: #ffffff;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 18px;
    line-height: 1.9;
    color: #2a2a3d;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    padding: 0;
}

.hcc-content-body * {
    max-width: 100%;
}

/* Headings */
.hcc-content-body h1,
.hcc-content-body h2,
.hcc-content-body h3,
.hcc-content-body h4,
.hcc-content-body h5,
.hcc-content-body h6 {
    font-family: 'Playfair Display', Georgia, serif;
    color: #001a6e;
    line-height: 1.25;
    font-weight: 700;
    margin: 36px 0 18px;
    clear: both;
}

.hcc-content-body > h1:first-child,
.hcc-content-body > h2:first-child,
.hcc-content-body > h3:first-child {
    margin-top: 0;
}

.hcc-content-body h1 {
    font-size: 34px;
    padding-bottom: 14px;
    border-bottom: 2px solid #eef0f6;
}

.hcc-content-body h2 {
    font-size: 30px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef0f6;
    position: relative;
    letter-spacing: 0.3px;
}

.hcc-content-body h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 70px;
    height: 4px;
    background: #c9a227;
}

.hcc-content-body h3 { font-size: 24px; color: #001a6e; }
.hcc-content-body h4 { font-size: 20px; }

/* Paragraphs */
.hcc-content-body p {
    font-size: 18px;
    line-height: 1.9;
    color: #3a3a52;
    margin: 0 0 18px;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

/* Lists */
.hcc-content-body ul,
.hcc-content-body ol {
    margin: 0 0 20px;
    padding-left: 28px;
    font-size: 18px;
}

.hcc-content-body ul { list-style: disc; }
.hcc-content-body ol { list-style: decimal; }

.hcc-content-body li {
    margin-bottom: 8px;
    color: #3a3a52;
    line-height: 1.8;
    font-size: 18px;
}

/* Links */
.hcc-content-body a {
    color: #001a6e;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: inherit;
    border-radius: 0;
}

.hcc-content-body a:hover {
    color: #c9a227;
    text-decoration: underline;
}

.hcc-content-body strong,
.hcc-content-body b {
    color: #001a6e;
    font-weight: 700;
}

/* Images */
.hcc-content-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 24px auto;
    border: 1px solid #dde1eb;
    border-radius: 2px;
}

.hcc-content-body p img {
    display: inline-block;
    margin: 0 8px 0 0;
    vertical-align: middle;
}

/* Hide broken/tiny images */
.hcc-content-body img[src=""],
.hcc-content-body img:not([src]),
.hcc-content-body img[width="1"],
.hcc-content-body img[width="2"],
.hcc-content-body img[height="1"],
.hcc-content-body img[height="2"] {
    display: none !important;
}

/* Floated images */
.hcc-content-body img[align="left"],
.hcc-content-body img.align-left {
    float: left;
    margin: 6px 28px 20px 0;
    max-width: 45%;
    height: auto !important;
    display: block;
}

.hcc-content-body img[align="right"],
.hcc-content-body img.align-right {
    float: right;
    margin: 6px 0 20px 28px;
    max-width: 45%;
    height: auto !important;
    display: block;
}

/* Tables */
.hcc-content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0 28px;
    font-size: 16px;
    border: 1px solid #dde1eb;
    clear: both;
}

.hcc-content-body thead,
.hcc-content-body tr:first-child {
    background: #001a6e;
    color: #fff;
}

.hcc-content-body thead th,
.hcc-content-body tr:first-child th {
    padding: 13px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 3px solid #c9a227;
    letter-spacing: 0.3px;
    color: #fff;
}

.hcc-content-body tbody td,
.hcc-content-body td {
    padding: 12px 16px;
    border-bottom: 1px solid #eef0f6;
    color: #3a3a52;
    vertical-align: top;
    font-size: 16px;
}

.hcc-content-body tbody tr:nth-child(even) {
    background: #fafbfd;
}

/* Table wrap for mobile */
.hcc-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 22px 0 28px;
    border: 1px solid #dde1eb;
    clear: both;
    max-width: 100%;
}

.hcc-table-wrap table {
    margin: 0;
    border: none;
    min-width: 100%;
}

/* Blockquote */
.hcc-content-body blockquote {
    border-left: 5px solid #c9a227;
    background: #f8f9fc;
    padding: 18px 24px;
    margin: 24px 0;
    font-style: italic;
    color: #3a3a52;
    font-size: 18px;
    clear: both;
}

/* Iframes/videos */
.hcc-content-body iframe,
.hcc-content-body video {
    max-width: 100%;
    display: block;
    margin: 24px auto;
    border: 1px solid #dde1eb;
    clear: both;
}

/* Clearfix */
.hcc-content-body::after {
    content: '';
    display: table;
    clear: both;
}

.hcc-content-body .p_txt {
    text-align: justify;
    font-size: 18px;
    line-height: 1.9;
    color: #3a3a52;
    margin-bottom: 18px;
}

/* Legacy content sanitizer */
.hcc-content-body font {
    font-family: 'DM Sans', Arial, sans-serif !important;
    font-size: 18px !important;
    color: #3a3a52 !important;
}
.hcc-content-body center { display: block; text-align: center; }
.hcc-content-body iframe[width],
.hcc-content-body iframe[height] {
    max-width: 100% !important;
    width: 100% !important;
    aspect-ratio: 16 / 9;
    height: auto !important;
}
.hcc-content-body hr {
    border: none;
    border-top: 1px solid #dde1eb;
    margin: 24px 0;
}

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

/* Large desktop — tighter side padding, wider layout */
@media (min-width: 1600px) {
    .hcc-inner-wrap {
        padding: 0 40px;
    }
}

/* Laptop */
@media (max-width: 1400px) {
    .hcc-inner-wrap {
        padding: 0 20px;
        gap: 28px;
    }
}

@media (max-width: 1200px) {
    .hcc-inner-wrap {
        gap: 24px;
        padding: 0 18px;
    }
    .hcc-inner-wrap > aside.hcc-side-aside {
        flex: 0 0 290px;
        width: 290px;
        max-width: 290px;
        min-width: 290px;
    }
}

@media (max-width: 992px) {
    .hcc-inner-wrap {
        gap: 20px;
        padding: 0 16px;
        margin: 30px 0 50px;
    }
    .hcc-inner-wrap > aside.hcc-side-aside {
        flex: 0 0 250px;
        width: 250px;
        max-width: 250px;
        min-width: 250px;
    }

    .hcc-side__head { font-size: 19px; padding: 17px 20px; }
    .hcc-side__link { font-size: 15px; padding: 13px 20px; }

    .hcc-content-body,
    .hcc-content-body p,
    .hcc-content-body li,
    .hcc-content-body .p_txt { font-size: 17px; }

    .hcc-content-body h2 { font-size: 26px; }
    .hcc-content-body h3 { font-size: 22px; }
}

/* Mobile — stack sidebar above content */
@media (max-width: 768px) {
    .hcc-inner-wrap {
        flex-direction: column;
        gap: 18px;
        padding: 0 14px;
        margin: 22px 0 40px;
    }

    .hcc-inner-wrap > aside.hcc-side-aside {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .hcc-inner-wrap > .hcc-main-content { width: 100%; }

    .hcc-side { position: static; }
    .hcc-side__toggle { display: flex; }
    .hcc-side__nav { display: none; margin-top: 4px; }
    .hcc-side__nav.open { display: block; }

    .hcc-content-body,
    .hcc-content-body p,
    .hcc-content-body li,
    .hcc-content-body .p_txt {
        font-size: 16px;
        line-height: 1.8;
    }

    .hcc-content-body p,
    .hcc-content-body li,
    .hcc-content-body .p_txt {
        text-align: left;
        hyphens: none;
    }

    .hcc-content-body h1 { font-size: 26px; }
    .hcc-content-body h2 { font-size: 23px; }
    .hcc-content-body h3 { font-size: 19px; }
    .hcc-content-body h4 { font-size: 17px; }

    .hcc-content-body img[align="left"],
    .hcc-content-body img[align="right"],
    .hcc-content-body img.align-left,
    .hcc-content-body img.align-right {
        float: none;
        max-width: 100%;
        margin: 18px auto;
    }
}

@media (max-width: 480px) {
    .hcc-inner-wrap {
        padding: 0 10px;
        margin: 18px 0 32px;
    }

    .hcc-content-body,
    .hcc-content-body p,
    .hcc-content-body li,
    .hcc-content-body .p_txt { font-size: 15.5px; }

    .hcc-side__head { font-size: 17px; padding: 14px 18px; }
    .hcc-side__link { font-size: 14.5px; padding: 12px 18px; }
}

/* ============================================================
   HISTORY PAGE — Simple, Elegant, Content-Preserving
============================================================ */

.hcc-history-page {
    background: #ffffff;
    font-family: 'DM Sans', Arial, sans-serif;
    color: #2a2a3d;
}

/* Section title */
.hcc-history-page__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 34px;
    font-weight: 700;
    color: #001a6e;
    line-height: 1.2;
    margin: 0 0 30px;
    padding-bottom: 14px;
    padding-left: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #eef0f6;
    border-left: 5px solid #c9a227;
    position: relative;
}

.hcc-history-page__title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 18px;
    width: 80px;
    height: 4px;
    background: #c9a227;
}

/* Body */
.hcc-history-page__body {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 17px;
    line-height: 1.95;
    color: #3a3a52;
}

.hcc-history-page__body p {
    font-size: 17px;
    line-height: 1.95;
    color: #3a3a52;
    margin: 0 0 20px;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    letter-spacing: 0.1px;
}

.hcc-history-page__body p:first-child::first-letter {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 62px;
    font-weight: 700;
    color: #001a6e;
    float: left;
    line-height: 0.9;
    padding: 6px 10px 0 0;
    margin: 0;
}

.hcc-history-page__body p:last-child {
    margin-bottom: 0;
}

/* Floating image */
.hcc-history-page__img {
    float: left;
    width: 320px;
    max-width: 40%;
    height: auto;
    margin: 6px 26px 16px 0;
    padding: 6px;
    background: #ffffff;
    border: 1px solid #e2ddd0;
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0, 26, 110, 0.10);
}

/* Clearfix */
.hcc-history-page::after {
    content: '';
    display: table;
    clear: both;
}

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

@media (max-width: 992px) {
    .hcc-history-page__title {
        font-size: 28px;
        padding-left: 14px;
    }

    .hcc-history-page__title::after {
        left: 14px;
    }

    .hcc-history-page__img {
        width: 280px;
        max-width: 40%;
        margin: 4px 22px 14px 0;
    }

    .hcc-history-page__body,
    .hcc-history-page__body p {
        font-size: 16px;
        line-height: 1.9;
    }
}

@media (max-width: 768px) {
    .hcc-history-page__title {
        font-size: 24px;
        padding-left: 12px;
    }

    .hcc-history-page__title::after {
        left: 12px;
        width: 60px;
        height: 3px;
    }

    .hcc-history-page__img {
        float: none;
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0 auto 20px;
    }

    .hcc-history-page__body,
    .hcc-history-page__body p {
        font-size: 15.5px;
        line-height: 1.85;
        text-align: left;
        hyphens: none;
    }

    .hcc-history-page__body p:first-child::first-letter {
        font-size: 52px;
        padding: 4px 8px 0 0;
    }
}

@media (max-width: 480px) {
    .hcc-history-page__title {
        font-size: 21px;
        padding-left: 10px;
    }

    .hcc-history-page__title::after {
        left: 10px;
        width: 50px;
    }

    .hcc-history-page__body,
    .hcc-history-page__body p {
        font-size: 15px;
    }

    .hcc-history-page__body p:first-child::first-letter {
        font-size: 44px;
    }
}