/* Enhanced Custom CSS for One Thirteen bio site */

/*
 * Table of Contents:
 * 1. Color Variables & Theme Settings
 * 2. Base Styles
 * 3. Profile & Header Styles
 * 4. Links Container & Link Styles
 * 5. Labels & Tags
 * 6. Footer Styles
 * 7. Container Styling
 * 8. Media Queries
 * 9. Animations
 * 10. Products Showcase
 * 11. Navigation
 * 12. Social Icons
 * 13. Video Components
 * 14. Carousel Components
 */

/* 1. Color Variables & Theme Settings */
:root {
  --brand-primary: #113;  /* One Thirteen theme color */
  --brand-secondary: #335;
  --accent-color: #5670C0;
  --text-color: #333;
  --text-color-secondary: #9f9f9f;
  --background-color: #f8f9fa;
  --background-color-rgb: 248, 249, 250;
  --card-background: #fff;
  --link-hover: #5670C0;
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --card-background-rgb: 255, 255, 255;
}

/* Dark mode variables */
[data-color-mode="dark"] {
  --brand-primary: #335;
  --brand-secondary: #557;
  --accent-color: #5670C0;
  --text-color: #ffffff;
  --text-color-secondary: #bdbcbc;
  --background-color: #16151d;
  --background-color-rgb: 22, 21, 29;
  --card-background: #272534;
  --link-hover: #5670C0;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --card-background-rgb: 39, 37, 52;
}

/* 2. Base Styles */
body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 3. Profile & Header Styles */
header h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.avatar {
  border-radius: 16px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  width: 80px;
  height: 80px;
  object-fit: fill;
  border: none;
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Profile section styling */
.profile-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1rem;
}

.bio-text {
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
  font-size: 1.1rem;
  color: var(--text-color-secondary);
}

[data-color-mode="dark"] .bio-text {
  color: var(--text-color-secondary);
  opacity: 0.85;
}

@media (max-width: 768px) {
  .bio-text {
    max-width: 100%;
    font-size: 1rem;
  }
}

/* 4. Links Container & Link Styles */
.links-container {
  margin: 2rem auto;
  max-width: 600px;
  padding: 0 1rem;
}

.links-container ul {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.links-container li {
  width: 100%;
  margin: 0;
  text-align: left;
}

/* Section headings in links container */
.links-container h3 {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  display: inline-block;
}

.links-container h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background-color: var(--accent-color);
}

[data-color-mode="dark"] .links-container h3 {
  color: var(--text-color);
}

@media (max-width: 768px) {
  .links-container h3 {
    font-size: 1.1rem;
  }
  
  .links-container h3::after {
    width: 30px;
  }
}

/* Styled links */
.Link--primary {
  text-align: left;
  background-color: var(--card-background);
  border: 2px solid var(--border-color) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 20px var(--shadow-color);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  padding: 1.25rem 1.5rem !important;
  color: var(--text-color) !important;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
  display: flex !important;
  align-items: center;
  gap: 1.25rem;
  height: 80px;
  position: relative;
  overflow: hidden;
}

.Link--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(var(--background-color-rgb), 0.1),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.Link--primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px var(--shadow-color);
  border-color: var(--accent-color) !important;
}

.Link--primary:hover::after {
  opacity: 1;
}

.Link--primary svg {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  color: var(--accent-color);
  transition: transform 0.3s ease;
}

.Link--primary:hover svg {
  transform: scale(1.1);
}

.link-text {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.3;
  flex-grow: 1;
}

/* Dark mode adjustments for links */
[data-color-mode="dark"] .Link--primary {
  background-color: var(--card-background);
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-color-mode="dark"] .Link--primary:hover {
  border-color: var(--accent-color) !important;
}

[data-color-mode="dark"] .Link--primary::after {
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .links-container {
    margin: 1.5rem auto;
  }
  
  .Link--primary {
    padding: 1rem 1.25rem !important;
    height: 70px;
    gap: 1rem;
  }
  
  .link-text {
    font-size: 1rem;
  }
  
  .Link--primary svg {
    width: 24px;
    height: 24px;
  }
}

