﻿/* ===== Shared Base Styles for Notes ===== */
.cssNote {
  max-width: 1000px;        
  margin: 1rem auto;        
  padding: 1.5rem 1rem;     
  width: 100%;
  box-sizing: border-box;

  border-radius: 12px;       
  box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
}

/* ===== Note Block ===== */
.cssNote {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
}

.cssNote p {
  margin-bottom: 1rem;
}

.cssNote .main-image-link {
  text-decoration: none;
  color: var(--secondary-color);
  display: inline-block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.cssNote .main-image-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.cssNote .main-image-link img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

/* ===== Magazine-style embedded images ===== */
.cssNote .magazine-float,
.cssNote .magazine-float-right {
  width: 35%;
  max-width: 400px;
  height: auto;
  margin-bottom: 10px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cssNote .magazine-float {
  float: left;
  margin-right: 15px;
}

.cssNote .magazine-float-right {
  float: right;
  margin-left: 15px;
}

/* Improve list spacing inside cssNote (desktop) */
.cssNote ul,
.cssNote ol {
  padding-left: 1.5rem;   /* distance from left border */
  margin: 1rem 0;         /* vertical breathing room */
}

.cssNote li {
  margin-bottom: 0.6rem;  /* space between items */
  line-height: 1.6;
}

/* ===== Mobile Optimization ===== */
@media (max-width: 768px) {
  .cssNote {
    margin: 0.5rem;
    padding: 0.5rem;
    font-size: 0.95em;
  }

  .cssNote {
    padding: 1rem 1.5rem;
  }

  .cssNote .magazine-float,
  .cssNote .magazine-float-right {
    width: 100%;
    float: none;
    margin: 10px 0;
  }
}

/* Link Search Styles */

.cssLink {
    max-width: 760px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(26, 79, 114, 0.08);
}

.cssLink ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cssLink li {
    border-bottom: 1px solid var(--border);
    position: relative;
}

.cssLink li:last-child {
    border-bottom: none;
}

.cssLink a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem 1rem 1.75rem;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
    position: relative;
}

/* Left accent bar */
.cssLink a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

/* Right arrow indicator */
.cssLink a::after {
    content: "→";
    color: var(--text-light);
    font-size: 1.1rem;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.cssLink a:hover,
.cssLink a:focus-visible {
    background: var(--light);
    color: var(--secondary);
    padding-left: 2rem;
    outline: none;
}

.cssLink a:hover::before,
.cssLink a:focus-visible::before {
    transform: scaleY(1);
}

.cssLink a:hover::after,
.cssLink a:focus-visible::after {
    opacity: 1;
    transform: translateX(0);
    color: var(--accent);
}

/* Focus ring for accessibility */
.cssLink a:focus-visible {
    box-shadow: inset 0 0 0 2px var(--secondary);
}

@media (max-width: 480px) {
    .cssLink a {
        padding: 0.9rem 1.1rem 0.9rem 1.25rem;
        font-size: 0.95rem;
    }
    .cssLink a:hover,
    .cssLink a:focus-visible {
        padding-left: 1.5rem;
    }
}



/* Links grid */
.links {
  display: grid;
  gap: .5rem;
  margin-top: 1rem;
}
.links a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
}
.links a:hover {
  color: var(--accent);
  text-decoration: underline;
}


/* ===== Responsive Video Embeds ===== */
.video-wrapper {
  width: 100%;
  max-width: 800px;   /* contain video on desktop */
  margin: 0 auto;
  flex-shrink: 0;   /* body is a flex column; overflow:hidden below gives this a 0 auto-min-size otherwise */

  aspect-ratio: 16 / 9;  /* replaces padding-bottom hack */
  overflow: hidden;

  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===== Native Video Styling ===== */
.video-wrapper video {
  width: 100%;
  height: 100%;
  display: block;
  max-width: 1024px;   /* contain video on desktop */

  object-fit: cover;   /* crop if aspect ratio differs */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);

  background-color: #000; /* fallback for unloaded video */
}

@media (max-width: 768px) {
  .video-wrapper {
    max-width: 100%;  /* full width on mobile */
  }
}

/* ===== Multi-video Layout ===== */
.video-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* centers the group regardless of video count, no width cap needed */
  gap: 0.75rem;   /* spacing between items, incl. between wrapped rows */
}

.video-list .video-wrapper {
  flex: 1 1 320px;
  width: auto;
  max-width: 380px;
}
