* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Styles */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #3498db;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1485827404703-89b55fcc595e?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Section Styles */
section {
    padding: 4rem 0;
}

.section-gray {
    background-color: #f9f9f9;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.section-title h2 {
    font-size: 2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #3498db;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.card-img {
    height: 200px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* History Timeline */
.history-timeline {
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2.5rem;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #3498db;
}

.timeline-item:after {
    content: '';
    position: absolute;
    left: 5px;
    top: 12px;
    width: 2px;
    height: calc(100% + 1.5rem);
    background-color: #3498db;
}

.timeline-item:last-child:after {
    display: none;
}

.timeline-year {
    font-weight: bold;
    color: #3498db;
    margin-bottom: 0.5rem;
}

/* Footer Styles */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-links {
    margin: 1rem 0;
}

.footer-links a {
    color: #ecf0f1;
    margin: 0 1rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: #3498db;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    font-family: "Times New Roman", Times, serif;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-primary {
    background-color: #3498db;
}

.btn-secondary {
    background-color: #e74c3c;
}

.btn-secondary:hover {
    background-color: #c0392b;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-accent {
    background-color: #9b59b6;
}

.btn-accent:hover {
    background-color: #8e44ad;
}

/* Hero Buttons */
.hero-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Commands Grid */
.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.command-category {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.command-category h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.command-category ul {
    list-style: none;
}

.command-category li {
    margin-bottom: 0.8rem;
    padding-left: 1rem;
    position: relative;
}

.command-category li:before {
    content: '•';
    color: #3498db;
    position: absolute;
    left: 0;
}

/* Constructor Content */
.constructor-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.component-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 4px solid #3498db;
}

.component-item h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.constructor-features ul {
    list-style: none;
}

.constructor-features li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.constructor-features li:before {
    content: '?';
    color: #27ae60;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Projects Showcase */
.projects-showcase {
    margin-top: 3rem;
}

.projects-showcase h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    margin-bottom: 1rem;
    font-size: 2.2rem;
}

.cta-content p {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Active nav link */
nav ul li a.active {
    color: #3498db;
}

/* EV3 Specific Styles */
.programming-environments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.environment-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.environment-card h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.environment-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #3498db;
}

/* Sensor Grid */
.sensors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.sensor-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border-top: 4px solid #3498db;
}

.sensor-item h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Scientist Grid */
.scientists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.scientist-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.scientist-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.scientist-header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.scientist-period {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.scientist-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    margin: 0 auto 1rem;
    overflow: hidden;
    background: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #3498db;
}

.scientist-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scientist-content {
    padding: 2rem;
}

.scientist-bio {
    margin-bottom: 1.5rem;
}

.scientist-achievements {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.scientist-achievements h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.achievements-list {
    list-style: none;
}

.achievements-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.achievements-list li:before {
    content: '?';
    color: #3498db;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Era Sections */
.era-section {
    margin: 4rem 0;
}

.era-title {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    border-radius: 12px;
}

.era-title h2 {
    color: white;
    margin-bottom: 0.5rem;
}

.era-description {
    font-size: 1.1rem;
    opacity: 0.9;
}

.era-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    border-radius: 8px;
}

.era-header h2 {
    color: white;
    margin-bottom: 0.5rem;
}

.era-period {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Quote Styles */
.quote {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    border-left: 4px solid #3498db;
    font-style: italic;
    position: relative;
}

.quote:before {
    content: '"';
    font-size: 4rem;
    color: #3498db;
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    opacity: 0.3;
}

.quote-author {
    text-align: right;
    margin-top: 1rem;
    font-weight: bold;
    color: #2c3e50;
}

/* Legacy Section */
.legacy-section {
    background: #f8f9fa;
    padding: 4rem 0;
    margin: 4rem 0;
}

.legacy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.legacy-item {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.legacy-icon {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 1rem;
}

/* Figures Grid */
.figures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.figure-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.figure-card:hover {
    transform: translateY(-5px);
}

.figure-img {
    height: 200px;
    overflow: hidden;
}

.figure-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.figure-content {
    padding: 1.5rem;
}

.figure-name {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

/* Milestones Grid */
.milestones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.milestone-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    text-align: center;
}

.milestone-year {
    font-weight: bold;
    color: #3498db;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Enhanced Timeline Styles */
.enhanced-timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.enhanced-timeline-item {
    position: relative;
    padding: 2rem 0 2rem 3rem;
    margin-bottom: 0;
    border-left: 3px solid #3498db;
}

.enhanced-timeline-item:before {
    content: '';
    position: absolute;
    left: -10px;
    top: 2rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #3498db;
    border: 4px solid white;
    box-shadow: 0 0 0 3px #3498db;
}

.enhanced-timeline-year {
    font-weight: bold;
    color: #3498db;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: inline-block;
}

.enhanced-timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-left: 1rem;
}

/* Znatok Specific Styles */
.intro-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.intro-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.intro-text h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.intro-image {
    text-align: center;
}

.intro-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.component-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #3498db;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.benefit-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
}

.benefit-header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.benefit-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.benefit-content {
    padding: 1.5rem;
}

.benefit-item {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.benefit-item:before {
    content: '?';
    color: #27ae60;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Methods Section */
.methods-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.method-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.method-number {
    display: inline-block;
    background: #3498db;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Success Stories */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.story-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.story-content {
    padding: 1.5rem;
}

.story-quote {
    font-style: italic;
    color: #555;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.story-quote:before {
    content: '"';
    font-size: 2rem;
    color: #3498db;
    position: absolute;
    left: 0;
    top: -0.5rem;
}

.story-author {
    font-weight: bold;
    color: #2c3e50;
    text-align: right;
}

/* Text alignment */
h1, h2, h3, h4 {
    font-weight: bold;
    letter-spacing: 0.5px;
}

.card-content p, .timeline-item p, .component-item p, 
.scientist-bio p, .era-description p, .benefit-item p, 
.method-description p {
    text-align: justify;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .constructor-content {
        grid-template-columns: 1fr;
    }
    
    .components-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons, .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .programming-environments {
        grid-template-columns: 1fr;
    }
    
    .scientists-grid {
        grid-template-columns: 1fr;
    }
    
    .legacy-grid {
        grid-template-columns: 1fr;
    }
    
    .enhanced-timeline-item {
        padding-left: 2rem;
    }
    
    .enhanced-timeline-content {
        margin-left: 0;
    }
    
    .intro-content {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .methods-container {
        grid-template-columns: 1fr;
    }
}

.img_center {
	margin-left: 85px; /* îòñòóïû âíóòðè êîíòåéíåðà */
}