/* ============================================
   SEO & ACCESSIBILITY ADDITIONS
   Cakes by Adele - Solihull
   Add this to your existing CSS or include as a separate file
   ============================================ */

/* ===== ACCESSIBILITY ===== */

/* Skip Link - Allows keyboard users to skip to main content */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
  transition: top 0.3s;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  top: 0;
  clip: auto;
  clip-path: none;
  overflow: visible;
}

/* Visually Hidden - Screen reader accessible but visually hidden */
.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  clip-path: inset(50%);
}

/* Focus Visible Styles - For keyboard navigation */
a:focus-visible,
button:focus-visible,
.nav-link:focus-visible,
.contact-link-block:focus-visible,
.social-link:focus-visible,
.social-icon-link:focus-visible {
  outline: 3px solid #ffd9eb;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip to main content link styling */
#main-content {
  scroll-margin-top: 20px;
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  z-index: 3;
  background-color: #000;
  color: #fff;
  text-align: center;
  padding: 20px;
  font-family: 'Work Sans', sans-serif;
  font-size: 14px;
}

footer p {
  max-width: 100%;
  margin: 0;
}

/* ===== STRUCTURED DATA VISIBILITY ===== */
/* Microdata elements should be visible but can be styled minimally */
[itemprop="telephone"],
[itemprop="email"] {
  display: inline;
}

/* ===== PRINT STYLES ===== */
@media print {
  .bg-container,
  .background-video,
  .social-sectin {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .content-block {
    border: 1px solid #000;
    mix-blend-mode: normal !important;
    background-color: white !important;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
  
  a[href^="tel:"]:after,
  a[href^="mailto:"]:after {
    content: "";
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .background-video video {
    display: none;
  }
  
  .bg-container {
    background-image: url('images/video-poster.jpg');
    background-size: cover;
    background-position: center;
  }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  .content-block {
    border-width: 6px;
  }
  
  .contact-link-block,
  .social-link {
    text-decoration: underline;
  }
  
  a:focus-visible,
  button:focus-visible {
    outline: 4px solid currentColor;
    outline-offset: 4px;
  }
}

/* ===== IMAGE OPTIMIZATION FALLBACKS ===== */
img {
  max-width: 100%;
  height: auto;
}

/* Ensure images don't break layout while loading */
img[loading="lazy"] {
  background-color: #f5f5f5;
}

/* ===== SOCIAL SECTION IMPROVEMENTS ===== */
.social-sectin {
  display: -ms-grid;
  display: grid;
  -ms-grid-row-align: center;
  align-self: center;
  -webkit-box-flex: 0;
  -webkit-flex: 0 auto;
  -ms-flex: 0 auto;
  flex: 0 auto;
  grid-auto-columns: 1fr;
  grid-column-gap: 16px;
  grid-row-gap: 16px;
  -ms-grid-columns: 0.25fr 1fr;
  grid-template-columns: 0.25fr 1fr;
  -ms-grid-rows: auto auto;
  grid-template-rows: auto auto;
}

/* Mobile adjustments for accessibility */
@media screen and (max-width: 479px) {
  .social-sectin {
    justify-items: center;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -ms-grid-columns: 1fr;
    grid-template-columns: 1fr;
  }
  
  .social-link {
    font-size: 1rem;
    margin-bottom: 8px;
  }
  
  /* Larger touch targets on mobile */
  .social-icon-link {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .contact-link-block {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ===== VIDEO BACKGROUND FALLBACK ===== */
.bg-container {
  position: fixed;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

.background-video {
  width: 100%;
  height: 100%;
  background-color: rgba(0, 152, 190, 0.4);
}

/* If video fails to load, show poster */
.background-video video {
  background-size: cover;
  background-position: center;
}
