/* ─────────────────────────────────────────────
   Word Page Styles - consistent with homepage
   Primary: #3498db | Text: #333 | Border: #ced6e0
   Divider: #f1f2f6 | Font: Open Sans 16px
   ───────────────────────────────────────────── */

/* ── Hide homepage background on word pages ── */

body.word-page {
    background-image: none;
    background-color: #fff;
}

/* ── Header menu (shared) ── */

.header_menu {
    display: flex;
    align-items: center;
}

.menu_toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    cursor: pointer;
    text-decoration: none;
}

.menu_toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    transition: transform 0.3s, opacity 0.3s;
}

.menu_toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu_toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu_toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.header_nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border-radius: 4px;
    padding: 8px 0;
    z-index: 100;
    min-width: 180px;
}

.header_nav.open {
    display: block;
}

.header_nav a {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-size: 15px;
    font-family: "Open Sans", sans-serif;
}

.header_nav a:hover {
    background: #f5f5f5;
    color: #3498db;
}

.header_wrap {
    position: relative;
}

/* ── Search bar on word page ── */

.word-search-bar {
    padding: 10px 0 5px;
    margin-bottom: 5px;
}

.word-search-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-selector {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.lang-option {
    cursor: pointer;
    margin-right: 0;
    margin-bottom: 0;
}

.lang-option input[type="radio"] {
    display: none;
}

.lang-option img {
    width: 40px;
    height: 24px;
    border: 2px solid transparent;
    border-radius: 2px;
    transition: border-color 0.2s;
}

.lang-option input[type="radio"]:checked + img {
    border-color: #3498db;
}

.word-search-form .inp_wrap {
    display: flex;
    flex: 1;
    min-width: 200px;
}

.word-search-form .inp_wrap input {
    height: 50px;
    border: 1px solid #ced6e0;
    border-radius: 2px;
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
}

.word-search-form .inp_wrap input[type="search"] {
    width: 100%;
    padding: 0 20px;
    color: #333;
    margin-right: 10px;
}

.word-search-form .inp_wrap input[type="search"]::placeholder {
    color: #999;
}

.word-search-form .inp_wrap input[type="submit"] {
    background-color: #3498db;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    text-transform: uppercase;
    min-width: 120px;
    max-width: 120px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.word-search-form .inp_wrap input[type="submit"]:hover {
    background-color: #2980b9;
}

/* ── Word title ── */

.word-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 5px 0 8px;
    font-family: "Open Sans", sans-serif;
}

.word-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: #999;
    margin-left: 8px;
}

/* ── Word form tabs ── */

.word-forms-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    margin-bottom: 18px;
    padding: 10px 0;
    border-bottom: 1px solid #3498db;
    font-size: 16px;
    font-weight: 600;
}

.word-form {
    padding: 4px 10px;
    color: #3498db;
    cursor: pointer;
    transition: color 0.2s;
}

.word-form:hover {
    color: #2980b9;
}

.word-form.active {
    color: #3498db;
}

.word-form-sep {
    color: #ccc;
    font-size: 14px;
    user-select: none;
}

/* ── Sentences ── */

.sentences-list {
    margin: 0;
}

.sentence {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    padding: 12px 0;
    margin: 0;
    border-bottom: 1px solid #f1f2f6;
}

.sentence:last-child {
    border-bottom: none;
}

.sentence strong {
    font-weight: 700;
}

.sentence-divider {
    display: none;
}

.sentence-count {
    font-size: 14px;
    color: #666;
    padding: 12px 0;
    margin: 0;
}

/* ── No results ── */

.no-results {
    padding: 40px 0;
    text-align: center;
    color: #666;
    font-size: 16px;
}

.no-results strong {
    color: #333;
}

/* ── Meaning section ── */

.meaning-section {
    margin: 20px 0 10px;
    padding: 18px 0;
    border-top: 1px solid #3498db;
}

.meaning-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-family: "Open Sans", sans-serif;
}

.meaning-section p {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ── Synonyms section ── */

.synonyms-section {
    margin: 10px 0 20px;
    padding: 18px 0;
    border-top: 1px solid #3498db;
}

.synonyms-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-family: "Open Sans", sans-serif;
}

.synonyms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.synonym-link {
    display: inline-block;
    padding: 4px 12px;
    color: #3498db;
    font-size: 15px;
    transition: color 0.2s;
}

.synonym-link:hover {
    color: #2980b9;
}

/* ── Translation section (EN pages) ── */

.translation-section {
    margin: 10px 0 20px;
    padding: 18px 0;
    border-top: 1px solid #3498db;
}

.translation-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-family: "Open Sans", sans-serif;
}

/* ── Social sharing ── */

.social-share {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 0;
    margin-top: 10px;
    border-top: 1px solid #f1f2f6;
}

.share-label {
    font-size: 14px;
    color: #666;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    transition: opacity 0.2s;
}

.share-btn:hover {
    opacity: 0.8;
    color: #fff;
}

.share-fb { background: #1877F2; }
.share-tw { background: #1DA1F2; }
.share-wa { background: #25D366; }

/* ── Back to top ── */

.back-to-top {
    margin-left: 15px;
}

/* ── Ad containers ── */

.ad-container {
    overflow: hidden;
}

.ad-inline {
    border-top: 1px solid #f1f2f6;
    border-bottom: 1px solid #f1f2f6;
}

/* ── Responsive ── */

@media (max-width: 767px) {
    .word-title {
        font-size: 20px;
    }

    .word-subtitle {
        display: block;
        margin-left: 0;
        margin-top: 2px;
        font-size: 14px;
    }

    .word-search-form {
        flex-wrap: wrap;
    }

    .word-search-form .inp_wrap {
        width: 100%;
        min-width: unset;
    }

    .word-forms-tabs {
        font-size: 14px;
    }

    .word-form {
        padding: 4px 6px;
    }
}

@media (max-width: 480px) {
    .word-search-form .inp_wrap input[type="submit"] {
        min-width: 80px;
        max-width: 80px;
        font-size: 14px;
    }
}
