/* ========================================
   GLOBAL STYLES
   ======================================== */

/* Global Logo Styles */
.kh-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.kh-logo:hover {
    opacity: 0.8;
}

.kh-logo__img {
    height: 32px !important; /* Standardized height */
    width: auto !important;
    display: block;
    object-fit: contain;
    max-width: 120px !important; /* Added max-width */
}

.kh-logo__text {
    font-weight: 700;
    color: #2f2a24;
    font-size: 18px;
    letter-spacing: 0.2px;
}

/* Logo Variants - All use same size to match homepage */
.kh-logo--public .kh-logo__img {
    height: 32px !important;
    max-width: 120px !important;
}

.kh-logo--admin .kh-logo__img {
    height: 30px; /* Kept admin slightly smaller */
}

.kh-logo--sidebar .kh-logo__img {
    height: 28px; /* Kept sidebar smaller */
}

.kh-logo--auth .kh-logo__img {
    height: 32px !important;
    max-width: 120px !important;
}

/* Admin sidebar collapsed (icon only) */
body.sidebar-collapsed .kh-logo--sidebar .kh-logo__text {
    display: none;
}

/* Mobile */
@media (max-width: 520px) {
    .kh-logo__text {
        display: none;
    }
    
    .kh-logo__img {
        height: 30px !important; /* Mobile height */
        max-width: 100px !important;
    }
    
    .kh-logo--public .kh-logo__img,
    .kh-logo--auth .kh-logo__img {
        height: 30px !important;
        max-width: 100px !important;
    }
}

/* ========================================
   HOMEPAGE STYLES (.kh2-*)
   ======================================== */

.kh-landing {
    background: #faf8f3;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.kh-landing main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.kh-landing .kh2-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Fix top gap above nav (homepage only) */
.kh-landing .kh2-nav {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Navigation */
.kh2-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.kh2-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.kh2-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #2f3b46;
    font-weight: 800;
    letter-spacing: 0.2px;
    transition: opacity 0.2s ease;
}

.kh2-brand:hover {
    opacity: 0.8;
}

.kh2-brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #faf4ea;
    border: 1px solid rgba(0,0,0,0.06);
    font-size: 16px;
    line-height: 1;
}

.kh2-brand-text {
    font-size: 18px;
}

.kh2-nav-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.kh2-nav-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    transition: color 0.2s ease;
}

.kh2-nav-link:hover {
    color: #8b6f47;
}

/* Buttons for nav */
.kh2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}

/* Nav button - soft, secondary style */
.kh2-nav .kh2-btn-primary,
.kh2-nav-actions .kh2-btn-primary {
    background: #e8d4b8;
    color: #5a4a3a;
    box-shadow: none;
    font-weight: 600;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px;
    padding: 0 14px;
    vertical-align: middle;
}

/* Ensure all nav buttons have consistent line-height */
.kh2-nav .kh2-btn,
.kh2-nav-actions .kh2-btn {
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle;
}

.kh2-nav .kh2-btn-primary:hover {
    background: #ddd0bf;
    transform: none;
    box-shadow: none;
}

.kh2-btn-ghost {
    background: #fff;
    color: #2f3b46;
    border-color: rgba(0,0,0,0.10);
}

.kh2-btn-ghost:hover {
    background: #fbf7f1;
}

/* Hero Section */
.kh2-hero {
    padding: 80px 20px 60px;
    text-align: center;
    background: #faf8f3;
    padding-top: 100px;
}

.kh2-hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.kh2-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #2f2a24;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.kh2-subtitle {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.kh2-cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.kh2-hero-secondary {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #8a7a65;
    text-align: center;
}

.kh2-hero-secondary-link {
    color: #8b6f47;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.kh2-hero-secondary-link:hover {
    opacity: 0.85;
}

/* Hero alt link - enhanced visibility */
.kh-landing .kh2-hero-alt-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: #8b6f47;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.kh-landing .kh2-hero-alt-link:hover {
    color: #6b5537;
    opacity: 1;
}

