/* ============================================
   CLIENT ACQUISITION COST TRACKER STYLES
   ============================================ */

:root {
    --primary-color: #C62E2E;
    --secondary-color: #1e1e1e;
    --accent-color: #C1E172;
    --background-color: #f8f9fa;
    --text-dark: #1e1e1e;
    --text-muted: #6c757d;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-color);
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a02424 100%);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: snow;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

.hero-icon {
    margin-top: 30px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============================================
   TOOL SECTION
   ============================================ */

.tool-section {
    padding: 60px 0;
}

.tool-card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 40px;
    margin-bottom: 40px;
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-header h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.tool-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* ============================================
   EXPENSE CHANNELS INPUT
   ============================================ */

.expense-channels {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    margin-bottom: 30px;
    padding: 25px;
    background: var(--background-color);
    border-radius: var(--radius-sm);
    border: 2px dashed var(--border-color);
}

.channel-input-group {
    display: flex;
    flex-direction: column;
}

.channel-input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.channel-input-group input {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.channel-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(198, 46, 46, 0.1);
}

.btn-add-channel {
    align-self: flex-end;
    padding: 12px 24px;
    background: var(--accent-color);
    color: var(--text-dark);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-add-channel:hover {
    background: #a8c75f;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-add-channel span {
    font-size: 1.2rem;
    font-weight: 700;
}

/* ============================================
   CHANNELS LIST
   ============================================ */

.channels-list {
    margin-bottom: 30px;
}

.channel-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 15px;
    padding: 20px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    align-items: center;
    transition: var(--transition);
}

.channel-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.channel-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.05rem;
}

.channel-data {
    display: flex;
    flex-direction: column;
}

.channel-data-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.channel-data-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.channel-cac {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-remove-channel {
    padding: 8px 16px;
    background: var(--danger-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-remove-channel:hover {
    background: #c82333;
    transform: scale(1.05);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 15px;
    opacity: 0.5;
}

/* ============================================
   CUSTOM FIELDS
   ============================================ */

.custom-field-section {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(193, 225, 114, 0.1) 0%, rgba(193, 225, 114, 0.05) 100%);
    border-radius: var(--radius-sm);
    border: 2px solid var(--accent-color);
}

.custom-field-section h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.field-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.input-group {
    position: relative;
    max-width: 300px;
}

.input-prefix {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 35px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(193, 225, 114, 0.2);
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}

.btn-primary,
.btn-secondary {
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #a02424;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-dark);
}

/* ============================================
   RESULTS SECTION
   ============================================ */

.results-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 3px solid var(--accent-color);
}

.results-section h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    text-align: center;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.result-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.result-card.highlight {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a02424 100%);
    color: var(--white);
    border-color: var(--primary-color);
}

.result-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.result-card.highlight .result-label {
    opacity: 0.95;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1;
}

.result-card.highlight .result-value {
    color: var(--white);
}

.result-sublabel {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ============================================
   CHANNEL BREAKDOWN
   ============================================ */

.channel-breakdown {
    margin-bottom: 40px;
}

.channel-breakdown h4 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.breakdown-item {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    align-items: center;
    transition: var(--transition);
}

.breakdown-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.breakdown-item.best-channel {
    border-color: var(--success-color);
    background: rgba(40, 167, 69, 0.05);
}

.breakdown-item.worst-channel {
    border-color: var(--danger-color);
    background: rgba(220, 53, 69, 0.05);
}

.breakdown-channel-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.breakdown-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 10px;
}

.breakdown-badge.best {
    background: var(--success-color);
    color: var(--white);
}

.breakdown-badge.worst {
    background: var(--danger-color);
    color: var(--white);
}

.breakdown-metric {
    text-align: center;
}

.breakdown-metric-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.breakdown-metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* ============================================
   INSIGHTS SECTION
   ============================================ */

.insights-section {
    background: linear-gradient(135deg, rgba(193, 225, 114, 0.1) 0%, rgba(193, 225, 114, 0.05) 100%);
    padding: 30px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--accent-color);
}

.insights-section h4 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.insight-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--white);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--accent-color);
}

.insight-item.warning {
    border-left-color: var(--warning-color);
}

.insight-item.danger {
    border-left-color: var(--danger-color);
}

.insight-item.success {
    border-left-color: var(--success-color);
}

.insight-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.insight-content {
    flex: 1;
}

.insight-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.insight-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features-section {
    padding: 80px 0;
    background: var(--white);
}

.features-section h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 30px;
    background: var(--background-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================================
   HOW TO USE SECTION
   ============================================ */

.how-to-section {
    padding: 80px 0;
    background: var(--background-color);
}

.how-to-section h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.steps-container {
    max-width: 900px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 25px;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.step:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #a02424 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.step-content p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #0a0a0a 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid2" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(193,225,114,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid2)"/></svg>');
    opacity: 0.3;
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 2.5rem;
    color: snow;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.7;
}

.cta-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta-primary,
.btn-cta-secondary {
    padding: 16px 40px;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.btn-cta-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-cta-primary:hover {
    background: #a02424;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(198, 46, 46, 0.4);
}

.btn-cta-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-cta-secondary:hover {
    background: var(--white);
    color: var(--text-dark);
}

/* ============================================
   FAQ SECTION
   ============================================ */

.faq-section {
    padding: 80px 0;
    background: var(--white);
}

.faq-section h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-question {
    width: 100%;
    padding: 20px;
    background: var(--white);
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--background-color);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 20px 20px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================================
   CONTENT SECTION
   ============================================ */

.content-section {
    padding: 80px 0;
    background: var(--background-color);
}

.content-article {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 50px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.content-article h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.content-article h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-top: 35px;
    margin-bottom: 20px;
}

.content-article p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .expense-channels {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .btn-add-channel {
        align-self: stretch;
    }
    
    .channel-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .breakdown-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .cta-stats {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .tool-card {
        padding: 25px;
    }
    
    .features-section h2,
    .how-to-section h2,
    .faq-section h2 {
        font-size: 1.8rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
    }
    
    .step {
        flex-direction: column;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .content-article {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .tool-header h2 {
        font-size: 1.5rem;
    }
    
    .result-value {
        font-size: 2rem;
    }
    
    .stat-value {
        font-size: 2.5rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.channel-item,
.breakdown-item,
.insight-item {
    animation: fadeIn 0.3s ease;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

button:focus,
input:focus,
a:focus {
    outline: 3px solid rgba(198, 46, 46, 0.5);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================
   END OF CLIENT ACQUISITION COST TRACKER STYLES
   ============================================ */