html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  background-image: url('./../img/grass_bg.png');
  background-repeat: repeat;
  background-size: 200px;
}

.noto-color-emoji-regular {
  font-family: "Noto Color Emoji", sans-serif;
  font-weight: 400;
  font-style: normal;
}

a.nav-link {
  padding: 0px 10px 0px 10px;
}

li.nav-item {
  margin: 0px 0px 3px 0px;
}

ul.nav {
  font-weight: bold;
}

.nav-link {
  font-family: 'Comic Sans MS', 'Verdana', sans-serif;  /* 90-luvun suosikit */
  color: #000000;                        /* Musta teksti */
  background-color: #AD4A48;             /* Maroon (tummanpunainen) tausta */
  text-decoration: none;                 /* Poistetaan alleviivaus */
  padding: 10px 15px;                    /* Sopiva tila linkin ympärille */
  border: 3px solid #D2B48C;             /* Vaaleanruskea reunus (tiilimäinen) */
  display: inline-block;                 /* Linkit laatikkotyyliin */
  transition: background-color 0.3s, border-color 0.3s;  /* Pehmeä siirtymä hover-tilassa */
  border-radius: 3px;                    /* Kevyt pyöristys kulmiin */
}

/* Hover-tila (kun hiiri on linkin päällä) */
.nav-link:hover {
  background-color: #660000;             /* Tummempi maroon hover-tilassa */
  border-color: #A0522D;                 /* Tumma ruskea reunus hover-tilassa */
  color: #D2B48C;
}

/* Aktiivinen linkki (klikkauksen jälkeen) */
.nav-link:active {
  background-color: #993333;             /* Aktiivisena hieman kirkkaampi tummanpunainen */
  color: #FFFFFF;                        /* Valkoinen teksti aktiivisena */
}


a.nav-heading {
  font-size: larger;
  margin: 5px 0px 3px 0px;
  background: initial;
  border: 0px;
}

a.nav-heading:hover {
  background-color: initial;             /* Tummempi maroon hover-tilassa */
  color: #D2B48C;
}

.wrapper {
  display: flex;
  height: 100vh;
}
.sidebar {
  flex: 0 0 auto;
  width: 250px;
  overflow-y: auto;

  background-image: url('./../img/brick_wall.png');
  background-repeat: repeat;
  background-size: 200px;
}
.main-content {
  flex: 1;
  overflow-y: auto;
}

.content-overlay {
  background-color: rgba(29, 128, 45, 0.75);
  min-height: 100vh;
  margin: 0;   
}

.content {
  font-family: 'Comic Sans MS', 'Verdana', sans-serif; 
  font-size: 1.15rem;
  padding: 20px;
  border-radius: 10px;
}

h1 {
  font-size: 4rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  color: darkred;
}

h4 {
  font-weight: bold;
}

.main-content h1, .main-content h2 {
  text-align: center;
  color: darkred;
}

p, ul {
  color: darkblue;
}

.content ul {
  list-style: none;
  padding-left: 0;
}

.content ul li::before {
  content: "★";  /* Tähti-symboli */
  display: inline-block;
  font-size: 20px;               /* Tähtien koko */
  background: linear-gradient(to bottom right, #e1ff00, #FFC371);
  -webkit-background-clip: text;  /* Tausta kiinnitetään vain tekstiin */
  -webkit-text-fill-color: transparent;  /* Taustan täyttö */
  margin-right: 10px;            /* Vähän tilaa tekstin ja tähden väliin */
  vertical-align: middle;
  animation: bling 1.5s infinite ease-in-out;  /* Animaatio */
}

/* Bling-bling animaatio */
@keyframes bling {
  0%, 100% {
      transform: scale(1);        /* Normaalikoko */
      opacity: 1;                 /* Täysi näkyvyys */
  }
  50% {
      transform: scale(1.2);      /* Kasvaa hieman isommaksi */
      opacity: 0.7;               /* Hieman himmeämpi */
  }
}

.email-button {
    display: inline-block;
    padding: 10px 10px;
    background-color: #d6c510;  /* Pinkinpunainen tausta */
    color: rgb(9, 86, 27);
    font-size: 1.2rem;
    text-transform: uppercase;
    font-weight: bold;
    border: 3px solid #0eaf2c;  /* Kultaoranssi reunus */
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease-in-out;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);  /* Nappulan varjo */
}

/* Hover-efekti, kun nappulaa viedään hiirellä */
.email-button:hover {
    background-color: #FFC371;  /* Vaihdetaan kultaoranssi hover-tilassa */
    color: #FF5F6D;             /* Pinkki teksti hover-tilassa */
    border-color: #FF5F6D;      /* Vaihdetaan reunus hover-tilassa */
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.4);  /* Syvempi varjo */
    transform: scale(1.05);     /* Pieni suurennus hover-tilassa */
}

