/*!
 * Taxory - pages.css
 * 404 and the legal pages (privacy policy, terms and conditions).
 *
 * The privacy and terms pages previously carried two near-identical copies of
 * the same ~230 lines under .privacy-* and .terms-* prefixes. They share one
 * .legal-* set here.
 */

/* ==========================================================================
   404
   ========================================================================== */

.error-404 {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--tx-surface) 0%, var(--tx-border) 100%);
    min-height: 70vh;
    text-align: center;
    display: flex;
    align-items: center;
}

.error-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.error-code {
    font-size: 8rem;
    font-weight: var(--tx-bold);
    color: var(--tx-navy);
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(31, 43, 107, .2);
    animation: tx-float 3s ease-in-out infinite;
}

.error-title {
    font-size: 2.5rem;
    font-weight: var(--tx-bold);
    color: var(--tx-navy);
    margin-bottom: 20px;
}

.error-description {
    font-size: 1.2rem;
    color: var(--tx-gray);
    margin-bottom: 40px;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.error-btn {
    display: inline-flex;
    align-items: center;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: var(--tx-semibold);
    text-decoration: none;
    transition: all var(--tx-transition);
    box-shadow: var(--tx-shadow-md);
}

.error-btn-primary {
    background: linear-gradient(135deg, var(--tx-green), var(--tx-navy));
    color: var(--tx-white);
}

.error-btn-primary:hover,
.error-btn-primary:focus {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(54, 179, 126, .4);
    color: var(--tx-white);
}

.error-btn-secondary {
    background: var(--tx-white);
    color: var(--tx-navy);
    border: 2px solid var(--tx-navy);
}

.error-btn-secondary:hover,
.error-btn-secondary:focus {
    background: var(--tx-navy);
    color: var(--tx-white);
    transform: translateY(-3px);
}

.error-btn i {
    margin-left: 10px;
    font-size: 1.1rem;
}

@keyframes tx-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-20px); }
}

@media (max-width: 768px) {
    .error-404 { padding: 60px 0; }
    .error-code { font-size: 6rem; }
    .error-title { font-size: 2rem; }

    .error-actions {
        flex-direction: column;
        align-items: center;
    }

    .error-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* ==========================================================================
   Legal pages
   ========================================================================== */

.legal-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--tx-surface) 0%, var(--tx-border) 100%);
    /* Keeps the footer at the bottom of the window if the client ever trims
       these pages down to a few paragraphs. Carried over from the original. */
    min-height: 100vh;
}

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.legal-header {
    text-align: center;
    margin-bottom: 60px;
}

.legal-title {
    font-size: 3rem;
    font-weight: var(--tx-bold);
    color: var(--tx-navy);
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(31, 43, 107, .1);
}

.legal-subtitle {
    font-size: 1.2rem;
    color: var(--tx-gray);
    margin-bottom: 30px;
}

.last-updated {
    font-size: .9rem;
    color: var(--tx-green-dark);
    background: rgba(54, 179, 126, .1);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.legal-content {
    background: var(--tx-white);
    border-radius: var(--tx-radius-lg);
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .1);
    border: 1px solid rgba(54, 179, 126, .1);
}

.legal-section-title {
    font-size: 1.8rem;
    font-weight: var(--tx-bold);
    color: var(--tx-navy);
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--tx-green);
    position: relative;
}

.legal-content > .legal-section-title:first-child {
    margin-top: 0;
}

.legal-section-title::before {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--tx-navy), var(--tx-green));
    border-radius: 2px;
}

.legal-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--tx-body);
    margin-bottom: 20px;
    text-align: justify;
}

.legal-list {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--tx-body);
    margin: 20px 0;
    padding-right: 20px;
    list-style: none;
}

.legal-list li {
    margin-bottom: 10px;
    position: relative;
}

.legal-list li::before {
    content: '\2022';
    color: var(--tx-green);
    font-weight: bold;
    position: absolute;
    right: -15px;
}

.highlight-box {
    background: linear-gradient(135deg, rgba(54, 179, 126, .1), rgba(31, 43, 107, .05));
    border: 2px solid rgba(54, 179, 126, .2);
    border-radius: var(--tx-radius);
    padding: 25px;
    margin: 30px 0;
    position: relative;
    overflow: hidden;
}

.highlight-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--tx-navy), var(--tx-green));
}

.highlight-text {
    font-size: 1.1rem;
    font-weight: var(--tx-semibold);
    color: var(--tx-navy);
    margin: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: var(--tx-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--tx-shadow-md);
}

.data-table th {
    background: linear-gradient(135deg, var(--tx-navy), var(--tx-green));
    color: var(--tx-white);
    padding: 15px;
    text-align: right;
    font-weight: var(--tx-bold);
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--tx-border);
    color: var(--tx-body);
    text-align: right;
}

