/*
Theme Name: Techtell Theme
Theme URI: https://techtell.se/
Template: oceanwp
Author: Amar Delic
Author URI: https://smedigt.se/
Description: Fully optimized website, packed with features while being lightweight.
Version: 1.0
Requires PHP: 6.0
Text Domain: techtell
*/

/* ––––– ROOT VARIABLES ––––– */

:root {
	--site-max-width: 1400px;
	
	--border-radius: 5px;
	--button-border-radius: 8px 8px 0 8px;
	
	--padding-v: 50px;
	--padding-h: 20px;
	--narrow-padding-v: 40px;
	--content-padding: 20px;
	--header-padding: 50px;
	
	--main-font: "Jost", sans-serif;
	--secondary-font: "Source Sans Pro", sans-serif;
	
	--font-size-hero: 2.75rem;
	
	--green-btn-color: #147B53;
	--green-btn-color-hover: #158F5E;
	--green-dark-bg-color: #0C4F34;
	--green-bright-bg-1-color: #F3FFFA;
	--green-bright-bg-2-color: #E8F9EE;
	--green-accent-color: #1FCF88;
	--black-color: #000000;
	--black-color-hover: #333333;
	--white-color: white;
	--white-color-hover: #EBEBEB;
	--overlay-color: black;
}

::selection {
    background: var(--green-dark-bg-color);
    color: var(--white-color);
}

.green-dark-bg ::selection,
.black-bg ::selection{
    background: var(--white-color);
    color: var(--black-color);
}

@media screen and (min-width: 750px) {
    :root {
        --padding-v: 100px;
	    --padding-h: 40px;
	    --content-padding: 40px;
	    --narrow-padding-v: 70px;
	    --header-padding: 150px;
	    
	    --font-size-hero: min( 80px, calc( 1rem + 2vw + 2vh ) );
    }
}

@media screen and (min-width: 1200px) {
    :root {
        --content-padding: 30px;
    }
}

@media screen and (min-width: 1450px) {
    :root {
        --content-padding: 40px;
    }
}

/* ––––– FONTS ––––– */

html[lang] {
    margin: 0 !important;
    font-size: 14px;
    scroll-behavior: smooth;
    overflow-x: hidden;
    background: var(--green-bright-bg-2-color);
}

body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* FONT & TRANSFORM */
#menu-header .menu-item > a,
.main-font {
    font-family: var(--main-font);
}

.secondary-font {
    font-family: var(--secondary-font);
}

.uppercase {
    text-transform: uppercase;
}

/* STYLE */
.f-italic {
    font-style: italic;
}

/* WEIGHT */
.f-300 {
    font-weight: 300;
}

.f-400 {
    font-weight: 400;
}

.long-text h2,
.long-text h3,
.long-text h4 {
    font-weight: bold;
}

.bold,
.f-700 {
    font-weight: 700
}


/* SIZE */
.f-big-kpi {
    font-size: 5rem;
    line-height: 1em;
}

.f-hero {
    font-size: var(--font-size-hero);
    line-height: 1.2em;
}

.f-article-title {
    font-size: 2.5rem;
    line-height: 1.2em;
}

.f-big {
    font-size: 2.1rem;
    line-height: 1.2em;
}

.long-text h2 {
    font-size: 1.9rem;
    line-height: 1.2em;
}

.f-mid,
.long-text h3 {
    font-size: 1.5rem;
    line-height: 1.5em;
}

.f-mid-small,
.long-text h4 {
    font-size: 1.25rem;
    line-height: 2em;
}

.f-small {
    font-size: 16px;
    line-height: 1.7em;
}

.f-smallest {
    font-size: 1rem;
    line-height: 1.2em;
}

@media screen and (min-width: 750px) {
    /* KPI siffror*/
    .f-big-kpi {
        font-size: 6rem;
        line-height: 1em;
    }
    
    /* Hero titel */
    .f-hero {
        font-size: var(--font-size-hero);
        line-height: 1.2em;
    }
    
    /* Artikel titel */
    .f-article-title {
        font-size: 3rem;
        line-height: 1.2em;
    }
    
    /* Sektion heading & highlight pricing */
    .f-big {
        font-size: 2.3rem;
        line-height: 1.2em;
    }
    
    .long-text h2 {
        font-size: 1.9rem;
        line-height: 1.2em;
    }
    
    /* Sektion subheading & footerlänkar */
    .f-mid,
    .long-text h3 {
        font-size: 1.5rem;
        line-height: 1.5em;
    }
    
    /* Spaltrubriker */
    .f-mid-small,
    .long-text h4 {
        font-size: 1.1rem;
        line-height: 2em;
    }
    
    /* Brödtext, knappar & meny */
    .f-small {
        font-size: 1rem;
        line-height: 1.7em;
    }
    
    /* Mindre brödtext */
    .f-smallest {
        font-size: 0.85rem;
        line-height: 1.2em;
    }
}

