@keyframes sun {
    to {
        transform: rotate(360deg);
    }
}

@keyframes phone {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@font-face {
    font-family: "Kalam";
    src: url("fonts/Kalam/Kalam-Regular.woff") format('woff');
    font-display: swap;
}

@font-face {
    font-family: "Merienda";
    src: url("fonts/Merienda/Merienda-VariableFont_wght.woff") format('woff');
    font-display: swap;
}

@font-face {
    font-family: "Mali";
    src: url("fonts/Mali/Mali-Regular.woff") format('woff');
    font-display: swap;
}

/* @font-face {
    font-family: "Grandstander";
    src: url("fonts/grandstander/Grandstander-VariableFont_wght.ttf");
}

@font-face {
    font-family: "Julee";
    src: url("fonts/Julee/Julee-Regular.ttf");
}


@font-face {
    font-family: "MarckScript";
    src: url("fonts/Marck_Script/MarckScript-Regular.ttf");
} */


:root {
    --bijela: #f0f0f0;
    --crna: #303030;
    --white: #fff;
    --black: #000;
    --primary-color: #ff6702;
    --zelena: #32eb45;
}

.loading {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--crna);
    z-index: 99;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.2s;
}

.gg-sun {
    scale: 5;
    color: gold;
    transition: 0.2s;
    box-sizing: border-box;
    position: relative;
    display: none;
    opacity: 0;
    width: 24px;
    height: 24px;
    background:
        linear-gradient(to bottom,
            currentColor 4px, transparent 0) no-repeat 5px -6px/2px 6px,
        linear-gradient(to bottom,
            currentColor 4px, transparent 0) no-repeat 5px 14px/2px 6px,
        linear-gradient(to bottom,
            currentColor 4px, transparent 0) no-repeat -8px 5px/6px 2px,
        linear-gradient(to bottom,
            currentColor 4px, transparent 0) no-repeat 14px 5px/6px 2px;
    border-radius: 25px;
    box-shadow: inset 0 0 0 2px;
    border: 6px solid transparent;
    animation: sun 1s linear infinite;
}

.gg-sun::after,
.gg-sun::before {
    content: "";
    display: block;
    box-sizing: border-box;
    position: absolute;
    width: 24px;
    height: 2px;
    border-right: 4px solid;
    border-left: 4px solid;
    left: -6px;
    top: 5px
}

.gg-sun::before {
    transform: rotate(-45deg)
}

.gg-sun::after {
    transform: rotate(45deg)
}

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
}

::-webkit-scrollbar-track {
    background-color: var(--crna);
}

body {
    font-family: 'Mali';
    margin: 0;
    padding: 0;
    background-color: var(--crna);
    color: var(--bijela);
    overflow: hidden;
}

h1 {
    font-family: "merienda";
    font-size: xxx-large;
    color: var(--bijela);
    text-align: center;
}

h2 {
    font-family: "kalam";
    font-size: xx-large;
    color: var(--primary-color);
    text-align: center;
}

h3 {
    font-family: "kalam";
    font-size: x-large;
    color: var(--primary-color);

}

p {
    line-height: 1.5;
}

li {
    line-height: 1.5;
}

a {
    transition: transform 0.3s;
    color: var(--primary-color);
    text-decoration: underline;
}

section a {
    display: block;
    width: fit-content;
}

.poveznica {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 0 0 20px 20px;
    padding: 15px;
    display: block;
    width: fit-content;
    /* margin: auto; */
    margin-top: -80px;
    text-transform: uppercase;
    box-shadow: inset 0 0 5px black;
    transition: box-shadow 0.3s, transform 0.3s;
    padding-top: 50px;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
}

.poveznica:hover {
    box-shadow: none;
    transform: translateY(10px);
}

.poveznica:nth-of-type(2n) {
    margin-left: auto;
}

svg {
    fill: var(--zelena);
}

nav svg {
    fill: var(--primary-color);
}

header {
    background-color: var(--crna);
    color: var(--bijela);
    text-align: center;
    height: 90px;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 10;
    box-shadow: 0 0 20px var(--black);
}