.animate-firstletter {
  font-size: 5rem;                /* Suuri fonttikoko */
  font-weight: bold;              /* Lihavoitu */
  display: inline-block;          /* Pitää alkukirjaimen erillään tekstistä */
  animation: tarina 1.5s infinite; /* Kutsuu heiluu-animaatiota */
}

.animate-firstletter-beat {
  font-size: 5rem;
  font-weight: bold;
  display: inline-block;
  animation: beat 1.5s infinite;
}

@keyframes beat {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1); /* Suurempi koko */
  }
}

.animate-firstletter-shiny {
  font-size: 5rem;
  font-weight: bold;
  display: inline-block;
  animation: shiny 2.5s infinite;
}

@keyframes shiny {
  0%, 100% {
    opacity: 1;
    transform: translateX(0);
  }
  25% {
    opacity: 0.6;
    transform: translateX(-10px);
  }
  50% {
    opacity: 0.8;
    transform: translateX(10px);
  }
  75% {
    opacity: 0.6;
    transform: translateX(-5px);
  }
}

/* Container for the entire list */
.caretaker-list {
  display: grid;
  grid-template-columns: repeat(7, 1fr); /* 8 columns for the header and rows */
  gap: 10px;
  background-color: #faf3e0;
  padding: 20px;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
}

/* Header styles */
.caretaker-list .header {
  background-color: #b22222;
  color: white;
  padding: 15px;
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
}

/* Cell styles for data */
.caretaker-list .cell {
  padding: 12px;
  border-bottom: 1px solid #ddd;
  background-color: #f9f9f9;
  text-align: center;
}

/* Link styles inside cells */
.caretaker-list .cell a {
  color: #b22222;
  text-decoration: none;
  font-weight: bold;
}

/* Hover effect for links */
.caretaker-list .cell a:hover {
  color: #ff6347;
  text-decoration: underline;
}

/* Row hover effect */
.caretaker-list .cell:hover {
  background-color: #ffe4b5;
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
  .caretaker-list {
      grid-template-columns: 1fr;
  }
  .header {
      text-align: left;
  }
}

/* Kuvan tyylit */
.retro-image-container {
  display: inline-block;
  margin: 0 auto;
  text-align: center; /* Keskittää kuvatekstin kuvan alle */
  float: left; /* Jatketaan kuvan vasemmanpuoleista kellutusta */
  margin-right: 20px;
}

.retro-image {
  display: block;
  max-width: 400px;
  border: 10px solid #9c951e;
  padding: 5px;
  background-color: #774711;
  box-shadow: 5px 5px 0 #2a3636, 10px 10px 0 #4a454a;
}

/* Animaatio hover-tilassa */
.retro-image:hover {
  transform: rotate(-5deg);
  transition: transform 0.3s ease;
}

/* Kuvatekstin tyyli */
figcaption {
  font-size: 14px;
  color: #313131; /* Hieman vaaleampi teksti */
  margin-top: 5px;
  clear: both; /* Estää kuvatekstiä kellumasta kuvan viereen */
  display: block; /* Tekee kuvatekstistä loogisen osan */
}

.custom-hr {
  display: flow-root;;
  width: 100%;
  height: 30px;
  text-align: center;
  position: relative;
  transform: rotate(180deg);
}

.custom-hr:before {
  content: "\f076 \f076 \f076 \f076 \f076 \f076"; /* Font Awesome unicode for fa-magnet (kavion ikoni) */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: darkred; /* Retro pinkki väri */
  letter-spacing: 15px; /* Välit ikonien väliin */
  
}

/* Hover-efekti kavioikoneille */
.custom-hr:hover:before {
  color: #FFFF00; /* Kirkas keltainen hover-tilassa */
  transition: transform 0.3s ease, color 0.3s ease;
}

.custom-hr-heart {
  display: flow-root;
  width: 100%;
  height: 30px;
  text-align: center;
  position: relative;
  margin: 15px 0 15px 0;
}

.custom-hr-heart:before {
  content: "\f004 \f004 \f004 \f004 \f004 \f004"; /* Font Awesome unicode for fa-heart (sydänikoni) */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: pink; /* Tummanpunainen väri */
  letter-spacing: 15px; /* Väli ikonien välillä */
  animation: heartbeat 4s infinite;
  display: inline-block;
}

/* Sykkivä animaatio */
@keyframes heartbeat {
  0%, 100% {
    transform: scale(1); /* Normaali koko */
  }
  25% {
    transform: scale(1.1); /* Kasvaa hieman */
  }
  50% {
    transform: scale(0.9); /* Pienenee hieman */
  }
  75% {
    transform: scale(1.1); /* Kasvaa takaisin */
  }
}

