/* Investor Relations — page styles */

.investors-page {
    /* --ir-navy now tracks the theme-sensitive page text colour (it was only
       ever used as text-on-light-surface here, never as a fixed background —
       the one exception, the disclaimer modal header, uses var(--navy)
       directly). Everything else defers to the shared theme tokens too. */
    --ir-navy: var(--page-text);
    --ir-orange: #f58220;
    --ir-paper: var(--page-bg);
    --ir-muted: rgba(var(--ink), .65);
    --ir-border: rgba(var(--ink), 0.1);
    --ir-header-offset: 84px;
    --ir-sticky-stack: 160px;
    /* Room so last tabs (Governance / Contact) can scroll under sticky bars */
    padding-bottom: min(42vh, 360px);
}

.investors-page .section-header {
    margin-bottom: 1.75rem;
}

.investors-page .section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ir-orange);
    margin-bottom: 0.5rem;
}

.investors-page .section-header h2 {
    font-family: var(--font-display, Outfit, sans-serif);
    font-size: calc(clamp(1.5rem, 3vw, 2.1rem) * var(--a11y-font-scale, 1));
    font-weight: 800;
    color: var(--ir-navy);
    margin: 0;
}

.ir-hero .section-tag {
    color: var(--ir-orange);
}

.ir-hero {
    background: linear-gradient(135deg, #121c33 0%, #182544 55%, #243556 100%);
    color: #fff;
    padding: 7.5rem 0 3.5rem;
}

.ir-hero-compact {
    padding: 6.5rem 0 2.25rem;
}

.ir-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.ir-breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.ir-breadcrumb a:hover {
    color: var(--ir-orange);
}

.ir-hero-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 992px) {
    .ir-hero-grid {
        grid-template-columns: 1.2fr 0.8fr;
        align-items: end;
    }
}

.ir-hero-content h1 {
    font-family: var(--font-display, Outfit, sans-serif);
    font-size: calc(clamp(2rem, 5vw, 3.25rem) * var(--a11y-font-scale, 1));
    font-weight: 800;
    margin: 0.5rem 0 1rem;
}

.ir-hero-content p {
    max-width: 36rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
    margin: 0;
    font-size: calc(1rem * var(--a11y-font-scale, 1));
}

.ir-ticker-cards {
    display: grid;
    gap: 0.85rem;
}

.ir-ticker-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 1rem 1.15rem;
    backdrop-filter: blur(6px);
}

.ir-ticker-card img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    padding: 6px;
}

.ir-ticker-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.25rem;
}

.ir-ticker-price {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Sticky nav — sits under site header (same as About) */
.ir-nav {
    position: sticky;
    top: 80px;
    z-index: 100;
    background: rgba(var(--surface-rgb), 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(var(--ink), .08);
    box-shadow: 0 8px 24px rgba(var(--ink), 0.04);
}

body.mobile-nav-open .ir-nav {
    z-index: 1;
    pointer-events: none;
}

/* Land section titles below site header + IR tabs (same stack as About: ~140px) */
.ir-section,
#FY-highlights,
#investor-relations {
    scroll-margin-top: 140px;
}

.investors-page .ir-section > .container > .section-header,
.investors-page .ir-contact-card > .section-header,
#FY-highlights .section-header {
    scroll-margin-top: 140px;
}

/* Tabs overflow: keep trailing items (e.g. Corporate Governance) reachable */
.ir-nav .container {
    position: relative;
}

.ir-nav .container::before,
.ir-nav .container::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 36px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ir-nav .container::before {
    left: 12px;
    background: linear-gradient(90deg, var(--surface) 15%, rgba(var(--surface-rgb), 0));
}

.ir-nav .container::after {
    right: 12px;
    background: linear-gradient(270deg, var(--surface) 15%, rgba(var(--surface-rgb), 0));
}

.ir-nav.can-scroll-left .container::before,
.ir-nav.can-scroll-right .container::after {
    opacity: 1;
}

.ir-tabs {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--ink), 0.25) transparent;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.ir-tabs::-webkit-scrollbar {
    height: 4px;
}

.ir-tabs::-webkit-scrollbar-thumb {
    background: rgba(var(--ink), 0.25);
    border-radius: 4px;
}

.ir-tab-link {
    position: relative;
    display: block;
    flex: 0 0 auto;
    padding: 18px 14px;
    color: var(--ir-navy);
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    font-size: 0.92rem;
    transition: 0.3s;
    border: 0;
    background: transparent;
    border-radius: 0;
}

