/*
    Project name: Uprising
    Date: 01-2025
    Author: Talamus.fi
    Copyright: Psykologipalvelu Talamus
*/

/* Include borders and paddings in the total size of the elements. */
* {
    box-sizing: border-box;
}

/*  Colours */
:root {
    --bg:               rgb(250, 248, 242);
    --bg-light:         rgb(252, 250, 245);
    --bg-dark:          rgb(138, 44, 18);
    --bg-topdown-menu:  rgb(240, 235, 222);
    --bg-drop-menu:     rgb(238, 233, 221);
    --bg-divider:       rgb(206, 202, 219);
    --bg-active:        rgb(209, 199, 242);
    --bg-active-menu:   rgb(206, 199, 230);
    --bg-popup:         rgb(234, 230, 249);

    --txt-1st:          rgb(0, 0, 0);
    --txt-2nd-light:    rgb(204, 0, 204);
    --txt-2nd:          rgb(160, 10, 110);
    --txt-2nd-dark:     rgb(153, 0, 153);
    --txt-3rd:          rgb(10, 118, 143);
    --active-light:     rgb(199, 209, 221);
    --active-dark:      rgb(199, 209, 221);
    --details-active:   rgb(104, 50, 211);
    --icon-color:       rgb(250, 240, 250);
    --shadow-color:     rgb(59, 56, 56);

    --bg-opacity:   0.99;
    --icon-opacity: 0.98;
    /*
    --text-opacity: 1;
    color: rgb(237 240 244/var(--text-opacity));
    */

    --page-width-max: 1024px;
    --page-width-level1: 896px;
    --page-width-level2: 768px;
    --page-width-level3: 640px;
    --page-width-level4: 512px;
 }

body {
    /* No margins around webpage. */
    margin: 0;
    /* Set background colour for whole webpage. */
    background-color: var(--bg);
    /* Set default font size and family for whole page and addjust relative font size in headers and paragraphs with 'em'. */
    font-size: 100%;
    font-family: Tahoma, 'Times New Roman', Times, serif;
    font-display: swap;
}

h1 {
    font-size: 1.4em;
}

h2 {
    font-size: 1.3em;
}

h3 {
    font-size: 1.25em;
}

h4 {
    font-size: 1.2em;
    margin-top: 0px;
    margin-bottom: 5px;
}

h5 {
    font-size: 1.10em;
    margin-top: 5px;
    margin-bottom: 0px;
}

p {
    font-size: 1.1em;
}

li {
    font-size: 1.1em;
    padding-left: 10px;
}

a {
    font-size: 1.1em;
    /* Font color for links */
    color: var(--txt-3rd);
    /* No underline at link names. */
    text-decoration: none;
}

blockquote {
    font-size: 1.1em;
}

.author {
    font-size: 1.0em;
}

/* @media screen and (max-width: 640px) {
    h5 {
        font-size: 1.15em;
    }
    p {
        font-size: 1.15em;
    }
    li {
        font-size: 1.15em;
    }
    a {
        font-size: 1.15em;
    }
} */

.footer .text-small {
    font-size: 1em;
}

img {
    max-width: 100%;
    height: auto;
}

/* Set first image of chapter at the same level as text. */
.img-top {
    margin-top: 1em;
}

html {
    /* Padding for page internal links to prevent content hiding behind fixed topnav. */
    scroll-padding-top: 150px;
    max-width: var(--page-width-max);
    margin: auto;
    scroll-behavior: smooth;
    /* Prevent font size changing in landscape orientation while allowing user zoom. */
    -webkit-text-size-adjust: 100%;
}


/*
    Header styling.
*/
.header {
    color: var(--txt-3rd);
    background-color: var(--bg-topdown-menu);
    opacity: var(--bg-opacity);
    /* Keep header always visible at top of the page. */
    position: sticky;
    top: 0;
    z-index: 8;  /* Show in front of all other elements except popup window. */
}

.header .grid-container {
    display: grid;
    /* Even width columns */
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
}

.header .grid-item {
    grid-auto-rows: 1fr;
    margin: 4px;
}

.header .logo-talamus-img {
    grid-row: 1 / 5;
    grid-column: 1 / 13;
    max-width: 512px;
    justify-self: center;
    margin-left: 10px;
    margin-right: 10px;
    padding-top: 0px;
}

