* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Smooth scrolling for page jumps */
html {
    scroll-behavior: smooth;
}

body {
    background-color: #f4f7f6;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Navigation Header */
header {
    background-color: #182848;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    max-width: 1000px;
    margin: 0 auto;
}

.header-title h1 {
    font-size: 20px;
    margin-bottom: 2px;
}

.header-title p {
    font-size: 12px;
    color: #a0aec0;
}

/* Burger Icon Styling */
.burger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 1001;
}

.burger-icon span {
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Burger Animation when active */
.burger-icon.active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.burger-icon.active span:nth-child(2) {
    opacity: 0;
}

.burger-icon.active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* Slide-down Nav Drawer */
.nav-menu {
    display: none;
    background-color: #111d35;
    border-top: 1px solid #233554;
    max-width: 900px;
    margin: 0 auto;
}

.langsub-menu {
  position: fixed;
  bottom: 80px;
  bottom: calc(80px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 1001;
  display: flex;
  justify-content: flex-end; /* Align items to the right */
  gap: 4px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  background-color: #f0f2f5;
  border-radius: 4px;
}

.langsub-menu a {
  align-items: center;
  color: #182848;
  display: inline-flex;
  min-height: 40px;
  padding: 0 8px;
  text-decoration: none;
}

.langsub-menu a:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.langsub-menu > span {
  align-items: center;
  display: inline-flex;
  color: #182848;
}

.nav-menu.open {
    display: block;
}

.nav-menu ul {
    list-style: none;
    padding: 10px 0;
}

.nav-menu li a {
    display: flex;
    
    gap: 12px;
    padding: 14px 20px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s ease;
}



.nav-menu li a:hover {
    background-color: #1e2d4a;
    color: #ffffff;
}

/* Main App Container */
.app-container {
    max-width: 900px;
    width: 100%;
    margin: 20px auto;
    padding: 0 15px;
    flex: 1;
}

/* 3-Menu Navigation Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.menu-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px 20px;
   
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.menu-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.menu-card.active {
    border-color: #4b6cb7;
    background-color: #f0f4ff;
}

.menu-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.menu-title {
    font-size: 20px;
    font-weight: bold;
    color: #182848;
    margin-bottom: 6px;
}

.menu-subtitle {
    font-size: 13px;
    color: #666;
}

/* Dynamic Content Body Area */
.content-area {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    min-height: 350px;
    scroll-margin-top: 80px;
}

.section-content {
    display: none;
}

.section-content.active {
    display: block;
}

.section-heading {
    font-size: 20px;
    color: #182848;
    margin-bottom: 10px;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 8px;
}

/* Styled Links */
.link-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.url-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8f9fa;
    border: 1px solid #e2e8f0;
    padding: 14px 18px;
    border-radius: 8px;
    color: #182848;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.url-link:hover {
    background-color: #030b1f;
    color: #2d2727;
    border-color: #061539;
    transform: translateX(4px);
}

.url-link::after {
    content: "🔗";
    font-size: 14px;
}

/* Responsive YouTube Video Grid */
.video-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 20px;
}

.video-card {
    background: #fafafa;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.card {
            background: #ffffff;
            padding: 15px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            width: 100%;            /* Fills the column width */
            box-sizing: border-box;
            text-align: center;
        }

.car-part {
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.car-part figure {
    margin: 0;
}

.car-part img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.car-part figcaption {
    margin-top: 8px;
}

.card img {
            width: 100%;
            height: auto;
            border-radius: 4px;
            display: block;
        }
.single-column-container {
            display: flex;
            flex-direction: column; /* Stacks items vertically */
            align-items: center;    /* Centers cards horizontally */
            gap: 10px;              /* Space between rows */
            max-width: 800px;       /* Limits the column width */
            margin: 0 auto;         /* Centers the entire container on the page */
        }

.sign-list {
    width: 100%;
    padding: 0;
}

.sign-list .card {
    width: 100%;
}
/* Footer Styling */
footer {
    background-color: #182848;
    color: #a0aec0;
    text-align: center;
    padding: 20px 10px;
    margin-top: 40px;
    font-size: 14px;
}

footer p {
    margin: 0;
}

footer span {
    color: #ffffff;
    font-weight: 600;
}

/* Add bottom margin to body so fixed footer doesn't overlap content */
body {
  margin-bottom: 128px;
}

/* Content Body Framing Styles */
.content-area {
  max-width: 800px;
  margin: 20px auto;
  padding: 0 15px;
}

/* Framed Box Container for Sections */
.section-content {
  background-color: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.section-heading {
  margin-top: 0;
  color: #1a202c;
  border-bottom: 2px solid #edf2f7;
  padding-bottom: 10px;
}

/* Links Framing */
.url-link {
  display: block;
  padding: 12px 16px;
  margin: 10px 0;
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  text-decoration: none;
  color: #2563eb;
  font-weight: 500;
  transition: all 0.2s ease;
}

.url-link:hover {
  background-color: #eff6ff;
  border-color: #3b82f6;
}

/* Video Frame Box */
.video-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background-color: #f8fafc;
}

/* Fixed Footer Styling */
.fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #1e2d4a;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
  padding: 10px 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Oval Buttons Container */
.fixed-footer-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
    max-width: 620px;
    gap: 6px;
  padding: 4px 10px;
}