.competition-calendar {
  display: block;
  max-width: 100%;
  border: 2px solid #774711;
  background-color: #ffebcd;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2); /* Retro tyyppinen varjo */
  margin: 20px 0;
  padding: 15px;
  font-family: 'Courier New', Courier, monospace; /* Retro fontti */
}

.competition-header, .competition-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 saraketta, kukin yhtä leveä */
  padding: 10px 0;
  border-bottom: 1px solid #774711;
}

.header-cell {
  font-weight: bold;
  text-align: center;
  color: #fff;
  background-color: #774711;
  padding: 10px;
}

.competition-row {
  background-color: #fff;
  padding: 10px;
  font-size: .9rem;
}

.competition-row:nth-child(odd) {
  background-color: #f7f7f7; /* Vuorotteleva taustaväri */
}

.competition-row .cell {
  padding: 8px;
}

/* Hover-efekti kilpailuriveille */
.competition-row:hover {
  background-color: #ffe4b5;
  transition: background-color 0.3s ease;
}

.competition-row .cell:nth-child(4) {
  text-align: center;
}


.schedule {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  padding: 10px;
  max-width: 1000px;
}

.schedule > div {
  padding: 3px;
  background-color: #fff8dc; /* Taustaväri */
  border: 2px solid #8b0000;
  box-shadow: 3px 3px 0 #2a3636, 6px 6px 0 #4a454a;
  text-align: center;
  font-size: 0.8rem;
}

.schedule .header {
  background-color: #ff6347;
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 16px;
}

.schedule .time {
  background-color: #ffb6c1;
  font-weight: bold;
}

.schedule .event {
  color: #2f4f4f;
}
/* Koko alue, jossa kaviot liikkuvat */
.kavio-container {
  width: 100%;
  height: 150px;
  position: relative;
  overflow: hidden;
}

/* Hevoskorttien grid-asettelu */
.horse-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Responsiivinen asettelu */
  gap: 20px;
  max-width: 1000px;
  margin: 20px auto;
}

.horse-card {
  display: flex;
  align-items: center;
  background-color: #fff8dc;
  padding: 15px;
  border: 5px solid #8b0000;
  box-shadow: 5px 5px 0 #2a3636, 10px 10px 0 #4a454a;
}

/* Jokatoinen kortti: kuvat oikealle */
.horse-card:nth-child(even) {
  flex-direction: row-reverse;
}

.horse-image {
  width: 100px;
  height: 100px;
  border: 4px solid #ffb6c1;
  margin-right: 15px;
}

/* Kun kuva on oikealla, vaihdetaan marginaalit */
.horse-card:nth-child(even) .horse-image {
  margin-left: 15px;
  margin-right: 0;
}

.horse-name {
  font-size: 24px;
  color: #774711;
}

.horse-info {
  font-size: 18px;
  margin-bottom: 10px;
}

.horse-special {
  font-style: italic;
  color: #ff6347;
}

.horse-image {
  width: 100px;               /* Adjust the size as needed */
  height: 100px;
  border-radius: 50%;         /* Makes the image circular */
  border: 5px solid;          /* Adds a border around the image */
  object-fit: cover;          /* Ensures the image fills the circle without distortion */
}

/* Gender-based border color */
.horse-card[data-sex="ori"] .horse-image { /* Stallion */
  border-color: blue;
}

.horse-card[data-sex="tamma"] .horse-image { /* Mare */
  border-color: red;
}

.horse-card[data-sex="ruuna"] .horse-image { /* Gelding */
  border-color: yellow;
}

/* Tyhjennä nappi */
.reset-button {
  background-color: #ff4500;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  float: right;
}

.reset-button:hover {
  background-color: #e03e00;
}

/* Flexbox layout for profile */
.profile-info {
  display: flex;
  align-items: center; /* Vertikaalinen keskitys */
  gap: 20px; /* Välit kuvan ja tekstin välillä */
  height: 100%;
}

.profile-info figure {
  display: inline-block;
  position: relative;
  max-width: 300px;
  margin: 0;
  padding: 15px;
  background-color: #fff;
  border: 10px solid white; /* Polaroid-tyylinen valkoinen reunus */
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5); /* Syvä varjo */
  transform: rotate(0deg); /* Hieman vinossa oleva kuva */
  transition: transform 0.3s ease-in-out;
}

.profile-info figure:hover {
  transform: rotate(-3deg); /* Oikaisee kuvan hover-tilassa */
}

#profile-image {
  width: 100%;
  height: auto;
}

.profile-info figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  color: #333;
}

.profile-details {
  max-width: 400px; /* Tekstin leveys */
}

.profile-details p {
  margin: 8px 0;
}



