html { height: 100%; }
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}
#callBtn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}
#callBtn:hover { background: #218838; transform: scale(1.05); }
#callBtn:active { transform: scale(0.95); }

#callStatus {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 10px;
    transition: background 0.3s ease;
    flex-shrink: 0;
}
.status-offline { background: #dc3545; }
.status-connecting { background: #ffc107; }
.status-ready { background: #28a745; }
.status-calling { background: #ffc107; }
.status-talk { background: #28a745; }
.status-error { background: #dc3545; }
.logo { font-size: 1.5em; font-weight: 700; }
nav {
    display: flex;
    align-items: center;
}
nav a {
    margin: 0 15px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s ease;
}

.burger {
    display: none;
    font-size: 1.5em;
    background: none;
    border: none;
    cursor: pointer;
    color: #007BFF;
}
.nav-mobile {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}
.nav-mobile a {
    padding: 15px;
    margin: 0;
    border-bottom: 1px solid #eee;
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile.active { display: flex; }

.hero { text-align: center; padding: 100px 10%; }
.hero h1 { font-size: 2.5em; margin-bottom: 10px; font-weight: 700; color: #333; }
.hero p { font-size: 1.2em; margin-bottom: 20px; line-height: 1.6; }
.cta {
    display: inline-block;
    padding: 10px 20px;
    background: black;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.cta:hover { transform: scale(1.05); }

.services {
    display: grid;
    grid-template-columns: repeat(4, 340px);
    gap: 20px;
    padding: 50px 10%;
    justify-content: center;
    max-width: 1440px;
    margin: 0 auto;
}
.service-card {
    position: relative;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    min-height: 220px;
    height: auto;
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.service-card i {
    font-size: 2em;
    color: #007BFF;
    margin-bottom: 0;
}
.service-card h3 {
    margin: 8px 0 6px;
    color: #000;
    font-size: 19px;
    font-weight: 500;
}
.service-card p {
    margin: 0 0 12px;
    color: #666;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.3;
    flex-shrink: 0;
}
.service-card audio {
    width: 100%;
    height: 40px;
    margin-top: auto;
}

main { flex: 1 0 auto; }

footer {
    text-align: center;
    padding: 20px;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}
footer a { color: #333; text-decoration: none; margin: 0 5px; font-weight: bold; }
footer a:hover { text-decoration: underline; }

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    text-align: center;
    width: 300px;
    z-index: 1000;
}
.popup input {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.popup button {
    background: black;
    color: white;
    border: none;
    padding: 10px;
    width: 100%;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.popup textarea {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: vertical;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

#messageContainer {
    padding: 20px;
    text-align: center;
}
#messageContainer.success {
    color: #28a745;
}
#messageContainer.error {
    color: #dc3545;
}
#messageContainer button {
    background: black;
    color: white;
    border: none;
    padding: 10px;
    width: 100%;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.3s ease;
}
#messageContainer button:hover {
    background: #333;
}

/* ───────── Адаптивность ───────── */

@media (max-width: 1200px) {
    .services {
        grid-template-columns: repeat(2, 340px);
    }
}

@media (max-width: 768px) {
    nav { display: none; }
    .burger { display: block; }
    header { padding: 15px 5%; }
    .logo { font-size: 1.2em; }
    .hero h1 { font-size: 1.8em; }
    .hero { padding: 50px 5%; }
    .services {
        grid-template-columns: 1fr;
        padding: 40px 5%;
    }
    .service-card {
        height: auto;
        padding: 20px;
        max-width: 400px;
        margin: 0 auto;
    }
    .service-card p {
        margin-bottom: 12px;
    }
    .popup { width: 90%; max-width: 300px; }
}
