@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&display=swap');

html {
    scroll-behavior: smooth;
}

html, body {
    position: relative; /* make body a positioned container */
}


:target {
    scroll-margin-top: 108px; /* Adjust this if your top bar is taller/shorter */
}

body, h1, h2, h3, h4, h5, h6 {
    font-family: 'Google Sans', sans-serif;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Layout base */
.container {
    display: flex;
    max-width: 80%;
    width: 100%;
    margin: 20px auto;
    background: #fff;
    border-radius: 8px;
    padding: 0px 12px;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

.terms-layout {
    display: flex;
    flex-direction: row;
}

/* Sidebar (Desktop) */
.sidebar {
    width: 220px;
    padding: 24px 16px;
    height: calc(100vh - 110px); /* fill only the area under the header */
    position: fixed;
    top: 104px;
    left: 0;
    border-right: 1.5px solid #000;
    overflow-y: auto;       /* enable vertical scroll */
    scrollbar-width: thin;  /* Firefox */
}


.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    margin-bottom: 18px;
}

.sidebar a {
    color: #a18015;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
}

.sidebar a:hover {
    color: #7C1309;
    text-decoration: underline;
}

.terms-main {
    flex: 1;
    margin-left: 240px;
    margin-top: 90px;
    padding-top: 40px;
}

/* Background image section */
.center-bg-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 420px;
}

.terms-img-bg {
    position: fixed; /* stays in place on scroll */
    top: 50%;
    left: 50%;
    transform: translate(-30%, -30%);
    max-width: 260px;
    opacity: 0.20;
    border-radius: 16px;
    z-index: 0; /* keep it behind the text */
    pointer-events: none; /* prevents interaction */
}


.terms-overlay {
    position: relative;
    z-index: 2;
}

/* Top bar */
.top-bar {
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 4px rgba(0,0,0,0.07);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 0 2px;
}


.bar-title {
    font-size: 2.35rem;
    font-weight: 600;
    color: #5f2116;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 0 4px;
    justify-content: center;
}

.logo-img {
    height: 56px;
    margin-right: 20px;
}

.menu-bar {
    display: flex;
    /* justify-content: flex-start; */
    align-items: left;
    padding-left: 0;
    left: 0;
}

.menu-item {
    color: #a18015;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    display: inline-block;   /* ✅ makes them flow next to each other */
    text-align: center;      /* center text inside */
    width: auto;             /* ✅ don’t force full width */
    box-sizing: border-box;
    transition: color 0.2s;
    margin-left: 0;
    
}


.menu-item:hover {
    color: #5f2116;
}

.menu-item.selected {
    color: #5f2116;
    font-weight: 600;
    text-align: left;
    left: 0;
}

.menu-item.selected:hover {
    color: #5f2116;
}

.menu-item {
    text-decoration: none; /* no underline normally */
}

.menu-item:hover,
.menu-item.selected {
    text-decoration: underline; /* underline on hover or selected */
}



/* FAQ section */
.faq-list li {
    margin-bottom: 28px;
    position: relative;
    z-index: 2;
}

.faq-question {
    font-weight: 600;
    margin-bottom: 1px;
    color: #333;
    font-size: 1.05rem;
}

/* Responsive styles */
@media (max-width: 700px) {
    .terms-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1.5px solid #000;
        display: flex;
        justify-content: center;
        padding: 12px 2px;
        margin-top: 104px; /* accounts for the fixed top-bar height */
        overflow-x: auto;
        white-space: nowrap;
        padding-top: 8px;
        padding-bottom: 8px;
        background: #fff;
        z-index: 10;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        
        top: 0;
    }
    

    .sidebar ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);  /* 2 columns */
    gap: 4px 8px; /* vertical and horizontal spacing */
    padding: 0 12px;
    justify-items: start;
    }

  
    .sidebar li {
        margin-bottom: 1px !important;
    }

    .sidebar a {
    font-size: 0.85rem;      /* Smaller text */
    padding: 4px 2px;        /* Less padding */
    line-height: 1.2;        /* Tighter line spacing */
    word-break: break-word;
    text-align: center;
    display: block;
    
}

.terms-img-bg {
    position: fixed; /* stays in place on scroll */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 260px;
    opacity: 0.20;
    border-radius: 16px;
    z-index: 0; /* keep it behind the text */
    pointer-events: none; /* prevents interaction */
}


    .terms-main {
        margin-top: 10px;
        margin-left: 0;
        padding: 0px 2vw 0 2vw;
    }

    .terms-img-bg {
        max-width: 160px;
    }

    h1, h2 {
        font-size: 1.1rem;
        word-break: break-word;
    }

    p {
        font-size: 1rem;
        word-break: break-word;
    }

    .container {
        padding: 0;
        margin: 0 auto;
        width: 90%;
        max-width: 100%;
    }

    .menu-bar {
    display: flex;
    justify-content: center; /* ✅ centers items horizontally */
    align-items: center;
    padding-left: 0;
    left: 0;
 }

    .menu-item {
        text-align: center;
        width: auto;
        margin: 0 auto;
    }

    .go-top-btn {
    position: fixed;
    bottom: 120px;
    right: 20px;
    z-index: 100;
    font-size: 18px;
    padding: 12px 16px;
    border: none;
    border-radius: 50%;
    background-color: #7C1309;
    color: white;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.go-top-btn:hover {
    background-color: #7C1309;
}
}

@media (max-width: 420px) {
    .bar-title {
        font-size: 1.5rem;
        flex-direction: column;
        text-align: center;
    }

    .container {
        padding: 0;
        margin: 0 auto;
        width: 90%;
        max-width: 100%;
    }
    .menu-bar {
    display: flex;
    justify-content: center; /* ✅ centers items horizontally */
    align-items: center;
    padding-left: 0;
    left: 0;
}

    .menu-item {
    text-align: center;
    width: auto;
    margin: 0;           /* ✅ no auto-centering */
    display: inline-block; /* ✅ allow side-by-side flow */
    }



    .terms-img-bg {
        max-width: 120px;
    }

    .faq-question {
        font-size: 1rem;
    }

    .terms-main {
        padding-top: 12px;
    }

    .go-top-btn {
    position: fixed;
    bottom: 120px;
    right: 20px;
    z-index: 100;
    font-size: 18px;
    padding: 12px 16px;
    border: none;
    border-radius: 50%;
    background-color: #7C1309;
    color: white;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.go-top-btn:hover {
    background-color: #7C1309;
}
}