@media screen and (min-width: 1200px) {
    .f-big-kpi {
        font-size: 8rem;
        line-height: 1em;
    }
}

/* DECORATION */
.underline {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.f-hero u,
.f-article-title u,
.f-big u,
.f-hero.underline, 
.f-article-title.underline,
.f-big.underline {
    text-decoration: underline;
    text-decoration-thickness: 0.1em;
    text-decoration-color: var(--green-accent-color);
    text-decoration-skip-ink: none;
        text-underline-offset: 0.1em;
}

/* TEXT LAYOUT */
h1, h2, h3, h4, h5, h6, h7, h8, p {
    margin-block-start: 0;
    margin-block-end: 0;
}

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

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

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

br.big {
    display: none;
}

@media screen and (min-width: 750px) and (max-width: 1199px) {
    html {
        font-size: 16px;
    }
    
    br.mid {
        display: inline;
    }
}

@media screen and (min-width: 1200px) {
    html[lang] {
        font-size: 18px;
    }
    
    br.big {
        display: inline;
    }
}


/* ––––– COLORS ––––– */
.green-dark-bg {
    background: var(--green-dark-bg-color);
    color: var(--white-color);
    border-color: var(--white-color);
}

.black-bg {
    background: var(--black-color);
    color: var(--white-color);
    border-color: var(--white-color);
}

.green-bright-1-bg {
    background: var(--green-bright-bg-1-color);
    color: var(--black-color);
    border-color: var(--black-color);
}

.green-bright-2-bg {
    background: var(--green-bright-bg-2-color);
    color: var(--black-color);
    border-color: var(--black-color);
}

.grey {
    color: grey;
}


/* ––––– HIDE ––––– */

@media screen and (max-width: 749px) {
    .hide-mobile {
        display: none;
    }
}

/* ––––– HEADER ––––– */

header {
    position: fixed;
    left: 0;
    top: 10px;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 var(--padding-h);
    box-sizing: border-box;
    z-index: 999;
}

header::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    height: calc( 100% + 20px );
    width: 100%;
    background: var(--green-bright-bg-1-color);
    transition: all 0.2s;
    opacity: 0;
    box-shadow: 0px 5px 30px 0px rgb(0 0 0 / 5%);
}

header.scrolled::before {
    opacity: 1;
}

header > .container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 40px;
    padding: 0 !important;
    align-items: center;
    align-content: center;
    z-index: 2;
}

header .header-logo {
    height: 50px;
    width: 60px;
    position: relative;
}

header .header-logo > * {
    position: absolute;
    left: 0;
    top: 0;
}

header:not(.scrolled).dark-bg-below .logo-black-v,
header:not(.scrolled).dark-bg-below .logo-black-h {
    visibility: hidden;
    opacity: 0;
}

#menu-header {
    margin: 0;
}

#menu-header,
#menu-header ul {
    list-style: none;
    padding: 0;
}

#menu-header li {
    position: relative;
}

#menu-header > li > a {
    font-weight: 400;
}

#menu-header .menu-item-has-children > a::after {
    content: '';
    width: 1.5em;
    height: 0.6em;
    margin-left: 0.35em;
    opacity: 0.9;
    transform: translateY(-0.2em);
    display: inline-block;
    background-image: url(https://dev.1337.techtell.se/wp-content/uploads/techtell_sub_chevron.svg);
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

header:not(.scrolled).dark-bg-below #menu-header .menu-item-has-children > a::after,
body.show-mobile-menu #menu-header .menu-item-has-children > a::after
{
    filter: invert(1);
}

#menu-header .menu-item-has-children:hover > a::after,
#menu-header .menu-item-has-children:focus > a::after {
    transform: translateY(-0.2em) rotate(180deg);
}

#menu-header > li > a[href="#"] {
    text-decoration: none !important;
    cursor: default;
}

header:not(.scrolled).dark-bg-below #menu-header > li
{
    color: var(--white-color);
}

header #menu-header .sub-menu {
    color: var(--black-color);
}

#menu-header .sub-menu > li,
#menu-header .sub-menu > li > a {
    font-weight: 300;
    box-sizing: border-box;
    transition: background 0.1s;
}

#menu-header .sub-menu > li:hover {
    background: var(--green-bright-bg-2-color);
}

#menu-header .sub-menu > li:first-child > a {
    padding-top: calc(0.5em + 5px);
}

#menu-header .sub-menu > li:last-child > a {
    padding-bottom: calc(0.5em + 5px);
}

#menu-header li a {
    text-decoration: none;
}

#menu-header li > a:hover,
#menu-header li > a:focus {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--green-accent-color);
    text-decoration-skip-ink: none;
    text-underline-offset: 3px;
}

