*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --dark: #1a2b4c;
    --accent: #ff6b35;
    --accent-hover: #e55a2b;
    --success: #27ae60;
    --danger: #e74c3c;
    --gray: #666;
    --light: #f5f5f5;
    --white: #fff;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --radius: 12px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
header { background: var(--dark); box-shadow: 0 4px 12px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 1000; }
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { background: var(--accent); color: var(--white); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.logo-text { color: var(--white); font-size: 24px; font-weight: 700; }
.logo-text span { color: var(--accent); }
.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { color: var(--white); text-decoration: none; font-weight: 500; font-size: 16px; transition: color 0.3s; padding: 5px 0; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a.active { border-bottom: 2px solid var(--accent); }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--white); font-size: 24px; cursor: pointer; }
.auth-buttons { display: flex; gap: 10px; }
.auth-nav { display: none; align-items: center; gap: 15px; }
.auth-nav.active { display: flex; }
.user-name { color: var(--white); font-weight: 500; cursor: pointer; padding: 8px 12px; border-radius: 6px; transition: 0.3s; }
.user-name:hover { color: var(--accent); }
.auth-nav .btn-outline { background: var(--accent); border-color: var(--accent); color: var(--white); }
.auth-nav .btn-outline:hover { background: var(--accent-hover); }

/* Mobile auth */
.auth-buttons-mobile, .auth-nav-mobile { display: none; }
@media (max-width: 576px) {
    .auth-buttons-mobile.show-mobile, .auth-nav-mobile.show-mobile { display: flex !important; flex-direction: column; gap: 10px; padding: 15px 20px; border-top: 1px solid rgba(255,255,255,0.1); margin-top: 10px; }
    .auth-nav-mobile .user-name-mobile { color: var(--white); text-align: center; padding: 10px; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,0.2); margin-bottom: 10px; }
    .auth-nav-mobile .btn { width: 100%; }
    .auth-nav-mobile .btn-profile-mobile { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
    .auth-nav-mobile .btn-logout-mobile { background: var(--danger); color: var(--white); }
    .btn-auth-primary { background: var(--accent); color: var(--white); width: 100%; padding: 12px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }
    .auth-buttons { display: none !important; }
    .auth-nav { display: none !important; }
}

/* Buttons */
.btn {
    display: inline-block; padding: 12px 24px; border: none; border-radius: 8px; font-size: 16px; font-weight: 600;
    cursor: pointer; transition: all 0.3s; text-decoration: none; text-align: center;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; border: 2px solid var(--dark); color: var(--dark); }
