/* =========================
   RESET
========================= */

html, body {
    width: 100%;
    overflow-x: hidden;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================
   HEADER / NAVBAR (DESKTOP)
========================= */

.site-header {
    background-color: #2c3e50;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    position: relative;
    align-items: center;
    padding: 0 20px;
    height: 50px;
}

.site-logo {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    white-space: nowrap;
}

.navbar {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.navbar-menu {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0 14px;
    height: 50px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-weight: 500;
    font-size: 14px; 
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
}

/* =========================
   DROPDOWN (DESKTOP)
========================= */

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 250px;
    list-style: none;
    padding: 8px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 0.2s ease;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background: #f5f7fa;
}

/* =========================
   HAMBURGER
========================= */

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
}

/* =========================
   MAIN CONTENT
========================= */

.container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 16px;
    font-size: 16px;
}

.container h1,
.container h2,
.container h3 {
    color: #2c3e50;
    line-height: 1.3;
    font-size: 2.0rem;
}

.container h3 {
    margin: 18px 0 8px;
    font-size: 1.5rem;
}

.container p {
    margin: 10px 0;
}

.container ul,
.container ol {
    padding-left: 20px;
    margin: 10px 0 20px;
}

.container li {
    margin: 6px 0;
}

.container a {
    text-decoration: underline;
}

.container hr {
    margin: 25px 0;
    border: none;
    border-top: 1px solid #ddd;
}

.container section {
    margin-bottom: 40px;
}

.container section > h2 {
    margin-bottom: 15px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e6e6e6;
}

/* =========================
   NOTES / CALLOUTS
========================= */

.note {
    padding: 12px 14px;
    margin: 12px 0;
    border-left: 4px solid #ccc;
    background: #f9f9f9;
    border-radius: 4px;
}

.note-info { border-color: #3498db; background: #eef6fc; }
.note-warning { border-color: #f39c12; background: #fff7e6; }
.note-success { border-color: #2ecc71; background: #eafaf1; }

/* =========================
   FOOTER
========================= */

footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
}

/* =========================
   HOME INFO
========================= */

.home-info {
    max-width: 800px;
    margin: 20px auto 40px;
    padding: 0 16px;
    text-align: center;
}

.home-info h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
    color: #2c3e50;
}

.info-list {
    list-style: none;
}

.info-list li {
    margin: 10px 0;
}

.info-list a {
    color: #2c3e50;
    text-decoration: none;
}

.info-list a:hover {
    text-decoration: underline;
}

/* =========================
   GALLERY
========================= */

.image-gallery {
    background: #f4f4f4;
    padding: 40px 20px;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================
   LIGHTBOX
========================= */

.lightbox,
#pdf-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.lightbox.active,
#pdf-modal.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: white;
    cursor: pointer;
}

.prev { left: 20px; }
.next { right: 20px; }

/* =========================
   PDF MODAL
========================= */

.pdf-frame {
    width: 90%;
    height: 85vh;
    border: none;
    background: white;
    border-radius: 6px;
}

#pdf-modal .close {
    top: 10px;
    right: 20px;
    font-size: 32px;
}

.pdf-download {
    margin-top: 10px;
    color: white;
    background: #2c3e50;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
}

/* =========================
   MOBILE MENU
========================= */

body.menu-open {
    overflow: hidden;
}

@media (max-width: 1024px) {

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 4px;
        cursor: pointer;
        margin-left: 10px;
    }

    .navbar {
        position: absolute;
        top: 50px;
        left: 10px; 
        width: 280px;
        max-width: 85vw;

        background: #2c3e50;

        max-height: 70vh;
        overflow-y: auto;

        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);

        transition: 0.2s ease;

        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.25);

        padding: 10px;
        z-index: 9999;
    }

    .navbar.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .navbar-menu {
        flex-direction: column;
        width: 100%;
    }

    .nav-item {
        width: 100%;
        flex-direction: column;
    }

    .nav-link {
        width: 100%;
        padding: 10px 12px;
        color: white;
    }

    .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        background: rgba(255,255,255,0.05);
        padding-left: 12px;
    }

    .nav-dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        color: #cccccc; 
    }
    
    .dropdown-menu a:hover {
        background: rgba(255,255,255,0.1);
        color: #ffffff;
    }
}

/* =========================
   IMAGES
========================= */