/* 5. Labels & Tags */
.Label {
  border-radius: 20px;
  padding: 8px 16px;
  margin-right: 8px;
  margin-bottom: 8px;
  font-weight: 500;
  background-color: var(--brand-primary) !important;
  color: white !important;
  transition: all 0.3s ease;
  display: inline-block;
}

.Label:hover {
  background-color: var(--brand-secondary) !important;
  transform: translateY(-2px);
}

/* Newsletter section wrapper */
footer {
  margin-top: 6rem; /* Reduced margin to fix excessive space */
  border-top: 1px solid var(--border-color);
  color: var(--text-color-secondary);
  text-align: center;
  position: relative;
}

.footer-content {
  padding: 3rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-text {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.contact-link {
  margin-top: 2rem;
}

.footer-link {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--link-hover);
  text-decoration: none;
}

[data-color-mode="dark"] footer {
  color: var(--text-color);
  opacity: 0.95;
}

[data-color-mode="dark"] .footer-text {
  color: var(--text-color);
  opacity: 0.95;
}

[data-color-mode="dark"] .footer-link {
  color: var(--accent-color);
  opacity: 0.9;
}

[data-color-mode="dark"] .footer-link:hover {
  color: var(--link-hover);
  opacity: 1;
}

/* Container styling */
.container-md {
  max-width: 800px;
  padding: 2rem;
  background-color: var(--card-background);
  border-radius: 16px;
  box-shadow: 0 10px 30px var(--shadow-color);
  margin: 2rem auto;
  border: 1px solid var(--border-color);
}

/* Enhanced media queries for responsive design */
@media (max-width: 768px) {
  .container-md {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  .avatar {
    width: 60px;
    height: 60px;
  }
  
  .Label {
    margin-bottom: 0.5rem;
    display: inline-block;
  }
  
  .links-container {
    margin: 2rem 1rem;
  }
  
  .links-container ul {
    flex-direction: column;
    align-items: stretch;
  }
  
  .links-container li {
    width: 100%;
  }
  
  .Link--primary {
    padding: 1rem !important;
  }
  
  .link-text {
    font-size: 0.9rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fadeIn {
  animation: fadeIn 0.8s ease-in;
}

/* Horizontal Products Display */
.products-showcase {
  margin: 3rem auto;
  width: 100%;
  position: relative;
  overflow: hidden;
  max-width: 800px;
}

.products-showcase::before,
.products-showcase::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}

.products-showcase::before {
  left: 0;
  background: linear-gradient(to right, 
    var(--card-background) 0%,
    rgba(var(--card-background-rgb), 0.95) 30%,
    rgba(var(--card-background-rgb), 0) 100%
  );
}

.products-showcase::after {
  right: 0;
  background: linear-gradient(to left, 
    var(--card-background) 0%,
    rgba(var(--card-background-rgb), 0.95) 30%,
    rgba(var(--card-background-rgb), 0) 100%
  );
}

.products-showcase h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: var(--text-color);
  text-align: center;
  padding: 0 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.products-horizontal-container {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: max-content;
  padding: 1rem 80px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.product-block {
  background-color: var(--card-background);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 4px 8px var(--shadow-color);
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border: 1px solid var(--border-color);
  overflow: hidden;
  width: min(500px, calc(100vw - 8rem));
  flex: 0 0 min(500px, calc(100vw - 8rem));
  transform-origin: center center;
  outline: none;
}

.product-block:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.product-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Ensure interactive elements within product block have proper focus styles */
.product-block a:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
  border-radius: 4px;
}

.product-block-header {
  flex-shrink: 0;
  padding-top: 2px;
}

.product-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
}

.app-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.product-block-content {
  flex: 1;
  padding-top: 2px;
}

.product-block-title {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.product-subtitle {
  font-size: 0.8rem;
  color: var(--text-color-secondary);
  margin-bottom: 0.5rem;
  font-style: italic;
  line-height: 1.2;
}

.product-block-details {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  color: var(--text-color-secondary);
  font-size: 0.9rem;
}

.status-indicator {
  width: 6px;
  height: 6px;
  margin-right: 0.5rem;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.coming-soon {
  background-color: #f6993f;
}

.status-indicator.available {
  background-color: #38c172;
}

.version-info {
  font-size: 0.9rem;
  color: var(--text-color-secondary);
}

.hover-description {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-color-secondary);
}

.hover-button {
  display: inline-flex;
  align-items: center;
  background-color: var(--brand-primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-top: 1rem;
  border: none;
}

.hover-button:hover {
  background-color: var(--brand-secondary);
  transform: translateY(-1px);
  text-decoration: none;
  color: white;
}

.hover-button.disabled {
  background-color: var(--text-color-secondary);
  opacity: 0.7;
  cursor: not-allowed;
}

/* Product-specific styling */
.product-block:nth-child(1) {
  border-color: #2B6CB0; /* Bit Buddy blue */
}

.product-block:nth-child(1) .product-icon {
  background: #2B6CB0;
}

.product-block:nth-child(2) {
  border-color: #38A169; /* Moneyminder green */
}

.product-block:nth-child(2) .product-icon {
  background: #38A169;
}

.product-block:nth-child(3) {
  border-color: #805AD5; /* Cribbo purple */
}

.product-block:nth-child(3) .product-icon {
  background: #805AD5;
}

.product-block:nth-child(4) {
  border-color: #f16842; /* Cribbo purple */
}

.product-block:nth-child(4) .product-icon {
  background: #f16842;
}

/* Add hover effects for the product blocks */
.product-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.product-block:nth-child(1):hover {
  box-shadow: 0 4px 6px rgba(43, 108, 176, 0.2);
}

.product-block:nth-child(2):hover {
  box-shadow: 0 4px 6px rgba(56, 161, 105, 0.2);
}

.product-block:nth-child(3):hover,
.product-block:nth-child(4):hover {
  box-shadow: 0 4px 6px rgba(128, 90, 213, 0.2);
}

.app-store-link {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background-color: var(--brand-primary);
  color: white;
  border: none;
  transition: all 0.2s ease;
  padding: 0;
  opacity: 0.9;
}

.app-store-link:hover {
  background-color: var(--brand-secondary);
  transform: translateY(-1px);
  opacity: 1;
}

.app-store-link svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 768px) {
  .products-showcase {
    margin: 2rem auto;
    overflow: visible;
  }
  
  .products-showcase::before,
  .products-showcase::after {
    display: none;
  }
  
  .products-showcase h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }
  
  .products-horizontal-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 1.5rem;
    gap: 1.5rem;
    transform: none !important;
    transition: none !important;
  }
  
  .product-block {
    width: 100%;
    flex: none;
  }

  .carousel-nav,
  .carousel-scroll-button,
  .carousel-dots {
    display: none;
  }
}

@media (max-width: 480px) {
  .products-showcase {
    margin: 1.5rem auto;
  }

  .products-horizontal-container {
    padding: 0 1rem;
    gap: 1rem;
  }

  .product-block {
    min-width: 85%;
    padding: 1rem;
    flex-direction: row;
    align-items: center;
    text-align: left;
  }

  .product-block-content {
    width: auto;
  }

  .product-block-title {
    justify-content: flex-start;
    font-size: 1rem;
  }
  
  .product-subtitle {
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
  }

  .product-block-details {
    justify-content: flex-start;
    font-size: 0.8rem;
    gap: 0.5rem;
  }

  .product-icon {
    width: 40px;
    height: 40px;
  }

  .hover-description {
    font-size: 0.9rem;
    margin-top: 0.35rem;
  }

  .app-store-link {
    position: relative;
    top: auto;
    right: auto;
    margin-top: 0.75rem;
  }
}

/* Site Navigation */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--card-background);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.nav-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}

