/*Benjamín Reynir*/

*{
    margin: 0;
    padding: 0;
}

/*Root-ið*/
:root {
    --Brunn-color: #291317;
    --Gulur-color: #C19B38;
    --Hvitur-color: #F6F4E4;
    --Orans-color: #BC4315;

    --font-family: 'GT America', sans-serif;
    
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}



@font-face {
    font-family: 'GT America';
    src: url(GT-America/GT-America-Black/GT-America-Black.OTF) format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'GT America';
    src: url(GT-America/GT-America-Bold/GT-America-Bold.OTF) format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'GT America';
    src: url(GT-America/GT-America-Compressed-Regular/GT-America-Compressed-Regular.OTF) format('woff2');
    font-weight: 300;
    font-style: normal;
}

html,
input,
select,
button {
    font-family: var(--font-family);
    font-weight: 300;
}

h1{
    font-family: var(--font-family);
    font-weight: 700;
    font-size: large;
}



h2,
h3,
legend {    
    font-weight: 700;
}


body {
    font-family: 'GT America', 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--Brunn-color); 
    line-height: 1.6;
}

/* HEADER */

header {
    background: var(--Brunn-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    color: var(--Hvitur-color);
    text-align: center;
}

.navbar {
    width: 100%;
    box-shadow: 0 1px 4px rgb(146 161 176 / 15%);
    z-index: 4;

}

.nav-container {
    display: block;
    position: relative;
    height: 60px;
    max-width: 1050px;
    width: 90%;
    margin: auto;
}

/* felum checkinn */
.checkbox {
    position: absolute;
    display: block;
    height: 32px;
    width: 32px;
    top: 20px;
    right: 20px;
    z-index: 3;
    opacity: 0;
    cursor: pointer;
}

.hamburger-lines {
    display: block;
    height: 26px;
    width: 32px;
    position: absolute;
    top: 17px;
    right: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.line {
    display: block;
    height: 4px;
    width: 100%;
    border-radius: 10px;
    background: var(--Hvitur-color);
    transition: transform 0.4s ease-in-out;
}

.line1 {
    transform-origin: 0% 0%;
}

.line2 {
    transition: transform 0.2s ease-in-out;
}

.line3 {
    transform-origin: 0% 100%;
}

.logo {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 1.2rem;
    color: var(--Hvitur-color);
    z-index: 3;
}

.logo img {
    height: 40px;
}

.menu-items {
    position: fixed;
    top: 0px; 
    left: 0;
    width: 100%;
    height: calc(100vh); 
    background: var(--Brunn-color);
    overflow: hidden; 
    transform: translateY(-100%);
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
    transition: transform 0.5s ease-in-out;
    
}
.menu-items ul{
    display: flex;
    flex-direction: column;
    margin: 0;
}


.menu-items li {
    list-style: none;
    margin-bottom: 1.2rem;
    font-size: 2rem;
    font-weight: 500;
}

.menu-items a {
    text-decoration: none;
    color: var(--Hvitur-color);
    text-transform: uppercase;
    z-index: 1;
}


.menu-items a:hover {
    color: var(--Orans-color);
}

.menu-items img{
    height: 70px;
}

.menu-items img:hover{
    transform: scale(1.1);
    
}

/* Hamborgara menuinn */
.nav-container input[type="checkbox"]:checked ~ .menu-items {
    transform: translateY(0);
}

.nav-container input[type="checkbox"]:checked ~ .hamburger-lines .line1 {
    transform: rotate(45deg);
}

.nav-container input[type="checkbox"]:checked ~ .hamburger-lines .line2 {
    transform: scaleY(0);
}

.nav-container input[type="checkbox"]:checked ~ .hamburger-lines .line3 {
    transform: rotate(-45deg);
}


 




/* MAIN */

main {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

main img {
    max-width: 100%;
    height: auto;
   
}

main .menu-img{
    margin-top: 60px;
}

main .borger-logo {
    margin: 10px;
    padding: 10px; 
    width: 90vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

main.secondary-page{
    margin-top: 7rem;
    margin-left: 5rem;
    margin-right: 5rem;
    color: #e6b22e;
    background-image: url(myndir/joiKlaukprepp2.jpeg);
    height: 80vh;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

}

main.secondary-page h1{
    padding: 2vh;
    font-size: 2.5rem;
}
main.secondary-page h2{
    padding: 10px;
    font-size: 1.5rem;
}

main.thirdiary-page{
    margin-top: 7rem;
    margin-left: 5rem;
    margin-right: 5rem;
    color: var(--Brunn-color);
    background-color: var(--Gulur-color);
    height: 80vh;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

}

main.thirdiary-page h1{
    padding: 2vh;
    font-size: 2.5rem;
}
main.thirdiary-page h2, p{
    padding: 10px;
    font-size: 1.5rem;
}

main.thirdiary-page a{
    color: var(--Brunn-color);
    text-decoration: none;
}

main.thirdiary-page a:hover{
    color: var(--Orans-color);
}

.carousel-container {
    background-color: var(--Brunn-color);
    padding: 20px;
    padding: 1rem 0; 
    width: 90vw;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; 
    scroll-snap-type: x mandatory; 
}

.cards {
    display: flex;
    gap: 1rem;
    scroll-snap-align: start;
}

.card {
    background: var(--Gulur-color);
    min-width: 250px; 
    width: 60vw;
    height: 45vh;
    overflow: hidden;
    position: relative;
    flex: 0 0 auto; 
    scroll-snap-align: center; 
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-container {
  padding: 2rem 0;
}

.cards {
  gap: 1.5rem;
}

.card {
  min-width: 300px;      
  height: 400px;         
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.card:hover {
  transform: scale(1.05);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* HERO SECTION */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  background: url('myndir/hagavagnbakogstripur.jpeg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  text-align: center;
  color: var(--Hvitur-color);
  background: rgba(0, 0, 0, 0.4);
  padding: 2rem;
  border-radius: 8px;
}

.hero-overlay h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  transition: transform 0.2s, background 0.2s;
}

.btn-primary {
  background: var(--Orans-color);
  color: var(--Hvitur-color);
}

.btn-primary:hover {
  background: var(--Gulur-color);
  transform: translateY(-2px);
}

section {
  padding: 4rem 1rem;
}

h1, h2, h3 {
  line-height: 1.3;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

footer {
  padding: 3rem 1rem;
}

footer h2 {
  margin: 0.75rem 0;
}

.socials {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

html {
  scroll-behavior: smooth;
}



/* FOOTERINN */

footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--Brunn-color); 
    color: var(--Hvitur-color);
    text-align: center;
    padding: 2rem;
}


footer h2 {
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0.5rem 0;
}

footer a {
    color: var(--Hvitur-color);
    text-decoration: none;
}



.socials img {
    width: 3.5em;
}

.socials img:hover {
    transform: scale(1.1);
}



.bar{
    background-color: var(--Hvitur-color);
    height: 2px;
    width: 70vw;
    border-radius: 5px;
}



@media (max-width: 768px) {
    section.hamborgarar {
        flex-direction: column;
        gap: 1.5rem;
    }
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #291317; 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; 
  }
  
  .road {
    position: relative;
    width: 80vw;
    height: 100px; 
    overflow: hidden; 
    background: var(--Gulur-color); 
    border-radius: 50px;
  }
  

  .bus {
    position: absolute;
    width: 80px;
    left: 0px; 
    top: 50%;
    transform: translateY(-50%);
    animation-name: drive;
    animation-duration: 3s;
    animation-play-state: paused;    
    animation-fill-mode: forwards;  
  }
  
  @keyframes drive {
    0% {
      transform: translateY(-50%) translateX(-50px);
    }
    100% {
      transform: translateY(-50%) translateX(calc(90vw));
    }
  }

@media (min-width: 768px) {
  .menu-img {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
    margin: 80px auto 0;
    max-width: 80vw;
  }

  .menu-img img {
    width: calc(50% - 0.5rem);
    height: auto;
  }

  .carousel-container {
    display: none;
  }

  .carousel-section {
    display: none;
  }
   

}
