/* 
 * brumm.hu - Railway Modeling Website Styles
 * Modern responsive design with grayish theme
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #F5F5F7;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main Content */
main {
    padding: 2rem;
}

/* Typography */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #6c757d;
    margin: 2rem 0 1rem 0;
    border-bottom: 3px solid #6c757d;
    padding-bottom: 0.5rem;
}

.subsection-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #495057;
    margin: 1.5rem 0 1rem 0;
}

.section-divider {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, #6c757d, #495057);
    margin: 1.5rem 0;
}

.author-note {
    margin-top: 2rem;
    text-align: right;
    font-style: italic;
    color: #6c757d;
}

/* Content Sections */
.intro-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 4px solid #6c757d;
}

.content-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #fafafa;
    border-radius: 12px;
    border-left: 4px solid #6c757d;
}

/* Requirements Lists */
.requirements-list ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.requirements-list ul li {
    padding: 0.5rem 0;
    margin: 0.3rem 0;
    line-height: 1.6;
    font-weight: 500;
    color: #495057;
}

/* Component Icons */
.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.component-item {
    background: #fafafa;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border-left: 4px solid #6c757d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.component-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.component-icon {
    width: 120px;
    height: auto;
    margin: 0 auto 1rem auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.component-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 1rem;
}

.component-description {
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Images */
.hero-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 12px;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.comparison-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem auto;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Image Gallery Styles */
.comparison-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.comparison-gallery.final-image {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 2rem auto;
}

.comparison-item {
    text-align: center;
}

.comparison-gallery .comparison-image {
    margin: 0 auto 0.5rem auto;
    width: auto;
    max-width: 500px;
    height: auto;
}

.diagram-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem auto;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: white;
    padding: 1rem;
}

.image-caption {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Content Boxes */
.advice-box {
    background: #e9ecef;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border-left: 4px solid #6c757d;
}

.advice-box h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.warning-box {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    margin: 1rem 0;
}

.important-box {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    margin: 1rem 0;
}

.tip-box {
    background: #d1ecf1;
    color: #0c5460;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
    margin: 1rem 0;
}

.definition-box {
    background: #cce7ff;
    color: #004085;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    margin: 1rem 0;
}

.problem-box {
    background: #fff3cd;
    color: #856404;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin: 1rem 0;
}

.solution-box {
    background: #e8f4f8;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
    margin: 1rem 0;
}

.materials-box {
    background: #cce7ff;
    color: #004085;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    margin: 1rem 0;
}

.recipe-box {
    background: #fff3cd;
    color: #856404;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
}

.technical-box {
    background: #e9ecef;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border-left: 4px solid #6c757d;
}

.technical-box h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.key-point {
    background: #e8f4f8;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
    margin: 1rem 0;
    font-weight: 500;
}

.important-note {
    background: #d1ecf1;
    color: #0c5460;
    padding: 1.2rem;
    border-radius: 8px;
    border: 2px solid #bee5eb;
    margin: 1.5rem 0;
    font-weight: 600;
}

.steps-list {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border-left: 4px solid #6c757d;
}

.steps-list ol {
    margin-left: 1.5rem;
}

.steps-list li {
    margin: 0.8rem 0;
    font-weight: 500;
}

/* Tables and Comparisons */
.comparison-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.comparison-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-top: 4px solid #6c757d;
}

.comparison-card h3 {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.pros-cons {
    margin: 1rem 0;
}

.pros-cons h4 {
    margin: 0.5rem 0;
    color: #333;
}

.pros {
    color: #28a745;
}

.cons {
    color: #dc3545;
}

.formula-box {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    margin: 1rem 0;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

.math-formula {
    font-size: 1.2rem;
    font-weight: bold;
    color: #495057;
}

/* Data Tables */
.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.comparison-table th,
.comparison-table td {
    padding: 0.8rem;
    text-align: center;
    border: 1px solid #dee2e6;
}

.comparison-table th {
    background: #6c757d;
    color: white;
    font-weight: 600;
}

/* Interactive Elements */
.decoder-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 4px solid #6c757d;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.form-group input {
    width: 100%;
    max-width: 300px;
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #6c757d;
    box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.1);
}

