/*
  Theme Name: CSRC WordPress
  Template: ucla-wordpress
*/

/* Disable WordPress global padding on slider */
.csrc-slider-wrapper.has-global-padding {
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.ucla-main-nav {
  z-index: 1000;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.ucla-dept-footer {
  margin-top: 0;
}

.ucla-dept-footer__logo-text {
  text-wrap: nowrap;
  line-height: initial;
}

@media (max-width: 535px) {
  .ucla-dept-footer__logo-text {
    font-size: 1.25rem;
  }
}

@media (max-width: 470px) {
  .ucla-dept-footer__logo-text {
    font-size: 1.125rem;
  }
}

@media (max-width: 438px) {
  .ucla-dept-footer__logo-text {
    font-size: 1rem;
  }
}

/* Events Grid */

.grid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-auto-rows: 200px;
  grid-gap: 3em;
}

.grid-gallery img {
  object-fit: cover;
}

.grid-gallery a {
  text-decoration: none;
}

.grid-gallery a:hover {
  color: initial;
  background-color: initial;
}

.card-title {
  opacity: 0;
  display: none;
}

.grid-item {
  background-color: black;
  box-shadow: 0 10px 20px -6px rgba(6, 14, 58, 0.1);
}

/*** Header ***/

.csrc-header {
  position: fixed !important;
  top: 0;
  width: 100%;
  background-color: white;
  border-width: 0 0 1px;
  border-bottom-color: #eef0f2;
  z-index: 100;
}

.csrc-header--school__logo-link {
  transform: scale(1);
  transform-origin: left center;
  transition: all 0.2s ease-in-out;
}

.csrc-main-nav {
  margin-top: 1.25rem;
  animation: all 0.2s ease-in-out;
}

.top-border {
  height: 11px;
  width: 100%;
  background-color: #2274ae;
  transition: all 0.2s ease-in-out;
}

.csrc-col-container {
  padding: 1rem;
  margin-left: 6em !important;
}

.csrc-right-col {
  display: flex;
  flex-direction: column;
  margin-left: -10rem !important;
  margin-top: 5rem !important;
}

.csrc-right-col-card {
  background-color: #fbfbfb !important;
  padding-top: 2rem;
  padding-right: 2rem;
  padding-bottom: 2rem;
  padding-left: 2rem;
  margin: 0 !important;
  padding: 4rem;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.11), 0 2px 2px rgba(0, 0, 0, 0.11), 0 4px 4px rgba(0, 0, 0, 0.11), 0 6px 8px rgba(0, 0, 0, 0.11), 0 8px 16px rgba(0, 0, 0, 0.11);
}

.csrc-image-dec-container::after {
  position: absolute;
  content: '';
  height: 1px;
  background-color: #fff;
  top: 1em;
}

.card-sm-container {
  display: flex;
  flex-flow: column wrap;
  align-items: center;
  justify-content: space-between;
}

.card-sm {
  height: 200px;
  background-color: #2274ae;
  color: #fff;
}

/* Utility Styles */
p {
  line-height: 1.6;
}



/* HSI News Archive */


.hsi-archive {
    --hsi-primary-color: #007bff;
    --hsi-text-color: #333;
    --hsi-meta-color: #666;
    --hsi-border-color: #eee;
    --hsi-bg-light: #f5f5f5;
    --hsi-spacing-base: 1rem;
    --hsi-container-width: 1200px;
}

.hsi-archive__container {
    max-width: var(--hsi-container-width);
    margin: 150px auto 100px;
    padding: calc(var(--hsi-spacing-base) * 2);
}

.hsi-archive__header {
    margin-bottom: calc(var(--hsi-spacing-base) * 2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--hsi-spacing-base);
}

.hsi-archive__title {
    margin: 0;
    font-size: 2em;
}

.hsi-archive__sort {
    display: flex;
    align-items: center;
    gap: calc(var(--hsi-spacing-base) / 2);
}

.hsi-archive__sort-wrapper {
    position: relative;
}

