
* {
    box-sizing: border-box; 
}

body {
    font-family: 'Arial', 'Roboto', 'Helvetica', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f7fb;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; 
    width: 100%;
    max-width: 100vw;
    line-height: 1.6;
}

.header {
            background-color: white;
            box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
            top: 0;
    margin-bottom: 10px;
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            height: 80px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 24px;
            font-weight: bold;
            text-decoration: none;
            color: #333;
        }

        .nav-links {
            display: flex;
            align-items: center;
        }

        .nav-links a {
            text-decoration: none;
            color: #333;
            padding: 10px;
            transition: color 0.3s ease;
        }

        .nav-links a:hover {
            color: #FF9900;
        }

.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
    width: 30px;
    height: 30px;
    position: relative;
    background: none;
    border: none;
    box-shadow: none;
    outline: none;
    -webkit-tap-highlight-color: transparent; 
}

.hamburger:hover,
.hamburger:active,
.hamburger:focus {
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
}

.hamburger-lines {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #888;
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger-lines::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #888;
    top: -6px;
    left: 0;
    transition: transform 0.3s ease;
}

.hamburger-lines::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #888;
    bottom: -6px;
    left: 0;
    transition: transform 0.3s ease;
}

.hamburger.active .hamburger-lines {
    background-color: transparent;
}

.hamburger.active .hamburger-lines::before {
    transform: rotate(45deg);
    top: 0;
}

.hamburger.active .hamburger-lines::after {
    transform: rotate(-45deg);
    bottom: 0;
}

.container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    width: 100%;
    flex-grow: 1;
    align-items: flex-start; 
}


.sidebar {
    flex: 0 0 300px;
    background-color: #ffffff;
    color: #1f2937;        
    padding: 20px;
    border-radius: 8px;
    margin-left: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    align-self: flex-start;
}

.sidebar h3 {
    margin-top: 0;
    font-size: 18px;
    text-align: center;
    border-bottom: 2px solid #e5e7eb;  
    padding-bottom: 10px;
    color: #111827;  
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #4b5563;         
    font-weight: 500;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar ul li a:hover {
    background-color: #f3f4f6; 
    color: #111827;     
}

.table-wrapper {
      overflow-x: auto;
    }

    .calculator-container {
      max-width: 600px;
      margin: 0 auto;
      padding: 20px;
      background: #f8f9fa;
      border-radius: 8px;
    }
    .measurement-input {
      margin-bottom: 20px;
    }
    .measurement-input label {
      display: block;
      margin-bottom: 8px;
      font-weight: 500;
    }
    .measurement-input input {
      width: 100%;
      padding: 10px;
      border: 1px solid #ddd;
      border-radius: 4px;
      font-size: 16px;
    }
    .calc-btn {
      width: 100%;
      padding: 15px;
      background: #007bff;
      color: white;
      border: none;
      border-radius: 4px;
      font-size: 16px;
      cursor: pointer;
    }
    .result-container {
      margin-top: 20px;
      padding: 20px;
      background: white;
      border-radius: 4px;
      text-align: center;
    }



table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
}

th {
    background-color: #f3f4f6;
    font-weight: bold;
}

.calculator-container input {
            padding: 10px;
            width: 100%;
            max-width: 100%; 
            margin-bottom: 10px;
            border-radius: 5px;
            border: 1px solid #d1d5db;
            font-size: 1em;
            color: #333;
            transition: background-color 0.3s ease, border-color 0.3s ease;
        }

.content {
    flex: 1;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

h1 {
    margin-top: 0;
    font-size: 26px;
    margin-bottom: 20px;
    color: #1f2937;
}


#info {
    margin-top: 40px;
}

#info h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #1f2937;
}

#info h3 {
    font-size: 18px;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #333;
}

#info p {
    font-size: 16px;
    margin-top: 10px;
    margin-bottom: 15px;
    color: #4b5563;
}

#info ol, #info ul {
    padding-left: 0;
    margin-left: 0;  
    list-style-position: inside; 
}

#info ol li, #info ul li {
    padding-left: 0; 
    margin-left: 0;  
    color: #4b5563;
}