.navbar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar>a {
    display: flex;
    justify-content: center;
    align-items: center;
}

.navbar img {
    width: 200px;
}

#color-mode {
    position: absolute;
    top: 0;
    left: 0;
}

main {
    margin: auto;
    margin-top: 130px;
    width: 90vw;
    min-height: calc(100vh - 130px - 116px);
}

.subtitle {
    font-style: italic;
}

section {
    margin: 40px auto;
    padding: 30px;
    border-radius: 10px;
    background-color: var(--crna);
    box-shadow: 0 0 20px rgba(0, 0, 0, 1);
    transition: transform 0.3s ease-in-out;
    z-index: 2;
    position: relative;
}

a:hover {
    transform: scale(1.05);
}

.artwork-container,
.interactive-container,
.art-effect-container {
    margin-top: 20px;
    text-align: center;
}

main img {
    max-width: 100%;
    height: auto;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
}

.logo img {
    width: 50px;
}

form {
    display: grid;
    grid-gap: 10px;
}

input,
textarea {
    border-radius: 25px;
    padding: 10px;
    background-color: var(--crna);
    color: var(--primary-color);
    font-weight: 800;
    box-shadow: 0 0 5px var(--bijela);
    border: 1px solid var(--bijela);
    font-size: 16px;
}

#submit {
    text-transform: uppercase;
    background-color: var(--crna);
}

input:focus,
textarea:focus {
    box-shadow: inset 0 0 10px;
}

label {
    color: var(--primary-color);
    font-weight: bold;
}

::selection {
    color: white;
    background-color: var(--primary-color);
}

#contact h2 {
    text-align: center;
}

#contact p {
    text-align: justify;
}

footer {
    background-color: var(--crna);
    color: var(--bijela);
    text-align: center;
    padding: 10px 0;
    width: 100%;
    box-shadow: 0 0 20px var(--black);
}


nav {
    background-color: var(--crna);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

nav li {
    float: left;
}

nav a {
    display: block;
    color: var(--bijela);
    text-align: right;
    padding: 14px 16px;
    text-decoration: none;
}

nav ul a:hover {
    background-color: var(--bijela);
    color: var(--crna);
}


#hero {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    margin: auto;
    max-width: 500px;
    padding: 0;
}

#hero p {
    color: white;
}

#hero h1 {
    color: white;
}

.hero-link {
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: transform 0.3s ease-in-out;
    position: relative;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* background-image: linear-gradient(rgba(0, 0, 0, 0.5), transparent); */
    background-color: rgba(0, 0, 0, 0.5);
    /* Adjust the last value for transparency (0 to 1) */
    z-index: 1;
    color: var(--bijela);
    border-radius: 8px 8px 0 0;
}

/* .hero-text {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
} */

#section1 {
    padding: 20px;
    text-align: center;
    display: grid;
    grid-template-columns: auto auto;
    row-gap: 50px;
}

#why-solar .benefit-item>div {
    display: flex;
    align-items: center;
}

#section1 img {
    width: 100px;
}

#section2 {
    padding: 20px;
    text-align: center;
}

#section3 {
    border: 2px solid #27ae60;
    padding: 15px;
    text-align: center;
}

#section3 img {
    max-width: 100%;
    height: auto;
}

/* Mobile Navigation Styles */
.menu-icon {
    cursor: pointer;
    position: absolute;
    right: -55px;
    top: 25.5px;
    color: var(--crna);
    z-index: 1001;
    display: inline-block;
}

.bar1,
.bar2,
.bar3 {
    width: 35px;
    height: 5px;
    background-color: var(--bijela);
    margin: 6px 0;
    transition: 0.3s;
    box-shadow: 0 0 5px var(--primary-color);
    border-radius: 5px;
}

/* Rotate first bar */
.change .bar1 {
    transform: translate(0, 11px) rotate(-45deg);
    background-color: red;
}

/* Fade out the second bar */
.change .bar2 {
    opacity: 0;
}