.hsi-archive__sort-select {
    padding: calc(var(--hsi-spacing-base) / 2);
    border: 1px solid var(--hsi-border-color);
    border-radius: 4px;
    appearance: none;
    padding-right: calc(var(--hsi-spacing-base) * 2);
    background: white;
}

.hsi-archive__sort-arrow {
    position: absolute;
    right: var(--hsi-spacing-base);
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.hsi-news__item {
    border-bottom: 1px solid var(--hsi-border-color);
    padding: calc(var(--hsi-spacing-base) * 2) 0;
}

.hsi-news__header {
    margin-bottom: var(--hsi-spacing-base);
}

.hsi-news__title {
    margin: 0 0 calc(var(--hsi-spacing-base) / 2);
}

.hsi-news__title-link {
    color: var(--hsi-text-color);
    text-decoration: none;
}

.hsi-news__title-link:hover {
    color: var(--hsi-primary-color);
}

.hsi-news__meta {
    display: flex;
    gap: var(--hsi-spacing-base);
    color: var(--hsi-meta-color);
    font-size: 0.9em;
}

.hsi-news__excerpt {
    margin-bottom: var(--hsi-spacing-base);
}

.hsi-news__documents {
    background: var(--hsi-bg-light);
    padding: var(--hsi-spacing-base);
    margin: var(--hsi-spacing-base) 0;
    border-radius: 4px;
}

.hsi-news__documents-title {
    margin: 0 0 calc(var(--hsi-spacing-base) / 2);
    font-size: 1.1em;
}

.hsi-news__documents-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hsi-news__documents-item:not(:last-child) {
    margin-bottom: calc(var(--hsi-spacing-base) / 2);
}

.hsi-news__documents-link {
    color: var(--hsi-primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: calc(var(--hsi-spacing-base) / 2);
}

.hsi-news__documents-link:hover {
    text-decoration: underline;
}

.hsi-news__read-more {
    display: inline-flex;
    align-items: center;
    padding: calc(var(--hsi-spacing-base) / 2) var(--hsi-spacing-base);
    background: var(--hsi-primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-top: var(--hsi-spacing-base);
}

.hsi-news__read-more:hover {
    background: color-mix(in srgb, var(--hsi-primary-color) 80%, black);
}

.hsi-pagination {
    margin-top: calc(var(--hsi-spacing-base) * 2);
}

.hsi-pagination .page-numbers {
    display: flex;
    justify-content: center;
    gap: calc(var(--hsi-spacing-base) / 2);
    list-style: none;
    padding: 0;
}

.hsi-pagination .page-numbers li {
    margin: 0;
}

.hsi-pagination .page-numbers a,
.hsi-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2em;
    padding: calc(var(--hsi-spacing-base) / 4);
    border: 1px solid var(--hsi-border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--hsi-text-color);
}

.hsi-pagination .page-numbers .current {
    background: var(--hsi-primary-color);
    color: white;
    border-color: var(--hsi-primary-color);
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hsi-archive__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hsi-archive__container {
        padding: var(--hsi-spacing-base);
    }

    .hsi-news__meta {
        flex-direction: column;
        gap: calc(var(--hsi-spacing-base) / 2);
    }
}

/* Product Carousel Component */
.product-carousel {
	width: 100%;
	max-width: none !important;
    margin: none !important;
    padding: 40px 20px;
    font-family: var(--font-family-primary);
    box-sizing: border-box;
}

.product-carousel *,
.product-carousel *::before,
.product-carousel *::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

.product-carousel__header {
    margin-bottom: 40px;
}

.product-carousel__title {
    font-size: 48px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
    letter-spacing: -0.003em;
}

.product-carousel__subtitle {
    font-size: 24px;
    color: #86868b;
    font-weight: 400;
    letter-spacing: 0.007em;
}

.product-carousel__container {
    position: relative;
    overflow: hidden;
    padding: 20px 32px;
    margin: 0 -32px;
}

.product-carousel__track {
    display: flex;
    gap: 24px;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    cursor: grab;
}

.product-carousel__track:active {
    cursor: grabbing;
}

.product-carousel__item {
    min-width: 320px;
    background: #fbfbfd;
    border-radius: 20px;
    padding: 32px;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, box-shadow;
}

.product-carousel__item:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.product-carousel__image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 24px;
}

.product-carousel__item-title {
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
    letter-spacing: -0.003em;
}

.product-carousel__item-tag {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 16px;
    letter-spacing: 0.007em;
}

.product-carousel__item-price {
    font-size: 16px;
    color: #1d1d1f;
    letter-spacing: 0.007em;
}

.product-carousel__nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.product-carousel__nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d2d2d7;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-carousel__nav-dot--active {
    background: #1d1d1f;
    transform: scale(1.2);
}

@media (hover: hover) {
    .product-carousel__nav-dot:hover {
        background: #86868b;
    }
}

.product-carousel__arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    padding: 0 12px;
}