.ir-tab-link:hover,
.ir-tab-link.active {
    color: var(--orange, #f58220);
    background: transparent;
}

.ir-tab-link.active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 3px;
    background: var(--orange, #FF9A4A);
    border-radius: 50px 50px 0 0;
}

/* Highlights */
.ir-highlights-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .ir-highlights-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .ir-highlights-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.ir-highlight-card {
    border-radius: 16px;
    padding: 1.35rem 1.2rem;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.35rem;
}

.ir-highlight-odd {
    background: linear-gradient(160deg, #f58220 0%, #d9650c 100%);
    color: #fff;
}

.ir-highlight-even {
    background: var(--surface);
    border: 1px solid var(--ir-border);
    color: var(--ir-navy);
    box-shadow: 0 10px 24px rgba(var(--ink), 0.06);
}

.ir-highlight-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.ir-highlight-card strong {
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    font-weight: 800;
    line-height: 1.2;
}

.ir-highlight-yoy {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Split section layout */
.ir-split {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 992px) {
    .ir-split {
        grid-template-columns: 280px 1fr;
        align-items: start;
    }
}

.ir-subcat-nav {
    background: var(--surface);
    border: 1px solid var(--ir-border);
    border-radius: 16px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 520px;
    overflow: auto;
}

.ir-subcat-btn.nav-link {
    text-align: left;
    border-radius: 10px;
    border: 0;
    color: var(--ir-navy);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.75rem 0.9rem;
    white-space: normal;
}

.ir-subcat-btn.nav-link:hover,
.ir-subcat-btn.nav-link.active {
    background: rgba(245, 130, 32, 0.12);
    color: var(--ir-navy);
}

.ir-panel {
    background: var(--surface);
    border: 1px solid var(--ir-border);
    border-radius: 16px;
    padding: 1.15rem 1.25rem 1.35rem;
    min-height: 280px;
}

.ir-panel-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--ir-border);
}

.ir-subcat-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ir-navy);
}

.ir-year-select {
    min-width: 150px;
    border: 1px solid var(--ir-border);
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    color: var(--ir-navy);
    background: var(--surface);
}

.ir-annual-head {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

/* Document rows — keep JS class names */
.ir-doc-list,
.corporate_box_inner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pdf_file {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--ir-border);
    border-radius: 12px;
    background: var(--page-bg);
}

.pdf-images,
.pdf-image {
    flex: 0 0 auto;
}

.pdf-img {
    width: 36px;
    height: 36px;
}

.document-texts,
.document-text {
    flex: 1 1 180px;
    min-width: 0;
}

.document-texts h4,
.document-text h4 {
    margin: 0 0 0.25rem;
    font-size: calc(0.95rem * var(--a11y-font-scale, 1));
    font-weight: 700;
    color: var(--ir-navy);
    line-height: 1.35;
}

.document-texts p,
.document-text p {
    margin: 0;
    font-size: calc(0.8rem * var(--a11y-font-scale, 1));
    color: var(--ir-muted);
}

.downloads,
.download {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: auto;
}

.pdf-downlaod,
.view-pdf {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--ir-border);
    color: var(--ir-navy);
    background: var(--surface);
    cursor: pointer;
}

.pdf-downlaod:hover,
.view-pdf:hover {
    border-color: var(--ir-orange);
    color: var(--ir-orange);
}

.pdf-imgs,
.view-img {
    width: 16px;
    height: 14px;
}

.scroll-css {
    max-height: 480px;
    overflow: auto;
    padding-right: 0.25rem;
}

/* Contact */
.ir-contact-section {
    background: var(--page-bg);
    color: #fff;
    padding: 3rem 0 4rem;
}

.ir-contact-card {
    background: #1c1e3b;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem 2.25rem;
    box-shadow: 0 16px 40px rgba(24, 37, 68, 0.12);
}

.investors-page .ir-contact-card .section-header {
    margin-bottom: 1.25rem;
}

.investors-page .ir-contact-card .section-tag {
    color: var(--ir-orange);
    background: transparent;
    padding: 0;
}

.investors-page .ir-contact-card .section-header h2,
.ir-contact-card h2 {
    color: #fff !important;
}

.ir-contact-body {
    margin-top: 0.5rem;
    line-height: 1.7;
    color: #fff;
}

.ir-contact-body,
.ir-contact-body p,
.ir-contact-body span,
.ir-contact-body li,
.ir-contact-body h1,
.ir-contact-body h2,
.ir-contact-body h3,
.ir-contact-body h4,
.ir-contact-body strong,
.ir-contact-body div {
    color: #fff;
}

.ir-contact-body a {
    color: #ffd2a8;
    text-decoration: underline;
}