.nav-left, .nav-right, .nav-center {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.nav-left {
  justify-content: center;
}

.nav-center {
  justify-content: center;
  margin: 0 2rem;
}

.nav-right {
  justify-content: center;
}

.last-update-link {
  text-decoration: none;
  color: var(--text-color-secondary);
  transition: color 0.3s ease;
  font-size: 0.875rem;
}

.last-update-link:hover {
  color: var(--accent-color);
}

[data-color-mode="dark"] .last-update-link {
  color: var(--text-color-secondary);
}

[data-color-mode="dark"] .last-update-link:hover {
  color: var(--accent-color);
}

@media (max-width: 768px) {
  .nav-container {
    margin: 0 1rem;
  }
  
  .nav-center {
    margin: 0 1rem;
  }
  
  .last-update-text {
    display: none;
  }
  
  .nav-center {
    display: none;
  }
}

.repo-link {
  text-decoration: none;
  color: var(--text-color);
  transition: color 0.3s ease;
}

.repo-link:hover {
  color: var(--accent-color);
}

.repo-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #38c172;
  display: inline-block;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  background-color: #38c172;
  opacity: 0.2;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.2;
  }
  50% {
    transform: scale(1.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

[data-color-mode="dark"] .repo-status {
  color: var(--text-color-secondary);
}

[data-color-mode="dark"] .repo-link:hover {
  color: var(--accent-color);
}

/* Theme toggle button */
.theme-toggle {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background-color: var(--brand-primary);
  color: white;
  border-color: var(--accent-color);
}

/* Adjust main container to account for fixed nav */
.container-md {
  margin-top: 4rem;
}

@media (max-width: 768px) {
  .container-md {
    margin-top: 3.5rem;
  }
  
  .site-nav {
    padding: 0.4rem 0.8rem;
  }
  
  .status-text {
    display: none;
  }
  
  .repo-status {
    gap: 0.25rem;
  }
}

/* Dark mode specific adjustments */
[data-color-mode="dark"] .product-block-hover {
  background-color: rgba(0, 0, 0, 0.7);
}

[data-color-mode="dark"] .product-subtitle {
  color: var(--text-color-secondary);
}

[data-color-mode="dark"] .hover-button {
  background-color: var(--accent-color);
  color: var(--bg-color);
}

[data-color-mode="dark"] .hover-button:hover {
  background-color: var(--brand-primary);
  color: white;
}

[data-color-mode="dark"] .hover-button.disabled {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color-secondary);
}

/* Official Links Section */
.official-links-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1rem;
}

