/*======================================================================
  CCB Website Custom CSS
======================================================================*/


/*======================================================================
  1. VARIABLES
======================================================================*/

:root {
    /* CCB colors */
    --ccb-blue: #002d72;
    --ccb-light-blue: #68ace5;
    --ccb-white: #ffffff;
    --ccb-yellow: #fdb515;

    /* Other site colors */
    --search-yellow: #ffeb3b;
    --table-gray: #d6d8da;
}

/*======================================================================
  2. BASE
======================================================================*/

/* Default page font and line spacing */
body {
    font-family: "Inter", sans-serif;
    line-height: 1.6;
}

/*======================================================================
  3. HEADER / NAVBAR
======================================================================*/

/* Main navigation bar */
.navbar {
    background-color: var(--ccb-blue) !important;
}

/* Navigation links */
.bd-header .nav-item .nav-link {
    color: var(--ccb-light-blue) !important;
    font-weight: 700;
}

/* Add separators between navigation links */
.bd-header .nav-item:not(:last-child) .nav-link::after {
    content: " |";
    color: var(--ccb-white);
    margin-left: 10px;
}

/* Enlarge the navbar logo */
.bd-header .navbar-brand img {
    transform: scale(1.5);
}

/* Announcement bar */
.bd-header-announcement {
    background-color: var(--ccb-light-blue) !important;
    color: var(--ccb-white) !important;
}

/* Announcement text */
.bd-header-announcement__content,
.announcement {
    color: var(--search-yellow);
}

.svg-inline--fa {
    color: var(--ccb-light-blue);
}


/*======================================================================
  4. SITE HEADER / FOOTER
======================================================================*/

/* Additional site header */
.site-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;

    background-color: var(--ccb-blue) !important;
    color: var(--ccb-white) !important;
}

/* Footer container */
.site-footer {
    display: flex !important;
    flex-direction: column !important;

    width: 100% !important;

    background-color: var(--ccb-blue);
    color: var(--ccb-white);
}

/* Footer top row */
.site-footer > div:first-child {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 25px;
    flex-wrap: wrap;
}

/* Footer bottom row */
.site-footer > div:nth-child(2) {
    display: flex;
    justify-content: center;
    align-items: flex-start;

    gap: 60px;
    margin-top: 20px;

    font-size: 0.85rem;
    line-height: 1.25;
}

/* Footer text */
.site-footer > div:nth-child(2) > span {
    display: block;
    text-align: left;
}

.site-footer img {
    width: clamp(80px, 25vw, 200px);
    height: auto;
}

/*======================================================================
  5. CONTENT
======================================================================*/

/*
   Remove PyData's default content width restrictions.
*/
.bd-main,
.bd-content,
.bd-article-container,
.bd-article {
    width: 100% !important;
    max-width: none !important;
}

/*======================================================================
  6. TYPOGRAPHY
======================================================================*/

/* Justify paragraphs on large screens */
@media (min-width: 1200px) {
    .bd-content p {
        text-align: justify;
    }
}

/*======================================================================
  7. SEARCH
======================================================================*/

/* Highlight matching search terms */
mark,
.highlighted,
.search li em,
span.highlight {
    background-color: var(--search-yellow) !important;
    color: var(--ccb-white) !important;

    padding: 2px 3px;
    border-radius: 3px;
}


/*======================================================================
  8. TABLES
======================================================================*/

/* Table layout and alignment */
table.docutils {
    margin-inline: 0 auto !important;
    text-align: left;
}

/* Align table content to the top-left */
table.docutils th,
table.docutils td,
.responsive-table th,
.responsive-table td {
    text-align: left !important;
    vertical-align: top;
}

/* Alternate row background color */
table.docutils tbody tr:nth-child(even) {
    background-color: var(--table-gray);
}


/*======================================================================
  9. CARDS
======================================================================*/

/* Reduce text size inside cards */
.sd-card-text,
.sd-card-text p {
    /*font-size: 0.9rem !important;*/
    /*font-size: clamp(0.7rem, 2vw, 0.9rem);*/ /*11.2px fonts* too small*/
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/*======================================================================
  10. HERO
======================================================================*/

/* Hero image container */
.hero-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Hero image */
.hero-banner img {
    display: block;
    width: 100%;
    height: auto;
}

/*
.hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(
        to right,
        rgba(50, 50, 200, 1) 0%,
        rgba(50, 50, 200, 0.7) 30%,
        rgba(50, 50, 200, 0.2) 60%,
        transparent 100%
    );
}
*/

/* Text displayed over the hero image */
.hero-text {
    position: absolute;

    top: 20%;
    left: 5%;
    width: 60%;

    box-sizing: border-box;

    color: var(--ccb-white);
    font-size: clamp(0.8rem, 3vw, 2rem);
    line-height: 1.2;
    text-align: left;

    /* Prevent long words from overflowing */
    overflow-wrap: break-word;

    /* Semi-transparent CCB blue background */
    background: rgba(0, 45, 114, 0.5);

    /* CCB-style accent borders */
    border-left: 3px solid var(--ccb-yellow); 
    border-bottom: 3px solid var(--ccb-yellow);

    /*padding: 8px 16px;*/

    /* Improve readability over the image */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}


/*======================================================================
  11. RESPONSIVE DESIGN
======================================================================*/

/* Mobile */
@media (max-width: 768px) {

    /* Hide elements specifically marked for mobile */
    .hide-mobile {
        display: none !important;
    }

    /* Make hero text wider on small screens */
    .hero-text {
        width: 80%;
    }

    /* Hide columns 4 and 5 in responsive tables */
    table.responsive-table th:nth-child(4),
    table.responsive-table td:nth-child(4),
    table.responsive-table th:nth-child(5),
    table.responsive-table td:nth-child(5) {
        display: none;
    }
}


/*======================================================================
  12. MISCELLANEOUS
======================================================================*/

/* Hide paragraphs containing links to Python source files */
p:has(a[href$=".py"]) {
    display: none;
}


/*======================================================================
  END
======================================================================*/

/* Example classes */

.my-example-class{
    color: red;
}

h2.my-example-class {
    color: pink !important;
}