/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Навигационная панель */
#main-nav {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.logo img {
    margin-right: 10px;
}

#main-nav ul {
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;
}

#main-nav li {
    margin: 0 10px;
}

#main-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

#main-nav a:hover {
    background-color: #3498db;
    transform: translateY(-2px);
}

#main-nav .current a {
    background-color: #e74c3c;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Основное содержимое */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background-color: white;
    min-height: calc(100vh - 140px);
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Герой секция */
.hero {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Кнопки */
.btn {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Формы */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #2c3e50;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

table, th, td {
    border: 1px solid #bdc3c7;
}

th, td {
    padding: 15px;
    text-align: left;
}

th {
    background-color: #34495e;
    color: white;
    font-weight: bold;
}

.image-table {
    background-image: url('images/table-bg.jpg');
    background-size: cover;
    background-position: center;
}

.with-image img {
    max-width: 100px;
    display: block;
    margin-top: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Внутренняя навигация */
.internal-nav {
    background: #ecf0f1;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.internal-nav a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.internal-nav a:hover {
    background-color: #3498db;
    color: white;
}

/* Секции */
section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #ecf0f1;
}

section:last-of-type {
    border-bottom: none;
}

h1, h2, h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 0.5rem;
}

h2 {
    font-size: 2rem;
    color: #34495e;
}

h3 {
    font-size: 1.5rem;
    color: #7f8c8d;
}

/* Списки */
ol, ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Результаты */
.result-container {
    background: #ecf0f1;
    padding: 1.5rem;
    border-radius: 5px;
    margin: 1.5rem 0;
    border-left: 4px solid #3498db;
}

.screenshot-placeholder {
    background: #bdc3c7;
    padding: 3rem;
    text-align: center;
    border-radius: 5px;
    margin: 1rem 0;
    border: 2px dashed #7f8c8d;
}

/* Футер */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 1rem;
    }
    
    #main-nav ul {
        margin-top: 1rem;
        justify-content: center;
    }
    
    #main-nav li {
        margin: 5px;
    }
    
    main {
        padding: 1rem;
        margin: 0;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .internal-nav {
        flex-direction: column;
        align-items: center;
    }
}

/* Стили для чекбоксов и радиокнопок */
input[type="checkbox"],
input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.form-group div {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

/* Стили для изображений в таблице */
table img {
    max-width: 100px;
    height: auto;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

table img:hover {
    transform: scale(1.05);
}

/* Стили для страницы "Наши юристы" */
.lawyers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.lawyer-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e1e8ed;
}

.lawyer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.lawyer-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
    border: 4px solid #3498db;
}

.lawyer-name {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.lawyer-specialization {
    color: #e74c3c;
    text-align: center;
    font-weight: bold;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.lawyer-experience {
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: bold;
}

.lawyer-skills {
    list-style-type: none;
    margin: 1rem 0;
}

.lawyer-skills li {
    padding: 0.3rem 0;
    border-bottom: 1px dashed #ecf0f1;
}

.lawyer-skills li:before {
    content: "✓ ";
    color: #27ae60;
    font-weight: bold;
}

.specialization-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
    justify-content: center;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.filter-btn:hover, .filter-btn.active {
    background: #3498db;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 3rem 0;
}

.stat-card {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.consultation-form {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 3rem;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: center;
    color: #555;
}
/* Стили для страницы контактов */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.contact-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 4px solid #3498db;
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #3498db;
}

.office-hours {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.hours-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.hours-table td {
    padding: 0.7rem;
    border-bottom: 1px solid #e1e8ed;
}

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

.map-container {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.department-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-top: 3px solid #e74c3c;
    transition: transform 0.3s ease;
}

.department-card:hover {
    transform: translateY(-3px);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.social-link {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #2980b9;
    transform: translateY(-3px);
}

.emergency-contact {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    margin: 2rem 0;
}

.contact-form-container {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 3rem;
}

.internal-nav a.active {
    background: #3498db;
    color: white;
}
/* Стили для страницы транслитерации */
.passport-container {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 2rem 0;
    border: 2px solid #3498db;
}

.passport-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ecf0f1;
}

.passport-data {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.data-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.data-label {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.data-value {
    color: #34495e;
    font-size: 1.1rem;
}

.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.btn-transliterate {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-transliterate:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-reset {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.status-message {
    text-align: center;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 5px;
    font-weight: bold;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.transliteration-table {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.transliteration-table h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.table-container {
    overflow-x: auto;
}

.trans-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.trans-table th {
    background: #34495e;
    color: white;
    padding: 12px;
    text-align: left;
}

.trans-table td {
    padding: 10px;
    border-bottom: 1px solid #ecf0f1;
}

.trans-table tr:hover {
    background: #f1f2f6;
}

.cyrillic {
    color: #e74c3c;
    font-weight: bold;
}

.latin {
    color: #27ae60;
    font-weight: bold;
}

.instructions {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 1rem;
    margin: 1rem 0;
}

.code-example {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    margin: 1rem 0;
    overflow-x: auto;
}
/* Стили для страницы алгоритмической задачи */
.task-container {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 2rem 0;
    border: 2px solid #3498db;
}

.task-description {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #e74c3c;
}

.formula {
    background: #2c3e50;
    color: white;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    text-align: center;
}

.input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.year-input {
    padding: 12px;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    font-size: 1.1rem;
    width: 150px;
    text-align: center;
}

.year-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.btn-calculate {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-calculate:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.btn-clear {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.result-container {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 8px;
    display: none;
}

.result-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.result-item {
    margin: 1rem 0;
    padding: 1rem;
    background: white;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.century-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    margin-left: 1rem;
}

.leap-badge {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    margin-left: 1rem;
}

.not-leap-badge {
    display: inline-block;
    background: #95a5a6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    margin-left: 1rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.example-card {
    background: white;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 3px solid #3498db;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.algorithm-steps {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.step {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.step:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

.code-example {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    margin: 1rem 0;
    overflow-x: auto;
}

.historical-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.legal-application {
    background: #e8f4fd;
    border: 1px solid #3498db;
    border-radius: 5px;
    padding: 1.5rem;
    margin: 2rem 0;
}