.calculator-cards {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.calculator-cards ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.calculator-cards li {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calculator-cards li a {
  display: block;
  padding: 20px;
  color: #333;
  text-decoration: none;
  font-size: 1.1em;
  font-weight:bold;
  position: relative;
}

.calculator-cards li:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}


/* Custom Radio Button Styles */
.conversion-options {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    justify-content: center;
}

.radio-group {
    position: relative;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-group label {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    background-color: #f5f5f5;
    color: #666;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    user-select: none;
}

.radio-group input[type="radio"]:checked + label {
    background-color: #e6f3ff;
    color: #0066cc;
    border-color: #0066cc;
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.1);
}

/* Hover effect */
.radio-group label:hover {
    background-color: #eef6ff;
}

/* Focus styles for accessibility */
.radio-group input[type="radio"]:focus + label {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Active state */
.radio-group input[type="radio"]:active + label {
    transform: scale(0.98);
}

/* Disabled state if needed */
.radio-group input[type="radio"]:disabled + label {
    opacity: 0.6;
    cursor: not-allowed;
}

.input-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #007BFF;
    border-radius: 4px;
    margin-right: 10px;
    cursor: pointer;
    position: relative;
}

.input-group input[type="checkbox"]:checked {
    background-color: #007BFF;
    border-color: #007BFF;
}

.input-group input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}


.footer {
    text-align: center;
    padding: 15px;
}

.footer p {
    padding: 3px;
    font-size: 0.8em;
    color: #4b5563;
}

.footer p a {
    color: #4b5563;
    text-decoration: none;
    padding: 10px; 
}

.result-container {
background: #fff;
padding: 25px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }
        
        .product-table th, .product-table td {
            padding: 15px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }
        
        .product-table th {
            background-color: #f5f5f5;
        }
        
        .product-table-image {
            width: 150px;
            height: 150px;
            object-fit: contain;
            transition: transform 0.2s;
        }
        
        .product-table-image:hover {
            transform: scale(1.05);
        }
        
        .table-amazon-button {
            display: inline-block;
            padding: 8px 15px;
            background-color: #FF9900;
            color: white;
            text-decoration: none;
            border-radius: 4px;
            transition: background-color 0.2s;
            text-align: center;
        }
        
        .table-amazon-button:hover {
            background-color: #FF8800;
        }

.product-title {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    max-height: 2.8em; 
    margin-bottom: 10px;
    text-overflow: ellipsis;
}

        
        .product-title:hover {
            color: #FF9900;
        }
        
        .number-cell {
            font-weight: bold;
            color: #666;
            width: 50px;
        }
        
        .image-cell {
            width: 170px;
        }
        
        .button-cell {
            width: 150px;
        }


/* Likert Scale Styling */
.likert-scale {
  display: flex;
  justify-content: space-between;
  margin: 1.5rem 0;
  gap: 10px;
}

.likert-option {
  flex: 1;
  padding: 12px 8px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #f9f9f9;
}

.likert-option:hover {
  background-color: #e9e9e9;
}

.likert-option.selected {
  background-color: #4CAF50;
  color: white;
  border-color: #3e8e41;
  font-weight: bold;
  transform: scale(1.03);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .likert-scale {
    flex-direction: column;
    gap: 8px;
  }
  
  .likert-option {
    padding: 10px;
  }
}


/* Base Styles */
.gender-selection {
  margin: 2rem 0;
  text-align: center;
}

.gender-btn {
  padding: 0.8rem 1.6rem;
  margin: 0 0.5rem;
  background-color: #f0f0f0;
  border: 2px solid #ddd;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.gender-btn.selected {
  background-color: #4CAF50;
  color: white;
  border-color: #4CAF50;
  transform: scale(1.05);
}

.quiz-container {
  display: none;
  max-width: 800px;
  margin: 0 auto;
}

