/* =========================================================
   O‘ZBEKCHA SO‘ZLASHAMIZ
   A1 LESSON PAGE — MILLIY VA ZAMONAVIY DIZAYN
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f3ead7;
    color: #23483d;
    line-height: 1.7;
}


/* =========================================================
   HEADER
========================================================= */

header {
    position: relative;

    padding: 32px 7%;

    background: #285b49;

    color: white;

    text-align: center;

    border-bottom: 4px solid #c39a2b;

    overflow: hidden;
}

header::before {
    content: "";

    position: absolute;

    left: -30px;
    top: -40px;

    width: 150px;
    height: 150px;

    border: 2px solid rgba(211, 173, 68, 0.35);

    transform: rotate(45deg);
}

header::after {
    content: "";

    position: absolute;

    right: -40px;
    bottom: -50px;

    width: 160px;
    height: 160px;

    border: 2px solid rgba(211, 173, 68, 0.30);

    transform: rotate(45deg);
}

header h1 {
    position: relative;
    z-index: 2;

    font-size: 28px;

    font-weight: 900;

    letter-spacing: 1px;
}

header p {
    position: relative;
    z-index: 2;

    margin-top: 4px;

    color: #e7c96d;

    font-size: 14px;

    font-weight: 700;

    letter-spacing: 2px;
}


/* =========================================================
   ASOSIY KONTEYNER
========================================================= */

main {
    width: 100%;

    max-width: 1100px;

    margin: 0 auto;

    padding: 55px 25px 80px;
}


/* =========================================================
   LESSON HEADER
========================================================= */

.lesson-header {
    position: relative;

    text-align: center;

    padding: 55px 30px;

    margin-bottom: 45px;

    background: #f7f1e4;

    border: 1px solid rgba(86, 91, 66, 0.15);

    border-radius: 10px;

    overflow: hidden;

    box-shadow:
        0 12px 30px rgba(60, 65, 45, 0.08);
}

.lesson-header::before {
    content: "";

    position: absolute;

    left: -70px;
    top: -70px;

    width: 190px;
    height: 190px;

    background:
        linear-gradient(
            45deg,
            transparent 44%,
            rgba(40, 96, 77, 0.12) 45%,
            rgba(40, 96, 77, 0.12) 55%,
            transparent 56%
        ),
        linear-gradient(
            -45deg,
            transparent 44%,
            rgba(195, 154, 43, 0.16) 45%,
            rgba(195, 154, 43, 0.16) 55%,
            transparent 56%
        );

    background-size: 35px 35px;

    transform: rotate(8deg);
}

.lesson-header::after {
    content: "";

    position: absolute;

    right: -70px;
    bottom: -70px;

    width: 190px;
    height: 190px;

    background:
        linear-gradient(
            45deg,
            transparent 44%,
            rgba(40, 96, 77, 0.12) 45%,
            rgba(40, 96, 77, 0.12) 55%,
            transparent 56%
        ),
        linear-gradient(
            -45deg,
            transparent 44%,
            rgba(195, 154, 43, 0.16) 45%,
            rgba(195, 154, 43, 0.16) 55%,
            transparent 56%
        );

    background-size: 35px 35px;

    transform: rotate(8deg);
}

.lesson-header > * {
    position: relative;

    z-index: 2;
}

.lesson-header h2 {
    color: #a17c22;

    font-size: 14px;

    letter-spacing: 3px;

    margin-bottom: 10px;
}

.lesson-header h1 {
    color: #285b49;

    font-size: clamp(36px, 5vw, 55px);

    line-height: 1.1;

    font-weight: 900;

    margin-bottom: 12px;
}

.lesson-header p {
    color: #756d5c;

    font-size: 17px;

    font-weight: 600;
}


/* =========================================================
   LESSON SECTIONS
========================================================= */

.lesson-section {
    position: relative;

    margin-bottom: 35px;

    padding: 38px;

    background: #f7f1e4;

    border: 1px solid rgba(86, 91, 66, 0.14);

    border-radius: 9px;

    box-shadow:
        0 8px 25px rgba(60, 65, 45, 0.06);
}

.lesson-section > h2 {
    color: #285b49;

    font-size: 28px;

    margin-bottom: 22px;

    padding-bottom: 12px;

    border-bottom: 2px solid rgba(195, 154, 43, 0.35);
}

.lesson-section > h3 {
    color: #76572b;

    font-size: 18px;

    margin-bottom: 18px;
}


/* =========================================================
   DIALOGUE
========================================================= */

.dialogue {
    margin: 20px 0 30px;

    padding: 25px 28px;

    background: #eee4cf;

    border-left: 5px solid #28604d;

    border-radius: 6px;
}

.dialogue p {
    margin-bottom: 13px;

    color: #5e584b;

    font-size: 16px;
}

.dialogue p:last-child {
    margin-bottom: 0;
}

