/* ================================
   BG Loans — Text Page Styles
   ================================ */

/* Page Header */
.page-header {
    position: relative;
    padding: 160px 0 80px;
    background: var(--color-bg);
    overflow: hidden;
}

.page-header-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(130, 127, 226, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(137, 254, 254, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.page-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

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

.breadcrumb-separator {
    color: var(--color-text-subtle);
}

.breadcrumb-current {
    color: var(--color-white);
}

/* Page Title */
.page-title {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: var(--font-weight-black);
    color: var(--color-white);
    margin-bottom: 16px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-meta {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* Main Content Layout */
.text-content {
    padding: 80px 0 120px;
    background: var(--color-bg);
}

.text-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 60px;
    align-items: start;
}

/* Single column layout (no TOC) */
.text-container-single {
    grid-template-columns: 1fr;
    max-width: 800px;
}

.article-full {
    max-width: 100%;
}

/* Article intro */
.article-intro {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--color-border);
}

.article-intro p {
    font-size: 18px;
    line-height: 1.3;
    color: var(--color-text-muted);
}

/* Table of Contents */
.toc {
    position: sticky;
    top: 100px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 24px;
}

.toc-title {
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-nav a {
    font-size: 14px;
    color: var(--color-text-muted);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    border-left: 2px solid transparent;
}

.toc-nav a:hover {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.03);
}

.toc-nav a.active {
    color: var(--color-accent);
    background: var(--gradient-accent-glow);
    border-left-color: var(--color-accent);
}

/* Article Styles */
.article {
    max-width: 760px;
}

.article-section {
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--color-border);
}

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

/* Typography */
.article h2 {
    font-size: 28px;
    font-weight: var(--font-weight-bold);
    color: var(--color-white);
    margin-bottom: 20px;
    scroll-margin-top: 100px;
}

.article h3 {
    font-size: 20px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-white);
    margin-top: 32px;
    margin-bottom: 16px;
}

.article p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.article p:last-child {
    margin-bottom: 0;
}

/* Lists */
.article ul,
.article ol {
    margin: 20px 0;
    padding-left: 0;
    list-style: none;
}

.article ul li,
.article ol li {
    position: relative;
    font-size: 16px;
    line-height: 1.3;
    color: var(--color-text-muted);
    padding: 10px 0 10px 32px;
    border-bottom: 1px solid var(--color-border);
}

.article ul li:last-child,
.article ol li:last-child {
    border-bottom: none;
}

.article ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18px;
    width: 8px;
    height: 8px;
    background: var(--gradient-accent);
    border-radius: 50%;
}

.article ol {
    counter-reset: list-counter;
}

.article ol li {
    counter-increment: list-counter;
}

.article ol li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 10px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent-glow);
    color: var(--color-accent);
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-sm);
}

/* Nested lists */
.article .nested-list {
    margin: 12px 0 8px 20px;
    padding-left: 0;
}

.article .nested-list li {
    padding: 6px 0 6px 24px;
    border-bottom: none;
    font-size: 15px;
}

.article .nested-list li::before {
    width: 6px;
    height: 6px;
    top: 14px;
}

.nested-note {
    font-size: 14px;
    color: var(--color-text-muted);
    font-style: italic;
    margin-top: 8px;
    padding-left: 20px;
    border-left: 2px solid var(--color-border);
}

/* Bold text in lists */
.article li strong {
    color: var(--color-white);
}

/* Blockquote */
.article blockquote {
    margin: 28px 0;
    padding: 24px 28px;
    background: var(--color-bg-elevated);
    border-left: 4px solid transparent;
    border-image: var(--gradient-accent) 1;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.article blockquote p {
    font-size: 17px;
    font-style: italic;
    color: var(--color-white);
    margin: 0;
}

/* Info Box */
.info-box {
    display: flex;
    gap: 16px;
    margin: 28px 0;
    padding: 20px 24px;
    background: var(--gradient-accent-glow);
    border: 1px solid rgba(137, 254, 254, 0.2);
    border-radius: var(--radius-lg);
}

.info-box-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    color: var(--color-bg);
    font-size: 18px;
    border-radius: var(--radius-md);
}

.info-box-content strong {
    display: block;
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-white);
    margin-bottom: 6px;
}

.info-box-content p {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0;
}

/* Contact Section */
.contact-section {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-top: 48px;
}

.contact-section h2 {
    font-size: 22px;
    margin-bottom: 12px;
}