.data-table tr:hover {
    background: rgba(54, 179, 126, .05);
}

/* Wide tables scroll inside their own box rather than pushing the page sideways. */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.legal-contact {
    background: var(--tx-surface);
    border-radius: var(--tx-radius);
    padding: 30px;
    margin: 40px 0;
    text-align: center;
}

.legal-contact h2 {
    font-size: 1.5rem;
    font-weight: var(--tx-bold);
    color: var(--tx-navy);
    margin-bottom: 20px;
}

.legal-contact-details {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.legal-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--tx-body);
    text-decoration: none;
    transition: color var(--tx-transition);
}

.legal-contact-item:hover,
.legal-contact-item:focus {
    color: var(--tx-green-dark);
}

.legal-contact-item i {
    color: var(--tx-green);
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .legal-section { padding: 60px 0; }
    .legal-title { font-size: 2.2rem; }
    .legal-content { padding: 30px 20px; }
    .legal-section-title { font-size: 1.5rem; }

    /* Justified text opens up ugly word gaps in a narrow column, so the
       original dropped back to plain right alignment on phones. */
    .legal-text { text-align: right; }

    .legal-contact-details {
        flex-direction: column;
        gap: 20px;
    }

    .data-table {
        font-size: .9rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px;
    }
}

/* ==========================================================================
   Generic post / page content (index, single, archive, search, page)
   ========================================================================== */

.tx-content-section {
    padding: 60px 0 80px;
}

.tx-page-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--tx-border);
}

.tx-page-title {
    font-size: 2.5rem;
    font-weight: var(--tx-bold);
    color: var(--tx-navy);
    margin: 0;
}

.tx-entry {
    background: var(--tx-white);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--tx-shadow-sm);
}

/* Editor-authored content only.
 *
 * The marketing copy elsewhere is hand-written Arabic, but posts and pages are
 * whatever the client types, and a Latin sentence inside an RTL container gets
 * its punctuation pushed to the wrong end -- "Hello world!" renders as
 * "!Hello world". `plaintext` resolves direction per block from its own first
 * strong character, so Arabic paragraphs stay RTL and English ones read
 * correctly, in the same post. */
.tx-entry-title,
.tx-entry-content p,
.tx-entry-content li,
.tx-entry-content h2,
.tx-entry-content h3,
.tx-entry-content h4,
.tx-entry-content blockquote {
    unicode-bidi: plaintext;
}

.tx-entry-title {
    font-size: 1.6rem;
    font-weight: var(--tx-bold);
    color: var(--tx-navy);
    margin-bottom: 12px;
}

.tx-entry-title a {
    color: inherit;
    text-decoration: none;
}

.tx-entry-title a:hover,
.tx-entry-title a:focus {
    color: var(--tx-green-dark);
}

.tx-entry-meta {
    font-size: .9rem;
    color: var(--tx-gray);
    margin-bottom: 16px;
}

.tx-entry-content {
    line-height: 1.8;
    color: var(--tx-body);
}

.tx-entry-content h2,
.tx-entry-content h3,
.tx-entry-content h4 {
    color: var(--tx-navy);
    font-weight: var(--tx-bold);
    margin: 1.5em 0 .6em;
}

.tx-entry-content a {
    color: var(--tx-green-dark);
}

.tx-entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--tx-radius);
}

.tx-entry-thumb {
    margin-bottom: 20px;
}

.tx-entry-thumb img {
    width: 100%;
    height: auto;
    border-radius: var(--tx-radius);
}

.tx-pagination {
    margin-top: 40px;
}

.tx-pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 4px;
    border-radius: 8px;
    background: var(--tx-white);
    border: 1px solid var(--tx-border);
    color: var(--tx-navy);
    text-decoration: none;
}

.tx-pagination .page-numbers.current,
.tx-pagination .page-numbers:hover {
    background: var(--tx-green);
    border-color: var(--tx-green);
    color: var(--tx-white);
}

.tx-search-form {
    display: flex;
    gap: 10px;
    max-width: 480px;
    margin-bottom: 30px;
}

.tx-search-form input[type="search"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--tx-border);
    border-radius: 10px;
    font-family: inherit;
}

.tx-search-form button {
    background: var(--tx-green);
    color: var(--tx-white);
    border: 0;
    border-radius: 10px;
    padding: 12px 22px;
    font-weight: var(--tx-semibold);
    cursor: pointer;
}

.tx-search-form button:hover,
.tx-search-form button:focus {
    background: var(--tx-green-dark);
}

@media (max-width: 768px) {
    .tx-page-title { font-size: 1.9rem; }
    .tx-entry { padding: 22px 18px; }
}