.kh2-btn-primary {
    background: #cfa06a;
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.2s ease;
    display: inline-block;
    box-shadow: 0 10px 20px rgba(0,0,0,0.10);
}

.kh2-btn-primary:hover {
    background: #c4955a;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.kh2-btn-secondary {
    background: transparent;
    color: #2f2a24;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    transition: all 0.2s ease;
    display: inline-block;
}

.kh2-btn-secondary:hover {
    border-color: #cfa06a;
    color: #cfa06a;
}

.kh2-btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Trust Signals */
.kh2-trust {
    padding: 60px 20px;
    background: #fff;
}

.kh2-trust-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.kh2-trust-item {
    text-align: center;
    font-size: 1rem;
    color: #555;
    padding: 1rem;
}

/* Features */
.kh2-features {
    padding: 80px 20px;
    background: #faf8f3;
}

.kh2-section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2f2a24;
    text-align: center;
    margin-bottom: 3rem;
}

/* Base .kh2-features-grid style */
.kh2-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Feature grid - 4 cards properly aligned (higher specificity) */
.kh-landing .kh2-feature-grid {
    display: grid !important;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

@media (max-width: 1024px) {
    .kh-landing .kh2-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .kh-landing .kh2-feature-grid {
        grid-template-columns: 1fr !important;
    }
}

.kh2-feature-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kh2-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.10);
}

.kh2-feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.kh2-feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2f2a24;
    margin-bottom: 1rem;
}

.kh2-feature-card p {
    color: #666;
    line-height: 1.6;
}

/* How It Works */
.kh2-how-it-works {
    padding: 80px 20px;
    background: #fff;
}

.kh-landing .kh2-how-it-works .kh2-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Base .kh2-steps style */
.kh2-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

/* How it works - always 3 on desktop (higher specificity) */
.kh-landing .kh2-how-grid {
    display: grid !important;
    gap: 28px;
    grid-template-columns: repeat(3, 1fr) !important;
    align-items: start;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    padding: 0;
}

@media (max-width: 900px) {
    .kh-landing .kh2-how-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 640px) {
    .kh-landing .kh2-how-grid {
        grid-template-columns: 1fr !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

.kh2-step {
    text-align: center;
}

.kh2-step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #cfa06a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.kh2-step h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2f2a24;
    margin-bottom: 1rem;
}

.kh2-step p {
    color: #666;
    line-height: 1.6;
}

.kh2-steps-helper {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #8a7a65;
    padding-top: 1rem;
}

.kh2-steps-helper-link {
    color: #8b6f47;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.kh2-steps-helper-link:hover {
    opacity: 0.85;
}

/* Memory Preview - Single row horizontal scroll */
.kh2-preview {
    padding: 80px 20px;
    background: #faf8f3;
}

/* Moments: responsive grid layout - 4 cards in one row on large screens */
.kh-landing .kh2-moments-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
    padding: 0;
}

.kh-landing .kh2-moments-card {
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 22px rgba(0,0,0,0.06);
    position: relative;
    aspect-ratio: 4 / 3;
}

.kh-landing .kh2-moments-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kh-landing .kh2-moment-label {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(0,0,0,0.08);
    font-size: 13px;
    font-weight: 600;
    color: rgba(0,0,0,0.70);
    backdrop-filter: blur(6px);
    pointer-events: none;
}

/* Placeholder numbering badges */
.kh-landing [data-ph]::after {
    content: attr(data-ph);
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.08);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    color: rgba(0,0,0,0.55);
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 1024px) {
    .kh-landing .kh2-moments-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .kh-landing .kh2-moments-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Final CTA */
.kh2-final-cta {
    padding: 80px 20px;
    background: #fff;
    text-align: center;
}

.kh2-final-cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2f2a24;
    margin-bottom: 1rem;
}