.product-carousel__arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 1;
    transform: scale(1);
}

.product-carousel__arrow--hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.product-carousel__arrow:hover {
    background: #fff;
    transform: scale(1.1);
}

.product-carousel__arrow-icon {
    width: 20px;
    height: 20px;
    fill: #1d1d1f;
    transition: transform 0.2s ease;
}

.product-carousel__arrow:hover .product-carousel__arrow-icon {
    transform: scale(1.1);
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .product-carousel {
        padding: 20px 16px;
    }

    .product-carousel__title {
        font-size: 32px;
    }

    .product-carousel__subtitle {
        font-size: 18px;
    }

    .product-carousel__container {
        padding: 16px;
        margin: 0 -16px;
    }

    .product-carousel__item {
        min-width: 280px;
        padding: 24px;
    }

    .product-carousel__image {
        height: 200px;
    }

    .product-carousel__item-title {
        font-size: 20px;
    }

    .product-carousel__arrows {
        padding: 0 8px;
    }
}

/* ============================================
   REUSABLE TEXT COMPONENTS
   ============================================ */

/* Title Block - Container with gold accent bar and breadcrumb */
.csrc-title-block {
    position: relative;
    padding-left: 20px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-right: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 32px !important;
    margin-block-start: 0 !important;
    margin-block-end: 32px !important;
}

.csrc-title-block::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #F76600;
}

/* Apply wide width to title blocks in entry content */
body:not(.page-template-page-left-sidebar, .post-tempalte-single-left-sidebar) .entry-content > .csrc-title-block,
body:not(.page-template-page-right-sidebar, .post-tempalte-single-left-sidebar) .entry-content > .csrc-title-block {
    max-width: var(--wp--style--global--wide-size);
    margin-left: auto;
    margin-right: auto;
}

/* Subtitle/Breadcrumb - Small uppercase link text */
.csrc-subtitle {
    color: #2774AE !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 14px !important;
    letter-spacing: 0.025em !important;
    line-height: 1.4 !important;
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
    margin-block-start: 0 !important;
    margin-block-end: 1rem !important;
    font-family: var(--font-family-primary) !important;
}

/* Subtitle link styling */
.csrc-subtitle a,
.csrc-subtitle-link {
    color: #2774AE !important;
    text-decoration: none !important;
    transition: opacity 0.2s ease !important;
}

.csrc-subtitle a:hover,
.csrc-subtitle-link:hover {
    opacity: 0.8;
    text-decoration: underline !important;
}

/* Page Title - Large H1 heading */
.csrc-page-title {
    font-size: clamp(28px, 4vw, 42px) !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    line-height: 1.1 !important;
    letter-spacing: -0.01em !important;
    font-family: var(--font-family-primary) !important;
    margin: 0 !important;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}

/* CSRC Text - Reusable text component that auto-styles children */
.csrc-text {
    font-size: 17px !important;
    line-height: 1.7 !important;
    color: #000000 !important;
    font-family: var(--font-family-primary) !important;
    font-weight: 400 !important;
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
    margin-block-end: 1rem !important;
}

