@import url('theme.css');

:root {
  --navbar-height: 108px;
}

h1, h2 {
    text-transform: uppercase;
}

h1, h2, h3, h4, h5, h6 {
     color: var(--brand-primary);
}

.navbar {
    background: linear-gradient(135deg, var(--brand-primary), var(--light-blue));
}

.navbar-logo {
    max-height: 50px;
    height: auto;
    width: auto;
}

.subheader {
    color: #c6e8ff;
}

/* MASTHEAD */

.masthead {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: calc(1.5rem + var(--navbar-height));
    padding-bottom: 2rem;
}

.masthead.with-image {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    
    .masthead-heading, .masthead-subtitle {
        color: white;
    }
}

.masthead.no-image {
    min-height: 20vh;

    .masthead-heading, .masthead-subtitle {
        color: var(--brand-primary);
    }
}

.masthead .container {
    position: relative;
    z-index: 2;
}

.masthead-heading {
    font-size: 2rem;
    line-height: 2.4rem;
    font-weight: bold;
    margin-bottom: 0;
}

.masthead-subtitle {
    font-size: 1.2rem;
    margin-top: 10px;
}

@media (min-width: 768px) {
  .masthead {
    min-height: 30vh;
    padding-top: calc(1rem + var(--navbar-height));
    padding-bottom: 2rem;
  }

  .masthead-heading {
    font-size: 2.5rem;
    line-height: 3rem;
  }

  .masthead-subtitle {
    font-size: 1.2rem;
    line-height: 0;
  }
}

/* 💻 Desktop ≥992px */
@media (min-width: 992px) {
    .masthead {
        min-height: 40vh;
        padding-top: calc(1.5rem + var(--navbar-height));
        padding-bottom: 2.2rem;
    }

    .masthead-heading {
        font-size: 3rem;
        line-height: 3.5rem;
    }

    .masthead-subtitle {
        font-size: 1.5rem;
        line-height: 0;
    }
}

/* 🖥️ Large desktop ≥1200px */
@media (min-width: 1200px) {
    .masthead {
        min-height: 60vh;
        padding-top: calc(2rem + var(--navbar-height));
        padding-bottom: 2.5rem;
    }

    .masthead-heading {
        font-size: 4rem;
        line-height: 4.5rem;
    }

    .masthead-subtitle {
        font-size: 2rem;
        line-height: 0;
    }
}

/* Need to remove bootstrap table styles that interfere */
.rte-content table * {
    --bs-table-accent-bg: transparent !important;
}

.rte-content table {
    font-family: inherit !important;
    font-size: inherit !important;
    text-align: inherit !important;
}

.rte-content table td,
.rte-content table th {
    font-family: inherit !important;
    font-size: inherit !important;
    text-align: inherit !important;
}

/* CALL TO ACTION */

.cta-card {
    background: linear-gradient(135deg, var(--brand-primary), var(--light-blue));
    color: white;
    border-radius: 1rem;
    box-shadow: 0 6px 16px var(--shadow);
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
}

.cta-card-footer {
    margin-top: 1.5rem;
}

/* On mobile cap the CTA card width so there's 2rem of breathing room on each side (margin: auto keeps it centered) */
@media (max-width: 767.98px) {
    .cta-card {
        max-width: calc(100% - 4rem);
    }
}

/* Scoped overrides: only shrink title/rich-text spacing inside the CTA, leave the shared classes untouched everywhere else */
.cta-card-body .page-section-heading {
    margin-bottom: 0.5rem !important;
}

.cta-card-body .rte-content {
    margin-top: 0.5rem 0;
    margin-bottom: 2rem;
    padding: 0;
}

.cta-btn {
    border-radius: 1rem;
    border: 2px solid white;
    background: transparent;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    background: white;
    color: var(--brand-primary);
}

.cta-icon {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
}

.cta-icon-mask {
    display: inline-block;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
}

/* Icon Link / Social Icon */

.social-icon {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    vertical-align: middle;
}

/* Rich Text Editor Styles */

.rte-content {
    padding: 1.5rem; 
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    position:relative;
}

.rte-background {
    background: rgba(4, 178, 217, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 2px 5px 5px rgba(0, 0, 0, 0.08);
}

.rte-frames {
    border: 2px solid var(--brand-secondary);
    border-radius: 0.75rem;
}

.rte-frames-offset {
    position: relative;
}

.rte-frame-offset::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: 5px;
    bottom: 5px;
    border: 3px solid var(--brand-primary);
    border-radius: 0.5rem;
    z-index: -2;
}

.rte-frame-offset::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--brand-secondary);
    border-radius: 0.5rem;
    z-index: -1;
}

/* RTE TABLES */

.rte-content table {
    width: auto;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
    display: table;
}

.rte-content th,
.rte-content td {
    padding: 0.6rem 1rem;
    white-space: nowrap;
    border: 1px solid #ddd;
    text-align: left;
}

.rte-content th {
    background: #0077b6;
    color: #fff !important;
    font-weight: 600;
}

.rte-content tr:nth-child(even) td {
    background: #f1faff;
}

.rte-content tr:nth-of-type(odd) td {
    background: #fff !important;
    color: #222 !important;
}

.rte-content tr:hover td {
    background: #e0f3ff;
}

/* IMAGE WITH CAPTION */

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px 0;
}

.image-with-caption {
    max-width: 100%;
    text-align: center;
}

.image-with-caption img {
    display: block;
    margin: 0 auto;
    max-height: 400px;
    width: auto;
}

.image-with-caption p {
    margin-top: 10px;
    margin-bottom: 0;
}

/* COURSES */

.course-card {
    background: linear-gradient(135deg, var(--brand-primary), var(--light-blue));
    border: none;
    border-radius: 1rem;
    color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 6px 16px var(--shadow);
    max-width: 360px;
    width: 100%;
    height: 100%;
}

.course-card .card-title {
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 0 1px 2px var(--shadow);
}

.course-card h3 {
    font-size: 1.3rem;    
    color: white;
}

.course-card .card-footer .btn {
    width: 100%;
    border-radius: 0 0 1rem 1rem;
    border: 2px solid white;
    background: transparent;
    color: white;
    font-weight: 600;
    padding: 1rem;
    transition: all 0.3s ease;
}

.course-card .card-footer .btn:hover {
    background: white;
    color: #005f99;
}

/* TRIPS */

.trip-card {
    background: white;
    border: 2px solid var(--brand-secondary);
    border-radius: 0.5rem;
    padding: 1rem;
    width: 100%;
    height: 100%;
}

.trip-card-title {
    font-size: 1.2rem;
    color: var(--brand-primary);
    font-weight: bold;
}

.collapse.show.schema-preview {
    max-height: none;
}

    .collapse.show.schema-preview::after {
        display: none;
    }

@media (min-width: 992px) {
    .schema-preview {
        max-height: 340px;
    }
}

/* FOOTER */

.footer {
  padding-top: 2rem;
  padding-bottom: 2rem;
  background-color: #2c3e50;
  color: white;
}

.footer h4 {
    color: white;
}

.copyright {
  background-color: #1a252f;
}