header:not(.scrolled).dark-bg-below a.button {
    background: var(--white-color);
    color: var(--black-color);
}

header:not(.scrolled).dark-bg-below a.button:hover,
header:not(.scrolled).dark-bg-below a.button:focus{
    background: var(--white-color-hover);
}

@media screen and (min-width: 750px) {
    header {
        position: absolute;
        left: 0;
        top: 50px;
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 0 var(--padding-h);
        box-sizing: border-box;
        z-index: 999;
    }
    
    header::before {
        top: -20px;
        height: calc( 100% + 40px );
    }
    
    header > .container {
        grid-template-columns: auto 1fr auto;
        gap: 40px;
    }
    
    header .header-logo {
        height: 50px;
        width: 100px;
    }
    
    header.scrolled {
        position: fixed;
        top: 20px;
    }
    
    header .logo-white-v,
    header .logo-black-v {
        height: 100px;
        object-position: top;
    }
    
    header.scrolled .logo-white-v,
    header.scrolled .logo-black-v {
        visibility: hidden;
        opacity: 0;
    }
    
    header:not(.scrolled) .logo-white-h,
    header:not(.scrolled) .logo-black-h {
        visibility: hidden;
        opacity: 0;
    }
    
    header .logo-white-h {
        display: none;
    }
    
    .header-cta {
        display: flex;
        justify-content: flex-end;
    }
    
    #menu-header {
        display: flex;
        gap: 40px;
        justify-content: flex-end;
    }
    
    #menu-header .sub-menu {
        visibility: hidden;
        opacity: 0;
        transition: all 0.2s;
        position: absolute;
        left: 0;
        top: calc(100% - 5px);
        white-space: nowrap;
        border-radius: var(--border-radius);
        background: var(--white-color);
        transform: translate(-1em, calc( 1em - 2px));
        box-shadow: 0px 0px 15px rgb(0 0 0 / 10%);
        width: 260px;
    }
    
    #menu-header li:hover > .sub-menu,
    #menu-header .sub-menu:hover,
    #menu-header .sub-menu:focus {
        visibility: visible;
        opacity: 1;
        transform: translate(-1em, calc( 0.5em - 2px) );
    }
    
    #menu-header .sub-menu > li > a {
        display: block;
        padding: 0.5em 1em;
    }
    
    #menu-header .menu-item-has-children > a::after {
        height: 0.5em;
    }
    
    .toggle-mobile-menu-close,
    .toggle-mobile-menu-open {
        display: none;
    }
}


@media screen and (min-width: 1200px) {
    header > .container {
        gap: 60px;
    }
    
    #menu-header {
        gap: 60px;
    }
}

@media screen and (max-width: 749px) {
    body.show-mobile-menu {
        overflow: hidden;
    }
    
    header .header-logo {
        width: 75px;
    }
    
    header .logo-white-v,
    header .logo-black-v {
        display: none;
    }
    
    header.scrolled .logo-white-h {
        visibility: hidden;
        opacity: 0;
    }
    
    #mobile-menu-wrapper {
        position: fixed;
        overflow: scroll;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        display: flex;
        justify-content: center;
        align-content: center;
        align-items: center;
        padding: var(--padding-v) var(--padding-h);
        padding-top: 100px;
        box-sizing: border-box;
        transform: translateX(100%);
        background: var(--green-btn-color);
        color: white;
        transition: transform 0.2s ease;
        z-index: 99;
    }
    
    body.show-mobile-menu #mobile-menu-wrapper {
        transform: translateX(0);
    }
    
    .header-cta {
        display: flex;
        justify-content: flex-end;
    }
    
    .toggle-mobile-menu-open,
    .toggle-mobile-menu-close {
        width: 23px;
        height: 23px;
        position: relative;
    }
    
    .toggle-mobile-menu-close {
        filter: invert(1);
    }
    
    header:not(.scrolled).dark-bg-below .toggle-mobile-menu-open {
        filter: invert(1);
    }
    
    .toggle-mobile-menu-close {
        filter: invert(1);
        position: absolute;
        top: 35px;
        right: var(--padding-h);
        transform: translateY(-50%);
    }
    
    .toggle-mobile-menu-open img,
    .toggle-mobile-menu-close img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
    }
    
    #menu-header {
        display: grid;
        gap: 20px;
    }
    
    div.header-menu {
        width: 100%;
        height: 100%;
    }
    
    nav.header-menu {
        font-size: 2rem;
    }
    
    #menu-header .menu-item-has-children > a::after {
        margin-left: 0.25em;
        transform: translateY(-0.1em);
        height: 0.4em;
    }
    
    #menu-header .sub-menu {
        visibility: hidden;
        opacity: 0;
        transition: all 0.2s;
        background: var(--white-color);
        width: 100%;
        max-height: 0;
        overflow: hidden;
        font-size: 0.8em;
        border-radius: var(--border-radius);
    }
    
    #menu-header li:hover > .sub-menu,
    #menu-header .sub-menu:hover,
    #menu-header .sub-menu:focus {
        visibility: visible;
        opacity: 1;
        max-height: 1000px;
    }
    
    #menu-header .sub-menu > li > a {
        display: block;
        padding: 0 1em;
    }
}

