
.page-container {
    display: flex;
    flex-direction: column;
    height: 100vh; /* Full viewport height */
}

/* Scrollable Content Area */
.scrollable-content {
    flex-grow: 1;
    overflow-y: auto; /* Allow this container to scroll */
    background-color: #f8f9fa;
}

.component-container {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* Hero Section (Static) */
.hero {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 2rem 0; /* Reduced padding */
    text-align: center;
    border-bottom: 5px solid #0056b3;
    flex-shrink: 0; /* Prevent hero from shrinking */
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 1.2rem;
}

.hero-description {
    color: #e3eaf5;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 2.2rem auto;
    text-align: center;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3.5rem;
    margin-top: 1.8rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.hero-stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.hero-stat-label {
    font-size: 1rem;
    color: #c9d6ec;
    font-weight: 400;
    letter-spacing: 0.01em;
    margin-top: 0.1rem;
    text-align: center;
}

@media (max-width: 600px) {
    .hero-stats {
        gap: 1.5rem;
    }
    .hero-content h1 {
        font-size: 1.5rem;
    }
    .hero-stat-value {
        font-size: 1.3rem;
    }
    .hero-description {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
}

/* Hamburger menu color for Sections nav */
.section-nav .navbar-toggler {
    border-color: #ffd700 !important;
}
.section-nav .navbar-toggler-icon {
    background-image: none;
    position: relative;
}
.section-nav .navbar-toggler-icon::before, .section-nav .navbar-toggler-icon::after, .section-nav .navbar-toggler-icon div {
    content: '';
    display: block;
    width: 22px;
    height: 3px;
    margin: 4px 0;
    background: #ffd700;
    border-radius: 2px;
}

/* Section Navigation (Sticky) */
.section-nav {
    position: sticky;
    top: 56px; /* Height of main navbar */
    z-index: 1025;
    background-color: #0056b3 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex-shrink: 0; /* Prevent nav from shrinking */
}

    .section-nav .navbar-brand,
    .section-nav .nav-link {
        color: #fff !important;
        font-weight: 400;
        font-size: 1.07rem;
        letter-spacing: 0.01em;
        background: none !important;
        text-transform: none;
        border-radius: 0;
        padding: 0.55rem 1.25rem 0.2rem 1.25rem;
        transition: color 0.15s;
    }

    .section-nav .nav-link:hover,
    .section-nav .navbar-brand:hover {
        color: #39d353 !important;
        background: none !important;
        font-weight: 500;
        text-decoration: underline;
    }

    .section-nav .nav-link.active {
        color: #39d353 !important;
        font-weight: 600;
        text-decoration: underline;
    }

/* Section Styling */
.section {
    padding: 3rem 0;
    border-bottom: 1px solid #dee2e6;
}

    .section:last-child {
        border-bottom: none;
    }

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #343a40;
}

.section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    color: #6c757d;
    font-size: 1.1rem;
}

/* Custom Tooltip Styles */
.tooltip-hover {
    position: relative;
}
.custom-tooltip {
    visibility: hidden;
    opacity: 0;
    width: 340px;
    max-width: 90vw;
    background: #fafdff;
    color: #244a6e;
    text-align: left;
    border-radius: 8px;
    border: 1.5px solid #a7c7e7;
    box-shadow: 0 8px 32px rgba(80,120,200,0.18);
    padding: 1rem 1.2rem;
    position: absolute;
    left: 50%;
    top: -1.7rem;
    transform: translate(-50%, -100%);
    z-index: 100;
    font-size: 1rem;
    transition: opacity 0.18s cubic-bezier(.4,1.3,.6,1), visibility 0.18s;
    pointer-events: none;
}
.tooltip-hover:hover .custom-tooltip,
.tooltip-hover:focus-within .custom-tooltip {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Tooltip below card if would be clipped at top */
@media (min-width: 600px) {
  .tooltip-hover {
    /* Allow space for tooltip below */
    overflow: visible;
  }
  .tooltip-hover .custom-tooltip {
    /* Default: above */
    top: -1.7rem;
    transform: translate(-50%, -100%);
  }
  .tooltip-hover.show-tooltip-below .custom-tooltip {
    top: 100%;
    left: 50%;
    transform: translate(-50%, 0);
    box-shadow: 0 2px 20px rgba(80,120,200,0.18);
  }
}
@media (max-width: 600px) {
    .custom-tooltip {
        font-size: 0.98rem;
        padding: 0.7rem 0.7rem;
        width: 90vw;
        left: 50%;
        top: 100%;
        transform: translate(-50%, 0);
        box-shadow: 0 2px 20px rgba(80,120,200,0.18);
    }
}


/* Card and Grid Styles */
.component-grid, .actuator-grid, .limb-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.limb-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* Anthropomorphism Proportions Comparison Styles */
.system-section {
    margin-bottom: 3.5rem;
}
.system-header {
    gap: 0.7rem;
}
.system-title {
    font-size: 2rem;
    font-weight: 600;
    color: #244a6e;
}
.compare-grid {
    display: flex;
    gap: 2.2rem;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}
.compare-card {
    flex: 1 1 340px;
    min-width: 270px;
    max-width: 420px;
    background: linear-gradient(135deg, #fafdff 70%, #eaf2fb 100%);
    border-radius: 15px;
    box-shadow: 0 3px 14px 0 rgba(80,120,200,0.08);
    padding: 2.1rem 1.3rem 1.5rem 1.3rem;
    text-align: center;
    margin-bottom: 0;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}
.compare-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c497f;
    margin-bottom: 0.7rem;
    letter-spacing: 0.01em;
}
.compare-card p {
    color: #49608a;
    font-size: 1.07rem;
    margin-bottom: 0;
}
.human-card {
    background: linear-gradient(135deg, #fdf6f6 70%, #f4eaea 100%);
    border: 1.5px solid #e9bfbf;
}
.robot-card {
    background: linear-gradient(135deg, #f6faff 70%, #e0eafc 100%);
    border: 1.5px solid #a7c7e7;
}
@media (max-width: 900px) {
    .compare-grid {
        flex-direction: column;
        gap: 1.2rem;
    }
    .compare-card {
        max-width: 100%;
    }
}

.component-card, .actuator-card, .limb-card {
    background: linear-gradient(135deg, #f6faff 60%, #e0eafc 100%);
    border: 1.5px solid #a7c7e7;
    border-radius: 16px;
    padding: 2.2rem 1.5rem 1.7rem 1.5rem;
    text-align: center;
    box-shadow: 0 6px 24px 0 rgba(80, 120, 200, 0.10);
    transition: transform 0.3s cubic-bezier(.23,1.01,.32,1), box-shadow 0.3s cubic-bezier(.23,1.01,.32,1);
    margin-bottom: 1.2rem;
    position: relative;
}

.component-card .component-icon, .actuator-card .actuator-icon, .limb-card .component-icon {
    font-size: 3.5rem;
    margin-bottom: 1.1rem;
    color: #3476c4;
    filter: drop-shadow(0 2px 8px #dbeafe);
}

.limb-card:hover {
    transform: translateY(-7px) scale(1.03);
    box-shadow: 0 14px 32px 0 rgba(80, 120, 200, 0.16);
    border-color: #5c91d6;
}

.limb-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c497f;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.limb-card ul {
    list-style: none;
    padding: 0;
    margin: 0.7rem 0 0 0;
}

.limb-card li {
    font-size: 1.08rem;
    color: #49608a;
    padding: 0.18rem 0;
    border-bottom: 1px dashed #c5d6ea;
}

.limb-card li:last-child {
    border-bottom: none;
}

/* --- ENHANCED TABLE STYLES: More Visible Lines --- */
.enhanced-table {
  width: 100%;
  border-collapse: collapse;
  background: #fafdff;
  font-size: 1.07rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 16px 0 rgba(80,120,200,0.06);
  border-radius: 10px;
  overflow: hidden;
}
.enhanced-table thead th {
  background: linear-gradient(90deg, #eaf2fb 60%, #dbeafe 100%);
  color: #244a6e;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-bottom: 3px solid #7ba2ce;
  border-top: 2px solid #7ba2ce;
  text-align: left;
}
.enhanced-table tbody td {
  padding: 0.38rem 0.9rem;
  border-bottom: 2px solid #b3c9e6;
  border-right: 2px solid #b3c9e6;
  background: #fff;
}
.enhanced-table tbody tr:nth-child(even) td {
  background: #f3f7fb;
}
.enhanced-table tbody tr:hover td {
  background: #e6f0fa;
  transition: background 0.15s;
}
.enhanced-table th, .enhanced-table td {
  border-right: 2px solid #b3c9e6;
}
.enhanced-table th:last-child, .enhanced-table td:last-child {
  border-right: none;
}
.enhanced-table tr:last-child td {
  border-bottom: 3px solid #7ba2ce;
}
@media (max-width: 700px) {
  .enhanced-table thead {
    display: none;
  }
  .enhanced-table, .enhanced-table tbody, .enhanced-table tr, .enhanced-table td {
    display: block;
    width: 100%;
  }
  .enhanced-table tr {
    margin-bottom: 1.1rem;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px 0 rgba(80,120,200,0.07);
  }
  .enhanced-table td {
    border: none;
    border-bottom: 2px solid #b3c9e6;
    position: relative;
    padding-left: 45%;
    min-height: 44px;
    text-align: left;
  }
  .enhanced-table td:before {
    position: absolute;
    left: 1rem;
    top: 0.7rem;
    width: 40%;
    white-space: nowrap;
    font-weight: 600;
    color: #244a6e;
    content: attr(data-label);
  }
  .enhanced-table tr:last-child td {
    border-bottom: 3px solid #7ba2ce;
  }
}
/* --- ENHANCED TABLE STYLES END --- */
