/*
Theme name: Kuntaehdokas
Theme author: JN
*/

* {
  box-sizing: border-box;
}

#site-container {
  max-width: 1400px;
  margin: 0 auto;
  background-color: #ffffff;
}

#site-header {
  background: url(./kuvat/kollaasi.png);
  background-position: center top;
  background-size: contain;
  background-repeat: no-repeat;
  text-align: center;
  border: solid 2px #016637;
  border-top: 0;
  height: 160px;
}

#site-header h1 {
  color: #016637;
  font-size: 3.5rem;
  margin: 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

#top-navi {
  background-color: #016637;
  border: solid 2px #016637;
}

#top-navi ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

#top-navi ul li {
  position: relative;
}

#top-navi > div > ul > li:first-child {
  display: none;
}

#top-navi ul a {
  text-decoration: none;
  color: #f0f0f0;
  font-weight: bold;
  display: block;
  padding: 12px 22px;
  text-align: center;
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

#top-navi ul a:hover {
  background-color: #014d2e;
  color: #ffffff;
}

#top-navi .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1;
  display: none;
  padding-top: 2px;
  background-color: #016637;
}

#top-navi ul li:hover .sub-menu {
  display: block;
}

#top-navi .sub-menu li {
  display: block;
  width: 100%;
  cursor: pointer;
}

#top-navi ul li.current-menu-item > a,
#top-navi ul li.current-category-parent > a,
#top-navi ul li.current-post-ancestor > a {
  background-color: #014d2e;
}

#content {
  border: solid 2px #016637;
  display: flex;
  background-color: #ffffff;
}

#content main {
  width: 70%;
  padding: 20px;
}

#content main article {
  border-bottom: 1px dashed #cccccc;
  margin-bottom: 15px;
}

#content main article:last-child {
  border-bottom: none;
}

#content main a {
  text-decoration: none;
  color: #016637;
  font-weight: bold;
  transition: color 0.3s ease-in-out;
}

#content main a:hover {
  color: #014d2e;
}

#content main h1 a,
#content main h2 a {
  text-decoration: none;
  color: #016637;
}

#content main h2 {
  margin: 0;
}

#content main .date-category,
#content #news-box .date {
  color: #777777;
  font-size: 0.9em;
  margin-top: 0;
}

#content #news-box {
  display: flex;
}

#content #news-box .news {
  width: 33.33%;
  padding: 10px;
}

#activity-box {
  display: flex;
}

#activity-box section {
  width: 33.33%;
  padding-right: 10px;
}

#activity-box section:nth-child(3) {
  padding-right: 0;
}

#sidebar {
  width: 30%;
  padding: 10px;
  background-color: #f9f9f9;
}

#content #sidebar a {
  text-decoration: none;
  color: #016637;
}

#content #sidebar h1,
#content #sidebar h2 {
  background-color: #016637;
  color: white;
  font-size: 1.25em;
  padding: 10px;
  border-radius: 4px;
}

#content #sidebar > div:first-child > h1,
#content #sidebar > div:first-child > h2 {
  margin-top: 5px;
}

#site-footer {
  background-color: #016637;
  border: solid 2px #016637;
  border-top: none;
  padding: 15px;
  text-align: center;
  color: white;
}

#site-footer a {
  color: #f0f0f0;
  text-decoration: none;
}

#site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.wpcf7-form {
  max-width: 600px;
  margin: 20px auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  border: solid 2px #016637;
}

.wpcf7-form h2 {
  text-align: center;
  font-size: 1.8rem;
  color: #016637;
  margin-bottom: 20px;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  background-color: #f9f9f9;
  transition: all 0.3s ease-in-out;
}

.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
  color: #777;
  font-size: 1rem;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  border-color: #016637;
  background-color: #ffffff;
  outline: none;
}

.wpcf7-form textarea {
  height: 150px;
  resize: none;
}

.wpcf7-submit {
  width: 100%;
  padding: 12px;
  background-color: #016637;
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

.wpcf7-submit:hover {
  background-color: #014d2e;
}

.wpcf7-response-output {
  color: red;
  font-weight: bold;
  text-align: center;
  margin-top: 15px;
}

.page-id-72 article h2 {
  display: none;
}

@media only screen and (max-width: 1150px) {
  #site-header {
    background: url(./kuvat/kollaasi.png);
    background-position: center top;
    background-size: contain;
    background-repeat: no-repeat;
    text-align: center;
    border: solid 2px #016637;
    border-top: 0;
    height: 140px;
  }
}

