/* Common styles for all Calx examples */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f7fa;
    color: #333;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.navbar-brand {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand:hover {
    opacity: 0.9;
}

.navbar-links {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.navbar-links a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
    font-size: 14px;
}

.navbar-links a:hover,
.navbar-links a.active {
    background-color: rgba(255,255,255,0.2);
}

/* Main content */
.content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.content.narrow {
    max-width: 900px;
}

.content.wide {
    max-width: 1400px;
}

/* Typography */
h1 {
    color: #2c3e50;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
    margin-top: 0;
    font-size: 32px;
}

h2 {
    color: #34495e;
    margin-top: 40px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
    padding-left: 15px;
    font-size: 24px;
}

h3 {
    color: #667eea;
    font-size: 18px;
    margin-top: 0;
}

/* Cards and containers */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card, .example-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    font-size: 28px;
}

.card-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    transition: opacity 0.3s;
    font-weight: 600;
}

.card-link:hover {
    opacity: 0.9;
}

/* Form elements */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
    font-size: 14px;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[readonly], input:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.display-value {
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    min-height: 20px;
}

/* Info boxes */
.info-box {
    background-color: #e8f4f8;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.info-box h3 {
    margin-top: 0;
    color: #2980b9;
}

.info-box ul {
    margin: 10px 0;
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
    color: #0d47a1;
}

.alert-success {
    background-color: #e8f5e9;
    border-left: 4px solid #4CAF50;
    color: #1b5e20;
}

.alert-warning {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    color: #e65100;
}

/* Code blocks */
code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #e74c3c;
    font-size: 13px;
}

pre {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    background-color: #667eea;
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

/* Help text */
.help-text {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
    font-style: italic;
}

/* Result display */
.result {
    background-color: #e3f2fd;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    border-left: 4px solid #2196F3;
}

/* Feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-item {
    display: flex;
    gap: 15px;
    align-items: start;
}

.feature-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.feature-content h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.feature-content p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: #7f8c8d;
    border-top: 1px solid #e0e0e0;
    margin-top: 50px;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        gap: 15px;
    }

    .navbar-links {
        width: 100%;
        justify-content: center;
    }

    .container {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 20px 15px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }
}
