html {
    scroll-behavior: smooth;
}

:root {
    --primary: #2d3a4a;
    --accent: #f9b233;
    --bg: #f4f6fa;
    --text: #222;
    --white: #fff;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --radius: 18px;
    --transition: 0.3s cubic-bezier(.4,0,.2,1);
}
[data-theme="dark"] {
    --primary: #181f27;
    --accent: #f9b233;
    --bg: #23272f;
    --text: #f4f6fa;
    --white: #23272f;
    --shadow: 0 4px 24px rgba(0,0,0,0.25);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
}
body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.7;
    transition: background var(--transition), color var(--transition);
}
nav {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 2.5vw;
    min-height: 80px;
    transition: background var(--transition);
}
.nav-overlay.active{
    z-index: 1!important;
}
.logo img {
    height: 7vh;
    min-height: 48px;
    max-height: 64px;
    width: auto;
    display: block;
    transition: height 0.3s;
    margin-bottom: 0;
}
@media (max-width: 768px) {
    .logo img {
        min-height: 56px;
        max-height: 72px;
    }
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}
.nav-links li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    transition: color var(--transition);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
}
.nav-links li a:hover {
    background: var(--accent);
    color: var(--primary);
}
.hamburger {
    display: none;
    font-size: 2.2rem;
    color: var(--white);
    cursor: pointer;
    margin-left: 1.5rem;
    background: none;
    border: none;
}
.theme-toggle, .lang-toggle {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 1rem;
    transition: color var(--transition);
}
.theme-toggle:hover, .lang-toggle:hover {
    color: var(--accent);
}
.hero {
    width: 100%;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(120deg, var(--primary) 60%, var(--accent) 100%);
    color: var(--white);
    text-align: center;
    padding: 7rem 2rem 3rem 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: background var(--transition);
}
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.2rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 16px rgba(0,0,0,0.12);
}
.hero p {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.95;
}
.section {
    scroll-margin-top: 90px;
    padding: 4.5rem 2rem 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.section h2 {
    font-size: 2.3rem;
    color: var(--primary);
    margin-bottom: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
}
.section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 1rem auto 0 auto;
    border-radius: 2px;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 2.2rem;
    margin-top: 2rem;
}
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform var(--transition), box-shadow var(--transition);
    min-height: 260px;
}
.card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
}
.card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}
.card h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 0.7rem;
    font-weight: 600;
}
.card p {
    color: #555;
    font-size: 1rem;
    opacity: 0.92;
}
.btn {
    display: inline-block;
    padding: 0.8rem 2.1rem;
    background: var(--accent);
    color: var(--primary);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 1.2rem;
    transition: background var(--transition), color var(--transition), transform var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.btn:hover {
    background: var(--primary);
    color: var(--accent);
    transform: scale(1.06);
}
footer {
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 2.5rem 1rem 1.2rem 1rem;
    margin-top: 3rem;
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: var(--shadow);
    font-size: 1.05rem;
}
footer a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}
footer a:hover {
    color: var(--white);
    text-decoration: underline;
}
/* Formi */
.form-container {
    max-width: 420px;
    margin: 2.5rem auto;
    background: var(--white);
    padding: 2.2rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.form-container input,
.form-container textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    margin: 0.7rem 0;
    border: 1px solid #dbe2ea;
    border-radius: 7px;
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    transition: border-color var(--transition);
}
.form-container input:focus,
.form-container textarea:focus {
    border-color: var(--accent);
    outline: none;
}
.form-container textarea {
    resize: vertical;
    min-height: 90px;
}
.error {
    color: #d9534f;
    font-size: 1rem;
    margin-top: 1rem;
    text-align: center;
}
.success {
    color: #5cb85c;
    font-size: 1rem;
    margin-top: 1rem;
    text-align: center;
}
[data-theme="dark"] .form-container {
    background: var(--primary);
}
[data-theme="dark"] .card {
    background: #23272f;
    color: var(--text);
}
[data-theme="dark"] .form-container input,
[data-theme="dark"] .form-container textarea {
    background: #23272f;
    color: var(--text);
    border: 1px solid #444;
}
[data-theme="dark"] .btn {
    background: var(--accent);
    color: var(--primary);
}
[data-theme="dark"] .btn:hover {
    background: var(--primary);
    color: var(--accent);
}
[data-theme="dark"] .error {
    color: #ff6b6b;
}
[data-theme="dark"] .success {
    color: #66cc66;
}
[data-theme="dark"] .card,
[data-theme="dark"] .card h3,
[data-theme="dark"] .card p,
[data-theme="dark"] .card a {
    color: var(--text) !important;
}
[data-theme="dark"] .section h2,
[data-theme="dark"] .section,
[data-theme="dark"] .hero h1,
[data-theme="dark"] .hero p {
    color: var(--text) !important;
}
/* Responsive */
@media (max-width: 1024px) {
    .section {
        padding: 3rem 1rem 2rem 1rem;
    }
    .card-grid {
        gap: 1.2rem;
    }
}
@media (max-width: 768px) {
    nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        min-height: 72px;
        padding: 0.5rem 1rem;
    }
    .logo img {
        height: 56px;
    }
    .theme-toggle, .hamburger {
        margin-left: 1.2rem;
    }
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 1.2rem;
        margin-left: auto;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100vw;
        width: 70vw;
        height: 100vh;
        background: var(--primary);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 2rem;
        padding: 2.5rem 2rem 2rem 2rem;
        box-shadow: -2px 0 12px rgba(0,0,0,0.18);
        transition: right 0.3s cubic-bezier(.4,0,.2,1);
        z-index: 1200;
    }
    .nav-links.active {
        right: 0;
    }
    .hamburger {
        display: block;
    }
    .hero {
        padding: 6rem 1rem 2rem 1rem;
        min-height: 45vh;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .section {
        scroll-margin-top: 72px;
    }
    .section h2 {
        font-size: 1.3rem;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    .form-container {
        max-width: 100%;
        padding: 1.2rem 0.7rem;
    }
    .nav-close {
        display: block;
        width: 100%;
        text-align: right;
        margin-bottom: 1.5rem;
    }
    .nav-close button {
        background: none;
        border: none;
        color: var(--white);
        font-size: 2rem;
        cursor: pointer;
        padding: 0.5rem 0.5rem 0.5rem 0;
        transition: color var(--transition);
    }
    .nav-close button:hover {
        color: var(--accent);
    }
    .nav-links {
        padding-top: 0 !important;
    }
    .nav-links.active {
        padding-top: 2.5rem !important;
    }
}
@media (min-width: 769px) {
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 1.2rem;
    }
}
[data-theme="dark"] .nav-links {
    padding-top: 0 !important;
}
@media (min-width: 769px) {
    .nav-close {
        display: none !important;
    }
}
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 34, 40, 0.55);
    z-index: 1100;
    transition: opacity 0.3s;
}
.nav-overlay.active {
    display: block;
}
@media (max-width: 480px) {
    nav {
        min-height: 48px;
        padding: 0.5rem 0.5rem;
    }
    .logo img {
        height: 24px;
    }
    .hero {
        padding: 4.5rem 0.5rem 1.2rem 0.5rem;
        min-height: 30vh;
    }
    .hero h1 {
        font-size: 1.1rem;
    }
    .section {
        padding: 2rem 0.5rem 1rem 0.5rem;
    }
}
/* Language & floating button (пример) */
.floating-lang-button {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: var(--accent);
    color: var(--white);
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.13);
    z-index: 2000;
    transition: background var(--transition);
}
.floating-lang-button:hover {
    background: var(--primary);
}
.floating-lang-popup {
    position: fixed;
    bottom: 70px;
    right: 1rem;
    background: var(--primary);
    border: 1px solid var(--accent);
    border-radius: 8px;
    display: none;
    z-index: 2001;
}
.floating-lang-popup ul {
    list-style: none;
    margin: 0;
    padding: 0.5rem;
}
.floating-lang-popup li {
    padding: 0.5rem 1rem;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background var(--transition);
}
.floating-lang-popup li:hover {
    background: var(--accent);
    color: var(--primary);
}
.floating-lang-popup .flag-icon {
    width: 20px;
    height: 15px;
    margin-right: 5px;
}
[data-theme="dark"] nav,
[data-theme="dark"] .nav-links,
[data-theme="dark"] .nav-links li a,
[data-theme="dark"] .nav-links li a:visited,
[data-theme="dark"] .nav-links li a:active,
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .lang-toggle,
[data-theme="dark"] .hamburger {
    background: var(--primary) !important;
    color: var(--text) !important;
}
[data-theme="dark"] .nav-links li a:hover {
    background: var(--accent) !important;
    color: var(--primary) !important;
}
[data-theme="dark"] .logo img {
    filter: none !important;
    margin-bottom: 0 !important;
}
[data-theme="dark"] .nav-links {
    padding-top: 0 !important;
}
[data-theme="dark"] .floating-lang-popup li {
    color: #fff !important;
}
[data-theme="dark"] footer,
[data-theme="dark"] footer a {
    background: var(--primary) !important;
    color: var(--text) !important;
}
[data-theme="dark"] footer a:hover {
    color: var(--accent) !important;
}
[data-theme="dark"] .nav-links {
    background: #181f27 !important;
}
[data-theme="dark"] .nav-links li a,
[data-theme="dark"] .nav-links li a:visited,
[data-theme="dark"] .nav-links li a:active {
    color: #fff !important;
}
[data-theme="dark"] .nav-close button {
    color: var(--accent) !important;
}
[data-theme="dark"] .nav-close button:hover {
    color: #fff !important;
}
@media (max-width: 768px) {
    .nav-overlay {
        z-index: 1100;
        pointer-events: none;
    }
    .nav-overlay.active {
        pointer-events: auto;
    }
    .nav-links {
        z-index: 1200;
    }
}
.nav-links li a.active {
    border-bottom: 2.5px solid var(--accent);
    color: var(--accent) !important;
    font-weight: 700;
    background: transparent !important;
}