/* Fonts */
@font-face {
    font-family: "C059";
    src: url('fonts/c059-bold.otf') format("opentype");
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "FreeSerif";
    src: url('fonts/FreeSerifItalic-aZW5.ttf') format("truetype");
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

/* Typography */
h1, h2, h3 {
    font-family: "C059", Georgia, serif;
    font-weight: bold;
}

body {
    font-family: "FreeSerif", Georgia, serif;
    background-color: #f5fefd;
    color: #1f1f22;
    margin: 0;
    min-height: 100vh;
}

* {
    box-sizing: border-box;
}

/* === Main two-column section === */
.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    align-items: center;
}

.panel {
    padding: 2rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panel.image-side {
    align-items: center;
}

.panel.text-side {
    text-align: left;
    align-items: flex-start;
}

.panel.image-side img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Mobile: stack columns */
@media (max-width: 980px) {
    .container {
        grid-template-columns: 1fr;
        gap: 3rem;
        align-items: stretch;
    }

    .panel {
        justify-content: flex-start;
        padding: 1.5rem 2rem;
    }

    .panel.image-side {
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .panel.image-side img {
        width: 100%;
        max-height: 60vh;
        object-fit: cover;
        object-position: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
        gap: 2.5rem;
    }
    
    .panel {
        padding: 1.5rem 1.2rem;
    }
}

.pdf-otsikko {
    font-size: 2.0rem;
    font-weight: 1000;
    justify-content: center;
  }

.otsikko {
    font-size: 2.0rem;
    font-weight: 1000;
    color: #265217;
  }

.iskulause {
    font-size: 1.2rem;
    font-weight: 500;
    color: #265217;
  }


.phone-copy-box {
    width: 200px;
    height: 50px;
    border: 2px solid #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.0rem;
    font-weight: 500;
    color: #000000;
    background: #fafafa;
    transition: all 0.18s ease;
    cursor: pointer;
    user-select: none;
    position: relative;
  }

  .phone-copy-box:hover {
    border-color: #2e5569;
    color: #2e5569;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 255, 0.12);
  }

  .phone-copy-box:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.15);
  }


  .phone-copy-box.copied::after {
    content: "kopioitu";
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 1.2rem;
    pointer-events: none;
    animation: fadeOut 1.8s forwards;
  }

  @keyframes fadeOut {
    0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
    80%  { opacity: 1; }
    100% { opacity: 0; transform: translateX(-50%) translateY(8px); }
  }


.normal-section {
  width: 100%;
  padding: 3rem 0;
  background: #f5fefd;
}

.normal-section {
  width: 100%;
  padding: 2rem 0;
  background: #f5fefd;
}


/* Keep all your original .phone-copy-box styles */

.phone-link {
  text-decoration: none;          /* remove ugly underline */
  display: flex;                  /* important - makes it behave like the div */
  align-items: center;
  justify-content: center;
}

/* Optional: make it feel even more button-like on focus */
.phone-link:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 85, 105, 0.3);
}

/* Optional: slightly different "clicked" feeling compared to copy button */
.phone-link:active {
  transform: scale(0.98);
  transition: transform 0.08s ease;
}


.pdf-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr)); /* 3 columns as base */
  gap: 32px;
  max-width: 1480px;
  width: 90%;
  margin: 4rem auto;
  padding: 0 20px;
  justify-content: center;
}

/* Make items look good */
.grid-item {
  position: relative;
  aspect-ratio: 4 / 3;           /* landscape – good for many PDFs; change to 3/4 if portrait */
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  background: #f8f9fc;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.021);
  transition: all 0.28s ease;
}

.grid-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.grid-item:hover img {
  transform: scale(1.06);
}

/* Overlay with generous space for text */
.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 13, 27, 0.88) 0%, rgba(6, 8, 10, 0.35) 70%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px 28px 32px;
  color: white;
  transition: opacity 0.35s ease;
}

.grid-item:hover .overlay {
  opacity: 1;
}

.overlay span {
  font-weight: 700;
  font-size: 1.25rem;          /* bigger & readable */
  line-height: 1.3;
  margin-bottom: 10px;
}

.overlay small {
  font-size: 1.05rem;
  opacity: 0.92;
}


@media (max-width: 1100px) {
  .pdf-gallery-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr)); /* 2 columns on tablets */
    gap: 28px;
    width: 92%;
  }

  .overlay span { font-size: 1.2rem; }
  .overlay small { font-size: 1rem; }
}

@media (max-width: 680px) {
  .pdf-gallery-grid {
    grid-template-columns: 1fr;          /* Stack to 1 column on mobile */
    gap: 36px;                           /* more vertical space between items */
    max-width: 480px;                    /* narrower max on phones */
    width: 88%;
    margin: 3rem auto;
    padding: 0 15px;
  }

  .grid-item {
    aspect-ratio: 4 / 3.2;               /* slightly taller on mobile for readability */
    border-radius: 12px;
  }

  .overlay {
    padding: 48px 32px 40px;             /* more bottom padding on small screens */
  }

  .overlay span {
    font-size: 1.4rem;                   /* bigger text on mobile – easier to read */
  }

  .overlay small {
    font-size: 1.15rem;
  }
}

@media (max-width: 400px) {
  .pdf-gallery-grid {
    gap: 32px;
    width: 94%;
  }
}



.hero-slideshow {
  position: relative;
  width: 100%;
  height: 90vh;
  min-height: 500px;
  overflow: hidden;
  background: #000;
}

.slides-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none; /* prevents interaction when hidden */
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Show the correct slide when its radio is checked */
#s1:checked ~ .slide:nth-of-type(1),
#s2:checked ~ .slide:nth-of-type(2),
#s3:checked ~ .slide:nth-of-type(3),
#s4:checked ~ .slide:nth-of-type(4),
#s5:checked ~ .slide:nth-of-type(5),
#s6:checked ~ .slide:nth-of-type(6)
 {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* Navigation dots */
.navigation {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.nav-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: all 0.35s;
}

.nav-dot:hover {
  background: white;
  transform: scale(1.3);
}

/* Active dot */
#s1:checked ~ .navigation label:nth-of-type(1),
#s2:checked ~ .navigation label:nth-of-type(2),
#s3:checked ~ .navigation label:nth-of-type(3),
#s4:checked ~ .navigation label:nth-of-type(4),
#s5:checked ~ .navigation label:nth-of-type(5),
#s6:checked ~ .navigation label:nth-of-type(6)
{
  background: white;
  transform: scale(1.4);
}

/* Optional progress animation (fake auto-play feel) */
.progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 4px;
  background: rgba(255,255,255,0.8);
  animation: fakeProgress 16s infinite linear;
}

@keyframes fakeProgress {
  0%    { width: 0%;   }
  25%   { width: 25%;  }
  25.01%{ width: 0%; left: 25%; }
  50%   { width: 25%;  }
  50.01%{ width: 0%; left: 50%; }
  75%   { width: 25%;  }
  75.01%{ width: 0%; left: 75%; }
  100%  { width: 25%; left: 100%; }
}

/* Add these to your existing CSS */

.hero-slideshow {
  --autoplay: 1;           /* 1 = playing, 0 = paused */
  --duration: 5s;          /* change speed here */
}

.slide {
  transition: opacity 1.2s ease;
}

/* Important: hide the fake progress bar if you want real autoplay */
.progress {
  display: none;
}

/* Optional: little visual feedback that autoplay is active */
.navigation::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.1s;
}

.hero-slideshow:has(input[name="slide"]:checked:not(:target)) .navigation::after {
  opacity: 0.7;
}

input[type="radio"][name="slide"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
  /* No top/left needed anymore */
}