.kh2-final-cta p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Homepage mobile */
@media (max-width: 768px) {
    .kh2-hero h1 {
        font-size: 2rem;
    }
    
    .kh2-subtitle {
        font-size: 1.1rem;
    }
    
    .kh2-section-title {
        font-size: 2rem;
    }
    
    .kh2-nav-inner {
        padding: 12px 14px;
    }
    
    .kh2-nav-actions {
        gap: 8px;
    }
    
    .kh2-nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.5rem;
    }
    
    .kh2-btn {
        height: 38px;
        padding: 0 12px;
        font-size: 0.85rem;
    }
    
    .kh2-brand-text {
        font-size: 16px;
    }
    
    .kh2-hero-secondary {
        font-size: 0.875rem;
        padding: 0 1rem;
    }
}

/* ========================================
   Send Memory Page (scoped)
   ======================================== */

/* Page background */
.kh2-send-memory {
    background: #faf8f3;
}

/* Header alignment - match homepage nav */
.kh2-send-memory header.kh2-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 0;
}

.kh2-send-memory header.kh2-nav .kh2-nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.kh2-send-memory header.kh2-nav .kh-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.kh2-send-memory header.kh2-nav .kh2-nav-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Footer - match brand colors */
.kh2-send-memory footer {
    background: #faf8f3;
    color: #999;
    font-size: 0.9rem;
    padding: 2rem 0;
    margin-top: 3rem;
}

.kh2-send-memory footer .container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.kh2-send-memory footer a {
    color: #8b6f47;
    text-decoration: none;
}

.kh2-send-memory footer a:hover {
    text-decoration: underline;
}

/* Main content container */
.kh2-send-memory main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

/* Form card polish */
.kh2-send-memory .container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

.kh2-send-memory .container > div {
    background: #fff;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Form inputs - rounded corners */
.kh2-send-memory input[type="text"],
.kh2-send-memory input[type="email"],
.kh2-send-memory textarea {
    border-radius: 10px;
}

/* Submit button polish */
.kh2-send-memory button[type="submit"] {
    border-radius: 12px;
    font-weight: 700;
}

/* Radio option spacing improvement */
.kh2-send-memory label[onclick*="updateMemoryType"] {
    transition: all 0.2s ease;
}

.kh2-send-memory label[onclick*="updateMemoryType"]:has(input:checked) {
    border-color: #cfa06a !important;
    background: #faf4ea;
}

/* Back link styling */
.kh2-send-memory .back-link a,
.kh2-send-memory a[href="/"] {
    color: #8b6f47;
    font-weight: 600;
    text-decoration: none;
}

.kh2-send-memory .back-link a:hover,
.kh2-send-memory a[href="/"]:hover {
    text-decoration: underline;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .kh2-send-memory header.kh2-nav .kh2-nav-inner {
        padding: 12px 14px;
    }
    
    .kh2-send-memory header.kh2-nav .kh2-nav-actions {
        gap: 8px;
    }
    
    .kh2-send-memory .kh2-btn {
        height: 38px;
        padding: 0 12px;
        font-size: 0.85rem;
    }
    
    .kh2-send-memory .container > div {
        padding: 1.5rem;
    }
}

/* ========================================
   App Pages - Ensure they don't inherit public styles
   ======================================== */

/* App pages should NOT have public page background */
body.kh-app {
    background: #fff !important;
}

/* App pages container - ensure proper styling and override any public styles */
body.kh-app .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* Ensure app pages main content area is properly styled */
body.kh-app main {
    padding: 2rem 0 !important;
    background: #fff !important;
    min-height: calc(100vh - 200px);
}

/* Ensure app pages header is NOT using public nav styles */
body.kh-app header {
    background: #fff !important;
    border-bottom: 1px solid #e0e0e0 !important;
    position: relative !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

body.kh-app header .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 1rem 20px !important;
}

body.kh-app header nav {
    display: flex !important;
    gap: 1rem !important;
    align-items: center !important;
}

/* Ensure app pages footer is NOT using public footer styles */
body.kh-app footer {
    background: #fff !important;
    border-top: 1px solid #e0e0e0 !important;
    padding: 2rem 0 !important;
    margin-top: 3rem !important;
    text-align: center !important;
}

body.kh-app footer .container {
    max-width: 1200px !important;
}

body.kh-app footer a {
    color: #3498db !important;
    text-decoration: none !important;
}

body.kh-app footer a:hover {
    text-decoration: underline !important;
}

/* App page buttons - ensure proper styling */
body.kh-app .btn,
body.kh-app button[type="submit"],
body.kh-app button.btn,
body.kh-app a.btn {
    display: inline-block !important;
    padding: 0.75rem 1.5rem !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    line-height: 1.5 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

body.kh-app .btn:hover,
body.kh-app button[type="submit"]:hover,
body.kh-app button.btn:hover,
body.kh-app a.btn:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15) !important;
}