.official-links-section h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-color);
  text-align: center;
  margin-bottom: 2rem;
}

.Link--primary.video-link {
  height: auto;
  padding: 0 !important;
  overflow: hidden;
  width: 100%;
  display: flex !important;
  flex-direction: column !important;
  gap: 0;
  max-width: 600px;
  margin: 0 auto;
}

.Link--primary.video-link .video-thumbnail {
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  position: relative;
  overflow: hidden;
  background: var(--brand-primary);
}

.Link--primary.video-link .thumbnail-img {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
}

.Link--primary.video-link:hover .thumbnail-img {
  transform: translateY(-50%) scale(1.05);
}

.Link--primary.video-link .video-info {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: first baseline;
  gap: 1.25rem;
  min-height: 80px;
  justify-content: flex-start;
  text-align: left;
}

.Link--primary.video-link .video-info svg {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  color: var(--accent-color);
  transition: transform 0.3s ease;
}

.Link--primary.video-link .video-info .link-text {
  text-align: left;
}

.Link--primary.video-link:hover .video-info svg {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .Link--primary.video-link .video-info {
    padding: 1rem 1.25rem;
    min-height: 70px;
    gap: 1rem;
  }
  
  .Link--primary.video-link .video-info svg {
    width: 24px;
    height: 24px;
  }
}

/* Carousel Navigation */
.carousel-nav {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin: 2rem auto;
  padding: 0 60px;
  min-height: 48px;
  max-width: 800px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-color-secondary);
  opacity: 0.5;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  padding: 0;
}

.carousel-dot:hover {
  opacity: 0.8;
  transform: scale(1.2);
}

.carousel-dot.active {
  background-color: var(--accent-color);
  opacity: 1;
  width: 10px;
  height: 10px;
}

/* Carousel Scroll Buttons */
.carousel-scroll-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  z-index: 3;
  background: var(--card-background);
  border: 1px solid var(--border-color);
  color: var(--text-color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 2px 8px var(--shadow-color);
  opacity: 0.8;
  padding: 0;
}