.center-image-main {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    object-position: top;
    display: block;
}

.image-wrapper {
    width: 100%;
    overflow: hidden;
}

/* =========================
   3-LAYER DROPDOWN EXTENSIONS
========================= */

.nested-dropdown {
    position: relative;
}

/* Hide Layer 3 by default */
.nested-menu {
    position: absolute;
    top: -8px; 
    left: 100%; /* Position right beside layer 2 menu */
    background: white;
    min-width: 250px;
    list-style: none;
    padding: 8px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-left: 1px solid #e6e6e6;
    
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: 0.2s ease;
    z-index: 1001;
}

/* Desktop Hover Interaction: Show Layer 3 */
@media (min-width: 1025px) {
    .nested-dropdown:hover .nested-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
    
    .dropdown-menu a.nested-toggle::after {
        content: " ▸";
        float: right;
        color: #999;
    }
}

/* Mobile Stacking Configurations */
@media (max-width: 1024px) {
    .nested-menu {
        position: static;
        display: none;
        width: 100%;
        background: rgba(0,0,0,0.05);
        padding-left: 12px;
        box-shadow: none;
        transform: none;
        opacity: 1;
        visibility: visible;
        border-left: none; 
    }
    
    .nested-dropdown.active .nested-menu {
        display: block;
    }

    .dropdown-menu a.nested-toggle::after {
        content: " ▾";
        float: right;
    }
}

/* Center the navbar menu items */

/* ==========================================
   SITE SEARCH STYLES
   ========================================== */
.search-nav-item {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 0;
    order: 0;
}

#search-input {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
    width: 160px;
}

#search-input:focus {
    background: #fff;
    color: #333;
    width: 200px;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#search-input:focus::placeholder {
    color: #999;
}

.search-results-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;         /* Changed to right-align to match far-right setup */
    left: auto;        /* Clear the previous left rule */
    width: 300px;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-radius: 6px;
    margin-top: 5px;
    overflow: hidden;
    z-index: 99999;
}

.search-result-item {
    display: block;
    padding: 10px 14px;
    text-decoration: none !important;
    color: #333 !important;
    border-bottom: 1px solid #eee;
    transition: background 0.15s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f5f7fa;
}

.search-result-title {
    font-weight: bold;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 3px;
    text-align: left;
}

.search-result-snippet {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    white-space: normal;
    text-align: left;
}

.search-no-result {
    padding: 12px;
    font-size: 13px;
    color: #888;
    text-align: center;
    background: white;
}

.search-highlight {
    background: #fff3cd;
    color: #856404;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 500;
}

/* Adjust layout rules for clean stacking on mobile views */
@media (max-width: 1024px) {

    .search-nav-item {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        width: auto;
        padding: 0;
        margin: 0;
        z-index: 10002;
    }

    #search-input {
        width: 160px;
        background: rgba(255,255,255,.05);
    }

    .search-results-dropdown {
        width: 300px;
        right: 0;
        left: auto;
        position: absolute;
        margin-top: 5px;
        max-height: 250px;
        overflow-y: auto;
    }

}

.faq-container {
    max-width: 900px;
    margin: 20px 0;
}
  
details.faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 12px;
    padding: 0;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
  
details.faq-item[open] {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
  
summary.faq-question {
    font-weight: 600;
    font-size: 1.05rem;
    color: #2c3e50;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
  
summary.faq-question::-webkit-details-marker {
    display: none;
}
  
summary.faq-question::after {
    content: "＋";
    font-size: 1.2rem;
    color: #64748b;
    font-weight: bold;
    transition: transform 0.2s ease;
}
  
details[open] summary.faq-question::after {
    content: "－";
    color: #2c3e50;
}
  
summary.faq-question:hover {
    background-color: #f8fafc;
    border-radius: 6px;
}
  
details[open] summary.faq-question {
    border-bottom: 1px solid #f1f5f9;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
  
.faq-answer {
    padding: 16px 18px;
    color: #334155;
    line-height: 1.6;
}
  
.faq-answer p {
    margin: 0 0 10px 0;
}
  
.faq-answer p:last-child {
    margin-bottom: 0;
}
  
.faq-answer ul {
    margin: 8px 0 12px 20px;
    padding: 0;
}
  
.faq-answer li {
    margin-bottom: 4px;
}