/* Primary button style (brown/gold) - match inline style colors */
body.kh-app .btn,
body.kh-app button[type="submit"].btn {
    background: #d4a574 !important;
    color: #fff !important;
}

body.kh-app .btn:hover,
body.kh-app button[type="submit"].btn:hover {
    background: #c49564 !important;
}

/* Secondary button style (gray) */
body.kh-app .btn[style*="#666"],
body.kh-app a.btn[style*="#666"],
body.kh-app .btn-secondary {
    background: #666 !important;
    color: #fff !important;
}

body.kh-app .btn[style*="#666"]:hover,
body.kh-app a.btn[style*="#666"]:hover,
body.kh-app .btn-secondary:hover {
    background: #555 !important;
}

/* Danger button style (red) */
body.kh-app .btn[style*="#dc3545"],
body.kh-app a.btn[style*="#dc3545"],
body.kh-app .btn-danger {
    background: #dc3545 !important;
    color: #fff !important;
}

body.kh-app .btn[style*="#dc3545"]:hover,
body.kh-app a.btn[style*="#dc3545"]:hover,
body.kh-app .btn-danger:hover {
    background: #c82333 !important;
}

/* ========================================
   Public Pages (General Styling)
   ======================================== */

/* Page background - ONLY for public pages */
.kh2-public {
    background: #faf8f3;
    color: #2c2c2c;
}

/* Header - match homepage nav for all public pages */
.kh2-public header.kh2-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 0;
}

.kh2-public header.kh2-nav .kh2-nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.kh2-public header.kh2-nav .kh-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.kh2-public header.kh2-nav .kh2-nav-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Fix button vertical alignment */
.kh2-public .kh2-btn,
.kh2-public a.kh2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    height: auto;
    vertical-align: middle;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.kh2-public .kh2-btn-ghost {
    background: #fff;
    color: #2f3b46;
    border-color: rgba(0,0,0,0.10);
}

.kh2-public .kh2-btn-ghost:hover {
    background: #fbf7f1;
}

.kh2-public .kh2-btn-primary {
    background: #e8d4b8;
    color: #5a4a3a;
    box-shadow: none;
    font-weight: 600;
}

.kh2-public .kh2-btn-primary:hover {
    background: #ddd0bf;
    transform: none;
    box-shadow: none;
}

.kh2-public .kh2-nav-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    transition: color 0.2s ease;
}

.kh2-public .kh2-nav-link:hover {
    color: #8b6f47;
}

/* Footer - match brand colors */
.kh2-public footer.kh2-public-footer,
.kh2-public footer {
    background: #faf8f3;
    color: #999;
    font-size: 0.9rem;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

.kh2-public footer .kh2-footer-inner,
.kh2-public footer .container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.kh2-public footer a {
    color: #8b6f47;
    text-decoration: none;
}

.kh2-public footer a:hover {
    text-decoration: underline;
}

/* Main content container */
.kh2-public main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

/* ========================================
   Login & Signup Pages
   ======================================== */

.kh2-public .kh2-auth-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.kh2-public .kh2-auth-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    padding: 2.5rem;
    margin: 2rem 0;
}

