/* ============================================================================
   ACID-BASE CHEMISTRY PAGE - SPECIFIC STYLES
   Page-specific styling for acid_base.html
   Leverages: variables.css, components.css, content.css
   ============================================================================ */

/* ===== TERMINUS CARDS (N/C-terminus explanations) ===== */
.terminus-card {
    background: var(--bg-secondary);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    margin: var(--spacing-xl) auto;
    max-width: 600px;
    border-left: 4px solid var(--primary-blue);
}

/* ===== IONIZABLE AMINO ACID CARDS ===== */
.acidic-residue {
    border-left: 4px solid #e74c3c;
}

.acidic-residue .property-name {
    color: #e74c3c;
}

.basic-residue {
    border-left: 4px solid #3498db;
}

.basic-residue .property-name {
    color: #3498db;
}

.special-residue {
    border-left: 4px solid #f39c12;
}

.special-residue .property-name {
    color: #f39c12;
}

/* ===== EQUATION CARDS (Henderson-Hasselbalch) ===== */
.equation-card {
    background: var(--bg-secondary);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    margin: var(--spacing-2xl) auto;
    max-width: 600px;
    border: 2px solid var(--primary-blue);
}

.equation-card .property-formula {
    font-size: 1.3rem;
    font-family: 'Courier New', Courier, monospace;
    color: var(--text-primary);
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: var(--font-weight-semibold);
}

/* ===== RULE CARD (2 pH Unit Rule) ===== */
.rule-card {
    background: var(--gradient-primary);
    color: white;
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    margin: var(--spacing-2xl) auto;
    max-width: 700px;
}

.rule-card .property-name {
    color: white;
    font-size: 1.3rem;
    margin-bottom: var(--spacing-lg);
}

.rule-card .instruction-list {
    color: var(--text-primary);
    text-align: left;
}

/* ===== pH SLIDER DEMO ===== */
.ph-demo {
    max-width: 900px;
    margin: var(--spacing-3xl) auto;
}

.ph-slider-container {
    margin: var(--spacing-2xl) 0;
}

.ph-label {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    display: block;
    text-align: center;
}

#demo-ph-value {
    color: var(--primary-blue);
    font-weight: var(--font-weight-bold);
    font-size: 1.3rem;
}

.ph-slider {
    width: 100%;
    height: 8px;
    border-radius: var(--radius-md);
    outline: none;
    background: linear-gradient(to right, 
        #e74c3c 0%,     /* Red - acidic */
        #f39c12 35%,    /* Orange */
        #27ae60 50%,    /* Green - neutral */
        #3498db 65%,    /* Blue */
        #9b59b6 100%    /* Purple - basic */
    );
    -webkit-appearance: none;
    appearance: none;
}

.ph-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-inverse);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.ph-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-inverse);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
}

.ph-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-sm);
}

/* ===== PROTONATION STATE DISPLAY CARDS ===== */
#protonation-display {
    margin-top: var(--spacing-2xl);
}

/* Styles handled by JavaScript inline for dynamic coloring */

/* ===== EXAMPLE BOXES ===== */
.example-box {
    background: var(--bg-secondary);
    margin-top: var(--spacing-2xl);
}

.ph-example {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-blue);
}

.ph-example strong {
    color: var(--primary-blue);
}

/* ===== MISTAKE & TIP CARDS ===== */
.mistake-card {
    border-left: 4px solid #e74c3c;
}

.mistake-card .property-name {
    color: #e74c3c;
}

.tip-card {
    border-left: 4px solid #27ae60;
}

.tip-card .property-name {
    color: #27ae60;
}

/* ===== RELATED CONTENT LINKS ===== */
.related-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all var(--transition-slow);
}

.related-link .property-name,
.related-link .property-description {
    color: white;
}

.related-link .property-name {
    font-size: 1.2rem;
}

.related-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl);
}

.related-link.coming-soon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    cursor: default;
    opacity: 0.9;
}

.related-link.coming-soon:hover {
    transform: translateY(-2px);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .terminus-card,
    .equation-card,
    .rule-card {
        padding: var(--spacing-lg);
    }

    .equation-card .property-formula {
        font-size: 1.1rem;
    }

    .ph-label {
        font-size: 1rem;
    }

    #demo-ph-value {
        font-size: 1.2rem;
    }
}
