:root {
    --primary: #0066cc;
    --primary-light: #4d94ff;
    --secondary: #00a859;
    --accent: #ff6600;
    --dark: #1a2b4c;
    --light: #f5f9ff;
    --gray: #e0e7f2;
    --text: #333333;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary);
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #00c471;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Cards */
.features-grid,
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.feature-card,
.service-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover,
.service-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.service-card h3 {
    color: var(--dark);
    margin-bottom: 15px;
}

.service-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
    margin: 15px 0;
}

/* Auth */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.auth-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
}

/* Cabinet */
.cabinet-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-top: 30px;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid transparent;
}

.order-item.active {
    border-left-color: var(--primary);
}

.order-header {
    display: flex;
    justify-content: between;
    align-items: start;
    margin-bottom: 10px;
}

.order-header h3 {
    flex: 1;
    margin-right: 15px;
}

.order-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-new { background: #e3f2fd; color: #1976d2; }
.status-in_progress { background: #fff3e0; color: #f57c00; }
.status-completed { background: #e8f5e8; color: #2e7d32; }
.status-cancelled { background: #ffebee; color: #c62828; }

/* Messages */
.messages-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.message {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #ddd;
}

.my-message {
    border-left-color: var(--primary);
}

.admin-message {
    border-left-color: var(--secondary);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
}

.footer-section a {
    color: #ddd;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding: 20px;
    text-align: center;
    color: #aaa;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .cabinet-layout {
        grid-template-columns: 1fr;
    }
    
    .features-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
}
/* Добавляем в конец файла */

/* Модальные окна */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.modal-close i {
    font-size: 1.2rem;
    color: var(--text);
}

.modal-content {
    padding: 40px;
}

.modal-header {
    margin-bottom: 30px;
    padding-right: 50px;
}

.modal-header h2 {
    color: var(--dark);
    font-size: 2rem;
    margin: 0;
    font-weight: 700;
}

.modal-section {
    margin-bottom: 30px;
}

.modal-section h3 {
    color: var(--dark);
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.modal-section p {
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.modal-features {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
}

.modal-features h4 {
    color: var(--dark);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.modal-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-features li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text);
    line-height: 1.5;
}

.modal-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.modal-stat {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.modal-stat strong {
    display: block;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 5px;
    font-weight: 700;
}

.modal-stat span {
    color: var(--text);
    font-size: 0.9rem;
}

.modal-tech {
    margin: 25px 0;
}

.modal-tech h4 {
    margin-bottom: 15px;
    color: var(--dark);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Спецификации оборудования */
.equipment-specs {
    margin: 25px 0;
}

.equipment-specs h4 {
    margin-bottom: 15px;
    color: var(--dark);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.spec-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

.spec-item strong {
    display: block;
    color: var(--dark);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.spec-item span {
    display: block;
    color: var(--text);
    margin-bottom: 5px;
    font-size: 0.95rem;
}

/* Детали кейсов */
.case-details {
    margin: 25px 0;
}

.case-info {
    margin-bottom: 25px;
}

.case-info h4 {
    margin-bottom: 15px;
    color: var(--dark);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-item strong {
    color: var(--dark);
}

.info-item span {
    color: var(--text);
    font-weight: 500;
}

.case-results h4 {
    margin-bottom: 15px;
    color: var(--dark);
}

.case-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.case-results li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text);
    line-height: 1.5;
}

.case-results li::before {
    content: '•';
    position: absolute;
    left: 10px;
    color: var(--secondary);
    font-weight: bold;
}

/* Литература */
.literature-details {
    margin: 25px 0;
}

.doc-info {
    margin-bottom: 25px;
}

.doc-info h4 {
    margin-bottom: 15px;
    color: var(--dark);
}

.abstract {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
}

.abstract h4 {
    margin-bottom: 15px;
    color: var(--dark);
}

.abstract p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.download-section {
    text-align: center;
    margin-top: 25px;
}

.download-section .btn {
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* Ссылки "Подробнее" */
.read-more {
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    display: inline-block;
    margin-top: 10px;
}

.read-more:hover {
    color: var(--primary-light);
}

/* Обновляем существующие стили для интерактивности */
.expertise-item,
.equipment-item,
.case-card,
.literature-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.expertise-item:hover,
.equipment-item:hover,
.case-card:hover,
.literature-item:hover {
    transform: translateY(-5px);
}

.expertise-content,
.literature-info {
    position: relative;
}

/* Адаптивность модальных окон */
@media (max-width: 768px) {
    .modal-container {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-content {
        padding: 25px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
    }
    
    .modal-header {
        margin-bottom: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-stats {
        grid-template-columns: 1fr;
    }
    
    .modal-features {
        padding: 20px;
    }
}
/* Стили для страницы карты */
.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-subtitle {
    color: #666;
    font-size: 1.1em;
}

.map-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.control-group {
    flex: 1;
    min-width: 200px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.map-container {
    position: relative;
    margin: 20px 0;
}

.map-legend {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.legend-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
}

.legend-color.powerline { background: #1e88e5; }
.legend-color.substation { background: #43a047; }
.legend-color.survey { background: #fb8c00; }
.legend-color.monitoring { background: #e53935; }

.projects-table {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr 1fr;
    background: #f8f9fa;
    font-weight: 600;
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr 1fr;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.table-row:hover {
    background: #f8f9fa;
}

.table-row:last-child {
    border-bottom: none;
}

.table-cell {
    padding: 5px;
}

.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.status.completed {
    background: #e8f5e8;
    color: #2e7d32;
}

.status.in-progress {
    background: #fff3e0;
    color: #ef6c00;
}

/* Адаптивность */
@media (max-width: 768px) {
    .map-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        min-width: auto;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .table-header .table-cell:not(:first-child),
    .table-row .table-cell:not(:first-child) {
        display: none;
    }
}