.kh2-public .kh2-auth-card h1 {
    font-size: 2rem;
    color: #2f2a24;
    margin-bottom: 1.5rem;
    text-align: center;
}

.kh2-public .kh2-auth-card input[type="text"],
.kh2-public .kh2-auth-card input[type="email"],
.kh2-public .kh2-auth-card input[type="password"],
.kh2-public .kh2-auth-card textarea,
.kh2-public .kh2-auth-card select {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.kh2-public .kh2-auth-card input:focus,
.kh2-public .kh2-auth-card textarea:focus {
    outline: none;
    border-color: #d4a574;
}

.kh2-public .kh2-auth-card label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.kh2-public .kh2-auth-card .kh2-primary-btn {
    width: 100%;
    background: #d4a574;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    padding: 12px 16px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 1rem;
}

.kh2-public .kh2-auth-card .kh2-primary-btn:hover {
    background: #c49564;
}

.kh2-public .kh2-auth-card a {
    color: #8b6f47;
    text-decoration: none;
}

.kh2-public .kh2-auth-card a:hover {
    text-decoration: underline;
}

/* ========================================
   Legal Pages (Privacy, Terms)
   ======================================== */

.kh2-public .kh2-legal-container {
    max-width: 840px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

.kh2-public .kh2-legal-container h1 {
    margin-top: 0;
    font-size: 2.5rem;
    color: #2f2a24;
    margin-bottom: 1.5rem;
}

.kh2-public .kh2-legal-container h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
    color: #2f2a24;
}

.kh2-public .kh2-legal-container h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color: #2f2a24;
}

.kh2-public .kh2-legal-container p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #555;
}

.kh2-public .kh2-legal-container ul,
.kh2-public .kh2-legal-container ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    line-height: 1.7;
    color: #555;
}

.kh2-public .kh2-legal-container li {
    margin-bottom: 0.5rem;
}

.kh2-public .kh2-legal-container a {
    color: #8b6f47;
    text-decoration: none;
}

.kh2-public .kh2-legal-container a:hover {
    text-decoration: underline;
}

/* ========================================
   Contact Page
   ======================================== */

.kh2-public .kh2-contact-container {
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

.kh2-public .kh2-contact-container h1 {
    margin-top: 0;
    font-size: 2.5rem;
    color: #2f2a24;
    margin-bottom: 1rem;
}

.kh2-public .kh2-contact-container p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #555;
}

.kh2-public .kh2-contact-email {
    background: #faf8f3;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: center;
}

.kh2-public .kh2-contact-email a {
    font-size: 1.25rem;
    color: #8b6f47;
    text-decoration: none;
    font-weight: 600;
}

.kh2-public .kh2-contact-email a:hover {
    text-decoration: underline;
}

/* Mobile adjustments for public pages */
@media (max-width: 768px) {
    .kh2-public header.kh2-nav .kh2-nav-inner {
        padding: 12px 14px;
    }
    
    .kh2-public header.kh2-nav .kh2-nav-actions {
        gap: 8px;
    }
    
    .kh2-public .kh2-btn {
        height: 38px;
        padding: 0 12px;
        font-size: 0.85rem;
    }
    
    .kh2-public .kh2-nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.5rem;
    }
    
    .kh2-public .kh2-auth-card {
        padding: 1.5rem;
    }
    
    .kh2-public .kh2-legal-container,
    .kh2-public .kh2-contact-container {
        padding: 1.5rem;
    }
    
    .kh2-public .kh2-legal-container h1 {
        font-size: 2rem;
    }
    
    .kh2-public .kh2-legal-container h2 {
        font-size: 1.5rem;
    }
}