/* ––––– FOOTER ––––– */

#kontakt .kontakt-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

#kontakt .image-col {
    display: none;
}

#kontakt form {
    align-items: flex-start;
    align-content: center;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

#kontakt form > div:not(.contact-choose-message):not(.contact-email-phone) {
    grid-column: span 4;
}

#kontakt form > .contact-email-phone {
    gap: 20px;
    grid-column: span 3;
}

#kontakt form > .contact-choose-message {
    position: relative;
    height: 100%;
}

#kontakt form > .contact-choose-message > .half-circle {
    display: none;
}

#kontakt form > .contact-choose-message > span {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) rotate(10deg);
    white-space: nowrap;
    color: var(--green-btn-color)
}

form input:not([type="checkbox"]) {
    padding: 10px 15px;
    border: none;
    width: 100%;
    background: var(--white-color);
    box-shadow: 4px 4px 4px rgb(0,0,0,0.1);
    border-radius: var(--border-radius);
    font-size: 1rem;
    outline: none !important;
    transition: box-shadow 0.2s ease;
    box-sizing: border-box;
}

form input:hover {
    box-shadow: 4px 4px 4px rgb(0,0,0,0.2);
}

form input:focus {
    box-shadow: 4px 4px 4px rgb(0,0,0,0.3);
}

form input::placeholder {
    opacity: 1;
}

form #kontakt-name {
    text-transform: capitalize;
}

form #kontakt-email {
    text-transform: lowercase;
}

form #kontakt-email::placeholder {
    text-transform: none;
}

form .contact-consent {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: flex-start;
    gap: 20px;
    margin: 10px 0 20px 0;
}

form .contact-consent > input {
    z-index: 1;
    cursor: pointer;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

form .contact-consent > label {
    z-index: 2;
    cursor: pointer;
}

form .contact-consent > .custom-checkbox {
    z-index: 0;
    cursor: pointer;
    width: 30px;
    height: 30px;
    margin-top: 5px;
    background: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: 4px 4px 4px rgb(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

form .contact-consent:hover > .custom-checkbox {
    box-shadow: 4px 4px 4px rgb(0 0 0 / 30%);
}

form .contact-consent > input:checked ~ .custom-checkbox {
    background-image: url('https://techtell.se/wp-content/uploads/techtell_check_dark.png');
    background-size: calc( 100% - 10px );
    background-repeat: no-repeat;
    background-position: center;
}

@media screen and (min-width: 750px) {
    #kontakt .image-col {
        display: flex;
    }
    
    form input:not([type="checkbox"]) {
        padding: 15px 20px;
    }
    
    form .contact-consent {
        margin: 20px 0 40px 0;
    }
}

@media screen and (min-width: 1200px) {
    #kontakt form > .contact-choose-message > .half-circle {
        position: absolute;
        top: 50%;
        left: 0px;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        height: 65px;
        width: 65px;
        border: solid 5px var(--green-btn-color);
        display: block;
        clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
    }
    
    #kontakt form > .contact-choose-message > span {
        left: 55px;
    }
}

footer .footer-links ul {
    list-style: none;
    padding: 0;
    gap: 40px;
    box-sizing: border-box;
    margin: 0;
}

footer .footer-links ul li:not(:last-child) {
    margin-bottom: 10px;
}

footer .footer-links ul a {
    text-decoration: none;
}

footer .footer-links ul a:hover {
    text-decoration: underline;
}

footer .footer-links .last-link {
    margin-bottom: 40px !important;
}

footer .footer-other-links {
    display: flex;
    flex-wrap: wrap;
    margin-top: 40px;
    border-top: solid 2px var(--white-color);
    align-items: end;
    gap: 40px;
    padding-top: 40px;
}

footer .footer-other-links a {
    text-decoration: none;
}

footer .footer-other-links a:hover {
    text-decoration: underline;
}

footer .footer-other-links .footer-logo {
    width: 100%;
}

footer .footer-other-links img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    object-position: left;
}

@media screen and (min-width: 750px) {
    footer .footer-links ul li {
        margin-bottom: 20px !important;
    }
    
    footer .footer-other-links {
        display: grid;
        grid-template-columns: auto auto 1fr 80px;
        padding: 0;
        gap: 60px;
        border: none;
    }
    
    footer .footer-links ul {
        width: 100%;
        columns: 3;
        padding: 0;
        text-align: left;
    }
    
    footer .footer-other-links img {
        width: 100%;
    }
}