/* =========================================================
   World Heritage Explorer - Global Stylesheet
   ---------------------------------------------------------
   Author: World Heritage Explorer 
   ========================================================= */
   

/* ---------- Base Layout ---------- */

html {
  background-color: #f5f6f8;
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  margin: 20px auto;
  padding: 20px;
  background-color: #ffffff;
  max-width: 1400px;
  width: 85%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.content-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 20px;
}

.side-column {
  position: sticky; 
  top: 20px;
}


/* ---------- Typography ---------- */

h1, h2, h3 {
  color: #2c3e50;
}

h2 {
  margin-bottom: 5px;
}

p {
  margin: 0.4em 0;
  
}

a {
  color: #1a73e8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  border-radius: 6px;
}

/* ---------- Boxes & Info Panels ---------- */

.info-box {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  line-height: 1.5em;
}

.info-box.additional-info h3 {
  margin-top: 0;
}

.box {
  border: 1px solid #ccc;
  background-color: #fff;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ---------- Navigation Links ---------- */

.nav-links {
  display: flex;
  flex-direction: column;   /* stack vertically */
  gap: 10px;                /* spacing between links */
  margin-bottom: 20px;
  
}

.nav-links a {
  display: block;
  padding: 8px 12px;
  background: #fff;         /* white background */
  border: 1px solid #ccc;
  border-radius: 5px;
  text-decoration: none;
  color: #333;
  line-height: 1.3;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-links a:hover {
  background: #f5f5f5;
}


.nav-links-r {
  justify-content: center;   
  flex-direction: column;   
  gap: 10px;                
  margin-bottom: 20px;
}

.nav-links-r a {
  display: grid;            
  justify-items: center;   
  align-items: center;     
  padding: 10px 20px;        
  background: #fff;          
  border: 1px solid #ccc;   
  border-radius: 5px;      
  text-decoration: none;
  color: #333;              
  font-size: 16px;          
  line-height: 1.3;
}

.nav-links-r a:hover {
  background: #f5f5f5;
}

/* ---------- Random Button  ---------- */

.random-button-container {
  display: flex;
  justify-content: center;   
  margin-bottom: 20px;       
  gap: 10px;                
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.random-site-btn {
  display: block;
  width: 100%;  
  padding: 10px 20px;        
  background: #fff;          
  border: 1px solid #ccc;   
  border-radius: 5px;       
  text-decoration: none;
  color: #333;            
  font-size: 16px;         
  line-height: 1.3;
  cursor: pointer;         
  transition: background 0.3s ease;  
}

.random-site-btn:hover {
  background: #f5f5f5;        
}

 #randomButton {
        background-color: #007BFF;
        color: white;
        border: none;
        padding: 14px 28px;
        font-size: 1.2em;
        border-radius: 6px;
        cursor: pointer;
        margin: 20px 0;
        transition: background-color 0.3s;
      }
      #randomButton:hover {
        background-color: #0056b3;
      }
      
/* ----------------------------------------------------
   NAVIGATION
---------------------------------------------------- */
/* ----------------------------------------------------
   STICKY NAVBAR
---------------------------------------------------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 0 6px rgba(0,0,0,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;  
    align-items: center;
    padding: 12px 20px;
    max-width: none;
    margin: auto;
}

/* Logo */
.nav-logo {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 20px;
    text-decoration: none;
}

.nav-brand-small {
    list-style: none;
    margin: 0;
    padding: 0;
    margin-right: auto;
    color: #1a1a1a;
    font-weight: 500;
    text-decoration: none;
}

.nav-brand-small a {
    color: #1a1a1a;
    text-decoration: none;
}

.nav-brand-small a:hover {
    color: #1a73e8;
    text-decoration: none;
}

/* ----------------------------------------------------
   DESKTOP MENU
---------------------------------------------------- */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    padding: 10px 15px;
    color: #1a1a1a;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-menu a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 0;
    height: 2px;
    background: #1a73e8;
    transition: all 0.25s ease;
    transform: translateX(-50%);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 70%;
}

/* Hover color */
.nav-menu a:hover {
    color: #1a73e8;
}


/* ----------------------------------------------------
   DROPDOWN MENUS
---------------------------------------------------- */

.dropdown {
    position: relative; 
}


.dropdown-menu {
    position: absolute;
    top: 44px;
    left: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    list-style: none;
    padding: 8px 0;
    display: none; 
    min-width: 180px;
    z-index: 1000;
}

/* show submenu when parent has 'open' class */
.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    padding: 10px 15px;
    display: block;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background: #f5f5f5;
}



/* ----------------------------------------------------
   MOBILE MENU
---------------------------------------------------- */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: #1a1a1a;
    margin: 5px 0;
    transition: 0.3s;
}

/* ---------- Header Branding ---------- */

