/* =========================
   BASE RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: tahoma, sans-serif;
}

body {
    background: #f4f6fb;
    direction: rtl;
    color: #222;
}

/* =========================
   CONTAINER
========================= */

.container {
    width: 92%;
    margin: auto;
}

/* =========================
   HEADER
========================= */

.main-header {
    background: #0a2a66;
    color: #fff;
    padding: 15px 0;
}

.main-header ul {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    align-items: center;
    gap: 18px;
    list-style: none;
    padding: 0 20px;
}

.main-header a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

/* =========================
   HERO
========================= */

.hero {
    text-align: center;
    padding: 35px 10px;
    background: #fff;
    margin-top: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.hero h1, .hero h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

/* =========================
   SERVICES GRID
========================= */

.services {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 20px;
}

/* کارت‌ها */
.card {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: 0.2s;
}

.card:hover {
    transform: translateY(-3px);
}

.card h3 {
    font-size: 14px;
    margin-bottom: 10px;
}

.card a {
    display: inline-block;
    padding: 7px 12px;
    background: #0a2a66;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
}

/* =========================
   FORM
========================= */

form {
    width: 100% !important;
    max-width: 850px;
    margin: 20px auto !important;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0,0,0,0.08);
}

form input,
form textarea,
form select {
    width: 100% !important;
    display: block;
    margin-top: 6px;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
}

form textarea {
    height: 130px;
    resize: none;
}

form label {
    display: block;
    margin-top: 12px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
}

form input[type="radio"],
form input[type="checkbox"] {
    width: auto !important;
    display: inline-block;
    margin-left: 6px;
}

form button {
    width: 100%;
    padding: 10px;
    background: #0a2a66;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    font-size: 14px;
}

/* =========================
   FOOTER
========================= */

.footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    background: #0a2a66;
    color: #fff;
    border-radius: 10px 10px 0 0;
}

/* =========================
   ?? VOICE RECORD UI (FULL FIX)
========================= */

.voice-box{
    border:1px solid #e6e6e6;
    background:#fafafa;
    padding:15px;
    border-radius:10px;
    margin-top:10px;
    transition:0.3s;
}

/* وضعيت ضبط */
.voice-status{
    font-size:13px;
    margin-bottom:6px;
    color:#444;
}

/* تايمر */
.voice-timer{
    font-size:18px;
    font-weight:bold;
    color:#0a2a66;
    margin-bottom:10px;
}

/* دکمه‌ها */
.btn-record-start,
.btn-record-stop{
    padding:10px 14px;
    border:none;
    border-radius:8px;
    cursor:pointer;
    font-size:13px;
    transition:0.3s;
    margin-left:6px;
}

/* شروع */
.btn-record-start{
    background:#0a2a66;
    color:#fff;
}

/* توقف */
.btn-record-stop{
    background:#999;
    color:#fff;
}

/* =========================
   ?? حالت ضبط فعال (مهم‌ترين بخش)
========================= */

.voice-box.recording-active{
    border:1px solid #d32f2f;
    background:#fff5f5;
}

/* دکمه شروع در حالت ضبط */
.voice-box.recording-active .btn-record-start{
    background:#d32f2f !important;
    animation:pulse 1s infinite;
}

/* دکمه توقف در حالت ضبط */
.voice-box.recording-active .btn-record-stop{
    background:#0a2a66 !important;
    color:#fff;
}

/* Pulse */
@keyframes pulse {
    0% { box-shadow:0 0 0 0 rgba(211,47,47,0.6); }
    70% { box-shadow:0 0 0 14px rgba(211,47,47,0); }
    100% { box-shadow:0 0 0 0 rgba(211,47,47,0); }
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 992px) {
    .services {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .services {
        grid-template-columns: repeat(1, 1fr);
    }
}