.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 10px;
  background-color: #ffebcd;
  border: 2px solid #774711;
  margin-bottom: 20px;
}

.gallery figure {
  margin: 10px;
  text-align: center;
  width: 135px;
}

.gallery img {
  width: 150px;
  height: auto;
  background-color: #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  border-radius: inherit;
}

/* Jokainen pariton kuva kääntyy vasemmalle */
.gallery figure:nth-child(odd) {
  transform: rotate(-5deg) scale(0.95);
}

/* Jokainen parillinen kuva kääntyy oikealle */
.gallery figure:nth-child(even) {
  transform: rotate(5deg) scale(0.95);
}

.gallery figcaption {
  font-size: .5rem;
  color: #774711;
  background-color: #ffffff;
  padding: 3px;
  margin: 0;
}

.modal-content {
  border: 10px solid white;
  box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.5); /* Polaroid shadow */
  padding: 15px;
  transition: transform 0.3s ease-in-out;
}

.modal-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.modal-caption {
  font-family: 'Courier New', Courier, monospace; /* Retro-style font */
  margin-top: 10px;
  font-size: 16px;
}

.modal-header {
  border: initial;
}


/* Kaviotyylit */
.kavio {
  font-size: 3rem;
  position: absolute;
  top: 30%;
  color: #800000;            /* Maroon-väri */
  transform: rotate(-90deg);  /* Käännetään ikonit 90 astetta */
  opacity: 0;                /* Aluksi piilotettu */
  transition: opacity 0.5s ease;  /* Lisää smooth opacity-animaatio */
}

/* Alempi kavio */
.kavio-2 {
  top: 60%;                  /* Sijoitetaan alemmas */
}



@keyframes tarina {
  0% {
      transform: translate(0, 0);  /* Lähtöasento */
  }
  10% {
      transform: translate(-2px, 2px); /* Siirtyy hieman vasemmalle ja alas */
  }
  20% {
      transform: translate(2px, -2px); /* Siirtyy hieman oikealle ja ylös */
  }
  30% {
      transform: translate(-2px, -2px); /* Siirtyy hieman vasemmalle ja ylös */
  }
  40% {
      transform: translate(2px, 2px);   /* Siirtyy hieman oikealle ja alas */
  }
  50% {
      transform: translate(-2px, 0);    /* Siirtyy vasemmalle */
  }
  60% {
      transform: translate(2px, 0);     /* Siirtyy oikealle */
  }
  70% {
      transform: translate(-2px, 2px);  /* Siirtyy vasemmalle ja alas */
  }
  80% {
      transform: translate(2px, -2px);  /* Siirtyy oikealle ja ylös */
  }
  90% {
      transform: translate(-2px, -2px); /* Siirtyy vasemmalle ja ylös */
  }
  100% {
      transform: translate(0, 0);       /* Palaa lähtöasentoon */
  }
}

@keyframes heiluu {
  0% {
      transform: translateX(0);   /* Alkuasento (ei liikettä) */
  }
  50% {
      transform: translateX(-10px); /* Liikkuu vasemmalle */
  }
  100% {
      transform: translateX(10px);  /* Liikkuu oikealle */
  }
}

@keyframes hyppii {
  0% {
      transform: translateY(0);   /* Lähtöasento, ei liikettä */
  }
  30% {
      transform: translateY(-15px); /* Hyppy ylös */
  }
  50% {
      transform: translateY(0);   /* Palaa alas */
  }
  70% {
      transform: translateY(-8px);  /* Kevyt hyppy uudelleen */
  }
  100% {
      transform: translateY(0);   /* Palaa alas */
  }
}

@keyframes superpallo {
  0% {
      transform: translateY(0);    /* Lähtöasento, ei liikettä */
  }
  20% {
      transform: translateY(-50px); /* Suuri hyppy ylös */
  }
  40% {
      transform: translateY(0);    /* Palaa alas */
  }
  50% {
      transform: translateY(-40px);  /* Toinen hyppy, pienempi */
  }
  70% {
      transform: translateY(0);    /* Palaa alas */
  }
  80% {
      transform: translateY(-20px);  /* Kolmas hyppy, vielä pienempi */
  }
  90% {
      transform: translateY(0);    /* Palaa alas */
  }
  95% {
      transform: translateY(-10px);  /* Viimeinen pieni hyppy */
  }
  100% {
      transform: translateY(0);    /* Palaa alas */
  }
}

@media (max-width: 767.98px) {
  .sidebar {
      position: fixed;
      top: 56px;
      left: -250px;
      height: calc(100% - 56px);
      z-index: 1000;
      transition: all 0.3s;
  }
  .sidebar.active {
      left: 0;
  }
  .main-content {
      margin-top: 56px;
  }
}