﻿/* Global Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    font-family: Arial, sans-serif;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #e6e6e6;
}

header {
    background-color: #4f4f4f;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Base nav styles */
nav ul.nav-menu {
    display: flex;
    gap: 20px;
    list-style: none;
}

    nav ul.nav-menu li a {
        color: white;
        text-decoration: none;
        font-weight: bold;
    }

/* Hamburger button */
.hamburger {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
}

.main-content {
    flex: 1;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: 2.4rem;
    color: #3a3a3a;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .section-title .small-text {
        font-size: 3.2rem;
        vertical-align: middle;
        margin: 0;
    }

    .section-title .large-text {
        font-size: 4.8rem;
        font-weight: bold;
        margin: 0 0px;
    }

.logo {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .logo a {
        color: inherit; /* Keeps the color the same as the parent element */
        text-decoration: none; /* Removes underline */
        display: flex; /* Ensures link behaves like a flex container */
        align-items: center; /* Keeps text vertically aligned */
    }

        .logo a:visited {
            color: inherit; /* Ensures visited links do not turn purple */
        }


    .logo .small-text {
        font-size: 1.0rem;
        vertical-align: middle;
        margin: 0;
    }

    .logo .large-text {
        font-size: 2rem;
        font-weight: bold;
        margin: 0 0px;
    }
    .logo .med-text {
        font-size: 1.5rem;
        font-weight: bold;
        margin: 0 0px;
    }

.tagline {
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 300;
    color: #555;
    margin-bottom: 30px;
    text-align: center;
}

/* Existing Main Page Card Styles */
.card-container {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 15px;
}


.card {
    background-color: #f9f3eb;
    flex: 1;
    min-width: 280px;
    max-width: 32%;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background-color: #cc0000;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease;
    }

    .card:hover::before {
        transform: scaleX(1);
    }

    .card:hover {
        transform: translateY(-10px);
        box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
    }

    .card h2 {
        font-size: 1.6rem;
        color: #3a3a3a;
        margin: 20px 0 10px;
    }


.image-container {
    width: 95%;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f2f2f2;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: 2px solid #4f4f4f;
    border-radius: 10px;
    margin: 10px auto;
}

.card-content {
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}
.card .note {
    font-size: 0.9rem;
    font-style: italic;
    color: #555;
    margin-top: 12px;
}

.card p {
    font-size: 1rem;
    color: #333;
    margin-bottom: 15px;
    flex-grow: 1;
}

.card a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4f4f4f;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: auto;
}

    .card a:hover {
        background-color: #cc0000;
    }

footer {
    background-color: #4f4f4f;
    padding: 10px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.3);
}
footer a {
    color: inherit; /* Keeps the color the same as the parent element */
    text-decoration: none; /* Removes underline */
}

    footer a:visited {
        color: inherit; /* Ensures visited links do not turn purple */
    }



/* ---------------------------- */
/* ✅ Product Details Page Styles */
/* ---------------------------- */

/* Existing styles remain untouched */

/* Specifications Page Styles */
/* === Product Details Page Additions === */

/* Container for specifications and relay examples */
.specs-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 50px;
}