/* Oval Shape Menu Items */
.footer-oval-btn {
    flex: 1 1 0;
    min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #f0f4f8;
  color: #333333;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 50px; /* Gives the oval shape */
  font-size: 14px;
  font-weight: bold;
  border: 1px solid #dcdcdc;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

@media (max-width: 480px) {
    .fixed-footer-nav {
        gap: 4px;
        padding: 4px 8px;
    }

    .footer-oval-btn {
        flex-direction: column;
        gap: 2px;
        padding: 6px 3px;
        font-size: 11px;
        line-height: 1.2;
        text-align: center;
    }
}

.footer-oval-btn:hover,
.footer-oval-btn:active {
  background-color: #182848;
  color: #ffffff;
  border-color: #182848;
}

/* Oval Page Title Styling */
.oval-title-container {
  display: inline-block;
  background: linear-gradient(135deg, #f4f5f8, #030f31);
  color: #ffffff;
  padding: 12px 30px;
  border-radius: 50px; /* Creates the oval shape */
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
  text-align: left;
  margin: 10px auto;
}

.oval-title-container h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.oval-title-container p {
  margin: 4px 0 0 0;
  font-size: 13px;
  opacity: 0.9;
}

.has-submenu {
    position: relative;
}
.has-submenu > a {
    display: flex;
    
    
}
.submenu {
    display: none; /* Hidden by default on mobile */
    list-style: none;
    padding-left: 15px;
    margin: 5px 0;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
}
/* Active class added via JS toggle when tapped on mobile */
.has-submenu.active-submenu .submenu {
    display: block; 
}
.submenu li a {
    font-size: 13px !important;
    padding: 10px !important;
    color: #e2e8f0 !important;
    display: block;
}

/* --- Quiz Modal Popup Styles --- */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #ffffff;
    width: 95%;
    max-width: 720px;
    height: 85vh;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Bulletproof Close Button Styling */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
    background: #e4e6eb;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* Forces it to stay on top of everything */
}

.close-btn:hover {
    background: #ff0000;
    color: #fff;
}

#quizIframe {
    width: 100%;
    height: 100%;
    border: none;
    margin-top: 50px; /* Leaves safe space for the close button */
}

/* Car parts reference */
.car-reference-header {
    margin-bottom: 20px;
    text-align: center;
}

.car-reference-header h3 {
    color: #182848;
    font-size: 1.45rem;
    margin-bottom: 4px;
}

.car-reference-header p {
    color: #667085;
    font-size: 0.95rem;
}

.car-search-box {
    margin-bottom: 20px;
}

.car-search-box input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.car-search-box input:focus {
    border-color: #4b6cb7;
    box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.15);
    outline: none;
}

.car-reference .section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
}

.car-reference .section-title {
    border-bottom: 2px solid #edf2f7;
    color: #4b6cb7;
    font-size: 1.15rem;
    margin: 0 0 14px;
    padding-bottom: 7px;
}

.car-reference .vocab-list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.car-reference .vocab-item {
    background: #f8fafc;
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
}

.car-reference .vocab-item.full-width {
    background: #eff6ff;
    border-left: 4px solid #4b6cb7;
    grid-column: 1 / -1;
}

.car-reference .english {
    color: #182848;
    font-size: 0.92rem;
    font-weight: 600;
}

.car-reference .amharic {
    color: #0d9488;
    font-size: 0.88rem;
    font-weight: 500;
    margin-top: 2px;
}

.car-reference .description {
    color: #667085;
    font-size: 0.82rem;
    margin-top: 5px;
}

.car-reference-empty {
    color: #667085;
    display: none;
    padding: 18px 0;
    text-align: center;
}

.car-reference-gallery {
    margin-top: 25px;
}

.car-reference-gallery h3 {
    border-bottom: 2px solid #edf2f7;
    color: #182848;
    font-size: 1.15rem;
    margin: 0 0 14px;
    padding-bottom: 8px;
}

.car-reference-gallery-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

.car-reference-gallery figure,
.single-column-container .card,
.single-column-container figure {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 0;
    overflow: hidden;
    padding: 0;
    box-shadow: none;
}

.car-reference-gallery img,
.single-column-container .card img,
.single-column-container figure img {
    display: block;
    height: auto;
    border-radius: 0;
    width: 100%;
}
