/* Design System - Inspired by Gosuslugi.ru */
:root {
    --primary-blue: #0055A4;
    --hover-blue: #004482;
    --bg-gray: #F4F7F9;
    --text-dark: #2D3436;
    --white: #FFFFFF;
    --border-gray: #E0E3E6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

/* Focus visible for accessibility */
*:focus {
    outline: 3px solid #0055A4;
    outline-offset: 2px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-gray);
    color: var(--text-dark);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Accessibility Mode Styles */
body.accessibility {
    background-color: #000 !important;
    color: #FFF !important;
    font-size: 1.25rem !important;
}

body.accessibility a {
    color: #FFFF00 !important;
}

body.accessibility * {
    background-color: transparent !important;
    color: inherit !important;
    border-color: #FFF !important;
    box-shadow: none !important;
}

body.accessibility .logo, 
body.accessibility .hero, 
body.accessibility .card h3,
body.accessibility nav ul li a,
body.accessibility .accessibility-btn {
    color: #FFFF00 !important; /* Yellow for better visibility */
    border: 2px solid #FFF !important;
}

body.accessibility .hero h1,
body.accessibility .card h3 {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
}

body.accessibility .accessibility-btn {
    background-color: #FFFF00 !important;
    color: #000 !important;
}

body.accessibility .dropdown-content {
    background-color: #000 !important;
    border: 2px solid #FFF !important;
}

body.accessibility .modal-content {
    background-color: #000 !important;
    border: 3px solid #FFFF00 !important;
}

/* Header & Navigation */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-gray);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-weight: 800;
    font-size: 24px;
    color: var(--primary-blue);
    text-decoration: none;
    letter-spacing: -0.5px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-blue);
}

/* Dropdown Menu */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 280px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px 0;
    z-index: 1;
    margin-top: 10px;
}

.nav-item-has-dropdown.active .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 12px 20px;
    display: block;
    font-size: 14px;
    font-weight: 400;
}

.dropdown-content a:hover {
    background-color: #F8FAFC;
    color: var(--primary-blue);
}

.nav-item-has-dropdown > a::after {
    content: ' ▼';
    font-size: 10px;
    vertical-align: middle;
}

/* Modal for Preview */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--white);
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    height: 90%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-gray);
}

.close-modal {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #636E72;
}

.close-modal:hover {
    color: var(--text-dark);
}

/* Contacts Table */
.contacts-section {
    margin-top: 60px;
}

.contacts-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contacts-table th, .contacts-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-gray);
}

.contacts-table th {
    background-color: var(--primary-blue);
    color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

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

.contacts-table tr:hover {
    background-color: #F8FAFC;
}

.map-container {
    width: 100%;
    height: 450px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-gray);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

#preview-frame {
    width: 100%;
    flex-grow: 1;
    border: none;
    border-radius: 6px;
}

body.accessibility .contacts-table th,
body.accessibility .contacts-table td {
    border: 2px solid #FFF !important;
    background-color: #000 !important;
    color: #FFF !important;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0072CE 100%);
    color: var(--white);
    padding: 100px 60px;
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 85, 164, 0.15);
    position: relative;
    overflow: hidden;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-bg {
    background: linear-gradient(135deg, rgba(0,85,164,0.85) 0%, rgba(0,114,206,0.85) 100%), url('Files/1529297555166824182.png') center/cover no-repeat;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 24px;
    line-height: 1.3;
}

.hero p {
    font-size: 20px;
    line-height: 1.5;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-gray);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card h3 {
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.card p {
    font-size: 14px;
    color: #636E72;
}

footer {
    background: var(--white);
    padding: 40px 0;
    border-top: 1px solid var(--border-gray);
    margin-top: 80px;
    text-align: center;
    color: #636E72;
    font-size: 14px;
}

/* Tab Content Styles */
.tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-content .card {
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.tab-content .card p,
.tab-content .card li {
    font-size: 16px;
    line-height: 1.8;
}

/* Accessibility Mode */
.accessibility-btn {
    background: none;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.accessibility-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
}
