html, body {
    margin:0;
    padding: 0;
    font-family: Plus Jakarta Sans, sans-serif;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}


header {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: 200px;
    width: 100%;
    height: 8vh;
    box-sizing: border-box;
    position: relative;
    z-index: 100;
    overflow: visible;
}

.header-logo {
    font-size: 50px;
    cursor: pointer;
    text-decoration: none;
    font-family: Inter, sans-serif;
    font-weight: bolder;
    color: #2983FF;
}

.header-left {
    display: flex;
    align-items: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
}

nav a {
    color: rgb(17, 120, 255);
    cursor: pointer;
    transition: color 0.3s ease;
    text-decoration: none;
}

.header-search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 400px;
  flex-direction: row;
  margin-left: 90px;
}

.header-search-input {
  width: 100%;
  padding: 0.5em 2.5em 0.5em 1em;
  border-radius: 2em;
  border: 1px solid #ccc;
  outline: none;
  font-size: 1rem;
  background: #fafafa;
}

.header-search-btn {
  position: absolute;
  right: 0.5em;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: #888;
  font-size: 1.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1.8em;
  width: 1.8em;
}

.header-search-btn:active,
.header-search-btn:focus {
  outline: none;
  box-shadow: none;
}

nav a:hover {
    color: rgb(9, 60, 128);
}

nav div a.button {
    padding: 16px 20px;
    background: none;
    border: solid rgb(17, 120, 255) 2px;
    border-radius: 10px;
    color: rgb(17, 120, 255);
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(0);
}

nav a.button:hover {
    color: white;
    background-color: rgb(17, 120, 255);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(17, 120, 255, 0.2);
}

.profile-picture-container {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f2f6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(17, 120, 255, 0.07);
    margin-left: 10px;
    overflow: hidden;
    cursor: pointer;
}

.profile-picture-header {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0;
    display: block;
}

.profile-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logout-form {
    margin: 0;
}

.logout-btn {
    background: none;
    border: 2px solid #c62828;
    color: #c62828;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 10px;
}

.logout-btn:hover {
    background: #c62828;
    color: #fff;
}

#header-auth {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* New Styles */
.bolt-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: #00c169;
    color: white;
    font-size: 1.4rem;
    font-weight: bold;
    border-radius: 12px;
    text-decoration: none;
}

.header-icon-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background-color: white;
    color: #555;
    font-size: 1.1rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.icon-btn:hover {
    background-color: #f5f5f5;
}

.header-heart-icon {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
    pointer-events: none;
}

.index-page .header-heart-icon {
    filter: brightness(0) invert(1);
}

.notification-btn .notification-dot {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background-color: #ff3b30;
    border-radius: 50%;
    border: 1px solid white;
}

.profile-dropdown-container {
    position: relative;
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: 55px;
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    overflow: hidden;
    width: 320px;
    padding: 8px;
    border: 1px solid #e0e0e0;
}

.profile-dropdown a,
.profile-dropdown button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    color: #333;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
    background-color: #f5f5f5;
}

/* New Dropdown Content Styles */
.dropdown-profile-info {
    display: flex;
    align-items: center;
    padding: 12px;
    gap: 12px;
}

.profile-picture-container.large {
    width: 48px;
    height: 48px;
}

.profile-picture-container.large .profile-picture-header {
    width: 44px;
    height: 44px;
}

.profile-text-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.profile-name {
    font-weight: bold;
    color: #333;
}

.profile-email {
    font-size: 0.85rem;
    color: #777;
}

.dropdown-profile-info .fa-chevron-down {
    color: #777;
}

.dropdown-section-separator {
    border-top: 1px solid #f0f0f0;
    margin: 8px 0;
}

.dropdown-nav-section {
    padding: 0 4px;
}

.dropdown-link, .dark-mode-label, .dropdown-logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
}

.dropdown-link:hover {
    background-color: #f5f5f5;
}

.dropdown-dark-mode {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
}

.switch-container-dropdown {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}
.switch-container-dropdown input { opacity: 0; width: 0; height: 0; }
.switch-container-dropdown .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 20px; }
.switch-container-dropdown .slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .switch-container-dropdown .slider { background-color: #2196F3; }
input:checked + .switch-container-dropdown .slider:before { transform: translateX(20px); }


.dropdown-plan-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f7f9fc;
    padding: 12px;
    border-radius: 8px;
    margin: 8px;
}