@media only screen and (max-width: 1000px) {
  #site-header {
    background: url(./kuvat/kollaasi.png);
    background-position: center top;
    background-size: contain;
    background-repeat: no-repeat;
    text-align: center;
    border: solid 2px #016637;
    border-top: 0;
    height: 120px;
  }
}

@media only screen and (max-width: 950px) {
  #site-header {
    background: url(./kuvat/kollaasi.png);
    background-position: center top;
    background-size: contain;
    background-repeat: no-repeat;
    text-align: center;
    border: solid 2px #016637;
    border-top: 0;
    height: 110px;
  }

  #content #news-box {
    display: block;
  }

  #content #news-box .news {
    width: 100%;
  }
}

@media only screen and (max-width: 850px) {
  #site-header {
    background: url(./kuvat/kollaasi.png);
    background-position: center top;
    background-size: contain;
    background-repeat: no-repeat;
    text-align: center;
    border: solid 2px #016637;
    border-top: 0;
    height: 100px;
  }
}

@media only screen and (max-width: 830px) {
  #site-header {
    background: url(./kuvat/kollaasi.png);
    background-position: center top;
    background-size: contain;
    background-repeat: no-repeat;
    text-align: center;
    border: solid 2px #016637;
    border-top: 0;
    height: 80px;
  }
}

@media only screen and (max-width: 677px) {
  #site-header {
    background: url(./kuvat/kollaasi.png);
    background-position: center top;
    background-size: contain;
    background-repeat: no-repeat;
    text-align: center;
    border: solid 2px #016637;
    border-top: 0;
    height: 70px;
  }
}

@media only screen and (max-width: 650px) {
  #site-header {
    background: url(./kuvat/kollaasi.png);
    background-position: center top;
    background-size: cover;
    /padding: 100px;
    text-align: center;
    border: solid 2px #016637;
    border-top: 0;
    height: 60px;
  }

  #content {
    display: block;
  }

  #content main {
    width: 100%;
  }

  #content #sidebar {
    width: 100%;
  }

  #top-navi {
    text-align: center;
  }

  #top-navi ul {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #top-navi ul li {
    width: 100%;
    text-align: center;
  }

  #top-navi > div > ul > li.menu-toggle {
    display: block;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    background-color: #016637;
    padding: 15px;
    cursor: pointer;
    width: 100%;
  }

  #top-navi > div > ul > li:not(.menu-toggle) {
    display: none;
    width: 100%;
  }

  #top-navi ul.active li {
    display: block;
  }

  #top-navi .sub-menu {
    display: none;
    position: relative;
    top: 0;
    left: 0;
    font-size: 0.8em;
  }

  .wpcf7-form {
    max-width: 90%;
  }
}

@media only screen and (max-width: 600px) {
  #site-header {
    background: url(./kuvat/kollaasi.png);
    background-position: center top;
    background-size: cover;
    /padding: 100px;
    text-align: center;
    border: solid 2px #016637;
    border-top: 0;
    height: 60px;
  }
}

@media only screen and (max-width: 550px) {
  #site-header {
    background: url(./kuvat/kollaasi.png);
    background-position: center top;
    background-size: cover;
    /padding: 100px;
    text-align: center;
    border: solid 2px #016637;
    border-top: 0;
    height: 50px;
  }
}

@media only screen and (max-width: 480px) {
  #site-header {
    background: url(./kuvat/kollaasi.png);
    background-position: center top;
    background-size: cover;
    /padding: 100px;
    text-align: center;
    border: solid 2px #016637;
    border-top: 0;
    height: 40px;
  }
}

@media only screen and (max-width: 430px) {
  #site-header {
    background: url(./kuvat/kollaasi.png);
    background-position: center top;
    background-size: cover;
    /padding: 100px;
    text-align: center;
    border: solid 2px #016637;
    border-top: 0;
    height: 40px;
  }
}

@media only screen and (max-width: 375px) {
  #site-header {
    background: url(./kuvat/kollaasi.png);
    background-position: center top;
    background-size: cover;
    /padding: 100px;
    text-align: center;
    border: solid 2px #016637;
    border-top: 0;
    height: 40px;
  }
}
