/*!
 * Taxory - front-page.css
 * Hero, about, services, why, FAQ and contact sections of the front page.
 */

/* ==========================================================================
   Hero
   ========================================================================== */

.hero-section {
    background: linear-gradient(135deg, var(--tx-navy) 0%, var(--tx-green) 100%);
    color: var(--tx-white);
    position: relative;
    overflow: hidden;

    /* Full viewport. svh is the height with the mobile browser chrome showing,
       which stops the hero overflowing on phones the way 100vh does; vh is the
       fallback for anything that does not know svh. */
    min-height: 100vh;
    min-height: 100svh;

    /* The header floats on top, so the content is centred in what is left
       rather than sitting under the bar. */
    display: flex;
    align-items: center;
    padding: calc(var(--tx-header-h) + 40px) 0 60px;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .3;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3Cpattern id='g' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='25' cy='25' r='1' fill='white' opacity='0.1'/%3E%3Ccircle cx='75' cy='75' r='1' fill='white' opacity='0.1'/%3E%3Ccircle cx='50' cy='10' r='0.5' fill='white' opacity='0.05'/%3E%3Ccircle cx='10' cy='60' r='0.5' fill='white' opacity='0.05'/%3E%3Ccircle cx='90' cy='40' r='0.5' fill='white' opacity='0.05'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23g)'/%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: var(--tx-bold);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: .95;
    line-height: 1.6;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: .9;
    line-height: 1.7;
}

.hero-visual {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-visual i {
    font-size: 15rem;
    opacity: .2;
}

.hero-buttons .btn {
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: var(--tx-semibold);
    border-radius: 50px;
    margin: 0 0 10px 10px;
    transition: all var(--tx-transition);
}

.btn-primary-custom {
    background: var(--tx-green);
    border: 2px solid var(--tx-green);
    color: var(--tx-white);
}

.btn-primary-custom:hover,
.btn-primary-custom:focus {
    background: var(--tx-green-dark);
    border-color: var(--tx-green-dark);
    color: var(--tx-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(54, 179, 126, .3);
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid var(--tx-white);
    color: var(--tx-white);
}

.btn-outline-custom:hover,
.btn-outline-custom:focus {
    background: var(--tx-white);
    color: var(--tx-navy);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .hero-section {
        padding: calc(var(--tx-header-h) + 24px) 0 48px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-visual i {
        font-size: 8rem;
    }
}

/* ==========================================================================
   About
   ========================================================================== */

.about-section {
    background: var(--tx-surface);
    padding: 80px 0;
}

.about-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--tx-body);
}

.about-features {
    margin-top: 3rem;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 20px;
    background: var(--tx-white);
    border-radius: var(--tx-radius);
    box-shadow: var(--tx-shadow-sm);
    transition: transform var(--tx-transition);
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--tx-green), var(--tx-green-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 20px;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 1.5rem;
    color: var(--tx-white);
}

.feature-text {
    flex: 1;
}

.feature-title {
    font-weight: var(--tx-bold);
    color: var(--tx-navy);
    margin-bottom: .5rem;
}

/* ==========================================================================
   Services
   ========================================================================== */

.services-section {
    background: var(--tx-white);
    padding: 80px 0;
}

.service-card {
    background: var(--tx-white);
    border-radius: var(--tx-radius-lg);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--tx-shadow-md);
    border: 1px solid #f0f0f0;
    height: 100%;
    transition: all var(--tx-transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--tx-shadow-lg);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--tx-navy), var(--tx-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.service-icon i {
    font-size: 2rem;
    color: var(--tx-white);
}

.service-title {
    font-size: 1.4rem;
    font-weight: var(--tx-bold);
    color: var(--tx-navy);
    margin-bottom: 15px;
}

.service-description {
    color: var(--tx-gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-list {
    text-align: right;
    list-style: none;
    padding: 0;
}

.service-list li {
    padding: 8px 25px 8px 0;
    color: var(--tx-body);
    position: relative;
}

.service-list li::before {
    content: '\2713';
    position: absolute;
    right: 0;
    color: var(--tx-green);
    font-weight: bold;
}

/* ==========================================================================
   Why choose us
   ========================================================================== */

.why-section {
    background: linear-gradient(135deg, var(--tx-surface) 0%, var(--tx-border) 100%);
    padding: 80px 0;
}

.why-card {
    background: var(--tx-white);
    border-radius: var(--tx-radius);
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .08);
    height: 100%;
    transition: all var(--tx-transition);
}

.why-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .12);
}

