@font-face {
  font-family: open-sans;
  src: url(OpenSans-VariableFont_wdth,wght.ttf);
}

html, body {
    height: 100%;
    margin: 0;
}

body{
  font-family: open-sans;
  margin:0;
    overflow-x:hidden;
  /*     background-image: url('etusivu.png');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 100% 100%;*/
 
}

/* NAVBAR */

.topnav{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 0px 15px;
  height: 50px;
  border-bottom: 2px solid #2a5bd7;
  background-color: white;



}

.nav-left,
.nav-right{
  display:flex;
  align-items:center;
  gap:20px;
}

/* normal links */

.topnav a{
  text-decoration:none;
  color:rgb(0, 0, 0);
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 4px;
}


.topnav a:hover{
  background:#ddd;
  color:black;
}



/* right side items */

/*.nav-right{
  margin-left:auto;
  display:flex;
}

/* DROPDOWN */

.dropdown{
  position:relative;
}

.dropbtn{
  background:none;
      border:none;
  color:rgb(0, 0, 0);
  cursor:pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;


}

/* dropdown menu */

.dropdown-content{
  position:absolute;
  top:100%;
  left:0;
  background:#f9f9f9;
  min-width:200px;
  box-shadow:0 4px 10px rgba(0,0,0,0.1);
    opacity:0;
  visibility:hidden;
  transform:translateY(-10px);
  transition:0.2s ease;
}

.dropdown-content a{
  display:block;
  padding:10px;
  color:black;
  font-size: 12px;
}

.dropdown-content a:hover{
  background:#ddd;
}

/* show dropdown */

.dropdown:hover .dropdown-content{
  display:block;
    opacity:1;
  visibility:visible;
  transform:translateY(0);
}

.hattutausta {
 padding: 5px 10px;
 background-color: #3b56a3; 
 height: 30px;
 width:40px ;
 align-items: center;


}
.nav-right a{
    gap: 10px;
  margin-right:10px;
}
#icon {
    color: grey;
    font-size: 18px;
}

.pakki {
    background-color: #3b56a3;
    color: white;
    text-align: center;
    padding: 30px 20px;
    border-bottom: 3px solid #3b56a3;
      box-shadow: inset 0 -1px 0 rgba(255,255,255,0.2);
 
}
.pakki h1{
    margin:0;
    font-size: 28px;
    font-weight: 500;
}

.pakki p{
      margin-top:10px;
  font-size:13px;
  max-width:800px;
  margin-left:auto;
  margin-right:auto;
  line-height:1.4;
}

.dashboard{
  display:flex;
  gap:20px;
  padding:20px;
}

.kortti{
  background:#3b56a3;
  color:white;

  border-radius:4px;
    overflow:hidden;
      width:450px;
      max-height: 350px;
}

.right-card{
  background:white;
  padding:20px;
  border-radius:4px;
  flex:2;
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
}
.card-header{
  background:#324c94;
  padding:10px 15px;
  font-weight:600;
  display:flex;
  align-items:center;
  gap:8px;
}

/* CONTENT LAYOUT */

.card-content{
  display:flex;
  justify-content:space-between;
  padding:15px;
  gap:20px;
}

/* COLUMNS */

.left-column{
  flex:1;
  font-size: 15px;
}

.right-column{
  flex:1;
  text-align:left;
}

/* CREDITS SECTION */

.credits{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:15px;
}

/* fake circle (progress placeholder) */

.circle{
  width:30px;
  height:30px;
  border-radius:50%;
  border:15px solid rgba(255,255,255,0.3);
}

/* TEXT STYLING */

.right-column p{
  margin:5px 0;
  font-size:13px;
}

.time{
  margin-top:30px;
  font-size:12px;
  opacity:0.9;
}
.kortti p{
  margin:4px 0;   /* smaller vertical spacing */
}

.kortti h2{
  margin:0;
}

/* buttons */

.tabs{
  display:flex;
  gap:5px;
  margin-bottom:10px;
}

.tab{
  padding:8px 12px;
  border:1px solid #ccc;
  background:#eee;
  cursor:pointer;
  border-radius:4px 4px 0 0;
}

.tab.active{
  background:white;
  border-bottom:none;
}

/* content */

.tab-content{
  display:none;
}

.tab-content.active{
  display:block;
}

/* table styling */

table{
  width:100%;
  border-collapse:collapse;
        width:450px;
}

td, th{
  padding:10px;
  text-align:right;
}

tr:nth-child(even){
  background:#f3f3f3;
}

.link-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr); /* 4 per row */
  gap:40px;
  padding:40px;
  text-align:center;
}

/* each item */

.grid-item{
  text-decoration:none;
  color:#2a5bd7;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

/* icon circle */

.icon{
  width:80px;
  height:80px;
  background:#5a6fa8;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:white;
  font-size:30px;
}

/* title */

.grid-item h3{
  margin:0;
  font-size:16px;
  font-weight:500;
}

/* description */

.grid-item p{
  font-size:13px;
  color:#333;
  max-width:220px;
  margin:0;
}

/* hover effect */

.grid-item:hover .icon{
  background:#2a5bd7;
}

.grid-item:hover{
  transform:translateY(-3px);
  transition:0.2s;
}

@media (max-width:1000px){
  .link-grid{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width:600px){
  .link-grid{
    grid-template-columns: 1fr;
  }
}

/* overlay background */

.popup-overlay{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.3);
  display:none;
  justify-content:center;
  align-items:center;
  z-index:1000;
}

/* popup box */

.popup{
  background:white;
  width:500px;
  border-radius:6px;
  box-shadow:0 4px 20px rgba(0,0,0,0.2);
  overflow:hidden;
}

/* header */

.popup-header{
  padding:12px 15px;
  font-weight:600;
  display:flex;
  justify-content:space-between;
  border-bottom:1px solid #ddd;
}

/* close button */

.close{
  cursor:pointer;
  font-size:18px;
}

/* content */

.popup-content{
  padding:15px;
}

/* message box */

.message{
  background:#d9edf7;
  padding:12px;
  border-radius:4px;
  margin-bottom:15px;
}

/* footer */

.popup-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
}