.csrc-text:last-child {
    margin-bottom: 0 !important;
    margin-block-end: 0 !important;
}

/* Apply wide width to CSRC text in entry content */
body:not(.page-template-page-left-sidebar, .post-tempalte-single-left-sidebar) .entry-content > .csrc-text,
body:not(.page-template-page-right-sidebar, .post-tempalte-single-left-sidebar) .entry-content > .csrc-text {
    max-width: var(--wp--style--global--wide-size);
    margin-left: auto;
    margin-right: auto;
}

/* Auto-style links within CSRC text */
.csrc-text a {
    color: #2774AE !important;
    text-decoration: underline !important;
    font-family: var(--font-family-primary) !important;
    transition: color 0.2s ease !important;
}

.csrc-text a:hover {
    color: #d4651a !important;
    text-decoration: underline !important;
}

.csrc-text a:focus {
    outline: 2px solid #d4651a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Auto-style strong and em within CSRC text */
.csrc-text strong {
    font-weight: 700 !important;
}

.csrc-text em {
    font-style: italic;
}

/* CSRC Section Title */
.csrc-section-title {
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    color: #1a1a1a !important;
    font-family: var(--font-family-primary) !important;
    letter-spacing: -0.01em !important;
    margin-bottom: 1rem !important;
    position: relative;
    padding-left: 20px !important;
}

.csrc-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #F76600;
}

/* Apply wide width to CSRC section titles in entry content */
body:not(.page-template-page-left-sidebar, .post-tempalte-single-left-sidebar) .entry-content > .csrc-section-title,
body:not(.page-template-page-right-sidebar, .post-tempalte-single-left-sidebar) .entry-content > .csrc-section-title {
    max-width: var(--wp--style--global--wide-size);
    margin-left: auto;
    margin-right: auto;
}

/* CSRC Link - Standalone link component */
.csrc-link {
    color: #2774AE !important;
    text-decoration: underline !important;
    font-family: var(--font-family-primary) !important;
    transition: color 0.2s ease !important;
}

.csrc-link:hover {
    color: #d4651a !important;
    text-decoration: underline !important;
}

.csrc-link:focus {
    outline: 2px solid #d4651a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Address Component */
.csrc-address {
    font-style: normal !important;
    margin-bottom: 1rem !important;
    margin-block-end: 1rem !important;
}

.csrc-address p {
    font-size: 17px !important;
    line-height: 1.7 !important;
    color: #000000 !important;
    font-family: var(--font-family-primary) !important;
    margin: 0 !important;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}

.csrc-address strong {
    font-weight: 700 !important;
}

/* Apply wide width to address in entry content */
body:not(.page-template-page-left-sidebar, .post-tempalte-single-left-sidebar) .entry-content > .csrc-address,
body:not(.page-template-page-right-sidebar, .post-tempalte-single-left-sidebar) .entry-content > .csrc-address {
    max-width: var(--wp--style--global--wide-size);
    margin-left: auto;
    margin-right: auto;
}

/* Grid Component - Multi-column layout for cards/staff */
.csrc-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
    margin-block-end: 1rem !important;
}

/* Apply wide width to grid in entry content */
body:not(.page-template-page-left-sidebar, .post-tempalte-single-left-sidebar) .entry-content > .csrc-grid,
body:not(.page-template-page-right-sidebar, .post-tempalte-single-left-sidebar) .entry-content > .csrc-grid {
    max-width: var(--wp--style--global--wide-size);
    margin-left: auto;
    margin-right: auto;
}

/* Card Component - Bordered container for staff/content */
.csrc-card {
    padding: 2rem !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    background-color: transparent !important;
}

body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)).csrc-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Card Title - Name or primary heading */
.csrc-card-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    color: #1a1a1a !important;
    font-family: var(--font-family-primary) !important;
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
    margin-block-start: 0 !important;
    margin-block-end: 1rem !important;
}

