/* styles.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    line-height: 1.5;
    background: radial-gradient(circle at top left, #020617 0, #020617 38%, #020617 60%, #020617 100%);
    color: #e5e7eb;
}

/* Theme variants */
body.dark-mode {
    background: radial-gradient(circle at top left, #020617 0, #020617 38%, #020617 60%, #020617 100%);
    color: #e5e7eb;
}

body.light-mode {
    background: #f9fafb;
    color: #111827;
}

/* General layout */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.site-main {
    padding-top: 0rem;
    padding-bottom: 3.5rem;
}

/* Header / nav */
.site-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    backdrop-filter: blur(18px);
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.92),
        rgba(15, 23, 42, 0.86),
        rgba(15, 23, 42, 0.75)
    );
}

body.light-mode .site-header {
    background: rgba(249, 250, 251, 0.94);
    border-bottom-color: rgba(209, 213, 219, 0.8);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.logo-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.site-title {
    font-weight: 700;
    letter-spacing: 0.02em;
    font-size: 1.1rem;
}

.site-tagline {
    font-size: 0.8rem;
    color: #9ca3af;
}

body.light-mode .site-tagline {
    color: #6b7280;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.9rem;
}

.main-nav a {
    color: inherit;
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
}

.main-nav a:hover {
    background: rgba(30, 64, 175, 0.85);
}

body.light-mode .main-nav a:hover {
    background: #e5e7eb;
}

.nav-user {
    font-size: 0.85rem;
    color: #9ca3af;
}

.theme-toggle {
    border: 1px solid #4b5563;
    background: transparent;
    color: #e5e7eb;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.theme-toggle:hover {
    background: rgba(51, 65, 85, 0.8);
}

body.light-mode .theme-toggle {
    border-color: #9ca3af;
    color: #4b5563;
}

/* Hero / home page */
.hero {
    margin-top: 2.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 2rem;
    background: radial-gradient(circle at top left, #020617 0, #020617 38%, #020617 60%, #020617 100%);
    border-radius: 1.75rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 1.9rem 2.3rem 2.1rem 2.3rem;
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.9);
    position: relative;
    overflow: hidden;
}

body.light-mode .hero {
    background: linear-gradient(135deg, #f9fafb, #eef2ff);
    border-color: rgba(148, 163, 184, 0.4);
    box-shadow: 0 18px 50px rgba(148, 163, 184, 0.45);
}

.hero::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 64%),
        radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.18), transparent 60%);
    opacity: 0.9;
    pointer-events: none;
}

body.light-mode .hero::before {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 64%),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.12), transparent 60%);
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.hero-title {
    font-size: 2.1rem;
    font-weight: 750;
    line-height: 1.25;
}

.hero-subtitle {
    font-size: 0.98rem;
    color: #cbd5f5;
    max-width: 32rem;
}

body.light-mode .hero-subtitle {
    color: #4b5563;
}

.hero-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-pill {
    font-size: 0.84rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.65);
    background: rgba(15, 23, 42, 0.75);
}

body.light-mode .hero-pill {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(156, 163, 175, 0.75);
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 0.4rem;
}

.hero-card {
    border-radius: 1rem;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.35));
    padding: 0.9rem 0.95rem 1rem;
    font-size: 0.82rem;
}

body.light-mode .hero-card {
    background: linear-gradient(145deg, #ffffff, rgba(239, 246, 255, 0.9));
    border-color: rgba(148, 163, 184, 0.8);
}

.hero-card-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.hero-card-main {
    font-size: 0.98rem;
    font-weight: 600;
}

.hero-card-sub {
    font-size: 0.72rem;
    margin-top: 0.25rem;
    color: #9ca3af;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.2rem;
}

.hero-button-primary {
    background: #2563eb;
    color: #e5e7eb;
    border-radius: 999px;
    padding: 0.72rem 1.3rem;
    border: none;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.45);
}

.hero-button-primary:hover {
    background: #1d4ed8;
}

.hero-button-secondary {
    border-radius: 999px;
    padding: 0.65rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.9);
    text-decoration: none;
    font-size: 0.86rem;
    color: #bfdbfe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.hero-button-secondary:hover {
    background: rgba(15, 23, 42, 0.85);
}