.carousel-scroll-button:hover {
  color: var(--accent-color);
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.carousel-scroll-button.prev {
  left: 10px;
}

.carousel-scroll-button.next {
  right: 10px;
}

@media (max-width: 768px) {
  .products-showcase {
    margin: 2rem auto;
    overflow: visible;
  }
  
  .products-showcase::before,
  .products-showcase::after {
    display: none;
  }
  
  .products-showcase h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }
  
  .products-horizontal-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 1.5rem;
    gap: 1.5rem;
    transform: none !important;
    transition: none !important;
  }
  
  .product-block {
    width: 100%;
    flex: none;
  }

  .carousel-nav,
  .carousel-scroll-button,
  .carousel-dots {
    display: none;
  }
}

[data-color-mode="dark"] .app-store-link {
  background-color: var(--accent-color);
  opacity: 0.9;
}

[data-color-mode="dark"] .app-store-link:hover {
  background-color: var(--brand-primary);
  opacity: 1;
}

.carousel-dot:focus-visible,
.carousel-scroll-button:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Social Icons */
.social-icons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    max-width: 100%;
    padding: 0 1rem;
}

.social-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
    flex-shrink: 0;
}

.social-icon-link {
    color: var(--text-color-secondary);
    text-decoration: none;
    position: relative;
    margin: 0 0.25rem;
}

.social-icon-link:hover .social-icon-circle {
    color: var(--accent-color);
    transform: translateY(-2px) scale(1.1);
}

/* Social icon tooltips */
.social-icon-link::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--card-background);
    color: var(--text-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px var(--shadow-color);
    border: 1px solid var(--border-color);
    pointer-events: none;
    z-index: 10;
}

.social-icon-link::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) translateY(10px) rotate(45deg);
    width: 8px;
    height: 8px;
    background-color: var(--card-background);
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 11;
}

.social-icon-link:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.social-icon-link:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) rotate(45deg);
}

/* Dark mode adjustments for tooltips */
[data-color-mode="dark"] .social-icon-link::after {
    background-color: var(--card-background);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-color-mode="dark"] .social-icon-link::before {
    background-color: var(--card-background);
    border-color: var(--border-color);
}

/* BlueSky specific icon styling */
.social-icon-circle svg[href*="bluesky.png"] {
    width: 18px;
    height: 18px;
}

/* One Thirteen icon styling */
.onethirteen-icon {
    width: 30px;
    height: 30px;
    border-radius: 20%;
    object-fit: contain;
    filter: brightness(0.8);
    transition: filter 0.3s ease;
}

[data-color-mode="dark"] .onethirteen-icon {
    filter: brightness(1);
}

.Link--primary:hover .onethirteen-icon {
    filter: brightness(1);
}

/* Bit Buddy icon styling */
.bitbuddy-icon {
    width: 30px;
    height: 30px;
    border-radius: 20%;
    object-fit: contain;
    filter: brightness(0.8);
    transition: filter 0.3s ease;
}

[data-color-mode="dark"] .bitbuddy-icon {
    filter: brightness(1);
}

.Link--primary:hover .bitbuddy-icon {
    filter: brightness(1);
}

.rating-info {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-color-secondary);
    font-size: 0.9rem;
}

.rating-star {
    color: #FFD700;
}

/* Newsletter Section */
.newsletter-section {
    margin: 2rem auto;
    max-width: 800px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px var(--shadow-color);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info {
    padding: 1.5rem;
}

.video-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.25rem;
    text-align: left;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.video-description {
    font-size: 0.95rem;
    color: var(--text-color-secondary);
    line-height: 1.5;
}

/* Dark mode adjustments */
[data-color-mode="dark"] .video-card {
    background: var(--card-background);
    border-color: var(--border-color);
}

@media (max-width: 768px) {
    .video-card {
        margin: 1.5rem auto;
        border-radius: 12px;
    }

    .video-info {
        padding: 1rem;
    }

    .video-title {
        font-size: 1.1rem;
    }

    .video-description {
        font-size: 0.9rem;
    }
}

/* Simple Video Links (matching regular links style) */
.video-link-simple {
  display: flex;
  align-items: first baseline;
}

.video-thumb-mini {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
  margin-right: 10px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.1);
}

.thumb-mini-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0,0,0,0.6);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-icon svg {
  color: white;
  transform: translateX(1px); /* Center the play icon visually */
}

.video-link-simple:hover .play-icon {
  background-color: var(--accent-color);
}

/* Video Link Cards (with thumbnail above) */
.video-link-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
  height: auto !important;
  background: var(--card-background);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
}