.btn {
    background: #6c757d;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background: #495057;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.results-table th,
.results-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.results-table th {
    background: #6c757d;
    color: white;
    font-weight: 600;
}

.results-table tr:hover {
    background: #f8f9fa;
}

/* Utility Classes */
.highlight {
    background: #f8f9fa;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Links */
a {
    color: #6c757d;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

a:hover {
    color: #495057;
    text-decoration: underline;
}

/* Navigation */
.navigation-footer {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.navigation-footer a {
    margin: 0 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.6rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .comparison-table {
        grid-template-columns: 1fr;
    }
    
    .form-group input {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.4rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .subsection-title {
        font-size: 1.2rem;
    }
}

/* Index Page Specific Styles */
.mission {
    font-size: 2rem;
    font-weight: 700;
    color: #6c757d;
    margin: 2rem 0 1rem 0;
    text-align: center;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.topic-card {
    color: #222;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
    padding: 1.5rem;
    background: #f0f0f0;
    border-radius: 12px;
    transition: all 0.3s;
    text-align: center;
}

.topic-card:hover {
    background: #e9ecef;
    color: #222;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.topic-card-icon {
    margin-bottom: 0.5rem;
}

.topic-card-icon img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.topic-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.topic-card-description {
    font-size: 0.9rem;
    font-weight: 400;
    color: #666;
    margin-top: 0.5rem;
}

.center-content {
    text-align: center;
    margin: 2rem 0;
}

.hero-image-index {
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
}

.facebook-button {
    display: inline-block;
    background: #1877f2;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
}

.facebook-button:hover {
    background: #166fe5;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}

.facebook-description {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

/* App Store Buttons */
.app-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
}

.google-play-button {
    display: block;
    width: 140px;
    height: 40px;
}

.apple-store-button {
    display: block;
    width: 140px;
    height: 40px;
}

.google-play-button img {
    height: 52px !important;
    object-fit: contain !important;
    border-radius: 4px;
}

.apple-store-button img {
    height: 40px !important;
    width: 140px !important;
    object-fit: contain !important;
    border-radius: 4px;
}

.back-link {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.back-link a {
    color: #222;
    text-decoration: none;
    font-weight: 700;
}

.back-link a:hover {
    color: #6c757d;
}

/* External Links */
.external-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.external-link:hover {
    color: #004499;
    text-decoration: underline;
}

/* NEM Table Styles */
.nem-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.nem-table th {
    background: #6c757d;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 700;
}

.nem-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
}

.nem-table tr:hover {
    background-color: #f8f9fa;
}

/* NEM Type Colors - Based on Original */
.nem-mandatory td {
    background-color: #faf5f5;
    color: #B08080;
}

.nem-document td {
    background-color: #f5f5fa;
    color: #8080B0;
}

.nem-recommendation td {
    background-color: #f5faf5;
    color: #80B080;
}

.nem-mandatory .nem-link {
    color: #800000;
    text-decoration: none;
    font-weight: 500;
}

.nem-document .nem-link {
    color: #000040;
    text-decoration: none;
    font-weight: 500;
}

.nem-recommendation .nem-link {
    color: #004000;
    text-decoration: none;
    font-weight: 500;
}

.nem-link:hover {
    text-decoration: underline;
}

/* FREMO Page Specific Styles */
.fremo-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 2rem;
    margin: 2rem 0;
    border-left: 4px solid #6c757d;
}

.fremo-section h3 {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.fremo-main-document {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.fremo-main-document .document-icon {
    font-size: 2rem;
    color: #cc0000;
    margin-right: 1rem;
}

.fremo-main-link {
    color: #222;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}

.fremo-main-link:hover {
    color: #0066cc;
}

.fremo-attachments {
    margin-left: 3rem;
    margin-top: 1rem;
}

.fremo-attachment {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.fremo-attachment:last-child {
    border-bottom: none;
}

.fremo-attachment .document-icon {
    font-size: 1.2rem;
    color: #666;
    margin-right: 0.5rem;
    width: 1.5rem;
}

.fremo-attachment-link {
    color: #444;
    text-decoration: none;
    font-size: 0.9rem;
}

.fremo-attachment-link:hover {
    color: #0066cc;
    text-decoration: underline;
}

.scale-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ddd;
}

.pdf-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.pdf-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #6c757d;
    transition: all 0.3s;
}

.pdf-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pdf-item a {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pdf-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Sepia Historical Page Styling */
.historical-page {
    background: linear-gradient(135deg, #f4f1e8 0%, #f0ead6 100%);
}

.historical-page .container {
    background: #faf9f5;
    box-shadow: 0 0 30px rgba(139, 116, 84, 0.2);
}

.historical-page header {
    background: linear-gradient(135deg, #8b7454 0%, #6d5a3d 100%);
}

.historical-page .section-title,
.historical-page .subsection-title {
    color: #6d5a3d;
    border-bottom-color: #b8a082;
}

.historical-page .content-section {
    background: #f9f7f2;
    border-left-color: #8b7454;
}

.historical-page .info-box,
.historical-page .practical-box,
.historical-page .tip-box {
    background: #f2ede0;
    border-left-color: #8b7454;
}

.historical-page .warning-box {
    background: #f5f0e5;
    border-left-color: #b8860b;
}

.historical-page .hero-image {
    filter: sepia(20%) brightness(0.95) contrast(1.1);
    border: 3px solid #d4c5a9;
}

.historical-page .year-highlight {
    background: #8b7454;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    margin: 0.5rem 0;
}

.historical-page .timeline-event {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f7f3ed;
    border-left: 5px solid #8b7454;
    border-radius: 8px;
    position: relative;
}

.historical-page .timeline-event::before {
    content: "📅";
    position: absolute;
    left: -12px;
    top: 1.5rem;
    background: #8b7454;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.historical-page .system-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #6d5a3d;
    margin-bottom: 0.8rem;
}

.historical-page .quote {
    background: #ede5d3;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #8b7454;
    font-style: italic;
    color: #5c4e3a;
    margin: 1.5rem 0;
    position: relative;
}

.historical-page .quote::before {
    content: "\201C";
    font-size: 3rem;
    color: #8b7454;
    position: absolute;
    left: 0.5rem;
    top: -0.5rem;
    font-family: Georgia, serif;
}

.historical-page .navigation-footer a {
    background: #f7f3ed;
    border: 2px solid #8b7454;
    color: #6d5a3d;
}

.historical-page .navigation-footer a:hover {
    background: #8b7454;
    color: white;
}

/* Technical Specifications Box */
.technical-specs {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.technical-specs strong {
    color: #495057;
    display: block;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.technical-specs ul {
    margin-left: 1.5rem;
    list-style-type: disc;
}

.technical-specs li {
    margin-bottom: 0.5rem;
    color: #6c757d;
    font-weight: 500;
}

/* Participants List */
.participants-list {
    background: #f8f9fa;
    border-left: 4px solid #6c757d;
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.participants-list ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.participants-list li {
    margin-bottom: 0.5rem;
    color: #495057;
    font-weight: 500;
}

/* Highlight Box */
.highlight-box {
    background: #f8f9fa;
    border: 1px dashed #6c757d;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

.highlight-box p {
    margin: 0;
    color: #495057;
}

/* Sources Section */
.sources-section {
    background: #f1f3f4;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.sources-section h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.sources-section ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.sources-section li {
    margin-bottom: 0.8rem;
}

.sources-section a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.95rem;
}

.sources-section a:hover {
    color: #495057;
    text-decoration: underline;
}

/* Content Image */
.content-image {
    text-align: center;
    margin: 2rem 0;
}

.content-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Smaller content images */
.content-img-small {
    max-width: 70%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 2rem auto;
    display: block;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
}

.data-table th {
    background: #e0e0e0;
    color: #495057;
    padding: 0.8rem;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}

.data-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #dee2e6;
    color: #495057;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table td:nth-child(3),
.data-table th:nth-child(3),
.data-table td:nth-child(4),
.data-table th:nth-child(4),
.data-table td:nth-child(5),
.data-table th:nth-child(5) {
    text-align: center;
}

/* Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.grid-image {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.grid-image:hover {
    transform: translateY(-2px);
}

/* Special grid for more images */
.special-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Image captions */
.image-caption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    text-align: center;
    font-style: italic;
}

/* System Comparison Cards */
.system-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.system-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.system-card h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.system-card > p {
    color: #6c757d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Pros and Cons styling */
.pros-cons {
    margin-top: 1rem;
}

.pros-cons h4 {
    color: #495057;
    margin: 1rem 0 0.5rem 0;
    font-size: 1rem;
}

.pros-cons ul {
    margin: 0 0 1rem 1.5rem;
    padding: 0;
}

.pros-cons li {
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.pros {
    color: #28a745 !important;
}

.cons {
    color: #dc3545 !important;
}

/* Warning and Important boxes */
.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 4px solid #ffc107;
}

.warning-box strong {
    color: #856404;
    display: block;
    margin-bottom: 0.5rem;
}

.important-box {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 4px solid #17a2b8;
}

.important-box strong {
    color: #0c5460;
    display: block;
    margin-bottom: 0.5rem;
}

/* Comparison section */
.comparison-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.comparison-section h3 {
    color: #495057;
    margin-bottom: 1rem;
}

.comparison-section h4 {
    color: #6c757d;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.1rem;
}

/* Content images */
.content-image {
    display: block;
    max-width: 80%;
    height: auto;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Components section */
.components-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 4px solid #28a745;
}

.components-section h4 {
    color: #495057;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.components-list {
    margin: 0;
    padding-left: 1.5rem;
    list-style-type: none;
}

.components-list li {
    position: relative;
    margin-bottom: 0.8rem;
    color: #495057;
    font-weight: 500;
    padding-left: 1.5rem;
}

.components-list li::before {
    content: "⚡";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Code section */
.code-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin: 2rem 0;
    overflow: hidden;
}

.code-header {
    background: #495057;
    color: white;
    margin: 0;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-section h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

/* Code container with line numbers */
.code-container {
    display: flex;
    max-height: 500px;
    overflow: auto;
}

.line-numbers {
    background: #e9ecef;
    color: #6c757d;
    padding: 1.5rem 0.5rem;
    text-align: right;
    font-family: 'Courier New', 'Lucida Console', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    min-width: 50px;
    border-right: 1px solid #dee2e6;
    user-select: none;
}

.line-numbers span {
    display: block;
    padding-right: 0.5rem;
}

/* Copy button styling */
.copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.copy-btn.copied {
    background: #27ae60;
    border-color: #27ae60;
    transform: scale(1.05);
}

.copy-icon {
    font-size: 1em;
}

.copy-text {
    font-weight: normal;
}

.code-section pre {
    margin: 0;
    padding: 1.5rem;
    overflow: visible;
    background: #f8f9fa;
    border: none;
    line-height: 1.5;
    flex: 1;
}

.code-section code {
    background: none;
    padding: 0;
    color: #495057;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Arduino code syntax highlighting */
.code-section code.arduino {
    color: #495057;
}

/* Basic syntax highlighting for keywords */
.code-section code.arduino:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}