.btn-outline:hover { background: var(--dark); color: var(--white); }
.btn-block { width: 100%; }
.btn-small { padding: 8px 16px; font-size: 14px; }
.btn-logout { background: var(--danger); color: var(--white); padding: 12px 30px; border-radius: 8px; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: 0.3s; }
.btn-logout:hover { background: #c0392b; }

/* Hero */
.hero {
    background: linear-gradient(rgba(26,43,76,0.85), rgba(26,43,76,0.9)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect fill="%231a2b4c" width="1200" height="400"/></svg>');
    background-size: cover; background-position: center; color: var(--white); padding: 80px 0; text-align: center;
}
.hero h1 { font-size: 48px; margin-bottom: 20px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero p { font-size: 20px; max-width: 800px; margin: 0 auto 30px; }

/* Section title */
.section-title { text-align: center; margin-bottom: 50px; font-size: 36px; color: var(--dark); position: relative; }
.section-title::after { content: ''; display: block; width: 100px; height: 4px; background: var(--accent); margin: 10px auto; }

/* Services */
.services { margin-bottom: 80px; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; }
.service-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.3s; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.15); }
.service-icon { background: var(--dark); color: var(--white); font-size: 40px; padding: 25px; text-align: center; }
.service-content { padding: 30px; }
.service-content h3 { color: var(--dark); margin-bottom: 15px; font-size: 24px; }
.service-content p { color: var(--gray); margin-bottom: 20px; }
.service-btn { background: var(--accent); color: var(--white); padding: 10px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; border: none; transition: 0.3s; }
.service-btn:hover { background: var(--accent-hover); }

/* Slider */
.employees-slider { margin-bottom: 80px; }
.slider-container { position: relative; overflow: hidden; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.slider { display: flex; transition: transform 0.5s ease; }
.slide { min-width: 100%; position: relative; }
.slide-img { width: 100%; height: 500px; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; font-size: 80px; color: rgba(255,255,255,0.1); font-family: 'Font Awesome 6 Free'; font-weight: 900; }
.slide-img-1 { background: linear-gradient(135deg, #2d3f63, #1a2b4c); } .slide-img-1::after { content: '\f0d1'; }
.slide-img-2 { background: linear-gradient(135deg, #3d5a80, #293241); } .slide-img-2::after { content: '\f0e7'; }
.slide-img-3 { background: linear-gradient(135deg, #4a6fa5, #162447); } .slide-img-3::after { content: '\f540'; }
.slide-img-4 { background: linear-gradient(135deg, #5c80bc, #1a2b4c); } .slide-img-4::after { content: '\f0d1'; }
.slide-info { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(26,43,76,0.9)); color: var(--white); padding: 30px; }
.slide-info h3 { font-size: 28px; margin-bottom: 5px; }
.slider-controls { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 30px; }
.slider-btn { background: var(--dark); color: var(--white); border: none; width: 50px; height: 50px; border-radius: 50%; font-size: 20px; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.slider-btn:hover { background: var(--accent); }
.slider-dots { display: flex; gap: 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #ccc; cursor: pointer; transition: 0.3s; }
.dot.active { background: var(--accent); }

/* Reviews */
.reviews-section { padding: 60px 0; background: #f8f9fa; }
.reviews-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.reviews-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; }
.average-rating { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.stars { color: #ffc107; font-size: 24px; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 20px; }
.review-card { background: var(--white); border-radius: var(--radius); padding: 25px; box-shadow: var(--shadow); }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.review-author { font-weight: 600; color: var(--dark); }
.review-date { color: #999; font-size: 14px; }
.review-rating { color: #ffc107; margin-bottom: 10px; }
.review-text { color: var(--gray); }
.no-reviews { text-align: center; padding: 40px; color: #999; }

/* Profile */
.profile-section { padding: 60px 0; min-height: calc(100vh - 400px); }
.profile-container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.profile-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: linear-gradient(135deg, var(--dark), #2d3f63); color: var(--white); padding: 25px; border-radius: var(--radius); text-align: center; }
.stat-value { font-size: 36px; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 14px; opacity: 0.9; margin-top: 5px; }
.profile-tabs { display: flex; gap: 10px; margin-bottom: 30px; border-bottom: 2px solid #e0e0e0; padding-bottom: 10px; }
.profile-tab { padding: 10px 20px; background: none; border: none; font-size: 16px; color: var(--gray); cursor: pointer; border-radius: 8px 8px 0 0; transition: 0.3s; }
.profile-tab.active { color: var(--dark); background: #e8eef8; }
.profile-content { display: none; }
.profile-content.active { display: block; }
.profile-info-card { background: var(--white); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.profile-info-card h3 { color: var(--dark); margin-bottom: 20px; }
.profile-logout { margin-top: 30px; text-align: center; padding-top: 20px; border-top: 1px solid #eee; }

/* Requests list */
.requests-list { display: flex; flex-direction: column; gap: 15px; }
.request-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.request-info { flex: 1; min-width: 250px; }
.request-id { font-size: 14px; color: #999; }
.request-service { font-weight: 600; color: var(--dark); margin: 5px 0; }
.request-vehicle, .request-date { color: var(--gray); font-size: 14px; }
.request-status { padding: 6px 12px; border-radius: 20px; font-size: 14px; font-weight: 600; }
.status-new { background: #e3f2fd; color: #1976d2; }
.status-in_progress { background: #fff3e0; color: #f57c00; }
.status-completed { background: #e8f5e9; color: #388e3c; }
.status-cancelled { background: #ffebee; color: #d32f2f; }

/* Vacancies */
.vacancies-section { padding: 60px 0; background: #f8f9fa; }
.vacancies-intro-text { text-align: center; color: var(--gray); font-size: 1.1rem; margin-bottom: 40px; }
.vacancies-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.vacancy-card { background: var(--white); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow); transition: 0.3s; cursor: pointer; border: 2px solid transparent; }
.vacancy-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.vacancy-card.selected { border-color: var(--accent); background: #fff5f0; }
.vacancy-icon { font-size: 2.5rem; color: var(--accent); margin-bottom: 16px; }
.vacancy-card h3 { color: var(--dark); font-size: 1.3rem; margin-bottom: 10px; }
.vacancy-card p { color: var(--gray); margin-bottom: 16px; }
.vacancy-salary { font-weight: 700; color: var(--success); font-size: 1.4rem; margin-bottom: 20px; }
.btn-select-vacancy { width: 100%; }

/* Footer */
footer { background: var(--dark); color: var(--white); padding: 50px 0 20px; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; margin-bottom: 40px; }
.footer-column { flex: 1; min-width: 250px; }
.footer-column h3 { font-size: 20px; margin-bottom: 20px; color: var(--accent); }
.footer-column p { color: #ddd; margin-bottom: 10px; }
.copyright { text-align: center; padding-top: 20px; border-top: 1px solid #2d3f63; color: #aaa; font-size: 14px; }

/* Modals */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: none; justify-content: center; align-items: center; z-index: 2000; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal { background: var(--white); border-radius: var(--radius); max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: modalIn 0.3s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; border-bottom: 1px solid #eee; }
.modal-header h2 { color: var(--dark); font-size: 24px; }
.modal-close { background: none; border: none; font-size: 28px; color: #999; cursor: pointer; }
.modal-close:hover { color: #333; }
.modal-body { padding: 25px; }

/* Auth toggle */
.auth-toggle-container { margin-bottom: 25px; }
.auth-toggle-slider { display: flex; background: #f0f0f0; border-radius: 25px; padding: 4px; position: relative; cursor: pointer; overflow: hidden; }
.auth-toggle-option { flex: 1; text-align: center; padding: 12px; color: var(--gray); font-size: 15px; font-weight: 600; z-index: 2; user-select: none; transition: 0.3s; }
.auth-toggle-option.active { color: var(--white); }
.auth-toggle-slider::before { content: ''; position: absolute; top: 4px; left: 4px; width: calc(50% - 4px); height: calc(100% - 8px); background: var(--accent); border-radius: 20px; transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); z-index: 1; }
.auth-toggle-slider[data-active="register"]::before { transform: translateX(100%); }
.auth-form { display: none; animation: fadeIn 0.3s; }
.auth-form.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: #333; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 15px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 16px; transition: border-color 0.3s; font-family: inherit; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--dark); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group input[readonly] { background: #f5f5f5; cursor: default; }
.form-group input[readonly]:focus { border-color: #e0e0e0; }

/* File upload */
.file-upload-box { border: 2px dashed #ddd; border-radius: 10px; padding: 30px 20px; text-align: center; background: #f9f9f9; cursor: pointer; transition: 0.3s; }
.file-upload-box:hover { border-color: var(--accent); background: #fff5f0; }
.file-upload-box i { font-size: 40px; color: var(--accent); margin-bottom: 10px; display: block; }
.file-upload-box span { display: block; color: #333; font-weight: 500; margin-bottom: 5px; }
.file-upload-box small { color: #999; font-size: 12px; }
.file-preview { margin-top: 15px; }
.file-preview img { max-width: 200px; max-height: 200px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.file-preview .file-info { display: flex; align-items: center; gap: 10px; padding: 10px; background: #f5f5f5; border-radius: 6px; margin-top: 10px; }
.file-preview .remove-file { margin-left: auto; background: var(--danger); color: var(--white); border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; }

/* Rating */
.rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 5px; }
.rating-input input { display: none; }
.rating-input label { font-size: 32px; color: #ddd; cursor: pointer; transition: 0.2s; }
.rating-input label:hover, .rating-input label:hover ~ label, .rating-input input:checked ~ label { color: #ffc107; }

/* Badge */
.badge-optional { background: var(--accent); color: var(--white); padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }

/* Toast */
.toast { position: fixed; bottom: 20px; right: 20px; padding: 15px 25px; border-radius: 8px; color: var(--white); font-weight: 500; box-shadow: 0 4px 12px rgba(0,0,0,0.2); z-index: 3000; animation: toastIn 0.3s; max-width: 400px; }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: #2196f3; }
@keyframes toastIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }

/* Responsive */
@media (max-width: 992px) { .services-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .nav-links { position: fixed; top: 70px; left: -100%; width: 100%; background: var(--dark); flex-direction: column; align-items: center; padding: 30px 0; transition: left 0.5s; box-shadow: 0 10px 20px rgba(0,0,0,0.2); z-index: 999; }
    .nav-links.active { left: 0; }
    .hero h1 { font-size: 36px; }
    .slide-img { height: 400px; }
    .vacancies-grid { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
    .services-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 24px; }
    .hero p { font-size: 14px; }
    .hero { padding: 60px 0; }
    .section-title { font-size: 22px; }
    .slide-img { height: 250px; }
    .slide-info { padding: 15px; }
    .slide-info h3 { font-size: 18px; }
    .reviews-header { flex-direction: column; align-items: flex-start; }
    .profile-stats { grid-template-columns: 1fr; }
    .modal { max-width: 100%; margin: 10px; }
    .rating-input label { font-size: 28px; }
    .logo-text { font-size: 18px; }
    .toast { left: 10px; right: 10px; bottom: 10px; max-width: none; }
}
@media (max-width: 400px) {
    .hero h1 { font-size: 20px; }
    .slide-img { height: 200px; }
}

html, body { overflow-x: hidden; max-width: 100%; }

@supports (padding: max(0px)) {
    body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
    header { padding-top: env(safe-area-inset-top); }
    footer { padding-bottom: env(safe-area-inset-bottom); }
    .toast { bottom: max(20px, env(safe-area-inset-bottom)); }
}
.news-section { padding: 60px 0; background: #f8f9fa; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 25px; }
.news-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.08); transition: 0.3s; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.12); }
.news-card-img { width: 100%; height: 200px; object-fit: cover; background: #e0e0e0; }
.news-card-body { padding: 20px; }
.news-card-body h3 { color: #1a2b4c; margin-bottom: 10px; font-size: 18px; }
.news-card-body .news-text {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.news-card-body .read-more {
    color: #ff6b35;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
}
.news-card-body .read-more:hover { text-decoration: underline; }
.news-card-date { color: #999; font-size: 12px; margin-top: 10px; }
.news-modal-text { white-space: pre-line; word-wrap: break-word; }
.news-modal-date i { color: #ff6b35; margin-right: 5px; }
.news-card-img-link { display: block; cursor: pointer; overflow: hidden; }
.news-card-img-link img { width: 100%; height: 200px; object-fit: cover; transition: transform 0.3s; }
.news-card-img-link:hover img { transform: scale(1.05); }
#imageModal { z-index: 3000; align-items: center; justify-content: center; }
#imageModal img { max-width: 90%; max-height: 90vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); cursor: default; }
.image-modal-close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 40px; cursor: pointer; z-index: 3001; transition: 0.3s; }
.image-modal-close:hover { color: #ff6b35; }
html, body { height: 100%; }
body { display: flex; flex-direction: column; }
main { flex: 1; }
html, body { height: 100%; margin: 0; padding: 0; }
body { display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
footer { flex-shrink: 0; }