.header .menu-main {
    grid-row: 4;
    grid-column: 9 / 13;
    padding-right: 10px;
    width: 100%;
    right: 5%;
    text-align: right;
}

.header .dropdown-content {
    text-align: left;
    padding: 12px;
}
.header .dropdown-content[open] {
    display: inline;
}

/* For smaller screens, rearrange and modify header content. */
@media screen and (max-width: 896px) {
    /* hide all direct links. Show only the logo and the menus. */
    /* .header .grid-container a {display: none;} */
    /* .header .grid-container .logo-talamus a {display: block;} */
    /* .header .grid-container .menu-main a {display: block;} */
    /* .header .grid-container .menu-yhteystiedot a {display: block;} */

    .header .menu-main {
        grid-column: 9 / 13;
    }
}
@media screen and (max-width: 768px) {
    .header .menu-main {
        grid-column: 8 / 13;
    }
}
@media screen and (max-width: 640px) {
    .header .logo-talamus-img {
        grid-column: 1 / 13;
    }
    .header .menu-main {
        grid-column: 7 / 13;
    }
}
@media screen and (max-width: 512px) {
    .header .logo-talamus-img {
        grid-column: 1 / 13;
    }
    .header .menu-main {
        grid-column: 6 / 13;
    }
}

/*
    Footer styling.
*/
.footer {
    color: var(--txt-1st);
    background-color: var(--bg-topdown-menu);
    padding: 4px;
    text-align: center;
}

.footer .grid-container {
    display: grid;
    /* Even width columns */
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
}

.footer .grid-item {
    margin: 4px;
}

.footer .talamus {
    grid-row: 1;
    grid-column: 3 / 6;
}

.footer .logo-kela {
    grid-row: 1;
    grid-column: 1;
    width: 100px;
    justify-self: center;
    align-self:flex-end;
    padding-bottom: 22px;
}

.footer .logo-kanta {
    grid-row: 1;
    grid-column: 2;
    width: 100px;
    justify-self: center;
    align-self: flex-end;
    padding-bottom: 22px;
}

.footer .logo-pohde {
    grid-row: 1;
    grid-column: 6 / 8;
    width: 180px;
    justify-self: center;
    align-self: flex-end;
}

/* For smaller screens rearrange the footer content. */
@media screen and (max-width: 896px) {
    .footer .talamus {
        grid-row: 1;
        grid-column: 2 / 7;
    }
    
    .footer .logo-kela {
        grid-row: 2;
        grid-column: 1 / 3;
        align-self: flex-start;
    }
    
    .footer .logo-kanta {
        grid-row: 2;
        grid-column: 3 / 5;
        align-self: flex-start;
        padding-top: 22px;
    }
    
    .footer .logo-pohde {
        grid-row: 2;
        grid-column: 5 / 8;
        align-self: flex-start;
    }  
}

@media screen and (max-width: 512px) {
    .footer .talamus {
        grid-row: 1;
        grid-column: 2 / 7;
    }
    
    .footer .logo-kela {
        grid-row: 2;
        grid-column: 1 / 3;
        align-self: flex-start;
        max-width: 80px;
    }
    
    .footer .logo-kanta {
        grid-row: 2;
        grid-column: 3 / 5;
        align-self: flex-start;
        padding-top: 18px;
        max-width: 80px;
    }
    
    .footer .logo-pohde {
        grid-row: 2;
        grid-column: 5 / 8;
        align-self: flex-start;
        max-width: 120px;
    }  
}

/*
    Main section styling.
*/
.main {
    color: var(--txt-1st);
    /* Small borders for main section */
    padding: 8px;
}

#yhteystiedot {
    list-style: none; /* remove list bullets from contacts and address. */
}

/* 1. Osa: Tervetuloteksti ja kuva. */
.main-container-1 {
    display: block;
    margin-left: 10px;
    margin-right: 10px;
    text-align: justify;
}

.main-container-1 img {
    float: left;
    padding-right: 12px;
    padding-bottom: 12px;
    max-width: 50%;
    height: auto;
}

@media screen and (max-width: 640px) {
    .main-container-1 img {
        padding-right: 0px;
        max-width: 100%;
    }
}

