/* 
 * TheTrueStone.com - Premium Design System
 * A high-end, faith-based marketplace aesthetic
 * Theme: "Divine Elegance & Solid Foundation"
 */

:root {
    /* Color Palette - Sophisticated HSL */
    --primary-h: 255;
    --primary-s: 60%;
    --primary-l: 55%;
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-dark: hsl(var(--primary-h), var(--primary-s), 45%);
    --primary-light: hsl(var(--primary-h), var(--primary-s), 75%);
    --primary-soft: hsl(var(--primary-h), var(--primary-s), 96%);

    --accent-h: 45;
    --accent-s: 85%;
    --accent-l: 55%;
    --accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
    --accent-dark: hsl(var(--accent-h), var(--accent-s), 45%);

    --slate-900: hsl(220, 30%, 10%);
    --slate-800: hsl(220, 25%, 15%);
    --slate-700: hsl(220, 20%, 25%);
    --slate-600: hsl(220, 15%, 35%);
    --slate-500: hsl(220, 12%, 45%);
    --slate-400: hsl(220, 10%, 55%);
    --slate-50: hsl(220, 20%, 98%);
    --slate-100: hsl(220, 15%, 95%);

    --white: #FFFFFF;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-dark: rgba(15, 23, 42, 0.8);

    /* Layout Variables */
    --container-max: 1280px;
    --header-height: 80px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* Shadows - Premium Elevation */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 35px 60px -15px rgba(0, 0, 0, 0.2);
    --shadow-2xl: 0 50px 80px -20px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

/* --- Base & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #ffffff;
    color: var(--slate-900);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.brand-font {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
}

/* --- Global Utilities --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-soft {
    background-color: var(--primary-soft);
}

.glassmorphism {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- Header & Navigation --- (always solid on every page) */
.main-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.4s ease;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    box-shadow: var(--shadow-sm);
}

.main-header.scrolled {
    box-shadow: var(--shadow-md);
}

.main-header .main-nav a {
    color: #111;
}

.main-header .btn-outline {
    border-color: var(--primary);
    color: var(--primary);
}

.main-header .btn-text {
    color: #111;
}

.container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
}

.brand-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    color: #111;
}

/* Nav + actions grouped to the right; links next to each other, buttons at far right */
.header-right {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: auto;
}

.beta-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    line-height: 1.2;
}

.main-logo {
    height: 44px;
    width: 44px;
    object-fit: contain;
    border-radius: 0;
    transition: transform 0.3s ease;
    display: block;
}

/* .logo-text removed - using beta-tag in header */

.main-nav {
    margin-right: 24px;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.8;
}

.main-nav a:hover,
.main-nav a.active {
    opacity: 1;
    color: var(--primary);
}

.main-nav a.btn-primary,
.main-nav a.btn-primary:hover {
    color: #ffffff;
    opacity: 1;
}

/* Nav is always solid white with dark text; no over-hero override needed */

/* --- Buttons --- */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
}

.btn-primary,
a.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    box-shadow: 0 4px 14px 0 hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.39);
}

.btn-primary:hover,
a.btn-primary:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(109, 40, 217, 0.23);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-soft);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

/* --- Hero Section --- */
.hero-premium {
    min-height: 100vh;
    padding-top: var(--header-height);
    display: flex;
    align-items: center;
    position: relative;
    background: var(--slate-900);
}

.hero-bg-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-light .hero-bg-media img {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--slate-900) 90%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    color: white;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Search Unified */
.hero-search-box {
    display: flex;
    background: white;
    padding: 8px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 800px;
    margin: 0 auto;
    gap: 8px;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding-left: 20px;
    border-right: 1px solid var(--slate-100);
}

.search-input-wrapper:last-child {
    border-right: none;
}

.search-input-wrapper i {
    color: var(--slate-600);
    margin-right: 12px;
}

.search-input-wrapper input {
    border: none;
    outline: none;
    padding: 16px 0;
    width: 100%;
    font-size: 1rem;
    font-weight: 500;
}

/* --- Stats & Proof --- */
.stats-banner {
    position: relative;
    z-index: 20;
    margin-top: -60px;
}

.stats-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item .number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    margin-bottom: 0.2rem;
}

.stat-item .label {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--slate-600);
    letter-spacing: 1px;
}

/* --- Features Section --- */
.section-padding {
    padding: 120px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 80px;
}

.section-title h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-100);
    transition: all 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: var(--primary);
    color: white;
}

/* --- Pricing --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: white;
    padding: 4rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--slate-100);
    position: relative;
    transition: all 0.4s ease;
}

.pricing-card.premium {
    background: var(--slate-900);
    color: white;
    box-shadow: var(--shadow-xl);
}

.pricing-card.premium h3,
.pricing-card.premium .price {
    color: white;
}

.pricing-card .price {
    font-size: 4rem;
    font-weight: 800;
    margin: 2rem 0;
}

.pricing-card .price span {
    font-size: 1rem;
    opacity: 0.6;
}

.pricing-features {
    list-style: none;
    margin: 3rem 0;
}

.pricing-features li {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pricing-features li i {
    color: var(--accent);
}

/* --- Listing Detail (listing.php) Overrides --- */
.listing-hero {
    height: 550px;
    position: relative;
    background: var(--slate-900);
    color: white;
}

.listing-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.listing-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
}

.listing-profile-header {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 0;
    z-index: 10;
}

.profile-flex {
    display: flex;
    align-items: flex-end;
    gap: 40px;
}

.profile-logo-wrap {
    width: 220px;
    height: 220px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-logo-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.profile-details h1 {
    font-size: 4rem;
    margin-bottom: 10px;
}

.badge-verified {
    background: var(--accent);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Info Grid */
.listing-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 80px;
    margin-top: 80px;
}

.card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-100);
    padding: 3rem;
    margin-bottom: 3rem;
}

.sidebar-sticky {
    position: sticky;
    top: 120px;
}

.contact-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

/* Animations --- */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .listing-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .profile-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-logo-wrap {
        margin-bottom: -110px;
        z-index: 20;
        position: relative;
    }

    .listing-hero {
        height: 450px;
    }

    .listing-profile-header {
        position: static;
        background: var(--slate-900);
        padding-top: 140px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: block;
    }

    .hero-search-box {
        flex-direction: column;
        border-radius: var(--radius-lg);
        padding: 1rem;
    }

    .search-input-wrapper {
        border-right: none;
        border-bottom: 1px solid var(--slate-100);
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .section-title h2 {
        font-size: 2.2rem;
    }

    .container-header {
        flex-wrap: wrap;
    }

    .logo-area {
        flex-shrink: 0;
    }

    .brand-name {
        font-size: 1rem;
    }

    .main-logo {
        height: 38px;
        width: 38px;
    }

    .beta-tag {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    .header-actions .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}