.question {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background-color: #f9f9f9;
  border-radius: 0.8rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.question h3 {
  color: #333;
  margin-bottom: 1rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}

.option {
  padding: 0.8rem 1rem;
  background-color: #e9e9e9;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.option:hover {
  background-color: #ddd;
  transform: translateX(5px);
}

.option.selected {
  background-color: #4CAF50;
  color: white;
  border-left-color: #2E7D32;
  transform: translateX(5px);
}

#result {
  display: none;
  padding: 2rem;
  background-color: #f5f5f5;
  border-radius: 0.8rem;
  margin-top: 2rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.type-description {
  margin-top: 1.5rem;
  line-height: 1.6;
}

.type-description h3 {
  color: #2E7D32;
  margin: 1.2rem 0 0.5rem;
}

.calc-btn {
  display: block;
  margin: 1.5rem auto;
  padding: 0.8rem 2rem;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.3s ease;
  width: fit-content;
}

.calc-btn:hover {
  background-color: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Mobile Styles */
@media (max-width: 768px) {
  .gender-selection {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .gender-btn {
    margin: 0;
    width: 100%;
    padding: 1rem;
  }
  
  .options {
    flex-direction: column;
  }
  
  .option {
    padding: 1rem;
  }
  
  .question {
    padding: 1.2rem;
    margin: 1.2rem 0;
  }
  
  #result {
    padding: 1.5rem;
  }
  
  .calc-btn {
    width: 100%;
    padding: 1rem;
  }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .options {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

/* Animation Enhancements */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.question {
  animation: fadeIn 0.4s ease-out;
}

#result {
  animation: fadeIn 0.6s ease-out;
}

/* Progress Indicator */
.progress-container {
  width: 100%;
  background-color: #f1f1f1;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

.progress-bar {
  height: 0.5rem;
  background-color: #4CAF50;
  border-radius: 0.5rem;
  width: 0%;
  transition: width 0.4s ease, background-color 0.3s ease;
}

@media (max-width: 900px) {

    .header {
        margin-bottom: 0;
    }

            .logo {
            font-size: 20px;
        }

.nav-links {
                display: none;
                position: absolute;
                top: 60px;
                right: 0;
                background-color: white;
                width: 200px;
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
                padding: 20px;
            }

            .nav-links.active {
                display: block;
            }

            .nav-links a {
                display: block;
                padding: 10px;
            }

.hamburger {
        display: block;
    }
    
    .container {
        flex-direction: column;
        padding: 15px; 
        margin: 0; 
    }

    .sidebar {
        flex: 0 0 auto;
        margin-left: 0;
        margin-top: 20px;
        width: 100%;
        max-width: 100%;
        order: 1;
        padding: 15px; 
    }

    .content {
        order: 0;
        margin-bottom: 20px;
        padding: 20px;
        width: 100%;
        max-width: 100%;
    }

    h1 {
        font-size: 20px; 
        margin-bottom: 15px;
    }

    .sidebar h3 {
        font-size: 16px; 
    }

    #info h2 {
    font-size: 18px;
}

#info h3 {
    font-size: 1em;
}

    label, select, button {
        font-size: 16px; 
    }

    select, button {
        padding: 8px; 
    }

    #result-name {
        font-size: 28px; 
    }

    #common-link h2 {
    font-size: 18px;
}
        #common-link li {
                flex: 1 0 calc(50% - 10px);
            }
}


@media (max-width: 768px) {

    
.calculator-cards ul {
    grid-template-columns: 1fr;
  }
  
  .calculator-cards {
    padding: 10px;
  }
    
    .size-option {
        padding: 8px 15px;
        min-width: 70px;
    }

    .primary-size {
        font-size: 2.5em;
    }

    
 .product-table thead {
                display: none; 
            }

            .product-table, 
            .product-table tbody, 
            .product-table tr, 
            .product-table td {
                display: block;
                width: 100%;
                text-align: center;
            }

            .product-table tr {
                margin-bottom: 30px;
                border: 1px solid #ddd;
                border-radius: 8px;
                padding: 15px;
                box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            }

            .product-table td {
                border: none;
                padding: 8px;
            }

            .number-cell {
                font-size: 1.2em;
                color: #FF9900;
                margin-bottom: 10px;
            }

            .image-cell {
                margin: 0 auto;
            }

            .product-table-image {
                width: 200px;
                height: 200px;
                margin: 0 auto;
            }


    .product-title {
        font-size: 1.1em;
        margin: 15px 0;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

            .button-cell {
                margin-top: 15px;
            }

            .table-amazon-button {
                width: 100%;
                max-width: 200px;
                margin: 0 auto;
                padding: 12px 20px;
            }

            .number-cell::before {
                content: "Product #";
            }
  
}

        @media (max-width: 480px) {
            .product-table-image {
                width: 150px;
                height: 150px;
            }

            .product-table tr {
                padding: 10px;
            }


    .product-title {
        font-size: 1em;
        max-width: 250px;
    }

        }
