/**
 * CED Careers Media Library Page Styles
 * Styles for the internal media library page template
 */

/* ===== GLOBAL STYLES FOR MEDIA PAGE ===== */
body.ced-media-page,
.ced-media-page {
  overflow-x: hidden;
  background: transparent;
  margin-top: -90px;
  padding-top: 0;
}

/* Override global h2 font-weight for media page */
.ced-media-page h2,
body.ced-media-page h2 {
  font-weight: 300 !important;
  font-variation-settings: "wght" 300 !important;
}

body.wp-singular.page-template.page-template-page-media {
  background-color: var(--ced-navy, #1e3a8a);
}

/* ===== STICKY HEADER FOR MEDIA PAGE ===== */
.ced-media-page .ced-sticky-header,
body.ced-media-page .ced-sticky-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  background: #1e3a8a !important;
  transition: all 0.3s ease;
  padding: 20px 0;
}

.ced-media-page .ced-sticky-header.has-white-background-color,
body.ced-media-page .ced-sticky-header.has-white-background-color {
  background: #1e3a8a !important;
}

.ced-media-page .ced-sticky-header,
body.ced-media-page .ced-sticky-header {
  border-bottom: none !important;
}

.ced-media-page .ced-header-logo img,
body.ced-media-page .ced-header-logo img {
  height: 50px;
  width: auto;
}

/* ===== HERO SECTION ===== */
.ced-media-page .ced-hero-section {
  position: relative;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ced-media-page .ced-hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.ced-media-page .ced-hero-fallback {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.ced-media-page .ced-hero-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.1) 0%, rgba(30, 58, 138, 0.3) 100%);
  z-index: 2;
}

.ced-media-page .ced-hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 120px 20px 80px;
  text-align: center;
}

.ced-media-page .ced-hero-title {
  font-family: "Oswald", sans-serif;
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 700 !important;
  font-variation-settings: unset !important;
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #60a5fa 100%, #06b6d4 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: right;
  margin: 0;
  width: 100%;
}

.ced-media-page .ced-hero-subtitle {
  font-family: 'Manrope', sans-serif;
  font-size: 1.25rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== CULTIVATING OUR STORY SECTION ===== */
.ced-cultivating-section {
  padding: 120px 0;
  background: #16237b; /* Royal blue background */
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.ced-cultivating-section.ced-parallax-reveal {
  background: transparent;
}

.ced-cultivating-content {
  display: grid;
  grid-template-columns: 1fr;
  text-align: center;
  position: relative;
  z-index: 2;
  max-width: 50%;
  justify-items: start;
}

.ced-cultivating-title {
  font-family: "Oswald", sans-serif;
  font-size: 5rem;
  font-weight: 800 !important;
  text-transform: uppercase;
  margin-bottom: 2rem;
  margin-top: 0;
  line-height: 1.05;
  color: #ffffff;
  position: relative;
  display: inline-block;
  border-bottom: none !important;
  border-image: none !important;
  text-align: left;
}

.ced-cultivating-text {
  font-size: 1.8rem;
  line-height: 1.5;
  color: #ffffff;
  text-align: left;
  font-weight: 100;
}

.ced-cultivating-text p {
  margin: 0;
}

/* ===== MEDIA CONTENT WRAPPER (WHITE BACKGROUND) ===== */
.ced-media-content-wrapper {
  background: #ffffff;
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 100vh;
  align-items: flex-start;
}

/* ===== LEFT STICKY NAVIGATION ===== */
.ced-media-sidebar {
  position: sticky;
  top: 90px;
  align-self: flex-start;
  width: 250px;
  min-width: 250px;
  padding: 60px 30px;
  background: #ffffff;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  overflow-x: hidden;
}

.ced-media-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ced-media-nav-link {
  font-family: 'Manrope', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  padding: 15px 0 15px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: 0;
  text-align: left;
  position: relative;
}

.ced-media-nav-link:hover {
  color: #1e3a8a;
  padding-left: 20px;
  background-color: rgba(30, 58, 138, 0.05);
}

.ced-media-nav-link.active {
  color: #1e3a8a;
  font-weight: 700;
}

.ced-media-nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #1e3a8a;
}

/* ===== MEDIA SECTIONS CONTENT ===== */
.ced-media-sections {
  flex: 1;
  padding: 60px 40px;
  background: #ffffff;
}

/* ===== MEDIA SECTIONS ===== */
.ced-media-section {
  padding: 80px 0;
  min-height: 50vh;
  background: #ffffff;
}

.ced-media-section:target {
  scroll-margin-top: 120px;
}

.ced-media-section-title {
  font-family: 'Manrope', sans-serif !important;
  font-size: 3rem;
  font-weight: 300 !important;
  font-variation-settings: "wght" 300 !important;
  color: #1e3a8a;
  margin: 0 0 20px;
  padding-bottom: 20px;
  text-transform: capitalize;
  letter-spacing: 0px;
  position: relative;
}

.ced-media-section-description {
  font-family: 'Manrope', sans-serif;
  font-size: 2.125rem;
  line-height: 1.5;
  color: #000;
  margin: 0 0 50px;
  max-width: 800px;
  font-weight: 100;
}

/* ===== MEDIA GRID ===== */
.ced-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

/* ===== FONT LINKS ===== */
.ced-media-font-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
}