.plan-info {
    display: flex;
    flex-direction: column;
}

.plan-name {
    font-weight: bold;
}

.plan-expiry {
    font-size: 0.8rem;
    color: #777;
}

.upgrade-btn {
    background-color: #1a73e8;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

.dropdown-logout-btn {
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
}

.dropdown-logout-btn:hover {
    background-color: #f5f5f5;
}

/* Cleanup old styles */
.profile-info-row, .logout-btn {
    display: none;
}

#content {
    min-height: 92vh;
}

/* New Notification/Message Dropdown Styles */
.header-dropdown-container {
    position: relative;
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: 55px;
    right: 0;
    width: 380px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    z-index: 9999;
    padding-bottom: 8px;
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: #f9f9f9;
}

.notification-item.unread {
    background-color: #eaf2ff;
}

.notification-pfp {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.notification-content {
    flex-grow: 1;
}

.notification-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-title {
    font-weight: bold;
}

.notification-time {
    font-size: 0.8rem;
    color: #999;
}

.unread-dot {
    width: 10px;
    height: 10px;
    background-color: #1a73e8;
    border-radius: 50%;
    margin-left: auto;
}

.view-all-link {
    display: block;
    text-align: center;
    padding: 12px;
    color: #1a73e8;
    font-weight: bold;
    text-decoration: none;
    border-top: 1px solid #f0f0f0;
}

.view-all-link:hover {
    background-color: #f5f5f5;
}

/* Index page specific styles */
.index-page header {
    background-color: #2983FF;
}

.index-page .header-logo {
    color: white;
}

.index-page nav a {
    color: white;
}

.index-page nav a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.index-page nav div a.button {
    border-color: white;
    color: white;
}

.index-page nav div a.button:hover {
    color: #2983FF;
    background-color: white;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

.index-page .icon-btn {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.index-page .icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Desktop: same horizontal inset on all pages (matches index hero / FAQ margins) */
@media (min-width: 769px) {
    header {
        justify-content: flex-start;
        gap: 32px;
        padding-left: 130px;
        padding-right: 130px;
        box-sizing: border-box;
        max-width: 100%;
    }
}

.index-page .profile-picture-container {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Keep dropdowns with original colors even on index page */
.index-page .profile-dropdown,
.index-page .notification-dropdown {
    background-color: white;
}

.index-page .profile-dropdown a,
.index-page .profile-dropdown button,
.index-page .notification-dropdown .dropdown-header,
.index-page .notification-content p,
.index-page .notification-title {
    color: #333;
}

.index-page .profile-dropdown a:hover,
.index-page .profile-dropdown button:hover,
.index-page .notification-item:hover {
    background-color: #f5f5f5;
}

.search-header {
    height: 130px;
    border: 1px solid #ccc;
    background-color: white;
}


#messages, #favourites, #notif{
    display: none;
}

/* Mobile responsive styles */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #2983FF;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.mobile-menu-btn:hover {
    background-color: rgba(41, 131, 255, 0.12);
}

.index-page .mobile-menu-btn {
    color: white;
}

.index-page .mobile-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #2983FF;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: visible;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    color: white;
    padding: 12px 0;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.header-nav-cluster {
    display: inline-flex;
    align-items: center;
    gap: 20px;
}

.lang-switcher {
    position: relative;
    flex-shrink: 0;
}

.lang-switcher__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(41, 131, 255, 0.25);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font: inherit;
    line-height: 1;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.lang-switcher__trigger:hover {
    background: #fff;
    border-color: rgba(41, 131, 255, 0.45);
}

.lang-switcher__flag {
    width: 22px;
    height: 16px;
    display: block;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.lang-switcher__chevron {
    font-size: 0.7rem;
    color: #2983FF;
    transition: transform 0.2s ease;
}

.lang-switcher__trigger[aria-expanded="true"] .lang-switcher__chevron {
    transform: rotate(180deg);
}

.lang-switcher__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    min-width: 168px;
    padding: 6px;
    margin: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    z-index: 1200;
}

.lang-switcher__form {
    margin: 0;
}

.lang-switcher__option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #1a202c;
    font: inherit;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.lang-switcher__option:hover {
    background: rgba(41, 131, 255, 0.08);
}

.index-page .lang-switcher__trigger {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.index-page .lang-switcher__trigger:hover {
    background: rgba(255, 255, 255, 0.2);
}

.index-page .lang-switcher__chevron {
    color: #fff;
}

.mobile-nav-lang {
    position: relative;
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-nav .lang-switcher {
    margin: 0;
    width: auto;
}

.mobile-nav .lang-switcher__trigger {
    width: auto;
    justify-content: flex-start;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.mobile-nav .lang-switcher__chevron {
    color: #fff;
}

.mobile-nav .lang-switcher__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: auto;
    min-width: 180px;
    margin: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    z-index: 1100;
}

.mobile-nav .lang-switcher__option {
    color: #1a202c;
}

.mobile-nav .lang-switcher__option:hover {
    background: rgba(41, 131, 255, 0.08);
}

@media (min-width: 769px) {
    .lang-switcher__flag {
        width: 28px;
        height: 20px;
    }

    .lang-switcher__trigger {
        padding: 9px 14px;
        gap: 10px;
    }

    .lang-switcher__chevron {
        font-size: 0.8rem;
    }

    .lang-switcher__menu {
        min-width: 188px;
        padding: 8px;
    }

    .lang-switcher__option {
        padding: 12px 14px;
    }
}

.desktop-nav {
    display: flex;
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
}

.desktop-only {
    display: flex;
    gap: 20px;
}

.mobile-only {
    display: none;
}

/* Mobile dropdown items - hidden on desktop */
.mobile-dropdown-item {
    display: none;
}

/* Ensure mobile elements are hidden on desktop */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }
    
    .mobile-nav {
        display: none !important;
    }
    
    .mobile-only {
        display: none !important;
    }
    
    .mobile-dropdown-item {
        display: none !important;
    }
}

/* Mobile responsive breakpoints */
@media (max-width: 768px) {
    header {
        justify-content: flex-end;
        gap: 0;
        padding: 0 16px;
    }

    /* Index: transparent header over full-screen hero photo */
    .index-page header {
        background-color: transparent;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
    }

    .index-page .mobile-nav {
        background-color: rgba(41, 131, 255, 0.96);
    }
    
    .mobile-menu-btn {
        display: block;
        position: relative;
        z-index: 2;
        margin-left: auto;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: flex !important;
    }
    
    /* Ensure mobile login button matches desktop styling */
    .mobile-only .button {
        padding: 10px;
        background: none;
        border: solid rgb(17, 120, 255) 2px;
        border-radius: 10px;
        color: rgb(17, 120, 255);
        cursor: pointer;
        transition: all 0.3s ease;
        transform: translateY(0);
        text-decoration: none;
        display: inline-block;
    }
    
    .mobile-only a.navlink.button:hover {
        color: white;
        background-color: rgb(17, 120, 255);
        transform: translateY(-3px);
        box-shadow: 0 4px 8px rgba(17, 120, 255, 0.2);
    }
    
    /* Index page mobile login button */
    .index-page .mobile-only a.navlink.button {
        border-color: white;
        color: white;
    }
    
    .index-page .mobile-only a.navlink.button:hover {
        color: #2983FF;
        background-color: white;
        box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
    }

    
    .mobile-dropdown-item {
        display: flex;
    }
    
    /* True viewport center — ignore hamburger width asymmetry */
    .header-main {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        flex: none;
        display: flex;
        justify-content: center;
        pointer-events: none;
    }

    .header-main .header-logo {
        pointer-events: auto;
    }
    
    .header-logo {
        font-size: 32px;
    }
    
    /* Mobile profile dropdown adjustments */
    .profile-dropdown {
        right: -20px;
        width: 280px;
    }
    
    .notification-dropdown {
        right: -20px;
        width: 320px;
    }
    
    /* Ensure mobile profile picture is visible on mobile */
    .mobile-only {
        display: flex !important;
    }
    
    .mobile-only .profile-picture-container {
        display: flex !important;
    }
    
    .mobile-only .profile-dropdown-container {
        display: block !important;
    }
    
    /* Override parent nav display for mobile elements */
    .desktop-nav .mobile-only {
        display: flex !important;
    }
    
    .desktop-nav .mobile-only .profile-picture-container {
        display: flex !important;
    }
    
    .desktop-nav .mobile-only .profile-dropdown-container {
        display: block !important;
    }

    .faq-list {
        width: 80%;
    }

    .footer-links {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header-logo {
        font-size: 28px;
    }
    
    .profile-dropdown {
        right: -10px;
        width: 260px;
    }
    
    .notification-dropdown {
        right: -40px;
        width: 300px;
    }
}