.contact-section > p {
    margin-bottom: 20px;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
    padding-bottom: 32px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    color: var(--color-white);
    padding: 12px 20px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.contact-link:hover {
    border-color: var(--color-accent);
    background: var(--gradient-accent-glow);
}

.contact-icon {
    font-size: 18px;
}

/* Links in Content */
.article a:not(.contact-link) {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

.article a:not(.contact-link):hover {
    color: var(--color-accent-hover);
}

/* Responsive */
@media (max-width: 1024px) {
    .text-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .toc {
        position: relative;
        top: 0;
    }
    
    .toc-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .toc-nav a {
        padding: 8px 14px;
        border-left: none;
        border-radius: var(--radius-full);
        background: var(--color-bg);
        border: 1px solid var(--color-border);
    }
    
    .toc-nav a.active {
        background: var(--gradient-accent);
        color: var(--color-bg);
        border-color: transparent;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 140px 0 60px;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .text-content {
        padding: 60px 0 80px;
    }
    
    .article h2 {
        font-size: 24px;
    }
    
    .article h3 {
        font-size: 18px;
    }
    
    .toc-nav {
        gap: 6px;
    }
    
    .toc-nav a {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .contact-section {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .text-container {
        padding: 0 16px;
    }
    
    .toc {
        padding: 16px;
    }
    
    .article-section {
        margin-bottom: 36px;
        padding-bottom: 36px;
    }
    
    .article blockquote {
        padding: 20px;
    }
    
    .info-box {
        flex-direction: column;
        gap: 12px;
    }
}

/* ================================
   Contact Page Styles
   ================================ */

.contact-page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Contact Cards Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.contact-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
    transition: all var(--transition-normal);
}

.contact-card:hover {
    border-color: rgba(137, 254, 254, 0.3);
    transform: translateY(-4px);
}

.contact-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent-glow);
    border-radius: var(--radius-md);
    color: var(--color-accent);
    margin: 0 auto 20px;
}

.contact-card h3 {
    font-size: 18px;
    font-weight: var(--font-weight-bold);
    color: var(--color-white);
    margin-bottom: 8px;
}

.contact-card p {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.contact-card-link {
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--color-accent);
    transition: color var(--transition-fast);
}

.contact-card-link:hover {
    color: var(--color-accent-hover);
}

.contact-card-value {
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    color: var(--color-white);
}

/* Contact Form Section */
.contact-form-section {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 48px;
    margin-bottom: 40px;
}

.contact-form-header {
    text-align: center;
    margin-bottom: 40px;
}

.contact-form-header h2 {
    font-size: 28px;
    font-weight: var(--font-weight-bold);
    color: var(--color-white);
    margin-bottom: 8px;
}

.contact-form-header p {
    font-size: 16px;
    color: var(--color-text-muted);
}

/* Form Elements */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--color-white);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: inherit;
    font-size: 16px;
    color: var(--color-white);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-subtle);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(137, 254, 254, 0.1);
}

/* Invalid field state */
.form-group input.invalid,
.form-group textarea.invalid {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Field error message */
.field-error {
    display: block;
    font-size: 12px;
    color: #ff6b6b;
    margin-top: 6px;
    min-height: 16px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23999999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.form-group select option {
    background: var(--color-bg);
    color: var(--color-white);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 8px;
}

.form-note {
    font-size: 13px;
    color: var(--color-text-muted);
}

.form-note a {
    color: var(--color-accent);
}

.form-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-bg);
    background: var(--gradient-accent);
    padding: 14px 28px;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(137, 254, 254, 0.3);
}

.form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.form-submit.success {
    background: var(--color-accent);
}

.form-submit svg {
    transition: transform var(--transition-fast);
}

.form-submit:hover svg {
    transform: translateX(4px);
}

/* Character counter */
.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--color-text-subtle);
    margin-top: 6px;
}

/* Form messages */
.form-message {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(137, 254, 254, 0.15);
    border: 1px solid rgba(137, 254, 254, 0.3);
    color: var(--color-accent);
}

.form-message.error {
    display: block;
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: #ff6b6b;
}

/* Contact Note */
.contact-note {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: var(--gradient-accent-glow);
    border: 1px solid rgba(137, 254, 254, 0.2);
    border-radius: var(--radius-lg);
}

.contact-note-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    color: var(--color-bg);
    font-size: 18px;
    border-radius: var(--radius-md);
}

.contact-note-content strong {
    display: block;
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-white);
    margin-bottom: 4px;
}

.contact-note-content p {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* Contact Page Responsive */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form-section {
        padding: 32px 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .form-submit {
        width: 100%;
        justify-content: center;
    }
    
    .contact-note {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .contact-page-container {
        padding: 0 16px;
    }
    
    .contact-card {
        padding: 24px;
    }
    
    .contact-form-header h2 {
        font-size: 24px;
    }
}