.ir-html-content {
    color: var(--ir-navy);
    line-height: 1.65;
}

/* This content is admin-authored rich text fetched from the DB and injected
   via innerHTML — it often carries inline colors/backgrounds baked in by a
   WYSIWYG editor (or pasted from Word/Docs) that bypass the theme entirely.
   Force it to follow the page theme instead of whatever it shipped with. */
.ir-html-content *,
.ir-html-content *[style] {
    background-color: transparent !important;
    color: inherit !important;
}

/* PDF viewer */
.ir-pdf-title {
    font-size: clamp(1.25rem, 3vw, 1.85rem);
    font-weight: 700;
    margin: 0;
}

.ir-pdf-frame-wrap {
    border: 1px solid var(--ir-border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
    min-height: 70vh;
}

.ir-pdf-frame {
    width: 100%;
    height: 75vh;
    border: 0;
}

/* Disclaimer modals */
#discliamerModal .modal-content,
#discliamerModalFinal .modal-content {
    border-radius: 14px;
    border: 0;
}

#discliamerModal .modal-header,
#discliamerModalFinal .modal-header {
    background: var(--navy);
    color: #fff;
}

#discliamerModal .btn-close,
#discliamerModalFinal .btn-close {
    filter: invert(1);
}

#discliamerModal .disclaimer-body,
#discliamerModalFinal .disclaimer-body {
    max-height: 55vh;
    overflow: auto;
    font-size: 0.9rem;
    line-height: 1.55;
}

#disclosure_agree,
#disclosure_final_agree {
    background: var(--ir-orange);
    border: 0;
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
}

@media (max-width: 991.98px) {
    .investors-page {
        --ir-header-offset: 72px;
        --ir-sticky-stack: 140px;
        overflow-x: clip;
        width: 100%;
        max-width: 100%;
    }

    .ir-hero {
        padding: 5.5rem 0 2.25rem;
    }

    .ir-hero-content h1 {
        font-size: calc(clamp(1.65rem, 7vw, 2.25rem) * var(--a11y-font-scale, 1));
        word-break: break-word;
    }

    .ir-hero-content p {
        font-size: calc(0.95rem * var(--a11y-font-scale, 1));
        max-width: none;
    }

    .ir-ticker-card {
        padding: 0.85rem 1rem;
    }

    .ir-ticker-card img {
        width: 48px;
        height: 48px;
    }

    .ir-nav .container {
        padding-inline: 0.75rem;
    }

    .ir-tab-link {
        padding: 14px 12px;
        font-size: 0.84rem;
    }

    /* Subcategory pills scroll horizontally on tablet/mobile */
    .ir-subcat-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
        gap: 0.4rem;
        padding: 0.55rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .ir-subcat-btn.nav-link {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 0.6rem 0.85rem;
        font-size: 0.82rem;
    }

    .ir-panel {
        padding: 1rem;
        min-height: 0;
    }

    .ir-panel-head {
        flex-direction: column;
        align-items: stretch;
    }

    .ir-year-select,
    .ir-year-wrap,
    #annual_report_year {
        width: 100%;
        min-width: 0;
    }

    .ir-annual-head {
        flex-direction: column;
        align-items: stretch;
    }

    .scroll-css {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .ir-highlights-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .investors-page {
        --ir-header-offset: 64px;
        --ir-sticky-stack: 128px;
        padding-bottom: min(28vh, 220px);
    }

    .ir-hero {
        padding: 4.75rem 0 1.75rem;
    }

    .ir-breadcrumb {
        font-size: 0.78rem;
        margin-bottom: 1rem;
    }

    .ir-tab-link {
        padding: 12px 10px;
        font-size: 0.8rem;
    }

    .ir-highlights-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .ir-highlight-card {
        padding: 1.1rem 1rem;
    }

    .ir-contact-card {
        padding: 1.25rem 1rem;
    }

    .ir-contact-section {
        padding: 2rem 0 2.5rem;
    }

    .pdf_file {
        flex-direction: column;
        align-items: flex-start;
    }

    .downloads,
    .download {
        margin-left: 0;
        width: 100%;
    }

    .pdf-downlaod,
    .view-pdf {
        flex: 1 1 auto;
        justify-content: center;
    }

    /* .pdf_file stacks here, so any flex-basis on the text block would become a
       minimum height and leave a tall gap above the action buttons. */
    .document-texts,
    .document-text {
        width: 100% !important;
        flex: 0 1 auto;
    }

    .investors-page .section-header h2 {
        font-size: calc(clamp(1.35rem, 6vw, 1.75rem) * var(--a11y-font-scale, 1));
    }
}
