/* filepath: Horizontal-Scroll-Gallery/style.css */
/* === Modern Horizontal Scroll Gallery === */

/* Reset and base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', Arial, sans-serif;
  background: linear-gradient(135deg, #1e1e2f, #2a2a3c);
  min-height: 100vh;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.5s;
  overflow-x: hidden;
}

header {
  text-align: center;
  padding: 4rem 1rem 2rem 1rem;
  width: 100vw;
  background: rgba(30, 30, 30, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

header h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: #00bcd4;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0, 188, 212, 0.2);
}

header p {
  color: #b2ebf2;
  font-size: 1.2rem;
  font-weight: 400;
  margin-top: 0.5rem;
}

footer {
  text-align: center;
  padding: 2rem 0 1.2rem 0;
  color: #00bcd4;
  font-size: 1rem;
  margin-top: auto;
  background: rgba(30, 30, 30, 0.8);
  width: 100vw;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

main {
  width: 100vw;
  max-width: 100vw;
  margin: 0;
}

.view {
  display: flex;
  flex-direction: row;
  gap: 3rem;
  padding: 3rem 2vw;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100vw;
  max-width: 100vw;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #00bcd4 #1e1e2f;
  scroll-behavior: smooth;
  transition: gap 0.3s;
  background: rgba(30, 30, 30, 0.3);
  backdrop-filter: blur(4px);
}

.view::-webkit-scrollbar {
  height: 12px;
  background: #1e1e2f;
}

.view::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #00bcd4 0%, #1e1e2f 100%);
  border-radius: 8px;
  border: 2px solid #1e1e2f;
}

.block {
  flex: 0 0 300px;
  width: 300px;
  height: 350px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  box-shadow: 0 8px 40px rgba(0, 188, 212, 0.2), 0 2px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: 
    transform 0.25s cubic-bezier(.4, 2, .6, 1), 
    box-shadow 0.25s, 
    background 0.3s, 
    border 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  opacity: 0;
  margin-bottom: 0;
  scroll-snap-align: start;
  border: 2px solid rgba(0, 188, 212, 0.1);
  backdrop-filter: blur(10px);
}

.block.in-view {
  animation: appear-x 1s cubic-bezier(.4, 2, .6, 1) both;
}

@keyframes appear-x {
  from {
    opacity: 0;
    transform: translateY(60px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.block i {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: #00bcd4;
  padding: 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e1e2f 0%, #00bcd4 100%);
  box-shadow: 0 2px 16px rgba(0, 188, 212, 0.2);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
  border: 2px solid #00bcd4;
}

.block span {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.5px;
  margin-top: 0.5rem;
  text-shadow: 0 1px 8px rgba(0, 188, 212, 0.1);
  text-align: center;
}

.block:hover, .block:focus-visible {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 16px 48px rgba(0, 188, 212, 0.3), 0 6px 24px rgba(0, 0, 0, 0.2);
  background: rgba(0, 188, 212, 0.2);
  border: 2px solid #00bcd4;
  outline: none;
}

.block:hover i, .block:focus-visible i {
  background: linear-gradient(135deg, #00bcd4 0%, #1e1e2f 100%);
  color: #1e1e2f;
  box-shadow: 0 4px 24px rgba(0, 188, 212, 0.2);
  border-color: #1e1e2f;
}

@media (max-width: 1200px) {
  .block {
    flex: 0 0 250px;
    width: 250px;
    height: 300px;
  }
  .view {
    gap: 2rem;
    padding: 2rem 1vw;
  }
}

@media (max-width: 700px) {
  header h1 {
    font-size: 1.8rem;
  }
  .block {
    flex: 0 0 90vw;
    width: 90vw;
    height: 70vw;
    max-width: 350px;
    max-height: 250px;
  }
  .view {
    gap: 1.5rem;
    padding: 1.5rem 0.5rem;
  }
  footer {
    font-size: 0.9rem;
  }
}

/* Accessibility: focus styles */
.block:focus {
  outline: 3px solid #00bcd4;
  outline-offset: 2px;
  z-index: 2;
}


/* === Footer Credits & Social Links === */
.footer-credits {
  color: #b2ebf2;
  font-size: 1.05rem;
  margin: 0.5rem 0 0.7rem 0;
  line-height: 1.5;
}

.footer-credits .aka {
  color: #00bcd4;
  font-style: italic;
  font-weight: 500;
}

.footer-links {
  text-align: center;
  padding: 1.2rem 0 0 0;
  color: #00bcd4;
  font-size: 1.05rem;
  letter-spacing: 0.7px;
  background: rgba(30, 30, 30, 0.0); /* transparent to blend with footer */
  width: 100%;
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #00bcd4;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
  font-size: 1.1rem;
}

.footer-links a:hover,
.footer-links a:focus {
  color: #ffffff;
  text-shadow: 0 0 8px #00bcd4;
}

.footer-links i {
  margin-right: 0.5em;
  font-size: 1.3em;
  vertical-align: middle;
}

.footer-sep {
  color: #b2ebf2;
  opacity: 0.5;
  margin: 0 0.5em;
  font-weight: 400;
  font-size: 1.1em;
}