/* Active tab styling for navigation */
nav a.active {
    background: #989898;
    color: #22223b !important;
    font-weight: bold;
    border-radius: 5px 5px 0 0;
    padding: 0.5em 1em;
    text-decoration: none;
    border-bottom: 2px solid #989898;
    transition: background 0.2s, color 0.2s;
}
/* Add spacing below the guide page description */
.guides-description {
    margin-bottom: 32px;
}
/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    height: 100%;
    /* Ensure body can be 100% height if html is */
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: auto;
    /* Allow scrollbars if needed */
}

/* Styles for the main content container */
.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

/* Full-width container for map page */
body.map-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.map-page .container {
    width: 100vw;
    flex: 1 0 auto;
    margin: 0;
    padding: 0;
    overflow: auto;
    position: relative;
}

/* Navigation Bar */
nav {
    background: #333;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin-right: 20px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
}

nav a:hover {
    text-decoration: underline;
}

/* Headings */
h1,
h2 {
    margin-bottom: 20px;
    color: #333;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-top: 48px;
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d1d5db;
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding-left: 0;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #22223b;
    position: relative;
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin-top: 0;
    width: 100%;
    flex-shrink: 0;
}

/* Page Content Area */
.content-area {
    padding: 20px;
    background: #fff;
    margin-top: 20px;
    border-radius: 5px;
}

/* Ensure content-area on map page doesn't interfere */
body.map-page .content-area {
    padding: 0;
    margin-top: 0;
    height: 100%;
    /* If content-area is used on map page */
}

.map-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f4;
}

.map-image-wrapper {
    position: relative;
    display: inline-block;
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
}

.map-image-wrapper img {
    display: block;
    max-width: 100vw;
    max-height: 100vh;
    width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0;
    padding: 0;
}

.map-button {
    position: absolute;
    /* Positioned relative to map-image-wrapper */
    z-index: 10;
    cursor: pointer;
    background-color: transparent;
    border: none;
    opacity: 0;
    /* Make the button itself fully transparent */
    transition: opacity 0.2s;
    border-radius: 80%;
    width: 3vw;
    height: 3vw;
    min-width: 18px;
    min-height: 18px;
    max-width: 48px;
    max-height: 48px;
}


.secret-map-button {
    position: absolute;
    z-index: 0; /* Put on the most bottom layer */
    cursor: pointer;
    background-color: transparent;
    border: none;
    opacity: 0; /* Semi-transparent for secret buttons */
    transition: opacity 0.2s;
    border-radius: 50%;
    width: 4vw;
    min-width: 24px;
    min-height: 24px;
    max-width: 48px;
    max-height: 48px;
}


/* Custom tooltip for map buttons */
.map-button .custom-tooltip {
    display: none;
    position: absolute;
    left: 50%;
    top: -36px;
    transform: translateX(-50%);
    background: #fff;
    color: #22223b;
    padding: 6px 14px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    font-size: 1rem;
    white-space: nowrap;
    pointer-events: none;
    z-index: 100;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.map-button-svg {
    width: 100%;
    height: 100%;
    display:flex;
    pointer-events: none;
}

.map-button:focus,
.map-button:hover {
    opacity: 0.8;
    /* 40% visible on hover/focus for accessibility */
}

.map-button:hover .custom-tooltip,
.map-button:focus .custom-tooltip {
    display: block;
    /* Show tooltip on hover/focus */
    opacity: 1;
    /* Ensure tooltip is 80% visible */
}



/* Example initial button positions (will be refined in map.html) */
/*
#button-1 {
    top: 10%;
    left: 20%;
}

#button-2 {
    top: 50%;
    left: 60%;
}
*/

/* Basic Sub-menu Styles */
.sub-menu {
    background: #eee;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.sub-menu h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.sub-menu ul {
    list-style: none;
    padding-left: 0;
}

.sub-menu ul li {
    margin-bottom: 5px;
}

.sub-menu ul li a {
    text-decoration: none;
    color: #007bff;
    /* Or your site's link color */
}

.sub-menu ul li a:hover {
    text-decoration: underline;
}

/* Guidebook Page Styles */
/* -------------------------------------------------- */

.guide-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 24px; /* Add space between image and content */
}

.guide-card-image-area {
    flex: 0 0 170px;
    margin-right: 0; /* Use gap instead */
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align image/placeholder to the top left */
    justify-content: flex-start;
}

.guide-card img {
    width: 150px;
    height: 194px; /* Approx 1:1.4 ratio for book cover */
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
}

.placeholder-cover-text {
    width: 150px;
    height: 210px; /* Match image dimensions */
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    color: #495057;
}

.guide-card-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 0;
}

.guide-card h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: none;
    color: #343a40;
    align-self: flex-start;
}

.guide-card p {
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: #495057;
}

.guide-card p em { /* Style for "Coming soon..." */
    color: #6c757d;
    font-style: italic;
}

.guide-card .btn {
    display: inline-block;
    font-weight: 400;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background-color: #007bff;
    border: 1px solid #007bff;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: .25rem;
    text-decoration: none; /* Remove underline from links styled as buttons */
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.guide-card .btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.guide-card .btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}

.guide-card a { /* General link styling within card, if not a button */
    color: #007bff;
}

.guide-card a:hover {
    text-decoration: underline;
}


/* Responsive adjustments for guide cards */
@media (max-width: 768px) {
    .guide-card {
        flex-direction: column;
        align-items: center;
    }
    .guide-card-image-area {
        margin-right: 0;
        margin-bottom: 20px;
        align-items: center;
    }
    .guide-card-content-area {
        align-items: center;
        text-align: center;
        padding-top: 0;
    }
    .guide-card h2 {
        font-size: 1.4rem;
        align-self: center;
    }
}

@media (max-width: 480px) {
    .guide-card img,
    .placeholder-cover-text {
        width: 150px; /* Smaller on very small screens */
        height: 210px;
    }

    .guide-card h2 {
        font-size: 1.3rem;
    }

    .guide-card .btn {
        font-size: 0.9rem; /* Smaller buttons */
        padding: .25rem .5rem;
    }
}
