/* ============================================================
GLOBAL VARIABLES
============================================================ */

:root {
    --bg: #f5f7fb;
    --bg-content: #ffffff;
    --primary: #1b4b8c;
    --primary-light: #e3edf9;
    --accent: #f39c12;
    --text: #222;
    --border: #d0d7e5;
    --sidebar-bg: #f0f3fa;
    --shadow-soft: 0 2px 6px rgba(0, 0, 0, 0.06);
    --radius: 6px;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ============================================================
GLOBAL RESET
============================================================ */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================================
TOP NAVIGATION BAR
============================================================ */

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.logo {
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* Mobile Cascade Button */
.mobile-menu-btn {
    display: none;
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

.top-menu a {
    margin-left: 1rem;
    color: #fff;
    font-size: 0.95rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.top-menu a.active,
.top-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

/* ============================================================
PAGE LAYOUT
============================================================ */

.layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 56px);
}

/* ============================================================
SIDEBAR (DESKTOP ONLY)
============================================================ */

.sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 1rem;
}

.sidebar h2 {
    margin-top: 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.sidebar li {
    margin-bottom: 0.35rem;
}

.sidebar a {
    display: block;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
}

.sidebar a:hover {
    background: var(--primary-light);
    text-decoration: none;
}

.sidebar a.active {
    background: var(--primary);
    color: #fff;
}

/* ============================================================
MOBILE CASCADE MENU
============================================================ */

.cascade-menu {
    display: none;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem;
}

.cascade-menu.open {
    display: block;
}

.cascade-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cascade-menu li {
    padding: 0.5rem 0;
}

.cascade-menu a {
    font-size: 1rem;
    color: var(--primary);
}

/* ============================================================
MAIN CONTENT AREA
============================================================ */

.content {
    padding: 1.5rem;
    background: var(--bg);
}

.content h1 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

/* ============================================================
CARD GRID (UNIT CONVERTERS)
============================================================ */

.converter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.card {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    background: #ffffff;
    border: 2px solid #333;
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s ease;
    padding: 0.5rem;
}

.card:hover {
    background: #f0f0f0;
    transform: translateY(-3px);
}

.card h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #000;
}

/* ============================================================
UNIT CONVERTER PANEL (INDIVIDUAL PAGES)
============================================================ */

.converter-box {
    max-width: 480px;
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    margin-top: 20px;
}

.yellow-input {
    background: #fff7c2;
    padding: 12px;
    width: 100%;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 16px;
    margin-bottom: 15px;
}

select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 15px;
}

.green-output {
    background: #d6f5d6;
    padding: 12px;
    width: 100%;
    border-radius: 6px;
    border: 1px solid #7ac27a;
    font-size: 18px;
    font-weight: bold;
    display: block;
}

/* ============================================================
CLEAR BUTTON
============================================================ */

.clear-btn {
    background: #e53935;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 15px;
    margin-top: 15px;
}

/* ============================================================
RESPONSIVE DESIGN (MOBILE)
============================================================ */


@media only screen and (max-width: 600px) and (orientation: landscape) {

 .wrapper-main { width:100%; }
}

@media only screen and (max-width: 600px) and (orientation: portrait) {

 .wrapper-main { width:100%; }
}

@media only screen and (min-width: 601px) and (orientation: landscape) {

 .wrapper-main { width:100%; }
}

@media only screen and (min-width: 601px) and (orientation: portrait) {

 .wrapper-main { width:100%; }
}

@media only screen and (min-width: 768px) and (orientation: landscape) {

 .wrapper-main { width:100%; }
}

@media only screen and (min-width: 768px) and (orientation: portrait) {

 .wrapper-main { width:100%; }
}

@media only screen and (min-width: 992px) and (orientation: landscape) {

 .wrapper-main { width:100%; }
}

@media only screen and (min-width: 992px) and (orientation: portrait) {

 .wrapper-main { width:100%; }
}