/* Individual specification and diagram cards */
.spec-card {
    background-color: #f9f3eb; /* Matches existing card background */
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
    .spec-card p {
        font-size: 1.2rem;
        color: #333;
        margin-top: 10px;
        margin-left: 40px;
        margin-right: 40px;
        margin-bottom: 10px;
        text-align: left;
    }
    .spec-card pre {
        margin-right: 40px;
    }
    

    /* Hover effect consistent with main page cards */
/*    .spec-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
    }
*/
    .spec-card h1 {
        font-size: 1.8rem;
        color: #800000;
        margin-bottom: 12px;
        text-align: center;
    }
    /* Headings inside spec cards */
    .spec-card h2 {
        font-size: 1.4rem;
        color: #3a3a3a;
        margin-top: 30px;
        margin-bottom: 10px;
        text-align: left;
    }
    .spec-card h3 {
        font-size: 1.2rem;
        color: #3a3a3a;
        text-align: left;
        margin-left: 40px;
        margin-top: 20px;
    }

    /* Bullet point lists inside spec cards */
    .spec-card ol {
        margin-left: 40px;
        margin-right: 40px;
        font-size: 1.2rem;
        list-style: disc inside;
        margin-top: 10px;
    }

    .spec-card ul {
        margin-left: 40px;
        margin-right: 40px;
        font-size: 1.2rem;
        list-style: disc inside;
        margin-top: 10px;
    }

        .spec-card ul li {
            text-indent: -1.5em; /* Pulls the first line back */
            padding-left: 1.5em; /* Indents all lines equally */
            font-size: 1.2rem;
            color: #333;
            margin-bottom: 8px;
            text-align: left;
        }

        .spec-card ol li {
            text-indent: -1.5em; /* Pulls the first line back */
            padding-left: 1.5em; /* Indents all lines equally */
            font-size: 1.2rem;
            color: #333;
            margin-bottom: 8px;
            text-align: left;
        }
    .spec-card pre {
        background: #e6e6e6;
        padding: 1rem;
        overflow-x: auto;
        border-left: 4px solid #ffcb85;
        text-align: left;
        margin-left: 40px;
        text-indent: 0em; /* Pulls the first line back */
        padding-left: 10px; /* Indents all lines equally */
        font-size: 1.2rem;
    }
    .spec-card ol pre {
        margin-left: 0px;
    }

    .spec-card code {
        font-family: Consolas, monospace;
        font-size: 0.95em;
        text-align: left;
    }

    /* Notes or footnotes inside cards */
    .spec-card .note {
        font-size: 0.9rem;
        font-style: italic;
        color: #555;
        margin-top: 12px;
    }
    .spec-card a {
        display: inline-block;
        padding: 10px 20px;
        background-color: #4f4f4f;
        color: white;
        text-decoration: none;
        border-radius: 5px;
        font-weight: bold;
        transition: background-color 0.3s ease;
        margin-top: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .spec-card a:hover {
        background-color: #cc0000;
    }

.spec-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

    .spec-image-container img {
        width: 100%;
        max-width: 800px;
        border-radius: 8px;
        border: 2px solid #4f4f4f;
        object-fit: contain;
        background-color: #f7f7f7;
    }



/* Image container for diagrams */
.image-container {
    width: 100%;
    margin: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .image-container img {
        width: 100%;
        max-width: 600px;
        border-radius: 8px;
        border: 2px solid #4f4f4f; /* Consistent border color */
    }

/* Tagline under section titles */
.tagline {
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 300;
    color: #555;
    margin-bottom: 30px;
    text-align: center;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        padding: 10px;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 10px;
        flex-wrap: wrap; /* Prevent overflow */
    }

    .section-title .small-text {
        font-size: 2rem;
        margin: 0 4px;
    }

    .section-title .large-text {
        font-size: 3rem;
        margin: 0 6px;
    }

    .card-container {
        align-items: center;
        flex-direction: column;
    }

    .slide-img {
        height: auto;
        width: 100%;
    }

    .wrapper {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
        margin: 0 auto 50px;
    }
    .slideshow-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
        height: auto;
    }

    .prev, .next {
        font-size: 24px;
        padding: 15px;
    }
    nav ul.nav-menu {
        display: none;
        position: absolute;
        top: 60px; /* adjust if needed */
        right: 0;
        background-color: #4f4f4f;
        flex-direction: column;
        padding: 10px;
        width: 200px;
        border-radius: 0 0 5px 5px;
        z-index: 999;
    }

        nav ul.nav-menu.show {
            display: flex;
        }

    .hamburger {
        display: block;
        position: absolute;
        right: 10px;
        top: 10px;
        z-index: 1000;
    }

    header {
        position: relative;
    }
}

html {
    scroll-behavior: smooth;
}

/* Slideshow container */
.slideshow-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 8 / 5; /* Keeps ratio consistent */
    height: 500px;
    margin: auto;
    background: #f4f4f4;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.3); /* Drop shadow */
}

/* Slide styling */
.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

    .slide.active {
        opacity: 1;
        z-index: 10;
    }

    /* Image styling */
    .slide img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        cursor: pointer;
    }

/* Navigation buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    color: white;
    font-size: 24px;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    line-height: 50px;
    user-select: none;
    border: none;
    z-index: 100;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

    .prev:hover, .next:hover {
        background: rgba(0, 0, 0, 0.8);
    }

/* Pause/Play Button */
.pause-play {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 100;
}

/* MODAL POPUP */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

    .modal img {
        max-width: 90%;
        max-height: 90%;
        border-radius: 10px;
    }

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* Animation */
.fade {
    animation: fadeEffect 1.5s ease-in-out;
}

@keyframes fadeEffect {
    from {
        opacity: 0.4
    }

    to {
        opacity: 1
    }
}