.why-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--tx-green), var(--tx-green-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.why-icon i {
    font-size: 1.8rem;
    color: var(--tx-white);
}

.why-title {
    font-size: 1.3rem;
    font-weight: var(--tx-bold);
    color: var(--tx-navy);
    margin-bottom: 15px;
}

.why-description {
    color: var(--tx-gray);
    line-height: 1.6;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-section {
    background: var(--tx-white);
    padding: 80px 0;
}

.faq-item {
    background: var(--tx-white);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.faq-question {
    margin: 0;
}

/* The control is a real <button> so it is focusable and operable by keyboard.
   It previously was an <h3 onclick>, which neither screen readers nor the
   keyboard could reach. */
.faq-toggle {
    display: block;
    width: 100%;
    background: var(--tx-surface);
    border: 0;
    padding: 25px 30px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: var(--tx-bold);
    color: var(--tx-navy);
    text-align: right;
    cursor: pointer;
    position: relative;
    transition: background var(--tx-transition);
}

.faq-toggle:hover {
    background: var(--tx-border);
}

.faq-toggle::after {
    content: '+';
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--tx-green);
    transition: transform var(--tx-transition);
}

.faq-toggle[aria-expanded="true"]::after {
    transform: translateY(-50%) rotate(45deg);
}

/* Grid 0fr -> 1fr animates to the content's real height, whatever that is.
   The original rule opened to max-height:200px, which silently cut off any
   answer taller than that. The content is faded alongside the height so text
   does not appear before there is room for it. */
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    background: var(--tx-white);
    transition: grid-template-rows var(--tx-transition);
}

.faq-answer > div {
    overflow: hidden;
    opacity: 0;
    transition: opacity var(--tx-transition);
}

.faq-answer.is-open {
    grid-template-rows: 1fr;
}

.faq-answer.is-open > div {
    opacity: 1;
}

.faq-answer p {
    margin: 0;
    padding: 25px 30px;
    color: var(--tx-body);
    line-height: 1.6;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-section {
    background: linear-gradient(135deg, var(--tx-navy) 0%, var(--tx-green) 100%);
    color: var(--tx-white);
    padding: 80px 0;
}

.contact-section .section-title {
    color: var(--tx-white);
}

.contact-section .section-subtitle {
    color: rgba(255, 255, 255, .75);
}

.contact-card,
.contact-form {
    background: rgba(255, 255, 255, .1);
    border-radius: var(--tx-radius-lg);
    padding: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .2);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, .1);
    border-radius: 10px;
}

/* Bootstrap 5.3 underlines every <a> by default. In the contact block the
   address, phone and hours read as a details list, not as prose links, and the
   underlines made it look cluttered. */
.contact-item a {
    color: var(--tx-green-light);
    text-decoration: none;
}

.contact-item a:hover,
.contact-item a:focus {
    color: var(--tx-white);
    text-decoration: none;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, .2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.2rem;
    color: var(--tx-white);
}

.contact-form .form-label {
    font-weight: var(--tx-medium);
    margin-bottom: .35rem;
}

.contact-form .required {
    color: var(--tx-green-light);
}

.form-control,
.form-select {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .3);
    color: var(--tx-white);
    border-radius: 10px;
    padding: 15px;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, .7);
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, .15);
    border-color: var(--tx-green);
    box-shadow: 0 0 0 .2rem rgba(54, 179, 126, .25);
    color: var(--tx-white);
}

/* The dropdown list is painted by the OS, not by the page - it needs an
   opaque background or the options render white-on-white. */
.form-select option {
    background: var(--tx-navy);
    color: var(--tx-white);
}

/* Invalid state, tuned for the dark background.
 *
 * :user-invalid, not :invalid. A required empty field is :invalid from the
 * moment it renders, so styling that flagged "الاسم الكامل" and
 * "البريد الإلكتروني" in red before the visitor had typed a character --
 * the fields with no placeholder, which :not(:placeholder-shown) failed to
 * exclude. :user-invalid only matches after the field has been edited or the
 * form submitted. Browsers without it simply show no error tint, which is a
 * safe way to degrade. */
.form-control:user-invalid,
.form-select:user-invalid {
    border-color: #ffb4a2;
}

.btn-submit {
    background: var(--tx-green);
    border: none;
    color: var(--tx-white);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: var(--tx-semibold);
    transition: all var(--tx-transition);
}

.btn-submit:hover,
.btn-submit:focus {
    background: var(--tx-green-dark);
    color: var(--tx-white);
    transform: translateY(-2px);
}

.btn-submit[disabled] {
    opacity: .6;
    cursor: progress;
    transform: none;
}

/* Honeypot. Hidden by clipping rather than display:none or visibility:hidden,
   because bots skip fields hidden those two ways -- the point is that they fill
   it in.
 *
 * NOT `left: -9999px`. This document is RTL, and in RTL a box pushed that far
 * past the inline-start edge extends the scrollable area instead of being
 * discarded: it made the page 10,361px wide on a 375px viewport. Clipping
 * hides the field just as thoroughly and contributes no layout at all. */
.tx-hp {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Post/redirect/get result banner. */
.tx-form-notice {
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-weight: var(--tx-medium);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.tx-form-notice i {
    font-size: 1.25rem;
    line-height: 1.4;
}

.tx-form-notice--ok {
    background: rgba(168, 255, 216, .18);
    border: 1px solid rgba(168, 255, 216, .5);
    color: #eafff6;
}

.tx-form-notice--error {
    background: rgba(255, 180, 162, .18);
    border: 1px solid rgba(255, 180, 162, .5);
    color: #fff1ed;
}

@media (max-width: 768px) {
    .contact-card,
    .contact-form {
        padding: 25px 20px;
    }
}
