@import url('https://fonts.googleapis.com/css2?family=Berkshire+Swash&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
    --primary-color: #371011;
    --primary-light: #5c2022;
    --primary-rgb: 55, 16, 17;
    --surface-color: #FBFAF3;
    --surface-card: #ffffff;
    --text-primary: #212529;
    --text-muted: #6c757d;
    --accent-color: #D4AF37; /* Metallic Gold */
    --accent-warm: #e6b940;
    --border-color: rgba(55, 16, 17, 0.08);
    --hover-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --font-sans: 'Google Sans Flex', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-serif: 'Berkshire Swash', cursive;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--surface-color);
    color: var(--text-primary);
    line-height: 1.7;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--surface-color);
}
::-webkit-scrollbar-thumb {
    background: rgba(55, 16, 17, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Premium Typography styling */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-x {
    font-family: var(--font-serif);
    color: inherit;
    display: inline-block;
    font-weight: normal;
    text-transform: none;
    margin-left: 2px;
}

/* Navbar */
.navbar {
    background-color: var(--surface-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 15px rgba(55, 16, 17, 0.03);
    padding: 1rem 0;
    z-index: 1030;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 40px;
    margin-right: 12px;
    object-fit: contain;
}

.nav-btn {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--hover-transition);
}

.nav-btn:hover {
    background-color: var(--primary-light);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(55, 16, 17, 0.15);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e0506 100%);
    color: #ffffff;
    padding: 5rem 0 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-section h1 {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-section p {
    color: rgba(251, 250, 243, 0.8);
    font-size: 1.15rem;
    max-width: 600px;
}

.badge-update {
    background-color: rgba(212, 175, 55, 0.2);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
}

/* Search bar styling */
.search-wrapper {
    position: relative;
    max-width: 500px;
    margin-top: 1.5rem;
}

.search-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 30px;
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    font-size: 0.95rem;
    width: 100%;
    backdrop-filter: blur(10px);
    transition: var(--hover-transition);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    outline: none;
    color: #ffffff;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
}

/* Content Layout */
.main-container {
    padding: 3rem 0;
}

/* Sidebar Navigation */
.sidebar-sticky {
    position: sticky;
    top: 30px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding-right: 1rem;
}

.toc-card {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(55, 16, 17, 0.02);
}

.toc-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid transparent;
    transition: var(--hover-transition);
    border-radius: 0 8px 8px 0;
}

.toc-link:hover {
    color: var(--primary-color);
    background-color: rgba(55, 16, 17, 0.03);
    border-left-color: rgba(55, 16, 17, 0.3);
    padding-left: 0.9rem;
}

.toc-link.active {
    color: var(--primary-color);
    background-color: rgba(55, 16, 17, 0.05);
    border-left-color: var(--primary-color);
    font-weight: 700;
    padding-left: 0.9rem;
}

/* Policy Content Layout */

/* Policy Content Details */
.policy-card {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 4px 30px rgba(55, 16, 17, 0.02);
}

.policy-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.policy-section:first-child {
    padding-top: 0;
}

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

.policy-section h2 {
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: rgba(55, 16, 17, 0.06);
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 1.1rem;
    transition: var(--hover-transition);
}

.policy-section:hover .section-icon {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: rotate(5deg) scale(1.05);
}

/* Highlight style for search functionality */
.search-highlight {
    background-color: rgba(212, 175, 55, 0.3);
    border-bottom: 2px solid var(--accent-color);
    padding: 0 2px;
    border-radius: 2px;
}

/* Tables in Policy */
.policy-table-wrapper {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.policy-table {
    margin-bottom: 0;
    width: 100%;
}

.policy-table th {
    background-color: rgba(55, 16, 17, 0.04);
    color: var(--primary-color);
    font-weight: 700;
    border-bottom: 2px solid var(--border-color);
    padding: 0.85rem 1.2rem;
}

.policy-table td {
    padding: 0.85rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
}

.policy-table tr:last-child td {
    border-bottom: none;
}

/* Cards & Alerts */
.policy-alert {
    background-color: rgba(212, 175, 55, 0.08);
    border-left: 4px solid var(--accent-color);
    color: #584a22;
    padding: 1.25rem;
    border-radius: 0 12px 12px 0;
    margin: 1.5rem 0;
}

.policy-alert-danger {
    background-color: rgba(220, 53, 69, 0.05);
    border-left: 4px solid #dc3545;
    color: #842029;
    padding: 1.25rem;
    border-radius: 0 12px 12px 0;
    margin: 1.5rem 0;
}

.card-item-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.list-item-card {
    background-color: rgba(55, 16, 17, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--hover-transition);
}

.list-item-card:hover {
    transform: translateY(-2px);
    background-color: rgba(55, 16, 17, 0.04);
    border-color: rgba(55, 16, 17, 0.15);
}

.list-item-card i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

/* Modals */
.modal-content {
    background-color: var(--surface-color);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(55, 16, 17, 0.15);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
}

.form-control, .form-select {
    border: 1px solid rgba(55, 16, 17, 0.15);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: var(--hover-transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(55, 16, 17, 0.1);
}

/* Footer styling */
footer {
    background-color: #1e0506;
    color: #ffffff;
    padding: 4rem 0 2rem 0;
    margin-top: 5rem;
    position: relative;
}

footer h1, footer h2, footer h3, footer h4, footer h5, footer h6 {
    color: #ffffff !important;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--hover-transition);
}

footer a:hover {
    color: var(--accent-color);
}

.footer-logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
    margin-top: 3rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* WebView / Mobile App Mode overrides */
body.webview-mode {
    background-color: var(--surface-color);
}
body.webview-mode .navbar,
body.webview-mode .hero-section,
body.webview-mode footer {
    display: none !important;
}
body.webview-mode .main-container {
    padding: 1rem 0 !important;
}
body.webview-mode .policy-card {
    border: none !important;
    box-shadow: none !important;
    padding: 1rem !important;
    background: transparent !important;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    aside.col-lg-3 {
        position: sticky;
        top: 0;
        z-index: 1020;
        background-color: var(--surface-color);
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 10px rgba(55, 16, 17, 0.02);
        max-width: 100vw;
        width: 100%;
        overflow-x: hidden;
    }
    
    body.webview-mode aside.col-lg-3 {
        top: 0 !important;
    }

    .sidebar-sticky {
        position: static !important;
        margin-bottom: 0 !important;
        padding: 0.5rem 0;
        max-height: none;
        overflow-y: visible;
        max-width: 100%;
    }

    .toc-card {
        padding: 0.25rem 0.5rem;
        border: none;
        box-shadow: none;
        background: transparent;
        border-radius: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .toc-title {
        display: none;
    }

    .toc-nav {
        display: flex;
        flex-direction: row !important;
        overflow-x: auto;
        white-space: nowrap;
        gap: 0.5rem;
        padding-bottom: 0.25rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    
    .toc-nav::-webkit-scrollbar {
        display: none; /* Hide scrollbar for a cleaner mobile app look */
    }

    .toc-link {
        border-left: none !important;
        border-bottom: 2px solid transparent;
        border-radius: 20px !important;
        padding: 0.4rem 1rem !important;
        font-size: 0.85rem;
        background-color: rgba(55, 16, 17, 0.04);
        scroll-snap-align: start;
    }

    .toc-link:hover {
        padding-left: 1rem !important;
        background-color: rgba(55, 16, 17, 0.08);
    }

    .toc-link.active {
        border-bottom-color: var(--primary-color);
        background-color: var(--primary-color);
        color: #ffffff !important;
        padding-left: 1rem !important;
        font-weight: 600;
    }

    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.25rem;
    }

    .search-wrapper {
        margin-top: 1rem;
        max-width: 100%;
    }
    
    .policy-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .policy-section h2 {
        font-size: 1.35rem;
    }

    /* Wrap tables on small devices to prevent overflow */
    .policy-table-wrapper {
        overflow-x: auto;
    }

    .policy-table th, .policy-table td {
        padding: 0.75rem 0.9rem;
        font-size: 0.88rem;
    }

    .card-item-list {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 0.75rem;
    }

    .list-item-card {
        padding: 0.85rem 1rem;
    }
}

@media (max-width: 575.98px) {
    .hero-section h1 {
        font-size: 1.85rem;
    }
    .hero-section p {
        font-size: 1rem;
    }
    .policy-card {
        padding: 1rem;
        border: none;
        box-shadow: none;
        background: transparent;
    }
    .policy-section {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

/* ==========================================================================
   Landing Page specific styles (index.html)
   ========================================================================== */

body.landing-page {
    background-color: var(--surface-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
}

/* Subtle background decorative shapes */
body.landing-page::before {
    content: '';
    position: absolute;
    top: -15%;
    right: -15%;
    width: 45%;
    height: 45%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

body.landing-page::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -15%;
    width: 45%;
    height: 45%;
    background: radial-gradient(circle, rgba(55, 16, 17, 0.04) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.landing-container {
    max-width: 800px;
    width: 100%;
    text-align: center;
    z-index: 2;
    position: relative;
    padding: 3rem 1.5rem;
}

/* iOS-style premium App Icon container */
.app-icon-card {
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, #ffffff 0%, #fffdf8 40%, #f6f1e5 100%);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2.5rem auto;
    box-shadow: 0 16px 36px rgba(55, 16, 17, 0.08), 0 4px 10px rgba(55, 16, 17, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.9);
    transition: var(--hover-transition);
}

.app-icon-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 20px 45px rgba(55, 16, 17, 0.12), 0 6px 15px rgba(55, 16, 17, 0.04);
}

.app-icon-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.landing-title {
    font-size: 3.25rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.landing-subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 3.5rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.buttons-grid {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Highly polished responsive buttons matching reference layout structure */
.landing-btn {
    background-color: var(--accent-warm);
    color: var(--primary-color);
    border: none;
    padding: 0.95rem 2.2rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-width: 230px;
    transition: var(--hover-transition);
    box-shadow: 0 6px 18px rgba(230, 185, 64, 0.18);
    text-decoration: none;
}

.landing-btn:hover {
    background-color: #f3c754; /* Slightly brighter warm gold */
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(230, 185, 64, 0.3);
}

/* Alternate color variant for terms & conditions and support */
.landing-btn-secondary {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(55, 16, 17, 0.12);
}

.landing-btn-secondary:hover {
    background-color: var(--primary-light);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(55, 16, 17, 0.22);
}

.landing-btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.landing-btn-outline:hover {
    background-color: rgba(55, 16, 17, 0.04);
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 6px 18px rgba(55, 16, 17, 0.05);
}

.landing-btn i {
    font-size: 1.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .landing-container {
        padding: 2rem 1rem;
    }
    .landing-title {
        font-size: 2.5rem;
    }
    .landing-subtitle {
        font-size: 1.05rem;
        margin-bottom: 2.5rem;
    }
    .buttons-grid {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
    }
    .landing-btn {
        width: 100%;
        max-width: 340px;
    }
}