.ced-font-link {
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  color: #000;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.ced-font-link:hover {
  color: #1e3a8a;
}

/* ===== COLOR CHIPS ===== */
.ced-color-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.ced-color-chip {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.ced-color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ced-color-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ced-color-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e3a8a;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ced-color-hex {
  font-family: 'Manrope', sans-serif;
  font-size: 0.95rem;
  color: #000;
  margin: 0;
  font-weight: 500;
}

/* ===== MEDIA ITEMS ===== */
.ced-media-item {
  background: #ffffff;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ced-media-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-color: rgba(30, 58, 138, 0.3);
}

.ced-media-preview {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.ced-media-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.ced-media-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  padding: 0;
}

.ced-media-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.ced-media-play-btn svg {
  width: 80px;
  height: 80px;
  fill: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

.ced-media-play-btn:hover svg {
  fill: rgba(255, 255, 255, 1);
  filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.2));
}

.ced-media-view-full {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  z-index: 10;
}

.ced-media-view-full:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: #fff;
}

.ced-media-view-full svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Font Preview */
.ced-font-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 30px;
}

.ced-font-sample {
  text-align: center;
  width: 100%;
}

.ced-font-sample h4 {
  font-size: 2rem;
  margin: 0 0 15px;
  color: #1e3a8a;
}

.ced-font-sample p {
  font-size: 1rem;
  margin: 10px 0;
  color: #333;
}

/* Logo Preview */
.ced-logo-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 30px;
}

.ced-logo-preview img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

/* Document Preview */
.ced-document-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
}

.ced-document-preview svg {
  width: 80px;
  height: 80px;
  fill: rgba(0, 0, 0, 0.3);
}

/* ===== MEDIA INFO ===== */
.ced-media-info {
  padding: 25px;
}

.ced-media-item-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e3a8a;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ced-media-item-description {
  font-family: 'Manrope', sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #000;
  margin: 0 0 15px;
}

.ced-media-meta {
  display: flex;
  gap: 15px;
  margin: 0 0 20px;
  flex-wrap: wrap;
}

.ced-media-format,
.ced-media-size,
.ced-media-weight,
.ced-media-variants {
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  color: #000;
  background: rgba(0, 0, 0, 0.05);
  padding: 5px 12px;
}

.ced-media-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.ced-btn {
  font-family: 'Manrope', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ced-btn-download {
  background: #1E5AA6;
  color: #fff;
  border: 2px solid #1E5AA6;
}

.ced-btn-download:hover {
  background: #16488a;
  border-color: #16488a;
  transform: translateY(-2px);
}

.ced-btn-preview {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.ced-btn-preview:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* ===== VIDEO MODAL ===== */
.ced-video-modal,
.ced-vimeo-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
}

.ced-video-modal.active,
.ced-vimeo-modal.active {
  display: block;
}

.ced-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1;
}

.ced-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 1200px;
  aspect-ratio: 16/9;
  z-index: 2;
}

.ced-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.8);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10001;
}

.ced-modal-close:hover {
  background: rgba(0, 0, 0, 1);
  transform: scale(1.1);
}

.ced-modal-close svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.ced-video-container,
.ced-vimeo-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
}

.ced-video-container video,
.ced-vimeo-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1024px) {
  .ced-cultivating-title {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .ced-container {
    padding: 0 7%;
  }

  .ced-media-page .ced-hero-section {
    height: 30vh;
    min-height: 200px;
  }
  
  .ced-media-page .ced-hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 0.9;
  }
  
  .ced-media-page .ced-hero-subtitle {
    font-size: 1rem;
  }
  
  .ced-cultivating-section {
    padding: 80px 0;
  }
  
  .ced-cultivating-content {
    max-width: 100%;
  }
  
  .ced-cultivating-title {
    font-size: 2.5rem;
  }
  
  .ced-cultivating-text {
    font-size: 2rem;
    line-height: 2.6rem;
    padding: 0 20px;
  }
  
  /* Mobile: Navigation at top, not sticky */
  .ced-media-content-wrapper {
    flex-direction: column;
  }
  
  .ced-media-sidebar {
    position: static;
    width: 100%;
    min-width: 100%;
    padding: 30px 20px;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    height: auto;
    overflow-y: visible;
  }
  
  .ced-media-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }
  
  .ced-media-nav-link {
    padding: 10px 15px;
    border-bottom: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
  }
  
  .ced-media-nav-link:hover {
    padding-left: 20px;
    background-color: rgba(30, 58, 138, 0.05);
  }
  
  .ced-media-nav-link.active::before {
    display: none;
  }
  
  .ced-media-nav-link.active {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
  }
  
  .ced-media-sections {
    padding: 40px 20px;
  }
  
  .ced-media-section-title {
    font-size: 2rem;
    font-weight: 300 !important;
    font-variation-settings: "wght" 300 !important;
  }
  
  .ced-media-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .ced-media-section {
    padding: 60px 0;
  }
  
  .ced-color-chips {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
  }
  
  .ced-color-name {
    font-size: 1rem;
  }
  
  .ced-color-hex {
    font-size: 0.875rem;
  }
  
  .ced-modal-content {
    width: 95%;
  }
  
  .ced-modal-close {
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
  }
}

