/**
 * CUROfit Common Styles
 * Based on account-deletion page design
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --primary: #3BA5B5;
    --primary-light: #E8F7F9;
    --primary-dark: #2D8A99;
    --accent: #5BBEC5;
    --text: #1A1A2E;
    --text-secondary: #5A5A72;
    --bg: #FAFBFC;
    --card: #FFFFFF;
    --border: #E2E5EA;
    --border-focus: #3BA5B5;
    --error: #D32F2F;
    --success: #2E7D32;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.08), 0 12px 40px rgba(0,0,0,0.06);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Header
   ============================================ */
header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.header-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.logo-text {
    height: 20px;
}

/* ============================================
   Language Toggle
   ============================================ */
.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.nav-link {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg);
}

.lang-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
}

.lang-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.2s;
    text-decoration: none;
}

.lang-btn:hover {
    color: var(--text);
}

.lang-btn.active {
    background: var(--card);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ============================================
   Main Content
   ============================================ */
main {
    flex: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    width: 100%;
}

/* ============================================
   Typography
   ============================================ */
h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    color: var(--text);
}

h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.7;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.info-card {
    background: var(--primary-light);
    border: 1px solid rgba(59, 165, 181, 0.12);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 32px;
}

.info-card h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   Content Card (for Privacy, Terms)
   ============================================ */
.content-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.content-card h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-top: 32px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}

.content-card h2:first-child {
    margin-top: 0;
}

.content-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-top: 24px;
    margin-bottom: 12px;
}

.content-card p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.content-card ul, .content-card ol {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding-left: 24px;
}

.content-card li {
    margin-bottom: 8px;
}

.content-card table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.content-card th, .content-card td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.content-card th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text);
}

.content-card td {
    color: var(--text-secondary);
}

/* ============================================
   Key Points (Summary Box)
   ============================================ */
.key-points {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

@media (max-width: 520px) {
    .key-points {
        grid-template-columns: 1fr;
    }
}

.key-point {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.key-point-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.key-point-icon.blue { background: #E3F2FD; }
.key-point-icon.green { background: #E8F5E9; }
.key-point-icon.orange { background: #FFF3E0; }
.key-point-icon.purple { background: #F3E5F5; }

.key-point-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}

/* ============================================
   Document Meta
   ============================================ */
.doc-meta {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 24px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #5BBEC5 0%, #3BA5B5 50%, #2D8A99 100%);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(59, 165, 181, 0.3);
}

.btn-secondary {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   Download Items (for Marketing Materials)
   ============================================ */
.download-section {
    margin-bottom: 32px;
}

.download-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.download-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.download-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.download-icon.pdf {
    background: #FFEBEE;
    color: #C62828;
}

.download-info {
    flex: 1;
}

.download-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.download-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.download-arrow {
    font-size: 20px;
    color: var(--text-secondary);
}

/* ============================================
   App Download Specific
   ============================================ */
.store-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.store-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.store-button:hover:not(.disabled) {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.store-button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.store-button svg {
    width: 32px;
    height: 32px;
}

.store-text {
    display: flex;
    flex-direction: column;
}

.store-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.store-name {
    font-size: 16px;
    font-weight: 600;
}

/* ============================================
   Portal Menu Items
   ============================================ */
.menu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.menu-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.menu-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.menu-icon.download { background: #E3F2FD; }
.menu-icon.marketing { background: #FFF3E0; }
.menu-icon.privacy { background: #E8F5E9; }
.menu-icon.terms { background: #F3E5F5; }
.menu-icon.account { background: #FFEBEE; }

.menu-info {
    flex: 1;
}

.menu-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.menu-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

.menu-arrow {
    font-size: 20px;
    color: var(--text-secondary);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    main {
        padding: 28px 16px 60px;
    }

    h1 {
        font-size: 24px;
    }

    .card, .content-card {
        padding: 20px;
    }

    .info-card {
        padding: 20px;
    }

    .key-points {
        grid-template-columns: 1fr;
    }
}