.site-header {
  display: flex;
  justify-content: center; 
  padding: 20px;
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center; 
  gap: 20px;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.logo {
  width: 130px;
  height: auto;
}

.text-block {
  display: flex;
  flex-direction: column;
}

.site-title {
  margin: 0;
  font-size: 3.5rem;
  font-weight: 600;
  color: #1a73e8;
  line-height: 1.1;
}


.tagline {
  margin: 5px 0 0 0;
  font-size: 1.5rem;
  text-align: left;
  color: #666;
}


.site-header .brand span {
  color: #2c3e50;
  font-weight: 300;
  margin-left: 4px;
  line-height: 1.0;
}


.site-header .nav-links {
  margin-top: 10px;
  display: inline-flex;
  gap: 25px;
}

.site-header .nav-links a {
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95em;
  transition: color 0.2s ease;
}

.site-header .nav-links a:hover {
  color: #1a73e8;
}


/* ---------- TOC / Search Page ---------- */

#searchBox {
  width: 50%;
  padding: 14px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1.3px solid #ccc;
  font-size: 1.1em;
  display: block;
  margin: 0 0 20px 0;
}


#tocList {
  list-style: none;
  padding: 0;
}

#tocList li {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 15px;
  margin-bottom: 10px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#tocList li a {
  font-weight: 600;
  color: #1a73e8;
}

#tocList li .country {
  color: #555;
  font-size: 0.95em;
}

#tocList li .year {
  color: #777;
  font-size: 0.9em;
}

/* ---------- Footer ---------- */

footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.85em;
  color: #666;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-list a {
  padding: 6px 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.sidebar-list a:hover {
  background: transparent;
  text-decoration: underline;
}

.sidebar-list a[aria-current="page"] {
  color: #1a73e8;
  font-weight: 600;
}


/* ---------- Intro ---------- */

.intro {
  text-align: center;
  background: linear-gradient(135deg, #f6f8fb, #eef2f8);
  padding: 28px 20px;
  margin-bottom: 30px;
  border-radius: 10px;
  border: 1px solid #e0e6ef;
}

.intro h2 {
  font-size: 1.4rem;            
  margin-bottom: 10px;
  font-weight: 600;
}

.intro p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 16px;
}

.intro-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-outline {
  color: #444;
  border: 2px solid #666;  
  background: transparent;
}

.btn-outline:hover {
  background: #e9edf3;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: #ffffff;
  color: #1a73e8;
  border: 2px solid #1a73e8;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.btn-primary:hover {
  background: #f2f7ff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  color: #1a73e8;
  border: 2px solid #1a73e8;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.features-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  text-align: center;
  margin-bottom: 30px;
}

.features-row > div {
  flex: 1 1 250px;
  margin: 10px;
}

/* Featured Sites */

.featured-sites {
  margin-bottom: 15px;
}

.featured-title {
  text-align: center;
  margin-bottom: 10px;
  font-size: 1.1em;
}

.featured-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.featured-item {
  text-align: center;
  width: 250px;
}

.featured-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.featured-item img {
  width: 250px;
  height: 150px;
  object-fit: cover;
  border: 1px solid #999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.featured-item:hover img {
  transform: scale(1.03);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.featured-caption {
  font-size: 0.85em;
  margin-top: 4px;
}

.featured-footer {
  text-align: center;
  margin-top: 20px;
}

.featured-footer a {
  font-weight: 500;
}

.criteria-section {
  scroll-margin-top: 55px; 
}

/* ---------- Responsive Adjustments ---------- */


@media (max-width: 850px) {
  /* Body adjustments */
  body {
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
  }

 .logo {
    max-width: 70px;      
  }

  .brand {
    flex-direction: row;  
    align-items: center;     
    gap: 9px;
  }
  
  .site-title {
  font-size: 1.6rem; 
  text-align: center; 
  line-height: 1.1;
}
  
.tagline {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
  }

  .site-header .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .site-header .nav-links a {
    font-size: 0.85em;
  }

 .content-layout {
    grid-template-columns: 1fr;
  } 
  .side-column {
    position: static;
  }

  /* Typography */
  h2 {
    font-size: 1.3em;
    margin-bottom: 5px;
  }
  h3 {
    font-size: 1.1em;
  }
  p {
    font-size: 1.0em;
  }

  /* Boxes & info panels */
  .info-box, .box {
    padding: 10px 12px;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
  }
  
  #searchBox {
    width: 90%; 
  }

  /* TOC / Search page */
  #tocList li {
    padding: 8px 10px;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
  }
  #tocList li a {
    font-size: 0.95em;
  }
  #tocList li .country,
  #tocList li .year {
    font-size: 0.8em;
  }

  /* Map */
  #map {
    height: 200px;
    width: 100%;
  }

  /* Images */
  img {
    max-width: 100%;
    height: auto;
  }
  /* Naviagtion */ 
  .navbar ul {
        padding: 10px 0;
    }

    .navbar li {
        padding: 0 10px;
        font-size: 15px;
    }

    .navbar li + li::before {
        left: -6px;
        color: #d0d0d0; 
        font-size: 14px;
    }

    .hamburger {
        display: block;
        cursor: pointer;
        margin-left: auto; 
    }

    .hamburger span {
        display: block;
        width: 26px;
        height: 3px;
        background: #1a1a1a;
        margin: 5px 0;
        transition: 0.3s;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid #e0e0e0;
        z-index: 999;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        border-radius: 0 0 6px 6px;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #e0e0e0;
    }

    .nav-menu a {
        padding: 14px 0;
        display: block;
    }

    /* Mobile dropdowns */
    .dropdown-menu {
        position: static;
        display: none;
        opacity: 1;
        transform: none;
        box-shadow: none;
        background: #f9f9f9;
    }

    .dropdown.open .dropdown-menu {
        display: block;
    }

}


   

