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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    scrollbar-gutter: stable;
}

ol,
ul {
  padding-inline-start: 20px;
}

.container {
    display: flex;
    min-height: 100vh;
}


.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;

}

.toggle-btn {
    display: none;
}

.nav-menu ul {
    list-style: none;
    padding-inline-start: 0; /* Undo tag-level style */
}

.nav-menu li {
    margin: 15px 0;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;

}

.nav-menu a:hover {
    background-color: #34495e;
}

.nav-menu a:active {
    background-color: #243342;
}


.header-link-bounds:hover .header-link {
    opacity: 100%;
}

.header-link {
    color: #727279;
    opacity: 60%;
    font-size: 0.75em;
    font-weight: lighter;
    font-style: italic;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.header-link::before {
    width: 1em;
    height: 1em;
    content: "#";
}


#image-viewer-modal {
    width: 100%;
    height: 100%;
    max-width: initial;
    max-height: initial;
    background: initial;
    border: none;
}

#image-viewer-container {
    position: fixed;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
}

#image-viewer-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    color: white; /* For alt text if image fails to load */
    font-size: 2rem; /* For alt text if image fails to load */
}

.image-viewer-view-btn,
#image-viewer-close-btn {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0.1in;
    min-width: 0.5in;
    min-height: 0.5in;
    aspect-ratio: 1/1;
    background-color: rgba(0, 0, 0, 0.5);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 55% 55%;
    border-radius: 0.5em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.image-viewer-view-btn {
    background-image: url("../images/ui/fullscreen.svg");
}

#image-viewer-close-btn {
    background-image: url("../images/ui/close.svg");
}

.image-viewer-view-btn:hover,
#image-viewer-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.image-viewer-view-btn:active,
#image-viewer-close-btn:active {
    background-color: rgba(0, 0, 0, 0.65);
}

.image-viewer-expandable {
    position: relative;
}

.image-viewer-expandable:hover {
    cursor: pointer;
    outline: 3px solid #3498db;
    outline-offset: 2px;
}


.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
}

.title-card {
    background-color: white;
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.title-image {
    width: 100%;
    height: 300px;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 8px;
    font-size: 0;
}

.title-image img {
    width: 100%;
    height: inherit;
    object-fit: cover;
}

.title-card h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #2c3e50;
}

.subtitle {
    font-size: 1.2em;
    color: #727279;
}

.description-section {
    background-color: white;
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


.description-section h2 {
    font-size: 2em;
    margin-bottom: 30px;
    color: #2c3e50;
}

.description-content {
    display: flex;
    gap: 30px;
    align-items: center;
}

.description-image {
    flex: 0 0 40%;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    font-size: 0;
}

.description-image img {
    width: 100%;
    height: inherit;
    object-fit: cover;
}

.description-text {
    flex: 1;
}

.description-text p {
    margin-bottom: 15px;
    font-size: 1.05em;
    line-height: 1.8;
}

.user-guide-section {
    background-color: white;
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


.user-guide-section h2 {
    font-size: 2em;
    margin-bottom: 30px;
    color: #2c3e50;
}

.user-guide-section > p {
    margin-bottom: 30px;
    font-size: 1.05em;
}


.guides {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.guide-step {
    background-color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #3498db;
}

.guide-step h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.guide-step .image-viewer-expandable,
.guide-step img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

.guide-step p {
    font-size: 0.95em;
    line-height: 1.7;
}



.faq-section {
    background-color: white;
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.faq-section h2 {
    font-size: 2em;
    margin-bottom: 30px;
    color: #2c3e50;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ecf0f1;
}

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

.faq-item h3 {
    color: #3498db;
    margin-bottom: 15px;
}

.faq-item p {
    color: #555;
    line-height: 1.7;
}

.troubleshooting-section {
    background-color: white;
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.troubleshooting-section h2 {
    font-size: 2em;
    margin-bottom: 30px;
    color: #2c3e50;
}

.troubleshooting-item {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #fef5e7;
    border-left: 5px solid #f39c12;
    border-radius: 5px;
}


.troubleshooting-item h3 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.troubleshooting-item p {
    color: #555;
    line-height: 1.7;
}

.contact-section {
    background-color: white;
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-section h2 {
    font-size: 2em;
    margin-bottom: 30px;
    color: #2c3e50;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.contact-item {
    padding: 20px;
    background-color: #ecf0f1;
    border-radius: 8px;
    text-align: center;
}

.contact-item h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.contact-item p {
    color: #555;
}

.home-overview {
  /* Padding set by children */
  margin-bottom: 30px;
}

.overview-container {
  display: flex;
  gap: 30px;
}

.overview-box {
  flex: 1;
  background-color: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.overview-box h2 {
  font-size: 2em;
  margin-bottom: 30px;
  color: #2c3e50;
}

.overview-box p {
    color: #555;
    line-height: 1.7;
}


@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        width: 100%;
        height: auto;
        padding: 15px 20px;
        background-color: #2c3e50;
    }

    #home {
        margin-top: 60px;
    }

    .nav-menu ul {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .nav-menu li {
        margin: 0;
        flex: 0 1 auto;
    }

    .nav-menu a {
        padding: 10px 16px;
        font-size: 15px;
        background-color: #34495e;
        border-radius: 5px;
        text-align: center;
        white-space: nowrap;
        transition: background-color 0.3s ease;
    }

    .nav-menu a:hover {
        background-color: #3498db;
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
    }

    .title-card,
    .description-section,
    .user-guide-section,
    .faq-section,
    .troubleshooting-section,
    .contact-section,
    .overview-box {
        padding: 20px;
    }

    .title-card h1 {
        font-size: 1.8em;
    }

    .description-content {
        flex-direction: column;
    }

    .description-image {
        flex: 1 1 100%;
    }

    .guides {
        grid-template-columns: 1fr;
    }

    .overview-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .sidebar {
        padding: 12px 15px;
    }

    .nav-menu ul {
        gap: 6px;
    }

    .nav-menu a {
        padding: 8px 12px;
        font-size: 13px;
    }

    #home {
        margin-top: 100px;
    }

    .main-content {
        padding: 12px;
    }

    .title-image {
        height: 180px;
    }

    .title-card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .title-card h1 {
        font-size: 1.4em;
        margin-bottom: 8px;
    }

    .subtitle {
        font-size: 1em;
    }

    .description-section,
    .user-guide-section,
    .faq-section,
    .troubleshooting-section,
    .contact-section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .description-section h2,
    .user-guide-section h2,
    .faq-section h2,
    .troubleshooting-section h2,
    .contact-section h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    .title-card,
    .description-section,
    .user-guide-section,
    .faq-section,
    .troubleshooting-section,
    .contact-section,
    .overview-box {
        padding: 15px;
    }

    .description-image {
        height: 180px;
    }

    .guide-step {
        padding: 15px;
        margin-bottom: 10px;
    }

    .guide-step h3 {
        font-size: 1.1em;
    }

    .guide-step .image-viewer-expandable,
    .guide-step img {
        height: 140px;
        margin-bottom: 12px;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .contact-item {
        padding: 15px;
    }
}

@media (prefers-contrast: more) {
    .header-link {
        opacity: 100%;
    }
}
