/* LEGO Green Baseplate Background */
body {
    background-color: #237841;
    background-image: radial-gradient(#1a5e31 15%, transparent 20%);
    background-size: 30px 30px;
    font-family: 'Ubuntu', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
}

header {
    background: #d00; /* LEGO Red */
    color: white;
    padding: 15px 0;
    border-bottom: 5px solid #FFD500; /* LEGO Yellow */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

header h1 {
    margin: 0;
    padding-left: 20px;
    display: flex;
    align-items: center;
    font-size: 1.8em;
}

nav {
    background: #0055BF; /* LEGO Blue */
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    margin-right: 25px;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
}

nav a:hover { color: #FFD500; }

.wrapper {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

/* The Main White Container */
.content-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

h2 { margin-top: 0; color: #111; border-bottom: 2px solid #eee; padding-bottom: 10px; }

/* Form Elements */
.flex { display: flex; gap: 30px; margin-bottom: 30px; }
.flex > div { flex: 1; }

.card {
    background: #fdfdfd;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

label { display: block; font-weight: bold; margin-top: 15px; font-size: 0.9em; }
input, select { 
    width: 100%; padding: 12px; margin: 8px 0; 
    border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; 
}

input[type="submit"] { 
    background: #0055BF; color: white; border: none; cursor: pointer; 
    font-weight: bold; transition: background 0.2s; 
}
input[type="submit"]:hover { background: #0041a3; }

/* Color Picker */
.color-picker-container { position: relative; }
#color-search-results { 
    position: absolute; width: 100%; max-height: 250px; overflow-y: auto; 
    background: white; border: 1px solid #ccc; z-index: 100; display: none; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); 
}
.color-option { padding: 10px; cursor: pointer; display: flex; align-items: center; border-bottom: 1px solid #eee; }
.color-option:hover { background: #f0f0f0; }
.swatch { width: 24px; height: 24px; border: 1px solid #000; margin-right: 12px; border-radius: 3px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; }
.item { background: #fff; border: 1px solid #ddd; padding: 15px; text-align: center; border-radius: 8px; }
.item img { width: 100%; height: auto; background: white; margin-bottom: 10px; border: 1px solid #eee; }

.btn-group { display: flex; gap: 10px; float: right; margin-top: -50px; }
.zip-btn { background: #6c757d; color: white; padding: 10px 15px; text-decoration: none; border-radius: 4px; font-weight: bold; }
.pdf-btn { background: #28a745; color: white; padding: 10px 15px; text-decoration: none; border-radius: 4px; font-weight: bold; }

/* FAQ Collapsible Styling */
.faq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding-bottom: 0; /* Reset border when closed */
    border-bottom: none;
}

.faq-header h2 {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-toggle-icon {
    font-size: 1.5em;
    font-weight: bold;
    color: #0055BF;
    transition: transform 0.3s ease;
}

.faq-content {
    display: none; /* Collapsed by default */
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* When active, show the content */
.faq-section.active .faq-content {
    display: block;
}

/* Rotate the icon when active */
.faq-section.active .faq-toggle-icon {
    transform: rotate(45deg); /* Turns + into x */
}

textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: 'Ubuntu', sans-serif;
    resize: vertical; /* Allows user to drag the height but not width */
}

/* Responsive Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin: 20px 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Segmented Control / Toggle Styles */
.options-row {
    display: flex;
    gap: 40px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-bottom: 10px;
}

.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toggle-group label {
    margin: 0;
    font-size: 0.85em;
    color: #666;
}

.segmented-control {
    display: flex;
    position: relative;
    background: #e2e2e2;
    padding: 2px;
    border-radius: 20px;
    width: 160px;
    user-select: none;
}

.segmented-control input {
    display: none;
}

.segmented-control label {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    cursor: pointer;
    font-weight: bold;
    font-size: 11px;
    z-index: 2;
    transition: color 0.3s;
    color: #555;
    margin: 0;
}

.segmented-control .selection-slider {
    position: absolute;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
    background: #0055BF; /* LEGO Blue */
    top: 2px;
    left: 2px;
    border-radius: 18px;
    transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    z-index: 1;
}

/* Logic for slider movement */
#bar_yes:checked ~ .selection-slider { transform: translateX(0); }
#bar_no:checked ~ .selection-slider { transform: translateX(100%); }

#side_left:checked ~ .selection-slider { transform: translateX(0); }
#side_right:checked ~ .selection-slider { transform: translateX(100%); }

/* Text color change when active */
#bar_yes:checked + label, #bar_no:checked + label,
#side_left:checked + label, #side_right:checked + label {
    color: white;
}