.main-container-1-1 {
    display: grid;
    text-align: center;
}

.main-container-1-1 h1 {
    margin-top: 0px;
    margin-bottom: 1px;
}
.main-container-1-1 h2 {
    margin-top: 1px;
    margin-bottom: 1px;
}
.main-container-1-1 h3 {
    margin-top: 1px;
}

/* 2. Osa: Palvelujen esittely ja kuvat. */
.main-container-2 > .content-details {
    background-color: var(--bg-light);
    flex: 100%;
}

/*
    Dividers
*/

.section-divider {
    margin-top: 8px;
    margin-bottom: 8px;
}

.section-divider-large {
    margin-top: 128px;
    margin-bottom: 128px;
}

.container-divider {
    display: flex;
    justify-content: center;
}

.container-divider > div {
    flex: 0, 1, auto;
    width: 400px;
}

.container-divider {
    background-color: var(--bg-divider);
    padding-top: .5em;
    padding-bottom: .5em;
}

/*
    Dropdown menu.
*/

/* The container <div> - needed to position the dropdown content. */
.dropdown-menu {
    position: relative;
    display: inline-block;
}

.dropdown-menu .fa {
    /* Disable font awesome icons sending click events.
     Otherwise dropdown menu does not open at icon area */
    pointer-events: none;
}

/* Dropdown content (Hidden by Default). */
.dropdown-content {
    display: none;
    position: absolute;
    width: 100%;
    overflow-y: auto;  /* Enable vertical scrolling. */
    text-align: left;
    background-color: var(--bg-drop-menu);
    opacity: var(--bg-opacity);
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 4;
}

/* Links inside the dropdown menu. */
.dropdown-content a {
    display: block;
    padding: 4px;
}

.dropdown-content .fa {
    color: black;
    text-shadow: none;
    padding-left: 90%;
}

.dropdown-content .menu-divider {
    padding-bottom: 4px;
    border-bottom: 1px solid var(--txt-2nd-dark);
    margin-bottom: 4px;
}

.dropdown-content .menu-divider-thick {
    padding-bottom: 4px;
    border-bottom: 2px solid var(--txt-2nd-dark);
    margin-bottom: 4px;
}

/* Show the dropdown menu (use JS to add this class to the .dropdown-content container when the user clicks on the dropdown button) */
.dropdown-menu .show {display:block;}

/* Change color of dropdown links on hover. */
.dropdown-content a:hover {background-color: var(--bg-active-menu)}

.dropbutton {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: left;
    cursor: pointer;
}

/* Change color of links on hover. */
.dropbutton:hover {background-color: var(--bg-active-menu);}


/*
    Details element.
*/
.content-details {
    padding: 4px; /* Space between summary text of details element. */
}

.content-details img {
    /* width: 420px; */
    max-width: 40%;
    height: auto;
}

@media screen and (max-width: 896px) {
    .content-details img {
        max-width: 45%;
        height: auto;
    }
}

@media screen and (max-width: 640px) {
    .content-details img {
        max-width: 50%;
        height: auto;
    }
}

.content-details .img-left {
    float: left;
    padding-right: 12px;
    padding-bottom: 12px;
}

.content-details .img-right {
    float: right;
    padding-left: 12px;
    padding-bottom: 12px;
}

summary {
    background-color: var(--bg-light);
    cursor: pointer; /* Change mouse to pointer when hover above summary element. */
    text-align: left;
    list-style-type: none; /* Removes the default arrow. */
}

summary::-webkit-details-marker {
    display: none;  /* Removes the default arrow from Apple Safari. */
}

summary > * {
    display: inline; /* Heading and arrow at the same line. */
}

summary .icon {
    float: right;
    width: 24px;
    height: 24px;
    transition: transform 0.5s;
    /* color: var(--collapse-icon-color); */
}
  
.content-details[open] summary .icon {
    transform: rotate(180deg);
}

/* Show content on click. */
.content-details summary:hover {
    background-color: var(--bg-active);
    color: var(--details-active);
    transition: color 1s;
}
  
.details-info {
    /* Details content minimum height same as height of the used image. */
    min-height: 250px;
}