.dialogue strong {
    color: #285b49;
}


/* =========================================================
   VOCABULARY
========================================================= */

.vocabulary {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 15px;

    margin: 25px 0 30px;
}

.word-card {
    padding: 20px 15px;

    text-align: center;

    background: #e8d4aa;

    border: 1px solid rgba(130, 98, 38, 0.18);

    border-radius: 7px;

    transition: 0.25s ease;
}

.word-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 8px 20px rgba(70, 62, 40, 0.10);
}

.word-card span {
    display: block;

    color: #8a7447;

    font-size: 12px;

    margin-bottom: 5px;
}

.word-card strong {
    color: #285b49;

    font-size: 19px;
}


/* =========================================================
   ACTIVITY
========================================================= */

.activity {
    margin-top: 25px;

    padding: 25px;

    background: #e9dfca;

    border-radius: 7px;

    border: 1px solid rgba(86, 91, 66, 0.12);
}

.activity h3 {
    color: #285b49;

    font-size: 18px;

    margin-bottom: 10px;
}

.activity p {
    color: #706858;

    font-size: 15px;
}


/* =========================================================
   EXAMPLE BOX
========================================================= */

.example-box {
    margin-top: 18px;

    padding: 22px 25px;

    background: #f7f1e4;

    border-left: 4px solid #c39a2b;

    border-radius: 5px;
}

.example-box p {
    margin-bottom: 8px;

    color: #5f584b;
}

.example-box p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   AUDIO BUTTON
========================================================= */

.audio-btn {
    width: 40px;
    height: 40px;

    margin-left: 8px;

    border: none;

    border-radius: 50%;

    background: #28604d;

    color: white;

    font-size: 18px;

    cursor: pointer;

    transition: 0.25s ease;

    vertical-align: middle;
}

.audio-btn:hover {
    background: #1d4b3c;

    transform: scale(1.08);
}

.audio-btn:active {
    transform: scale(0.96);
}


/* =========================================================
   ALPHABET
========================================================= */

.alphabet-title {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 20px;

    margin: 25px 0;
}

.alphabet-title > div {
    padding: 18px;

    text-align: center;

    background: #e9dfca;

    border-radius: 6px;
}

.alphabet-title strong {
    color: #285b49;

    font-size: 16px;
}

.alphabet-title p {
    color: #756d5c;

    margin-top: 5px;
}

.alphabet {
    display: grid;

    grid-template-columns: repeat(6, 1fr);

    gap: 10px;

    margin-top: 20px;
}

.alphabet div {
    min-height: 60px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #eee4cf;

    border: 1px solid rgba(86, 91, 66, 0.15);

    border-radius: 6px;

    color: #285b49;

    font-size: 19px;

    font-weight: 800;

    transition: 0.2s ease;
}

.alphabet div:hover {
    background: #e8d4aa;

    transform: translateY(-2px);
}


/* =========================================================
   PRONOUNS
========================================================= */

.pronouns {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 25px;

    margin: 25px 0;
}

.pronouns > div {
    padding: 25px;

    background: #eee4cf;

    border-radius: 7px;

    border-top: 4px solid #28604d;
}

.pronouns > div:nth-child(2) {
    border-top-color: #c39a2b;
}

.pronouns h3 {
    color: #76572b;

    margin-bottom: 15px;

    font-size: 19px;
}

.pronouns p {
    padding: 7px 0;

    color: #285b49;

    border-bottom: 1px solid rgba(80, 90, 70, 0.10);
}


/* =========================================================
   QUIZ
========================================================= */

.quiz-question {
    margin: 20px 0;

    padding: 22px 25px;

    background: #eee4cf;

    border: 1px solid rgba(86, 91, 66, 0.13);

    border-radius: 7px;
}

.quiz-question h3 {
    color: #285b49;

    margin-bottom: 12px;
}

.quiz-question label {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    margin-right: 18px;

    color: #5e584b;

    font-weight: 600;

    cursor: pointer;
}

.quiz-question input {
    accent-color: #28604d;
}

.quiz-question button {
    display: block;

    margin-top: 15px;

    padding: 8px 16px;

    border: none;

    border-radius: 4px;

    background: #28604d;

    color: white;

    font-size: 13px;

    font-weight: 700;

    cursor: pointer;

    transition: 0.2s ease;
}

.quiz-question button:hover {
    background: #1d4b3c;
}

.answer-result {
    margin-top: 10px;

    font-weight: 700;
}


/* =========================================================
   GREETINGS
========================================================= */

.greetings {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 12px;

    margin: 25px 0;
}