.video-link-card:hover {
  transform: translateY(-2px);
}

.video-thumbnail-wrapper {
  position: relative;
  width: 100%;
  padding-top: 45%; /* Reduced from 56.25% for less top padding */
  overflow: hidden;
  background-color: rgba(0,0,0,0.05);
}

.video-thumbnail-wrapper .thumbnail-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-link-card:hover .thumbnail-img {
  transform: scale(1.05);
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background-color: rgba(0,0,0,0.4);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.3s ease, background-color 0.3s ease;
}

.video-link-card:hover .play-overlay {
  opacity: 1;
  background-color: var(--accent-color);
}

.video-info-card {
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  min-height: 50px;
  text-align: left;
  justify-content: flex-start;
  width: 100%;
}

/* Video icon styling */
.video-info-card svg.bi,
.video-list-item a svg.bi {
  width: 32px;
  height: 32px;
  padding: 4px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.1);
  margin-right: 10px;
  transition: background-color 0.3s ease;
}

/* Increase the size of the actual SVG icon inside */
.video-info-card svg.bi use,
.video-list-item a svg.bi use {
  transform: scale(1.5);
  transform-origin: center;
}

[data-color-mode="dark"] .video-info-card svg.bi,
[data-color-mode="dark"] .video-list-item a svg.bi {
  background-color: rgba(255, 255, 255, 0.1);
}

.Link--primary:hover .video-info-card svg.bi,
.Link--primary:hover .video-list-item a svg.bi {
  background-color: rgba(0, 0, 0, 0.2);
}

[data-color-mode="dark"] .Link--primary:hover .video-info-card svg.bi,
[data-color-mode="dark"] .Link--primary:hover .video-list-item a svg.bi {
  background-color: rgba(255, 255, 255, 0.2);
}

[data-color-mode="dark"] .video-thumbnail-wrapper {
  background-color: rgba(255,255,255,0.05);
}

@media (max-width: 768px) {
  .play-overlay {
    width: 40px;
    height: 40px;
  }
  
  .play-overlay svg {
    width: 26px;
    height: 26px;
  }
  
  .video-info-card {
    padding: 0.4rem 0.8rem;
    min-height: 45px;
  }
}

.video-link-card .link-text {
  text-align: left !important;
  font-weight: 500;
  margin-left: 0.5rem;
  display: inline-block;
  width: 100%;
}

.links-container li:has(.video-link-card) {
  text-align: left !important;
}

.video-list-item {
  text-align: left !important;
}

.video-list-item a,
.video-list-item .link-text {
  text-align: left !important;
}

/* Only apply special styling to featured video cards */
.video-list-item .video-link-card {
  text-align: left !important;
}

.video-link-card, 
.video-link-card * {
  text-align: left !important;
}

@media (max-width: 768px) {
  .container-md {
    max-width: 100%;
    padding: 0 1rem;
  }

  .site-nav {
    padding: 0.75rem 0;
  }

  .status-text {
    display: none;
  }

  .repo-status {
    margin-left: 0;
  }
  
  footer {
    margin-top: 10rem; /* Slightly smaller on mobile but still large */
  }
  
  .footer-content {
    padding: 2rem 0;
    gap: 0.75rem;
  }
  
  .contact-link {
    margin-top: 1.5rem;
  }
}

/* Additional mobile adjustments for social icons */
@media (max-width: 768px) {
  .social-icons-container {
    gap: 0.75rem;
    padding: 0 0.5rem;
  }
  
  .social-icon-link::after {
    font-size: 0.7rem;
    padding: 3px 6px;
    bottom: -25px;
  }
  
  .social-icon-link::before {
    bottom: -8px;
    width: 6px;
    height: 6px;
  }
  
  .social-icon-circle {
    width: 36px;
    height: 36px;
  }
  
  .social-icon-link {
    margin: 0 0.25rem;
  }
}

@media (max-width: 480px) {
  .social-icons-container {
    gap: 0.5rem;
    padding: 0 0.25rem;
  }
  
  .social-icon-circle {
    width: 32px;
    height: 32px;
  }
  
  .social-icon-link {
    margin: 0 0.125rem;
  }
}