.details-info {
    margin-top: 8px;
    border-top: 1px solid var(--txt-2nd-dark);

    text-align: justify;

    padding-bottom: 8px;
    border-bottom: 2px solid var(--txt-2nd-dark);
    margin-bottom: 8px;
}

@media screen and (max-width: 640px) {
    .details-info {
        text-align: left;
    }
}

.details-info .close-button {
    color: black;
    text-shadow: none;
    margin-top: 8px;
    margin-bottom: 4px;
    display: block;
    cursor: pointer;
    text-align: right;
}

.details-info .close-button:hover {background-color: var(--bg-active-menu)}

/*
    Icons
*/
.fa {
    font-size: 12px;
    margin-left: .25em;
    margin-right: .25em;
    color: var(--icon-color);
    text-shadow:2px 2px 4px var(--shadow-color);
    opacity: var(--icon-opacity);
}

.details-info .fa {
    color: black;
    text-shadow: none;
}

/* Blinking text. */
@keyframes blink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 1;
        color: red;
    }
    100% {
        opacity: 1;
    }
}

/* 
    Popup
*/

/* Popup container. */
.popup {
    display: block;
    cursor: pointer;
}

/* The actual popup. */
.popup .popuptext {
    visibility: hidden;
    position: fixed;
    z-index: 9;  /* Show in front of all elements. */
    overflow-y: scroll;  /* Enable vertical scrolling. */
    background-color: var(--bg-popup);
    top: 8px;
    width: calc(100vw - 32px);
    max-width: calc(var(--page-width-max) - 32px - 8px);
    height: calc(100vh - 32px);
    border-radius: 8px;
    padding: 8px;
}

/* Hide and show the popup. */
.popup .show {
    visibility: visible;
    -webkit-animation: fadeIn 1s;
    animation: fadeIn 1s;
}
  
/* Add animation (fade in the popup). */
@-webkit-keyframes fadeIn {
    from {opacity: 0;} 
    to {opacity: 1;}
}
  
@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity:1 ;}
}

/*
    Slides
*/

/* Slideshow container */
.slideshow-container {
    position: relative;
    background-color: var(--bg);
    padding: 1px;
  }
  
/* Slides */
.slide-quote {
    display: none;
    text-align: center;
}

.slide-quote .title-handwritten {
    font-family: "Dancing Script", cursive;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 1.4em;
}

.slide-quote .quote-container {
    background-color: white;
    display: grid;
    /* Even width columns */
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
}

.slide-quote .quote-text {
    grid-row: 1 / 5;
    grid-column: 1;
    padding-left: 1em;
    padding-right: 1em;
    align-content: center;
    min-height: 4em;
}
@media screen and (max-width: 512px) {
    .slide-quote .quote-text {
        min-height: 8em;
    }
}

.slide-quote .author {
    grid-row: 5;
    grid-column: 1;
    align-items: center;
}
  
/* Next & previous buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    padding: 16px;
    font-weight: bold;
    font-size: 32px;
    border-radius: 0 3px 3px 0;
    user-select: none;
}
  
/* Position the "next button" to the right */
.next {
    position: absolute;
    right: 0;
    border-radius: 3px 0 0 3px;
}
  
/* On hover, change color. */
.prev:hover, .next:hover {
    color: var(--details-active);
}

.slideshow-grid-container {
    display: grid;
    /* Even width columns */
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
}

.slideshow-grid-container .img-butterfly-left {
    grid-row: 1;
    grid-column: 1;
    max-width: 60px;
    justify-self: center;
    margin-left: 10px;
    margin-right: 10px;
    padding: 5px;
}

.slideshow-grid-container .dot-container {
    grid-row: 1;
    grid-column: 2 / 7;
}

.slideshow-grid-container .img-butterfly-right {
    grid-row: 1;
    grid-column: 7;
    max-width: 60px;
    justify-self: center;
    margin-left: 10px;
    margin-right: 10px;
    padding: 5px;
}

/* The dot/bullet/indicator container */
.dot-container {
    background-color: var(--bg);
    text-align: center;
    padding: 20px;
}
  
  /* The dots/bullets/indicators */
.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 5px;
    background-color: #a1a1a1;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}
  
 /* Add a background color to the active dot/circle */
.active, .dot:hover {
    background-color: var(--txt-3rd);
}
  

/*
    Helper classes.
*/
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}