body.light-mode .hero-button-secondary {
    color: #1f2937;
    border-color: rgba(148, 163, 184, 0.9);
    background: rgba(255, 255, 255, 0.75);
}

body.light-mode .hero-button-secondary:hover {
    background: rgba(229, 231, 235, 0.95);
}

/* Hero right column */
.hero-right {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding-left: 0.4rem;
}

.hero-card-outline {
    border-radius: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    padding: 0.85rem 0.95rem;
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
    font-size: 0.82rem;
}

body.light-mode .hero-card-outline {
    background: rgba(249, 250, 251, 0.9);
    border-color: rgba(156, 163, 175, 0.8);
}

.hero-card-outline-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.hero-card-outline-body {
    font-size: 0.86rem;
}

.contact-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.55rem;
}

.contact-strip-text {
    font-size: 0.8rem;
    color: #9ca3af;
}

.contact-strip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

/* Layout sections after hero */
.section {
    margin-top: 2.4rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 0.92rem;
    color: #9ca3af;
    max-width: 35rem;
    margin-bottom: 1.4rem;
}

/* How we buy / sell */
.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.2rem;
}

.section-card {
    background: rgba(15, 23, 42, 0.85);
    border-radius: 1.5rem;
    padding: 1.5rem 1.75rem 1.6rem;
    border: 1px solid rgba(55, 65, 81, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
}

body.light-mode .section-card {
    background: #ffffff;
    border-color: rgba(209, 213, 219, 0.9);
    box-shadow: 0 18px 40px rgba(148, 163, 184, 0.25);
}

.section-card h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.section-card ul {
    list-style: disc;
    padding-left: 1.3rem;
    font-size: 0.9rem;
    color: #e5e7eb;
}

body.light-mode .section-card ul {
    color: #111827;
}

.section-card li + li {
    margin-top: 0.35rem;
}

/* Inventory strip */
.inventory-strip {
    margin-top: 2.4rem;
    border-radius: 1.5rem;
    border: 1px dashed rgba(148, 163, 184, 0.8);
    padding: 1.3rem 1.6rem;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.inventory-strip-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Contact / broadcasts shared layout */
.section-header {
    margin-bottom: 1rem;
}

.section-header h1,
.section-header .section-title {
    font-size: 1.6rem;
}

.section-header p {
    font-size: 0.94rem;
    color: #9ca3af;
}

/* Forms */
.standard-form {
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-row label {
    font-size: 0.85rem;
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    background: rgba(15, 23, 42, 0.98);
    border-radius: 0.5rem;
    border: 1px solid rgba(55, 65, 81, 0.95);
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    color: #e5e7eb;
}

body.light-mode input[type="text"],
body.light-mode input[type="email"],
body.light-mode input[type="password"],
body.light-mode textarea {
    background: #ffffff;
    border-color: rgba(209, 213, 219, 0.95);
    color: #111827;
}

textarea {
    min-height: 160px;
    resize: vertical;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.7);
}

/* Buttons */
.button-primary,
button[type="submit"],
.hero-button-primary {
    border-radius: 999px;
    border: none;
    background: #2563eb;
    color: #e5e7eb;
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.button-primary:hover,
button[type="submit"]:hover {
    background: #1d4ed8;
}

.button-secondary {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.9);
    background: transparent;
    color: inherit;
    padding: 0.55rem 1.3rem;
    font-size: 0.86rem;
    cursor: pointer;
}

/* Messages */
.error-message {
    color: #f87171;
    font-size: 0.86rem;
}

.success-message {
    color: #4ade80;
    font-size: 0.86rem;
}

/* Posts / broadcasts list */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.post {
    border-radius: 1.25rem;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: rgba(15, 23, 42, 0.96);
    padding: 1.3rem 1.4rem 1.35rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.85);
}

body.light-mode .post {
    background: #ffffff;
    border-color: rgba(209, 213, 219, 0.95);
    box-shadow: 0 14px 32px rgba(148, 163, 184, 0.3);
}

.post-title {
    font-size: 1.1rem;
    font-weight: 650;
    margin-bottom: 0.25rem;
}

.post-meta {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 0.6rem;
}

.post-meta a {
    color: #93c5fd;
    text-decoration: none;
}

.post-meta a:hover {
    text-decoration: underline;
}

.post-body {
    font-size: 0.9rem;
    white-space: pre-wrap;
}

/* Footer */
.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1.1rem 0 1.4rem;
    font-size: 0.78rem;
    color: #9ca3af;
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
        gap: 1.4rem;
        padding: 1.7rem 1.45rem 1.8rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .main-nav {
        align-self: stretch;
        justify-content: space-between;
    }

    .hero {
        margin-top: 1.8rem;
        grid-template-columns: minmax(0, 1fr);
        padding: 1.5rem 1.2rem 1.7rem;
    }

    .hero-right {
        padding-left: 0;
    }

    .two-column {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.7rem;
    }

    .inventory-strip {
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .site-main {
        padding-top: 0rem;
        padding-bottom: 3.5rem;
    }

    .hero {
        padding: 1.25rem 1.1rem;
    }

    .hero.hero-split {
        grid-template-columns: minmax(0, 1fr);
    }

    .contact-strip {
        align-items: flex-start;
    }
}

/* Attachments for broadcasts */
.post-attachments {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.post-attachment {
    max-width: 200px;
}

.post-attachment-image {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    display: block;
}

.post-attachment-video {
    width: 240px;
    max-width: 100%;
    border-radius: 0.5rem;
    display: block;
}

.post-attachment-file {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    font-size: 0.85rem;
    text-decoration: none;
    color: inherit;
}

.post-attachment-file:hover {
    background: rgba(15, 23, 42, 0.9);
}

.post-attachment-icon {
    font-size: 1rem;
}

.post-attachment-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Custom file upload button for contact/broadcast forms */
.file-upload-wrapper {
    position: relative;
    width: 100%;
}

.file-upload-input {
    opacity: 0;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(55, 65, 81, 1);
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    color: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease;
}

.file-upload-label:hover {
    background: rgba(31, 41, 55, 1);
    border-color: rgba(75, 85, 99, 1);
}

.file-upload-filename {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Dark mode: force link + visited link to be lighter blue */
.dark-mode a,
.dark-mode a:visited {
    color: #8ab4ff;   /* lighter blue for dark backgrounds */
}
/* User menu avatar + dropdown */
.nav-user-menu {
    position: relative;
    display: inline-block;
    margin-left: 1rem;
}

.nav-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #4b5563;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.nav-avatar {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    background: #4b5563;
    color: #e5e7eb;
}

body.light-mode .nav-avatar {
    background: #e5e7eb;
    color: #111827;
}

.nav-user-dropdown {
    position: absolute;
    right: 0;
    margin-top: 0.5rem;
    min-width: 180px;
    padding: 0.5rem 0;
    border-radius: 0.75rem;
    border: 1px solid #4b5563;
    background: #111827;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    display: none;
    z-index: 40;
}

body.light-mode .nav-user-dropdown {
    background: #ffffff;
    border-color: #e5e7eb;
}

.nav-user-dropdown a {
    display: block;
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
    text-decoration: none;
    color: #e5e7eb;
    white-space: nowrap;
}

body.light-mode .nav-user-dropdown a {
    color: #111827;
}

.nav-user-dropdown a:hover {
    background: #1f2937;
}

body.light-mode .nav-user-dropdown a:hover {
    background: #f3f4f6;
}

/* Simple hover-based dropdown */
.nav-user-menu:hover .nav-user-dropdown {
    display: block;
}
/* styles.css ... existing content above */

/* Breadcrumbs under header navigation */
.breadcrumbs {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

body.light-mode .breadcrumbs {
    color: #6b7280;
}

.breadcrumbs a {
    text-decoration: none;
    color: inherit;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.crumb-separator {
    margin: 0 0.35rem;
}

.crumb-current {
    font-weight: 500;
}

/* Subtle footer sitemap */
.footer-sitemap {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

body.light-mode .footer-sitemap {
    color: #6b7280;
}

.footer-sitemap a {
    text-decoration: none;
    color: inherit;
}

.footer-sitemap a:hover {
    text-decoration: underline;
}

.footer-separator {
    margin: 0 0.3rem;
}