.greetings div {
    padding: 15px 18px;

    background: #e8d4aa;

    border-radius: 6px;

    color: #285b49;

    font-weight: 600;

    border-left: 4px solid #c39a2b;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    padding: 30px 20px;

    text-align: center;

    background: #1f4035;

    color: #c8c8b8;

    border-top: 1px solid rgba(255,255,255,0.08);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 850px) {

    main {
        padding-left: 18px;
        padding-right: 18px;
    }

    .vocabulary {
        grid-template-columns: repeat(2, 1fr);
    }

    .alphabet {
        grid-template-columns: repeat(5, 1fr);
    }

}


/* =========================================================
   MOBIL
========================================================= */

@media (max-width: 600px) {

    header {
        padding: 25px 15px;
    }

    header h1 {
        font-size: 22px;
    }

    main {
        padding-top: 30px;
    }

    .lesson-header {
        padding: 40px 20px;
    }

    .lesson-header h1 {
        font-size: 34px;
    }

    .lesson-section {
        padding: 25px 18px;
    }

    .lesson-section > h2 {
        font-size: 23px;
    }

    .dialogue {
        padding: 20px;
    }

    .vocabulary {
        grid-template-columns: 1fr 1fr;
    }

    .alphabet-title {
        grid-template-columns: 1fr;
    }

    .alphabet {
        grid-template-columns: repeat(4, 1fr);
    }

    .pronouns {
        grid-template-columns: 1fr;
    }

    .greetings {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   KICHIK TELEFON
========================================================= */

@media (max-width: 400px) {

    .vocabulary {
        grid-template-columns: 1fr;
    }

    .alphabet {
        grid-template-columns: repeat(3, 1fr);
    }

    .alphabet div {
        min-height: 52px;

        font-size: 17px;
    }

    .quiz-question {
        padding: 18px;
    }

}
/* 3D mashqdagi javob katakchalari */
.missing-letter {
    width: 35px;
    height: 32px;
    padding: 2px;
    text-align: center;
    font-size: 16px;
    border: 1px solid #999;
    border-radius: 5px;
}
.audio-btn::after {
    content: none !important;
}
.audio-instruction {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 20px;
}

.audio-instruction span {
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.audio-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}
/* =========================
   AUDIO TUGMALARI
========================= */

.audio-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.audio-controls .audio-btn,
.audio-controls .pause-btn {
    width: 45px;
    height: 40px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
    transition: 0.2s;
}

.audio-controls .audio-btn:hover,
.audio-controls .pause-btn:hover {
    transform: scale(1.05);
}

.audio-controls {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 15px 0 25px 0;
}

/* =====================================================
   LUG‘AT JADVALI
===================================================== */

.vocabulary {
    margin: 40px auto;
    max-width: 850px;
}

.vocabulary h2 {
    text-align: center;
    margin-bottom: 20px;
}

.vocabulary-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.vocabulary-table th,
.vocabulary-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.vocabulary-table th {
    background: #173f35;
    color: white;
    font-size: 17px;
}

.vocabulary-table td {
    font-size: 16px;
}

.vocabulary-table tr:last-child td {
    border-bottom: none;
}

.vocabulary-table tr:hover {
    background: #f7f2e8;
}

/* Telefon uchun */
@media (max-width: 600px) {

    .vocabulary {
        width: 95%;
    }

    .vocabulary-table th,
    .vocabulary-table td {
        padding: 11px 10px;
        font-size: 14px;
    }
}

/* =====================================================
   LUG‘AT + O‘ZINGIZNI TANISHTIRISH
===================================================== */

.practice-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 70px;
    align-items: start;
    max-width: 1100px;
    margin: 60px auto 40px;
}


/* Lug‘at qismi */

.vocabulary-section {
    width: 100%;
}

.vocabulary-section h3 {
    margin-bottom: 18px;
}

.vocabulary {
    width: 100%;
    margin: 0;
}

.vocabulary-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.vocabulary-table th,
.vocabulary-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.vocabulary-table th {
    background: #173f35;
    color: white;
    font-size: 17px;
}

.vocabulary-table td {
    font-size: 16px;
}

.vocabulary-table tr:last-child td {
    border-bottom: none;
}

.vocabulary-table tbody tr:hover {
    background: #f7f2e8;
}


/* O‘zingizni tanishtirish qismi */

.speaking-section {
    width: 100%;
}

.speaking-section h3 {
    margin-bottom: 15px;
}

.speaking-section > p {
    margin-bottom: 18px;
}


/* Namuna */

.speaking-section .example-box {
    margin-bottom: 20px;
}


/* Telefon uchun */

@media (max-width: 800px) {

    .practice-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        width: 95%;
    }

}

/* Lug‘at va tanishtirish qismi orasidagi masofa */
.practice-layout {
    column-gap: 90px !important;
}

/* =====================================================
   6-MASHQ AUDIO TUGMALARI
===================================================== */

.exercise6-audio {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 15px auto 25px !important;
    gap: 8px !important;
    float: none !important;
}

.exercise6-audio .audio-btn,
.exercise6-audio .pause-btn {
    flex: 0 0 auto !important;
}