/* Rotate last bar */
.change .bar3 {
    transform: translate(0, -11px) rotate(45deg);
    background-color: red;
}

.menu-icon img {
    width: 50px;
}

.nav-links {
    position: fixed;
    top: 0;
    left: -50%;
    /* Start off-screen */
    width: 50%;
    height: 100%;
    background-color: var(--crna);
    /* Set your background color */
    z-index: 1000;
    /* Set a higher z-index to ensure it overlays other elements */
    transition: left 0.3s ease;
    /* Add transition for smooth sliding effect */
}

.nav-links.show+div>a {
    display: none;
}

.nav-links ul {
    list-style: none;
    padding: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--bijela);
    /* Set your link color */
    font-size: 18px;
    /* Set your link font size */
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.nav-links a:not(#color-mode):hover{
    box-shadow: 0 0 20px black;
}

.nav-links.show {
    left: 0;
    box-shadow: 0 0 20px var(--black);
    /* Slide in from the left */
}

.logo {
    position: fixed;
    right: 20px;
    top: 20px;
    width: 50px;
    height: 50px;
}

.logo a {
    display: block;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone1 {
    opacity: 0;
    animation: phone 1s linear infinite forwards;
}

.phone2 {
    opacity: 0;
    animation: phone 1s linear infinite forwards;
    animation-delay: 0.1s;
}

.to-top {
    position: fixed;
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    background-color: rgba(51, 51, 51, 0.7);
    z-index: 5;
    transition: opacity 0.2s;
    transition: background-color 0.2s;
    display: none;
    opacity: 0;
    color: var(--bijela);
    cursor: pointer;
    border-radius: 25px;
    box-shadow: 0 0 20px var(--black);
}

.light .to-top {
    background-color: rgba(240, 240, 240, 0.7);
}

.to-top:hover {
    background-color: var(--bijela);
}

.to-top:hover svg {
    fill: var(--crna);
}

.to-top svg {
    fill: var(--bijela);
    width: 30px;
    height: 30px;
    margin: 10px;
}

#color-mode svg {
    fill: var(--primary-color);
    transition: opacity 0.3s;
    transition: transform 0.3s;
}

.light .dark-mode {
    opacity: 0.5;
}

body:not(.light) .light-mode {
    opacity: 0.5;
}

.light .dark-mode:hover {
    opacity: 1;
}

body:not(.light) .light-mode:hover {
    opacity: 1;
}

body:not(.light) #color-mode:has(.light-mode:hover) .dark-mode {
    opacity: 0.5;
}

.light #color-mode:has(.dark-mode:hover) .light-mode {
    opacity: 0.5;
}

.poveznica:focus-visible{
    outline: none;
}

/*desktop*/
@media (min-width: 992px) {
    .logo {
        display: none;
    }

    .phone1,
    .phone2 {
        animation-play-state: paused;
    }

    .nav-links {
        position: static;
        width: auto;
        box-shadow: none;
        top: auto;
        left: auto;
    }

    .nav-links a{
        font-size: 15px;
        padding: 14px 10px;
    }

    nav ul {
        flex-direction: row;
        align-items: baseline;
    }

    header {
        display: flex;
        justify-content: space-evenly;
        flex-direction: row-reverse;
    }

    .menu-icon {
        display: none;
    }

    #color-mode {
        cursor: pointer;
        top: auto;
        right: 0;
        left: auto;
        row-gap: 5px;
    }

    main {
        width: 900px;
    }

    .za-kuce {
        display: flex;
    }

    nav ul{
        overflow: visible;
    }

    .navbar{
        position: absolute;
        left: 8px;
    }

    .navbar img{
        width: 130px;
        padding: 20px 0;
    }

    .nav-links ul{
        padding: 0;
    }
}

@media (min-width: 1292px) {
    .nav-links a{
        padding: 14px 16px;
        font-size: 18px;
    }

    .navbar img{
        width: 180px;
    }

    main {
        width: 1200px;
    }
}