/* Card Subtitle - Role or secondary text */
.csrc-card-subtitle {
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #000000 !important;
    font-family: var(--font-family-primary) !important;
    font-weight: 400 !important;
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
    margin-block-start: 0 !important;
    margin-block-end: 1.5rem !important;
}

.csrc-card-subtitle:last-child {
    margin-bottom: 0 !important;
    margin-block-end: 0 !important;
}

/* Responsive adjustments */
@media (max-width: 960px) {
    .csrc-grid,
    .wp-block-group.csrc-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .csrc-page-title {
        font-size: 28px !important;
    }

    .csrc-text {
        font-size: 16px !important;
    }

    .csrc-section-title {
        font-size: 20px !important;
        padding-left: 16px !important;
    }

    .csrc-title-block {
        padding-left: 16px !important;
    }

    .csrc-grid,
    .wp-block-group.csrc-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .csrc-card {
        padding: 2rem !important;
    }
}

@media (max-width: 480px) {
    .csrc-page-title {
        font-size: 20px !important;
    }

    .csrc-section-title {
        font-size: 17px !important;
    }
}

/* ============================================
   GLOBAL OVERRIDES
   Absorbed from assets/css/design-system/overrides/
   These are structural overrides applied on every page,
   not tied to shortcodes — they override the theme's own
   structural CSS and the UCLA parent theme.
   ============================================ */

/* --- accessibility.css ---
   Suppress the focus outline for POINTER / programmatic focus only. Keyboard focus
   (:focus-visible) keeps a visible ring — see the global baseline in
   assets/css/focus.css. Previously this stripped every focus outline unconditionally,
   which removed the keyboard indicator site-wide and failed WCAG 2.4.7 (Focus Visible). */
[contentEditable=true]:focus:not(:focus-visible),
[href]:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible),
iframe:focus:not(:focus-visible) {
    outline: none !important;
}

/* --- global/body.css ---
   Adds padding-top to <body> matching header height at each breakpoint
   so content isn't hidden behind the fixed header. */
body {
    padding-top: 87px;
}

@media (min-width: 768px) {
    body {
        padding-top: 87px;
    }
}

@media (min-width: 960px) {
    body {
        padding-top: 152px !important;
    }
}

/* --- global/header.css ---
   Sets header z-index, height at breakpoints, admin-bar offsets,
   and resets .ucla-header__container padding. */
.ucla-header__container {
    margin-inline: auto;
    padding-left: 0;
    padding-right: 0;
}

.csrc-header {
    z-index: 100;
    height: 87px;
    top: 0 !important;
}

@media (min-width: 768px) {
    .csrc-header {
        height: 87px;
    }
}

@media (min-width: 960px) {
    .csrc-header {
        height: 152px;
    }
}

/* Admin bar offset — uses custom property set by navigation.js on scroll */
.admin-bar .csrc-header {
    top: var(--admin-bar-offset, 0px) !important;
}

/* --- global/admin-bar.css ---
   Offsets sticky header top position when the WP admin bar is present. */
@media screen and (max-width: 782px) {
    .admin-bar .csrc-sticky-header,
    .admin-bar .ucla-header.csrc-sticky-header {
        top: 46px !important;
    }
}

@media screen and (min-width: 783px) {
    .admin-bar .csrc-sticky-header,
    .admin-bar .ucla-header.csrc-sticky-header {
        top: 32px !important;
    }
}

/* --- global/skip-nav.css ---
   Accessible skip-to-content link, visually hidden until focused. */
.skip-nav__link {
    position: fixed !important;
    top: 0;
    left: 0;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    z-index: 10000;
    white-space: nowrap;
    overflow: hidden;
    padding: 0.5rem 1rem;
}

.skip-nav__link:focus {
    clip: auto;
    clip-path: none;
    width: auto;
    height: auto;
    background-color: #00598c;
    color: #ffffff;
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

